Skip to main content
Sandbox Physics

M100 · Fluid mechanics

Shallow-Water Waves & Dam Break

Release a gate, launch a pulse, hold a still lake over a ridge or inspect a hydraulic jump. Scrub the finite volume solution, compare an exact dam reference and refine the mesh while closing the boundary-flux volume ledger.

Interactive modelShallow-Water Waves & Dam Break
Solution timeReady\text{Ready}
Gauge depthReady\text{Ready}
Depth-mean velocityReady\text{Ready}
Discharge per widthReady\text{Ready}
Local long-wave speedReady\text{Ready}
Gauge Froude numberReady\text{Ready}
Stored water volumeReady\text{Ready}
Net exported volumeReady\text{Ready}
Maximum Courant numberReady\text{Ready}
Cell widthReady\text{Ready}
Solver stepsReady\text{Ready}
Mean depth error against exact solutionReady\text{Ready}
Volume integrated from raw scanReady\text{Ready}
Recorded stationsReady\text{Ready}
Force or volume closure residualReady\text{Ready}
Model stateReady\text{Ready}

Physics tutorial

Waves, wetting fronts and conservative numerics

BackgroundA water experiment is meaningful when geometry, forces or conserved quantities and acquired data agree.

Why it mattersConnect a physical apparatus to a quantitative task, then test its domain and limitations.

Start with the essentials

Focus question
Is the visible flood also a conservative solution?
One-sentence intuition
Compare the full physical model, its approximation and the separately acquired record.

Core mathematical model

Depth and momentum balances

ht+(hu)x=0(hu)t+(hu2+gh22)x=−ghbx\begin{aligned}h_t+(hu)_x&=0\\(hu)_t+\left(hu^2+\frac{gh^2}{2}\right)_x&=-ghb_x\end{aligned}

Hydrostatic depth-averaged flow along a constant-width channel; the bed enters the momentum source.

Local characteristic speeds

λ±=u±gh\lambda_\pm=u\pm\sqrt{gh}

A flood shock is not generally a small long wave. The dry-bed front has a different speed.

Froude number

Fr=∣u∣gh\mathrm{Fr}=\frac{|u|}{\sqrt{gh}}

Subcritical flow permits signals both ways; supercritical flow carries both families downstream. Dry cells have no Froude value.

Conservative volume ledger

V=W∑ihiΔxV(t)+∫0tW(qR−qL) ds=V(0)\begin{aligned}V&=W\sum_i h_i\Delta x\\V(t)+\int_0^t W(q_R-q_L)\,ds&=V(0)\end{aligned}

Boundary export can change stored volume without violating conservation. Raw cell scans provide a separate integral.

Adaptive step and grid error

CFL=ΔtΔxmax⁡i(∣ui∣+ghi)≤0.4Eh=1N∑i∣hi−hexact(xi,t)∣\begin{aligned}\mathrm{CFL}&=\frac{\Delta t}{\Delta x}\max_i\left(|u_i|+\sqrt{gh_i}\right)\leq0.4\\E_h&=\frac1N\sum_i|h_i-h_{\mathrm{exact}}(x_i,t)|\end{aligned}

The first-order scheme diffuses shocks. Mean depth error is available only for a flat dam before boundary interactions.

Stationary hydraulic jump

qL=qR=qq2hL+ghL22=q2hR+ghR22\begin{aligned}q_L&=q_R=q\\\frac{q^2}{h_L}+\frac{gh_L^2}{2}&=\frac{q^2}{h_R}+\frac{gh_R^2}{2}\end{aligned}

The preset balances mass and momentum flux across an entropy-admissible depth increase; the numerics spread its interface.

Common difficulties

Reference and acquisition

Typical misconceptionA displayed reference is an observed measurement.

Better mental modelRecord sensor channels explicitly. Changing the configuration clears observations; no statistical certification follows from deterministic perturbations.

Run the experiment

  1. 01

    Release the gate

    Compare wet-bed and dry-bed dam presets; move the time slider.

    What to observe: Rarefaction, shock or dry front arise from the same balances.
  2. 02

    Refine and compare

    Double the cell count with the same initial state and time.

    What to observe: The reference overlay stays fixed while numerical diffusion decreases.
  3. 03

    Test a still lake

    Select Lake over a ridge, then alter the ridge height.

    What to observe: A well-balanced hydrostatic reconstruction avoids spurious currents in this equilibrium.
  4. 04

    Close the ledger

    Compare reflecting and transmissive ends; acquire every cell.

    What to observe: Stored volume plus net export closes; raw heights integrate into a separately perturbed volume estimate.