Flow in Pipes: Systems & Networks

Learning Objectives

  • Apply continuity and energy conservation to pipes in series, parallel, and branching arrangements.
  • Express major and minor losses in resistance form and derive equivalent-pipe relations.
  • Solve junction and three-reservoir problems with physically consistent flow directions.
  • Apply Hardy Cross loop corrections and understand their convergence requirements.
  • Formulate nodal-head equations used by modern water-distribution solvers.
  • Incorporate pumps, turbines, control valves, check valves, emitters, and pressure-dependent demands.
  • Interpret energy grade lines, pressure constraints, network reliability, and extended-period operation.
  • Estimate water-hammer pressure rise and select appropriate transient-protection concepts.

Pipe systems combine multiple conduits, junctions, reservoirs, pumps, valves, and demands. Their solution requires simultaneous satisfaction of mass conservation at nodes and energy conservation along every possible path. The resulting nonlinear equations are the foundation of municipal water-distribution, building services, irrigation, penstock, and industrial hydraulic models.

Network Building Blocks

  • Nodes: Junctions, reservoirs, tanks, outlets, hydrants, or demand points.
  • Links: Pipes, pumps, turbines, valves, meters, and other components connecting nodes.
  • Boundary conditions: Known heads at reservoirs or tanks, prescribed inflows, demands, pump controls, and valve states.
  • Unknowns: Pipe flows, junction heads, pressures, tank levels, and sometimes control states.

Signed Resistance Form

A convenient component relation is

hL=rQ∣Q∣nβˆ’1h_L=rQ|Q|^{n-1}

The signed form preserves flow direction: hLh_L has the same sign as QQ when head decreases in the assumed positive direction. For Darcy–Weisbach with a fixed Darcy factor, n=2n=2.

Darcy–Weisbach Pipe Resistance

Resistance coefficient for a circular pipe when Darcy friction factor is treated as known.

hf=rfQ∣Q∣h_f=r_fQ|Q|rf=8fLgΟ€2D5r_f=\frac{8fL}{g\pi^2D^5}

Variables

SymbolDescriptionUnit
rfr_fMajor-loss resistance coefficient for Q in mΒ³/ss2/m5s^2/m^5
ffDarcy friction factor-
LLPipe lengthm
DDInside diameterm

Minor-Loss Resistance

Expresses a lumped minor-loss coefficient in discharge form.

hm=KV22g=rKQ∣Q∣h_m=K\frac{V^2}{2g}=r_KQ|Q|rK=8KgΟ€2D4r_K=\frac{8K}{g\pi^2D^4}

Variables

SymbolDescriptionUnit
KKSum of local loss coefficients referenced to the pipe velocity-
rKr_KMinor-loss resistance coefficients2/m5s^2/m^5

Friction Factor Is Usually Not Constant During Iteration

For Darcy–Weisbach networks, ff depends on Reynolds number and relative roughness. A rigorous solver updates ff as flow changes or includes its derivative in the nonlinear Jacobian. Treating ff as constant is acceptable only as an explicit approximation or within a converged outer iteration.

Pipes in Series

Pipes connected end-to-end without intermediate inflow or outflow carry the same discharge.

Series Rules

Q1=Q2=β‹―=QQ_1=Q_2=\cdots=QhL,total=βˆ‘ihL,ih_{L,total}=\sum_i h_{L,i}

For equal loss exponent nn,

req=βˆ‘irir_{eq}=\sum_i r_i

because hL,total=reqQ∣Q∣nβˆ’1h_{L,total}=r_{eq}Q|Q|^{n-1}.

Pipes in Parallel

Branches connect the same upstream and downstream nodes. Each branch experiences the same signed head difference, while branch flows sum to the total flow.

Parallel Rules

Q=βˆ‘iQiQ=\sum_i Q_ihL,1=hL,2=β‹―=Ξ”Hh_{L,1}=h_{L,2}=\cdots=\Delta H

For hL=rQnh_L=rQ^n with the same positive exponent nn and one flow direction,

req=(βˆ‘iriβˆ’1/n)βˆ’nr_{eq} = \left(\sum_i r_i^{-1/n}\right)^{-n}

Interactive Two-Pipe Solver

