Open-Source SWMM's new finite volume routing engine: exact mass accounting, resolved flow regimes, and virtual junctions for all-pipes models. (Edited to fix typos)

Two surge-and-drain cycles over 24 hours in Cedar Glen, a synthetic 387-pipe raw-water conveyance built the way real GIS exports look: a 4.9-mile trunk drawn as hundreds of short survey segments, chained by virtual junctions, ending at a flow-regulating storage basin. The profile is drawn at true scale, and the numbered dots on the map mark the profiled trunk chainage. One input deck runs both solvers, and both carry a Preissmann slot above the crown: blue is the new finite volume solver, green dashes are dynamic wave with its own slot option (SURCHARGE_METHOD SLOT), and the thin companion lines are each solver's energy grade line.
For over fifty years, SWMM has answered how much water a drainage system carries, its velocities, hydraulic grade lines, etc. These questions become harder to answer at the extremes. How do these attributes behave when the pipes go through filling and emptying cycles? Does the mathematics still add up in those moments? Those are relevant for designing conveyance systems and are exactly the places where classical solvers run into trouble. We have added an alternative solver to the legacy dynamic wave solver to Open-Source SWMM, using an explicit finite volume approach to make results at these extremes more trustworthy.
Mass Balance Errors are Now a Thing of the Past
The legacy dynamic wave solver iterates node heads and checks continuity after the fact; the report card tells you how much water went missing. The finite volume (FV) solver moves water between short cells as fluxes. Whatever leaves one cell enters the next, exactly, by construction, so conservation holds to machine precision at every step.
On Thacker's oscillating flat-bottom basin (Thacker, 1981) from the SWASHES analytic suite, dynamic wave manufactures a continuity error of -4,459 %. The FV solver reports 0.0 %. On three pressurization benchmarks built for exactly the regime where sewers get harder to simulate, FV closes to within 0.001 % on all three while the legacy surcharge iteration leaks 6.1 % of its throughput in a single surcharge cycle, and the leak grows as the mesh is refined (3.1 % at 20 m cells, 6.1 % at 5 m). Across the 20 models of EPA's dynamic wave quality assurance corpus (Rossman, 2006), FV routing continuity never exceeded 0.015 %, and on most models it reads exactly zero.

Finite volume solver closes to 0.001 % or better on all three. Dynamic wave is shown with its default EXTRAN surcharge accounting, its most stable configuration on these decks; its slot variant loses orders of magnitude more volume at the suite's fixed parity time step.
Flow Regimes the Legacy Solver Cannot Capture
The legacy dynamic wave solves one momentum balance per pipe and knows depth only at pipe ends. The FV solver subdivides every conduit into cells and solves the full shallow-water equations with a shock-capturing scheme, so backwater curves, chokes, bores, and hydraulic jumps live inside the pipe, at the station where they physically occur.
The SWASHES analytic benchmarks (Delestre et al., 2013) make the differences visible. In transcritical flow over a bump, the flow accelerates through critical depth at the crest and runs supercritical downstream. The channel is modeled 12 m deep so the case stays purely open channel and nothing constrains either solver. The FV solution converges to the analytic profile through the choke and down the supercritical branch, with an L1 depth error of 0.034 m and zero drift over the final five minutes. Dynamic wave never finds a steady state on this case: the upstream water surface sloshes between dry and more than 10 m deep for the whole run, and even its time-averaged profile sits 1.6 m from the analytic solution.

(SWASHES 3.1.4, Delestre et al. 2013). Both solvers get the identical deck: a constant 1.53 m³/s inflow upstream, a free downstream outfall, a frictionless bed, and a 12 m deep channel so the case stays open channel throughout. The finite volume solution is steady and passes through critical depth at the crest onto the analytic supercritical branch. Dynamic wave never reaches steady state here; the dashed line is its time-averaged surface and the shaded band is the range it sweeps through the second half of the run.
Where the flow comes back down, the difference is just as sharp. In MacDonald's 1,000 m benchmark channel (MacDonald et al., 1997) the bed is constructed so the steady solution jumps from supercritical to subcritical exactly at mid-channel. The FV solver holds the hydraulic jump as a discontinuity at x = 500 m with an L1 depth error of 2 mm. Dynamic wave finds the right depths away from the jump and smears the jump itself across more than a hundred meters of channel; its L1 error is 13 mm.

