Cavity Flow (Lid-Driven)
Cavity Flow (Lid-Driven): Theoretical Foundations
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.
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.
| Re | Primary Vortex Position (Center Coordinates) | Corner Vortices | Flow Characteristics |
|---|---|---|---|
| 100 | (0.6189, 0.7344) | Tiny vortex at bottom corners | Steady, primary vortex slightly upper-right |
| 400 | (0.5547, 0.6055) | Vortices at both bottom corners | Steady, primary vortex moves closer to center |
| 1000 | (0.5313, 0.5625) | Both bottom corners + top-left vortex | Steady, primary vortex almost at center |
| 5000 | (0.5117, 0.5352) | Vortices at all corners | Steady (2D), unstable in 3D |
| 10000 | (0.5117, 0.5313) | Hierarchical vortex structure | Steady/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.
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
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.
Computational Methods for Cavity Flow (Lid-Driven)
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.
| Method | Applicable Range | Remarks |
|---|---|---|
| Finite Difference Method (uniform grid) | Re < $10^4$ | Original data by Ghia et al. also used this method |
| Finite Volume Method (FVM) | General purpose | Standard in commercial CFD. Coupled with SIMPLE/PIMPLE |
| Finite Element Method (FEM) | General purpose | Taylor-Hood elements (P2/P1) satisfy LBB condition |
| Spectral Method | High-accuracy computation | Chebyshev 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.
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