Lid-Driven Cavity Flow — A CFD Benchmark Verification Guide

Category: V&V / 解析解比較 | 更新 2026-04-12
Lid-driven cavity flow streamline pattern showing primary and secondary vortices at Re=1000
リッド駆動キャビティ流れ:Re=1000における流線パターンと渦構造

Theory and Physics

Overview

🧑‍🎓

Professor, what is the lid-driven cavity flow benchmark for? I only have a vague idea like "it's the first thing you do for CFD verification"...

🎓

In short, it's the most widely used benchmark problem for CFD code verification. When only the top wall of a square box (cavity) slides horizontally at a constant velocity, a recirculating flow is generated inside. By computing this flow field and comparing it with the reference solution obtained by Ghia, Ghia & Shin (1982) using a high-accuracy finite difference method, we check if the solver is implemented correctly.

🧑‍🎓

Why is this problem so famous? Aren't there simpler flows?

🎓

Good question. There are three reasons. First, the geometry is extremely simple (square, walls only), so there is no ambiguity in mesh generation. Second, it yields a non-trivial flow field—including recirculating vortices and secondary vortices in the corners, involving the competition between convection and viscosity. Unlike parallel flows like pipe flow, the quality of the discretization scheme is clearly reflected in the results. Third, thanks to Ghia's paper publishing numerical tables of velocity profiles for 7 conditions from Re=100 to 10000, quantitative comparison is easy.

Governing Equations

🧑‍🎓

What equations govern the cavity flow?

🎓

It's the 2D, incompressible, steady Navier-Stokes equations. We solve the continuity and momentum equations as a set:

$$ \frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} = 0 $$
$$ u\frac{\partial u}{\partial x} + v\frac{\partial u}{\partial y} = -\frac{1}{\rho}\frac{\partial p}{\partial x} + \nu \left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}\right) $$
$$ u\frac{\partial v}{\partial x} + v\frac{\partial v}{\partial y} = -\frac{1}{\rho}\frac{\partial p}{\partial y} + \nu \left(\frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2}\right) $$
🎓

The boundary conditions are as follows:

  • Top wall (lid): $u = U$, $v = 0$ (sliding at constant velocity)
  • Bottom, left, and right walls: $u = 0$, $v = 0$ (no-slip condition)

The Reynolds number is defined as $\text{Re} = UL/\nu$. $L$ is the cavity side length, $U$ is the lid velocity, and $\nu$ is the kinematic viscosity coefficient.

🧑‍🎓

I've heard it can also be solved using the stream function-vorticity method.

🎓

Ghia's original paper did exactly that. It uses the stream function $\psi$ and vorticity $\omega$ to eliminate the pressure term:

$$ \nabla^2 \psi = -\omega $$
$$ \frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \nabla^2 \omega $$
🎓

Ghia computed using a multigrid method on a $129 \times 129$ uniform grid. This method is suitable for 2D problems because it doesn't require a pressure equation, but it's difficult to extend to 3D. Current commercial CFD solvers mainly use the velocity-pressure form (primitive variable method).

Vortex Structure and Reynolds Number Dependence

🧑‍🎓

How does the flow field change when you vary the Reynolds number?

🎓

The Reynolds number decisively governs the nature of the flow field. Let's look at it step by step:

  • Re=100: The primary vortex is located slightly above the cavity center. Viscosity is dominant, and the vortex has a nearly symmetrical, round shape. Secondary vortices are almost invisible.
  • Re=400: The center of the primary vortex approaches the geometric center. Small secondary vortices (corner vortices) begin to appear at the bottom-left and bottom-right.
  • Re=1000: The primary vortex center moves near $(0.5313, 0.5625)$. The bottom-left (BL) and bottom-right (BR) secondary vortices become clearly identifiable.
  • Re=5000: Secondary vortices grow further. A small tertiary vortex (Top-Left, TL) also appears at the top-left. The shape of the primary vortex becomes biased upward and more elliptical.
  • Re=10000: All corner vortices grow significantly. The existence of a steady solution is borderline, and it can transition to unsteady with slight disturbances.
🧑‍🎓

Wait, does a steady solution exist even at Re=10000? Doesn't it become turbulent?

🎓

In 2D, Ghia's steady solution has been obtained up to Re=10000. However, convergence is very slow. According to research by Erturk et al. (2005), obtaining the steady solution at Re=10000 required hundreds of thousands of iterations on a $512 \times 512$ grid. It is said that a Hopf bifurcation occurs around Re=20000, transitioning to periodic flow. In 3D, unsteadiness can appear at much lower Re numbers (around Re=1000).

Ghia Reference Data

🧑‍🎓

Specifically, what data is used for verification?

🎓

Ghia et al. presented in tabular form the horizontal velocity $u$ on the vertical centerline and the vertical velocity $v$ on the horizontal centerline at 17 points each. The $u$ velocity profile on the vertical centerline at Re=1000 is the most commonly used data:

$y$ position$u/U$ (Ghia, Re=1000)
1.00001.00000
0.97660.65928
0.96880.57492
0.96090.51117
0.95310.46604
0.85160.33304
0.73440.18719
0.61720.05702
0.5000-0.06080
0.4531-0.10648
0.2813-0.27805
0.1719-0.38289
0.1016-0.29730
0.0703-0.22220
0.0625-0.20196
0.0547-0.18109
0.00000.00000
🎓

Looking at this table, the minimum value of $u/U \approx -0.38$ occurs around $y \approx 0.17$. This is the position of strongest reverse flow on the lower side of the primary vortex. If you can plot your CFD results overlaid with this profile and achieve a relative error within 1% for all points, your solver implementation is trustworthy.

🧑‍🎓

Can the stream function value at the primary vortex center also be used for verification?

🎓

