OpenHydro Bench
Exact answer known1D · pressurizedCandidate

Friction loss in a pipe

Does the model lose the right amount of pressure to friction?

Test A1P-001
Darcy (1845)
Version 1.0.0
Right answer
Exact solution · Darcy (1845)
Results
2 models · closest 0.6 % off · see them ↓
Must
get the head loss within 1 %
Sketch, not to scale.

The model file

The suite writes this EPANET 2 input file from the test's inputs. Each engine's own copy, as it ran, is in Run it yourself under its result below.

On the map: click any element to see its line in the file and every engine's result there over time.

Hydraulic grade line along the pipe97989910002004006008001,000Distance x (m)Head (m)Exact hydraulic grade lineEPA EPANET 2.2 nodal heads: 0, 100EPA EPANET 2.2 nodal heads: 100, 99.69EPA EPANET 2.2 nodal heads: 200, 99.38EPA EPANET 2.2 nodal heads: 300, 99.07EPA EPANET 2.2 nodal heads: 400, 98.76EPA EPANET 2.2 nodal heads: 500, 98.44EPA EPANET 2.2 nodal heads: 600, 98.13EPA EPANET 2.2 nodal heads: 700, 97.82EPA EPANET 2.2 nodal heads: 800, 97.51EPA EPANET 2.2 nodal heads: 900, 97.2EPA EPANET 2.2 nodal heads: 1,000, 96.89
  • Exact hydraulic grade line
  • EPA EPANET 2.2 nodal heads

Colebrook–White gives f = 0.01821 and a total loss of 3.094 m. EPANET uses the Swamee–Jain approximation, which is expected to sit about 0.6 % high here.

What happens

Water flows at 1 m/s through a 1 km, 300 mm pipe. Friction takes about 3.1 m of head, an amount fixed exactly by the Colebrook–White formula.

Why it matters

Every pipe in a water network loses head this way. Get the friction law wrong and pressures at customers' taps are wrong.

A good model must

  • get the head loss within 1 %
  • keep heads along the pipe within 5 cm

How models did

In rank order: by each model's percent difference from the right answer, the largest over the test's accuracy checks (lower is better; results within 10 % of each other share a rank). Mass error, timing and NSE are shown beside it, not folded in. Each model runs the same inputs. Compare them in the results viewer →

RankModelDifferenceLargest difference inRun time
1=EPANET 2.2 US EPA0.6 %Head loss2.2 s
1=Hydra water distribution0.65 %Head loss1.0 s
EPANET 2.2
EPA EPANET 2.2, the standard water-network solver
#1= 0.6 % off

Run time, finest grid: 2.2 s · AMD EPYC 9V74 80-Core Processor, 2 cores, 15.6 GB, Linux 6.17.0-1022-azure (GitHub Actions (github-hosted, ubuntu24))

Settings: epanet (WNTR 1.5.0, libepanet22)

Head loss
• 0.6 % off
Heads along the pipe
• 1.1 cm off
0.36 % of the exact 3.09 m head loss along the pipe

Scored with method 3.0 · Score card: EPA EPANET 2.2

Hydra
Hydra 17 (NEER AI, Rust): its water-distribution engine on the EPANET data model, run through its CLI with default settings
#1= 0.65 % off

Run time, finest grid: 1.0 s · AMD EPYC 9V74 80-Core Processor, 2 cores, 15.6 GB, Linux 6.17.0-1022-azure (GitHub Actions (github-hosted, ubuntu24))

Settings: hydra CLI 4.1.1 (wds engine, EPANET-format binary output)

Head loss
• 0.65 % off
Heads along the pipe
• 1.2 cm off
0.39 % of the exact 3.09 m head loss along the pipe

Scored with method 3.0 · Score card: Hydra 17.0.0 water distribution

Not run yet: HEC-RAS 7.0, TELEMAC-2D, ANUGA, GeoClaw, LISFLOOD-FP, TUFLOW, MIKE 21, Iber, BASEMENT, Delft3D FM
Run it and add yours →

Status of this test

Candidate. To become frozen it needs: maintainer review recorded.

Technical details for reviewers Checks, reference, inputs, sources

Checks and why each limit was chosen

CheckDifference measured as a percentage ofLatestDifferenceWhy this check
head_loss
relative_head_loss of h · in the score
already a percentage–Exact Colebrook–White head loss within 1 %: the accuracy Swamee & Jain (1976) give for their explicit approximation over 5e3 < Re < 1e8, so a solver using any standard explicit friction formula passes and a wrong friction law or a units error fails.
head_profile
L2 of h · in the score
of the exact 3.09 m head loss along the pipe–Heads along the pipe within 5 cm of the linear exact profile: catches a correct total loss distributed wrongly.
convergence
not applicable
––Steady closed-form pipe flow: a network solver has no grid to refine, so observed order of accuracy does not apply.

Reference

Exact solution from references.darcy_weisbach.head_loss.

Promotion checklist

Only frozen tests have fixed inputs and answers. This list is computed from the manifest and the published score cards; the rules are in the method.

  • ✓Data licence verifiedfor candidateanalytic-public
  • ✓All inputs availablefor candidateall committed or fetched by SHA-256
  • ✓Reference (truth) availablefor candidateanalytic generator
  • ✓Every tolerance justifiedfor candidateeach gating criterion has a rationale
  • ✓A published run passesfor frozen2 passing score card(s)
  • ✓Order of accuracy shownfor frozennot applicable: Steady closed-form pipe flow: a network solver has no grid to refine, so observed order of accuracy does not apply.
  • ✓Two independent codes passfor frozenpassing codes: EPA EPANET 2.2, Hydra 17.0.0 water distribution
  • ✗Maintainer review recordedfor frozenno maintainer review recorded

Inputs

FileRoleFormatSHA-256Get it
inputs/params.jsoncase_parametersjson60886c40a737…Download

About this test

Physics

Steady flow from a reservoir (head 100 m) through a horizontal pipe, \(L = 1000\) m, \(D = 0.3\) m, roughness \(\varepsilon = 0.15\) mm, withdrawn at \(V = 1\) m/s. With \(\nu = 10^{-6}\) m²/s, \(Re = 3.0\times10^5\) and the Colebrook–White equation, solved to machine precision, gives \(f = 0.018210\). The exact head loss is

$$\Delta h = f\,\frac{L}{D}\,\frac{V^2}{2g} = 3.094\ \text{m},$$

and the hydraulic grade line falls linearly along the pipe.

What it checks

The friction law a solver uses and how it applies it. Explicit formulas (Swamee–Jain, Haaland) are within about 1 % of Colebrook–White in this range, so they pass; a fixed friction factor, the wrong viscosity or a units error fails. EPA EPANET 2.2, which uses Swamee–Jain, comes out 0.60 % high, as theory predicts (0.65 %).

Case history

  • 1.0.0 — friction factor from Colebrook–White instead of a fixed \(f = 0.02\); head-loss metric relative to the exact drop; grid convergence marked not applicable (steady closed-form flow).

Citation

Colebrook, C. F. (1939). "Turbulent flow in pipes, with particular reference to the transition region between the smooth and rough pipe laws." J. ICE, 11(4), 133–156. Swamee, P. K., and Jain, A. K. (1976). "Explicit equations for pipe-flow problems." J. Hydraul. Div., 102(5), 657–664.

Sources

  • Darcy, H., Weisbach, J. (1845). Classical Darcy–Weisbach pipe-friction relation (as used in EPANET hydraulics). EPA/600/R-20/133 §3.

Test A1P-001_darcy_weisbach_single_pipe · version 1.0.0 · data licence analytic-public