Governing equations
The penstock is treated as a rigid water column. Its velocity v and the surge-tank level z, measured from the reservoir surface, obey:
dv/dt = −(g/L)[z + C v|v|]
dz/dt = (Ap/At)v
C = [fL/D + K]/(2g), with pipe area Ap = πD²/4 and tank area At = πDt²/4. The model uses a fixed illustrative 0.01-second time step with fourth-order Runge–Kutta integration.
What is textbook
Gravity is 9.81 m/s² (textbook). The Darcy–Weisbach head-loss relation and the frictionless small-signal period T = 2π√(LAt/(gAp)) are textbook relations.
What is illustrative
Pipe dimensions, tank dimensions, initial velocity, friction factor and local-loss coefficient are illustrative scenario settings, not measurements of a real installation. The drawn apparatus is a scaled schematic.
What is simplified
Water is incompressible; pipe walls are rigid; velocity is uniform; the valve closes instantaneously; and the Darcy factor remains fixed. The model begins after the fast elastic pressure-wave phase. It does not simulate acoustic water hammer, air pockets, structural motion, cavitation or overflow discharge. If the tank rim is reached, the run stops and flags the limit rather than inventing overflow behaviour.
Educational model only. Real surge protection requires site-specific transient analysis and engineering design.