With pressure disturbance p and axial velocity u, the ideal acoustic pipe equations are
∂u/∂t = −(1/ρ) ∂p/∂x
∂p/∂t = −ρc² ∂u/∂x
Characteristic waves u + p/(ρc) and u − p/(ρc) travel at +c and −c. Here each advances exactly one grid cell in a fixed time step Δt = Δx/c. At the reservoir pressure disturbance is zero; at the gate, velocity follows a linear closing ramp.
ΔpJ = ρcΔu
Treturn = 2L/c
Δpfirst = ρcu₀ · min(1, Treturn/Tclose)
For the lossless model, disturbance energy per unit pipe area is ∫[p²/(2ρc²) + ρ(u−u₀)²/2] dx. It equals the valve's integrated acoustic boundary work, ∫−p(uvalve−u₀) dt.
Textbook: the governing wave equations, Joukowsky relation, propagation time, and ideal energy balance. Scaled: numerical wave amplitude and times on the display. Illustrative: the drawn valve, flow flecks, pressure colour, and the pressure allowance.
Not modelled: friction, wave dispersion, changing pipe compliance, valve flow characteristics, vapour cavities, pipe wall stress and rupture, or complex branches. A design-limit warning is not a prediction of a burst. This single-pipe educational model is not a hydraulic-system design tool.