← Iris

Grid 128×128
FPS 0
Obstacles 0
Mode Dye
Tool
Visualization:
Viscosity 0.0001
Diffusion 0.0000
Brush size 5
Dye color
Force strength 5.0
Solver iterations 20

Navier-Stokes equations

The Navier-Stokes equations describe how fluids move. They encode conservation of momentum and mass for a viscous, incompressible fluid. Despite their deceptive simplicity, proving whether smooth solutions always exist in 3D is one of the Clay Millennium Prize Problems.

Stable fluids method

Jos Stam’s 1999 stable fluids algorithm solves the Navier-Stokes equations using operator splitting: add forces, diffuse (viscosity), advect (self-advection via semi-Lagrangian backtracing), and project (enforce incompressibility via pressure solve). The method is unconditionally stable — no matter how large the time step, the simulation never blows up.

Visualization modes

Dye shows passive scalar transport — ink carried by the flow. Velocity renders the vector field directly. Pressure shows the scalar pressure field that enforces incompressibility. Vorticity highlights rotating regions of the fluid — the curl of the velocity field. Speed maps the magnitude of velocity to color.

Obstacles

Obstacles enforce a no-slip boundary condition: fluid velocity is set to zero inside solid cells. This creates the flow separation, vortex shedding, and wake patterns that make fluid dynamics visually rich.