Section 6 1D Network Domains - EPA SWMM

6.1 Introduction

This chapter of the manual is written in USA English for the predominantly USA centered SWMM user base.

TUFLOW has supported 1D/2D dynamic coupling since its initial 2D solver development in 1989. Traditionally, 1D (1 Dimensional) linking and associated modeling has been applied using the ESTRY 1D solver (see Section 5.1). New in the 2023-03-AF release, TUFLOW’s 1D linking and solver options have been expanded to support the EPA Storm Water Management Model (referred to herein as SWMM). As such, 1D pipe networks can now be modeled using either the ESTRY, SWMM, or a combination of the two 1D solvers. In addition to this, extra functionality, such as SWMM hydrology and SWMM Low-impact developments (LIDs) features, can now be used in TUFLOW.

SWMM is a widely used software program for simulating urban and non-urban watersheds’ hydrologic and hydraulic behavior. Developed in the early 1970s by the Environmental Protection Agency (EPA), the model has since undergone numerous updates and enhancements to become one of the most used 1D stormwater runoff and water quality analysis tools globally, particularly in North America.

The primary uses of SWMM include designing and evaluating stormwater management practices, planning, and assessing low-impact development techniques, and developing models for floodplain mapping and emergency response planning. The software allows users to simulate a wide range of storm events and analyze the impact of a range of factors, such as land use changes, climate variability, and water quality control measures, on the performance of stormwater management systems. More information about SWMM can be found on the EPA website.

6.1.1 TUFLOW-SWMM Capabilities

Combined TUFLOW (2D) and SWMM (1D) models have a variety of applications and capabilities. Features built into TUFLOW-SWMM include:

  • 1D/2D SWMM/TUFLOW linkage through direct connections (TUFLOW HX and SX).
  • All inbuilt SWMM stormwater inlet types are supported, including a wide variety of shapes. Both on-sag and on-grade stormwater inlet connections are also supported.
  • SWMM Inlets can surcharge into the TUFLOW 2D domain if the 1D pressure head exceeds the 2D water level.
  • SWMM 1D inflows can be sourced from: external boundary conditions specified in SWMM, rainfall routed through SWMM subcatchments, or via 2D linkages from TUFLOW to SWMM.
  • SWMM hydrology subcatchment routing, including allowance for infiltration, groundwater levels, evaporation, and snow melt.
  • Low-impact developments (LIDs) features for modeling green infrastructure.
  • Scenario support through the ability to combine multiple SWMM project files (inp) in a single TUFLOW model. This feature is a powerful way to explore multiple setup options without duplicating information.

The TUFLOW QGIS Plugin has been expanded to assist with building SWMM models, linking TUFLOW-SWMM models, and viewing SWMM outputs in a GIS environment. The SWMM GIS tools are discussed in Section 6.3.

Currently, TUFLOW does not connect the AD (advection-diffusion) module or the TUFLOW groundwater (interflow) capability to the SWMM network.

6.1.2 Additional SWMM User Resources

This manual documentation does not duplicate SWMM information available elsewhere. Useful additional SWMM resources are listed below:

6.2 Model Setup

6.2.1 SWMM Model

The SWMM portion of a TUFLOW-SWMM model is read from one or more SWMM project files (inp). These files can be created within the EPA SWMM GUI, the TUFLOW GIS tools described in Section 6.3, or other tools (for example, exported from other software that have adopted SWMM 5 as their 1D solver).

The EPA Website provides documentation on SWMM model theory and setup. This manual does not contain a description of how to build SWMM models or the SWMM file formats since this information is readily available from the resources provided in Section 6.1.2. The TUFLOW-SWMM Tutorials demonstrate how to build TUFLOW-SWMM models using the TUFLOW GIS tools.

6.2.2 TUFLOW-SWMM Model Simulation

When running a TUFLOW-SWMM model, TUFLOW controls the execution of the simulation. SWMM input commands are specified within a SWMM Control File (*.tscf), documented in Appendix I. The SWMM Control File is referenced in the TUFLOW Control File (*.tcf) using the “SWMM Control File ==” command, documented in Appendix A.

