← All simulations
Fluid Lab
Incompressible 2-D flow with stable-fluids advection, pressure projection, vorticity confinement and buoyancy. Drag on the canvas to stir; switch modes for smoke, a wind tunnel, convection or ink.
Pause
Step
Reset
Clear walls
Save PNG
What am I looking at?
Stable fluids (Stam): each step adds forces, advects velocity and dye backwards along the flow (semi-Lagrangian with a MacCormack correction), then makes the velocity divergence-free by solving a pressure Poisson equation with warm-started Jacobi iterations.
Wind tunnel : stripes of dye enter from the left. Behind a cylinder or box you should see a Kármán vortex street once Re is above roughly 50; the lift trace oscillates at the shedding frequency and the Strouhal number is estimated from it. Drag is the pressure integral over the body plus a crude skin-friction term, so treat it as an estimate.
Convection : temperature drives buoyancy. A hot floor and a cold ceiling give Rayleigh–Bénard plumes; the Rayleigh number readout is Ra = β·ΔT·H³ / (ν·κ).
Ink : dye is slightly heavier than water, so drops fall and fold into mushroom-shaped vortex rings.
Keys: Space pause, R reset. Reynolds number is nominal (excludes numerical diffusion).