fluid
fluid is an interactive Eulerian fluid simulation built on a staggered grid. It combines semi-Lagrangian advection with optional BFECC correction and exposes the solver through visual modes for smoke, pressure, velocity magnitude, and vorticity.
Live controls turn the numerical method into an effective learning tool. Walls, forces, sources, sinks, particles, border conditions, and presets can all be changed while the simulation runs. Toggling BFECC or vorticity confinement exposes tradeoffs such as numerical diffusion directly in the simulation.
The three views show the same paused state. Smoke makes transport visible, velocity arrows expose the vector field carrying it, and signed vorticity separates clockwise from counterclockwise rotation in the wake.
Why it is worth exploring
- It connects numerical techniques to immediate visual feedback.
- Multiple presets, including jet flow, a lid-driven cavity, and a Kármán vortex street, exercise the same solver under different conditions.
- The controls make it a useful test bench for comparing stability, sharpness, and performance choices.
Begin with the grid and simulation-step code, then trace how the visualization modes turn solver fields into something inspectable.