Free Course · Self-Paced

Water Distribution
Modeling Fundamentals

How a water model is built, checked, calibrated and used, from the elements in an EPANET file to fire flow and master plan analysis. Everything is on this page, free, with no sign-up.

Free No Sign-Up
10 Sections Read in Order
EPANET Open-Source Engine
Section 1

The big picture: what a water model is for

A water distribution model is a mathematical copy of your pipe network. For any demand, it tells you the pressure at every node and the flow in every pipe. Engineers use it to answer questions that would be too costly, too slow or too risky to answer in the field.

Planning

Will the system cope with growth?

Load future demands and find the pipes, pumps and tanks that run out of capacity, and when.

Fire protection

Can a hydrant deliver its fire flow?

Test every hydrant for the flow it needs while the rest of its zone keeps at least 20 psi.

Operations

What happens if we shut this main?

Simulate outages, pump failures and valve closures before a crew touches anything.

Water quality

How old is the water at the tap?

Track water age, chlorine decay and where each source's water ends up.

The modeling process

Every good model follows the same path. Skipping a step usually shows up later, during calibration or in a master plan that cannot be defended.

Define purpose

The questions the model must answer set its level of detail.

Collect data

GIS, elevations, billing, SCADA, pump curves, tank drawings.

Build

Import the network, fix connectivity, assign elevations and demands.

Check

Run it and clear the warnings, negative pressures and odd results.

Calibrate

Adjust it until it matches field measurements.

Validate

Test it against data that was not used to calibrate.

Analyze

Fire flow, deficiencies, alternatives, master plan.

Maintain

Update it as the network and demands change.

Steady state or extended period?

SimulationWhat it isUse it for
Steady stateOne snapshot: demands, tank levels and pump states fixed at one moment.Peak hour checks, fire flow, quick what-ifs.
Extended period (EPS)A series of snapshots, usually hourly, over 24 hours to several days. Tanks fill and drain; pumps switch on and off.Tank cycling, pump operation, energy use, water age and quality.
Section 2

Network elements in EPANET

EPANET describes a network with two kinds of objects: nodes, where water enters, leaves or is stored, and links, which carry water between nodes. Everything is saved in a plain-text .inp file, one section per element type.

Nodes

ElementRepresentsKey inputsCommon mistake
JunctionA point where pipes meet, a customer demand point, or a hydrant.Elevation, base demand, demand pattern.Wrong elevation datum or a no-data value such as −9,999. Every pressure at that node is then wrong.
ReservoirAn infinite source with a fixed head: a lake, a clearwell, a connection to a wholesale supplier.Total head (water surface elevation), optional head pattern.Entering depth instead of elevation. A reservoir never runs dry, so it should not stand in for a tank.
TankStorage whose level rises and falls: elevated tanks, standpipes, ground storage.Bottom elevation, initial, minimum and maximum level, diameter or a volume curve.Levels entered as elevations rather than depths above the tank bottom.

Links

ElementRepresentsKey inputsCommon mistake
PipeA main or service line.Length, internal diameter, roughness, minor loss, status (open, closed, check valve).Nominal diameter instead of internal diameter, or GIS length in the wrong unit.
PumpA pump that adds head to the flow.Pump curve (head against flow), speed setting, efficiency curve, energy price.A one-point curve used far from its design point, or the pump drawn in the wrong direction.
ValveA device that controls pressure or flow (types below).Type, diameter, setting.A PRV setting entered as head when the model expects pressure, or the reverse.

Valve types

ValveWhat it doesTypical use
PRV — pressure reducingLimits the pressure on its downstream side to the setting.Feeding a lower pressure zone from a higher one.
PSV — pressure sustainingKeeps the pressure on its upstream side at or above the setting.Protecting pressure in an upper zone while it feeds a lower one.
PBV — pressure breakerForces a fixed pressure drop across the valve.Modeling special devices; rarely used.
FCV — flow controlCaps the flow through the valve at the setting.Wholesale meters with a contract limit, rate-of-flow valves.
TCV — throttle controlAdds a fixed minor loss to represent a partly closed valve.Throttled valves found during calibration.
GPV — general purposeFollows a user-defined head-loss curve.Backflow preventers, turbines, anything not covered above.