A steady hydraulic jump (MacDonald et al.1997; SWASHES 3.2.1, Delestre et al. 2013), shown as the full water surface profile over the constructed bed. In the inset, the finite volume solver drops onto the supercritical branch and holds the jump sharp at its analytic station; dynamic wave smears the jump across more than a hundred meters.
Ritter's dry-bed dam break (Ritter, 1892) tells the same story in a transient. The FV front tracks the analytic rarefaction smoothly to the wetting front (L1 error 0.020). Dynamic wave oscillates violently through the wave and cuts the front off early (L1 error 0.104).

A dam break onto a dry bed (Ritter 1892; SWASHES 4.1.2, Delestre et al. 2013). The finite volume profile follows the analytic solution through the front; dynamic wave rings through it.
Pressurization Physics
The transition from open channel to pressurized flow is one of the areas where storm sewers earn their keep and where solvers show their character. Both engines can carry a Preissmann slot (Preissmann, 1961) above the crown, so the fair comparison is between the two implementations.
In legacy SWMM engine, the slot is an option alongside the default EXTRAN surcharge iteration (Rossman, 2017; Rossman and Simon, 2022). Its width follows a fixed recipe, a function of the depth ratio that narrows to 1 % of the pipe width, and it is evaluated inside the same implicit node-head iteration, so the pressure-wave speed is whatever the recipe implies and the iteration still decides how much water survives the transition.
In the FV solver, the slot is part of the conduit geometry inside a conservative flux formulation. The slot width derives from a pressure-wave celerity you select (FV_SLOT_CELERITY), so the acoustic speed of the surcharged system is an explicit modeling choice you can match to your pipes; a guard caps the slot at 5 % of the pipe width and warns when a requested celerity would exceed it. Above the crown the same conservative update keeps running, a pressurization front is simply a shock the scheme captures, and captured shocks move at the speed mass conservation dictates. The measured consequences of the two designs on identical decks run through this article: the FV slot closes its ledger to 0.001 % or better on the pressurization benchmarks, and the legacy slot loses 7.9 % of the throughput on the pocketed Cedar Glen profile and destabilizes outright at the suite's fixed parity step. In the Cedar Glen comparison below, dynamic wave runs with its slot enabled so the two solvers carry the same conceptual model above the crown.

A pipe filling end-to-end, two minutes in: pressurized behind the front, open channel ahead, one set of equations throughout.

A sewer driven past capacity and back. Both solvers find the analytic pressurized head; the volume ledgers differ by orders of magnitude.
There is a larger direction in this. Cedar Glen already behaves like a hybrid system: an open channel at base flow, a pressurized conveyance at the peak, with the same equations governing both states and the pressure-wave celerity an explicit modeling choice. That combination begins to move us toward a unified solver for stormwater, wastewater collection systems, and pressurized distribution systems, three domains that have historically required separate tools with separate assumptions.
Virtual Junctions Make All-Pipes Models Practical
The industry is moving toward all-pipes models, high spatial fidelity networks that carry every segment the GIS carries. Modeled the classical way, every polyline vertex becomes a manhole-like junction that adds artificial points and breaks the momentum balance. The usual workaround is to thin the network by hand and lose the fidelity the all-pipes model exists to provide.
The new virtual junction node type removes the workaround. A virtual junction connects exactly two conduits, stores no water, cannot flood, and couples momentum straight through, so a pipe drawn as forty survey segments behaves like one continuous pipe. One point deserves emphasis: only the axial component of momentum is conserved across the junction. The water follows the drawn alignment, the turning force at each bend is supplied implicitly by the pipe wall, and where a sharp bend deserves a real energy penalty, that remains the modeler's call through minor loss coefficients. The Cedar Glen model in the animation above is built this way: 387 conduits, 17 real junctions, and 370 virtual junctions carrying the alignment of a 4.9-mile trunk and two laterals into a terminal storage basin with orifice outlets. Between the two tie-ins the trunk carries the kind of grade a valved raw-water conveyance accumulates: the invert dips into a pocket, climbs a steep adverse riser to a crest at 455 ft, drops into a second pocket, and lips up again before resuming its fall. At base flow the two pockets hold standing pools with the flow sheeting over the crests; when the surge arrives, the whole reach pressurizes and both pockets disappear under the hydraulic grade line.

