A grid-based solver advances the incompressible Navier-Stokes equations by diffusing and advecting
velocity across a square lattice with a circular obstacle, then colors every cell straight onto the
canvas — no 3D scene, just the raw flow field.
∂u/∂t + (u·∇)u = −∇p/ρ + ν∇²u, ∇·u = 0
Re = U·D / ν
steps: diffuse → advect → obstacle no-slip → wake shedding
- Inflow speed — free-stream velocity U entering from the left edge.
- Viscosity (1/Re) — kinematic viscosity; lower values raise the Reynolds number and push the wake toward shedding/turbulence.
- Grid resolution — number of lattice cells across; finer grids resolve smaller eddies at higher cost.
- Velocity / Vorticity view — colors each cell by speed magnitude or by local rotation (curl) of the flow.
This is the same advect-diffuse family of algorithm used in real CFD software for aerodynamic and
HVAC airflow simulation, drawn here directly as a 2D color field instead of an orbitable 3D plane.