Governing equations
The model uses the one-dimensional water-hammer equations for pressure head H and discharge Q:
∂H/∂t + a²/(gA) · ∂Q/∂x = 0
∂Q/∂t + gA · ∂H/∂x + fQ|Q|/(2DA) = 0
Textbook constants: water density 998.2 kg/m³ at 20 °C; gravitational acceleration 9.80665 m/s². The wave speed is an effective input that represents water compressibility and pipe-wall elasticity together.
Closure and wave checks
Δp = ρaΔV
techo = 2L/a
For a slower, approximately linear closure, the first surge is reduced by the factor min(1, 2L/(a·tc)). The solver uses a fixed-step Lax–Wendroff update on a 501-node grid. The maximum Courant number is 0.525 across the illustrative control ranges.
What is simplified
The pipe is straight, uniform and one-dimensional. The reservoir holds constant gauge head, the valve closes linearly, and friction is quasi-steady. Branches, air pockets, temperature variation, cavitation, column separation and detailed valve geometry are omitted. A pressure dip below vapour pressure would therefore be outside this model's validity.
Illustrative versus scaled
Pipe dimensions, control ranges and the 32 bar pressure rating are illustrative teaching settings, not a design specification. Live readouts and the cutaway pressure trace are scaled renderings of the numerical solution. The pressure-wave and travel-time equations are textbook relations.
The seam opening in the overpressure preset is a visual threshold cue only; structural fracture is not solved.