Greg's take on hydraulic modeling
A hydraulic model is your distribution system on a computer: every pipe, pump, valve, and tank, plus the demands on them. It answers “what if” questions you can't safely test on the real system. Will a new subdivision have enough pressure? Can this hydrant deliver fire flow? What happens if this main breaks? The math is two ideas repeated thousands of times: water in equals water out at every junction, and energy is lost to friction in every pipe.
1 What a hydraulic model is, and why utilities use one
A distribution system model calculates the flow in every pipe and the pressure at every junction for a given set of demands, tank levels, pump settings, and valve positions. Utilities use models to:
- Plan: size new mains, tanks, and pump stations; check whether the system can serve growth (master planning).
- Protect against fire: find how much fire flow each hydrant can deliver while pressures stay at or above 20 psi.
- Operate: set pump schedules, tank levels, and pressure zone boundaries; save energy.
- Prepare for emergencies: simulate a main break, a pump failure, or a tank out of service, and plan valve isolations.
- Protect water quality: estimate water age, chlorine decay, and where each source's water goes.
- Prioritize replacement: find the undersized, rough, or critical mains that matter most.
The most widely used engine is EPANET, free public-domain software from the U.S. EPA, first released in 1993. EPANET 2.2 (2020) added pressure-driven analysis, and EPANET 2.3 (July 2025) added a positional control valve, a pressure-dependent leakage model, and the ability to turn controls on and off. Commercial packages add GIS tools, scenario managers, and optimization on top of the same basic hydraulic equations.
2 The building blocks: nodes and links
| Component | What it represents | Key data |
|---|---|---|
| Junction (node) | A point where pipes meet or water is used | Elevation, demand, demand pattern |
| Reservoir (node) | A fixed-head source: a lake, a well field treated as infinite, or a connection to another system | Hydraulic grade (head) |
| Tank (node) | Storage whose level rises and falls over time | Bottom elevation, diameter or volume curve, minimum, maximum, and starting levels |
| Pipe (link) | A main, service, or transmission line | Length, diameter, roughness (C factor), minor loss, status (open, closed, check valve) |
| Pump (link) | Adds energy (head) to the water | Head-flow curve, efficiency curve, speed, on/off controls |
| Valve (link) | Controls pressure or flow | Type and setting: PRV (pressure reducing), PSV (pressure sustaining), PBV (pressure breaker), FCV (flow control), TCV (throttle control), GPV (general purpose) |
Two numbers describe the water's energy at any point. Hydraulic grade (head) is the elevation plus the pressure head, the level water would rise to in a standpipe. Pressure is the difference between the hydraulic grade and the ground elevation: psi = (HGL − elevation) × 0.433. A junction on a hill has less pressure than one in a valley, even with the same hydraulic grade.
3 Demands and patterns
Getting demand right matters as much as getting the pipes right. Modelers usually start from billing or meter data, assign each customer's use to the nearest junction (demand allocation), and add non-revenue water such as leakage. Then they apply multipliers:
- ADD
- Average day demand: total annual production ÷ 365.
- MDD
- Maximum day demand: the highest single day of the year, often summer. It's typically expressed as a multiple of ADD, and fire flow is usually analyzed on top of it.
- PHD
- Peak hour demand: the highest hour, usually on the maximum day. It controls minimum pressures in normal operation.
- Diurnal pattern
- Hourly multipliers that shape demand through a day: low overnight, a morning peak, and an evening peak.
Peaking factors vary widely. Small systems and residential areas usually have sharper peaks than large systems with industry. The best factors come from your own production records and SCADA data. For fire protection, many communities use the International Fire Code's Appendix B, which sets fire flow by building size and construction. For one- and two-family homes up to 3,600 square feet, it's 1,000 gpm for one hour.
4 The physics: mass, energy, and friction
Every hydraulic model solves two sets of equations at once:
- Conservation of mass at each junction: flow in − flow out = demand.
- Conservation of energy along each pipe: the head at one end minus the head at the other equals the head lost to friction (plus minor losses, minus any pump head).
Head loss equations
| Equation | Form (US units) | Notes |
|---|---|---|
| Hazen-Williams (1905) | hf = 10.44 × L × Q1.852 ÷ (C1.852 × d4.87) hf and L in ft, Q in gpm, d in inches | The standard in U.S. water distribution. C is a roughness factor: about 150 for new PVC, 130–140 for new cement-lined ductile iron, and much lower for old unlined cast iron. |
| Darcy-Weisbach | hf = f × (L ÷ D) × V² ÷ 2g | Physically based and valid for any fluid and temperature. The friction factor f depends on Reynolds number and relative roughness (Moody diagram, Colebrook equation, or the Swamee-Jain approximation). |
| Minor losses | hm = K × V² ÷ 2g | Bends, tees, valves, meters. Small in long mains, but important in pump stations. |
Notice the exponents. Head loss rises with flow to the 1.85 power, so doubling the flow multiplies the head loss by about 3.6. It falls with diameter to the 4.87 power, so going from a 6-inch to a 12-inch main cuts head loss at the same flow by about 29 times. That's why small, old mains are where pressure problems start.
The Reynolds number, Re = V × D ÷ ν, tells whether flow is laminar (below about 2,000) or turbulent (above about 4,000). Flow in distribution mains is almost always turbulent.
Pipe calculator
Velocity, head loss, and pressure drop for one pipe, by both Hazen-Williams and Darcy-Weisbach. Or enter a measured head loss to back-calculate the C factor, the way a field C-factor test does.
5 How the solver works
A network with loops can't be solved one pipe at a time: the flow in each pipe depends on the heads at its ends, and the heads depend on all the flows. Engineers first solved looped networks by hand with the Hardy Cross method (1936): guess the flows, correct each loop until the head losses around it add to zero, and repeat.
Modern software uses Newton-type methods that solve for every flow and head at once. EPANET uses the gradient method of Todini and Pilati (late 1980s):
- Guess a flow in every pipe.
- Straighten (linearize) each pipe's head-loss curve at the current flow.
- Solve one sparse linear system for all junction heads at once.
- Update every pipe's flow from the new heads, and repeat until the changes are tiny (usually a handful of iterations).
The model lab below runs this same method in your browser: every time you change something, it solves the network from scratch.
Model lab: a small town's water system
An elevated tank feeds eight junctions through eleven pipes. Tap a junction to put a fire hydrant there, or tap a pipe to resize, roughen, or close it. The model re-solves instantly.
Demand condition
Base demand is 520 gpm. The multipliers are examples; every system has its own.
Fire flow at J8
Tank water level (HGL)
Selected pipe: P11
Show the full results tables
| Junction | Elev (ft) | Demand (gpm) | Head (ft) | Pressure (psi) |
|---|
| Pipe | Dia (in) | C | Flow (gpm) | Velocity (ft/s) | Loss (ft/1,000 ft) |
|---|
6 Pumps, system curves, and energy
A pump curve shows the head a pump adds at each flow: highest at shutoff and falling as flow increases. A system curve shows the head the system needs: the static lift (the elevation difference the pump must overcome) plus friction, which rises with flow to about the 1.85 power. The pump runs where the two curves cross, the operating point.
- Affinity laws for a change in speed: flow changes with speed, head with speed squared, and power with speed cubed. Slowing a pump 20% cuts its power by nearly half (0.8³ = 0.51).
- Parallel pumps add flow at the same head; series pumps add head at the same flow. A second pump in parallel rarely doubles the flow, because the system curve rises.
- Pumps are most efficient near their best efficiency point (BEP). Running far to the left or right of it wastes energy and wears the pump.
- Wire-to-water efficiency is the pump efficiency times the motor efficiency (and the drive efficiency with a variable speed drive).
Pump and system curve lab
Find the operating point, then change the speed or add a second pump in parallel. The efficiency curve here is a simple illustrative shape, not a real pump's.
7 Extended period simulation: tanks and controls over time
A steady-state run is a snapshot: one set of demands and tank levels. An extended period simulation (EPS) runs a series of snapshots, often every hour for 24 hours to a week. Between steps, each tank's level changes by the net flow in or out, and controls switch pumps and valves (“start Pump 1 when Tank A drops below 18 ft”).
EPS answers questions a snapshot can't: Do the tanks refill overnight? How many times a day does each pump start? Is a tank turning over enough to keep its water fresh? What will the energy bill be? Storage is usually sized for three jobs: equalization (covering peak hours so the plant and wells can run steadily), fire reserve, and emergency supply.
48-hour tank and well simulator
A well pump fills an elevated tank that serves a town with a typical daily demand pattern. The pump starts and stops on tank level. Change the settings and watch two days play out.
Demand pattern (hourly multipliers, midnight to midnight):
8 Water quality modeling
Once the flows are known, a model can track what the water carries:
- Water age: how long water has been in the system since it left the source. Old water loses its disinfectant residual and forms more disinfection byproducts. Dead ends and oversized or poorly mixed tanks are the usual culprits.
- Source trace: what percent of the water at each node came from each well or plant, which is useful when sources have different chemistry.
- Chlorine decay: usually modeled as first-order, C = C₀ × e−kt. EPANET splits the rate into a bulk coefficient (reactions in the water itself, measured in a bottle test) and a wall coefficient (reactions with pipe walls and biofilm, which are faster in old unlined pipe).
Tank mixing matters too. A tank that fills and draws from the same pipe near the bottom can short-circuit, leaving old water stratified at the top, especially in tall standpipes. Models can represent a tank as completely mixed, plug flow, or two compartments.
9 Field data and calibration
A model is only as good as its match to the real system. Calibration means adjusting the model until it reproduces field measurements, and validation means checking it against a different set of data it wasn't tuned to.
- Field data: hydrant flow tests (static and residual pressures), pressure loggers, SCADA records of tank levels, pump flows, and pressures, and C-factor tests on individual mains.
- What gets adjusted: pipe roughness, demands and their locations, and pump curves. But first check the things that are simply wrong: ground elevations (use survey or LiDAR data), closed or partly closed valves nobody knew about, pipes connected in the model that aren't in the ground, and outdated pump curves.
- How close is close enough depends on the model's purpose. Published guidelines (for example, from AWWA and the UK's WRc) set tighter targets for operational models than for long-range planning.
A hydrant flow test is the workhorse. With one hydrant flowing and another nearby reading pressure, you get the static pressure, the residual pressure during flow, and the flow itself. From those, the standard formula projects how much the system could deliver at 20 psi:
Q20 = Qflow × [(static − 20) ÷ (static − residual)]0.54
Hydrant flow test calculator
Enter your test readings. The calculator follows NFPA 291: flow from the pitot reading, then available flow at 20 psi residual (or any residual you choose).
A bigger pressure drop during the test gives a more reliable projection. If the residual barely moves from the static reading, open more outlets or a second hydrant. The 0.54 exponent comes from the Hazen-Williams flow exponent (1 ÷ 1.85).
10 Transients: water hammer and surge
Ordinary models assume flows change slowly. When a valve slams shut or a pump trips off, the water column stops suddenly and a pressure wave races up and down the pipe at the speed of sound in the water-filled pipe. That's water hammer. The sudden-stop pressure rise is given by the Joukowsky equation:
ΔH = a × ΔV ÷ g (feet of head), where a is the wave speed (about 4,000 ft/s in ductile iron, much less in PVC and HDPE), ΔV is the change in velocity, and g = 32.2 ft/s². In metal pipe, each 1 ft/s of sudden velocity change adds roughly 50–60 psi.
If a valve closes more slowly than the critical time, 2L ÷ a (the time for the wave to travel to the far end and back), the surge is much smaller. Transient models use the method of characteristics to simulate these waves. Protection includes slow-closing valves, surge tanks and hydropneumatic tanks, surge anticipator and relief valves, air/vacuum valves, and pump controls with soft starts and stops.
Water hammer calculator
Estimate the pressure surge from a velocity change, and see how much a slower valve closure helps.
Wave speeds are typical values; the real speed depends on the pipe's wall thickness and pressure class, and trapped air lowers it. The slow-closure estimate uses the simple Michaud formula (ΔH ≈ 2LΔV ÷ g·t). A transient model is the right tool for design decisions.
11 Using models well
- Skeletonization: leaving out or combining small pipes to simplify a model. It's fine for transmission planning, but fire flow and water quality studies usually need an all-mains model. Most utilities now build directly from GIS.
- Pressure standards: the Recommended Standards for Water Works (Ten States Standards) call for at least 20 psi at ground level everywhere under all flow conditions, including fire flow, and a normal working pressure of about 60–80 psi and not less than 35 psi. Mains that provide fire protection should be at least 6 inches.
- Velocity: high velocities mean high head loss and bigger surges. Many utilities flag mains running faster than about 5 ft/s in normal operation.
- Demand-driven vs. pressure-driven: a classic model always delivers the full demand, even at impossible pressures. Pressure-driven analysis (in EPANET 2.2 and later) reduces delivery when pressure falls, which is more realistic for main breaks and outages.
- Scenarios: keep separate, named scenarios for existing and future demands, fire flows, and outages, so results can be compared and repeated.
- Maintenance: a model goes stale as the system changes. Update it from GIS and re-check calibration after big projects.
- Security: a detailed model and its GIS are sensitive infrastructure information. Share them carefully.
📌 Numbers Greg wants you to memorize
- psi = ft × 0.433 and ft = psi × 2.31.
- Minimum 20 psi everywhere under all conditions; normal 60–80 psi, not below 35 psi (Ten States Standards).
- Hazen-Williams: head loss ∝ Q1.852 and ∝ 1 ÷ d4.87. C ≈ 150 for new PVC.
- Velocity (ft/s) = 0.4085 × gpm ÷ d² (d in inches).
- Hydrant test: Q20 = Q × [(S − 20) ÷ (S − R)]0.54; pitot flow = 29.84 × c × d² × √p.
- Joukowsky: ΔH = a × ΔV ÷ g; about 50–60 psi per 1 ft/s in metal pipe.
- Affinity laws: Q ∝ N, H ∝ N², power ∝ N³.
- Fire flow is usually analyzed on top of maximum day demand.
Words to know
Plain-language definitions from the LearnWater glossary.
Quick check: 5 questions
Random questions about hydraulic modeling. Each round draws a new set.
Questions about modeling?
Greg can explain any term here, or work numbers like “head loss for 500 gpm in 1,000 ft of 8-inch pipe, C 130.”
Further reading
Where the methods and numbers on this page come from.
- EPA — EPANET: application for modeling drinking water distribution systems
- OpenWaterAnalytics — EPANET source code and release notes
- AWWA Manual M32, Computer Modeling of Water Distribution Systems; M31, Distribution System Requirements for Fire Protection; M17, Fire Hydrants
- NFPA 291, Recommended Practice for Water Flow Testing and Marking of Hydrants
- Recommended Standards for Water Works (Ten States Standards), distribution system chapter