XPSWMM to TUFLOW-SWMM Recommended Additional Conversion Steps
While the bulk of the XPSWMM to TUFLOW SWMM model conversion is automated by the 'Convert - XPSWMM model from XPX' processing tool, it is recommended to complete the following additional conversion steps. These steps can help improve model stability and they may also be helpful to address any messages that occurred when using the conversion tool.
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:
- In Windows File Explorer, navigate to the TUFLOW\model\swmm folder. Drag and drop the SWMM GeoPackage (e.g. 1D2D_Urban_swmm_001.gpkg) and the SWMM inlet usage GeoPackage (e.g. 1D2D_Urban_swmm_iu_001.gpkg) into QGIS. These GeoPackages contain the SWMM GIS layers (conduits, nodes, subcatchments, etc.) and the SWMM inlet usage layer respectively.
- Navigate to the TUFLOW\model\gis folder. Drag and drop the '_gis_layers_1d' GeoPackage (e.g. 1D2D_Urban_001_gis_layers_1d.gpkg) into QGIS. This GeoPackage contains the 2d_bc swmm connections layer.
- In QGIS, go to Processing > Toolbox from the top dropdown menu options to open the Processing Toolbox.
- 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_gis_layers_1d -- 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.
- Click 'Run'. Once the tool has finished, click 'Close'.
- Two new layers, Output Storage Layer and Output Junctions Layer, will appear in the QGIS Layers Panel.
video
To include the Output Storage Layer in the SWMM GeoPackage:
- 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'.
- Leave all other parameters as the default and ensure that Add saved file to map (at the bottom of the dialog) is ticked on.
- Click 'OK'.
- In the QGIS Layers Panel, move the Nodes--Storage layer into the SWMM GeoPackage group.
video
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:
- In the QGIS Layers panel, select (left click) Nodes--Junctions and toggle on editing.
- Use the 'Select Features' tool to select all nodes included in the Nodes--Junctions layer. When selected, this will change their color to bright yellow.
- 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'
- Click 'Run'. Once the tool is finished, click 'Close'.
- In the QGIS Layers panel, right click Nodes--Junctions and select 'Open Attribute Table'.
- In the attribute table, only some of the junction nodes will be selected. Select 'Delete selected features' to delete these nodes. Close the attribute table.
- Toggle editing off to save the edits to Nodes--Junctions.
- Remove Output Storage Layer and Output Junctions Layer from the QGIS Layers Panel.
video
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:
- In the QGIS Layers panel, select (left click) Nodes--Junctions and toggle on editing.
- In the Processing Toolbox, select the 'Edit Features In-Place' tool. This allows the editing of an existing layer, instead of the creation of a new layer.
- 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_iu_001 -- inlet_usage).
- Input BC Connection Layers: If available, select the 2d_bc connection layer (e.g. 1D2D_Urban_001_gis_layers_1d -- 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 water level in the model (50 in the example model).
- Area of ponding: 0
- Select 'Modify All Features'. Once the tool has finished, click 'Close'.
- Turn off editing to save the edits.
- 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).
video
Update the Ymax value of some of the junction nodes??