The simulation includes both Darcy major loss and lumped minor loss, reports continuity and parallel-energy residuals, and states that friction factors must be updated in a full design iteration.

Two-Pipe System Solver

Uses Darcy–Weisbach major loss plus lumped minor losses:hL=(fL/D+βˆ‘K)V2/(2g)h_L=\left(fL/D+\sum K\right)V^2/(2g).

Pipe 1

Pipe 2

Results

Pipe 1 flow
50.00 L/s
V₁ = 2.83 m/s
Pipe 2 flow
50.00 L/s
Vβ‚‚ = 2.83 m/s
Pipe 1 head loss
5.848 m
Pipe 2 head loss
5.848 m
Common branch head loss
5.848 m
Continuity residual
0.0e+0 mΒ³/s
Parallel energy residual
0.0e+0 m

The friction factors are user-supplied Darcy factors and are treated as constant. In a full design iteration they must be recomputed from Reynolds number and roughness as flow changes. Pumps, valves with control laws, and elevation differences require the full energy equation rather than this two-branch resistance model.

Equivalent Diameter Is Model-Dependent

An equivalent pipe is meaningful only after specifying the loss law, equivalent length or diameter, roughness, minor losses, and flow range. A diameter equivalent under Hazen–Williams is not automatically equivalent under Darcy–Weisbach, especially when Reynolds number changes.

Branching Junctions

At a junction with no storage,

βˆ‘Qinβˆ’βˆ‘Qoutβˆ’Qd=0\sum Q_{in}-\sum Q_{out}-Q_d=0

where QdQ_d is external withdrawal. Each connected link also satisfies its head–flow relation between the junction head and the neighboring node head.

Three-Reservoir Problem

Three reservoirs with known water-surface heads connect to a junction of unknown head HJH_J. Flow in each pipe is determined by the signed head difference:

Hiβˆ’HJ=riQi∣Qi∣nβˆ’1H_i-H_J=r_iQ_i|Q_i|^{n-1}

The correct junction head satisfies continuity, βˆ‘Qi=0\sum Q_i=0, with a sign convention such as flow toward the junction positive.

Robust Three-Reservoir Solution

  1. Establish lower and upper bounds for HJH_J from the known reservoir heads.
  2. For a trial HJH_J, calculate each signed head difference Hiβˆ’HJH_i-H_J.
  3. Recover signed flow using the inverse component relation.
  4. Evaluate the continuity residual at the junction.
  5. Use bisection, safeguarded Newton iteration, or another bracketed root method until the residual is within tolerance.
  6. Confirm every final flow direction from the solved head gradient rather than from the initial assumption.

Do Not Take Square Roots Before Assigning Direction

The expression Q=βˆ£Ξ”H∣/rQ=\sqrt{|\Delta H|/r} gives magnitude only. The sign must come from the head difference. Omitting the sign can produce a numerically balanced but physically impossible junction solution.

Looped Pipe Network

A connected pipe system containing one or more closed paths. Loops improve redundancy and pressure distribution but couple the unknown flows nonlinearly.

Two Network Constraints

  • Node continuity: The algebraic sum of flows at every junction equals the specified external demand or supply.
  • Loop/path energy: The algebraic sum of head changes around every closed loop is zero, and the head difference between two nodes is independent of the path chosen.

Hardy Cross Method

A classical loop-balancing method that starts with flows satisfying continuity and iteratively corrects loop flows to satisfy energy conservation.

Hardy Cross Flow Correction

Correction for a loop whose link loss law is h=rQ|Q|^(n-1).

Ξ”Q=βˆ’βˆ‘hiβˆ‘niri∣Qi∣niβˆ’1=βˆ’βˆ‘riQi∣Qi∣niβˆ’1βˆ‘niri∣Qi∣niβˆ’1\Delta Q = -\frac{\sum h_i}{\sum n_i r_i|Q_i|^{n_i-1}} = -\frac{\sum r_iQ_i|Q_i|^{n_i-1}} {\sum n_i r_i|Q_i|^{n_i-1}}

Variables

SymbolDescriptionUnit
Ξ”Q\Delta QLoop flow correction in the chosen loop directionm3/sm^3/s
nin_iLoss exponent for link i-

