Skip to main content
Sandbox Physics

Fluid dynamics · CFD benchmark workbench

Lid-Driven Cavity

The moving lid injects vorticity into a sealed cavity. This workbench advances three two-dimensional grids together and shows the live vorticity field, both centerline velocity profiles, residual history, and a direct comparison with the steady Ghia 1982 data.

Interactive modelLid-Driven Cavity
Nondimensional time tU/LtU/L0.0960.096
Active solution65×65  semi-Lagrangian65\times65\;\mathrm{semi\text{-}Lagrangian}
Steady residual RωR_\omega00
Ghia profile RMSE00
Divergence RMS u2\lVert\nabla\cdot\boldsymbol{u}\rVert_200
Primary vortex center(0.50,0.70)\left(0.50,\,0.70\right)

Physics tutorial

Lid-Driven Cavity: how one wall moves an entire fluid

BackgroundThree walls of a square container remain fixed while only the lid moves right. The no-slip condition gives adjacent fluid the same horizontal speed, then viscosity diffuses that momentum into the interior. The workbench places the live two-dimensional solution and published steady centerline data on the same axes.

Why it mattersThis spare geometry still contains wall shear, vorticity production, primary recirculation, and secondary corner eddies, so it has long served as a benchmark for incompressible-flow algorithms.

Start with the essentials

Focus question
If the lid only travels right, why does one giant clockwise circulation emerge in the cavity?
One-sentence intuition
The lid continuously injects negative vorticity. Kinematic viscosity ν\nu diffuses it while advection transports it, and Reynolds number sets the competition.

Core mathematical model

Incompressible Navier–Stokes equations

ut+(u)u=1ρp+ν2u,u=0\frac{\partial\boldsymbol{u}}{\partial t}+\left(\boldsymbol{u}\cdot\nabla\right)\boldsymbol{u}=-\frac{1}{\rho}\nabla p+\nu\nabla^2\boldsymbol{u},\qquad \nabla\cdot\boldsymbol{u}=0

Inertia, pressure, and viscosity determine the velocity field. Zero divergence means fluid is neither created nor destroyed inside the cavity.

Vorticity–streamfunction form

ωt+uω=ν2ω,u=(ψy,ψx),2ψ=ω\frac{\partial\omega}{\partial t}+\boldsymbol{u}\cdot\nabla\omega=\nu\nabla^2\omega,\qquad \boldsymbol{u}=\left(\frac{\partial\psi}{\partial y},-\frac{\partial\psi}{\partial x}\right),\qquad \nabla^2\psi=-\omega

The two-dimensional model transports scalar vorticity, then recovers a streamfunction and an automatically divergence-free velocity field from a Poisson equation.

Reynolds number

Re=ULν\mathrm{Re}=\frac{UL}{\nu}

Low Reynolds number means stronger viscous diffusion. Raising it thins the wall-shear layer and concentrates recirculation.

Common difficulties

A transient curve is not a steady benchmark

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 evolving. Separation among the three grids shows same-time resolution sensitivity, not a formal steady grid-convergence study.

Color shows rotation, not speed

Typical misconceptionThe deepest blue region must be moving fastest.

Better mental modelVorticity measures local rotation and shear, while speed is u\lVert\boldsymbol{u}\rVert. A thin wall layer can carry intense vorticity without being the fastest part of the whole flow.

Run the experiment

  1. 01

    Watch vorticity and profiles develop together

    Choose Ghia Reynolds number 100, reset the 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.
  2. 02

    Inspect grid sensitivity

    Pause the solver and press Step 24 repeatedly while comparing the three-grid RMSE in panel D.

    What to observe: All three grids remain at the same nondimensional time. Their separation reflects spatial discretization, but error against the steady reference still includes transience.
  3. 03

    Compare transport methods

    At Reynolds number 400, switch semi-Lagrangian transport off and compare equal step counts with the first-order upwind result.

    What to observe: The two low-order methods have different numerical diffusion, so their wall layer, residual path, and centerline error do not coincide.