Governing equations
The one-dimensional elastic water-hammer equations are written in pressure-head form:
∂H/∂t + (a²/g) ∂V/∂x = 0
∂V/∂t + g ∂H/∂x + f(V|V| − V₀²)/(2D) = 0
H is pressure-head change (m), V is water velocity (m/s), a is wave speed (m/s), g is gravitational acceleration (9.80665 m/s², textbook), D is pipe diameter (m), and f is the Darcy friction factor (dimensionless). Water density is 998 kg/m³ (textbook approximation near 20 °C).
Numerical method
The method of characteristics follows the two wave families at speeds ±a. The grid uses Δx = L/96 and the fixed time step Δt = Δx/a, so the Courant number is exactly one. The upstream reservoir holds H = 0. The downstream valve imposes a linear velocity reduction over the selected closing time. Friction is included as a distributed transient source relative to the initial steady-flow state.
What is simplified
- Flow is one-dimensional, single-phase and represented by a uniform mean velocity.
- The pipe is uniform, circular and linearly elastic; wave speed is a user-set input.
- The reservoir is a fixed-head boundary and the valve law is a prescribed linear closure, not a detailed valve-characteristic curve.
- Air pockets, cavitation, column separation, branches, fittings, heat transfer and changing pipe supports are not modelled.
- The rupture seam is an illustrative threshold marker only. It does not calculate fracture, leakage or post-failure pressure relief.
Numbers and interpretation
Physical constants and equations are labelled textbook. Slider settings and the pressure envelope are illustrative. The displayed field is a numerical solution on a scaled one-dimensional grid; it is not a certified hydraulic design calculation. The snap-shut experiment tests the first pressure jump against Δp = ρaΔV.