OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
Chapter 1: Choosing a Formulation

OpenSWMM offers more than one representation of nearly every process it models. This chapter is the map: six decision workflows that take a modelling question and end at the literal [OPTIONS] lines that answer it, and a closing table that names, for every formulation, the keys that select it, its status, the theory that describes it and the worked example that uses it.

The workflows are drawn as flowcharts you can pan, zoom and click: a terminal node opens the chapter that documents the formulation it names. Nothing here decides for you — each branch states the question a modeller has to answer about their own system, and the cost of the answer.

One principle runs through all six. A default is not a recommendation; it is the choice that reproduces earlier behaviour. FLOW_ROUTING DYNWAVE, SURCHARGE_METHOD EXTRAN, QUALITY_SOLVER LEGACY and MOMENTUM_EQUATION LOCAL_INERTIAL are all defaults because changing them would change existing models' answers, not because they are the best available representation of every system. A model that never sets a key is choosing the legacy formulation.

1.1 Which flow router

The router decides what the momentum equation keeps. Steady flow keeps nothing and translates hydrographs; kinematic wave keeps the friction balance and cannot propagate a backwater; dynamic wave keeps the full one-dimensional momentum equation between nodes; the finite-volume router discretises the conduit itself and resolves the profile inside it.

graph TD
    A[How is the conveyance system driven] --> B{Backwater, surcharge or pressurisation anywhere in the network}
    B -- no --> C{Is in-pipe attenuation part of the answer}
    C -- no --> D[FLOW_ROUTING STEADY]
    C -- yes --> E[FLOW_ROUTING KINWAVE]
    B -- yes --> F{Do you need the profile inside the conduit: bores, hydraulic jumps, mixed flow}
    F -- no --> G[FLOW_ROUTING DYNWAVE]
    F -- yes --> H[FLOW_ROUTING FV with FV_CELL_LENGTH and FV_MIN_CELLS]
    G --> I{Does the network surcharge against its crowns}
    I -- yes --> J[Choose a pressurisation closure: section 1.2]
    H --> J

Figure 1-1 Choosing a flow router

The cost ladder is real. Steady flow is free, kinematic wave is cheap, dynamic wave costs an iteration per node per step, and the finite-volume router costs a substep bounded by the Courant condition on the shortest cell. Chapter 2: a filling pipe under both routers runs the same filling pipe through the last two and shows what the extra cost buys.

1.2 Which pressurisation closure

A pipe that fills has no free surface, and the shallow-water equations need one. Every closure invents a narrow slot above the crown so the equations keep their form; they differ in what the slot remembers and whether the pressure may go negative.

