Single-Phase Pipe Water-Hammer Transient Calculator
Trace pressure waves after prescribed downstream velocity closure with a fixed reservoir, Darcy friction, grid refinement and absolute-pressure cavitation rejection.
Results
Calculate to view linked results. Default values are examples, not recommended operating inputs.
Learn, compare and practice
Worked explanations, controlled studies and printable exercises connected to this calculation.
Calculation sequence
- Supply absolute reservoir and vapor pressures, wave speed and a Darcy friction factor. Initial pressure decreases along the horizontal pipe by the steady friction loss. The downstream boundary is a prescribed mean-velocity reduction to zero, not a valve opening percentage or a Cv equation; the two boundary conditions must not be confused.
- Integrate incoming characteristics at Courant one on 100 and 200 uniform segments. Compare pressure histories at common physical times and require the maximum difference below 3% of the instantaneous Joukowsky rise. Check pressure at every node and timestep before reducing export samples. If any node reaches the supplied vapor pressure, reject the entire single-phase prediction rather than allowing unphysical negative absolute pressure.
- Compare the zero-friction instantaneous-closure case with rho*a*V and wave return time 2L/a. Finite closure and friction modify the waveform. Displayed extrema cover only the simulated horizon; they are not a guaranteed design envelope for a real valve, surge protection or piping system. Pressure reflections require the actual reservoir and boundary conditions to match the model.
- Calculations remain local in a dedicated WebAssembly worker. The existing self-hosted scientific engine is about 33 MB raw on first use; the envelope additionally loads the pinned CoolProp engine and eccentric flow loads a 178 KB FEM package. Nothing is downloaded until calculation. No composition, heat history or measurements are sent to a calculation server. Save retains canonical input values; file backup can be shared with colleagues, while CSV/PDF retain samples, assumptions and sources. Browser storage alone can be lost.
Worked check
For the default 1,000 m pipe, rho=1,000 kg/m3, wave speed 1,000 m/s and initial velocity 0.5 m/s, instantaneous Joukowsky rise is 0.5 MPa and round-trip travel time 2 s. With f=0.02 and 0.5 s linear velocity closure, the simulated maximum absolute pressure is about 2.497782 MPa and minimum about 1.523260 MPa.
Synthetic examples for reproducibility, not measured field results.
Assumptions and limitations
- One horizontal uniform pipe with constant density/wave speed, V/a<0.01 and quasi-steady Darcy friction. No branches, variable diameter or arbitrary terminal equipment.
- No cavitation, gas pockets, column separation, multiphase slugging, unsteady friction or fluid-structure interaction. Wave speed is a supplied elastic closure; no pipe stress or material-strength check is made.
- Prescribed velocity closure, not a real valve Cv law. Closure must end within half the finite simulated horizon. Fine/coarse agreement and Joukowsky recovery verify numerics, not field surge safety.
Implemented equations
Linear acoustic pipe equations
Sources and maintenance
Published by PetroCalcHub Team. Implementation and source checks: . This does not claim independent expert review.
- University of Southern California: Kim 2012, water-hammer equations and reservoir/valve MOC boundaries
- Tijsseling and Bergant: Joukowsky waves, reservoir reflection and practical limits