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 1D streets may not be fully described because only the cross-section information at inlets is required because 2D flows are modeled in TUFLOW. When running SWMM inside of TUFLOW, whether to treat an automatic placement as On-Sag or On-Grade is determined dynamically based on the inflows to the connected 2D cells. The 2D model provides the approach discharge (along the street) and total discharge for the connected cells. If the approach discharge is over 85% of the total discharge, the pit is modeled as an On-Grade inlet. Otherwise, it is modeled as On-Sag. Note: This approach is currently being tested and is subject to change. For production models it is recommended that users assign inlets as On-Grade or On-Sag.