Tutorial M11: Difference between revisions

Content deleted Content added
 
(9 intermediate revisions by 4 users not shown)
Line 17:
<ol><ol><li>1d_wll: A layer used to define 1D water level lines (to display 1D results in 2D map outputs). </ol></ol>
:*TBC layers:
<ol><ol><li> 2d_bc: A layer defining the locations of 1D/2D boundaries.<br/ol></ol>
:*TCF layers:
<ol><ol><li>0d_rl: A layer defining the reporting locations.</ol></ol>
 
 
</ol></ol>
'''Module 11 builds from the model created in <u>[[Tutorial_M02 | Module 2]]</u>. The completed Module 2 model is provided in the Module_11\TUFLOW folder.''' <br>
<br>
Line 28:
== GIS Inputs ==
Create, import and view input data:
:*<u>[[Tutorial_M11_001_GIS_Inputs_QGIS | QGIS - SHP]]</u>
:*<u>[[Tutorial_M11_001_GIS_Inputs_QGIS_GPKG | QGIS - GPKG]]</u>
 
== Boundary Condition Database (bc_dbase) ==
Line 52 ⟶ 53:
<li>Create a new text file '''M11_001.ecf''' and save it in the '''Module_11\TUFLOW\model''' folder.
<li>Add the following command lines: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="green"><tt>! 1D TIME CONTROL</tt></font> <br>
<font color="blue"><tt>Timestep </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>0.5</tt></font> <font color="green"><tt> ! Specifies a 1D computational timestep as 0.5 seconds</tt></font> <br>
Line 62 ⟶ 64:
<font color="green"><tt>! 1D WATER LEVEL LINES</tt></font> <br>
<font color="blue"><tt>Read GIS WLL </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\1d_wll_M11_001_L.shp</tt></font> <font color="green"><tt> ! Displays 1D results in 2D map output result files</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="green"><tt>! 1D TIME CONTROL</tt></font> <br>
<font color="blue"><tt>Timestep </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>0.5</tt></font> <font color="green"><tt> ! Specifies a 1D computational timestep as 0.5 seconds</tt></font> <br>
<font color="green"><tt>! 1D ELEMENTS</tt></font> <br>
<font color="blue"><tt>Read GIS Network </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>1d_nwk_M03_culverts_001_L</tt></font> <font color="green"><tt> ! Defines culverts</tt></font> <br>
<font color="blue"><tt>Read GIS Network </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>1d_nwk_M11_channels_001_L</tt></font> <font color="green"><tt> ! Reads in open channels</tt></font> <br>
<font color="blue"><tt>Read GIS Table Links </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>1d_xs_M11_channels_001_L</tt></font> <font color="green"><tt> ! References cross-section data stored in separate csv files</tt></font> <br>
<font color="green"><tt>! 1D BOUNDARY CONDITIONS</tt></font> <br>
<font color="blue"><tt>Read GIS BC </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>1d_bc_M11_001_P</tt></font> <font color="green"><tt> ! Reads in 1D boundary conditions</tt></font> <br>
<font color="green"><tt>! 1D WATER LEVEL LINES</tt></font> <br>
<font color="blue"><tt>Read GIS WLL </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>1d_wll_M11_001_L</tt></font> <font color="green"><tt> ! Displays 1D results in 2D map output result files</tt></font> <br>
<li>Save the ECF. <br>
</ol>
Line 69 ⟶ 82:
<li>Save a copy of the '''M02_001.tgc''' as '''M11_001.tgc''' in the '''Module_11\TUFLOW\model''' folder.
<li>Open the '''M11_001.tgc''' in a text editor and add the following line after the 'Read GIS Code' command: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>Read GIS Code</tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_code_M11_null_creek_001_R.shp</tt></font> <font color="green"><tt> ! Deactivates cells where the channel has been modelled in 1D</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="blue"><tt>Read GIS Code</tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_code_M11_null_creek_001_R</tt></font> <font color="green"><tt> ! Deactivates cells where the channel has been modelled in 1D</tt></font> <br>
<li>Add the following line after the 'Read GIS Z Shape' command: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>Read GIS Z Shape </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_zsh_M11_hx_001_L.shp | gis\2d_zsh_M11_hx_001_P.shp</tt></font> <font color="green"><tt> ! Defines the bank crest levels</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="blue"><tt>Read GIS Z Shape </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_zsh_M11_hx_001_L | 2d_zsh_M11_hx_001_P</tt></font> <font color="green"><tt> ! Defines the bank crest levels</tt></font> <br>
<li>Save the TGC.
</ol>
Line 80 ⟶ 99:
<li>Save a copy of the '''M01_001.tbc''' as '''M11_001.tbc''' in the '''Module_11\TUFLOW\model''' folder.
<li>Open the '''M11_001.tbc''' in a text editor and comment out or delete the below line, 1D boundaries are used instead: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="green"><tt>! Read GIS BC == gis\2d_bc_M01_001_L.shp ! Reads in 2D boundaries</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="green"><tt>! Read GIS BC == 2d_bc_M01_001_L ! Reads in 2D boundaries</tt></font> <br>
<li>Add reference to the new boundaries at the end of the TBC: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="green"><tt>! INTERNAL 1D/2D BOUNDARIES</tt></font> <br>
<font color="blue"><tt>Read GIS BC </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_bc_M03_culverts_001_P.shp</tt></font> <font color="green"><tt> ! Links 1D culverts to 2D domain</tt></font> <br>
<font color="blue"><tt>Read GIS BC </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_bc_M11_hx_001_L.shp</tt></font> <font color="green"><tt> ! Reads in HX boundaries linking 1D channel to 2D domain</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="green"><tt>! INTERNAL 1D/2D BOUNDARIES</tt></font> <br>
<font color="blue"><tt>Read GIS BC </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_bc_M03_culverts_001_P</tt></font> <font color="green"><tt> ! Links 1D culverts to 2D domain</tt></font> <br>
<font color="blue"><tt>Read GIS BC </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_bc_M11_hx_001_L</tt></font> <font color="green"><tt> ! Reads in HX boundaries linking 1D channel to 2D domain</tt></font> <br>
<li>Save the TBC.
</ol>
Line 93 ⟶ 120:
<li>Open the '''M11_5m_001.tcf''' in a text editor and add the following line in the 'Model Inputs' section: <br>
<font color="blue"><tt>ESTRY Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\model\M11_001.ecf </tt></font> <font color="green"><tt> ! Reference the ESTRY (1D) Control File</tt></font> <br>
<li>UpdateMake the following reference of the TGC fileupdates: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>Geometry Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M11_001.tgc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Geometry Control File</tt></font> <br>
<font color="blue"><tt>BC Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M11_001.tbc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Boundary Conditions 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_M11_001.csv</tt></font> <font color="green"><tt> ! Reference the Boundary Conditions Database</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="blue"><tt>Spatial Database </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\gis\M11_001.gpkg</tt></font> <font color="green"><tt> ! Specify the location of the GeoPackage Spatial Database</tt></font> <br>
<font color="blue"><tt>Geometry Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M11_001.tgc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Geometry Control File</tt></font> <br>
<li>Update the reference of the TBC file: <br>
<font color="blue"><tt>BC Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M11_001.tbc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Boundary Conditions Control File</tt></font> <br>
<li>Update the reference of the boundary conditions database file: <br>
<font color="blue"><tt>BC Database </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\bc_dbase\bc_dbase_M11_001.csv</tt></font> <font color="green"><tt> ! Reference the Boundary Conditions Database</tt></font> <br>
<li>Remove reference to the 2D plot outputs and replace with reference to the reporting locations: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="green"><tt>! Read GIS PO == ..\model\gis\2d_po_M01_001_L.shp ! Reads in plot output line</tt></font> <br>
<font color="green"><tt>! Read GIS PO == ..\model\gis\2d_po_M01_001_P.shp ! Reads in plot output point</tt></font> <br>
<font color="blue"><tt>Read GIS Reporting Location </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\gis\0d_rl_M11_001_L.shp</tt></font> <font color="green"><tt> ! Reads in reporting location line</tt></font> <br>
<font color="blue"><tt>Read GIS Reporting Location </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\gis\0d_rl_M11_001_P.shp</tt></font> <font color="green"><tt> ! Reads in reporting location point</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="green"><tt>! Read GIS PO == 2d_po_M01_001_L ! Reads in plot output line</tt></font> <br>
<font color="green"><tt>! Read GIS PO == 2d_po_M01_001_P ! Reads in plot output point</tt></font> <br>
<font color="blue"><tt>Read GIS Reporting Location </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>0d_rl_M11_001_L</tt></font> <font color="green"><tt> ! Reads in reporting location line</tt></font> <br>
<font color="blue"><tt>Read GIS Reporting Location </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>0d_rl_M11_001_P</tt></font> <font color="green"><tt> ! Reads in reporting location point</tt></font> <br>
<li>Save the TCF.
</ol>
Line 111 ⟶ 148:
<li>Save a copy of '''_run_M02_HPC.bat''' as '''_run_M11_HPC.bat''' in the '''Module_11\TUFLOW\runs''' folder.
<li>Update the batch file to reference the '''M11_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\2020-10-AD2025.1.0\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>M11_5m_001.tcf </tt></font> <br>
<li>Double click the batch file in file explorer to run the simulation. <br>
</ol>
 
== Troubleshooting ==
See tips on common mistakes and troubleshooting steps if the model doesn't run:
:*<u>[[Tutorial_Troubleshooting_QGIS | QGIS]]</u>
 
== Check Files ==
While the model is running, review the added features are specified correctly:
:*<u>[[Tutorial_M11_001_Check_Files_QGIS | QGIS - SHP]]</u>
:*<u>[[Tutorial_M11_001_Check_Files_QGIS_GPKG | QGIS - GPKG]]</u>
 
== Results ==
Line 131 ⟶ 173:
== GIS Inputs ==
Create, import and view input data:
:*<u>[[Tutorial_M11_002_GIS_Inputs_QGIS | QGIS - SHP]]</u>
:*<u>[[Tutorial_M11_002_GIS_Inputs_QGIS_GPKG | QGIS - GPKG]]</u>
 
== Simulation Control Files ==
Line 138 ⟶ 181:
<li>Save a copy of the '''M11_001.ecf''' as '''M11_002.ecf''' in the '''Module_11\TUFLOW\model''' folder.
<li>Open the '''M11_002.ecf''' in a text editor and update the following reference: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>Read GIS Network </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\1d_nwk_M11_culverts_002_L.shp</tt></font> <font color="green"><tt> ! Defines culverts</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="blue"><tt>Read GIS Network </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>1d_nwk_M11_culverts_002_L</tt></font> <font color="green"><tt> ! Defines culverts</tt></font> <br>
<li>Add the following commands:<br>
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>Read GIS Network </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\1d_nwk_M11_bridges_002_L.shp</tt></font> <font color="green"><tt> ! Defines bridges</tt></font> <br>
<font color="blue"><tt>Read GIS Network </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\1d_nwk_M11_weirs_002_L.shp</tt></font> <font color="green"><tt> ! Defines weirs</tt></font> <br>
<font color="blue"><tt>Read GIS Table Links </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>xs\1d_xs_M11_bridges_002_L.shp</tt></font> <font color="green"><tt> ! References bridges cross section data stored in separate csv</tt></font> <br>
<font color="blue"><tt>Read GIS Table Links </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>xs\1d_xs_M11_weirs_002_L.shp</tt></font> <font color="green"><tt> ! References weirs cross section data stored in separate csv</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="blue"><tt>Read GIS Network </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>1d_nwk_M11_bridges_002_L</tt></font> <font color="green"><tt> ! Defines bridges</tt></font> <br>
<font color="blue"><tt>Read GIS Network </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>1d_nwk_M11_weirs_002_L</tt></font> <font color="green"><tt> ! Defines weirs</tt></font> <br>
<font color="blue"><tt>Read GIS Table Links </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>1d_xs_M11_bridges_002_L</tt></font> <font color="green"><tt> ! References bridges cross section data stored in separate csv</tt></font> <br>
<font color="blue"><tt>Read GIS Table Links </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>1d_xs_M11_weirs_002_L</tt></font> <font color="green"><tt> ! References weirs cross section data stored in separate csv</tt></font> <br>
<li>Save the ECF.
</ol>
Line 151 ⟶ 203:
<li>Save a copy of the '''M11_001.tgc''' as '''M11_002.tgc''' in the '''Module_11\TUFLOW\model''' folder.
<li>Open the '''M11_002.tgc''' in a text editor and update the following references: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>Read GIS Code </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_code_M11_null_creek_002_R.shp</tt></font> <font color="green"><tt> ! Deactivates cells where the channel has been modelled in 1D </tt></font> <br>
<font color="blue"><tt>Read GIS Z Shape </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_zsh_M11_hx_002_L.shp | gis\2d_zsh_M11_hx_001_P.shp</tt></font> <font color="green"><tt> ! Defines the bank crest levels</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="blue"><tt>Read GIS Code </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_code_M11_null_creek_002_R</tt></font> <font color="green"><tt> ! Deactivates cells where the channel has been modelled in 1D </tt></font> <br>
<font color="blue"><tt>Read GIS Z Shape </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_zsh_M11_hx_002_L | 2d_zsh_M11_hx_001_P</tt></font> <font color="green"><tt> ! Defines the bank crest levels</tt></font> <br>
<li>Save the TGC.
</ol>
Line 159 ⟶ 215:
<ol>
<li>Save a copy of the '''M11_001.tbc''' as '''M11_002.tbc''' in the '''Module_11\TUFLOW\model''' folder.
<li>Open the '''M03_001M11_002.tbc''' in a text editor and update the following reference: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>Read GIS BC </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_bc_M11_hx_002_L.shp</tt></font> <font color="green"><tt> ! Reads in HX boundaries linking 1D channel to 2D domain</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="blue"><tt>Read GIS BC </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_bc_M11_hx_002_L</tt></font> <font color="green"><tt> ! Reads in HX boundaries linking 1D channel to 2D domain</tt></font> <br>
<li>Save the TBC.
</ol>
Line 167 ⟶ 226:
<ol>
<li>Save a copy of the '''M11_5m_001.tcf''' as '''M11_5m_002.tcf''' in the '''Module_11\TUFLOW\runs''' folder.
<li>Open the '''M11_5m_002.tcf''' in a text editor and updatemake the ECFfollowing reference updates: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>ESTRY Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\model\M11_002.ecf </tt></font> <font color="green"><tt> ! Reference the ESTRY (1D) Control File</tt></font> <br>
<font color="blue"><tt>Geometry Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M11_002.tgc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Geometry Control File</tt></font> <br>
<font color="blue"><tt>BC Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M11_002.tbc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Boundary Conditions Control File</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="blue"><tt>Spatial Database </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\model\gis\M11_002.gpkg </tt></font> <font color="green"><tt>! Specify the location of the GeoPackage Spatial Database</tt></font> <br>
<font color="blue"><tt>ESTRY Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\model\M11_002.ecf </tt></font> <font color="green"><tt> ! Reference the ESTRY (1D) Control File</tt></font> <br>
<li>Update the reference of the TGC file: <br>
<font color="blue"><tt>Geometry Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M11_002.tgc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Geometry Control File</tt></font> <br>
<li>Update the reference of the TBC file: <br>
<font color="blue"><tt>BC Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M11_002.tbc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Boundary Conditions Control File</tt></font> <br>
<li>Save the TCF.
Line 178 ⟶ 241:
== Running the Simulation ==
Update the batch file created in the first part of Module 11 to reference the '''M11_5m_002.tcf''' file. Save the batch file and double click it in file explorer to run the simulation. <br>
 
== Troubleshooting ==
See tips on common mistakes and troubleshooting steps if the model doesn't run:
:*<u>[[Tutorial_Troubleshooting_QGIS | QGIS]]</u>
 
== Check Files ==
While the model is running, review the added features are specified correctly:
:*<u>[[Tutorial_M11_002_Check_Files_QGIS | QGIS - SHP]]</u>
:*<u>[[Tutorial_M11_002_Check_Files_QGIS_GPKG | QGIS - GPKG]]</u>
 
== Results ==
Line 191 ⟶ 259:
:*A model with 1D open channel embedded into 2D floodplain was created.
:*The 1D open channel conveyed flow underneath the roads through 1D culverts.
:*Bridges were modelled in 1D, with overflow occurring in the 2D for the upstream bridge and 1D weir for the downstream bridge.
:*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>
:*Alternatively, see the <u>[[TUFLOW_Example_Models#Example_Model_Catalogue | TUFLOW Example Models]]</u> to explore the full list of TUFLOW features.
 
<br>