Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piellardj/navier-stokes-webgl
Stable fluid simulation on GPU using WebGL.
https://github.com/piellardj/navier-stokes-webgl
fluid-dynamics fluid-grid fluid-simulation navier-stokes stable webgl
Last synced: 13 days ago
JSON representation
Stable fluid simulation on GPU using WebGL.
- Host: GitHub
- URL: https://github.com/piellardj/navier-stokes-webgl
- Owner: piellardj
- Created: 2017-12-31T11:15:20.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T09:51:49.000Z (5 months ago)
- Last Synced: 2024-10-25T19:33:37.272Z (26 days ago)
- Topics: fluid-dynamics, fluid-grid, fluid-simulation, navier-stokes, stable, webgl
- Language: TypeScript
- Homepage: https://piellardj.github.io/navier-stokes-webgl
- Size: 370 KB
- Stars: 42
- Watchers: 2
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# navier-stokes-webgl
Stable fluid simulation on GPU using WebGL.Live version [here](https://piellardj.github.io/navier-stokes-webgl).
This is an implementation of the Stable Fluid described by Jos Stam.
[![Donate](https://raw.githubusercontent.com/piellardj/piellardj.github.io/master/images/readme/donate-paypal.svg)](https://www.paypal.com/donate/?hosted_button_id=AF7H7GEJTL95E)
# Simulation
The simulation is implemented on GPU with the method provided in GPU Gems.
The diffusion term was dropped since it didn't have much visual influence.# Data storage
This simulation can run in two modes for storing the velocities:
* velocity stored in float textures: each component (x, y) is stored as a 32bit float.
To do so the following extensions must be available: `OES_texture_float`, `WEBGL_color_buffer_float`, `OES_texture_float_linear`.
* velocity stored in normal textures with four 8bit channels.
In this mode each component is stored as a 16bit fixed point value, encoded in two 8bit texture channels.
This mode provides less precision for the computing, and you can see artifacts if you push the display color intensity to the maximum.