6.5 SWMM Inclusion in TUFLOW

6.5.1 SWMM Library Version

TUFLOW runs SWMM as a library, passing data between SWMM 1D and the TUFLOW 2D domains. The SWMM version used for the hydraulic calculations was created by Open Water Analytics (McDonnell et al., 2021), which is a modified version of the SWMM code.

6.5.2 Embedded SWMM Code in TUFLOW

TUFLOW has modified SWMM code (not from Open Water Analytics) primarily to enable calculation of pit (inlet) discharges and to include additional TUFLOW functionality for linking SWMM 1D to TUFLOW 2D. Details are provided below.

  • Changes were made to how inlets are handled to better correspond to how “rating curve” based pits are treated in ESTRY and provide better handling when the water level is above the inlet invert. Pit rating curves use a depth vs discharge relationship to determine the volume of flow that passes from the 2D domain into the 1D domain. If the pipe water level is above the inlet invert, but the 2D water level is higher the discharge will be based on the 2D water level minus the 1D water level in the pipe. If the 1D pipe water level is higher, a surcharging discharge is computed using the same curve based on the 1D pipe water level minus the 2D water level. This matches the ESTRY implementation and ensures a smooth transition between inflow and surcharging.
  • The discharge for On-Grade inlets was modified to use a velocity passed from the 2D domain rather than calculating a velocity based on the SWMM 1D street cross-section and slope at the inlet.
  • The methodology for assigning On-Grade or On-Sag handling of pits (inlets) was modified in the embedded code. In SWMM, a pit (inlet) placement defined as “AUTOMATIC” determines whether a pit should be On-Sag or On-Grade based upon the topography of the SWMM 1D street layout. In a combined TUFLOW-SWMM model the overland flow is generally represented in the 2D portion of the model so this approach is not feasible. The approach adopted by TUFLOW (version 2026.0 forward) uses the maximum of the flow computed on-sag or on-grade as described in 10.4.2.1.