Water Hammer: Pressure Waves in a Pipeline
Close a valve. Watch pressure travel, reflect, and return.
Pressure along the pipe
The valve is open. Water moves steadily toward the right.
The science Equations, assumptions & validation
The linear, one-dimensional water-hammer equations are ∂p/∂t + ρa² ∂v/∂x = 0 and ∂v/∂t + (1/ρ)∂p/∂x = 0. Here p is pressure change (Pa), v is axial velocity (m/s), ρ is density (kg/m³), and a is pressure-wave speed (m/s).
Characteristic quantities R = p + ρav and S = p − ρav travel right and left at speed a. At the reservoir p = 0, so R = −S. At the valve v = v₀ max(0, 1 − t/Tc), so S = R − 2ρav. The model advects these characteristics one grid cell per fixed step Δt = L/(Na), with N = 240. This is an exact grid shift for the linear model at Courant number one.
For a rapid full closure, the first-wave Joukowsky rise is Δp = ρaΔv. A one-way transit takes L/a; the return trip takes 2L/a. The valve closure is prescribed rather than calculated from valve mechanics. Pipe walls, viscosity, friction, cavitation, compressibility variation, junctions and fluid–structure coupling are omitted. Negative relative pressure is not a prediction of absolute pressure or cavitation.
Numbers labelled textbook are direct formulas. Numbers labelled scaled come from the simplified numerical model. The diagram, light, and pipe proportions are illustrative, not to scale. This exhibit is not affiliated with any manufacturer or water utility.