The SWMM Control File can reference one or more SWMM input inp files using the “Read SWMM ==” command. If multiple input inp files are used, TUFLOW merges the files into a single input inp before simulation. During the merger, if there are SWMM objects that are duplicate in terms of location and “Name” the item that was defined lower in the SWMM Control File (*.tscf) takes precedence. This merger approach has been adopted to allow modellers to override existing objects easily for options assessments (such as, to assess the upgrade of a section of pipe network). After the input files are merged, the final SWMM model in inp format is placed in the TUFLOW output folder. The SWMM model runs from the output folder. The SWMM report and output files are also written to the TUFLOW output folder.

6.2.3 Linking SWMM to TUFLOW 2D and ESTRY

For information relating to the linking of SWMM 1D with TUFLOW 2D, and the linking of SWMM 1D to TUFLOW 1D (ESTRY), see Section 10.4.

6.2.4 SWMM Simulation Option Settings

The SWMM model settings are primarily dependent on the settings defined in the Project–Options section of the SWMM inp file. However, some settings are controlled by TUFLOW when running a TUFLOW-SWMM model, including:

  • END_DATE/END_TIME: Set based upon the SWMM START_DATE/START_TIME and the TUFLOW simulation duration.
  • FLOW_UNITS: the flow units are set to match the TUFLOW simulation, either to CFS for US Customary units or CMS for metric units.
  • FLOW_ROUTING: Flow routing is set to DYNWAVE.
  • ALLOW_PONDING: Allow ponding is set to YES. Ponding can be prevented by setting a high Junction attribute value for “YSur” (higher than the maximum water elevation) or setting a Junction “Apond” value to 0.0. Note, it is recommended that only Junctions with TUFLOw 1D/2D HX or SX boundaries should have the Apond attribute set to 0.0, which will create flooding in the 2D domain when the Junction is surcharged.
  • END_DATE/END_TIME: These are set based on the TUFLOW end time and the SWMM start time (simulation duration + start date/time = specified end date/time).
  • VARIABLE_STEP: This is turned off (0). TUFLOW will control the timestep based on the HPC (Heavily Parallelised Compute) timestep and the SWMM Iterations command.

6.2.5 Using the TUFLOW BC Database in SWMM

The fixed structure of SWMM restricts it to the simulation of a single event per SWMM inp file. Manual definition of SWMM boundary condition inputs would become an onerous task during the execution of a project requiring simulation of multiple events. TUFLOW-SWMM has overcome this SWMM limitation by enabling the communication of boundary condition timeseries data from the TUFLOW Boundary Condition Database to SWMM. This feature upgrades SWMM to use TUFLOW’s powerful and flexible event management options. Any number of event simulations can now be executed from a single SWMM inp input file. TUFLOW automatically assigns the chosen boundary condition inputs.

The connection between the TUFLOW Boundary Condition Database and the SWMM model is established by using the SWMM Control File (*.tscf) command, “Read BC <curve_type> ==”. The “SourceType” in the SWMM inp file also needs to be set to TIMESERIES for time varying data, such as rainfall depth vs time or discharge vs time to be passed seamlessly to SWMM from TUFLOW. The SWMM Timeseries name must also be specified (matching the TUFLOW Boundary Condition Database Name). TUFLOW writes the event specific information to the SWMM inp file it creates, prior to its simulation.TUFLOW-SWMM Tutorial 4 is a demonstration of this TUFLOW-SWMM boundary condition model configuration.

6.3 SWMM GIS Tools

