OpenSWMM 6 User Guide (refactored engine)#
Note
These guides cover the OpenSWMM 6 refactored engine at
openswmm.engine. If you are looking for the original EPA SWMM
5.x solver — preserved verbatim for backward compatibility — see
Legacy SWMM 5 — Compatibility Layer.
The User Guide is the canonical “how do I do X?” reference for the
modern openswmm.engine API. Every page follows the same layout:
Class signature — the constructor and how the class fits in.
Key methods — grouped by purpose (geometry, state, forcing, …).
End-to-end example — a runnable snippet covering the typical workflow.
Common recipes — short snippets for everyday tasks.
Bulk arrays — the numpy-friendly accessors (
*_bulk).EngineState requirements & exceptions — what’s legal when, and what each method raises.
Newcomers, start with Installation, Quickstart, then Concepts & engine lifecycle.
Running a simulation#
Domain access#
The “what’s the depth of node J1 right now?” surface. One page per domain.
Forcing & control#
Inject runtime inflows, override rainfall and time-series, fire control actions.
Water quality#
Pollutants, landuse, buildup/washoff, treatment.
Transport processes#
Heat transport, water age, multi-species reactions, and process-component registration.
- Heat transport (fluxes, solar, cloud, source temperature)
- Water age (
[WATER_AGE_SOURCES]) - Reactions (multi-species: species, coefficients, terms)
- Process components (
[PROCESS_COMPONENTS]) - Transport configuration and availability
- Two-zone groundwater
- Surface water quality
- Editing, forcing and live output
Outputs#
Reading the binary .out file, hot-start save / restore, mass
balance, accumulated statistics.
Specialised topics#
Build a model from scratch in Python; mutate an open model in place; configure complex hydraulic infrastructure; spatial / CRS handling.
2-D surface routing & data exchange#
Overlay a triangular mesh on the 1-D network and route the surface with a explicit finite-volume solver; persist results and observed data to a GeoPackage.