Peak valve head vs. the rapid- or slow-closure estimate.
Water Hammer: The Shockwave Inside a Pipe
A valve closes. The water keeps moving. Watch the pressure wave race through the pipe.
Change one condition at a time
The valve closes faster than a pressure wave can make a round trip. A sharp compression wave travels back toward the reservoir.
Four independent checks
Mid-pipe sensor time vs. distance divided by wave speed.
Initial head loss vs. Darcy–Weisbach pipe friction.
Stored compression vs. net flow through both boundaries.
Differences are numerical comparisons, not a guarantee about a real installation. Values are recalculated when a control or preset changes.
Measure the wave speed
Send a pressure front past the mid-pipe sensor. Measure its arrival time, infer the wave speed, and compare it with the model input.
MODEL NOTESThe scienceEquations, assumptions and the limits of this model+
Governing equations
Water hammer is a transient pressure wave in a liquid-filled, elastic pipe. The one-dimensional water-hammer equations are:
Here H is pressure head, Q is volume flow, A is pipe area, a is wave speed, g is gravitational acceleration, D is internal diameter and f is the Darcy friction factor.
The characteristic solver uses B = a/(gA) and R = f Δx/(2gDA²). At each fixed step, it combines the upstream and downstream characteristic values to update head and flow. The grid spacing is chosen so that Δt = Δx/a. The global volume check compares (gA/a²)∫ΔH dx with ∫(Qin−Qout)dt, a continuity balance.
Reference relationships
Water density ρ = 998 kg/m³ and gravitational acceleration g = 9.81 m/s² are textbook reference values for this educational model. The 220 m reservoir head, pipe dimensions, starting flow, wave speed, closing time, friction factor and 3.4 MPa rating line are illustrative inputs, not a design specification.
What is simplified
- The pipe is straight, uniform, completely full and represented by a one-dimensional line.
- Water and pipe elasticity are combined into one constant wave speed.
- The valve is represented by a prescribed, linear flow-rate ramp, not a detailed valve geometry or actuator.
- Friction is quasi-steady Darcy friction. Bends, branches, cavitation, entrained air, leaks, temperature changes and frequency-dependent wall effects are omitted.
- The pressure limit is an illustrative comparison line. Crossing it flags an over-rating condition; it does not calculate a real pipe rupture.
The visual pipe is a scaled cutaway. The pressure front is shown separately from the much slower movement of water parcels.