Overpressure (surge)
Underpressure
This 2D top-down companion to the 3D water-hammer model strips the pipe down to a single line so the traveling pressure wave is easy to follow end to end. Set the pipe length, choose a pipe material to set the wave (celerity) speed c, pick an initial flow velocity, then drag the valve-closure-time slider from a slow ramp to a near-instant slam and watch the pressure trace at the valve. A method-of-characteristics solver — not a canned animation — computes ΔP = ρ·c·Δv at every reflection, so closing faster than the critical time T_cr = 2L/c produces the full Joukowsky surge while closing slower than T_cr visibly caps the peak, and the live graph shows the resulting surge-and-decay oscillation with a period of 2L/c.