Your browser does not support the canvas element. The controls and equations remain available below.
WHAT YOU ARE SEEING

A pressurised water main is flowing steadily. Close the valve to launch a pressure wave back towards the reservoir.

VALVE PRESSURE — bar(g) illustrative
PEAK SURGE — bar illustrative
MID-PIPE FLOW — m/s illustrative
CONTROL ROOM

Change the pipe. Watch the surge.

RENDER
PRESETS illustrative conditions
RUNNING0.00 sscaled
MEASURE THE SURGE experiment

Run through the first pressure-wave reflection. Compare the largest valve-pressure rise with the rapid- or slow-closure estimate.

INDEPENDENT NUMERICAL CHECKS live comparisons
% difference from reference
WAVE TRANSIT Waiting for wave Expected half-pipe travel time: — illustrative measurement vs textbook relation
ROUND-TRIP REFLECTION Waiting for reflection Textbook round-trip time · scaled model time illustrative timing vs textbook relation
STEADY FRICTION DROP 0.0% difference Model and Darcy–Weisbach reference illustrative measurement vs textbook relation
MEASURED SURGE Not measured Run the experiment to compare with theory illustrative result vs textbook estimate
The scienceEquations, assumptions and limits

Governing equations

∂p/∂t + ρa² ∂u/∂x = 0

∂u/∂t + (1/ρ) ∂p/∂x + [f/(2D)]u|u| = 0

Here p is gauge pressure, u is mean axial water speed, ρ is density, a is pressure-wave speed, D is pipe diameter and f is the Darcy friction factor.

Rapid: Δp ≈ ρaΔu

Slow linear closure: Δp ≈ 2ρLΔu/tc

The surge estimate switches at the round-trip wave time, 2L/a. The slow-closure expression is an engineering approximation, not an exact solution for every transient.

Numerical method

The pipe is represented by a one-dimensional staggered grid. Pressure and velocity are advanced with a leapfrog finite-difference scheme at a fixed time step. The Courant number is held at 0.80 scaled, below the textbook stability limit of 1 for this ideal wave model.

There are 220 scaled pipe intervals. The reservoir end has fixed pressure; the valve end imposes a linear decrease in flow speed until closure. Darcy friction is applied as a distributed momentum loss.

Constants and labels

Water density is 998 kg/m³ textbook (approximately 20 °C). Atmospheric pressure is 101.325 kPa textbook; water vapour pressure is 2.34 kPa textbook (approximately 20 °C). The reservoir gauge pressure is 30 bar illustrative.

All slider settings are illustrative, not measurements of a particular installation. Time and the displayed pipe geometry are scaled for the exhibit.

What is simplified

This is a single-phase, one-dimensional model. It does not resolve pipe-wall viscoelasticity, changing friction during the transient, branches, air pockets, valve flow coefficients, structural supports or cavitation bubbles. If the calculated absolute pressure falls to the vapour-pressure threshold, the real pipe may separate into liquid columns; this model continues the mathematical wave and flags that result as outside its physical range. The valve is represented by an imposed flow ramp rather than a detailed mechanical valve.

The wave speed is an input that combines fluid compressibility and pipe-wall elasticity. The model is educational and is not a design or safety tool for real water systems.

Made with 🤖 ChatGPT