OpenHydro Bench
Exact answer known1D · pressurizedCandidate

Water hammer: valve slammed shut

Is the pressure surge right when a valve shuts instantly?

Test A1P-020
Joukowsky (1900)
Version 3.0.0
Press play, or drag the slider, to watch the exact answer unfold. Models are compared at the end, t = 0.5 s.

What happens

Water moving at speed is stopped dead by a valve. The pressure jumps by the Joukowsky amount and the surge races back up the pipe at the speed of sound in water.

Why it matters

Surges burst pipes and damage pumps. Surge protection is sized from exactly this number.

A good model must

  • get the peak pressure within 2 %
  • store exactly the water that kept flowing in
  • converge at least at the rate a sharp front allows

How models did

In rank order: by each model's percent difference from the right answer, the largest over the test's accuracy checks (lower is better; results within 10 % of each other share a rank). Mass error, timing and NSE are shown beside it, not folded in. Each model runs the same inputs on 4 grids, from 20 m down to 2.5 m cells; the checks are scored on the 2.5 m grid, and each card lists the error on every grid. Compare them in the results viewer →

RankModelDifferenceLargest difference inMass errorRun time
1Demo 1D suite example<0.01 %Peak pressure<0.01 %–
2TSNet water hammer · MOC0.13 %Peak pressure0.13 %–
Demo 1D
Worked example that ships with the suite: plain, well-understood schemes
#1 under 0.01 % off

Rate the error shrinks on finer grids: 0.49 (90 % range 0.48 to 0.5); the method's expected rate is 0.4 or more

Peak pressure
• < 0.0001 % off
Water stored by compression
· < 0.0001 % error
conservation, reported beside the score
Error by grid (L1 p)
· 20 m: 55,037 · 10 m: 39,401 · 5 m: 28,034 · 2.5 m: 19,885
reported, not counted · the checks above are scored on the 2.5 m grid
Improves with finer grids
· rate 0.49 (90 % range 0.48 to 0.50)
reported, not counted · the scheme's design order is 0.5

Scored with method 3.0 · Score card: demo

TSNet
TSNet 0.3.1 (Xing and Sela 2020), an open-source water-hammer solver: the method of characteristics on an EPANET network
#2 0.13 % off

Rate the error shrinks on finer grids: 1.9 (90 % range 0.36 to 3.4); the method's expected rate is 0.4 or more

Settings: tsnet (method of characteristics on a WNTR network; the pipe split into reaches of the grid length)

Peak pressure
• 0.13 % off
Water stored by compression
· 0.13 % error
conservation, reported beside the score
Error by grid (L1 p)
· 20 m: 20,251 · 10 m: 10,551 · 5 m: 653 · 2.5 m: 654
reported, not counted · the checks above are scored on the 2.5 m grid
Improves with finer grids
· rate 1.89 (90 % range 0.36 to 3.41)
reported, not counted · the scheme's design order is 0.5

Scored with method 3.0 · Score card: TSNet 0.3.1

Not run yet: HEC-RAS 7.0, TELEMAC-2D, ANUGA, GeoClaw, LISFLOOD-FP, TUFLOW, MIKE 21, Iber, BASEMENT, Delft3D FM
Run it and add yours →

Error shrinks as the grid gets finer

Average error on each grid. A steeper line means the model converges faster.

1,0003,00010,00030,0002.551020grid cell sizeDemo 1D suite example: rate 0.49TSNet water hammer · MOC: rate 2
Demo 1D · rate 0.49TSNet · rate 2

Status of this test

Candidate. To become frozen it needs: maintainer review recorded.

Technical details for reviewers Checks, reference, inputs, sources

Checks and why each limit was chosen

CheckDifference measured as a percentage ofLatestDifferenceWhy this check
peak_pressure
peak_error of p · in the score
already a percentage–Peak pressure within ±2% of Joukowsky rise Δp = ρ a V0.
storage_balance
storage_balance_error of p · conservation, beside the score
already a percentage–Mass balance with no free parameter: until the first reflection the reservoir keeps delivering V0 while the valve is shut, and the pipe must store exactly that volume by compression, so ∫Δp dx = ρa²V0t. A conservative scheme meets it to round-off; 1 % allows non-conservative interpolation schemes that are otherwise accurate.
convergence
observed order of L1 error in p · reported, not counted
the design order, 0.5–Measured from the error on every refinement level, as in ASME V&V 20.

