Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

INP Format Support

Hydra parses the EPANET 2.3 .inp file format. This page documents which sections and keywords are supported, which are silently ignored, and where Hydra’s behaviour differs from or extends the standard.


Sections

Fully Supported

All data in these sections is parsed and applied.

SectionContents
[TITLE]Up to 3 title lines (preserved verbatim)
[JUNCTIONS]ID, elevation, base demand, demand pattern
[RESERVOIRS]ID, head, head pattern
[TANKS]ID, elevation, initial/min/max level, diameter, minimum volume, volume curve, overflow flag
[PIPES]ID, nodes, length, diameter, roughness, minor loss, status
[PUMPS]ID, nodes, keyword parameters (HEAD, POWER, SPEED, PATTERN)
[VALVES]ID, nodes, diameter, type (PRV, PSV, FCV, TCV, GPV, PBV, PCV), setting, minor loss
[DEMANDS]Additional demand categories per junction
[EMITTERS]Per-junction emitter coefficient
[STATUS]Initial link open/closed status overrides and numeric setting overrides (pump speed, valve setting)
[PATTERNS]Multiplier sequences (multi-line continuation supported)
[CURVES]XY data points for pump head, pump efficiency, GPV headloss, PCV loss ratio, tank volume
[CONTROLS]Simple time-based, level-based, and pressure-based controls
[RULES]Rule-based controls with IF/AND/OR/THEN/ELSE/PRIORITY
[QUALITY]Per-node initial quality concentrations
[SOURCES]Quality source injection (CONCEN, MASS, FLOWPACED, SETPOINT)
[MIXING]Per-tank mixing model (MIXED, 2COMP, FIFO, LIFO)
[REACTIONS]Global and per-element bulk/wall reaction coefficients and orders
[ENERGY]Global price/efficiency and per-pump energy settings (EFFIC, PRICE, PRICEPATTERN)
[TIMES]Simulation duration, timesteps, report start, pattern start, clock offset
[OPTIONS]See OPTIONS keywords below
[REPORT]Report field selection and formatting options
[COORDINATES]Node XY positions (visual metadata, no unit conversion)
[VERTICES]Link intermediate vertices (visual metadata)
[TAGS]Node and link string tags (metadata)
[LEAKAGE]Per-pipe FAVAD leakage coefficients, added in OWA-EPANET 2.3; not present in legacy EPANET 2.2

Silently Ignored

These sections are recognised and accepted without error but produce no simulation effect. Files containing them parse cleanly.

SectionNotes
[ROUGHNESS]Legacy EPANET 1.x section, superseded by roughness column in [PIPES]
[LABELS]Map label annotations (visual only)
[BACKDROP]Background image metadata (visual only)

Unknown sections (not listed in either table) are also silently ignored for forward compatibility.


OPTIONS Keywords

All standard EPANET 2.3 [OPTIONS] keywords are supported. Unknown keywords are silently ignored.

KeywordDescription
UNITSFlow unit system (CFS, GPM, MGD, IMGD, AFD, LPS, LPM, MLD, CMH, CMD, CMS)
HEADLOSSHead-loss formula (H-W, D-W, C-M)
VISCOSITYKinematic viscosity relative to water at 20 °C
DIFFUSIVITYMolecular diffusivity relative to chlorine at 20 °C
SPECIFIC GRAVITYSpecific gravity relative to water at 4 °C
TRIALSMaximum Newton-Raphson iterations
ACCURACYRelative flow convergence tolerance
UNBALANCEDBehaviour on non-convergence (STOP or CONTINUE N)
PATTERNDefault demand pattern ID
DEMAND MULTIPLIERGlobal demand scale factor
DEMAND MODELDDA or PDA
MINIMUM PRESSUREPDA: pressure below which demand = 0
REQUIRED PRESSUREPDA: pressure at which full demand is delivered
PRESSURE EXPONENTPDA: pressure-demand exponent
EMITTER EXPONENTGlobal emitter discharge exponent
QUALITYQuality mode and constituent name/units
TOLERANCEQuality segment merge tolerance
CHECKFREQStatus-check interval (iterations)
MAXCHECKIteration limit for status checks
DAMPLIMITFlow accuracy threshold for damping activation
FLOWCHANGEMaximum per-iteration flow change limit
HEADERRORPer-link head balance error limit
HTOLHead tolerance for link status transitions
QTOLFlow change tolerance for link status transitions
RQTOLMinimum gradient clamp for emitter/pump linearisation
BACKFLOW ALLOWEDWhether emitters may admit reverse flow (YES/NO)

Pump Curves

A single-point pump curve (Q₁, H₁) is automatically expanded to a three-point power-function curve (0, 1.33334·H₁), (Q₁, H₁), (2·Q₁, 0), matching EPANET’s internal behaviour.


LEAKAGE Section

[LEAKAGE] was added in OWA-EPANET 2.3 and is not present in legacy EPANET 2.2 files. Each row specifies per-pipe FAVAD (Fixed and Variable Area Discharge) leakage coefficients:

[LEAKAGE]
;PipeID   C1       C2
P1        0.0002   0.5
P2        0.00015  0.6

Where C1 is the fixed-area discharge coefficient and C2 is the variable-area discharge coefficient. Standard EPANET files (without a [LEAKAGE] section) parse cleanly; leakage is simply zero for all pipes.


Differences from EPANET 2.3

AreaEPANET 2.3 behaviourHydra behaviour
Quality timestep minimumCan become 0 s (integer division truncation) when hydraulic step is very smallEnforced minimum of 1 s to prevent zero-length sub-steps
UNBALANCED STOPHalts the EPS on the first step that does not converge within TRIALS iterationsHalts with a warning and returns a partial result; simulation terminates at that step
GGA numerical pathSpecific convergence trajectory tied to EPANET’s C implementationIndependent GGA path: per-step hydraulic solutions are close but not byte-identical; differences can cascade into larger deviations over long quality runs or in networks with many demand periods