TUFLOW SWMM Tutorial M01: Difference between revisions
Content deleted Content added
| (18 intermediate revisions by 3 users not shown) | |||
Line 13:
== QGIS ==
QGIS Version 3.34 or newer, and QGIS TUFLOW Plugin 3.
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>To set the location of the TUFLOW folder, click 'Browse...' and navigate to the '''TUFLOW_SWMM_Module_01'''. 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>▼
<br>▼
</ol>▼
==TUFLOW Model==
Line 75 ⟶ 59:
*Click 'Apply' and 'OK'.
<br>
{{Video|name=
<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=
</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-
▲<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=
<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=
<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.
<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=
<br>
<li>Similarly, copy the objects from '''
<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=
<br>
<li>Inspect the attribute information within the respective layers to familiarize yourself with the data.
<br><br>
{{Video|name=
</ol>
<br>
Line 182:
===Update Conduit Details===
==== Node Details ====
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--
<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>
'''
'''
<br><br>
{{Video|name=
<br>
Line 203 ⟶ 204:
====Update Losses====
▲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.
<li>Right click '''Links--Conduits''' and select 'Open Attribute Table'.
<li>
:*losses_Kentry: 0.5
:*losses_Kexit: 1.0
Line 215:
<li>Turn off editing to save the edits.
<br><br>
{{Video|name=
</ol>
<br>
<br>
<br>
Line 226 ⟶ 227:
<ol>
<li>In the QGIS Layers Panel, select (left click) '''Links--Conduits'''.
<li>In the Processing Toolbox, go to TUFLOW >> SWMM and select '<u>[[QGIS_SWMM_BC_Create_Channel_Endpoint_1D/2D_Connections |BC - Create channel endpoint 1D/2D connections]]</u>'. This opens the dialog shown below. <br>
'''Note:''' Ensure the 'Edit Features In-Place' tool has been turned off.
:*Input Conduits Layer: '''Links--Conduits'''
:*Create connections at: 'Both ends'.
Line 243 ⟶ 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=
</ol>
<br>
Line 250 ⟶ 252:
<br>
===Update
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--
<li> Right click '''Nodes--Storage''' and select 'Open Attribute Table'.
<li> Set the following attributes:
:* YMax: 50.0 (this is a value greater than the expected water level. It is required to allow water to fill node)
:* TYPE: 'PYRAMIDAL'
:* Z: 0.0
<li> Turn off editing to save the edits.▼
▲<li>Turn off editing to save the edits.
<br><br>
{{Video|name=
<br>
</ol>
Line 282 ⟶ 281:
</ol>
{{Video|name=
<br>Save the QGIS Project Workspace:
Line 291 ⟶ 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>
'''Note:''' This tool can also be activated from the Processing Toolbox.
<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>
<br><br>
{{Video|name=
</ol><br>
Line 341 ⟶ 340:
=== TUFLOW SWMM Control File (TSCF) ===
A new control file, the TUFLOW SWMM Control File (TSCF), is used to control the SWMM input data
<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 356 ⟶ 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-
<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 362 ⟶ 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
<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.
</ol>
<br><br>
{{Video|name=
</ol>
▲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 379 ⟶ 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 386 ⟶ 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
| |||