Data that drives the elements

  • Patterns are lists of multipliers over time, such as a 24-hour diurnal demand curve. A junction's demand at any hour is its base demand times that hour's multiplier.
  • Curves are x–y relationships: pump head against flow, pump efficiency, tank volume against depth, and head loss for a GPV.
  • Controls change links during an EPS. Simple controls say things like LINK P1 OPEN IF NODE T1 BELOW 10. Rule-based controls combine conditions with IF, AND and THEN.
  • Options set the units (GPM, MGD, LPS), the head-loss formula (Hazen-Williams, Darcy-Weisbach or Chezy-Manning), the hydraulic time step and the simulation duration.
Section 3

Hydraulics on one page

A model solves two laws at once. At every node, flow in equals flow out plus demand. Around every loop, the head losses balance. Everything else follows from how pipes lose head as water moves through them.

Head and pressure

Head is the energy of the water, expressed as an elevation in feet: where water would rise to in an open standpipe. Pressure is head minus ground elevation, converted to psi.

Pressure (psi) = 0.433 × (Head − Elevation)   ·   1 psi = 2.31 ft of water A node at elevation 600 ft under a hydraulic grade of 750 ft sits at 0.433 × 150 = 65 psi.

Head loss in pipes

As flow rises, the loss of head rises with roughly the square of flow. That is why pressure falls faster and faster as demand climbs, which matters most in fire flow analysis (Section 7). Most US water models use Hazen-Williams:

hL = 4.727 × L × Q1.852 / (C1.852 × D4.871) hL head loss (ft), L length (ft), Q flow (cfs), D internal diameter (ft), C roughness coefficient. A higher C means a smoother pipe. Halving the diameter raises head loss about 29-fold at the same flow.
Pipe materialTypical starting CNotes
PVC / HDPE140–150Stays smooth with age.
Ductile iron, cement-lined120–140Lining protects the C-factor.
Asbestos cement120–140Common in mid-century systems.
Steel, lined110–140Depends on lining condition.
Cast iron, unlined and old40–100Tuberculation shrinks the effective diameter. This is the main target of calibration.

These are starting values only. Field tests in Section 6 replace them with values measured in your own system.

How EPANET solves it

EPANET uses the Global Gradient Algorithm. It guesses the flows, computes the head losses, corrects the heads and repeats until the changes are smaller than the accuracy setting, usually 0.001. If it cannot converge in the allowed trials, it says so. Treat that as a modeling error to fix, not a result to report.

Section 4

Building the model

Most of the effort in a model goes into data, not into the software. A model built from clean GIS data, good elevations and real metered demand usually needs only light calibration. One built from guesses never calibrates properly.

Data inventory

DataTypical sourceUsed for
Pipe networkGIS (mains, hydrants, valves), as-built drawingsGeometry, diameter, material, install year, valve status
Ground elevationsLiDAR digital elevation model (DEM), surveyJunction elevations, and from them every pressure
Customer demandBilling records, AMI meter data, production recordsBase demand per node and diurnal patterns
FacilitiesPump test curves, tank drawings, PRV settingsPumps, tanks and valves
OperationsSCADA history, operator logs, control strategiesControls, boundary conditions, calibration targets
Field testsHydrant flow tests, pressure loggersCalibration (Section 6)

Step by step

  1. Import the network from GIS

    Pipes become links and their end points become junctions. Carry over diameter, material and install year as attributes, because calibration groups and master plan costs depend on them.

  2. Repair connectivity

    GIS drawn for maps is rarely drawn for hydraulics. Look for pipes that cross without a junction, near-miss end points that should connect, duplicate pipes, orphan nodes and parts of the network with no path to a source. Snap within a small tolerance, often 1 to 5 ft, and review every fix.

  3. Assign elevations

    Sample the DEM at each junction. Spot-check hilltops, valley bottoms and sites near tanks and pumps, because an error of 10 ft there moves the pressure by more than 4 psi.

  4. Set up facilities

    Enter pump curves from the most recent pump tests, tank geometry from drawings, and PRV settings from the field. Confirm which boundary valves between zones are closed.

  5. Allocate demand

    Geocode each billing account, assign it to the nearest junction on a pipe of suitable size, and convert billed volume to an average flow. Then scale the total to match production, so that non-revenue water (leaks and unbilled use) is spread across the system as well.

  6. Add patterns and demand conditions

    Build diurnal patterns from SCADA flows or AMI data, separately for residential, commercial and industrial users where possible. Then set up the demand conditions below.

  7. Simplify only as far as the purpose allows

    Skeletonization removes small pipes and dead ends to make the model faster. An all-pipes model is the norm today for fire flow and water quality work. A master plan of transmission mains can safely drop most 6-inch and smaller pipes.

Demand conditions