Hardy Cross Loop Method

  1. Assign pipe-flow directions and initial magnitudes that satisfy continuity at every node.
  2. Choose a loop traversal direction and give each link head loss a sign relative to that direction.
  3. Calculate βˆ‘hi\sum h_i and the derivative denominator.
  4. Compute Ξ”Q\Delta Q and add it algebraically to flows aligned with the loop direction while subtracting it from opposing flows.
  5. Repeat for all loops. Shared-pipe flows receive corrections from each applicable loop.
  6. Update friction factors where required and iterate until both energy and continuity residuals meet tolerance.

Hardy Cross Convergence

Poor initial flows, inconsistent signs, near-zero branch flows, pumps or control valves, and strongly pressure-dependent components can slow or prevent loop correction convergence. Modern solvers usually use simultaneous Newton methods on node heads or flows.

Nodal-Head Method

Modern network software commonly solves junction heads directly. For each node jj,

Rj(H)=βˆ‘iQij(Hj,Hi)βˆ’Qd,j=0R_j(H)=\sum_i Q_{ij}(H_j,H_i)-Q_{d,j}=0

The nonlinear residual vector is solved with Newton–Raphson or gradient-based methods. Once heads are known, link flows follow from their component equations. This approach handles large sparse networks efficiently.

Demand Models

  • Demand-driven analysis: Prescribed demand is withdrawn regardless of pressure. Useful when service pressures remain adequate.
  • Pressure-dependent demand: Delivered demand decreases when pressure is insufficient and may become zero below a minimum head. This is more realistic for outages, fires, pipe breaks, and low-pressure zones.
  • Emitters/leaks: Often modeled as Qe=CepmQ_e=C_e p^m, with exponent near 0.5 for an ideal orifice but potentially different for real leakage.

Negative Pressure in a Demand-Driven Model

A solver can mathematically satisfy a fixed demand while producing highly negative pressure. This does not mean the physical system delivers that demand. It indicates infeasibility, potential air entry or column separation, and the need for pressure-dependent or transient analysis.

Pumps in Networks

A pump is a negative head-loss element because it adds head to the fluid. Its operating point is determined by the intersection of the pump curve with the complete system response. Variable-speed pumps use affinity-law scaling only within an appropriate range and must obey controls, minimum speed, efficiency, NPSH, and motor limits.

Valves and Controls

  • Throttle valve: Adds a flow-dependent loss.
  • Pressure-reducing valve: Modulates to maintain downstream pressure when feasible.
  • Pressure-sustaining valve: Maintains upstream pressure.
  • Flow-control valve: Adjusts loss to maintain a target flow within capacity.
  • Check valve: Permits only one flow direction and changes network topology when it closes.

Control states make network equations piecewise nonlinear. A solver must test whether each assumed active state is physically consistent.

Tanks and Extended-Period Simulation

Reservoir heads are usually fixed boundary conditions, while tank heads vary with stored volume:

dVdt=βˆ‘Qinβˆ’βˆ‘Qout\frac{dV}{dt}=\sum Q_{in}-\sum Q_{out}

Extended-period simulation advances demands, pump schedules, valve states, and tank levels through time. The hydraulic time step must be short enough to capture controls and prevent tank levels from crossing physical limits between solution points.

Network Design Checks

A converged solution is not automatically an acceptable design. Check:

  • Minimum and maximum service pressure.
  • Fire-flow and peak-demand scenarios.
  • Maximum velocity, head loss, and surge risk.
  • Tank turnover and water age.
  • Pump operating range, efficiency, NPSH, and standby capacity.
  • Isolation, redundancy, critical-pipe failure, and emergency power.
  • Leakage, pressure zoning, and future demand uncertainty.

Water Hammer

A hydraulic transient caused by rapid changes in velocity, such as valve movement, pump trip, check-valve closure, turbine load rejection, or air-pocket motion. Pressure disturbances propagate as elastic waves through the fluid and pipe wall.

Elastic Wave Celerity

Approximate wave speed in a thin-walled elastic pipe under a simplified restraint condition.

a=K/ρ1+KD/(Ee)a=\sqrt{ \frac{K/\rho} {1+KD/(Ee)} }

