The square cavity with a top wall moving at constant speed is a standard incompressible CFD benchmark. We compare Boreas semi-Lagrangian and first-order upwind advection with the 17 vertical-centerline u and 17 horizontal-centerline v values published by Ghia, Ghia, and Shin (1982). Four Reynolds numbers (100, 400, 1000, 3200) and four meshes (64²–512²) reveal numerical diffusion and mesh convergence. These are Boreas v0.10 (release/0.10) GPU results. A CPU comparison was run for one deck, Re 100 at 128², and agrees to four decimal places.
Model and boundary conditions
Only the top wall of the square cavity moves right at 1 m/s; the other walls are stationary. Dashed lines mark the two reference-velocity centerlines. Schematic; not to scale.
Reference data
Ghia et al. (1982), Table I (u/U along x = 0.5) and Table II (v/U along y = 0.5), provide 17 points per line and Reynolds number. Boreas cell values are bilinearly interpolated to those locations; RMS over 17 points summarizes the difference, with U = 1. One printed Re 400 Table II value at x = 0.9063 lies 0.1 away from the neighboring trend and is omitted from v RMS.
Simulation setup
| Item | Boreas setting |
|---|---|
| Domain | Square cavity L = 1 m; two dimensions represented by three cells in z with symmetry on both z faces |
| Boundaries | Top wall at y = 1: u = U = 1 m/s; the other three walls: stationary no-slip |
| Fluid | ν = UL/Re for Re = 100, 400, 1000, 3200; all laminar |
| Advection | Semi-Lagrangian and implicit first-order upwind; no turbulence model |
| Mesh | Uniform 64², 128², 256², 512² (about 12,000–790,000 cells) |
| Time | Fixed dt = 0.02 s (CFL = 1.3, 2.6, 5.1, 10.2); stop when velocity change over a 10 s window is below 1e-4 U (t = 22–162 s) |
Centerline velocity profiles

Re 1000, upwind: u/U on x = 0.5 above and v/U on y = 0.5 below. Circles are Ghia et al. (1982); lines are Boreas from 64² to 512². Refinement brings the near-bottom reverse-flow maximum and the near-wall v peaks toward the reference.

Re 3200, upwind. Thinner near-wall shear layers make errors larger than at Re 1000 on the same mesh; v peaks remain slightly low even at 512².

At Re 1000 and 128², the two schemes are similar (u RMS: semi 0.046, upwind 0.035). Their different behavior becomes clearer under refinement.
Mesh convergence

RMS error against Ghia versus mesh spacing on logarithmic axes, u above and v below. Dashed guides are first order. Re 400 and 1000 decrease at about first order through 512². Re 3200 approaches first order on finer meshes. Re 100 reaches a 0.001–0.004 floor comparable to the accuracy of Ghia's 129² tabulated solution.

With dt fixed at 0.02 s, semi-Lagrangian improves similarly to upwind through 128², then nearly stalls from 256² to 512².
| Re | Advection | 64² | 128² | 256² | 512² | Order, 256² → 512² |
|---|---|---|---|---|---|---|
| 400 | Upwind | 0.0337 | 0.0181 | 0.0092 | 0.0043 | 1.10 |
| 400 | Semi | 0.0420 | 0.0217 | 0.0134 | 0.0114 | 0.23 |
| 1000 | Upwind | 0.0611 | 0.0346 | 0.0187 | 0.0091 | 1.04 |
| 1000 | Semi | 0.0848 | 0.0458 | 0.0278 | 0.0227 | 0.29 |
| 3200 | Upwind | 0.1250 | 0.0857 | 0.0555 | 0.0337 | 0.72 |
| 3200 | Semi | 0.1516 | 0.0944 | 0.0520 | 0.0400 | 0.38 |
RMS error in u/U at Ghia's 17 points; order = log₂(error at 256²/error at 512²). Re 100 is omitted because both schemes are near the 0.001–0.004 reference floor.
Why semi-Lagrangian stalls at 512²

At Re 1000 and 512², reducing dt from 0.02 to 0.01 to 0.005 s (CFL 10 → 5 → 2.5) reduces u RMS from 0.0227 to 0.0140 to 0.0115. Runs stopped by the steady-state criterion (circles) agree with runs continued to 300 s (squares), so early stopping is not the cause. The dashed line is upwind on the same mesh (0.0091).
The semi-Lagrangian steady-state error has a time-step-dependent component. Holding dt fixed while refining the mesh raises CFL and lets that component obscure spatial convergence. To assess its mesh convergence, dt should fall with h to keep CFL near or below 2–3. Implicit upwind retains first-order convergence at CFL 10.
Flow fields

Re 1000, 512² upwind: normalized speed and streamlines show the primary vortex and two lower-corner secondary vortices.

At Re 3200 the primary vortex shifts downward, corner vortices grow, and a small upper-left recirculation appears, matching the trend reported by Ghia. Vortex-center coordinates were not compared quantitatively.
Quantitative results
| Metric | Value |
|---|---|
| Re 100, 128² u RMS | Semi 0.0021; upwind 0.0022 (near Ghia table precision) |
| Upwind 512² u RMS | Re 400: 0.0043; Re 1000: 0.0091; Re 3200: 0.0337 |
| Upwind order, 256² → 512² | Re 400: 1.10; Re 1000: 1.04; Re 3200: 0.72 |
| Semi 512² u RMS, dt 0.02 → 0.005 s at Re 1000 | 0.0227 → 0.0115 (CFL 10 → 2.5) |
| Steady state | All 32 decks reached velocity change < 1e-4 U over 10 s at t = 22–162 s |
| Version reproducibility | The same 32 decks agree to four decimal places in v0.9.1 and v0.10.1 |
Limits
- The mesh ladder was run on GPU; the CPU comparison covers only Re 100 at 128².
- At Re 100, the 0.001–0.004 error floor is comparable to Ghia table precision. A more accurate reference, such as a spectral solution, would be needed below it.
- Semi-Lagrangian mesh order needs a separate ladder with dt reduced alongside h. Its 512² result at dt = 0.005 s (0.0115) is still above upwind (0.0091).
- Vortex centers and secondary-vortex positions from Ghia Tables III–V were not compared quantitatively.
Reference
- Ghia, U., Ghia, K. N., and Shin, C. T. (1982). “High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method.” Journal of Computational Physics, 48(3), 387–411. DOI: 10.1016/0021-9991(82)90058-4.