ConditionMeaningTypical ratio to ADDUsed for
ADDAverage day demand: annual use divided by 3651.0Water age, energy, baseline
MDDMaximum day demand: the highest single day of the year1.5–2.5Supply, pumping, fire flow
PHDPeak hour demand: the highest hour on the maximum day2.5–4.0Minimum pressure checks, pipe sizing
MDD + fireMaximum day plus a fire at one hydrant—Fire flow analysis

The ratios are typical ranges only. Take your own from production records: hot, dry, irrigation-heavy systems sit at the high end.

Section 5

Running and checking the model

The first run of a new model always has problems. Before trusting any result, work through these checks in order. Each one catches a different kind of data error.

  1. Read every warning

    EPANET reports disconnected nodes, negative pressures, pumps that cannot deliver enough head, and valves that cannot hold their setting. Each warning points to a node or link to inspect.

  2. Map pressures at average day

    Color junctions by pressure. Values below 0 or above about 150 psi are nearly always wrong elevations, a closed pipe or a missing PRV, not real conditions.

  3. Check the water balance

    Total supply should equal total demand plus or minus the change in tank storage. A gap points to an unconnected source, a reversed pump or demand at the wrong units.

  4. Run a 72-hour EPS and watch the tanks

    Tanks should cycle in a repeating daily pattern. A tank that drains every day or sits full every day points to wrong controls, wrong demand or a wrong pump curve.

  5. Check pump operating points

    Each pump should run near its best-efficiency point and within its curve. A pump pushed off the end of its curve is a sign of a hydraulic or data error.

  6. Compare to what operators know

    Ask operators where pressures are low, which tanks are hard to fill and which pumps run all day. If the model disagrees, find out why before you start calibrating.

Section 6

Calibration

Calibration is adjusting the model until it matches field measurements closely enough for its intended use. Fix gross errors first; only then tune roughness and demand. A model tuned to cover a closed valve with a C-factor of 20 matches today and fails the next study.

Field data for calibration

Steady state

Hydrant flow tests

Stress the network so head losses are large enough to reveal roughness. This is the best data for C-factors.

EPS

SCADA records

Tank levels, pump flows and station pressures over days. Use them to check demand patterns and controls.

EPS

Pressure loggers

Temporary loggers on hydrants for one to four weeks fill the gaps between SCADA sites.

How a hydrant flow test works

  1. Record static pressure

    Put a gauge on the residual hydrant and read the pressure with no hydrant flowing.

  2. Open the flow hydrant

    Open one or more nearby hydrants fully, read the pitot pressure at the outlet, and compute the flow:

    Q (gpm) = 29.83 × c × d2 × √pc outlet coefficient (about 0.9 for a smooth outlet), d outlet diameter (in), p pitot pressure (psi).
  3. Record residual pressure

    Read the residual hydrant again while water flows. Note the time, tank levels and which pumps were running. The model needs those same conditions to compare against.

  4. Reproduce it in the model

    Set the boundary conditions, add the measured flow as demand at the flow hydrant, solve, and compare the modeled residual pressure with the field reading.

A useful test drops the pressure by at least 10 psi. A smaller drop means the head loss is too small to tell one C-factor from another.

The calibration sequence

  1. Macro calibration: find gross errors

    When the model is off by 10 psi or more, the cause is almost never roughness. Look for closed or partly open valves, wrong elevations, wrong pump curves, a PRV at the wrong setting, or missing pipes.

  2. Group pipes

    Group pipes by material, age and diameter, and adjust one C-factor per group, not per pipe. Fewer, physically meaningful parameters make the model hold up beyond the tests it was tuned on.

  3. Tune roughness against flow tests

    Adjust group C-factors until the modeled residual pressures match. Values outside plausible ranges for the material point back to step 1.

  4. Tune the EPS against SCADA

    Adjust diurnal patterns and controls until tank levels and pump flows track the record over several days.

  5. Validate

    Check the model against tests and days not used in calibration. If it still matches, it is fit for use. Write down what it was calibrated for and what it was not.

How close is close enough

There is no single US standard. The AWWA guidelines tie accuracy to the model's intended use. The UK criteria below (WRc) are widely quoted as a benchmark:

MeasureTarget
PressureWithin ±0.5 m (≈0.7 psi) for 85% of readings, ±0.75 m (≈1.1 psi) for 95%, and ±2 m (≈2.8 psi) for all
Flow in main pipesWithin ±5% where the flow is more than 10% of total demand; ±10% elsewhere
Tank levels (EPS)Follow the shape and timing of the SCADA trend, typically within 1 to 2 ft
Hydrant flow testsMany US utilities accept a modeled residual within about 5 psi of the field reading
Section 7

