TUFLOW SWMM Tutorial M01: Difference between revisions

Content deleted Content added
 
(7 intermediate revisions by 3 users not shown)
Line 13:
 
== QGIS ==
QGIS Version 3.34 or newer, and QGIS TUFLOW Plugin 3.9.0.11011 or newer are required to access the SWMM Processing Tools described in the following sections. For installation, see <u>[https://wiki.tuflow.com/index.php?title=TUFLOW_QGIS_Plugin#Installation_of_Plugin Installation of TUFLOW Plugin]</u>.<br>
Firstly, define the Coordinate Reference System (CRS), also called ‘Projection’, for the QGIS workspace:
<ol>
Line 25:
<br>
{{Video|name=Animation_TS1_Initialization_01a.mp4|width=1235}}<br>
 
==TUFLOW Plugin==
Next we need to configure the QGIS TUFLOW Plugin settings to link with the project folder where we will build our model:<br>
<ol>
<li>Open the 'Configure TUFLOW Project' tool by selecting Plugins > TUFLOW > Editing > Configure / Create TUFLOW Project.
<li>In the previous section, the CRS (Coordinate Reference System) for the QGIS Workspace was defined. As such, the projection inputs are set automatically.
<li>To set the location of the TUFLOW folder, click 'Browse...' and navigate to the '''TUFLOW_SWMM_Module_01''' folder. Click 'Select Folder'.
<li>To set the location of the TUFLOW single precision executable file, click 'Browse...' and navigate to the '''exe\2023-03-AD''' folder. Select '''TUFLOW_iSP_w64.exe''' and click 'Open'.
<li>Select 'GPKG' as the GIS Format.
<li>Select 'TUFLOW Classic / HPC' as the TUFLOW Engine.
<li>Tick on 'Save Default Settings Globally'.
<li>Click 'OK'.<br>
<br>
{{Video|name=Animation_TS1_Initialization_02c.mp4|width=1235}}
<br>
</ol>
 
==TUFLOW Model==
Line 75 ⟶ 59:
*Click 'Apply' and 'OK'.
<br>
{{Video|name=Animation_TS1_Initialization_03cAnimation_TS1_Initialization_03d.mp4|width=1235}}<br>
<li>Create a hillshade of the DEM:
*Right click on the '''DEM''' file in the QGIS Layers Panel and select 'Duplicate Layer'.
Line 85 ⟶ 69:
*Click 'Apply' and 'OK'.
<br>
{{Video|name=Animation_TS1_Initialization_04aAnimation_TS1_Initialization_04b.mp4|width=1235}}<br>
</ol>
 
===TUFLOW Plugin===
Next we need to configure the QGIS TUFLOW Plugin settings to link with the project folder where we will build our model:<br>
<ol>
<li>Open the 'Configure TUFLOW Project' tool by selecting Plugins > TUFLOW > Editing > Configure / Create TUFLOW Project.
<li>Set the CRS (Coordinate Reference System) by selecting one of the vector layers associated with the opened model using the drop menu list. For example, ''2d_bc_M01_001_L''.
<li>To set the location of the TUFLOW folder, click 'Browse...' and navigate to the '''TUFLOW_SWMM_Module_01''' folder. Click 'Select Folder'.
<li>To set the location of the TUFLOW single precision executable file, click 'Browse...' and navigate to the '''exe\2023-03-ADAF''' folder. Select '''TUFLOW_iSP_w64.exe''' and click 'Open'.
<li>Select 'GPKG' as the GIS Format.
<li>Select 'TUFLOW Classic / HPC' as the TUFLOW Engine.
<li>Tick on 'Save Default Settings Globally'.
<li>Click 'OK'.<br>
<br>
[[File: TS1_Configure_Project_01a.png]]<br>
</ol>
<br>
 
=== Increment Model GeoPackage File ===
Line 106:
<li>The GeoPackage database, '''TS01_001.gpkg''' will now be in the '''TUFLOW_SWMM_Module_01\TUFLOW\model\gis''' folder. <br>
<br>
{{Video|name=Animation_TS1_Initialization_05bAnimation_TS1_Initialization_05c.mp4|width=1235}}
<br>
</ol>
Line 126:
<li>Go to TUFLOW >> SWMM in the processing tool list and select '<u>[[QGIS_SWMM_GeoPackage_Create |GeoPackage - Create]]</u>'. This opens the dialog shown below.
:*To set the ‘CRS for GeoPackage’: Click the drop down menu and select ‘Project CRS: EPSG:32760 - WGS 84 / UTM zone 60S’.
:*To set the ‘Initial SWMM Sections’: Click …, and tick on (if not already ticked):
::*'''Project--Title''', '''Project--Options''', '''Project --Report.'''
::*'''Nodes--Junctions''', '''Nodes--Outfalls.''', '''Nodes--Storage.'''
::*'''Links--Conduits, Links--Streets'''.
:*To define the ‘GPKG filename to create’: Click …, select ‘Save to File’. Navigate to the '''TUFLOW\model\swmm''' folder and save the GeoPackage database as '''sw01_001.gpkg'''.
Line 140:
</ol>
<br>
{{Video|name=Animation_TS1_SWMM_Inputs_01fAnimation_TS1_SWMM_Inputs_01g.mp4|width=12351236}}
<br>
<br>
Line 148:
A GeoPackage database called '''SWMM_Culverts.gpkg''' is provided in the '''TUFLOW_SWMM_Module_01\Tutorial_Data''' folder. It contains three layers:
:*'''Conduits:''' defines the culvert location, type and geometry.
:*'''Junctions:''' defines the upstream culvert inverts.
:*'''Outfalls:''' defines the downstream culvert inverts.
:*'''JunctionsStorage_nodes:''' defines the upstream culvert inverts.
<br>
To populate the GeoPackage database created in the previous section:
Line 163:
<li>Toggle the editing off to save the edits.<br>
<br>
{{Video|name=Animation_TS1_SWMM_Inputs_02eAnimation_TS1_SWMM_Inputs_02f.mp4|width=12351236}}
<br>
<li>Similarly, copy the objects from '''JunctionsStorage_nodes''' into '''Nodes--JunctionsStorage'''. Junctions are considered inlets, and shouldstorage benodes definedare allowed at the upstream end of culverts. Storage nodes are preferred for culverts receiving 2D flows not through a storm drain inlet.
<li>Also copy the objects from '''Outfalls''' into '''Nodes--Outfalls'''. Outfalls are treated as outlets, and are required at the downstream end of culverts.
<li> Toggle off editing and save the edits.
<li>Remove '''SWMM_Culverts.gpkg'''.
<br><br>
{{Video|name=Animation_TS1_SWMM_Inputs_03eAnimation_TS1_SWMM_Inputs_03f.mp4|width=12351236}}
<br>
<li>Inspect the attribute information within the respective layers to familiarize yourself with the data.
<br><br>
{{Video|name=Animation_TS1_SWMM_Inputs_04eAnimation_TS1_SWMM_Inputs_04f.mp4|width=12351236}}
</ol>
<br>
Line 182:
===Update Conduit Details===
==== Node Details ====
StepStage 1 of building the 1D SWMM network involves updating the 'From Node' and 'To Node' attribute information in '''Links--Conduits'''. This information is necessary to build the 1D SWMM network. It defines the Link/Node connections. The information we will be adding to '''Links--Conduits''' is extracted from '''Nodes--Junctions''' and '''Nodes--Outfalls''' automatically using the '<ubr>[[QGIS_SWMM_Conduits_Assign_Node_Fields |Conduits - Assign node fields]]</u>' tool from the Processing Toolbox.
The information we will be adding to '''Links--Conduits''' is extracted from '''Nodes--Storage''' and '''Nodes--Outfalls''' automatically using the '<u>[[QGIS_SWMM_Conduits_Assign_Node_Fields |Conduits - Assign node fields]]</u>' tool from the Processing Toolbox.
<ol>
<li>In the QGIS Layers Panel, select (left click) '''Links--Conduits''' and toggle on editing.
<li>In the Processing Toolbox, select the 'Edit Features In-Place' tool [[File:edit_features_in_place_icon.png]]. This allows the editing of an existing layer, instead of the creation of a new layer.
<li>Go to TUFLOW >> SWMM in the processing tool list and select '<u>[[QGIS_SWMM_Conduits_Assign_Node_Fields |Conduits - Assign node fields]]</u>'. This opens the dialog shown below.
:*SWMM Node Layers: Tick on '''sw01_001 >> Nodes--JunctionsStorage''' and '''sw01_001 >> Nodes--Outfalls'''. Click 'OK'.
<li>Select 'Modify All Features'.
<li>Once the tool has finished, click 'Close'.
Line 193 ⟶ 194:
<li>View the attributes associated within '''Links--Conduits''' to verify the data processing has been completed correctly. The 'From Node' and 'To Node' attribute information is now configured correctly. For a broader understanding of the other attributes associated with the '''Links--Conduits''' layer, refer to <u>[https://docs.tuflow.com/classic-hpc/release/2023-03-AD/SWMM-Input-Detailed-1.html#tab:tab-SWMM-Input-Conduits TUFLOW 2023-03-AD Release Notes (Table A.19)]</u> and the <u>[https://downloads.tuflow.com/SWMM/SWMM5_Reference_Manual_Volume2_Hydaulics_P100S9AS.pdf SWMM Reference Manual - Volume 2 (Hydraulics)]</u>. <br>
<br>
'''Tip1Tip 1:''' If you wish to only update a selection of objects, instead of selecting the entire '''Links--Conduits''' dataset, select the target objects first using the 'Select Features' tool. The '<u>[[QGIS_SWMM_Conduits_Assign_Node_Fields |Conduits - Assign node fields]]</u>' tool will provide an option to 'Modify Selected Features', instead of 'Modify All Features.'<br>
'''Tip2Tip 2:''' Unique Node ID's are required for the SWMM network to function error free. If you are following this workflow for a project model build, please ensure the '''Nodes--JunctionsStorage''' and '''Nodes--Outfalls''' object ID information is unique. If duplicate ID values are assigned to multiple objects, consider using the '<u>[[QGIS_SWMM_Integrity_Make_Object_Names_Unique |Integrity - Make object names unique ]]</u>' TUFLOW SWMM processing tool to ensure all ID values are unique before using '<u>[[QGIS_SWMM_Conduits_Assign_Node_Fields |Conduits - Assign node fields]]</u>'.
<br><br>
{{Video|name=Animation_TS1_SWMM_Inputs_05fAnimation_TS1_SWMM_Inputs_05g.mp4|width=12351236}}
<br>
 
Line 203 ⟶ 204:
 
====Update Losses====
StepStage 2, updateinvolves updating the loss attributes in the '''Links--Conduits''' layer. TheseIn valuesthis willexample, bedefault enteredloss manuallyvalues inare thisused exampleand usingwill defaultbe entered valuesmanually. VariationThese to the defaultloss values can be usedadjusted in your project models to reflect site specific information if desired.
 
Step 2, update the loss attributes in the '''Links--Conduits''' layer. These values will be entered manually in this example using default values. Variation to the default values can be used in project models to reflect site specific information if desired.
<ol>
<li>In the QGIS Layers Panel, select (left click) '''Links--Conduits''' and toggle on editing.
Line 215:
<li>Turn off editing to save the edits.
<br><br>
{{Video|name=Animation_TS1_SWMM_Inputs_06eAnimation_TS1_SWMM_Inputs_06f.mp4|width=12351236}}
</ol>
<br>
 
AnSince urbanall pipethe network1D isSWMM addedinputs toin thethis model inare embankment culverts that all use the same loss parameters, it's not necessary to specify different loss attributes. The <u>[[TUFLOW_SWMM_Tutorial_M02 | TUFLOW SWMM Module 2]]</u>. Inwill thatdemonstrate situationan urban pipe network added to the model, with different loss attributes are required for the road culverts and underground stormwaterstorm pipe network links. To simplify the loss attribute updatethis step in that situation, weModule will be2 usinguses the '<u>[[QGIS_SWMM_Conduits_Assign_Node_Fields |Conduits - Assign node fields]]</u>' processing tool. However, it is not necessary for this Module 1 tutorial, because all the 1D SWMM inputs are embankment culverts all using the same loss parameters.
<br>
<br>
Line 244 ⟶ 245:
<li>The '''2d_bc_SWMM_Culvert_Connections_001_L''' appears in the QGIS Layers Panel. Select 'Apply TUFLOW Styles to Current Layer'.
<br><br>
{{Video|name=Animation_TS1_SWMM_Inputs_07eAnimation_TS1_SWMM_Inputs_07f.mp4|width=12351236}}
</ol>
<br>
Line 251 ⟶ 252:
<br>
 
===Update JunctionStorage Node Details===
The attributes of the storage nodes need to be modified to represent the storage of the connected HX cells since these cells do not represent storage themselves. The area associated with the storage nodes should be similar to the areas of the HX cells. To set the area, we will use a "PYRAMIDAL" shape with the SWMM side slope (run/rise) (Z) set to 0 to represent vertical walls. As the cell size is 5m, and the length of each polyline is 10m, the length (L) will be set to 10m and the width (W) to 5m. These sizes will be modified later when we change the boundary conditions.
 
<ol>
<li> In the QGIS Layers Panel, select (left click) '''Nodes--JunctionsStorage''' and toggle on editing.
<li> Right click '''Nodes--Storage''' and select 'Open Attribute Table'.
<li>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.
<li> Set the following attributes:
<li>Go to TUFLOW >> SWMM in the processing tool list and select '<u>[[QGIS_SWMM_Junctions_Set_Attributes |Junctions - Set attributes ]]</u>' processing tool. This opens the dialog shown below.
:* YMax: 50.0 (this is a value greater than the expected water level. It is required to allow water to fill node)
:*Input BC Connection Layers: '''2d_bc_SWMM_Culvert_Connections_001_L'''
:* TYPE: 'PYRAMIDAL'
:*Nodes connected to 2D without Inlets:
:::*Ysur L: 010
:::*Apond W: 505
:* Z: 0.0
:'''Note:''' Leave all other input parameters as their default value. They are relevant to pipe network conduits, not culverts through a single embankment.
<li> Turn off editing to save the edits.
 
 
<li>Select 'Modify All Features'.
<li>Once the tool has finished, click 'Close'.
<li>Turn off editing to save the edits.
<li>View the attributes associated 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 <u>[https://docs.tuflow.com/classic-hpc/release/2023-03-AD/SWMM-Input-Detailed-1.html#tab:tab-SWMM-Input-Junctions TUFLOW 2023-03-AD Release Notes (Table A.30)]</u> and the <u>[https://downloads.tuflow.com/SWMM/SWMM5_Reference_Manual_Volume2_Hydaulics_P100S9AS.pdf SWMM Reference Manual - Volume 2 (Hydraulics)]</u>.
<br><br>
{{Video|name=Animation_TS1_SWMM_Inputs_08fAnimation_TS1_SWMM_Inputs_08g.mp4|width=12351236}}
<br>
</ol>
Line 283 ⟶ 281:
</ol>
 
{{Video|name=Animation_TS1_SWMM_Inputs_09eAnimation_TS1_SWMM_Inputs_09f.mp4|width=12351236}}
<br>Save the QGIS Project Workspace:
 
Line 292 ⟶ 290:
 
<ol>
<li>In the QGIS Layers Panel, right click '''Links--Conduits''' (or any of the SWMM layers) and select 'TUFLOW' > 'SWMM - Export inp file'.
<li>InThis thewill Processingopen Toolbox, go to TUFLOW >> SWMM and selectthe '<u>[[QGIS_SWMM_GeoPackage_Write_to_SWMM_inp |GeoPackage - Write to SWMM inp]]</u>'. Thisprocessing openstool, prepopulated with the dialogfilename shownof belowthe layer's GeoPackage. <br>
'''Note:''' Ensure the 'Edit Features In-Place' tool is turned off.
'''Note:''' This tool can also be activated from the Processing Toolbox.
:*GeoPackage Input File: Navigate to the '''TUFLOW\model\swmm''' folder and select '''sw01_001.gpkg'''.<br>
 
<li>By default, this tool will save the SWMM inp file in the same folder location and with the same name as the GeoPackage input file. In this case, it will save '''sw01_001.inp''' to the '''TUFLOW\model\swmm''' folder.
<li>Click 'Run'.
<li>Once the tool is finished, click 'Close'.
<li>By default, thisThis tool will save the SWMM inp file in the same folder location and with the same name as the GeoPackage input file. In this case, it will save '''sw01_001.inp''' to the '''TUFLOW\model\swmm''' folder.
<br><br>
{{Video|name=Animation_TS1_SWMM_Inputs_10dAnimation_TS1_SWMM_Inputs_10e.mp4|width=12351236}}
</ol><br>
 
Line 343 ⟶ 340:
 
=== TUFLOW SWMM Control File (TSCF) ===
A new control file, the TUFLOW SWMM Control File (TSCF), is used to control the SWMM input data flow. All 1D SWMM files and commands are referenced in the TUFLOW SWMM Control File.<br>
<ol>
<li>From '''TS01_001.tcf''', right click '''TS01_001.tscf''' and select 'Open File'. This opens '''TS01_001.tscf''' into a new tab in Notepad ++.
Line 358 ⟶ 355:
<li>Save a copy of '''_run_M02_HPC.bat''' as '''_run_TS01_HPC.bat''' in the '''TUFLOW_SWMM_Module_01\TUFLOW\runs''' folder.
<li>Update the batch file to reference the '''TS01_5m_001.tcf''' :<br>
<font color="blue"><tt>'''set'''</tt></font> <font color="black"><tt>exe</tt></font><font color="red"><tt>=</tt></font><font color="black"><tt>"..\..\..\exe\2023-03-ADAF\TUFLOW_iSP_w64.exe"</tt></font><br>
<font color="blue"><tt>'''set'''</tt></font> <font color="black"><tt>run</tt></font><font color="red"><tt>=</tt></font><font color="black"><tt>start "TUFLOW" /wait</tt></font> <font color="orange"><tt> %exe%</tt></font> <font color="black"><tt> -b</tt></font> <br>
<font color="orange"><tt>%run% </tt></font> <font color="black"><tt>TS01_5m_001.tcf </tt></font>
Line 364 ⟶ 361:
<li>Save the batch file and double click it in Windows File Explorer to run the simulation.
<br>
If the model simulation doesn't run, here is a link to some common <u>[[Tutorial_Troubleshooting_QGIS | Trouble Shooting]]</u> advice.:
<ol>
<li> Check in the screen output or the tlf file near the end for "For SWMM Model Errors see:". This indicates that there is something wrong with the SWMM inputs. Reviewing that file will provide feedback on what is wrong.
Did<li> yourReview TUFLOW SWMM model fail to run successfully? If so, here is athis link tofor a troubleshooting guide:common <u>[[TUFLOW_SWMM_Troubleshooting | TUFLOW SWMM Troubleshooting]]</u> advice.<br>
</ol>
<br><br>
{{Video|name=Animation_TS1_Run_Sim_01cAnimation_TS1_Run_Sim_01d.mp4|width=12351236}}<br>
</ol>
== Troubleshooting ==
Did your TUFLOW SWMM model fail to run successfully? If so, here is a link to a troubleshooting guide: <u>[[TUFLOW_SWMM_Troubleshooting | TUFLOW SWMM Troubleshooting]]</u>.<br>
 
= Check Files and Results Output=
Complete the steps outlined in following links to review check files and simulation results from the TUFLOW SWMM model simulation:
 
<u>[[TUFLOW_SWMM_Tutorial_M01_Results_QGIS | TUFLOW SWMM Tutorial 01 Results]]</u><br>
<u>[[TUFLOW_SWMM_Tutorial_M01_Check_QGIS | TUFLOW SWMM Tutorial 01 Check Files]]</u> <br>
<u>[[TUFLOW_SWMM_Tutorial_M01_Results_QGIS | TUFLOW SWMM Tutorial 01 Results]]</u><br>
 
= Conclusion =
Line 381 ⟶ 380:
*Check files were used to review the inclusion of 1D SWMM culverts to a 2D TUFLOW model.
*Results through the 1D culverts were assessed.
*For further training opportunities see <u>[https://tuflow.com/training/training-course-catalogue/ TUFLOW Training Catalogue]</u> and/or contact <u>[mailto:training@tuflow.com training@tuflow.com]</u>.
<br>
 
Line 388:
*<u>[[TUFLOW_SWMM_Tutorial_M03 | TUFLOW SWMM Module 3]]</u> - 1D SWMM Pipe Network / 1D SWMM Urban Hydrology
*<u>[[TUFLOW_SWMM_Tutorial_M04 | TUFLOW SWMM Module 4]]</u> - 1D SWMM Pipe Network / 1D SWMM Urban Hydrology: Executing multiple different event simulations from a single model control file.
*<u>[[XPSWMM_to_TUFLOW-SWMM | XPSWMM to TUFLOW SWMM]]</u> - How to convert an XPSWMM model to TUFLOW SWMM.<br>
<br>
 
{{Tips Navigation