TUFLOW SWMM Tutorial M03: Difference between revisions

Content deleted Content added
 
(98 intermediate revisions by 4 users not shown)
Line 1:
= Introduction =
This tutorial, Module 3 of the TUFLOW -SWMM tutorial dataset, demonstrates how to add SWMM urban hydrology to a 1D / 2D SWMM stormwater pipe network / 2D TUFLOW HPC catchment model. TUFLOW -SWMM Tutorial Module 3 builds from the model created in <u>[[TUFLOW_SWMM_Tutorial_M02|TUFLOW SWMM Tutorial Module 2]]</u>. The completed TUFLOW -SWMM Module 2 model is provided in the '''''TUFLOW_SWMM_Module_03\TUFLOW''''' folder of the download dataset as the starting point for this tutorial. If you are not already familiar with TUFLOW -SWMM linking, we recommend first completing ModuleTUFLOW-SWMM Modules 1 and 2 beforeprior to starting this tutorial. <br>
 
= Project Initialization =
==QGIS==
QGIS Version 3.34 or newer, and QGIS TUFLOW Plugin 3.9.0.4911 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>
Define the Coordinate Reference System (CRS), also called ‘Projection’, for the QGIS workspace:
<ol>
Line 16:
<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_03'''. 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>
[[File:SWMM_M03_configure_project.png]]<br>
</ol>
<br>
 
==TUFLOW Model==
Line 41 ⟶ 25:
[[File: Tuflow_plugin_load_tcf_layers.png]]<br>
<br>
<li>In File Explorer, navigateNavigate to the '''TUFLOW_SWMM_Module_03\TUFLOW\runs''' folder and select '''TS02_5m_001.tcf'''.
<li>In the Load Layers window, select:
* Ordering Options: Alphabetical
Line 49 ⟶ 33:
</ol>
<br>
Style the TUFLOW layers. Suggested styling steps were provided in <u>[[TUFLOW_SWMM_Tutorial_M01#QGIS_Project_InitializationLoad_and_Style_TUFLOW_Model_Files|TUFLOW SWMM Tutorial M01]]</u>. They have not been duplicated here.<br>
<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>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_03''' 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-AF''' 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: TS3_Configure_Project_01a.png]]<br>
</ol>
<br>
 
=== Increment TUFLOW GeoPackage File ===
SaveWe will now save a copy of '''TS02_001.gpkg''' with a new name, '''TS03_001.gpkg'''. This project initialization step is recommended so prior model versions from a project are not broken as a result of changes being made to GIS inputs.
 
<ol>
Line 63:
:*Source Layer: Automatically set to the selected layer, '''2d_bc_M01_001_L'''.
:*Output Database: Click 'Browse...'. This will automatically open to the '''TUFLOW\model\gis''' folder. Set the new output database name to '''TS03_001.gpkg''' and click 'Save'.
:*Output Layer Name: This waswill automatically incrementedincrement to, '''2d_bc_M01_002_L2d_bc_M01_00''2''_L'''. Change the valuename back to '''2d_bc_M01_001_L2d_bc_M01_00''1''_L'''.
:*Delete the pre-filled 'Incremented Layer' entry in the table. We do not wish to modify the version number associated with the 2d_bc file. This current exercise will not change the version number of any of the GIS layer inputs, it is simply establishing a copy of the existing GeoPackage where future edits will be saved to.
:*Select 'Remove Source Layer from Workspace'.
:*Select 'Increment Layer and Preserve Database'.
<li>Click 'OK'.
<li>The GeoPackage database, '''TS03_001.gpkg''' will now be in the '''TUFLOW_SWMM_Module_03\TUFLOW\model\gis''' folder.
<br><br>
{{Video|name=Animation_TS3_Initialization_02b.mp4|width=12351236}}
<br>
</ol>
 
=== Increment SWMM GeoPackage File ===
SWMM pipe network junction attributes need to be updated when converting a TUFLOW 2D direct rainfall / SWMM 1D model <u>([[TUFLOW_SWMM_Tutorial_M02|TUFLOW SWMM Tutorial Module 2]]</u>). into a format that uses SWMM hydrology instead of direct rainfall. Similar to above (incrementing the TUFLOW GeoPackage file), we will increment the SWMM pipe network database name so we do not alter the inputs necessary for '''TS03_5m_001TS02_5m_001.tcf''' to function without issue.
<ol>
<li> In the QGIS Layers Panel, open the '''TS02_001.tscf''' group. In the '''sw02_001.inp''' group, right click '''Links--Conduits'''.
<li> Left click '''sw02_001''' in the QGIS Layers panel.
<li> <fontSelect TUFLOW color="red">'''Waiting for Rusty's SWMM - Increment SelectedGeoPackage. LayerThis toolopens the dialog shown below.'''</font>
<li>:*Output File: Click the '...'. This will automatically open to the '''TUFLOW\model\swmm''' folder. Set the newoutput Databasedatabase name to '''sw03_001.gpkg''' and click 'Save'.
:*Existing GeoPackage Layers: 'Unload -- do not move'.
<li> Select '''OK'''.
<li> Select 'OK'.
<li> The tool will automatically load '''sw03_001.gpkg''' into the QGIS workspace and remove '''sw02_001.inp''' from the QGIS workspace.
<li> In the QGIS Layers Panel, move '''sw03_001.gpkg''' to the top of the list. This will ensure the data within this database file is displayed above all other layers in the project.
<br><br>
{{Video|name=Animation_TS3_Initialization_03b.mp4|width=12351236}}
<br>
</ol>
 