Fire flow analysis

If a fire starts here and the fire department opens a hydrant, can the pipes deliver enough water, and do the neighbors keep enough pressure while they do? A fire flow analysis answers that for every hydrant in the model, one at a time.

What one test does

  1. Pick a moment

    Fire flow is checked at maximum day demand, usually at the busiest hour. Tank levels, pump states and customer use are fixed as they are at that moment.

  2. Open the hydrant

    The hydrant's needed fire flow, for example 1,000 gpm, is added as extra demand at that node, and the network is solved.

  3. Judge it

    It passes only if both rules below hold while the water flows.

  4. Find the limit

    Raise and lower the flow and re-solve until you find the most the hydrant can give before either rule breaks. That is the available fire flow. A failing hydrant also gets a shortfall: for example 1,000 gpm needed, 456 available, 54% short.

The two rules

At the hydrant≥ 20 psi

The hydrant itself keeps at least 20 psi residual while it flows the needed amount.

Across its pressure zone≥ 20 psi

No customer junction in the hydrant's pressure zone drops below 20 psi. Fittings and valve nodes that serve no one can be left out of the check.

A pressure zone is the part of the network the hydrant is connected to at that hour, bounded by PRVs, flow control valves, pumps and closed pipes. A fire in one zone is judged against that zone only.

Why there is a limit

The more water a hydrant draws, the more head is lost in the pipes feeding it, so pressure falls faster and faster as flow rises (Section 3). Trace that curve for the hydrant and for the lowest customer in its zone; the available flow is where the first one reaches 20 psi.

Pressure against fire flow for one hydrant The hydrant starts at 62.5 psi with no fire flow and keeps 54.3 psi at the needed 1,000 gpm. The lowest customer in its zone reaches 20 psi first, at 1,778 gpm, which is the available fire flow. The hydrant alone would reach 20 psi at about 2,430 gpm. 0102030 40506070 05001,0001,500 2,0002,5003,000 fire flow drawn at the hydrant, gpm pressure, psi 20 psi minimum needed 1,000 gpm static 62.5 psi residual 54.3 psi at the hydrant lowest customer in its zone available 1,778 gpm limited by the zone hydrant alone ≈ 2,430 gpm
An example hydrant at maximum day: 62.5 psi with no fire flow and 54.3 psi while flowing the needed 1,000 gpm. It passes. Its available fire flow is 1,778 gpm, because at that flow a customer elsewhere in its zone reaches 20 psi. The hydrant on its own would not reach 20 psi until about 2,430 gpm.

Estimating the available flow quickly

From a static pressure and one flowing reading, the standard hydrant flow-test relation (NFPA 291) estimates the flow at 20 psi. Models use it as a first guess, then confirm it with one or two more solves.

Q20 = QF × ((PS − 20) / (PS − PR))0.54 QF the flow drawn, PS static pressure, PR residual pressure while flowing.

How much fire flow is needed

The fire code sets the needed flow by building type and size. Under the International Fire Code (Appendix B), typical values are:

Land useNeeded fire flowDuration
One- and two-family homes up to 3,600 sq ft1,000 gpm1 hr
Larger homes1,500 gpm and up2 hr
Commercial, institutional, industrial1,500–8,000 gpm2–4 hr

Sprinklered buildings can earn reductions. Your local fire marshal has the final word. Record the needed flow by land use on each hydrant so the analysis tests each one against its own target.

How sensitive is the answer to demand?

A model's demands describe one particular day. Repeat the test at higher demand to see which hydrants depend on that choice:

Demand levelMeaning
×1.0 designThe model as it is, labeled with what its demand stands for, such as maximum day
×1.2Customers use 20% more water
×1.5Customers use 50% more. Some systems cannot sustain this: tanks drain before the chosen hour.

A hydrant that passes at ×1.0 and fails at ×1.2 is marginal: whether it is acceptable depends on which demand you plan for.

Reading the results

  • Fails limited at the hydrant usually point to an undersized or rough main feeding it, or a long dead end. The fix is a larger main or a loop.
  • Fails limited by the zone are held back by another customer, often one at high elevation. Look at the limiting node before resizing pipes near the hydrant.
  • No supply means the hydrant sits behind a closed valve. Check the valve before anything else.
  • Not tested usually means a junction with a no-data elevation. Fix it and run again.
Section 8

Water age and quality

With a working EPS, the same model can track how water ages and how its chemistry changes on the way to the tap. Old water loses disinfectant and grows disinfection by-products, so water age is often the first quality question a utility asks.