graph TD
    A[Pipes pressurise] --> B{Which router}
    B -- dynamic wave --> C{Is sub-atmospheric pressure part of the question}
    C -- no --> D[SURCHARGE_METHOD EXTRAN or SLOT]
    C -- yes --> E[SURCHARGE_METHOD TPA with TPA_CELERITY]
    B -- finite volume --> F{Is sub-atmospheric pressure part of the question}
    F -- no --> G[FV_PRESSURE_CLOSURE SLOT with FV_SLOT_CELERITY]
    F -- yes --> H[FV_PRESSURE_CLOSURE TPA]
    D --> I{Is the surge history itself the answer}
    I -- yes --> K[SURCHARGE_METHOD DYNAMIC_SLOT with the DPS keys]
    G --> L[Check the slot's share of stored volume in the report]
    H --> M[Experimental: read section 8.4.5 before trusting a number]

Figure 1-2 Choosing a pressurisation closure

A slot celerity is an accuracy-cost trade, not a physical constant: the explicit step is bounded by the celerity, so asking for the acoustic speed of water collapses the step size. The default of 100 ft/s is the order the dynamic wave solver's own slot produces. Chapter 3: a sub-atmospheric transient runs a siphon where the two closures disagree about the sign of the pressure.

1.3 Do you need the two-dimensional surface

A one-dimensional model reports water leaving a node as flooding and loses sight of it. A mesh keeps it: where it goes, how deep it gets and when it comes back. That is a different question from how much left, and it costs a mesh, a solver and a coupling.

graph TD
    A[Does water leave the network and spread over the surface] --> B{Is where it goes part of the answer}
    B -- no --> C[Stay one-dimensional: flooding is reported per node]
    B -- yes --> D{What drives the mesh}
    D -- rain on the grid --> E[RAINFALL_MODE NATURAL_NEIGHBOUR with 2D_INFILTRATION rows]
    D -- spill from the network --> F[2D_VERTEX_NODE_MAP or 2D_TRIANGLE_NODE_MAP]
    D -- both --> G[Both, with subcatchment coverage ownership checked]
    E --> H{Which momentum closure}
    F --> H
    G --> H
    H -- shallow and friction dominated --> I[MOMENTUM_EQUATION LOCAL_INERTIAL]
    H -- transcritical flow or shocks --> J[MOMENTUM_EQUATION FULL_SWE]
    H -- very flat and slow --> K[MOMENTUM_EQUATION DIFFUSIVE_WAVE]

Figure 1-3 Deciding whether to add the two-dimensional surface, and how to drive it

Chapter 6: building a coupled 1D-2D model builds a coupled model from an existing network; Chapter 7: rain, infiltration and groundwater on the mesh drives one with rain rather than spill. The GUI tutorials T3 — From a DTM to an Animated 2D Inundation Map and T4 — Capped Street Inlets Coupled to a 2D Surface walk the same ground with a mouse.

1.4 Which transport engine

All three engines solve the same advection-reaction-dispersion problem and share the same loads, the same reactions and the same mass-balance ledger. They differ in how they represent a front.

graph TD
    A[Are constituents carried] --> B{What has to be right}
    B -- totals at the outfall only --> C[QUALITY_SOLVER LEGACY]
    B -- the shape of a front --> D{Sharp front or long chain of storages}
    D -- a sharp front, plug flow --> E[QUALITY_SOLVER LAGRANGIAN with MAX_SEGMENTS_PER_LINK]
    D -- dispersion is the mechanism --> F[QUALITY_SOLVER EULERIAN_ARD with TARGET_DX]
    F --> G[DISPERSION FISCHER, or a measured VALUE]
    E --> H[DISPERSION RWPT with RWPT_SEED for a reproducible draw]
    C --> I[Every engine shares the same loads, reactions and ledger]

Figure 1-4 Choosing a transport engine

Refining the Eulerian mesh is quadratic: halving TARGET_DX doubles both the cell count and the substep count. Chapter 8: the three transport engines puts a tracer pulse through all three.

1.5 Age, heat and multi-species reactions

These three ride on the transport engine rather than replacing it. Each is a separate process component with its own configuration file, and each adds its own reserved species row.

graph TD
    A[Beyond pollutant concentrations] --> B{Which question}
    B -- how long has this water been in the system --> C[WATER_AGE ON with a WATER_AGE_SOURCES section]
    B -- what temperature is it --> D[HEAT_TRANSPORT ON with a heat configuration file]
    B -- species that react with each other --> E[PROCESS_COMPONENTS reactions with a reaction file]
    D --> F[TEMPERATURE with HUMIDITY, WIND and the radiative sections]
    E --> G{Do the reactions depend on temperature}
    G -- yes --> D
    C --> H[The age row is carried by whichever transport engine is selected]

Figure 1-5 Water age, heat and reacting species

Chapter 9: multi-species reactions and Chapter 10: water age and heat configure all three on one deck.

1.6 Which groundwater representation

The lumped two-zone aquifer belongs to a subcatchment and exchanges with one node. The mesh aquifer belongs to the cells and exchanges with every node standing in them. They are different models of the same water, and only one of them can own a given parcel of ground.

graph TD
    A[Is subsurface exchange part of the question] --> B{Lumped or spatially explicit}
    B -- one store per subcatchment --> C[AQUIFERS with GROUNDWATER rows]
    B -- a store per mesh cell --> D[2D_AQUIFER_OPTIONS with 2D_AQUIFER rows]
    C --> E{Do you need your own flow equation}
    E -- yes --> F[A GWF section on the subcatchment]
    D --> G{How thick is the unsaturated column in capillary lengths}
    G -- thin or unknown --> H[CLOSURE AUTO chooses at initialisation]
    G -- deep, with profile memory --> I[CLOSURE SIGMA integrates the column]
    D --> J{Where does mesh infiltration go}
    J -- to this aquifer --> K[INFIL_DESTINATION AQUIFER_2D]

Figure 1-6 Choosing a groundwater representation

The mesh aquifer's non-Gardner soil laws are Experimental: their equilibrium is right and their relaxation rate is the engine's own generalisation rather than a published result. Chapter 7: rain, infiltration and groundwater on the mesh runs one.

1.7 The formulations, their keys and where they are documented

Formulation Selected by Status Theory Worked example
Steady flow routing FLOW_ROUTING STEADY Implemented Chapter 2: SWMM's Hydraulic Model —
Kinematic wave FLOW_ROUTING KINWAVE Implemented Chapter 4: Kinematic Wave Analysis —
Dynamic wave FLOW_ROUTING DYNWAVE Implemented Chapter 3: Dynamic Wave Analysis Chapter 2: a filling pipe under both routers
Explicit finite volume FLOW_ROUTING FV Implemented Chapter 8: Explicit Finite-Volume Analysis Chapter 2: a filling pipe under both routers
Local time stepping FV_LTS Implemented Chapter 8: Explicit Finite-Volume Analysis Chapter 4: virtual junctions on a surveyed trunk
Semi-implicit node continuity NODE_CONTINUITY SEMI_IMPLICIT Implemented Chapter 3: Dynamic Wave Analysis —
Anderson acceleration ANDERSON_ACCEL Implemented 3.6 Anderson Acceleration of the Iterative Solution —
EXTRAN surcharge SURCHARGE_METHOD EXTRAN Implemented Chapter 3: Dynamic Wave Analysis Chapter 2: a filling pipe under both routers
Static Preissmann slot SURCHARGE_METHOD SLOT Implemented Chapter 3: Dynamic Wave Analysis Chapter 2: a filling pipe under both routers
Dynamic Preissmann slot SURCHARGE_METHOD DYNAMIC_SLOT Implemented Chapter 3: Dynamic Wave Analysis —
Two-component pressure, dynamic wave SURCHARGE_METHOD TPA Experimental Chapter 3: Dynamic Wave Analysis Chapter 3: a sub-atmospheric transient
Two-component pressure, finite volume FV_PRESSURE_CLOSURE TPA Experimental Chapter 8: Explicit Finite-Volume Analysis Chapter 3: a sub-atmospheric transient
Unsteady friction UNSTEADY_FRICTION VITKOVSKY Implemented Chapter 3: Dynamic Wave Analysis Chapter 3: a sub-atmospheric transient
Virtual junctions [VIRTUAL_JUNCTIONS] Implemented Chapter 3: Dynamic Wave Analysis Chapter 4: virtual junctions on a surveyed trunk
Inlet junctions [INLET_JUNCTIONS] Implemented Chapter 7: Advanced Features Chapter 5: street inlets and inlet junctions
HEC-22 street inlets [STREETS], [INLETS], [INLET_USAGE] Implemented Chapter 7: Advanced Features Chapter 5: street inlets and inlet junctions
2D local inertial MOMENTUM_EQUATION LOCAL_INERTIAL Implemented Chapter 9: Two-Dimensional Overland Flow Analysis Chapter 6: building a coupled 1D-2D model
2D full shallow water MOMENTUM_EQUATION FULL_SWE Implemented Chapter 9: Two-Dimensional Overland Flow Analysis Chapter 6: building a coupled 1D-2D model
2D diffusive wave MOMENTUM_EQUATION DIFFUSIVE_WAVE Implemented Chapter 9: Two-Dimensional Overland Flow Analysis Chapter 6: building a coupled 1D-2D model
Rain on the mesh RAINFALL_MODE Implemented Chapter 8: Distributed Surface Processes on the 2D Mesh Chapter 7: rain, infiltration and groundwater on the mesh
Per-cell infiltration [2D_INFILTRATION] Implemented Chapter 8: Distributed Surface Processes on the 2D Mesh Chapter 7: rain, infiltration and groundwater on the mesh
Two-zone aquifer [AQUIFERS], [GROUNDWATER] Implemented Chapter 5: Groundwater Chapter 11: long-term hydrology
Mesh two-layer aquifer [2D_AQUIFER] Implemented Chapter 9: Spatially Explicit Groundwater on the 2D Mesh Chapter 7: rain, infiltration and groundwater on the mesh
Non-Gardner soil laws SOIL_CHAR Experimental Chapter 9: Spatially Explicit Groundwater on the 2D Mesh Chapter 7: rain, infiltration and groundwater on the mesh
Modified Green-Ampt INFILTRATION MODIFIED_GREEN_AMPT Implemented Chapter 4: Infiltration Chapter 11: long-term hydrology
RDII with decay [RDII_DECAY] Implemented Chapter 7: Rainfall Dependent Inflow and Infiltration Chapter 11: long-term hydrology
Legacy quality routing QUALITY_SOLVER LEGACY Implemented Chapter 5: Transport and Treatment Chapter 8: the three transport engines
Eulerian transport QUALITY_SOLVER EULERIAN_ARD Implemented Chapter 7: Advection–Reaction–Dispersion Transport Chapter 8: the three transport engines
Lagrangian transport QUALITY_SOLVER LAGRANGIAN Implemented Chapter 7: Advection–Reaction–Dispersion Transport Chapter 8: the three transport engines
Multi-species reactions [PROCESS_COMPONENTS] reactions Implemented Chapter 8: Multi-Species Reactions Chapter 9: multi-species reactions
Water age WATER_AGE ON Implemented Chapter 9: Water Age and Heat Transport Chapter 10: water age and heat
Heat transport HEAT_TRANSPORT ON Implemented Chapter 9: Water Age and Heat Transport Chapter 10: water age and heat
2D surface quality [2D_COVERAGES], [2D_LOADINGS] Implemented Chapter 10: Surface Quality and Transport on the 2D Mesh —
Groundwater transport [GW_*] sections Planned Chapter 10: Planned Formulations —
Sediment transport — Planned Chapter 11: Planned Formulations —
LID as storage nodes — Planned Chapter 10: Planned Formulations —
Chebyshev cross-sections — Planned Chapter 10: Planned and Retired Formulations —
1D GPU backend FV_BACKEND Planned Chapter 10: Planned and Retired Formulations —
2D Metal backend BACKEND Planned Chapter 10: Planned and Retired Formulations —

Table 1-1 Every formulation, the keys that select it, and where it is documented

Grammar for every key named here is in Chapter 2 of the Engine Manual; the GUI's own controls are in 18 — Simulation Options.