Cavity Flow (Lid-Driven)

Category: 流体解析(CFD) | Integrated 2026-04-06
CAE visualization for lid driven cavity theory - technical simulation diagram
キャビティ流れ(蓋駆動)

Theory and Physics

Overview

🧑‍🎓

Professor, the lid-driven cavity is the very first benchmark problem in CFD, right?


🎓

That's correct. It's the problem of sliding the top wall (lid) of a square cavity horizontally at a constant velocity. The geometry is simple, boundary conditions are clear, and rich flow structures appear when the Reynolds number is varied. The benchmark data by Ghia et al. (1982) has been used for over 40 years.


Problem Setup

🧑‍🎓

Please explain the problem formulation.


🎓

The top wall of a square cavity (side length $L$) moves in the $x$ direction with velocity $U$. The other three walls are stationary. The governing equations are the incompressible Navier-Stokes equations.


$$ \nabla \cdot \mathbf{u} = 0 $$
$$ \frac{\partial \mathbf{u}}{\partial t} + (\mathbf{u} \cdot \nabla)\mathbf{u} = -\frac{1}{\rho}\nabla p + \nu \nabla^2 \mathbf{u} $$

🎓

The only dimensionless parameter is $Re = UL/\nu$. The boundary conditions are:


  • Top wall: $u = U$, $v = 0$
  • Bottom wall, Left wall, Right wall: $u = 0$, $v = 0$

Flow Structure Dependence on Re

🧑‍🎓

How does it change with the Reynolds number?


🎓

It can be summarized as follows.


RePrimary Vortex Position (Center Coordinates)Corner VorticesFlow Characteristics
100(0.6189, 0.7344)Tiny vortex at bottom cornersSteady, primary vortex slightly upper-right
400(0.5547, 0.6055)Vortices at both bottom cornersSteady, primary vortex moves closer to center
1000(0.5313, 0.5625)Both bottom corners + top-left vortexSteady, primary vortex almost at center
5000(0.5117, 0.5352)Vortices at all cornersSteady (2D), unstable in 3D
10000(0.5117, 0.5313)Hierarchical vortex structureSteady/weakly unsteady in 2D, turbulent in 3D
🧑‍🎓

Corner vortices are small vortices that form in the corners, right?


🎓

Yes. As Moffatt (1964) theoretically showed, an infinite series of vortices exists in sharp corners. The strength of each vortex decreases geometrically. In CFD, it's sufficient to resolve the first 2-3 vortices, but the mesh needs to be refined towards the corners.


Vorticity-Stream Function Formulation

🧑‍🎓

For 2D cases, is it often solved using the vorticity-stream function formulation?


🎓

For 2D incompressible flow, the vorticity-stream function formulation is efficient because it automatically satisfies the continuity equation.


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

Here, vorticity $\omega = \partial v/\partial x - \partial u/\partial y$, and stream function $\psi$ satisfies $u = \partial \psi / \partial y$, $v = -\partial \psi / \partial x$.


🎓

However, extension to 3D or variable density flows is difficult, so the velocity-pressure formulation (primitive variable formulation) is standard in general-purpose CFD codes.


Lid Corner Singularity

🧑‍🎓

The wall velocity becomes discontinuous at the lid corners, right? Isn't that a problem?


🎓

Good point. At the lid corners ($(0,L)$ and $(L,L)$), the velocity becomes discontinuous. $u = U$ (top wall) and $u = 0$ (side wall) cannot both hold simultaneously. This is a mathematical singularity, and the solution does not converge even with mesh refinement.


🎓

Practical workarounds are:

  • Evaluate results in regions a few cells away from the corner
  • Use a regularization condition (smoothly transition the lid velocity to zero towards the corner)
  • Acknowledge the singularity, compute with sufficient mesh density, and ensure accuracy in regions away from the corner
Coffee Break Trivia

Why Ghia (1982) Data Has Been Cited for Over 40 Years