AnalysisWhat it showsKey inputs
Water ageHours since the water left a sourceTank mixing model, a long EPS
Chlorine decayResidual at every node over timeBulk decay rate from bottle tests, wall decay by pipe material, source concentration
Source tracePercent of water at each node from a chosen sourceThe source node to trace
  • Run long enough. Water age in tanks takes days to settle. Run 7 to 14 days and use the last day, once results repeat from day to day.
  • Choose the tank mixing model. EPANET offers complete mix, two-compartment, first-in first-out and last-in first-out. Many tanks short-circuit, and complete mix underestimates their age.
  • Watch tank turnover. Tanks that exchange too little water each day age it. A common target is turning the full volume over every 3 to 5 days.
  • Calibrate against grab samples. Compare modeled chlorine with measured residuals at sampling stations, and adjust wall decay by pipe group.
Section 9

Master plan analysis

A water master plan asks whether the system can meet today's and tomorrow's demand at the required level of service, and lists the projects that close the gaps, in order, with costs. The calibrated model is the engine behind every number in it.

The master planning process

  1. Set planning horizons

    Typically existing conditions, 5-, 10- and 20-year, and buildout. Each horizon is a model scenario.

  2. Project demand

    Use land use with unit demand factors (gallons per acre per day by zoning), or population with per-capita use. Add known large developments by hand. Apply the system's own peaking factors to get MDD and PHD.

  3. Adopt level-of-service criteria

    Agree the pass and fail lines with the utility before running anything (table below). Changing them later reopens every result.

  4. Find deficiencies

    Run each horizon at ADD, MDD, PHD and MDD plus fire. Map every node and pipe that breaks a criterion, and every facility short of capacity.

  5. Develop alternatives

    For each deficiency: a parallel or upsized main, a new loop, a new PRV or zone boundary, more pumping or storage. Test each in the model; a fix in one place can move a problem somewhere else.

  6. Cost and compare

    Apply unit costs (dollars per foot by diameter, per gallon of storage, per horsepower) plus contingency and soft costs. Compare alternatives on cost, how many deficiencies they solve and how robust they are.

  7. Phase into a capital plan

    Sequence projects by horizon and urgency, and coordinate with paving and pipe-replacement programs. Re-run the model with each phase built to confirm that the order works.

Typical level-of-service criteria

CriterionTypical valueChecked at
Minimum pressure40 psiADD and PHD
Maximum pressure80 psiLowest demand; plumbing codes require a PRV above this
Fire flow residual20 psiMDD plus fire, in the whole zone
Maximum velocity5 ft/s (10 ft/s in fire)PHD and MDD plus fire
Head-loss gradient≤ 5–10 ft per 1,000 ftPHD; flags undersized transmission mains
Firm pumping capacity≥ MDDWith the largest pump out of service (≥ PHD where no storage floats on the zone)

These are common values, not a standard. Adopt your state's design rules and your utility's own policy.

Sizing storage

Storage in each pressure zone is usually the sum of three parts:

Equalization

Covers the daily peaks

Often about 20–25% of MDD, or measured from the EPS as the volume drawn while demand exceeds supply.

Fire

The largest fire

Needed fire flow times duration. 3,500 gpm for 3 hours is 630,000 gallons.

Emergency

Supply outages

Set by policy, for example a number of hours of average demand with the main supply out.

Worked example: one zone, MDD 4.0 MGDVolume
Equalization, 25% of MDD1.00 MG
Fire, 3,500 gpm × 3 hr0.63 MG
Emergency, by policy0.50 MG
Total required2.13 MG

Compare the total with the usable volume of existing tanks: the volume between operating levels that still keeps the zone above its minimum pressure, not the nameplate capacity.

Beyond capacity: criticality

A complete master plan also asks what happens when things break. Take each major main, pump and tank out of service one at a time, then count the customers who lose pressure and the fire flow that is lost. Pipes whose loss cuts off many customers with no alternative path are candidates for redundancy projects, even where they have no capacity problem.

Section 10

Where to go next

Everything on this page is done by hand in most utilities today: weeks of GIS cleanup, manual C-factor tuning and one fire flow run at a time. The Drinking Water practitioner track teaches you to automate the same workflow on your own system.

Drinking Water Systems — Foundation

Build the model from GIS by script, run hundreds of fire flow and outage scenarios in the cloud, calibrate automatically against your own field data, and drive it all through an AI agent. Two days, live online, on your own pressure zone.