===Save QGIS Project Workspace===
Save the QGIS Workspace:
<ol>
<li>Go to Project > Save As.
Line 99 ⟶ 102:
<ol>
<li>Go to Processing > Toolbox from the top dropdown menu options to open the Processing Toolbox.
<li>Go to TUFLOW >> SWMM in the processing tool list and select '<u>[[QGIS_SWMM_GeoPackage_Add_Sections |GeoPackage - Add sections]]</u>'. This opens the dialog shown below.
:*GPKG filename modify: Click the ... and navigate to the '''TUFLOW_SWMM_Module_03\TUFLOW\model\swmm''' folder. Select '''sw03_001.gpkg'''.
:*CRS for GeoPackage: Click the drop down menu and select 'Project CRS: EPSG:32760 - WGS 84 / UTM zone 60S'.
Line 106 ⟶ 109:
::*'''Hydrology--Subcatchments'''
<li>Click 'Run'.
<li>Once the tool is finished, click 'Close'.
<br><br>
{{Video|name=Animation_TS3_SWMM_Inputs_01b.mp4|width=12351236}}
<br>
</ol>
Line 114 ⟶ 118:
<ol>
<li>In the QGIS Layers Panel, right click '''sw03_001''' and select 'Remove Group...'.
<li>In Windows File Explorer, navigate to the '''TUFLOW\model\swmm''' folder and drag and drop '''sw03_001.gpkg''' into QGIS.
<li>When prompted by QGIS, under 'Options', tick on 'Add layers to group', then select 'Add Layers' to open all vectors within '''sw03_001.gpkg'''. By default, all items in the available list should have been selected.
<li>In the QGIS Layers Panel, move '''sw03_001.gpkg''' to the top of the list. This will ensure the data within this database file is displayed above all other layers in the project when we are making edits.
<li>In the QGIS Layers Panel, within the '''sw03_001''' group, move '''Hydrology--Subcatchments''' to the bottom. This will ensure that the other data within this database can be seen.
<br><br>
{{Video|name=Animation_TS3_SWMM_Inputs_02b.mp4|width=12351236}}
<br>
</ol>
Line 130 ⟶ 135:
To populate the SWMM GeoPackage created in the previous section:
<ol>
<li>In Windows File Explorer, navigate to the '''TUFLOW_SWMM_Module_03\Tutorial_Data''' folder. Drag and drop the '''Urban_Hydrology.gpkg''' into QGIS.
<li>When prompted by QGIS select '''SWMM_Subcatchments'''. Click 'Add Layers'.
<li>In the QGIS Layers Panel, right click on the '''SWMM_Subcatchments''' layer and select 'Zoom to Layer(s)'.
<li>Use the 'Select Features' tool to highlight all items included in '''SWMM_Subcatchments'''.
<li>Select 'Edit' from the top QGIS tab and 'Copy Features' from the drop down menu.
<li>In the QGIS Layers PanlePanel, select (left click) the '''sw03_001 >> Hydrology--Subcatchments''' layer.
<li>Make the '''sw03_001 >> Hydrology--Subcatchments''' layer editable by clicking the 'Toggle Editing' symbol [[File:toggle_editing_icon.png|27x27px]].
<li>Select 'Edit' from the top QGIS tab and click 'Paste Features' from the drop down menu.
<li>Toggle the editing off to save the edits.
<li>Remove '''SWMM_SubcatchmentsUrban_Hydrology''' from the QGIS Layers Panel.
<br><br>
{{Video|name=Animation_TS3_SWMM_Inputs_03b.mp4|width=12351236}}
<br>
 
