What this research found
The lid-driven cavity — a square box of fluid stirred by one sliding wall — is the standard test problem for verifying incompressible flow solvers. K-Dense built a second-order stream-function-vorticity solver from scratch, ran it at Reynolds numbers of 100 and 1000, and checked the result against the tabulated 1982 benchmark of Ghia, Ghia and Shin that has anchored this problem for four decades. Centerline velocities matched to within 1.37 x 10^-2 at worst, and a grid-refinement study confirmed the scheme converges at its designed second order.
- Computed centerline velocities, interpolated to the exact benchmark stations, reproduce the Ghia reference to a maximum absolute deviation of 4.31 x 10^-3 in the horizontal component and 8.42 x 10^-3 in the vertical at Reynolds number 100, rising to 1.37 x 10^-2 and 7.89 x 10^-3 at Reynolds number 1000.
- The primary vortex centre was located at (0.6154, 0.7378) at Reynolds number 100 and (0.5324, 0.5666) at Reynolds number 1000, both within one grid spacing of the reference positions. The stream-function minimum of -0.10332 matches the reference -0.10342 to four significant figures at the lower Reynolds number, while at 1000 the computed -0.11547 underestimates the reference -0.11793 by about 2%.
- A refinement study on grids of 64, 128, and 256 intervals gave observed convergence orders of 2.03 for the centre-point velocity and 2.01 for the stream-function minimum, matching the scheme's second-order design. The Richardson-extrapolated stream-function minimum of -0.10352 differs from the benchmark by less than 10^-4, showing the two independent solutions approach the same continuum limit.
- Errors concentrate exactly where theory predicts: the largest discrepancies at Reynolds number 1000 fall in the thin near-wall layers where velocity gradients are steepest and where the first-order Thom wall-vorticity condition is least accurate, while interior values match to three or four significant figures.
- Reaching a normalized infinity-norm velocity residual below 10^-6 took 28,938 time steps at Reynolds number 100 and 63,048 at Reynolds number 1000. An independent check on the converged fields put the steady vorticity-transport residual at 1.15 x 10^-5 and 2.10 x 10^-5 respectively, at the level of spatial truncation error.
- The flow structure follows the established phenomenology: at Reynolds number 100 the primary vortex sits in the upper-right quadrant under viscous control, and by 1000 it migrates toward the cavity centre as inertia dominates, with the bottom-corner secondary eddies growing and the wall boundary layers thinning.
How it was done
The steady incompressible Navier-Stokes equations were recast in stream-function-vorticity form, which satisfies mass conservation identically and removes pressure from the system entirely. Spatial operators used second-order central differences on a uniform grid of 128 by 128 intervals (129 by 129 nodes), and the stream-function Poisson equation was inverted to machine precision each step by a type-I discrete sine transform direct solver, eliminating iterative Poisson error as a source of benchmark discrepancy. Wall vorticity came from Thom's classical relation, and the vorticity-transport equation was marched to steady state with an explicit two-stage Runge-Kutta scheme under an adaptive time step set by the stricter of the convective and diffusive stability limits. The Poisson solver was verified separately against a manufactured solution, the higher-Reynolds-number case was warm-started from the converged lower-Reynolds-number field, and computed profiles were spline-interpolated to the exact benchmark stations for pointwise comparison.
Data sources
- Ghia, Ghia & Shin, Journal of Computational Physics 48:387 (1982) — tabulated centerline velocities, vortex locations, and stream-function extrema
- Botella & Peyret, Computers & Fluids 27:421 (1998) — spectrally accurate reference values
- Schreiber & Keller, Journal of Computational Physics 49:310 (1983) — high-order finite differences with Richardson extrapolation
- Erturk, Corke & Gökçöl, International Journal for Numerical Methods in Fluids 48:747 (2005) — high-Reynolds-number steady solutions
Limitations
Deviations reach one to two percent of the lid speed in the thin near-wall layers at Reynolds number 1000, traceable to uniform-mesh truncation error and the first-order local accuracy of the Thom wall condition. The study covers only steady two-dimensional flow at two Reynolds numbers; higher values would need near-wall grid refinement or a higher-order boundary closure.
How this research was produced
K-Dense Web planned and ran this engineering investigation end to end — gathering the sources, carrying out the analysis, producing the figures, and drafting the report. The full session transcript, including every intermediate step, is available to view.