Reference

Exact solution from references.joukowsky.pressure_wave.

More figures

Pressure wave travelling upstream from the closed valve02505007501,00002004006008001,000Distance from reservoir x (m)Pressure rise (kPa)Exact, t = 0.1 sExact, t = 0.25 sExact, t = 0.4 sExact, t = 0.5 sDemo solver (MOC), t = 0.5 s: 0, 0Demo solver (MOC), t = 0.5 s: 7.5, 0Demo solver (MOC), t = 0.5 s: 15, 0Demo solver (MOC), t = 0.5 s: 22.5, 0Demo solver (MOC), t = 0.5 s: 30, 0Demo solver (MOC), t = 0.5 s: 37.5, 0Demo solver (MOC), t = 0.5 s: 45, 0Demo solver (MOC), t = 0.5 s: 52.5, 0Demo solver (MOC), t = 0.5 s: 60, 0Demo solver (MOC), t = 0.5 s: 67.5, 0Demo solver (MOC), t = 0.5 s: 75, 0Demo solver (MOC), t = 0.5 s: 82.5, 0Demo solver (MOC), t = 0.5 s: 90, 0Demo solver (MOC), t = 0.5 s: 97.5, 0Demo solver (MOC), t = 0.5 s: 105, 0Demo solver (MOC), t = 0.5 s: 112, 0Demo solver (MOC), t = 0.5 s: 120, 0Demo solver (MOC), t = 0.5 s: 128, 0Demo solver (MOC), t = 0.5 s: 135, 0Demo solver (MOC), t = 0.5 s: 142, 0Demo solver (MOC), t = 0.5 s: 150, 0Demo solver (MOC), t = 0.5 s: 158, 0Demo solver (MOC), t = 0.5 s: 165, 0Demo solver (MOC), t = 0.5 s: 172, 0Demo solver (MOC), t = 0.5 s: 180, 0Demo solver (MOC), t = 0.5 s: 188, 0Demo solver (MOC), t = 0.5 s: 195, 0Demo solver (MOC), t = 0.5 s: 202, 0Demo solver (MOC), t = 0.5 s: 210, 0Demo solver (MOC), t = 0.5 s: 218, 0Demo solver (MOC), t = 0.5 s: 225, 0Demo solver (MOC), t = 0.5 s: 232, 0Demo solver (MOC), t = 0.5 s: 240, 0Demo solver (MOC), t = 0.5 s: 248, 0Demo solver (MOC), t = 0.5 s: 255, 0Demo solver (MOC), t = 0.5 s: 262, 0Demo solver (MOC), t = 0.5 s: 270, 0Demo solver (MOC), t = 0.5 s: 278, 0Demo solver (MOC), t = 0.5 s: 285, 0Demo solver (MOC), t = 0.5 s: 292, 0Demo solver (MOC), t = 0.5 s: 300, 0Demo solver (MOC), t = 0.5 s: 308, 2.4e-12Demo solver (MOC), t = 0.5 s: 315, 3.2e-11Demo solver (MOC), t = 0.5 s: 322, 3.3e-10Demo solver (MOC), t = 0.5 s: 330, 3.1e-09Demo solver (MOC), t = 0.5 s: 338, 2.6e-08Demo solver (MOC), t = 0.5 s: 345, 1.9e-07Demo solver (MOC), t = 0.5 s: 352, 1.3e-06Demo solver (MOC), t = 0.5 s: 360, 8.3e-06Demo solver (MOC), t = 0.5 s: 368, 4.7e-05Demo solver (MOC), t = 0.5 s: 375, 0.00024Demo solver (MOC), t = 0.5 s: 382, 0.00114Demo solver (MOC), t = 0.5 s: 390, 0.00487Demo solver (MOC), t = 0.5 s: 398, 0.019Demo solver (MOC), t = 0.5 s: 405, 0.0679Demo solver (MOC), t = 0.5 s: 412, 0.222Demo solver (MOC), t = 0.5 s: 420, 0.663Demo solver (MOC), t = 0.5 s: 428, 1.818Demo solver (MOC), t = 0.5 s: 435, 4.575Demo solver (MOC), t = 0.5 s: 442, 10.58Demo solver (MOC), t = 0.5 s: 450, 22.55Demo solver (MOC), t = 0.5 s: 458, 44.3Demo solver (MOC), t = 0.5 s: 465, 80.45Demo solver (MOC), t = 0.5 s: 472, 135Demo solver (MOC), t = 0.5 s: 480, 212Demo solver (MOC), t = 0.5 s: 488, 308Demo solver (MOC), t = 0.5 s: 495, 421Demo solver (MOC), t = 0.5 s: 502, 540Demo solver (MOC), t = 0.5 s: 510, 656Demo solver (MOC), t = 0.5 s: 518, 758Demo solver (MOC), t = 0.5 s: 525, 842Demo solver (MOC), t = 0.5 s: 532, 904Demo solver (MOC), t = 0.5 s: 540, 945Demo solver (MOC), t = 0.5 s: 548, 972Demo solver (MOC), t = 0.5 s: 555, 986Demo solver (MOC), t = 0.5 s: 562, 994Demo solver (MOC), t = 0.5 s: 570, 998Demo solver (MOC), t = 0.5 s: 578, 999Demo solver (MOC), t = 0.5 s: 585, 1,000Demo solver (MOC), t = 0.5 s: 592, 1,000Demo solver (MOC), t = 0.5 s: 600, 1,000Demo solver (MOC), t = 0.5 s: 608, 1,000Demo solver (MOC), t = 0.5 s: 615, 1,000Demo solver (MOC), t = 0.5 s: 622, 1,000Demo solver (MOC), t = 0.5 s: 630, 1,000Demo solver (MOC), t = 0.5 s: 638, 1,000Demo solver (MOC), t = 0.5 s: 645, 1,000Demo solver (MOC), t = 0.5 s: 652, 1,000Demo solver (MOC), t = 0.5 s: 660, 1,000Demo solver (MOC), t = 0.5 s: 668, 1,000Demo solver (MOC), t = 0.5 s: 675, 1,000Demo solver (MOC), t = 0.5 s: 682, 1,000Demo solver (MOC), t = 0.5 s: 690, 1,000Demo solver (MOC), t = 0.5 s: 698, 1,000Demo solver (MOC), t = 0.5 s: 705, 1,000Demo solver (MOC), t = 0.5 s: 712, 1,000Demo solver (MOC), t = 0.5 s: 720, 1,000Demo solver (MOC), t = 0.5 s: 728, 1,000Demo solver (MOC), t = 0.5 s: 735, 1,000Demo solver (MOC), t = 0.5 s: 742, 1,000Demo solver (MOC), t = 0.5 s: 750, 1,000Demo solver (MOC), t = 0.5 s: 758, 1,000Demo solver (MOC), t = 0.5 s: 765, 1,000Demo solver (MOC), t = 0.5 s: 772, 1,000Demo solver (MOC), t = 0.5 s: 780, 1,000Demo solver (MOC), t = 0.5 s: 788, 1,000Demo solver (MOC), t = 0.5 s: 795, 1,000Demo solver (MOC), t = 0.5 s: 802, 1,000Demo solver (MOC), t = 0.5 s: 810, 1,000Demo solver (MOC), t = 0.5 s: 818, 1,000Demo solver (MOC), t = 0.5 s: 825, 1,000Demo solver (MOC), t = 0.5 s: 832, 1,000Demo solver (MOC), t = 0.5 s: 840, 1,000Demo solver (MOC), t = 0.5 s: 848, 1,000Demo solver (MOC), t = 0.5 s: 855, 1,000Demo solver (MOC), t = 0.5 s: 862, 1,000Demo solver (MOC), t = 0.5 s: 870, 1,000Demo solver (MOC), t = 0.5 s: 878, 1,000Demo solver (MOC), t = 0.5 s: 885, 1,000Demo solver (MOC), t = 0.5 s: 892, 1,000Demo solver (MOC), t = 0.5 s: 900, 1,000Demo solver (MOC), t = 0.5 s: 908, 1,000Demo solver (MOC), t = 0.5 s: 915, 1,000Demo solver (MOC), t = 0.5 s: 922, 1,000Demo solver (MOC), t = 0.5 s: 930, 1,000Demo solver (MOC), t = 0.5 s: 938, 1,000Demo solver (MOC), t = 0.5 s: 945, 1,000Demo solver (MOC), t = 0.5 s: 952, 1,000Demo solver (MOC), t = 0.5 s: 960, 1,000Demo solver (MOC), t = 0.5 s: 968, 1,000Demo solver (MOC), t = 0.5 s: 975, 1,000Demo solver (MOC), t = 0.5 s: 982, 1,000Demo solver (MOC), t = 0.5 s: 990, 1,000Demo solver (MOC), t = 0.5 s: 998, 1,000
  • Exact, t = 0.1 s
  • Exact, t = 0.25 s
  • Exact, t = 0.4 s
  • Exact, t = 0.5 s
  • Demo solver (MOC), t = 0.5 s