Cedar Glen on the receding limb of the first surge, profile at true scale. The reach over the two pockets has already relieved back to open channel while the upstream trunk still flows pressurized (shaded) and drains toward it; the basin is passing its stored surge over the overflow. The two solvers begin to separate visibly around the pockets as the system relieves.
Both solvers accept the same deck, with dynamic wave running its own Preissmann slot so the comparison is like for like, and the surge still separates them. The FV run closes its ledger at 0.000 %. The dynamic wave run loses 7.9 % of the throughput with its slot enabled; with its default EXTRAN accounting it holds 0.01 % here, and the transitions benchmarks show the refinement-dependent leakage that accounting carries. In a raw-water conveyance, water that vanishes from the ledger is exactly the quantity of relevance to managers.
Built to be Stable
Implicit head iterations fail quietly: when they stop converging, the symptoms are ringing, spikes, and water leaking out of the ledger. The finite volume solver is explicit with upwind, shock-capturing fluxes, so every update respects the local stability limit and discontinuities are damped by construction. There is no iteration to diverge.
The difference is visible all through this article. In the dam break, dynamic wave shows spurios oscillations through the front that the FV solver tracks smoothly, and on the frictionless transcritical bump it never stops sloshing long enough to produce a steady answer at all. On Cedar Glen, with both solvers on the same slot, the dynamic wave head at one lower-trunk virtual junction jitters by 0.19 ft per minute through the surge and spikes 30 ft above the finite volume peak; the FV trace at the same node moves 0.03 ft per minute. And on the surcharge benchmark at a fixed one-second parity step, dynamic wave's slot variant sheds volume by whole orders of magnitude while the FV solver on the identical deck closes to 0.001 %.
Local Time Stepping Keeps the Smallest Pipe from Bogging Down the Run
Explicit finite volume schemes obey a stability limit tied to wave speed, and in a classical explicit solver the single most restrictive cell sets the clock for the entire network. One short, steep, or deep pipe can drag a whole model down to its time step.
Local time stepping removes that coupling. Cells that need small steps take them; the rest of the network marches at its own pace, and flux bookkeeping at the tier boundaries preserves exact conservation. The result is the same solution and the same closed ledger, with the solver spending its effort where the physics is actually happening.
Addendum
It is important to be transparent to note that, even with local time stepping, the computational expense of the finite volume method lags behind the dynamic wave - anywhere from 1.5 to 6x increase in runtimes. This increase is a function of the sub-grid implementation and the decision on how many cells to use to represent a single pipe with virtual junctions. We are working to address it with further refinements and are looking to leverage GPU acceleration on this front as the explicit implementation makes this tractable.
Benchmarks: SWASHES analytic suite and a public open-channel to pressurized transition suite (filling bore, surcharge cycle, inverted siphon). Both solvers run identical input decks, single threaded, with analytic references generated independently; benchmark numerals come from the darwin-parity build of 2026-08-12 (engine d0f35570). Cedar Glen is a synthetic model generated by script and was run on the 2026-08-15 build of engine 6.0.0-alpha.3; its numbers are frozen inarticle/numbers.json alongside the rest.
References
Delestre, O., Lucas, C., Ksinant, P.-A., Darboux, F., Laguerre, C., Vo, T. N. T., James, F., and Cordier, S. (2013). SWASHES: a compilation of shallow water analytic solutions for hydraulic and environmental studies. International Journal for Numerical Methods in Fluids, 72(3), 269-300. doi:10.1002/fld.3741.
MacDonald, I., Baines, M. J., Nichols, N. K., and Samuels, P. G. (1997). Analytic benchmark solutions for open-channel flows. Journal of Hydraulic Engineering, 123(11), 1041-1045.
Preissmann, A. (1961). Propagation des intumescences dans les canaux et rivieres. Proceedings of the First Congress of the French Association for Computation, Grenoble, France, 433-442.
Ritter, A. (1892). Die Fortpflanzung der Wasserwellen. Zeitschrift des Vereines Deutscher Ingenieure, 36(33), 947-954.
Rossman, L. A. (2006). Storm Water Management Model Quality Assurance Report: Dynamic Wave Flow Routing. EPA/600/R-06/097. U.S. Environmental Protection Agency, Cincinnati, OH.
Rossman, L. A. (2017). Storm Water Management Model Reference Manual, Volume II: Hydraulics. EPA/600/R-17/111. U.S. Environmental Protection Agency, Cincinnati, OH.
Rossman, L. A., and Simon, M. A. (2022). Storm Water Management Model User's Manual, Version 5.2. EPA/600/R-22/030. U.S. Environmental Protection Agency, Cincinnati, OH.
Thacker, W. C. (1981). Some exact solutions to the nonlinear shallow-water wave equations. Journal of Fluid Mechanics, 107, 499-508.



















Discussion
Comments are powered by GitHub Discussions. Sign in with a GitHub account to join the conversation, or open the discussion on GitHub.