25 January 2016

simple advection



This is a CUDA implementation of Jos Stam’s Stable Fluids. It is perhaps the simplest application of the Navier-Stokes equations and is focused on speed and stability over accuracy. Stam’s solution of back-tracing “particles” for the advection step is elegant and was fun to learn. I’m still trying to wrap my head around the projection term which forces the simulation to be energy conserving. Diffusion here is unconditionally stable using the Guass-Seidel relaxation he suggested in the games-oriented version of his paper.

No comments:

Post a Comment