The paper by Ghia et al., published in the Journal of Computational Physics in 1982, is used worldwide as the "correct data" for cavity flow. It provides tabulated velocity profiles for Re=1000, 3200, 5000, and 10000, and is still cited in hundreds to thousands of papers annually. Why has it remained valid for over 40 years? — Because "the problem setup is simple and highly reproducible, and the data presented is grid-converged to the highest standard of its time." When developing new CFD solvers or numerical schemes, passing the "Ghia benchmark" is the first checkpoint.

Physical Meaning of Each Term
  • Temporal Term $\partial(\rho\phi)/\partial t$: Think of the moment you turn on a faucet. At first, water comes out spluttering and unstable, but after a while, it becomes a steady stream, right? This "period of change" is described by the temporal term. The pulsation of blood flow from a heartbeat, or the flow fluctuation each time an engine valve opens/closes—all are unsteady phenomena. So what is steady-state analysis? Looking only at "after sufficient time has passed and the flow has settled"—i.e., setting this term to zero. This significantly reduces computational cost, so trying a steady-state solution first is a basic CFD strategy.
  • Convection Term $\nabla \cdot (\rho \mathbf{u} \phi)$: What happens if you drop a leaf into a river? It gets carried downstream by the flow, right? This is "convection"—the effect where fluid motion transports things. Warm air from a heater reaching the far side of a room is also because the "carrier," air, transports heat via convection. Here's the interesting part—this term contains "velocity × velocity," making it nonlinear. That is, as the flow becomes faster, this term rapidly strengthens, making control difficult. This is the root cause of turbulence. A common misconception: "Convection and conduction are similar" → They are completely different! Convection is transport by flow, conduction is transmission by molecules. There's an order of magnitude difference in efficiency.
  • Diffusion Term $\nabla \cdot (\Gamma \nabla \phi)$: Have you ever put milk in coffee and left it? Even without stirring, after a while it naturally mixes, right? That's molecular diffusion. Now a question—honey and water, which flows more easily? Obviously water, right? Honey has high viscosity ($\mu$), so it flows poorly. Higher viscosity strengthens the diffusion term, making the fluid move "sluggishly." In low Reynolds number flows (slow, viscous), diffusion dominates. Conversely, in high Re flows, convection overwhelms and diffusion plays a minor role.
  • Pressure Term $-\nabla p$: When you push a syringe plunger, liquid shoots out forcefully from the needle tip, right? Why? Because the plunger side is high pressure, the needle tip is low pressure—this pressure difference provides the force that pushes the fluid. Dam discharge works on the same principle. On a weather map, where isobars are densely packed? That's right, strong winds blow. "Flow is generated where there is a pressure difference"—this is the physical meaning of the pressure term in the Navier-Stokes equations. A common misunderstanding here: "Pressure" in CFD is often gauge pressure, not absolute pressure. If results go wrong immediately after switching to compressible analysis, confusion between absolute/gauge pressure might be the cause.
  • Source Term $S_\phi$: Warmed air rises—why? Because it becomes lighter (lower density) than its surroundings, so buoyancy pushes it upward. This buoyancy is added to the equation as a source term. Other examples: chemical reaction heat from a gas stove flame, Lorentz force acting on molten metal in a factory's electromagnetic pump... These are all actions that "inject energy or force into the fluid from the outside," expressed by the source term. What happens if you forget the source term? In natural convection analysis, forgetting buoyancy means the fluid doesn't move at all—a physically impossible result, like turning on a heater in a winter room but the warm air doesn't rise.
Assumptions and Applicability Limits
  • Continuum Assumption: Valid for Knudsen number Kn < 0.01 (mean free path ≪ characteristic length)
  • Newtonian Fluid Assumption: Shear stress and strain rate have a linear relationship (non-Newtonian fluids require viscosity models)
  • Incompressibility Assumption (for Ma < 0.3): Treat density as constant. For Mach number ≥ 0.3, compressibility effects must be considered
  • Boussinesq Approximation (Natural Convection): Consider density variation only in the buoyancy term, using constant density in other terms
  • Non-applicable Cases: Rarefied gas (Kn > 0.1), supersonic/hypersonic flow (shock capturing required), free surface flow (VOF/Level Set, etc. required)