SWMM tools have been added to the TUFLOW QGIS Plugin to provide users with the ability to build TUFLOW-SWMM models in a GIS environment. The tools assist with building SWMM models, linking TUFLOW-SWMM models, and viewing SWMM outputs.Three major items within the TUFLOW QGIS Plugin that are specifically relevant to SWMM include the TUFLOW QGIS plugin SWMM Processing Tools, 1D Pipe Integrity Tools, and TUFLOW Viewer.

  • The TUFLOW QGIS Plugin SWMM Processing Tools have been created to support workflow efficient model building. Tools available within the SWMM Processing Toolbox can be used for the following:

    • Conversion of SWMM input files (inp) to and from SWMM GeoPackage file format. These converters are central to all the SWMM processing tools. They enable the conversion of SWMM inp text files into a visual GIS GeoPackage format for spatial and tabular editing. Also, the GeoPackage files can be exported to SWMM inp text file format, for use as inputs into the TUFLOW-SWMM model. The Geopackage format representation of the SWMM inp file is discussed in Section 6.3.1
    • Creation of SWMM Template GeoPackage GIS files. These files include all the data required by a SWMM model, if building a model from scratch.
    • Setting of unique SWMM Junction parameters based on Junction usage and location.
    • Setting unique SWMM conduit losses, dependent on location of the object in the network and whether the conduit is connected directly to the 2D, another pipe or a stormwater inlet.
    • Semi-automatic creation of TUFLOW-SWMM 1D/2D linkages.
    • Tools to assist in the conversion of XPSWMM models to TUFLOW-SWMM.
    • Conversion of ESTRY layers to SWMM.
  • The TUFLOW QGIS plugin 1D Pipe Integrity Tools are a suite of tools that help modelers find and fix potential errors in 1D networks prior to running TUFLOW. The 1D integrity tool can be used for ESTRY or SWMM pipe networks.

  • The TUFLOW Viewer enables GIS viewing of SWMM time-series results. The following are supported.

    • Time-series plotting of 1D SWMM results.
    • Long-profile plotting of 1D SWMM network results.
    • Dynamic plan view symbology. This feature enables the object symbology to change based on the result magnitude at the current simulation output time.
    • The above result display options can be used within animations created by TUFLOW Viewer.

6.3.1 GeoPackage File Format

The SWMM GeoPackage representation is mostly a simple conversion of the table oriented SWMM input file (inp). Some GeoPackage tables are modified versions of the SWMM input file, often combining multiple inp sections into a single GeoPackage table to streamline editing features. Some of the GeoPackage tables have spatial components (points, lines, and polygons) and others are tables of data with no geometry attributes.

Generally, modified tables are a “wide” form of the tables to represent distinct categories of options without using the same column for multiple input parameters. For example, the “[XSECTIONS]” table has a variety of inputs depending upon whether the shape is from a list of shapes, a custom shape (a closed shape with a Height vs Width table), irregular shape (cross-section-based open channel), or a street cross-section. In the SWMM input file, attributes from multiple types use the same columns while the GeoPackage representation creates a column for each input field. There are separate columns for specified shapes and irregular culvert curves. Depending upon the option selected, many of the fields will not be used.

To make things simpler, the subcatchment and subarea SWMM table columns are combined into the subcatchment table. The subarea columns use the prefix “subarea_” and are written to a separate table when exported to the SWMM inp file.

SWMM inp files can be converted to a GeoPackage format using the processing tool SWMM >> GeoPackage - Create from SWMM inp. GeoPackage format files can be exported to SWMM inp files using the processing tool SWMM >> GeoPackage - Write to SWMM inp. When a GeoPackage file is read into QGIS, by default a folder will be created for all of the loaded layers. Right-clicking on this folder will bring-up a menu item to export the GeoPackage file as a SWMM inp file.

A full description of the layers that can be included in SWMM GeoPackage files can be found in Appendix L.

6.4 SWMM Outputs

Model outputs are written by both SWMM and TUFLOW, which can be used to visualize model results. SWMM writes a report file (rpt) and an output file (out) in the TUFLOW results folder with the simulation prefix followed by “_swmm.” The report file can be viewed with a text editor. The output file can be viewed in EPA SWMM or 3rd party tools that support this format, such as PySWMM.

TUFLOW-SWMM models also output a GeoPackage time-series output file. The file is written with the other result files in the results folder, and ends with “_ts.gpkg.” This file can be read into the QGIS TUFLOW Viewer using the Load Results - Time series option from the File menu of the QGIS TUFLOW Viewer. When this file is loaded, point and line layers will be loaded, representing the node and channel results. The layer symbology can be modified to dynamically represent the model result magnitude for the current QGIS time. Profiles can be also be generated for the 1D network. Animations can be created from these results (in combination with 2D results if desired). These layers can also be used to select channels or nodes to display time series results in the TUFLOW Viewer plot windows, and can be combined with ESTRY or PO outputs. Documentation for the QGIS TUFLOW Plugin and TUFLOW Viewer are available in the TUFLOW Wiki.

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.

References

McDonnell, B., Wu, J. X., Ratliff, K., Mullapudi, A., & Tryby, M. (2021). Open Water Analytics Stormwater Management Model (Version 5.1.13). Zenodo. https://doi.org/10.5281/zenodo.5484299