Water Hammer: The Pressure Wave Inside a Pipe
Close a valve. Watch a pressure wave race through a water main.
The science · equations, assumptions and experiment
Small-amplitude water hammer in a compliant thin-walled pipe uses ∂u/∂t = −(1/ρ)∂p/∂x and ∂p/∂t = −ρc²∂u/∂x. Wave speed is c = √[K / {ρ(1 + KD/(Et))}]. The characteristic invariants are R+ = u + p/(ρc) and R− = u − p/(ρc). They move right and left at speed c. At the reservoir, gauge pressure is zero; at the valve, velocity follows a linear closure ramp. A sudden stop predicts Δp = ρcΔu (Joukowsky).
The solver uses a fixed time step Δt = Δx/c and characteristic shifts on 240 cells, with exact characteristic boundary updates. The three checks compare independent theoretical event predictions with measurements sampled from the numerical grid. The surge experiment restarts the flow and records the first valve-pressure maximum.
Illustrative: water colour, pipe deformation, wave glow and gauge layout are exaggerated for visibility. Scaled: simulation time and numerical pressure. Textbook: governing equations, density and modulus inputs, acoustic wave-speed and step-surge formula. The model omits viscosity, cavitation, unsteady friction, pipe joints and nonlinear wall mechanics. A high surge is labelled a risk threshold, not a structural failure calculation. Educational simulation, not an engineering design tool.