</ol>
 
Line 149 ⟶ 155:
 
===Update SWMM Hydrology Raingages===
The text information within '''Hydrology--RaingageRaingages''' defines the pluviographs in the catchment. We will link to two different rain gages in this example. <br>
'''Note:''' 'Gage' is the American spelling of 'Gauge' in Oxford English.
 
<ol>
<li>In the QGIS Layers Panel, select (left click) '''Hydrology--RaingageRaingages''' and toggle on editing.
<li>Right click '''Hydrology--RaingageRaingages''' and select 'Open Attribute Table'.
<li>Click 'Add Feature' twice. Enter the following attributes (leave all other fields as ''NULL''):
{| class="wikitable" width="60%"
!style="background-color:#005581; font-weight:bold; color:white;"| Name
Line 164 ⟶ 170:
!style="background-color:#005581; font-weight:bold; color:white;"| Tseries
|-
| RF_G1 || Volume || 0.151 || 1 || TIMESERIES || RF_FC04
|-
| RF_G2 || Volume || 0.151 || 1 || TIMESERIES || RF_FC07
|}
For a summary of the attributes associated with '''Hydrology--RaingageRaingages''', refer to <u>[https://docs.tuflow.com/classic-hpc/release/2023-03-AD/SWMM-Input-Detailed-1.html#tab:tab-SWMM-Input-Raingages TUFLOW 2023-03-AD Release Notes (Table A.11)]</u> and the <u>[https://downloads.tuflow.com/SWMM/SWMM5_Reference_Manual_Volume1_Hydrology_P100NYRA.pdf SWMM5 Reference Manual - Volume 1 (Hydrology)]</u>.<br>
Note, the spatial locations where the gage information is applied is covered in the following section.
<li> Turn off editing and save the information.
<br><br>
{{Video|name=Animation_TS3_SWMM_Inputs_04b.mp4|width=12351236}}
<br>
</ol>
 
===Update SWMM Hydrology Subcatchments===
The information within '''Hydrology--Subcatchments''' defines the subcatchment parameters (including catchment area, width, slope, percent impervious, outlet specification and infiltration details). All required data entries have been pre-filled in the supplied dataset except the 'Area' information, which we will determine using QGIS. SWMM requires the hydrology subcatchment area information in hectares.
<ol>
<li>In the QGIS Layers Panel, select (left click) '''Hydrology--Subcatchments''' and toggle on editing.
<li>Right click '''Hydrology--Subcatchments''' and select 'Open Attribute Table'.
<li>Choose 'Area' as the target field and type the calculation expression, '''area($areageometry) / 10000'''.
:* 'area($geometry) ': Extracts the area of each region (subcatchment) in '''Hydrology--Subcatchments'''.
<li>Click '''Update All'''.
:* '/ 10000': Converts the area values into hectares.<br>
'''Note:''' The projection used in these tutorials is measured in meters. Thus, when QGIS extracts the area from a region, it reports the area in m<sup>2</sup>. If using a projection that is measured in feet, QGIS would extract the area in ft<sup>2</sup>.
<li>Click 'Update All'.
<li>Turn off editing and save the information.
<li>Inspect the attribute information within '''Hydrology--Subcatchments''' to familiarize yourself with the data. A few demonstration features have been included in the dataset.
Line 188 ⟶ 198:
For a summary of the attributes associated with the layer, refer to <u>[https://docs.tuflow.com/classic-hpc/release/2023-03-AD/SWMM-Input-Detailed-1.html#tab:tab-SWMM-Input-Subcatchments TUFLOW 2023-03-AD Release Notes (Table A.38)]</u> and the <u>[https://downloads.tuflow.com/SWMM/SWMM5_Reference_Manual_Volume1_Hydrology_P100NYRA.pdf SWMM5 Reference Manual - Volume 1 (Hydrology)]</u>.
<br><br>
{{Video|name=Animation_TS3_SWMM_Inputs_05b.mp4|width=12351236}}
<br>
</ol>
Line 196 ⟶ 206:
:*'''sw01_001.inp''' (road culverts).
:*'''sw03_001.inp''' (underground pipe network inputs and SWMM hydrology).
When TUFLOW processes SWMM inputs, it combines the multiple INP files into one single INP prior to simulation. For this model, the simulation control parameters defined in Module 1 ('''sw01_001''') '''> Project--Options''') will apply. The options relevant to this tutorial that have already been defined in the Module 1 input include:
:*'''flow_units''': set to metric.
:*'''infiltration''' method: set to Green Ampt.
We need to change the SWMM hydrology timestep details. Updating this setting in the '''sw01_001.inp''' does not impact any of the previous tutorial modules, as they did not include any hydrology components.
:*'''wetstep''' hydrology timestep: set to 1 minute.
:*'''dry step''' hydrology timestep: set to 1 minute.<br>
'''Note:''' If we wanted to change the '''Project--Options''' as a result of this modules additional data, '''Project--Options''' should have been included as a item in the earlier <u>[[TUFLOW_SWMM_Tutorial_M03#Update_SWMM_GeoPackage_Spatial_Database | SWMM GeoPackage Update]]</u> step, or SWMM GeoPackage Create step if using the model development workflow demonstrated in the previous tutorials. If the SWMM INP file reference is specified lower in the TCSF control file, the information contained in the file supersedes any duplicate information defined by INP files higher in the TCSF control file .''
<br><br>
 
===Update SWMM Junction Details===
When coupling SWMM hydrology with a 1D pipe network, updated '''Nodes--Junctions''' attribute details are needed if converting from 2D direct rainfall (rain-on-grid) model design. Now the SWMM hydrology inputs are complete, we will make the necessary changes to '''Nodes--Junctions''' in '''sw03_001.gpkg'''.<br>
 
<ol>
<li>In the QGIS Layers Panel, open the '''TS02_001.tscf''' group and select (left click) '''Nodessw01_001 >> Project--JunctionsOptions''' and toggle on editing.
<li>Right click '''Project--Options''' 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>Update the following hydrology timestep options:
<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.
:*WET_STEP: 00:01:00
:*Input Subcatchments: '''Hydrology--Subcatchments'''
:*DRY_STEP: 00:01:00
:*Input Inlet Usage Layers: '''swmm_iu_TS02_001'''
:*Input BC Connection Layers: '''2d_bc_SWMM_Pipe_Network_Connections_001_L'''
:*Maximum Depth Option: Set to 0.0
:*Nodes receiving subcatchment flows (if connected to 2D): Set Apond = 0.0; Ksur = 0.0 (overwrites options below)
:*Nodes connected to 2D with Inlets (Maximum depth): Use global option
:*Nodes connected to 2D with Inlets (Ysur): 0
:*Nodes connected to 2D with Inlets (Area of ponding): 25
:*Nodes connected to 2D without Inlets (Ysur): 0
:*Nodes connected to 2D without Inlets (Area of ponding): 50
:*Nodes without 2D Connection (Surcharge Depth): 50
:*Nodes without 2D Connection (Area of ponding): 1
<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. <br>
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_TS3_SWMM_Inputs_06b.mp4|width=12351236}}
<br>
</ol>
 
== Export SWMM INP File ==
We will now create a new INP file for the pipe network and SWMM urban hydrology inputs. Toand do this, we need to convertupdate '''sw03_001sw01_001.gpkginp''' intoto areflect SWMMthe INPchanges file.made to the hydrology options above.
 
<ol>
<li>In the QGIS Layers Panel, right click '''Hydrology--Subcatchments''' (or any other SWMM layer in the same GeoPackage) and select 'TUFLOW' > 'SWMM - Export inp file'.
<li>In the Processing Toolbox, go to TUFLOW > SWMM and select '<u>[[QGIS_SWMM_GeoPackage_Write_to_SWMM_inp |GeoPackage - Write to SWMM inp]]</u>'. This opens the dialog shown below.
<li>This will open the '<u>[[QGIS_SWMM_GeoPackage_Write_to_SWMM_inp |GeoPackage - Write to SWMM inp]]</u>' processing tool, prepopulated with the filename of the layer's GeoPackage. <br>
:*GeoPackage Input File: Navigate to the '''TUFLOW\model\swmm''' folder and select '''sw03_001.gpkg'''.
'''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 '''sw03_001.inp''' to the '''TUFLOW\model\swmm''' folder.
<li>Click 'Run'.
<li>Once the tool is finished, update the 'GeoPackage Input File' parameter. Click '...', and navigate to the '''TUFLOW\model\gis''' folder. Select '''sw01_001.gpkg'''.
<li>Click 'Run'.
<li>Once the tool is finished, click 'Close'.
<li>This tool will save the SWMM inp files in the same folder location and with the same name as the GeoPackage input file. In this case, it will save '''sw03_001.inp''' and '''sw01_001.inp''' to the '''TUFLOW\model\swmm''' folder.
<br><br>
{{Video|name=Animation_TS3_SWMM_Inputs_07b.mp4|width=12351236}}
<br>
</ol>
Line 253 ⟶ 245:
<li>Click on the ‘Import Empty File’ symbol from the TUFLOW plugin toolbar. <br>
[[File:tuflow_plugin_import_empty_file.png]]<br>
<br>
<li>Select '2d_sa' from the Empty Type list.
<li>In the Run ID box write 'TS03_001'.
<li>Tick the 'Regions' Geometry Type.
<li>In the Spatial Database Options, select 'All to one'. Navigate to the '''TUFLOW_SWMM_Module_03\TUFLOW\model\gis''' folder and select '''TS03_001.gpkg'''. Click Save and hit 'OK'.
<li>The '''2d_sa_TS03_001_L2d_sa_TS03_001_R''' appears in the QGIS Layers Panel.<br>
<br>
[[File:TS3_import_empty_2d_sa_01a.png]]<br>
<br>
<li>In Windows Explorer, navigate to the '''TUFLOW_SWMM_Module_03\Tutorial_Data''' folder. Drag and drop the '''Urban_Hydrology.gpkg''' into QGIS.
<li>In Windows File Explorer, navigate to the '''TUFLOW_SWMM_Module_03\Tutorial_Data''' folder. Drag and drop the '''Urban_Hydrology.gpkg''' into QGIS.
<li>When prompted by QGIS, select '''TUFLOW_Subcatchments'''. Click 'Add Layers'.
<li>In the QGIS Layers Panel, select (left click) the '''TUFLOW_Subcatchments''' layer.
Line 265 ⟶ 260:
<li>Select 'Edit' from the top QGIS tab and 'Copy Features' from the drop down menu.
<li>In the QGIS Layers Panel, select (left click) the '''2d_sa_TS03_001_R''' layer.
<li>Make the '''2d_sa_TS03_001_R''' layer editable by clicking the 'Toggle Editing' symbol [[File:toggle_editing_icon.png|27x27px]].
<li>Select 'Edit' from the top QGIS tab and click 'Paste Features' from the drop down menu.
<li>Toggle off editing to save the edits.
Line 271 ⟶ 267:
'''Note:''' Common hydrology software used in combination with TUFLOW by modelers include: HEC-HMS, RORB, Drains, WBNM, URBS and more.''
<br><br>
{{Video|name=Animation_TS3_TUFLOW_Inputs_01b.mp4|width=12351236}}
<br>
</ol>
Line 280 ⟶ 276:
<li>Copy '''bc_dbase_TS03_001.csv''' and '''TS03_01p2hr.csv''' from the '''TUFLOW_SWMM_Module_03\Tutorial_Data''' folder to the '''TUFLOW_SWMM_Module_03\TUFLOW\bc_dbase''' folder.
<br><br>
{{Video|name=Animation_TS3_TUFLOW_Boundary_01b.mp4|width=12351236}}
<br>
</ol>
Line 296 ⟶ 292:
===TUFLOW Control File (TCF)===
<ol>
<li>Edit '''TS03_5m_001.tcf''' by making the following reference updates:<br>
<li>Open '''TS03_001.tcf'''.
<li>Make the following reference updates:<br>
<font color="blue"><tt>Spatial Database </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\gis\TS03_001.gpkg</tt></font> <font color="green"><tt> ! Specify the location of the GeoPackage Spatial Database</tt></font><br>
<font color="blue"><tt>BC Control File</tt></font> <font color="red"><tt> == </tt></font> <font color="black"><tt>..\model\TS03_001.tbc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Boundary Condition Control File</tt></font><br>
<font color="blue"><tt>BC Database</tt></font> <font color="red"><tt> == </tt></font> <font color="black"><tt>..\bc_dbase\bc_dbase_TS03_001.csv</tt></font> <font color="green"><tt> ! Reference the Boundary Condition Database</tt></font><br>
<font color="blue"><tt>SWMM Control File</tt></font> <font color="red"><tt> == </tt></font> <font color="black"><tt>..\model\TS03_001.tscf</tt></font> <font color="green"><tt> ! Reference the SWMM (1D) Control File</tt></font><br><br>
<li> Add the following command to the '<tt><font color="green">Time Control</font></tt>' section. This command is necessary for many TUFLOW-SWMM models, especially when using SWMM hydrology. The 2D timestep dictates the SWMM 1D timestep. Generally, this timestep is adequate for SWMM but in cases where the flows are contained in the 1D, the timestep may become too large for SWMM. This command forces it into the appropriate range. If this command is neglected, some models will experience very high mass errors. The range of timesteps used is reported in the SWMM .rpt file ('''TS03_5m_001_swmm.rpt''') in the '''TUFLOW\results''' folder.<br>
 
<font color="blue"><tt>Timestep Maximum </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>3</tt></font> <font color="green"><tt> ! Specifies a maximum timestep of 3 seconds</tt></font><br>
<li> Comment out the 'Map Cuttoff Depth' command by placing a '!' at the beginning of the line. This command is only necessary for 2D direct rainfall (rain on grid) modelling (SWMM Tutorial 2).<br>
<font color="green"><tt>! Map Cutoff Depth == 0.05</tt></font><br>
<br><br>
{{Video|name=Animation_TS3_Sim_Control_01b.mp4|width=12351236}}
<br>
</ol>
Line 312 ⟶ 308:
===TUFLOW Boundary Control File (TBC)===
<ol>
<li>Edit '''TS03_001.tbc'''.
<li>Open '''TS03_001.tbc'''. If using Notepad++, right click the file reference in '''TS03_5m_001.tcf''' and select 'Open File'.
<li>Comment out the 'Global Rainfall BC' command by placing a '!' at the beginning of the line. This command is only necessary for 2D direct rainfall (rain on grid) modelling (SWMM Tutorial 2).<br>
<font color="green"><tt>! Global Rainfall BC == RF_FC04</tt></font>
<br>
<li>Add the following additional command lines:<br>
<font color="blue"><tt>Read GIS SA</tt></font><font color="red"><tt> == </tt></font><font color="black"><tt>2d_sa_TS03_001_R </tt></font><font color="green"><tt>! Reads in 2D source area - Excluding SWMM areas</tt></font><br>
<br>
<font color="blue"><tt>Read BC Timeseries</tt></font><font color="red"><tt> == </tt></font><font color="black"><tt>RF_FC04 | RF_FC07 </tt></font><font color="green"><tt>! TUFLOW BC Database / SWMM Rain Gage Linkage</tt></font><br>
{{Video|name=Animation_TS3_Sim_Control_02c.mp4|width=1236}}
<br><br>
{{Video|name=|width=1235}}
<br>
</ol>
Line 326 ⟶ 321:
===TUFLOW SWMM Control File (TSCF)===
<ol>
<li>OpenEdit '''TS03_001.tscf'''. If using Notepad++, right click the file reference in '''TS03_5m_001.tcf''' and select 'Open File'.
<li>Replace <font color="blue"><tt>Read SWMM </tt></font> <font color="red"><tt> == </tt></font> <font color="black"><tt> swmm\sw02_002sw02_001.inp with</tt></font> with the following command:<br>
<font color="blue"><tt> Read SWMM </tt></font> <font color="red"><tt> == </tt></font> <font color="black"><tt> swmm\sw03_001.inp </tt></font> <font color="green"><tt> ! 1D SWMM Pipe Network and SWMM Hydrology Input File </tt></font><br>
<li>As we are pushing flows from the subcatchments straight to the pipe network, the water level of the ponded water at the nodes can become much higher than the 2D water levels. The inlet will surcharge but the flow is throttled. The following command will pull water out of the 2D if the 1D ponded water level goes beyond 0.1 m higher than the 2D (not needed for rain on grid simulations). Add the following command:<br>
<font color="blue"><tt>Maximum Inlet Ponded Depth</tt></font><font color="red"><tt> == </tt></font><font color="black"><tt>0.1 </tt></font><font color="green"><tt>! Pull ponded water out of the 1D domain as needed</tt></font><br>
<li>Add the following command:<br>
<font color="blue"><tt>Read BC Timeseries</tt></font><font color="red"><tt> == </tt></font><font color="black"><tt>RF_FC04 | RF_FC07 </tt></font><font color="green"><tt>! TUFLOW BC Database / SWMM Rain Gage Linkage</tt></font><br>
<br>
{{Video|name=Animation_TS3_Sim_Control_03c.mp4|width=1236}}
<br>
'''<<video>>'''
</ol>
 
Line 337:
<li>Save a copy of '''_run_TS02_HPC.bat''' as '''_run_TS03_HPC.bat''' in the '''TUFLOW_SWMM_Module_03\TUFLOW\runs''' folder.
<li>Update the batch file to reference the '''TS03_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>TS03_5m_001.tcf </tt></font>
 
<li>Double clickSave the batch file and double click it in Windows File Explorer to run the simulation. <br>
<li>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>
<br>
<br><br>
'''<<video>>'''
{{Video|name=Animation_TS3_Run_Sim_01c.mp4|width=1236}}<br>
</ol>
<br>
== 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 =
Review the SWMM INP and simulation report file from the '''TUFLOW_SWMM_Module_03\TUFLOW\results''' folder to confirm the new hydrology inputs are being processed correctly:
* View '''TS03_5m_001_swmm.inp''' in a text editor to confirm the conbiningcombining of the two input INP files has occuredoccurred correctly. Also use the QGIS Processing tool, <u>[[QGIS_SWMM_GeoPackage_Create_from_SWMM_inp |GeoPackage - Create from SWMM inp ]]</u>, to view the information in QGIS.
* View '''TS03_5m_001_swmm_curves.inp''' in a text editor to confirm the rainfall time series that has been used by the SWMM hydrology engine matches the input dataset.
* View '''TS03_5m_001_swmm.rpt''' in a text editor to confirm the model computation is healthy in term of mass conservation.
 
= Results Output =
Complete the steps outlined in following link to review the simulation results from the TUFLOW SWMM model simulation:
==SWMM.rpt Output==
The SWMM simulation report can be opened using a text editor to review the 1D SWMM hydrology results.
<ol>
<li>In File Explorer, navigate to '''TUFLOW\results''' and open '''TS01_5m_001_swmm.rpt''' in Notepad++.
<li>Type Ctrl+F to display the "Find" options in Notepad++.
<li>Search for "Subcatchment Time Series Results" to navigate to the subcatchment hydrology results in tabular format. The QGIS Result Viewing section below demonstrates how to view the same timeseries data in QGIS.
</ol>
Since the above tasks were demonstrated in <u>[[TUFLOW_SWMM_Tutorial_M02_Check_QGIS |Tutorial 2]]</u>, a video of these steps has not been created.
 
<u>[[TUFLOW_SWMM_Tutorial_M03_Results_QGIS | TUFLOW SWMM Tutorial 03 Results]]</u> <br>
==QGIS Result Viewing==
<ol>
<li>Open TUFLOW Viewer from the TUFLOW Plugin toolbar.<br>
<br>
[[File:tuflow_plugin_tuflow_viewer.png]]<br>
<br>
<li> Open 1D and 2D results: Select File > 'Load Results'. Navigate to the '''TUFLOW\runs''' folder and select '''TS01_5m_001.tcf'''.
<li> When asked 'Do you want to open result GIS layer?', select 'Yes'. Five new files will load to the Layers panel:
:*'''TS03_5m_001_swmm_ts_P''': 1D SWMM Node and outlet water level results
:*'''TS03_5m_001_swmm_ts_L''': 1D SWMM conduit flow results
:*'''TS03_5m_001_PLOT_P''': 1D ESTRY and 2D plot output water level and velocity results ('''Note:''' There are no ESTRY results from this simulation)
:*'''TS03_5m_001_PLOT_L''': 1D ESTRY and 2D plot output flow results ('''Note:''' There are no ESTRY results from this simulation)
:*'''TS03_5m_001''': 2D TUFLOW results
<li>In the QGIS Layers panel, select (left click) '''TS03_5m_001''' to establish it as the active dataset. Click on a scalar dataset 'Depth' under the Result Type in the TUFLOW Viewer 'Map Outputs' list. Move the time slider to observe how the 2D results vary at different times during the simulation.<br>
<li>In the QGIS Layers Panel, left click '''TS03_5m_001_swmm_ts_P''' and select 'Zoom to Layer(s)'.
<li>Right click '''TS03_5m_001_swmm_ts_P''' again, and select 'Show Labels'.
<li>Use the 'Select Features' tool to highlight '''Pit 19''' and view the following results using the Time Series plot.
* '''Lateral Inflow''': SWMM hydrology subcatchment inflow
* '''Flood Losses''': Water passing through the pipe inlet (a positive value represents surcharge to the surface)
<li> Pipe flow and long-section results can also be viewed following the steps outlined in <u>[[TUFLOW_SWMM_Tutorial_M02_Results_QGIS |Tutorial 2]]</u>.
</ol>
<br>
'''<<Video>>'''
<br>
 
= Conclusion =
*EPA SWMM urban hydrology was added to the model (replacing 2D drect rainfall / rain-on-grid).
*The 1D SWMM pipe urban pipe network junction attributes were updated to accomodate for the change in model configuration, from 2D direct rainfall to 1D SWMM hydrology.
*Check and result files associated with the SWMM hydrology modelling were inspected.
*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>
 
=Other TUFLOW SWMM Tutorials=
 
*<u>[[TUFLOW_SWMM_Tutorial_M01 | TUFLOW SWMM Module 1]]</u> - 1D SWMM Culverts
*<u>[[TUFLOW_SWMM_Tutorial_M02 | TUFLOW SWMM Module 2]]</u> - 1D SWMM Pipe Network / 2D TUFLOW Direct Rainfall Hydrology
*<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>
{{Tips Navigation