A rigorous deconstruction of every inherited assumption, convention, and sacred cow baked into how we implement 1D unsteady flow. We separate what physics demands from what engineering tradition chose, then rebuild from bedrock truths alone.
SWMM5 solves a discretized version of the 1D Saint-Venant equations over a node-link network representing stormwater and sewer infrastructure. The two governing PDEs are:
SWMM5 then makes a cascade of implementation choices. Each one feels inevitable. Most aren't.
Every assumption below is widely treated as self-evident. We tag each: Fundamental (physics demands it at this scale), Partial (partially justified, partially convention), or Arbitrary (engineering choice, not physics).
Flow varies only along the pipe/conduit axis. Velocity is a scalar function of one spatial coordinate and time: v = v(x, t). Cross-sectional quantities (area, depth) are treated as single-valued.
Real flow is 3D Navier-Stokes. The 1D reduction is justified when:
Where it breaks: junctions, transitions, inlet structures, surcharging, storage nodes, any location where 3D flow structure dominates. These are precisely the places SWMM5 uses "node" abstractions to punt on the problem.
1D is partially fundamental — the aspect ratio of pipes genuinely justifies reduction from 3D. But the specific way SWMM5 collapses cross-sections into a single area-depth curve, and the specific way it handles junctions as zero-volume "nodes," are engineering conventions, not physics. A 1.5D or quasi-2D approach at junctions would be more honest.
Pressure at any depth equals ρgh. Vertical acceleration of water is neglected. The pressure term in momentum reduces to gA ∂h/∂x.
This follows from the Froude number being small in the vertical direction — vertical accelerations (including free-surface curvature) are negligible compared to gravity when:
Where it breaks: hydraulic jumps, sharp transitions, plunging flow at drop structures, wave breaking. These are all situations where the 1D model is already suspect.
Genuinely fundamental at the scales SWMM5 operates. The vertical Froude number in pipes and open channels is almost always ≪ 1. This isn't convention — it's a provable consequence of the geometry. Don't waste time questioning this one.
Friction slope is computed via Manning's equation:
The only thing physics demands is that friction dissipates energy. The actual turbulent boundary layer creates a shear stress τ_w on the wetted perimeter. The energy slope is:
Manning's equation is one of several empirical correlations. It assumes:
Alternatives that are equally (or more) physically grounded:
Purely arbitrary. Manning's n is a 19th-century empirical fit. It works well in the range it was calibrated for (full-pipe turbulent flow in rough conduits). But it's not fundamental — it's a curve fit with a specific functional form that happens to be convenient. The Darcy-Weisbach formulation is more physically transparent and connects to fluid mechanics fundamentals. SWMM5's choice of Manning is tradition, not truth.
SWMM5 offers three wave formulations. Most users select kinematic wave (the default), which drops most of the momentum equation:
The momentum equation has four terms. Each represents a physical force balance:
Dropping terms is justified when their ratio to the dominant terms is small. The relevant dimensionless numbers:
The kinematic wave is valid only when: steep slopes, long reaches, no downstream control, no backwater. For flat-gradient sewers (common!), it's wrong.
Arbitrary and often wrong. The kinematic wave is the default because it's numerically stable and fast, not because it's correct. For the majority of urban drainage systems with flat slopes, backwater effects from downstream controls (outfalls, weirs, pumps) dominate. Using kinematic wave in these systems isn't simplification — it's error. The full dynamic wave should be the default; kinematic should be the opt-in for steep, long reaches.
When a closed conduit is full, SWMM5 inserts a narrow hypothetical slot (Preissmann slot) on top of the cross-section to maintain a free-surface representation:
This avoids a discontinuity in the governing equations at the transition between open-channel and pressurized flow.
Physics doesn't care about equation continuity. When a pipe is full:
The Preissmann slot artificially slows these pressure waves to the speed of the "slot wave" (~10–50 m/s), which is orders of magnitude slower than real pressure transients.
Arbitrary numerical convenience. It works adequately for slowly-varying surcharge conditions. But it fundamentally cannot capture water hammer, rapid filling events, or the true transient pressure dynamics that damage infrastructure. Alternative approaches (characteristic method, shock-capturing schemes, or explicit free-surface/pressurized switching) are more physically honest but harder to implement. The slot is a pragmatic hack, not a physical model.
The drainage system is represented as a graph: nodes (junctions, storage units, outfalls) connected by links (conduits, pumps, orifices, weirs). Mass is conserved at nodes; momentum is solved along links.
Real junctions have finite volume, 3D flow patterns, energy losses, and flow separation. The node-link abstraction:
Arbitrary graph abstraction. The real system is a connected volume, not a graph. The node-link split forces mass conservation into nodes and momentum conservation into links, creating artificial boundaries where physics demands continuity. A finite-volume approach that treats the entire network as interconnected control volumes would be more physically natural. The node-link convention persists because it maps to CAD/GIS workflows and makes input data manageable — not because it reflects hydraulic reality.
Each conduit is divided into N computational reaches. Derivatives are replaced by finite differences:
The PDE is continuous. Any discretization is an approximation. Alternatives:
Arbitrary numerical method choice. Finite difference is the simplest to implement and understand, which is why SWMM5 uses it. Finite volume would be more physically honest (it enforces conservation laws at the discrete level by construction, not by hoping the discretization is fine enough). The choice affects accuracy, stability, and conservation properties — but not the underlying physics being approximated.
SWMM5 uses a weighted implicit scheme where spatial derivatives are evaluated at time level n+θ:
Time integration is a numerical artifact. Physics is continuous in time. The choice of scheme affects:
Partially fundamental. The need to discretize in time is fundamental (we can't solve continuous PDEs on computers). But the specific scheme, weighting parameter, and time step are all trade-offs between accuracy, stability, and cost. The implicit choice is justified by the Courant number variability in sewer networks (reaches of different lengths, depths, velocities). But it introduces numerical diffusion that can smear flood peaks — a real physical error, not just a numerical artifact.
Water density ρ is constant. The continuity equation uses ∂A/∂t + ∂Q/∂x = 0, not the compressible form with ∂ρ/∂t.
The Mach number in stormwater systems:
Exception: during water hammer (rapid valve closure), pressure waves propagate at the true sound speed, and compressibility matters. But SWMM5 can't handle this anyway (see Preissmann slot).
Genuinely fundamental at normal operating conditions. Mach numbers are ≪ 0.1. Compressibility is irrelevant except during transient events that the model can't capture regardless. Don't question this one.
Q = VA, where V is a single velocity value. The actual velocity profile (parabolic in laminar, logarithmic/power-law in turbulent) is collapsed to one number via the "energy coefficient" or "Boussinesq coefficient":
The velocity profile is determined by the balance of turbulent shear stress, wall roughness, and pressure gradient. It's never truly uniform. But:
Partially justified. The correction factors are small for fully-developed turbulent pipe flow, so α = β = 1 is a reasonable approximation. But the assumption silently fails at every junction, transition, and partially-filled section — precisely where the node-link abstraction already struggles. The error is small in magnitude but systematic (it underestimates momentum flux).
Conduit geometry is fixed. Roughness coefficients are constant. The bed doesn't erode, deposit, or change shape. Sediment transport is ignored or handled externally.
Flow exerts shear stress on the bed. When τ > τ_critical, sediment moves. This changes:
For many systems (combined sewers, channels with significant sediment), this is a first-order effect on long-term performance.
Arbitrary scope limitation. SWMM5 is a hydraulic model, not a morphodynamic model. This is a legitimate engineering scope choice. But it means the model can't answer "how does system capacity change over decades?" — a question that matters for asset management. Coupling with sediment transport models is possible but not built-in.
Friction is computed using the steady-flow Manning/Darcy-Weisbach formula at each time step, as if the flow were steady. The instantaneous Q and A go into the friction formula.
In unsteady flow, the velocity profile lags behind the bulk flow. The actual friction includes:
The unsteady friction correction can be 5–20% of total friction during rapid transients.
Arbitrary simplification. For slowly-varying hydrographs (typical storm events), quasi-steady friction is adequate. For rapid transients (pump start/stop, valve closure, rapid filling), it introduces systematic error. Models like Brunone or Vardy-Brown unsteady friction models exist but add significant computational cost.
After stripping away every convention, here is what is provably, physically, mathematically true about 1D unsteady flow in conduits:
For any fixed volume V in the system: rate of mass in − rate of mass out = rate of mass accumulation. This is Newtonian physics. No exceptions at these scales. The integral form ∮ ρv·dA + ∂/∂t ∫ρ dV = 0 is exact.
For a fluid control volume: d(momentum)/dt = Σ forces. Forces include: gravity (body force), pressure on all surfaces (including walls), and wall shear stress. This is exact. The challenge is representing each force term accurately in 1D.
The gravitational body force on a fluid element is ρgV, directed vertically downward. In the momentum equation, this projects onto the conduit axis as ρgA·S_0 (bed slope component). Exact.
Proven: vertical Froude number ≪ 1 for all practical pipe/channel flows. Pressure at depth h below the surface = ρgh. This reduces the pressure force to gA·(∂h/∂x). This is not an approximation — it's a provable consequence of the geometry.
τ_w exists on every wetted surface. The energy dissipation rate = τ_w · V · P · L (shear × velocity × perimeter × length). The force on the fluid is τ_w · P · L directed opposite to flow. This is exact. The only question is how to model τ_w as a function of flow state.
Any conduit has a shape. Given water depth h, the area A and wetted perimeter P are deterministic functions. The top width T = dA/dh. These are geometric facts, not physical assumptions.
Total mechanical energy + dissipated energy = input energy. In practice, this manifests as the energy grade line (EGL) declining in the flow direction at rate S_f. The EGL equation H = z + h + αV²/2g is a statement of energy conservation.
Starting from only the seven truths above, here is the minimal viable model and its invariants.
Mass conservation is exact at the discrete level. Total water volume in system = initial volume + ∫(inflow − outflow) dt. This must hold to machine precision, not just approximately.
Energy dissipation is non-negative. S_f must have the same sign as Q (friction always opposes flow). The model must never create energy from friction.
Monotonicity of area-depth. dA/dh = T ≥ 0 (more depth = more area). The cross-section geometry must be physically realizable.
Causality. Information propagates at finite speed (≤ celerity of gravity waves √(gD) or pressure waves √(K/ρ)). No instantaneous action at a distance.
Positivity. A ≥ 0, h ≥ 0. Negative depths are unphysical. The numerics must enforce this.
Galilean consistency. Adding a uniform velocity to the entire system should not change the relative dynamics. The equations are frame-invariant.
No model avoids trade-offs. But we can be honest about what we're trading:
| Trade-Off | Option A | Option B | What Determines the Choice |
|---|---|---|---|
| Dimensionality | 1D (fast, scalable) | 2D/3D (accurate at junctions) | Aspect ratio of conduits; junction complexity |
| Friction model | Algebraic (Manning, D-W) | History-dependent (unsteady friction) | Rate of flow change; accuracy needs |
| Time stepping | Implicit (large Δt, stable) | Explicit (small Δt, accurate transients) | Courant number variation; transient importance |
| Spatial discretization | Structured (simple, fast) | Adaptive (accurate where needed) | Flow regime gradients; computational budget |
| Pressurization | Smooth transition (slot) | Sharp interface (front-tracking) | Importance of transient pressure; water hammer risk |
If we could design the ideal computational framework from scratch, ignoring all legacy code:
| Aspect | SWMM5 / Conventional | Rebuilt from First Principles |
|---|---|---|
| Network representation | Node-link graph. Junctions = dimensionless points. Mass balance at nodes, momentum in links. | Control volume mesh. Junctions = explicit volumes with loss physics. No artificial mass/momentum split. |
| Default wave type | Kinematic wave (user must opt-in to dynamic). Backwater effects require explicit choice. | Full dynamic wave everywhere. Automatic reduction to diffusion/kinematic where physics allows. |
| Friction | Manning's n (empirical, Re-independent, constant-n assumption). | Darcy-Weisbach with Moody. Re-dependent. Composite roughness for irregular sections. |
| Pressurization | Preissmann slot (artificial narrow slot, slows pressure waves by 100×). | Explicit free-surface/pressurized interface. True acoustic wave speed. Water hammer capable. |
| Discretization | Finite difference. User specifies number of reaches per conduit. | Finite volume with Riemann solver. Adaptive refinement. Conservation by construction. |
| Time integration | Weighted implicit (θ ≈ 0.55). Fixed time step. Numerical diffusion at high Courant numbers. | Adaptive explicit/implicit hybrid. CFL-limited Δt. TVD limiting for sharp fronts. |
| Junction losses | User-specified K coefficients (often guessed or defaulted to 0). | Physics-based loss models from junction geometry. Borda-Carnot, expansion/contraction, bend losses computed from geometry. |
| Cross-section | Pre-defined shapes (circular, rectangular, trapezoidal, etc.) with lookup tables. | Arbitrary polygonal cross-sections. Moment-based properties. Composite roughness per segment. |
| Conservation | Approximate. Mass errors can accumulate. Momentum conservation not guaranteed at discretization level. | Exact at machine precision. Finite volume guarantees discrete conservation. |
User selection of wave type. The solver should determine when kinematic/diffusion approximations are valid based on local flow conditions (Fr, k). Users shouldn't have to know about wave types.
Preissmann slot. Replaced by explicit interface tracking. The slot was always a hack; removing it unlocks real transient analysis.
Manual reach discretization. Users specify "number of computational reaches" per conduit — a numerical parameter masquerading as a physical one. Adaptive refinement makes this automatic.
Manning's n. Still usable as a convenience input (auto-converted to equivalent Darcy-Weisbach f), but no longer the primary friction parameter. D-W is the native format.
Junction K-loss coefficients. Still overridable, but the default is computed from junction geometry. Most users currently guess these anyway.
The node-link mental model. Replaced by the control-volume mesh. This changes how users conceptualize their system — from a "plumbing diagram" to a "connected volume field."
With explicit pressure-wave propagation (true c ≈ 1400 m/s), the rebuilt model can answer:
Currently, these questions require a separate model (e.g., HAMMER, Wanda). The rebuilt architecture handles them natively.
Instead of the user choosing kinematic/diffusion/dynamic, the solver monitors:
and automatically uses the minimum-fidelity solver that maintains accuracy. Steep, long reach with Fr >> 1? Kinematic wave. Flat reach with downstream weir? Full dynamic. This gives the speed of kinematic with the accuracy of dynamic, without user intervention.
Finite volume discretization means mass is conserved to machine precision regardless of grid resolution, time step, or flow regime. No more mysterious "mass balance errors" in SWMM5 reports. This is critical for:
Junctions modeled as explicit control volumes with:
All computed from geometry. Users input the physical junction shape, not a guessed K.
Real channels are rarely one material. A natural channel might have:
The rebuilt model computes A, P, and effective roughness per segment, then combines using Einstein's divided-channel method or Lotter's method — not a single averaged n.
One solver handles the full spectrum:
No mode switching, no separate models, no slot hacks. The same equations, with the same conservation guarantees, across all regimes.
| Assumption | Status | Why |
|---|---|---|
| 1D flow | Keep (modified) | Aspect ratio justifies it in conduits. Add quasi-2D at junctions. |
| Hydrostatic pressure | Keep | Vertically proven at these scales. Fundamental. |
| Manning's friction | Replace | Arbitrary empirical form. D-W is more physically transparent. |
| Kinematic wave default | Replace | Wrong for flat slopes. Auto-detect instead of user choice. |
| Preissmann slot | Replace | Numerical hack. Explicit interface tracking is more honest. |
| Node-link topology | Replace | Arbitrary graph abstraction. CV mesh is more physical. |
| Finite difference | Replace | Doesn't guarantee conservation. Finite volume does. |
| Implicit time stepping | Modify | Keep implicit capability, add adaptive explicit for transients. |
| Incompressible flow | Keep | Mach ≈ 0.003. Error < 0.001%. Fundamental. |
| Uniform velocity | Keep (modified) | α, β corrections small for pipe flow. Add at junctions. |
| Rigid boundaries | Scope choice | Legitimate for hydraulics. Add coupling for morphodynamics. |
| Quasi-steady friction | Modify | Fine for storms. Add unsteady correction for transients. |
Of 12 inherited assumptions: 3 are genuinely fundamental (hydrostatic pressure, incompressibility, 1D reduction at conduit scale). 3 are partially justified (implicit time stepping, uniform velocity, quasi-steady friction). 6 are arbitrary conventions that persist because of legacy code, pedagogical inertia, and the path of least resistance — not because physics demands them.
The rebuilt model is not more complex — it's more honest. It uses the same two PDEs. It just refuses to pretend that engineering shortcuts are physical laws.