A city water network is a moving system of reservoirs, pumps, pipes, valves, tanks and demands. Water must reach many locations with usable pressure while flow continually changes. Mathematics turns that network into connected equations that can be checked, simulated and improved.
This is a clear answer to **why mathematics is important in civil engineering and everyday infrastructure**. Conservation balances flow at junctions, pressure becomes hydraulic head, nonlinear equations represent pipe losses, and time series represent changing demand. This article explains the mechanisms without offering design or operational instructions for a real water system.
A network is a graph with physical meaning
Junctions, tanks and reservoirs can be represented as nodes. Pipes, pumps and valves become links. Graph structure answers which locations connect; hydraulic equations answer what flow and head are possible.
At an ordinary junction without storage:
**sum of inflows − sum of outflows − demand = 0**
If 18 L/s enters, 11 L/s leaves through one pipe and local demand is 4 L/s, another 3 L/s must leave through the remaining link. A balance error indicates inconsistent data or an unsolved state.
Pressure and head
Hydraulic head expresses energy per unit weight. Pressure head is p/(ρg). For water near ordinary conditions, 250 kPa corresponds to roughly:
**250,000/(1,000×9.81) ≈ 25.5 m of water**
Total head may also include elevation and velocity terms. Two points with the same pressure do not necessarily have the same total head if their elevations differ.
This explains why hilltop and low-lying customers can experience different pressure even within one connected network.
Pipe friction consumes head
The Darcy–Weisbach relation is:
**hf = f(L/D)(v²/2g)**
For a fictional pipe with f=0.02, L=500 m, D=0.20 m and v=1.0 m/s, hf≈0.02×2,500×1/19.62≈2.55 m.
The quadratic velocity term matters. Doubling velocity while other terms remain fixed increases this modelled loss by a factor of four. Diameter also affects velocity because Q=Av, so a diameter change can influence loss strongly through several terms.
The friction factor depends on Reynolds number and relative roughness. It is not a universal constant carried unchanged between pipes and flow regimes.
Empirical equations need domains
Water-network practice may also use empirical relations such as Hazen–Williams under particular conventions. Coefficients, units and applicability must be stated. Mixing a coefficient calibrated for one unit system with another equation form can create a plausible but wrong result.
An empirical fit is useful inside its evidence base. It is not a replacement for understanding conservation, energy and uncertainty.
Loops make the equations coupled
In a branching network, flow direction may appear obvious. In a loop, water can take multiple paths, and each path’s loss depends nonlinearly on its own flow. Changing one demand can redistribute flows across the entire network.
Solvers iterate until node continuity and link energy relations are satisfied within tolerances. Numerical convergence means the discrete equations have been solved; it does not prove demands, roughness, valve states or pump data represent reality.
Did You Know? Closing one valve can change distant pressures
A network is coupled. A local change alters available paths and losses, so its influence may appear far away. This is why graph structure and hydraulic equations must be considered together.
Pumps add head
A pump curve relates added head to flow for a given configuration and speed. A system curve describes the head required to move water through elevation and losses. Their intersection is a possible operating point.
Changing speed or controls moves the pump curve; changing demands or valve positions moves the system behaviour. Efficiency and power introduce further relations. No single “best” operating point exists without objectives and constraints.
Pumps can also interact with tanks and controls over time. A steady-state snapshot cannot represent every transient or scheduling issue.
Tanks create storage and time dependence
For a tank with surface area A, an elementary level balance is:
**A dh/dt = inflow − outflow**
If net inflow is 5 L/s, or 0.005 m³/s, into a tank with constant surface area 200 m², level rises at 0.005/200=0.000025 m/s, about 0.09 m/h. Real tanks may have varying area and operational limits.
Storage shifts water across time: filling during lower demand and supplying during peaks. Time-step size, starting level and demand patterns all influence an extended-period simulation.
Demand is measured and modelled
Node demands may be estimated from metering, land use, customer classes and patterns. A daily multiplier changes the baseline through time. Peak factors should not be applied blindly to every node at once if the underlying behaviours are diverse.
Leakage is also not necessarily a fixed withdrawal. Some leakage depends on pressure. Treating it as a constant may misrepresent how a pressure change affects loss.
Calibration compares simulated pressures and flows with field measurements. Adjusting many parameters can produce multiple plausible fits, so identifiability matters: can the available sensors distinguish roughness from demand or a valve-state error?
EPANET and transparent simulation
The US Environmental Protection Agency’s EPANET software models hydraulic and water-quality behaviour in pressurised pipe networks. It can represent pipes, nodes, pumps, valves, tanks and reservoirs over extended periods.
Software does not remove the need for a model statement. A useful record includes network topology, units, elevations, demands, pipe properties, device curves, controls, time step, convergence tolerance and measurement comparison.
Students should use only synthetic networks. Real utility details can be security-sensitive and operational decisions require authorised professionals.
Worked loop-free example
Consider a reservoir with head 60 m feeding one junction at elevation 25 m. A fictional pipe loss at the chosen flow is 8 m. Ignoring velocity-head differences, junction pressure head is approximately 60−25−8=27 m, or about 265 kPa.
If demand increases and pipe loss rises to 15 m, pressure head falls to 20 m. This demonstrates the nonlinear competition between flow and available head.
The calculation is intentionally simple. A real network must solve all connected flows and heads together, with verified device states and boundary conditions.
Sensitivity and uncertainty
Useful sensitivity questions include:
- Which nodes lose the most pressure when demand increases?
- How does roughness uncertainty change predicted head loss?
- Which measurement would best distinguish two calibration hypotheses?
- Does a smaller time step materially change tank levels or control events?
- Which pipes or valves create structural vulnerability in the graph?
Sensitivity is not probability. A large response to one change identifies influence; estimating likelihood needs evidence about parameter variation and events.
Water quality adds transport mathematics
A constituent moves with flow, mixes at junctions and may react over time. Travel time, tank mixing and wall or bulk reactions add differential equations to the hydraulic solution.
Hydraulics must be credible before transport results are interpreted. An incorrect flow direction changes the predicted route of a constituent. Water-quality modelling never replaces sampling, treatment controls or regulatory practice.
Common misconceptions
- “Pressure is the same throughout a connected network” ignores elevation and loss.
- “Flow chooses only the shortest path” ignores resistance and boundary heads.
- “A larger pipe always solves the problem” ignores cost, water age, controls and system objectives.
- “Converged software output is validated” confuses equation solving with field evidence.
- “Demand is known exactly” ignores time variation and estimation.
- “One pressure reading calibrates the network” ignores non-unique parameter combinations.
How students can learn safely
Draw a synthetic network with one reservoir, three junctions and four pipes. Assign directions provisionally, write a continuity equation for each junction and use a simplified loss relation. Solve by spreadsheet or a teaching script, then check every balance.
Next vary one demand, roughness or valve state. Plot node head rather than presenting only a coloured map. Keep elevation, pressure head and total head in separate columns.
Parents can ask: Where is energy added? Where is it lost? Which equation protects mass balance? Which inputs were measured and which were assumed? These questions connect school algebra to invisible public infrastructure.
Casebook: Four Network Surprises
A high-elevation node
Its pipe route is short, but elevation consumes much of the available head. Distance alone is a poor predictor of pressure. A profile plot of hydraulic grade against ground elevation makes the constraint visible.
A hidden closed valve
Modelled and measured pressures disagree across a zone. Increasing roughness everywhere may improve the numerical fit but hides the actual topology error. Testing valve-state hypotheses is more interpretable than indiscriminate parameter tuning.
A tank control oscillation
A coarse time step jumps across an on/off threshold and produces unrealistic switching. Reducing the time step or representing control logic carefully can change the event sequence. Numerical resolution is part of the result.
Fire-flow and ordinary demand
An unusual high-flow scenario can lower pressures and reverse some local directions. It should be evaluated under authorised criteria and verified models. Classroom networks can illustrate the coupling but not certify protection performance.
Frequently Asked Questions
Extended Casebook: Solving a Network Without Losing the System
Student Project Blueprint: A Small Network with a Full Audit Trail
Draw and number the graph
Create one reservoir, one tank, four junctions and at least one loop. Number every node and link, draw assumed positive flow arrows and list elevations. The graph should be readable without software. Build an incidence table and confirm each pipe connects exactly two nodes. A disconnected node or duplicated link should be caught before hydraulic equations are solved.
Define compatible data
Choose one unit system and record pipe length, diameter, roughness, base demand, device status and boundary head. State whether losses use Darcy–Weisbach or another declared form. Do not combine coefficients from incompatible equations. Add a data-source label—defined, assumed or calculated—to every column.
Solve and close balances
Use a teaching solver or spreadsheet iteration, then calculate every node’s flow residual and every loop’s energy residual independently. Report the largest residual with units and compare it with the numerical tolerance. A colourful pressure map is secondary to these conservation checks.
Run three scenarios
Compare baseline demand, a higher-demand period and one closed-link case. Keep all unrelated inputs fixed. Tabulate head, pressure and link flow for the same locations, marking any flow reversal. Explain the result from changed paths and nonlinear losses rather than describing colours.
Add time and storage
Apply a short synthetic demand pattern and simulate tank level with two time steps. Plot level and pump status together. If control events move materially when the step changes, the original resolution is not adequate. Preserve the starting level because a dynamic simulation is conditional on initial state.
Calibrate a fictional error
Generate synthetic pressure observations from a known model, then deliberately alter one valve state or roughness. Try to recover the cause using only a subset of measurements. The difficulty demonstrates non-uniqueness. Add one strategically placed observation and show how it separates competing explanations.
Report responsibly
End with assumptions, conservation checks, sensitivity results, unresolved parameters and the measurement that would most improve confidence. State plainly that the fictional network cannot support utility operations, fire-protection certification or public-safety decisions. The discipline of the report is itself a transferable mathematical skill.
Incidence matrices
An incidence matrix records which links enter or leave each node using a sign convention. Multiplying it by the vector of pipe flows produces node flow balances. The matrix makes conservation compact and helps reveal disconnected components or redundant equations. Students can construct one for a triangle network, reverse one link’s assumed direction and observe that only signs change; the solved physical direction may still emerge as a negative value.
Pressure-dependent demand
An ordinary demand model may withdraw the requested flow regardless of pressure. Under very low pressure, that assumption can be unrealistic. A pressure-dependent teaching relation reduces delivered demand below a threshold. Comparing the two models shows that “unmet demand” and low pressure are coupled. The richer model should be used only with declared parameters and purpose, not because its output looks more realistic.
Roughness calibration
Several combinations of pipe roughness and nodal demand can reproduce one pressure reading. Add a second pressure sensor or a flow measurement and the possibilities may narrow. Students can plot an error surface over two parameters to see a long valley of nearly equivalent fits. This is identifiability: optimisation may find a minimum even when data do not uniquely determine the parameters.
Pump energy
Hydraulic power is approximately ρgQH. At Q=0.02 m³/s and added head H=30 m, hydraulic power is about 5.89 kW. Input power is higher because efficiency is below one. This calculation is not a pump-selection recommendation; it demonstrates how flow and head jointly determine energy and why unit consistency matters.
Parallel pipes
Two pipes connecting the same nodes have equal head loss between their endpoints, but flow divides according to resistance. Equal diameters and roughness do not guarantee equal flow if lengths differ. Students can use a simplified quadratic loss h=RQ² to show that Q is proportional to 1/√R for a common head loss. Total flow is the sum of branch flows.
Leakage and water balance
At system scale, input volume minus authorised consumption and storage change leaves an apparent loss term. Measurement error and timing misalignment also enter that residual. Calling the entire difference “leakage” overstates what the balance proves. Aligning meter periods and quantifying uncertainties is as important as subtraction.
Control rules
A pump might turn on below one tank level and off above another. If both thresholds are identical, small fluctuations can cause rapid switching. Hysteresis creates a band that stabilises control. Students can simulate tank level with one-minute and fifteen-minute steps and compare missed threshold crossings. The example links difference equations with practical logic.
Pressure zones
Large elevation differences may require separate zones, pressure-reducing valves or boosting. A single reservoir head that serves a hilltop adequately may create excessive pressure at low elevations. Plotting hydraulic grade and ground elevation along a route makes this visible. Network design is therefore constrained by both connectivity and topography.
Fire-flow scenario language
A modelled high-demand event is a scenario under assumptions, not proof that a protection system meets code. A careful classroom report states the applied withdrawal, demand background, device states and resulting minimum pressure, then points to the need for current standards and authorised professionals. This keeps mathematical exploration separate from life-safety certification.
A complete model audit
Before interpreting colours, check node continuity, reservoir and tank boundaries, units, link directions, pump and valve statuses, time step and convergence. Compare at least one hand-calculated path loss with the solver. Then compare selected model outputs with synthetic measurements and inspect residuals. A transparent audit trail is more valuable than a dense network picture with undocumented assumptions.
Why use head instead of pressure alone?
Head combines pressure with elevation and, when needed, velocity energy in compatible length units, making energy comparisons clearer.
Why are network equations nonlinear?
Head loss depends nonlinearly on flow or velocity, and devices have their own curves and controls.
What is an extended-period simulation?
It solves a sequence of hydraulic states as demands, tanks, pumps and controls change through time.
Can a student use EPANET?
Yes with a fictional or openly released teaching network. Real utility data and operational conclusions require authorisation and expert oversight.
Which mathematics matters?
Graphs, simultaneous equations, nonlinear functions, energy, differential equations, optimisation, statistics and uncertainty all matter.
Useful next reading
- US EPA: EPANET
- Why Mathematics? Fire Sprinkler Hydraulics, Pressure Loss and Water Flow
- Why Mathematics? Water Hammer, Pressure Waves and Surge Protection
- Why Mathematics? Coriolis Flowmeters, Phase Shift and Mass Flow
- Why Mathematics? Activated Sludge, Food-to-Microorganism Ratios and Settling
- Mathematics Learning Hub
Transfer the Mathematics Beyond One Network
The graph-and-balance approach appears in electrical circuits, transport systems, supply chains and computer networks. Nodes collect or distribute a conserved quantity, links impose resistance or capacity, and boundary conditions drive the system. The equations differ, but the habit of checking conservation before optimisation transfers directly.
Water networks add a particularly useful lesson: topology and physics cannot be separated. A map can show that two nodes connect, yet flow magnitude and direction depend on head, resistance, demand and device state. Conversely, a perfect pipe-loss equation cannot repair a missing or incorrectly closed link. Students learn to audit both the graph and the numbers.
Model improvement should follow evidence. A large residual at one pressure sensor might suggest a local state error; a system-wide bias might suggest boundary or demand assumptions; time-dependent discrepancies may point to controls or storage. Tuning every parameter at once can make the model look better while making its explanation worse. A smaller, interpretable correction supported by an independent observation is stronger.
For a final peer check, provide only the network map, input table and stated equations. Ask another student to reproduce one steady state and one tank-level interval. If their directions, pressures or event times differ, trace the discrepancy to conventions or hidden settings. A model that cannot be reproduced from its record is not ready for interpretation, even when its original output appears smooth and plausible.
A final perspective
Water networks show mathematics coordinating a public system that most people never see. Conservation protects every junction, head connects pressure with elevation, nonlinear losses distribute flow and time-dependent storage reshapes demand. The responsible habit is to treat every simulation as a documented hypothesis that must meet measurements, operating knowledge and professional review.
A Practical Investigation Studio
These investigations use synthetic or openly released teaching data. Complete two or three for a short project or the sequence as a portfolio. They expose assumptions and error signals; they do not imitate professional engineering, hydrometry, utility operations or medical-device validation.
Investigation 1: Node balance
Write continuity equations for a small directed network. Confirm every inflow, outflow and demand sign. Use synthetic or openly released teaching data. Begin by naming the response variable, input variables, units and prediction before calculating. Preserve raw values and unrounded intermediates in a table, then make one graph whose axes communicate the model clearly. Add an independent hand estimate and a dimensional or limiting-case check. Deliberately introduce one unit error and describe the numerical signature rather than merely correcting it. Label every quantity observed, assumed, fitted or derived. Record the model domain and one condition that would require a richer model. Ask a peer to reproduce the result from the written procedure without seeing the answer. If the reproduction differs, locate whether the ambiguity arose in definitions, units, rounding or software defaults. End by explaining the result to a younger student in three sentences. This remains a classroom calculation, not professional validation or a safety, production or security decision.
Investigation 2: Head conversion
Convert pressure to head at several elevations. Keep pressure head distinct from total head. Create a data dictionary before entering a spreadsheet or script. State how each row was obtained, which values are exact by definition and which are measurements or simulated observations. Calculate once with full precision and once with premature rounding, then compare the final difference. Vary the principal input across at least five sensible values and look for linearity, curvature or instability instead of reporting only two endpoints. Keep signed residuals if a model is fitted, because absolute errors hide direction. Include a graph and a small results table that another person can audit. Write a one-paragraph uncertainty note distinguishing input uncertainty from model-form limitations. A peer should be able to reconstruct one row from the formula and raw data alone. State what evidence would falsify the interpretation. Do not present the exercise as a certified engineering, manufacturing, metrology or cryptographic assessment.
Investigation 3: Pipe loss
Calculate Darcy–Weisbach loss for fictional pipes. Vary diameter and velocity one at a time. Treat the investigation as a comparison of hypotheses, not a hunt for an attractive number. Write a baseline model and at least one plausible alternative, then predict where their outputs should diverge. Hold all unrelated inputs fixed while varying the chosen factor. Preserve coordinate, sign, phase, size-weighting or bit conventions beside the data. Use a ratio, residual or normalised error that has a declared denominator. Repeat the calculation with that denominator changed and explain why the percentage changes. Check one extreme case where the answer should approach zero, unity or another known limit. Make the graph before writing the conclusion and note any outlier without deleting it. Separate repeatability of one prepared sample from coverage across positions, times or populations. The final claim should match the observed range and must not be extrapolated into real operational approval.
Investigation 4: Parallel paths
Solve flow division with a simplified quadratic resistance model. Check equal endpoint head loss and total flow. Plan the computation so that errors leave visible fingerprints. Save the raw input, transformed input, intermediate result and final result in separate columns or variables. Insert one deliberate sign reversal, one missing observation and one hidden reset, each in a separate copy, and document how the plots or checks respond. Compare an analytical shortcut with the more complete calculation over a range where the shortcut is expected to fail. Report the largest absolute difference and where it occurs. Include conservation, balance, boundedness or monotonicity checks appropriate to the topic. If a fitted curve is used, inspect residual clusters and changing spread instead of relying on one fit statistic. Have a peer review only the assumptions first, then the arithmetic. Keep the conclusion educational and conditional on the fictional data.
Investigation 5: Loop iteration
Iterate a three-link loop under declared assumptions. Report continuity and energy residuals. Build a sensitivity map rather than changing several settings at once. Choose a baseline, vary one input downward and upward, and express output change in both original units and a dimensionless ratio. Then select a second input and repeat. If interactions seem likely, test a small two-dimensional grid and identify where the one-factor interpretation breaks down. State why the chosen ranges are plausible for the teaching model. Preserve failed or surprising runs and annotate them. Compare computational resolution or sample length at three levels so numerical artefacts are not confused with physical behaviour. Provide a hand estimate for the order of magnitude. Finish with a decision table using cautious language—stable, sensitive or unresolved—rather than safe or unsafe. Classroom evidence cannot authorise a product, structure, process or security control.
Investigation 6: Pump intersection
Plot a synthetic pump curve and system curve. Identify the intersection without calling it a selected design. Make uncertainty visible at every stage. Assign each input a source and a plausible interval, then identify which inputs are correlated rather than automatically treating them as independent. Propagate uncertainty with a simple high-and-low calculation or transparent simulation, and retain the seed or full synthetic samples for reproduction. Compare the spread caused by measurement variation with the shift caused by changing the model assumption. Plot both if possible. Explain why more decimal places do not narrow an interval supported by weak inputs. If a result lies near a fictional decision boundary, rewrite the conclusion to reflect the chance of crossing it. Ask a peer to challenge the largest assumed uncertainty and rerun the analysis. Report the conclusion as evidence about the model, never as professional certification.
Investigation 7: Tank balance
Simulate tank level from inflow and outflow time series. Compare two time steps and control events. Audit representation choices. Recalculate after changing the coordinate origin, phase wrapping convention, histogram bins, mesh labels or binary mapping while preserving the underlying situation. A correct physical or probabilistic conclusion should change only where the definition genuinely changes. Show one example where a visual choice exaggerates or hides a pattern. Use identical axes for fair comparison and include sample count or resolution in captions. Test an invariant such as total mass, probability, force, energy sign or average ratio. Where values are averaged, identify whether the mean is number-, mass-, volume-, time- or state-weighted. Ask another student to explain the plot without reading the conclusion; revise labels if their interpretation differs. The display supports reasoning but cannot replace domain review.
Investigation 8: Demand scenarios
Apply baseline, peak and shifted demand patterns. Track pressures and reversals at the same nodes. Separate verification from validation. First verify arithmetic or code against a case with a known answer, including units and at least one manually calculated row. Next ask whether the teaching model represents the intended phenomenon and list the omitted mechanisms. Refine numerical resolution or increase synthetic sample length and record whether the chosen quantity stabilises. A stable answer can still arise from an unrealistic model, so compare with an alternative assumption or openly documented benchmark. Record software version, solver or library settings and stopping rules. Avoid tuning settings after seeing the desired result; predeclare the comparison instead. Summarise numerical error, input uncertainty and model-form uncertainty separately. No classroom agreement with a benchmark should be described as product or system validation.
Investigation 9: Calibration valley
Vary roughness and demand against sparse observations. Demonstrate non-unique fits and sensor value. Design the investigation to reveal dependence over position, time or sequence order. Keep the original ordering, then compare with a deliberately shuffled copy and explain which statistics change. Examine at least two lags, locations or neighbourhood scales rather than only the overall average. Plot local values alongside the aggregate so compensating errors are visible. State whether successive observations are plausibly independent and why that matters to the calculation. If repeated measurements share one specimen, source or initial state, do not count them as independent coverage. Add a block or subgroup analysis and note any drift. Preserve the random seed for simulated data but use more than one seed before generalising. The conclusion should describe detected structure without claiming causation from the pattern alone.
Investigation 10: Topology error
Close one fictional valve and compare residual patterns. Do not hide a state error by tuning every roughness. Create an adversarial edge-case test. Identify the smallest, largest, most symmetric and most irregular inputs allowed by the classroom model, predict the expected behaviour, and then compute it. Include zero or a limiting value only when mathematically meaningful. Watch for division by a small number, logarithms of invalid values, wrapped angles, negative geometry, impossible probabilities or solver singularities. Replace silent software errors with explicit checks and explanatory messages. Compare the edge cases with the ordinary baseline on the same scale and describe why a method that works in the middle may fail near a boundary. Record the first assumption that breaks. The exercise is about model literacy; it is not permission to explore hazardous physical extremes.
Investigation 11: Model audit
Package inputs, balances, sensitivities and limitations. Have a peer reproduce one hand-calculated path. Prepare a compact reproducibility package: raw synthetic data, formulas or code, version information, one chart, a results table and a short read-me file. Give every file and column a meaningful name and avoid values copied manually between tools. Re-run from a clean state and confirm that outputs are regenerated rather than cached. Ask a peer to alter one declared input and predict the direction of change before execution. Compare the prediction with the result and investigate any disagreement. Add a limitations section naming data coverage, numerical resolution, model assumptions and the next useful measurement. Archive corrections instead of erasing them so the reasoning trail remains visible. Conclude with what the calculation demonstrates, what it does not demonstrate and which qualified professional or authoritative standard would govern a real application.