Dimensional Analysis and Unit Systems
VariableSI UnitNotes / Conversion Memo
Velocity $u$m/sWhen converting from volumetric flow rate for inlet conditions, pay attention to cross-sectional area units
Pressure $p$PaDistinguish between gauge and absolute pressure. Use absolute pressure for compressible analysis
Density $\rho$kg/m³Air: ~1.225 kg/m³@20°C, Water: ~998 kg/m³@20°C
Viscosity Coefficient $\mu$Pa·sBe careful not to confuse with kinematic viscosity coefficient $\nu = \mu/\rho$ [m²/s]
Reynolds Number $Re$Dimensionless$Re = \rho u L / \mu$. Indicator for laminar/turbulent transition
CFL NumberDimensionless$CFL = u \Delta t / \Delta x$. Directly related to time step stability

Numerical Methods and Implementation

Selection of Numerical Method

🧑‍🎓

What methods are good for solving cavity flow?


🎓

Cavity flow has the peculiarity of being a closed domain with no inlet or outlet. The absolute pressure is not uniquely determined, so a reference pressure must be fixed at one point.


MethodApplicable RangeRemarks
Finite Difference Method (uniform grid)Re < $10^4$Original data by Ghia et al. also used this method
Finite Volume Method (FVM)General purposeStandard in commercial CFD. Coupled with SIMPLE/PIMPLE
Finite Element Method (FEM)General purposeTaylor-Hood elements (P2/P1) satisfy LBB condition
Spectral MethodHigh-accuracy computationChebyshev polynomial basis. Exponential convergence
Lattice Boltzmann Method (LBM)Re < $10^4$ approx.Easy implementation with wall bounce-back

FVM Implementation (SIMPLE Method)

🧑‍🎓

Please briefly explain the steps of the SIMPLE method.


🎓

The SIMPLE iteration for cavity flow is as follows.


1. Assume a pressure field $p^*$

2. Solve the momentum equations with $p^$ to obtain provisional velocity $\mathbf{u}^$

3. Solve the pressure correction equation $\nabla \cdot (\frac{1}{a_P} \nabla p') = \nabla \cdot \mathbf{u}^*$

4. Correct velocity and pressure: $p = p^ + \alpha_p p'$, $\mathbf{u} = \mathbf{u}^ - \frac{1}{a_P} \nabla p'$

5. Convergence check. If not converged, return to 1.


🎓

Since cavity flow has no inlet/outlet, fix the pressure reference at one point (e.g., the cell at the bottom-left corner). In OpenFOAM, specify reference cell and reference value for p in fvSolution.


Lattice Boltzmann Method

🧑‍🎓

Can it also be solved with the Lattice Boltzmann Method (LBM)?


🎓

LBM is very popular as an introduction to cavity flow. It can be easily implemented using the D2Q9 model (2D, 9 velocities) with the BGK collision operator.


$$ f_i(\mathbf{x} + \mathbf{c}_i \Delta t, t + \Delta t) = f_i(\mathbf{x}, t) - \frac{1}{\tau}[f_i(\mathbf{x}, t) - f_i^{eq}(\mathbf{x}, t)] $$

🎓

The relationship between relaxation time $\tau$ and kinematic viscosity is $\nu = c_s^2 (\tau - 0.5) \Delta t$, where $c_s = 1/\sqrt{3}$ (lattice speed of sound). The moving top wall is implemented with the Zou-He boundary condition.


🧑‍🎓

So with LBM, there's no need to solve the pressure-velocity coupling.


🎓

Correct. LBM is an explicit method, so no iteration is needed, and parallelization is easy. However, caution is required for numerical stability at high Re numbers; MRT (Multi-Relaxation Time) models or regularization techniques are used.


Comparison Method with Ghia Benchmark

🧑‍🎓

How should we compare with the data from Ghia et al.?


🎓

There are two comparison targets.


1. Vertical and horizontal velocity profiles at the cavity center

関連シミュレーター

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

シミュレーター一覧

関連する分野

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