How to link a SWMM model to a 2D model

Overview

Flood Modeller provides functionality to enable you to dynamically link your 2D model with a SWMM model (EPA's Storm Water Management Model). These links can be defined within Flood Modeller. After loading your 2D model extent you can position your interacting SWMM node locations overlaid on your 2D model. These data are then saved as a new shapefile, which therefore provides a visualisation of your SWMM node points. The only input data you require to define your SWMM links is a grid or shapefile that defines the location and extent of your 2D model. However, if you have prepared a point shapefile to geo-reference your SWMM model network then this can be utilised in the linking process to speed up definition of your SWMM node locations (providing it contains the SWMM node names as an attribute). Furthermore, if you already have a 2D-SWMM Link shapefile partially prepared you can also load this into Flood Modeller and perform further editing of these data.

The linking process does not provide any capability to build or edit SWMM models. It assumes that the SWMM model being linked has already been created in appropriate software, e.g. the EPA SWMM user interface. An existing SWMM model can be linked to Flood Modeller only via selected SWMM node types, i.e. nodes that can receive an external input. These are:

Flood Modeller provides three different options for linking to SWMM. These are:

The dynamic linking between the SWMM and Flood Modeller models is specified as follows:

Specifying SWMM model links in a Flood Modeller 2D model

The following section describes the step by step process for defining your 2D SWMM model links:

  1. Use the Add GIS Data (GIS Data of the Home Tab) to add your 2D model data to the Flood Modeller viewport. There are a number of file types that can be loaded to represent your 2D model (all of which are compatible for use with the 2D SWMM linking tool):

    • Raster grid (‘.asc’) file – this will be the ground grid (DTM or DEM) in ASCII format that provides the ground elevation data for your 2D model

    • 2D computational area (‘.shp’) file – Polygon shapefile (rectangle) which provides the boundary of your 2D computational area

    • 2D active area (‘.shp’) file – Polygon shapefile, which defines the active part of your computational area

  2. Use the Add GIS Data button to add any useful background map layers. These should be layers that will help locate particular SWMM node points, e.g. sewer outfalls. Background map layers can be raster grids (representing DEMs), aerial photos or map tiles (such as Ordnance Survey).

  3. Select the Create 2D SWMM Link File by clicking on the button provided in the Toolbox (Additional Model Build Tools > 2D Model Linking).

  4. A message is displayed asking whether you have a point shapefile available that represents your SWMM node locations (it must be loaded in your map view). Click the No button to proceed with defining a new link shapefile (covered by points 5 to 9 below). Click the Yes button to proceed to convert these data into a 2D SWMM link line shapefile (each point is replaced by a short line in the new file this process will create; see points 10 to 13 below for details).

  5. When defining a new link line file you are then prompted by the displayed Windows Explorer browse windows to specify first the name of your SWMM model file (extension ‘.inp’) and then on the second prompt to define the filename and location for your new SWMM link lines shapefile.

  6. Your new (initially empty) shapefile will be automatically loaded into the Flood Modeller map legend and will be placed into edit mode.

  7. Click on the Line button in the Layer Editor > Draw toolbar to start drawing your link lines. 2D models will be more stable if a boundary input is defined by a line (usually traversing more than one grid cell) rather than a point. Therefore, each link to a SWMM node, e.g. a sewer outfall, must be defined by a line. This can be any length, including very short.

  8. At each SWMM node location you need to draw a short line that will act as the link between 2D model and SWMM, referencing the relevant SWMM node. Once the drawing tool is activated each (left) click on your map view will add a new point to the current line being drawn. A double-click will end the drawing of the current shapefile feature (i.e. line), but keep you in draw mode ready to start a new line (with another left click).

    Note: The reason you are required to define links using short lines is that it helps model stability. Using points would place all inflow data series for 2D into single grid cells, which in some cases can lead to model instabilities. The use of short lines will share inputs between two or more adjacent grid cells.

  9. When all required SWMM link locations have been defined by short lines, stop the drawing function by clicking the Select button in the Layer Editor toolbar (or double click to complete the last link line). Then save your new shapefile by selecting the Save command from the File menu in the Layer Editor tab (see below):

  10. If you have a point shapefile representing your SWMM model nodes then this can be utilised to save time (by avoiding the need to draw your link line manually as described above). First load your point shapefile into your map view and then select the Create 2D SWMM Link File from Toolbox (Additional Model Build Tools > 2D Model Linking).

  11. When the initial prompt is displayed click Yes to signify you have point shapefile data available. A new window will be displayed as shown below:

  12. Select the SWMM point shapefile from the list of available files (point shapefiles in your map view). Then specify the attribute field in your shapefile that contains the SWMM model node names.

    • Use the browse button to specify the associated SWMM model file (alternatively you can type or paste a filename and full path into the space provided).

    • The remaining settings on the window can be left as the default settings, which are:

      • Link type is Flow (Q) - all 2D SWMM links will initially be defined as flow links (i.e. exchange flow data)

      • Line length = 10m – the location of each SWMM node point is copied to a new shapefile where it is replaced by a short line of length 10m. If model stability issues are experienced then using a longer length might help.

      • Clockwise angle = 90degrees – the new lines drawn are generated at this angle of orientation to the vertical.

  13. When all settings are defined then click the OK button to proceed. A new polyline shapefile will be defined in the same folder location as your SWMM point shapefile. It will also be automatically loaded into your Flood Modeller map view and placed into edit mode.

  14. Once your shapefile is defined you need to add or edit references to your SWMM model. The 2D SWMM link lines shapefile uses the same attribute headings as an 1D 2D link lines shapefile (with the addition of some additional SWMM specific attributes). The SWMM links are defined as follows:

    • SWMM node name – entered in the Node1 attribute field

    • SWMM connection type – entered in the Type attribute field (must be either Q or H for flow and stage respectively)

    • SWMM node type (optional) – entered in the SWMMType field, e.g. Outfall. This is not used by the calculation engine, but can be added for reference purposes if desired.

    • Additional descriptive text (optional) – entered in the Description field.

    To enter these data double click on a selected row in the attribute table (of your link lines shapefile). A new window is displayed which lists the current attribute settings for your selected feature (i.e. the selected row in attributes table) together with a table of all available SWMM nodes (that are compatible for linking).

    Select a SWMM node from the table (by clicking on it). This will be the node you wish to associate to the currently selected link line in the map view. Define the type of connection you want by selecting Flow (Q) or Stage (H) from the drop down list provided on each row of the SWMM table. Then click on the upper button between the two tables (arrow pointing left) and your selection will be added into the attribute table in the highlighted field in the attribute list Note this transfer is only available if you have highlighted either Node1 or Node2 in the attribute list (other attribute field selections are invalid and will not be accepted by the tool).

    You can add text to the Description field then by clicking on the space provided and typing in your text.

    Finally, when you have completed your attribute editing for the currently selected feature, ensure that you click the Apply button. Otherwise all the changes you have made will not be saved to your link lines file.

  15. The attribute editing just described should be repeated for all your defined SWMM link line features. To edit a different feature you can either:

    Note that when you click the Apply button in the attribute editing window the tool will automatically move to the next feature that has no SWMM connection defined.

    • Close the attribute editing window and highlight a different feature in the link line feature table. Then double click to access the attribute editing window for this feature and repeat the process in Step 10 above.

    • Click on either the next or previous buttons provided in the upper right corner of the attribute editing window.

  16. At the end of the attribute editing process (or at any time along the way) you can select the Save item from the Editor menu (of the Editor toolbar). When all SWMM link lines have been associated to SWMM nodes then you need to exit from the editing process. Select Stop Edit from either the right click menu of the map legend or the Editor menu of the Editor toolbar. The Editor toolbar should then disappear and the red asterisk next to your link lines shapefile should also disappear (signifying you have left edit mode). Your link lines shapefile is now ready to be incorporated into your 2D SWMM combined model.

    Note that you can stop this process part way through and save your link lines shapefile, then when you re-visit it in a later session you should load it into the Flood Modeller viewport (together with other background layers used before). To continue editing an existing file you need to select the 2D SWMM Link, than access the standard shapefile editor (right click on the filename in the Layers panel and select Start Edit from the displayed menu). The shapefile editor will recognise your file as an 2D SWMM file. Thus, when you try to edit an attribute field, you will be prompted to specify the associated SWMM model filename and then be taken to the specific 2D SWMM attribute editing window (as described in point 14 above) allowing you to complete your SWMM node referencing.

Preparing a SWMM model to dynamically link to Flood Modeller

The following section describes the procedure within SWMM for defining a dummy time series and associating it with your SWMM link nodes, i.e. the nodes that will connect with Flood Modeller. The dummy series will be populated by the Flood Modeller calculation engine at simulation run time in order to provide a dynamic exchange of data between Flood Modeller and SWMM. Note this requires a weir (“W”) type link to be defined between Flood Modeller 2D and SWMM.

  1. Add a new time series from the main menu (select Time Series, then Add [+]), call this “dummy” and set its values to 0 (i.e. default entry is one data pair of 0, 0). The times and values don’t really matter as they’ll be overwritten dynamically, so leaving the series set to 0 is an acceptable option.

  2. For the required SWMM node, edit its properties, e.g. select Hydraulics > Nodes > Junctions and double click on the node name (lower left pane)

    1. Add a time series via the ellipsis (should currently say “NO”)

    2. On the Direct tab, select Constituent=FLOW

    3. From the pull-down series for Time Series, select the new time series name, e.g. “dummy”

    Note that if the SWMM node already has an external time series associated to it then this would also be overwritten by the flow calculated from Flood Modeller 2D.

  3. This SWMM node must then be linked to Flood Modeller 2D via a “W” link. See section on how to define SWMM links for a 2D model.

    This now provides Flood Modeller with a “placeholder” in SWMM to write runtime inflows to.

    Note that Flood Modeller does not test for a dummy inflow in SWMM currently, so a successfully linked model relies on you adding this to your SWMM model (inp file) yourself (using the SWMM user interface externally from Flood Modeller).

 


© 2019 Jacobs

www.floodmodeller.com