Hydraulic Calculation Engine

Build multi-circuit pipeline networks, rate pumps and control valves, and generate audit-ready hydraulic reports with a Newton-Raphson nodal solver.

Advertisement
Calculations update automatically.
Advertisement

Engineering Reference & Technical Basis

1. Nodal Pressure Balance & Newton-Raphson Solver

Each circuit is walked node-to-node from a fixed Start Node pressure. At every component the outlet pressure equals the inlet pressure less the component's calculated drop; movers add a boost instead. A Vessel component is a second fixed-pressure anchor — its Operating Pressure is not derived from the march, and it is always the last component in its circuit. Where a circuit contains a Control Valve solving for a Target End Pressure, the solver treats the valve drop as the unknown and iterates with a Newton-Raphson backward pass until the end-of-circuit pressure matches the target within tolerance — that target is taken automatically from a terminal Vessel's Operating Pressure when one is present, so the two can never disagree.

$$P_{out} = P_{in} - \Delta P_{friction} - \Delta P_{static} + \Delta P_{boost}$$

Multi-circuit networks with Flow Split / Branch Tee nodes, or a downstream circuit whose Start Node references an upstream Vessel's liquid draw-off, are ordered topologically before solving, so a downstream circuit always has access to already-solved upstream conditions, avoiding double-counting of flow or pressure at shared nodes.

2. Frictional Pressure Drop & Friction Factor

Straight-run pressure drop follows the Darcy-Weisbach equation, with equivalent length added for fittings via the L/D method. The Hazen-Williams method is offered as an alternative for water service.

$$\Delta P = f \cdot \frac{L_{eq}}{D} \cdot \frac{\rho v^2}{2} \qquad L_{eq} = L_{pipe} + D\sum (L/D)_{fittings}$$

The Darcy friction factor $f$ is evaluated per the selected method:

  • Swamee-Jain — explicit approximation to Colebrook-White, valid for turbulent flow.
  • Colebrook-White — implicit correlation solved iteratively for the highest accuracy across the transitional/turbulent regime.
  • Churchill — single explicit correlation spanning laminar, transitional, and turbulent regimes without a regime switch.
3. Static Head, Elevation & Liquid Level

Elevation change between consecutive components is converted to a static head contribution using the local fluid density. Liquid Level only ever adds driving head at a source — a Start Node, whether custom or referencing a Vessel's liquid draw-off nozzle. A Vessel's feed side is deliberately unaffected by its own liquid level: the feed nozzle sits in vapour space, so arriving pressure is checked against Operating Pressure alone, not against a hydrostatic column.

$$\Delta P_{static} = \rho \cdot g \cdot \Delta z$$

For pipe segments, elevation can be entered directly or inferred automatically from the upstream/downstream equipment nozzle elevations, keeping the static head consistent as components are inserted, reordered, or removed.

4. Pump & Compressor Curves — Affinity Laws

Mover performance is interpolated from user-entered curve points (head/flow for pumps, or a boost/flow relationship for compressors). Where a case flow falls outside the entered curve range, the Affinity Laws project the curve to the new operating speed or impeller diameter.

$$\frac{Q_2}{Q_1} = \frac{N_2}{N_1} \qquad \frac{H_2}{H_1} = \left(\frac{N_2}{N_1}\right)^2 \qquad \frac{P_2}{P_1} = \left(\frac{N_2}{N_1}\right)^3$$

Net Positive Suction Head Available (NPSHA) is reported alongside the required value entered for the mover, using upstream static, friction, and vapor pressure terms at suction conditions. Suction pressure is gauge and Vapor Pressure is absolute, so the suction term is converted to absolute before the subtraction — a detail worth stating explicitly, since it is a common source of a roughly one-atmosphere error if overlooked.

5. Vessels — Fixed-Pressure Anchors & Multi-Circuit Networks

A Vessel represents a piece of equipment whose pressure is held by its own control (a pressure controller or relief system), not derived purely from upstream friction — so it is modelled as a second anchor rather than a plain drop. It carries two roles depending on where it's used:

  • Destination (terminating its own circuit): only Feed Nozzle Elevation applies. Arriving pressure is checked against Operating Pressure directly — no drop, no liquid-level effect on the feed side.
  • Source (referenced by another circuit's Start Node): only the Liquid Outlet Nozzle Elevation and Liquid Level apply, adding driving head exactly as a custom Start Node would.

Because a Vessel is always the last component in its own circuit, continuing the network downstream means starting a new circuit whose Start Node references that Vessel — keeping the two roles, and their elevation/liquid-level fields, cleanly separated.

6. Control Valve Sizing & Choked Flow

Control valves can be rated (drop from a known/assumed Cv) or sized (Cv back-calculated to hit a target end pressure). Liquid sizing checks for choked flow using the liquid pressure recovery factor $F_L$ (a valve trim characteristic, default 0.9) and vapor pressure; gas sizing checks the pressure ratio against the terminal pressure drop ratio.

$$C_v = \frac{Q}{N_1} \sqrt{\frac{SG}{\Delta P}} \quad \text{(liquid, non-choked)} \qquad \Delta P_{choked} = F_L^2 \left(P_1 - F_F P_v\right)$$

Where the calculated or entered pressure drop exceeds the choked limit, the valve row is flagged — the plain Cv equation is no longer physically valid once cavitation or flashing sets in, and the flag is a prompt to revisit the valve sizing or trim rather than an automatic correction: the displayed drop is not silently capped, since doing so without engineering review could mask a real problem instead of surfacing it.

References
  • Crane Co.: Flow of Fluids Through Valves, Fittings, and Pipe, Technical Paper No. 410 (TP-410). — Primary source for the Darcy-Weisbach equation, equivalent length (L/D) method, and standard fittings resistance coefficients used in this engine.
  • 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, Vol. 11. — Basis for the Colebrook-White friction factor correlation.
  • Swamee, P.K. & Jain, A.K. (1976): "Explicit Equations for Pipe-Flow Problems", Journal of the Hydraulics Division, ASCE, Vol. 102. — Explicit approximation to Colebrook-White used as the default friction method.
  • Churchill, S.W. (1977): "Friction Factor Equation Spans All Fluid-Flow Regimes", Chemical Engineering, Vol. 84. — Basis for the Churchill correlation spanning laminar through turbulent flow.
  • Hydraulic Institute: ANSI/HI 9.6.3 — Rotodynamic Pumps for Determination of NPSH Margin and related Hydraulic Institute standards. — Basis for NPSH available/required treatment and pump affinity law application.
  • ISA: ISA-75.01.01 (IEC 60534-2-1), Flow Equations for Sizing Control Valves. — Basis for liquid and gas control valve sizing equations, including liquid choked-flow and gas critical pressure-ratio checks.
  • API: API 610 (Centrifugal Pumps for Petroleum, Petrochemical and Natural Gas Industries) and API 674 (Positive Displacement Pumps). — Reference for pump curve behaviour, affinity law application limits, and NPSH margin conventions.
  • Green, D.W. & Southard, M.Z. (eds.): Perry's Chemical Engineers' Handbook, 9th ed. — General reference for pipe roughness values, fitting loss coefficients, and two-phase/compressible flow background.
  • Hazen, A. & Williams, G.S. (1905): empirical exponential head-loss formula for water pipelines. — Basis for the Hazen-Williams alternative friction method offered for water service.