Joukowsky rise ρaV₀ = 1 MPa behind a sharp front; the fixed-grid solver smears the front.

Promotion checklist

Only frozen tests have fixed inputs and answers. This list is computed from the manifest and the published score cards; the rules are in the method.

  • ✓Data licence verifiedfor candidateanalytic-public
  • ✓All inputs availablefor candidateall committed or fetched by SHA-256
  • ✓Reference (truth) availablefor candidateanalytic generator
  • ✓Every tolerance justifiedfor candidateeach gating criterion has a rationale
  • ✓A published run passesfor frozen2 passing score card(s)
  • ✓Order of accuracy shownfor frozenobserved order meets the minimum
  • ✓Two independent codes passfor frozenpassing codes: TSNet 0.3.1, demo
  • ✗Maintainer review recordedfor frozenno maintainer review recorded

Inputs

FileRoleFormatSHA-256Get it
inputs/params.jsoncase_parametersjson1a1d580b46bc…Download

About this test

Physics

Frictionless pipe of length \(L\) with reservoir at \(x = 0\) and valve at \(x = L\). Steady velocity \(V_0\) toward the valve; instantaneous full closure at \(t = 0\). Before the first upstream reflection (\(0 \le t \le L/a\)) the closed-end state propagates at celerity \(a\) with pressure rise \(\Delta p = \rho a V_0\). Default parameters: \(L = a = 1000\), \(V_0 = 1\), \(\rho = 1000\) so \(\Delta p = 10^6\,\mathrm{Pa}\) and first reflection at \(t = 1\,\mathrm{s}\).