Variables

SymbolDescriptionUnit
aaPressure-wave celeritym/s
KKFluid bulk modulusPa
EEPipe elastic modulusPa
eePipe wall thicknessm

Joukowsky Pressure Rise

Maximum ideal pressure change for sufficiently rapid velocity change.

Ξ”p=ρaΞ”V\Delta p=\rho a\Delta VΞ”H=aΞ”Vg\Delta H=\frac{a\Delta V}{g}

Rapid and Slow Closure

The characteristic round-trip wave time is

Tc=2LaT_c=\frac{2L}{a}

A closure shorter than or comparable to TcT_c can produce the full Joukowsky change. For a slow, approximately linear closure in a simple frictionless reservoir–pipe–valve system, a common estimate is

Ξ”pβ‰ˆ2ρLV0T\Delta p\approx\frac{2\rho L V_0}{T}

Real systems require transient equations because reflections, friction, vapor cavities, branch junctions, pumps, air vessels, and valve laws alter the waveform.

Interactive Water-Hammer Model

The simulator estimates elastic wave speed, critical closure time, and rapid/slow closure pressure rise while explicitly treating the result as a simplified one-dimensional model.

Water Hammer Simulator

Elastic-pipe wave speed and rapid/slow valve-closure pressure rise.

Zero represents an ideal instantaneous closure.

Wave celerity (cc)1343 m/s
Critical closure time (Tc=2L/cT_c=2L/c)0.149 s
Closure classificationRapid
Maximum pressure rise (Ξ”p\Delta p)2.69 MPa
Equivalent head rise (Ξ”H\Delta H)273.8 m
ReservoirValveL = 100 mt = 0.000 sΞ”p = 2.69 MPa
Normal flowCompression waveReflected low-pressure phase

Rapid closure uses the Joukowsky relationΞ”p=ρcΞ”V\Delta p=\rho c\Delta V. For closure slower thanTc=2L/cT_c=2L/c, this educational model uses the classical gradual-closure approximationΞ”pβ‰ˆ2ρLΞ”V/T\Delta p\approx2\rho L\Delta V/T. Real systems may require method-of-characteristics analysis including friction, valve law, pipe restraint, entrained air, and vapor-column separation.

Steady-State Network Results Cannot Bound Surge Pressure

Maximum transient pressure can exceed steady pump shutoff pressure, and minimum transient pressure can fall below vapor pressure even when steady pressure is positive. Surge analysis must include absolute pressure limits, pipe restraint, wave reflections, valve motion, pump inertia, and possible column separation.

Transient Protection

Common measures include controlled valve closure, flywheels, variable-speed ramping, surge tanks, air vessels, hydropneumatic tanks, pressure-relief valves, bypasses, non-slam check valves, vacuum/air valves, and changes in pipe diameter or class. A protection device must be sized from a transient model and checked for both high and low pressure.

Pipe-System Analysis Workflow

  1. Define nodes, links, elevations, pressure reference, demands, and component data.
  2. Establish a consistent positive flow direction for every link.
  3. Select Darcy–Weisbach, Hazen–Williams, or another justified loss relation and include minor losses.
  4. Solve continuity and energy equations simultaneously, updating flow-dependent coefficients.
  5. Verify residuals, pressures, velocities, pump/valve states, and energy grade lines.
  6. Evaluate multiple demand, failure, fire, and operational scenarios.
  7. Perform extended-period analysis for tanks and controls.
  8. Perform transient analysis whenever rapid operational changes or long/high-velocity pipelines can create damaging surge.
Key Takeaways
  • Pipe networks require simultaneous node continuity and path-independent energy conservation.
  • Series resistances add; parallel flows share a common head difference and require nonlinear flow division.
  • Signed head–flow equations prevent loss of direction information.
  • Hardy Cross is educational and useful for simple loops, while modern systems commonly use simultaneous nodal-head solvers.
  • Pump, valve, check-valve, tank, leak, and pressure-dependent demand models introduce piecewise and time-dependent behavior.
  • A converged steady solution still requires pressure, reliability, energy, and water-quality checks.
  • Water hammer is a wave phenomenon and cannot be bounded reliably by steady-state analysis alone.