The shallow water equations (SWE) describe the depth-integrated flow of a thin layer of fluid under gravity when the horizontal scale greatly exceeds the depth. They govern tidal and flood waves, storm surges, tsunamis racing across ocean basins, bore formation in rivers, and geostrophic eddies in the atmosphere. The same conservation structure appears in gas dynamics — with depth h playing the role of density ρ and the shallow-water Froude number Fr = u/csw analogous to the Mach number.
1. Derivation and Conservation Form
Starting from the 3-D incompressible Navier-Stokes equations, depth-averaging under the hydrostatic and kinematic surface conditions yields the 1-D SWE in conservation form:
The eigenvalues of the Jacobian ∂F/∂U are the wave speeds:
2. Roe's Approximate Riemann Solver
The cell-centred finite volume method updates each cell average Ui from interface fluxes. At each interface i+½, an exact Riemann problem is expensive. Philip Roe (1981) proposed a linearised solver: replace the nonlinear problem with a linear one having a specially constructed Roe average state Û that satisfies exact conservation across shocks:
The term ½ Σ |λ̂ₖ| αₖ rₖ is the numerical diffusion — it
damps oscillations but smears shocks over a few cells. High-order MUSCL
reconstruction before the Roe solve recovers second-order accuracy while
keeping the scheme conservative.
3. MUSCL Reconstruction and Limiters
First-order Godunov is stable but diffusive. MUSCL (Monotone Upstream-Centred Schemes for Conservation Laws, van Leer 1979) extends to second order by reconstructing a linear profile within each cell:
The minmod limiter is the most diffusive but guaranteed monotone. Van Leer is a good default balancing accuracy and stability. Superbee is the least diffusive but can steepen smooth extrema.
4. CFL Stability Condition
Explicit time integration requires the Courant-Friedrichs-Lewy condition. For the SWE, the fastest characteristic wave speed is |u| + c:
5. Wetting and Drying
Flood simulations frequently involve dry beds (h = 0). Naive Roe solvers produce negative depths and blow up. Standard fixes:
| Technique | Description |
|---|---|
| Depth threshold | if h < h_dry (e.g. 10⁻³ m), set u = 0 and treat as dry wall boundary |
| Positivity-preserving limiter | After each step, clip h ≥ 0; correct hu accordingly |
| Hydrostatic reconstruction | Audusse et al. 2004 — reconstruct h at interface accounting for bed slope to guarantee h_L, h_R ≥ 0 |
| Interface celerity | Replace ĉ with max(ĉ, √(g · max(h_L, h_R) / 2)) in Roe to avoid division by zero |
6. Source Terms: Topography and Friction
The well-balanced property ensures that a lake at rest (u = 0, η = const) remains exactly stationary despite non-zero bed gradients. A naive operator-splitting fails this: the flux difference and the source term must cancel exactly. The hydrostatic reconstruction of Audusse et al. achieves this automatically.
Bottom friction is modelled by a Manning-type term added to the momentum source:
7. 2-D Extension and Coriolis
Extending to 2-D adds a y-momentum equation and, for geophysical flows, the Coriolis force:
| Phenomenon | Dominant balance | Typical scale |
|---|---|---|
| Dam break | Inertia + pressure | L ~ 10–1000 m, Fr ~ 1–3 |
| Tidal bore | Inertia + pressure + friction | L ~ 10 km, Fr ~ 1 |
| Ocean tsunami | Pressure + dispersion correction | L ~ 1000 km, c ~ 200 m/s |
| Geostrophic eddy | Coriolis + pressure | L ~ 100 km, Ro ≪ 1 |
| Hurricane storm surge | Wind stress + Coriolis + friction | L ~ 500 km, h ~ 1–5 m surge |
8. Interactive: 1-D Dam Break
This simulation solves the 1-D SWE on a 400-cell grid using first-order Roe + CFL-adaptive timestepping. Adjust the upstream depth ratio and watch the rarefaction wave propagate left and the bore propagate right. The exact analytical solution (Stoker 1957) is overlaid in amber.