Skip to content

neeraip/hydra

Hydra

Cargo CI Library CLI GUI License: AGPL v3

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.

Inputs are EPANET 2.3 .inp files (local or via HTTP URL). Outputs are an EPANET-compatible binary .out file and a plain-text or JSON .rpt report.

→ Full documentation

Features

  • Hydraulics — GGA solver, Hazen-Williams / Darcy-Weisbach / Chezy-Manning head loss, DDA and PDA demand models, pumps, all EPANET valve types, FAVAD leakage, rule-based controls
  • Water quality — chemical constituent, water age, source tracing; Lagrangian transport; bulk and wall reactions; all EPANET tank mixing models
  • I/O — all 11 EPANET flow unit systems; .out binary, .rpt text, .json report output
  • Interfaces — desktop GUI (Windows, macOS, Linux) and a hydra CLI binary

Install

GUI

Download the installer for your platform from the releases page.

macOS — "Hydra is damaged and can't be opened"

The app is not yet code-signed. macOS Gatekeeper blocks unsigned apps downloaded from the internet. To open it, run the following in Terminal after installing:

xattr -cr /Applications/Hydra.app

Then try opening the app again. See the GUI documentation for a full usage guide.

CLI

Pre-built binary (no Rust required) — download from the releases page.

Cargo:

cargo install hydra-cli

Basic usage:

hydra network.inp                                         # report to stdout
hydra network.inp report.rpt output.out                   # write report + binary output
hydra https://example.com/network.inp --report report.json  # HTTP input, JSON report

See crates/cli/README.md for the full option reference.

SDK (Rust library)

[dependencies]
hydra-sdk = "1"
use hydra_sdk::{io, Simulation, NodeQuantity};

let network = io::parse(&std::fs::read("network.inp")?)?;
let mut sim = Simulation::create();
sim.load(network)?;
sim.run()?;

See the SDK documentation for a full usage guide.

Build from source

Prerequisites: Rust ≥ 1.95, just.
GUI only: Node.js 22, pnpm 10, Tauri CLI.

git clone https://github.com/neeraip/hydra.git
cd hydra
just build
just test

See CONTRIBUTING.md for the full development setup.

Documentation

Getting Started Installation, build, CLI, GUI
SDK Library usage and examples
Architecture Crate layout and specifications
Reference INP format, performance, EPANET migration

Contributing

Contributions are welcome. Please read CONTRIBUTING.md before opening a pull request, in particular the Spec First workflow, which requires spec changes to land before implementation changes for any solver, model, or analytics work.

License

AGPL v3: free to use and modify. Commercial products built on Hydra must either release their source under AGPL v3 or obtain a separate commercial license. See COMMERCIAL_LICENSE.md for details.

About

A modern Rust engine for water distribution network simulation, delivering physically rigorous hydraulics and water quality analysis with clean architecture, improved performance, and EPANET-compatible workflows.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors