Methodology
What we compute, how we compute it, and where every number comes from.
Reynolds number
The flow-regime indicator. Below Re = 2,300 flow is laminar; above Re = 4,000 it is fully turbulent; the band in between is genuinely transitional and any free calculator that claims a precise friction factor there is bluffing.
Source: standard fluid-mechanics text (e.g. Frank White, Fluid Mechanics, Ch.
6). Implementation in packages/shared/src/pipe.ts → reynolds().
Hazen-Williams equation
Empirical head-loss for water in commercial-grade pipes. Single closed-form expression; no iteration. Valid in the envelope Re = 10⁴–10⁷ at near-room-temperature water.
Source: Hazen & Williams (1905), Hydraulic Tables. C-factor library cites
ASHRAE 2021 Handbook Ch. 22, AWWA M11 (steel), AWWA M9 (concrete), and Cameron Hydraulic Data.
Implementation: packages/shared/src/pipe.ts → hazenWilliamsHeadM().
Darcy-Weisbach equation
Physically-derived head-loss equation. Works for any Newtonian fluid given (ρ, μ). Used by the flagship pressure-drop calculator and the Darcy-Weisbach calculator.
Source: Darcy (1857), Weisbach (1845). Implementation: packages/shared/src/pipe.ts → darcyWeisbachHeadM().
Friction-factor correlations
Three correlations are implemented; the dispatcher picks the right one for the regime.
- Laminar (Re ≤ 2,300): f = 64 / Re (exact).
- Transitional (2,300 < Re < 4,000): linear interpolation between laminar and turbulent endpoints. The regime is genuinely undefined.
- Turbulent (Re ≥ 4,000): Colebrook–White, iterated to 1e-10 tolerance, seeded from Swamee-Jain.
Source: Colebrook (1939), Haaland (1983), Swamee & Jain (1976) — all in
ASCE/ASME journals. Implementation: packages/shared/src/pipe.ts → frictionFactor*().
Minor (fitting) losses
K-factor method, summed over all fittings on a segment.
Source: Crane Technical Paper 410 (1988), Cameron Hydraulic Data 19th ed.,
Idel'chik Handbook of Hydraulic Resistance. The L/D values are cross-checked against Crane.
17 fittings shipped today — the library is in packages/shared/src/fittings.ts.
Fluid properties — water
Water density and dynamic viscosity polynomials fit to NIST IAPWS-IF97 saturated-liquid data, valid 0–100 °C at 1 atm. Density is accurate to ±0.05%, viscosity to ±2%.
fluids.ts → waterDensityKgM3) Dynamic viscosity (Pa·s), Vogel form: μ(T) = A · 10B/(T+273.15−C) A = 2.414·10⁻⁵, B = 247.8, C = 140 (best-fit to IAPWS).Source: NIST WebBook, ASHRAE Handbook 2021 Ch. 1.
Other fluids
The flagship and Darcy-Weisbach calculators expose six fluids:
- Water (NIST IAPWS-IF97)
- Seawater (≈3.5% salinity, ASHRAE 2021 Ch. 31)
- Propylene glycol 30% / water (ASHRAE 2021 Ch. 31 secondary-coolant tables)
- Propylene glycol 50% / water (ASHRAE 2021 Ch. 31)
- Mineral oil ISO VG 32 (typical industrial-grade hydraulic oil; verify against vendor for safety-critical work)
- Diesel #2 (ASTM D975-typical)
For other fluids, override the kinematic viscosity manually using the Darcy-Weisbach
calculator. The fluid library is in packages/shared/src/fluids.ts.
Pump-sizing equations
Source: Cameron Hydraulic Data; Hydraulic Institute pump standards (ANSI/HI 14.6).
Velocity safety bands
The thresholds used by the flagship and the velocity-check tool:
- v < 0.6 m/s: sediment-prone — solids settle, biofilm grows
- 0.6 ≤ v ≤ 2.4 m/s: safe operating velocity
- 2.4 < v ≤ 3.0 m/s: high — noise and erosion likely
- v > 3.0 m/s: water-hammer risk on rapid valve closure
Source: ASPE Plumbing Engineering Design Handbook v.4 Ch. 4.
Unit conversions
All conversion factors used by the calculators:
- 1 ft = 0.3048 m (exact)
- 1 in = 0.0254 m (exact)
- 1 GPM (US) = 6.30901964 × 10⁻⁵ m³/s
- 1 psi = 6,894.757 Pa
- 1 bar = 100,000 Pa
- 1 ft of water-head ≈ 0.4335 psi at 60 °F
- g = 9.80665 m/s² (NIST standard gravity)
Implementation: packages/shared/src/units.ts.
Audit & changelog
Tables, formulas, and fluid properties are reviewed against the cited primary sources on the "Last audited" date. The first-pass audit covered Hazen-Williams C-factors, Darcy roughness ε, fitting K and L/D, water property polynomials, and unit conversion factors. Pull-request history available on request.
This is intended as a working engineer's tool. For safety-critical design (fire-protection, chemical-process, life-safety), cross-check against vendor-published Cv and the local authoritative standard (NFPA, ASME B31.x, etc.).
References
- ASHRAE Handbook of Fundamentals (2021), Ch. 1, Ch. 22, Ch. 31. American Society of Heating, Refrigerating and Air-Conditioning Engineers.
- AWWA M11 — Steel Pipe: A Guide for Design and Installation. American Water Works Association.
- AWWA M9 — Concrete Pressure Pipe.
- Cameron Hydraulic Data, 19th ed. (Flowserve).
- Crane Technical Paper No. 410 (1988). Flow of Fluids Through Valves, Fittings, and Pipe.
- Colebrook, C. F. (1939). Turbulent flow in pipes, with particular reference to the transition region between the smooth and rough pipe laws. Journal of the Institution of Civil Engineers, 11.
- Moody, L. F. (1944). Friction factors for pipe flow. Transactions of the ASME, 66.
- Haaland, S. E. (1983). Simple and explicit formulas for the friction factor. Journal of Fluids Engineering.
- Swamee, P. K., & Jain, A. K. (1976). Explicit equations for pipe-flow problems. ASCE J. Hydraulic Division.
- NIST IAPWS-IF97 (1997). Industrial Formulation for the Thermodynamic Properties of Water and Steam.
- ASPE Plumbing Engineering Design Handbook, v.4, Ch. 4.
- Hydraulic Institute Standards (ANSI/HI 14.6) — Rotodynamic Pumps for Hydraulic Performance Acceptance Tests.