You can import your existing EPANET models into epanet-js using the standard INP file format. This lets you view, edit, and run simulations right in your browser - no extra software needed. Just keep in mind that not all EPANET features are supported yet. We’re actively improving the importer and aiming for full compatibility over time.

Key requirements & limitations

  1. Steady-state simulations only:

    Currently, epanet-js primarily supports steady-state hydraulic simulations. This means that while many elements of your INP file will be imported, features related to Extended Period Simulation (EPS) or water quality modeling are generally not supported for simulation purposes.

  2. Nodes must have coordinates:

    All nodes (junctions, reservoirs, tanks) defined in your INP file must have corresponding entries in the [COORDINATES] section to be properly imported and visualized. If coordinates are missing for some nodes, you will receive a warning, and those nodes will not be included in the imported model.

  3. WGS84 projection (latitude/longitude) required:

    For epanet-js to correctly display your network on the map, all geographic coordinates in your INP file (for junctions, reservoirs, tanks, and pipe vertices) must be in the WGS84 (EPSG:4326) geographic coordinate system (latitude and longitude).

<aside> <img src="/icons/globe_blue.svg" alt="/icons/globe_blue.svg" width="40px" />

EPANET Projection Converter Utility

You can convert your INP file to the WGS84 system using our EPANET Projection Converter utility: https://utils.epanetjs.com/projection-converter

</aside>

Import issues & warnings

When you import an INP file, epanet-js checks its contents. If it finds sections that aren't supported, options that differ from the default settings, or features related to EPS or water quality, it will list them as issues.

image.png

When you save the model, epanet-js will ask you to save a copy so your original file stays unchanged.

image.png

Tips for a successful import

  1. Use WGS84 coordinates: Make sure your model uses WGS84 (latitude/longitude) for all node and pipe coordinates. You can convert them using the EPANET Projection Converter.
  2. Check for missing coordinates: Each node (junction, tank, reservoir) needs coordinate data to be imported and shown on the map. Double-check that this info is included.
  3. Look over any issues: After import, epanet-js will list any issues or warnings. Reviewing them helps you understand what parts of the model might not carry over fully.
  4. Simplify for steady-state: epanet-js currently only supports steady-state simulations. We’ll try to simulate the network using the initial conditions in your INP file, but you might want to adjust the model to reflect a specific point in time, like peak hour.

We're always working to improve INP file support and add more features. You can follow progress in our changelog.

INP section support details

Here's a breakdown of how epanet-js currently handles different sections commonly found in an EPANET INP file:

Section Support Level Details & Limitations
Nodes & Links
[JUNCTIONS] Fully supported Imports ID, elevation, and base demand. Demand patterns are partially supported (see [PATTERNS]). Requires WGS84 coordinates.
[RESERVOIRS] Fully supported Imports ID and head. Head patterns are partially supported (see [PATTERNS]). Requires WGS84 coordinates.
[TANKS] Partially supported Tanks are imported and treated as reservoirs, with their head set to Elevation + InitialLevel. Full tank dynamics for EPS (min/max levels, diameter, volume curve) are not used. An issue will be flagged.
[PIPES] Partially supported Imports ID, start/end nodes, length, diameter, roughness, minor loss, and initial status (Open/Closed). Requires WGS84 coordinates for vertices. CV status is not supported.
[PUMPS] Partially supported Imports ID, start/end nodes. Supports POWER or HEAD (curve ID) definitions. SPEED and PATTERN (for speed) are supported for initial state. Multi-point head curves are simplified to a single design point (using the middle point); an issue will be flagged if the curve has multiple points.
[VALVES] Partially supported Imports ID, start/end nodes, diameter, type, setting, minor loss. supported types include FCV, PRV, PSV, PBV, TCV. GPV valves are converted to TCVs, and a warning is issued.
Operational Data
[DEMANDS] Partially supported Allows defining multiple demand categories per junction but are merged into one base demand. Demand patterns are partially supported (see [PATTERNS]).
[STATUS] Partially supported Imports initial status (Open/Closed/Setting) for pipes, pumps, and valves, overriding default or component-defined statuses for the steady-state simulation. CV status is not supported for pipes.
[PATTERNS] Partially supported Time patterns are parsed, but for steady-state simulations, only the first multiplier value in each pattern is used to calculate demands, reservoir heads, or pump speeds.
[CURVES] Partially supported Pump curves are partially supported. Multi-point curves are simplified to a single design point (By taking the middle point of the curve). An issue is flagged if a multi-point curve is used by a pump. Volume curves for tanks are not used.
Options & Settings
[OPTIONS] Partially supported UNITS (flow units) and HEADLOSS formula (H-W, D-W, C-M) are Fully supported. QUALITY settings are ignored as water quality is not simulated. Non-default hydraulic options (e.g., SPECIFIC GRAVITY, VISCOSITY, TRIALS, ACCURACY, UNBALANCED if different from epanet-js defaults will be flagged as issues.
[TIMES] Partially supported Settings like DURATION, HYDRAULIC TIMESTEP, PATTERN START, etc., are primarily indicators of an EPS model. If DURATION is not zero, an "Extended Period Simulation" issue is flagged. These settings do not influence the steady-state simulation performed by epanet-js.
Geographic Data
[COORDINATES] Fully supported WGS84 (latitude/longitude) coordinates are required. Nodes without valid WGS84 coordinates will cause warnings and will be omitted.
[VERTICES] Fully supported WGS84 (latitude/longitude) coordinates are required for pipe/link vertices. Vertices with invalid coordinates will cause warnings and will be omitted, affecting link shapes.
Ignored Sections
[TITLE] Ignored This section is not currently used.
[BACKDROP] Ignored Backdrop image information is not used.
[REPORT] Ignored Report formatting and status reporting options are not used.
Unsupported Sections
[QUALITY] Not supported Water quality parameters are not imported or simulated. An issue will be flagged.
[REACTIONS] Not supported Chemical reaction parameters are not imported or simulated. An issue will be flagged.
[SOURCES] Not supported Water quality source inputs are not imported or simulated. An issue will be flagged.
[MIXING] Not supported Tank mixing models are not supported. An issue will be flagged.
[CONTROLS] Not supported Simple and rule-based controls are not imported or applied. An issue will be flagged.
[RULES] Not supported Rule-based controls are not imported or applied. An issue will be flagged.
[ENERGY] Not supported Energy analysis data and pump efficiency curves (beyond the head curve simplification) are not supported. An issue will be flagged.
[EMITTERS] Not supported Emitters at junctions are not currently supported. An issue will be flagged.
[LABELS] Not supported Map labels and their coordinates are not imported. An issue will be flagged.