Skip to main content

How SimuPipe Calculates

Every SimuPipe result comes from published standards and well-documented numerical methods — not heuristics or proprietary black boxes. This page lists the standards, the solvers, and what is deliberately out of scope.

Standards implemented

Industry codes and references the engine applies directly.

IEC 60534-2-1

Control valve sizing — liquid and gas

Expansion factor Y, pressure-recovery FL for cavitation, FF liquid-critical-pressure ratio, xT choked-flow factor, position-dependent xT/FL curves.
ISO 5167

Orifice plate flow measurement

Reader-Harris/Gallagher discharge coefficient correlation, corner / flange / D-D/2 tap configurations, β-dependent validity range.
IAPWS-IF97

Steam and water properties

Saturated, subcooled, and superheated regions. Used by the engine, steam tables, boiler efficiency, flash steam, and condensate load calculators.
Crane TP-410

Fitting K-factors

Auto mode applies geometry-dependent K-factors for tees, reducers, elbows, and valves using the fluids library implementation.
Colebrook-White

Darcy friction factor

Iterated solution with ε/(3.71·D) — matches Pipe Flow Expert and ISO references. Hazen-Williams is also available for incompressible liquid service.
Peng-Robinson EOS

Real-gas compressibility

Cubic equation of state solved for Z(T,P) across 20 non-ideal gases. Used for density and IEC 60534 valve sizing on refrigerants, hydrocarbons, CO₂, and ammonia.
ASME B36.10 / B36.19 / B16.5 / B16.47

Pipe and flange dimensions

Carbon steel, stainless, and alloy pipe schedules. Raised-face flange geometry for Class 150–2500 (B16.5) and large-diameter Series A (B16.47).

Three solvers, one engine

The right physics for each service. The auto solver picks based on fluid phase.

Incompressible (Q-H)

Liquids — water, hydrocarbons, glycols, refrigerant liquids.

Formulation
Flow rate Q per edge and hydraulic head H per internal node. Solved with scipy.optimize.root using the hybr method.
Notes
Supports Darcy-Weisbach (Colebrook-White) or Hazen-Williams friction. Pump curves fitted to a quadratic H-Q polynomial. Elevation handled via head; no double-counting in the energy equation.
Isothermal compressible (P²-ṁ)

Gas pipelines, compressed air mains, low-to-moderate ΔT service.

Formulation
Mass flow ṁ per edge and absolute pressure P per internal node. The P₁²-P₂² form is scaled by a reference pressure for numerical stability.
Notes
Temperature is constant across the network. Valves use the IEC 60534 volumetric form with expansion factor Y. FCV Kv is an augmented unknown solved with a setpoint equation.
Adiabatic compressible (P-ṁ-T)

Insulated gas pipes, relief systems, high-velocity flow, pressure letdown.

Formulation
Mass flow ṁ per edge, absolute pressure P per internal node, temperature T per non-source node, and FCV Kv. Stagnation enthalpy (CpT + V²/2) conserved at each node.
Notes
Only source/inlet temperatures are prescribed — downstream temperatures are solved. Choking at Ma = 1 using local sonic velocity. Cp = γR/(γ-1) treated as constant; temperature-dependent Cp is a planned enhancement.

Scope

What SimuPipe models — and, just as important, what it does not.

In scope
  • Steady-state pipe network hydraulics
  • Liquid, gas, and steam service (38 fluid presets + custom)
  • Drag-and-drop network editor with auto-validation
  • Control valve sizing per IEC 60534, including choking and cavitation detection
  • Orifice plate metering per ISO 5167
  • Pump H-Q curves fitted from data points
  • EPANET .inp import with automatic unit and friction model detection
  • Export to PNG, PDF, CSV, XLSX
Out of scope
  • Transient analysis, water hammer, surge
  • Two-phase, slurry, and non-Newtonian flow
  • Coupled pipe-wall heat transfer in the network solver
  • Mechanical stress, pipe support, or vibration analysis
  • Fire & gas or relief system sizing per API 520/521 (relief-flow direction is supported, but blowdown tank and network dynamics are not)
  • Temperature-dependent Cp in the adiabatic solver (planned)

How we test

The backend has unit and integration tests covering friction correlations, valve sizing edge cases (choking, cavitation), orifice plate coefficients across the valid β range, pump curve convergence, tee topology, and full end-to-end network solutions. Analytical solutions are used where available; otherwise results are compared against textbook and standards-body worked examples.

Tests run on every change before deployment. That said, SimuPipe is a modelling tool — not a substitute for qualified engineering review. Any result used in design, purchasing, or operational decisions should be verified by a chartered / licensed engineer competent in the relevant service.

Frequently asked

Frequently Asked Questions

Which standards does SimuPipe implement?
The solver applies IEC 60534 for control valve sizing (expansion factor Y, choked flow, liquid cavitation via FL/FF), ISO 5167 (Reader-Harris/Gallagher) for orifice plate discharge coefficients, IAPWS-IF97 for steam properties, Crane Technical Paper 410 for fitting K-factors, ASME B36.10/B36.19 and ASTM B88/D1785/D3035 for pipe dimensions, ASME B16.5 and B16.47 for flange geometry, and the Peng-Robinson equation of state for 20 non-ideal gases.
What is the difference between the three solvers?
The incompressible solver uses a Q-H formulation with scipy.optimize.root for liquids. The isothermal compressible solver uses a P²-P² momentum equation with mass-flow unknowns for gases at constant temperature. The adiabatic compressible solver adds temperature as a per-node unknown and enforces stagnation enthalpy conservation — appropriate for insulated gas pipes, high-velocity flow, and relief systems where the gas cools during expansion.
How are non-ideal gases handled?
Twenty non-ideal gases — including refrigerants (R-410A, R-404A, R-407C, R-507A), hydrocarbons (propylene, isobutane), CO₂, and ammonia — use the Peng-Robinson equation of state to compute compressibility factor Z(T,P) for density and IEC 60534 valve sizing. Near-ideal gases (air, N₂, O₂, H₂, He, Ar, Ne, CO) use the ideal gas law directly. The isothermal P²-P² momentum equation itself follows the standard commercial approach.
What is out of scope?
SimuPipe models steady-state networks only — no transients, water hammer, or surge analysis. Two-phase flow, slurries, and non-Newtonian fluids are not supported. Heat transfer along pipe walls is not coupled into the hydraulic solver (though standalone tools cover insulation, condensate, and boiler duty). Mechanical design (stress analysis, supports) is outside the scope. Real-gas Cp is treated as constant in the adiabatic solver; temperature-dependent Cp is a future enhancement.
How is SimuPipe tested?
The backend is covered by unit and integration tests under backend/tests/, including analytical benchmarks for friction factor, valve sizing edge cases (choking, cavitation), orifice plate coefficients, pump curves, tee topology, and end-to-end network convergence. Tests are run on every change before deployment. Results on any live simulation should still be verified by a qualified engineer — SimuPipe is a modelling tool, not a replacement for design review.

Try SimuPipe free

Ten nodes, water and air, and the incompressible solver on the free plan — no credit card required.