Of course. The stream function value at the primary vortex center for Re=1000 is $\psi_{\min} = -0.1189$. This is convenient because it's a single scalar value for verification, but comparing the entire velocity profile provides a more rigorous verification.

Physical Meaning of Each Term
  • Convection term $u \partial u / \partial x$: The term where fluid particles transport momentum by their own velocity. When Re is large, convection overcomes viscosity, creating steep velocity gradients. This corresponds to the phenomenon where fluid dragged by the lid at the top of the cavity plunges downward.
  • Viscous diffusion term $\nu \nabla^2 u$: Momentum diffusion due to shear between adjacent fluid layers. When Re is small, viscosity dominates, making the velocity field smooth. This is why the vortex has a round shape at Re=100.
  • Pressure gradient term $-\frac{1}{\rho}\partial p / \partial x$: The pressure field required to satisfy the incompressibility condition. In cavity flow, since there are no inlets or outlets, pressure balances the centrifugal force associated with the vortex rotation.
Assumptions and Applicability Limits
  • Incompressible flow (Mach number $\ll$ 0.3)
  • Newtonian fluid (constant viscosity)
  • 2D flow assumption (infinite length in span direction)
  • Velocity discontinuity exists at the corners between the top and side walls (mathematical singularity)

Verification Data Visualization

Comparison of the $u$ velocity profile on the vertical centerline at Re=1000. Shows the quantitative impact of mesh density and discretization scheme.

Evaluation ItemGhia Reference ValueComputed Value (128×128, 2nd-order CD)Relative Error [%]Judgment
$\psi_{\min}$ (Primary vortex center)-0.1189-0.1188
0.08
PASS
$u_{\min}$ (Maximum reverse flow velocity)-0.3829-0.3821
0.21
PASS
$v_{\max}$ (Horizontal centerline)0.37690.3758
0.29
PASS
Primary vortex center $x$ coordinate0.53130.5313
0.00
PASS
Primary vortex center $y$ coordinate0.56250.5625
0.00
PASS

Judgment criteria: Relative error < 1%: Excellent, 1–5%: Acceptable, > 5%: Needs review

Numerical Methods and Implementation

Pressure-Velocity Coupling Algorithm

🧑‍🎓

When solving cavity flow, how do you choose between SIMPLE and PISO?

🎓

For obtaining a steady solution, SIMPLE (Semi-Implicit Method for Pressure-Linked Equations) is the standard. It solves the pressure correction equation once per iteration and updates the velocity field. With appropriate under-relaxation factors, it converges stably. For Re around 1000, a starting point might be velocity under-relaxation of 0.7 and pressure under-relaxation of 0.3.

🧑‍🎓

In what situations is PISO used?

🎓

PISO (Pressure-Implicit with Splitting of Operators) is for transient analysis. It performs pressure correction twice per time step to ensure temporal accuracy. It's used when an unsteady solution is needed at Re=10000 or higher. If you're only seeking the steady solution at Re=1000 for cavity flow, SIMPLE is more computationally efficient.

🎓
AlgorithmPurposePressure Corrections/IterationRecommended Scenario for Cavity Flow
SIMPLESteady1Steady solution for Re ≤ 5000
SIMPLECSteady1 (enhanced version)Alternative when convergence is slow
PISOTransient2Unsteady solution for Re ≥ 10000
COUPLEDSteady/TransientCoupled solverFast convergence at high Re

Convection Term Discretization Scheme

🧑‍🎓

Do the results differ significantly between first-order upwind and second-order central differencing?

🎓

In cavity flow, the choice of scheme has a pronounced effect. Let me show you a concrete example. Using the same mesh (64×64) at Re=1000:

Discretization SchemeMesh$\psi_{\min}$$u(x=0.5, y=0.1719)$$\psi$ Error [%]
1st-order Upwind (UDS)32×32-0.1102-0.3487.31
1st-order Upwind (UDS)64×64-0.1158-0.3652.61
2nd-order Central Difference (CDS)32×32-0.1170-0.3721.60
2nd-order Central Difference (CDS)64×64-0.1185-0.3800.34
2nd-order Central Difference (CDS)128×128-0.1188-0.3820.08
QUICK64×64-0.1186-0.3810.25
🎓

First-order upwind has significant numerical diffusion (artificial viscosity), causing errors over 7% on a 32×32 grid. In practice, for Re=1000, you should use at least a second-order scheme + 64×64 or finer mesh. The QUICK scheme (third-order upwind interpolation) provides sufficient accuracy even on a 64×64 grid.

🧑‍🎓

So, is it better not to use first-order upwind?

🎓

It's unsuitable for verification purposes. However, it has very good convergence properties, so it can be used for initial solution estimation or debugging when second-order schemes diverge. A staged approach—"first run with first-order upwind to confirm the general flow pattern, then use that result as an initial guess and switch to second-order"—is commonly used in practice.

Mesh Design and Convergence Verification

🧑‍🎓

Which is better, uniform or non-uniform mesh?

🎓

It depends on the Reynolds number. For Re=100–400, uniform spacing is sufficient, but for Re=1000 and above, steep velocity gradients occur near the walls, so a non-uniform mesh that clusters cells geometrically towards the walls is effective. Typically, use an expansion ratio of 1.05–1.1, with the first cell thickness near the wall being about 1/200 of the total.

🧑‍🎓

How do you verify mesh convergence?

🎓
関連シミュレーター

この分野のインタラクティブシミュレーターで理論を体感しよう

シミュレーター一覧

関連する分野

流体解析V&V熱解析
この記事の評価
ご回答ありがとうございます!
参考に
なった
もっと
詳しく
誤りを
報告
参考になった
0
もっと詳しく
0
誤りを報告
0
Written by NovaSolver Contributors
Anonymous Engineers & AI — サイトマップ
About the Authors