Introduction
Hydra is a water distribution network simulator written in Rust. It performs extended-period simulation (EPS) of hydraulic behaviour and water quality dynamics across pressurised pipe networks, computing the full time history of flows, pressures, and constituent concentrations at every node and link.
Features
Hydraulics
- Head-loss formulas: Hazen-Williams, Darcy-Weisbach, Chezy-Manning (with minor losses)
- Demand models: Demand-Driven Analysis (DDA) and Pressure-Dependent Analysis (PDA)
- Emitters: pressure-dependent outflow at junctions
- Leakage: FAVAD (Fixed and Variable Area Discharge) model
- Pumps: head-curve (1/3-point and custom), constant-power, variable-speed patterns
- Valves: PRV, PSV, FCV, TCV, GPV, PBV, PCV
- Tanks: cylindrical and volume-curve geometries, overflow mode
- Controls: simple time/level/pressure controls, rule-based controls with priorities
- Solver: Global Gradient Algorithm (GGA) with sparse Cholesky factorisation
Water Quality
- Modes: chemical constituent, water age, source trace
- Transport: Lagrangian segment-based advection
- Reactions: first-order and zero-order bulk and wall decay, limiting potential, roughness correlation
- Sources: concentration, mass booster, flow-paced booster, setpoint booster
- Tank mixing: complete (CSTR), two-compartment, FIFO (plug flow), LIFO
I/O
- Input: EPANET 2.3
.inpformat (local files, HTTP URLs) - Output: EPANET-compatible
.outbinary format,.rpttext report,.jsonreport - Unit systems: all 11 EPANET flow unit variants (CFS, GPM, MGD, IMGD, AFD, LPS, LPM, MLD, CMH, CMD, CMS)
Relationship to EPANET
Hydra’s hydraulic and quality engines were derived by studying EPANET’s mathematical foundations. Hydra is not an EPANET clone or compatibility layer; it is a distinct solver that models the same physics. Where the two diverge, Hydra’s result is authoritative.
For migration guidance, see Migrating from EPANET.
See INP Format Support for current EPANET input coverage.