Water Hammer

2D twin of the 3D pipeline: close the valve and follow the pressure wave along the pipe, with the head profile drawn above it.

Switch to 3D

Presets

Playback

Flow and closure

Faster flow and a quicker valve give a bigger surge.

Run

Model checks

The science

Governing equations. One-dimensional compressible, elastic-pipe flow: ∂H/∂t + (a²/g) ∂V/∂x = 0 and ∂V/∂t + g ∂H/∂x + f V|V|/(2D) = 0, with H the piezometric head, V the mean velocity, a the pressure-wave speed. They are integrated with the method of characteristics on 40 reaches (Δt = Δx/a), a reservoir at the upstream node (fixed head 60 m) and a valve whose discharge is V = k τ(t) √H at the downstream node, with opening τ falling linearly from 1 to 0 in Tc.

Wave speed. Korteweg: a = √[(K/ρ) / (1 + (K/E)(D/e))] for a thin-walled pipe with K = 2.2 GPa; it falls from 1483 m/s (rigid pipe) to about 1100 m/s (steel) and 300 m/s (PVC).

Limits. Rapid closure (Tc ≤ 2L/a): Joukowsky, ΔH = a V0 / g, Δp = ρ a V0. Slow closure: the Michaud estimate ΔH ≈ 2 L V0 / (g Tc). The pressure at the valve oscillates with period 4L/a, damped by friction.

Honest simplifications. The valve opening is linear in time and its discharge law is quasi-steady; real valves have a nonlinear flow-versus-travel curve. Where the head would drop below vapour pressure (about −10 m gauge) the model clamps it there and does not track the vapour cavity, so later peaks after column separation are not reliable (the readout flags this). Steady friction only, no unsteady friction, no pipe-wall viscoelasticity (matters for plastic pipes), no fluid-structure interaction. The bulge and colours are exaggerated; real wall strain is a fraction of a percent. The 800 m pipeline is drawn compressed into a 9-unit model, and the time scale is slowed so the wave can be followed. Independent educational model.

What to try
  • Choose Rapid slam, press Close valve and watch the red surge front run to the reservoir and back: the pressure at the valve flips every L/a seconds (period 4L/a).
  • Switch to Slow closure: the peak falls far below the Joukowsky value because the pressure relief wave returns before the valve is shut.
  • Try HDPE or PVC: a softer pipe means a slower wave and a much smaller surge for the same flow.
Pressure at the valve and mid-pipe against time
Head along the pipe now
Surge estimate against closing time
Joukowsky surge by pipe material
Made with 🟠 Blender