This demo implements Stam's semi-Lagrangian method using a eulerian grid to solve the Navier-Stokes equations describing fluid physics.
Cell attributes and boundary conditions are stored in different 2D 16FP textures. Frame buffer objects are employed to retrieve processed fragments and a Jacobi iterative solver is used for Poisson equations.
Fedwick et al. vorticity confinement method and buoyancy force are also implemented on the GPU to increase realism of the simulated fire.
Programmed with C++, GLSL and OpenGL.
Hardware : Macbook Pro 2.8 Ghz Nvidia GeForce 9600M GT
- J. Stam, Real-Time Fluid Dynamics for Games. Proceedings of the Game Developer Conference, March 2003.
- R. Fedkiw, J. Stam, and H. W. Jensen. Visual Simulation of Smoke. In SIGGRAPH 2001 Conference Proceedings, Annual Conference Series , pages 15-22, August 2001.
- Harris M., Fast fluid dynamics simulation on the GPU. GPU Gems, Mar. 2004, pp. 637-665.