Governing equations
The one-dimensional elastic water-hammer equations are written in terms of piezometric head H and volume flow Q:
∂H/∂t + (a²/gA) ∂Q/∂x = 0
∂Q/∂t + gA ∂H/∂x + f Q|Q|/(2DA) = 0
Here a is wave speed, A is pipe area, D is diameter, f is the Darcy friction factor and g is gravitational acceleration. The characteristic invariants are H ± aQ/(gA).
What the model calculates
The method of characteristics advances the two invariants across a fixed spatial grid. The time step is Δt = Δx/a, so the characteristic Courant number is exactly unity. The reservoir holds a fixed head. The valve boundary reduces flow linearly over the selected closing time, then holds it at zero.
For a rapid closure, the textbook Joukowsky relation gives the ideal pressure rise: Δp = ρaΔV. The wave travels one way in L/a and completes a reservoir-to-valve round trip in 2L/a. The initial steady friction head is checked against the textbook Darcy–Weisbach relation: hf = f(L/D)V²/(2g).
Constants and assumptions
Water density is set to 998 kg/m³ (textbook, approximate room-temperature value) and gravitational acceleration to 9.81 m/s² (textbook). The pipe length, diameter, initial velocity, wave speed, closing time, friction factor and 25 bar pressure-rating threshold are illustrative, not design recommendations.
The model assumes a straight, uniform pipe; single-phase water; small pressure disturbances; constant wave speed; constant Darcy friction factor; and a prescribed linear valve-flow schedule. At room temperature, water vapour pressure is approximately −0.99 bar gauge (textbook, approximate); the interface flags when the computed pressure falls below it. The model does not calculate cavitation, entrained air, viscoelastic pipe behaviour, detailed valve hydraulics, local fittings, structural stress or actual rupture discharge. The crack symbol only indicates that the illustrative pressure rating has been exceeded.
All plotted geometry is scaled for legibility. Numerical checks test the discretisation and initial condition; they are not a substitute for field measurements or engineering design analysis.