ENGINEERING · WATER NETWORKS

Water Hammer: The Shockwave Inside a Pipe

A valve closes. The water keeps moving. Watch the pressure wave race through the pipe.

LIVE MODEL / 1D · SCALED CHARACTERISTICS
TUNE THE SYSTEM

Change one condition at a time

STARTING CONDITIONS
RENDER
◉
WHAT YOU ARE SEEING

The valve closes faster than a pressure wave can make a round trip. A sharp compression wave travels back toward the reservoir.

MODEL VALIDATION

Four independent checks

✓
01 / SURGE AMPLITUDEPASS
0.0%

Peak valve head vs. the rapid- or slow-closure estimate.

Model — · Reference —
02 / WAVE ARRIVALPASS
0.0%

Mid-pipe sensor time vs. distance divided by wave speed.

Model — · Reference —
03 / WALL FRICTIONPASS
0.0%

Initial head loss vs. Darcy–Weisbach pipe friction.

Model — · Reference —
04 / VOLUME BALANCEPASS
0.0%

Stored compression vs. net flow through both boundaries.

Stored — · Boundary —

Differences are numerical comparisons, not a guarantee about a real installation. Values are recalculated when a control or preset changes.

HANDS-ON EXPERIMENT

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.

VALVESENSORRESERVOIR
Awaiting measurement · scaled model
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:

∂H/∂t + (a² / gA) ∂Q/∂x = 0
∂Q/∂t + gA ∂H/∂x + (f / 2DA) Q|Q| = 0

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

Δp = ρaΔV Joukowsky pressure rise · textbook
tcritical = 2L/a Round-trip wave time · textbook
hf = f(L/D)V²/(2g) Darcy–Weisbach head loss · textbook
ΔH ≈ 2LV/(gtc) Slow, linear closure estimate · textbook

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.

Educational engineering model · textbook relationships with illustrative inputs · not a pipe-design or safety assessment.
Made with 🤖 ChatGPT