XPSWMM to TUFLOW-SWMM Recommended Additional Conversion Steps

From Tuflow
Revision as of 11:54, 26 August 2024 by Emilie Nielsen (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

While the bulk of the XPSWMM to TUFLOW SWMM model conversion is automated by the 'Convert - XPSWMM model from XPX' processing tool, some required or recommended conventions must be implemented/updated manually. Therefore, it is highly recommended to complete the following additional conversion steps.

For more targeted conversion guidance (i.e. for structures using non-typical shapes), please refer to the XPSWMM to TUFLOW SWMM Troubleshooting page.

Additional Steps

It is recommended to make the following changes after running the 'Convert - XPSWMM model from XPX' processing tool to follow TUFLOW-SWMM conventions for stability and accuracy:

  • Storage nodes at HX connections
  • Recommended junction attributes

Convert HX Junctions to Storage Nodes

As TUFLOW HX cells do not have storage associated with them, this storage needs to be represented in the 1D domain. This can be achieved by using storage nodes at these locations. Storage nodes also improve model stability.

To convert the junction nodes at HX boundaries to storage nodes:

  1. In QGIS, go to Processing > Toolbox from the top dropdown menu options to open the Processing Toolbox.
  2. Go to TUFLOW >> SWMM in the processing tool list and select 'Junctions - Convert HX nodes to storage'. This opens the dialog shown below:
    • Input Junction layers: Select the Nodes--Junctions layer from the swmm GeoPackage (e.g. 1D2D_Urban_swmm_001 >> Nodes--Junctions).
    • Input BC Connection Layers: Select the 2d_bc connections layer (e.g. 1D2D_Urban_001.tbc >> 2d_bc_swmm_connections).
    • Storage Shape: Pyramidal
    • Length (rectangular) / Major Axis (cylindrical/conical): This value should be set to the typical number of HX connected cells multiplied by the cell size (10 in the example dataset).
    • Width (rectangular) / Minor Axis (cylindrical/conical): This value should be set to the cell size (5 in the example dataset).
    • Inverse slope (run/rise): Inverse slope of the output storage nodes. For pyramidal storage nodes, this value should be set to 0.0 (0.0 in the example dataset).
    • Output Junctions Layer: Leave as default.
    • Output Storage Layer: Leave as default.
  3. Click 'Run'. Once the tool has finished, click 'Close'.
  4. Two new layers, Output Storage Layer and Output Junctions Layer, will appear in the QGIS Layers Panel.


To include the Output Storage Layer in the SWMM GeoPackage:

  1. In the QGIS Layers Panel, right click on the Output Storage Layer and select 'Export >> Save Features As...'. This opens the dialog shown below:
    • Format: Prepopulated as 'GeoPackage'.
    • File name: Click '...' and navigate to the TUFLOW\model\swmm folder and select the SWMM GeoPackage (e.g. 1D2D_Urban_swmm_001.gpkg).
    • Layer Name: Nodes--Storage. It is important that this naming is correct, any other layer name will not be recognized by TUFLOW SWMM.
    • CRS: Select the models' Coordinate Reference System (CRS). For the demonstration model, the CRS is 'EPSG:32760 - WGS 84 / UTM zone 60S'.
  2. Leave all other parameters as the default and ensure that Add saved file to map (at the bottom of the dialog) is ticked on.
  3. Click 'OK'.
  4. In the QGIS Layers Panel, move the Nodes--Storage layer into the SWMM GeoPackage group.


We need to remove the objects from the Nodes--Junctions layer that coincide with the new new storage nodes. This can be done manually or with the 'Vector Selection > Select within distance' processing tool. The following steps will outline the process of using the tool:

  1. In the QGIS Layers panel, select (left click) Nodes--Junctions and toggle on editing.
  2. Use the 'Select Features' tool Select features icon.png to select all nodes included in the Nodes--Junctions layer. When selected, this will change their color to bright yellow.
  3. In the Processing Toolbox, go to 'Vector Selection' and select 'Select within distance'. This opens the dialog shown below.
    • Select features from: Nodes--Junctions (this is prepopulated as Nodes--Junctions is the active dataset).
    • By comparing to the features from: Click the dropdown menu and select Nodes--Storage.
    • Where the features are within: '0.1 meters'
    • Modify current selection by: 'selecting within current selection'
  4. Click 'Run'. Once the tool is finished, click 'Close'.
  5. In the QGIS Layers panel, right click Nodes--Junctions and select 'Open Attribute Table'.
  6. In the attribute table, only some of the junction nodes will be selected. Select 'Delete selected features' Delete selected features icon.png to delete these nodes. Close the attribute table.
  7. Toggle editing off to save the edits to Nodes--Junctions.
  8. Remove Output Storage Layer and Output Junctions Layer from the QGIS Layers Panel.


Set Junction Attributes

This is typically the final step in the model conversion process, as the recommended attributes for a junction node vary depending on whether the node is associated with inlet usage connections, 1D/2D culvert connections, and SWMM hydrology sub-catchments.

To update the SWMM Nodes--Junctions attributes, we will use the 'Junctions - Set attributes ' processing tool:

  1. In the QGIS Layers panel, select (left click) Nodes--Junctions and toggle on editing.
  2. In the Processing Toolbox, select the 'Edit Features In-Place' Edit features in place icon.png tool. This allows the editing of an existing layer, instead of the creation of a new layer.
  3. Go to TUFLOW >> SWMM in the processing tool list and select the 'Junctions - Set attributes ' processing tool. This opens the dialog shown below.
    • Input Subcatchment layers: If available, select Hydrology--Subcatchments.
    • Input Inlet Usage Layers: If available, select the inlet usage layer (e.g. 1D2D_Urban_swmm_001.tscf >> inlet_usage_001).
    • Input BC Connection Layers: If available, select the 2d_bc connection layer (e.g. 1D2D_Urban_001.tbc >> 2d_bc_swmm_connections).
    • General Options:
    • Maximum Depth Option (Ymax): 'Set to 0.0'
    • Nodes receiving subcatchment flows option (if connected to 2D): 'Based on options selected below'
    • Nodes connected to 2D without Inlets (through embankment culvert):
    • Ysur: 0
    • Area of ponding: This value should match the 2D cell area associated with 1D/2D culvert connections (100 in the example dataset).
    • Nodes connected to 2D with Inlets (underground pipe network):
    • Maximum depth (Ymax) option: 'Use global option'
    • Ysur: 0
    • Area of ponding: This value should match the 2D cell area associated with the Inlet Usage connections (10 in the example model).
    • Nodes without 2D Connection (underground pipe network):
    • Surcharge Depth: This value should be a value higher than any expected depth in the model (50 in the example model).
    • Area of ponding: 0
  4. Select 'Modify All Features'. Once the tool has finished, click 'Close'.
  5. Turn off editing to save the edits.
  6. View the attributes within Nodes--Junctions to verify the data processing has been completed correctly.
    For a summary of the attributes associated with the Nodes--Junctions layer, refer to TUFLOW 2023-03-AD Release Notes (Table A.30) and the SWMM Reference Manual - Volume 2 (Hydraulics).


Export SWMM INP File

SWMM cannot directly read GeoPackage databases. As we have made changes to the SWMM GeoPackage database (1D2D_Urban_swmm_001.gpkg), we will need to reflect these changes in the SWMM INP file (1D2D_Urban_swmm_001.inp) using the 'GeoPackage - Write to SWMM inp' processing tool.

  1. In the QGIS Layers panel, right click Nodes--Junctions (or any of the SWMM layers) and select 'TUFLOW' > 'SWMM - Export inp file'.
  2. This will open the 'GeoPackage - Write to SWMM inp' processing tool, prepopulated with the filename of the layer's GeoPackage.
    Note: This tool can also be activated from the Processing Toolbox.
  3. Click 'Run'. Once the tool is finished, click 'Close'.
  4. This tool will save the SWMM inp file in the same folder location and with the same name as the GeoPackage input file. In the example dataset, it will save 1D2D_Urban_swmm_001.inp to the TUFLOW\model\swmm folder (replacing the INP created by the 'Convert - XPSWMM model from XPX' tool).



Up
Go-up.png Back to XPSWMM to TUFLOW SWMM Conversion Page