Pipe Network Lab
Build a small connected network with fixed-pressure boundaries and junction demands. For each pipe choose a signed linear pressure loss Δp=R q or a quadratic loss Δp=K q|q|, with q positive from its start to end. The browser solves junction mass balances by damped Newton iteration and reports residuals so an unsuccessful solve is visible. You supply the coefficients; this is an equal-elevation, steady, incompressible pressure-only model, not a calibrated water-system design.
Key features
- Edit 2–10 nodes and 1–20 pipes, including parallel pipes and loops
- Fixed gauge-pressure boundaries and nonnegative junction demands with explicit kPa and L/s units
- Choose user-supplied linear or quadratic loss coefficient for each pipe
- Damped Newton junction solve with connected-graph checks and finite iteration limit
- Signed flow, junction pressure, mass and pipe-law residual tables with convergence trace
- Download converged results as CSV or model/trace JSON
How to use
- Load the single-pipe or mixed-loss example, then add or remove nodes and pipes for your topology.
- For each node choose a fixed gauge pressure in kPa or a junction demand in L/s; keep at least one fixed boundary.
- Choose each pipe's start and end, loss law and positive coefficient in the unit shown for that law.
- Solve and inspect convergence status, junction mass residual, pressure-law residual and the iteration trace.
- Only for a converged result, download the CSV or JSON with assumptions, signs and the complete trace.
Use cases
- Check flow splitting across parallel paths under fixed boundary pressure
- Compare a linear and quadratic user-supplied loss coefficient in a small network
- See how junction demand changes unknown pressure and direction of flow
- Teach mass balance, signed pressure drop and nonlinear iterative convergence
Frequently asked questions
Where do pipe coefficients come from?
You must supply them. R has units kPa/(L/s) for Δp=R q and K has units kPa/(L/s)² for Δp=K q|q|. This tool does not infer them from length, diameter, roughness, viscosity, Reynolds number or material.
How are pressure and flow signs defined?
Pressure is gauge kPa. Each pipe's q is positive from its selected start to end and negative when flow reverses. Its pressure drop is p(start)−p(end). Junction demand is nonnegative withdrawal. Fixed boundaries absorb or supply the remaining net flow.
What does convergence mean?
The maximum absolute junction mass-balance residual is at or below 1e−8 plus 1e−10 times the sum of absolute pipe flows, in L/s. Pipe-law residuals are also reported. A nonconverged trace is tentative and cannot be downloaded as a solved network.
Can I model a real water distribution system?
Not with this limited model alone. It assumes steady incompressible flow, equal elevation and prescribed fixed boundary pressures, with no pump, valve, tank, elevation head, fluid-property, cavitation or pressure-dependent demand model. A negative gauge pressure is flagged but not physically assessed. Do not use it for safety or construction approval.
Why does a disconnected or self-connected pipe fail?
Every node must be in one connected component with a fixed-pressure boundary, and a pipe cannot start and end at the same node. A disconnected component lacks the data needed to anchor its pressure; edit the endpoints or add a connecting pipe.
Is the network uploaded?
No. Editing, solving and requested CSV/JSON generation run in this browser tab.
Privacy
Network settings and calculations remain in browser memory. Files are created locally only when you request a download.
Comments & questions