Mass balance

Until the first reflection the reservoir end still delivers \(V_0\) while the valve is shut, and the pipe stores that inflow by compressing the water and stretching the wall. Per unit area the stored volume is \(\int \Delta p \,dx / (\rho a^2)\), so

$$\int_0^L \Delta p\,dx = \rho a^2 V_0 t ,$$

whatever the front's shape. The storage_balance criterion checks this identity; it does not depend on how sharply a scheme resolves the front.

Case history

  • 3.0.0 — the continuity criterion (mean \(|u|\) behind the front) measured front smearing rather than mass, and failed accurate first-order schemes. It is replaced by the storage balance above. Scores are not comparable with 2.x.
  • 2.0.0 — convergence target set from theory (0.5, minimum 0.4).

Citation

Joukowsky, N. (1900). "Über den hydraulischen Stoss in Wasserleitungsröhren." Mémoires de l'Académie Impériale des Sciences de St.-Pétersbourg, Series 8, 9(5). English translation: Simin, O. (1904). "Water hammer." Proc. Am. Water Works Assoc., 24, 341–424.

Analytic generator: references.joukowsky.pressure_wave.

Pitfalls

  • Score only before the first reflection; after \(t > L/a\) the simple step-wave formula is invalid.
  • Numerical dispersion smears the pressure front; peak_error on \(p\) is more robust than pointwise L∞ near the discontinuity.
  • Elastic wave speed \(a\) must match the solver's pipe/fluid compressibility model; mismatched \(a\) shifts both timing and \(\Delta p\).
  • Instantaneous closure is an idealization — finite closure laws will under- predict the classic Joukowsky rise.

Sources

  • Joukowsky, N. (1900). Über den hydraulischen Stoss in Wasserleitungsröhren. Mem. Acad. Imp. Sci. St.-Petersbourg Ser.8 9(5).

Test A1P-020_joukowsky_instant_closure · version 3.0.0 · data licence analytic-public