Incompressible Navier–Stokes equations
Inertia, pressure, and viscosity determine the velocity field. Zero divergence means fluid is neither created nor destroyed inside the cavity.
Fluid dynamics · a classic CFD benchmark
Why does a right-moving lid create one giant clockwise circulation inside a sealed cavity? The lid drags the fluid just below it to the right, so it keeps feeding clockwise rotation into the top of the box. Viscosity spreads that rotation downward and the flow carries it around the walls, until the whole cavity turns as one big clockwise eddy. The Reynolds number sets the balance between spreading and carrying.
The moving lid injects vorticity into a sealed cavity. Three two-dimensional grids advance together, and you see the live vorticity field, the velocity profiles along both centerlines, the residual history and a comparison with the steady Ghia 1982 data on the same plot.
Physics tutorial
BackgroundThree walls of a square container stay fixed, and only the lid slides to the right. Because of the no-slip condition, the fluid touching the lid moves with it at the same horizontal speed, and viscosity spreads that momentum into the interior. The Lab plots the live two-dimensional solution on the same axes as published steady centerline data.
Why it mattersThe geometry is about as simple as it gets, yet it has wall shear, vorticity production, a primary recirculation and secondary corner eddies. That is why it has long been a benchmark for incompressible-flow algorithms.
Start with the essentials
Inertia, pressure, and viscosity determine the velocity field. Zero divergence means fluid is neither created nor destroyed inside the cavity.
The two-dimensional model carries scalar vorticity along, then solves a Poisson equation for the streamfunction. The velocity derived from the streamfunction is automatically divergence-free.
At low Reynolds number, viscous diffusion is stronger. Raising it thins the shear layer at the walls and concentrates the recirculation.
Typical misconceptionA live curve near the Ghia markers proves that the grid has converged.
Better mental modelThe Ghia markers are steady results from a finer grid, while the live curve is still changing in time. The gap between the three grids shows how sensitive the result is to resolution at one moment; it is not a formal steady grid-convergence study.
Typical misconceptionThe deepest blue region must be moving fastest.
Better mental modelVorticity measures local rotation and shear, while speed is . A thin wall layer can carry intense vorticity without being the fastest part of the whole flow.
Choose the Ghia Reynolds number 100 preset, press Reset study, and watch panels A, B and C together.
What to observe: Strong clockwise vorticity appears at the top first, then the live centerline curves move gradually toward the steady reference markers.Pause the solver and press Step 24 repeatedly while comparing the three-grid RMSE in panel D.
What to observe: All three grids stay at the same dimensionless time, so the gap between them comes from spatial discretization. Their error against the steady reference still includes transient error.At Reynolds number 400, turn off Semi-Lagrangian transport and compare with the first-order upwind result after the same number of steps.
What to observe: The two low-order methods have different numerical diffusion, so their wall layers, residual curves and centerline errors do not coincide.Conceptual inspiration: FluidMotion. Original simulations and graphics; the model limits are described above.