Tutorial M06: Difference between revisions
Content deleted Content added
| (34 intermediate revisions by 4 users not shown) | |||
Line 22:
<li>Navigate to the '''Module_06\Tutorial_Data''' folder. Copy the '''rainfall_stations.csv''' and paste it in the ''' Module_06\TUFLOW\bc_dbase''' folder. This file contains the rainfall hyetographs.
<li>Open the file, there are 4 columns labelled ‘RF_FC04’ to ‘RF_FC07’. Part 1 references 'RF_FC04', the remaining hyetographs are used in Part 2. <br>
<br>[[File:
<br>
<li>Save a copy of the '''bc_dbase.csv''' as '''bc_dbase_M06_001.csv'''.
<li>Open the file and add the additional rainfall boundary conditions as shown below:<br>
<br>
[[File:
<br>
<li>Save the bc_dbase.
Line 35:
Surface roughness or bed resistance values (e.g. Manning’s n) are assigned to material IDs. Depth varying roughness values are used in direct rainfall models to reflect the bed roughness at shallow depths. <br>
<ol>
<li>Copy the '''materials_M06_001.csv''' file from the '''Module_06\Tutorial_Data''' folder into the '''Module_06\TUFLOW\model''' folder. Depth
<br>
[[File:M06 Materials 001.png]]<br>
<br>
<li>For Material ID 1, 3 and
:*Below depth y1 (m), a Manning’s n value of n1 is applied
:*Above depth y2 (m), a Manning’s n value n2 is applied
:*Between y1 and y2, the Manning’s n value is interpolated between n1 and n2. The default interpolation method uses a curved fit so that the n values transition gradually.
<li>For example, for Material ID 1, for depths of water below 0.03m a Manning's n value of 0.10 is applied. For depths of water greater than 0.1m, a Manning's n value of 0.06 is applied. Between 0.03 to 0.1m, a Manning's n value is interpolated between 0.1 and 0.06
<br>▼
<br>▼
<li>For Material ID 2 and 4, the Manning’s n value specified in the second column will be applied at all depths, i.e. a value of 0.022 for Material ID 2.
</ol>
Line 53 ⟶ 56:
<li>Open the '''M06_001.tbc''' in a text editor.
<li>The current rainfall versus time inflows (2d_sa) are replaced in this tutorial. The base inflow and outflow (2d_bc) remain the same. Comment out the 'Read GIS SA' command by placing '!' at the beginning: <br>
<u>'''QGIS - SHP'''</u><br>
<font color="green"><tt>! Read GIS SA == gis\2d_sa_M01_001_R.shp</tt></font><br>
<u>'''QGIS - GPKG'''</u><br>
<font color="green"><tt>! Read GIS SA == 2d_sa_M01_001_R</tt></font><br>
<li>Add the following command line:<br>
<font color="blue"><tt>Global Rainfall BC </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>RF_FC04</tt></font><font color="green"><tt> ! Reads in global rainfall</tt></font>
Line 63 ⟶ 69:
<ol>
<li>Save a copy of '''M02_5m_001.tcf''' as '''M06_5m_001.tcf''' in the '''Module_06\TUFLOW\runs''' folder.
<li>Open the '''M06_5m_001.tcf''' in a text editor and
<font color="blue"><tt>BC Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M06_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_M06_001.csv</tt></font> <font color="green"><tt> ! Reference the Boundary Conditions Database</tt></font> <br>
<font color="blue"><tt>Read Materials File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\materials_M06_001.csv</tt></font> <font color="green"><tt> ! Reference the Materials Definition File</tt></font> <br>
<li>A Timestep Maximum command is required in direct rainfall modelling to ensure the timestep does not get too large during periods where cells are dry (causing the model to become unstable). Include the
<font color="blue"><tt>Timestep Maximum </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2.5</tt></font> <font color="green"><tt> ! Specifies a maximum timestep of 2.5 seconds</tt></font> <br>
<li>Add Cumulative Rainfall (RFC), Rainfall Rate (RFR) and Manning's n (n) as additional Map Output Data Types. These outputs are discussed in the Results section. <br>
<font color="blue"><tt>Map Output Data Types </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> h V d dt RFC RFR n </tt></font> <font color="green"><tt> ! Outputs water levels, velocities, depths, minimum timestep, cumulative rainfall, rainfall rate, manning's n</tt></font> <br>
<li>A Map Cutoff Depth is useful for direct rainfall modelling where there is a need to differentiate between very shallow sheet flow and flooding. Include the following command in the <font color="green"><tt> ! OUTPUT SETTINGS</tt></font> section:<br>
<font color="blue"><tt>Map Cutoff Depth </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> 0.
<li>Save the TCF.
</ol>
Line 82 ⟶ 86:
<li>Save a copy of '''_run_M02_HPC.bat''' as '''_run_M06_HPC.bat''' in the '''Module_06\TUFLOW\runs''' folder.
<li>Update the batch file to reference the '''M06_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\
<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>M06_5m_001.tcf </tt></font> <br>
Line 98 ⟶ 102:
<li>Review the hyetograph information. When using the direct rainfall approach, a rainfall depth fallen in a particular increment of time is input. TUFLOW converts this depth per time increment to a flow (m<sup>3</sup>/s) and applies this flow at each cell. The TLF shows this conversion:<br>
<br>
[[File:
<br>
</ol>
Line 114 ⟶ 118:
== GIS Inputs ==
Create, import and view input data:<br>
:*<u>[[Tutorial_M06_002_GIS_Inputs_QGIS | QGIS - SHP]]</u><br>
:*<u>[[Tutorial_M06_002_GIS_Inputs_QGIS_GPKG | QGIS - GPKG]]</u><br>
== Materials ==
Line 123 ⟶ 128:
<li>Update the Rainfall Losses column for Material 1D 1 (pasture) and 10 (vegetated creek) with an initial loss of 20mm and continuing loss of 5mm/hr:<br>
<br>
[[File:M06 Materials
<br>
<li>Save the materials file.
Line 134 ⟶ 139:
<li>Open the '''M06_002.tbc''' in a text editor.
<li>Comment out the Global Rainfall command and add the Read GIS RF command:<br>
<u>'''QGIS - SHP'''</u><br>
<font color="green"><tt>! Global Rainfall BC == RF_FC04 </tt></font><br>
<font color="blue"><tt>Read GIS RF </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_rf_M06_polygons_002_R.shp</tt></font><font color="green"><tt> ! Reads in 2D rainfall boundaries</tt></font><br>
<u>'''QGIS - GPKG'''</u><br>
<font color="green"><tt>! Global Rainfall BC == RF_FC04 </tt></font><br>
<font color="blue"><tt>
<li>Save the TBC.
</ol>
Line 142 ⟶ 151:
<ol>
<li>Save a copy of '''M06_5m_001.tcf''' as '''M06_5m_002.tcf''' in the '''Module_06\TUFLOW\runs''' folder.
<li>Open the '''M06_5m_002.tcf''' in a text editor and
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>BC Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M06_002.tbc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Boundary Conditions Control File</tt></font> <br>
<font color="blue"><tt>Read Materials File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\materials_M06_002.csv</tt></font> <font color="green"><tt> ! Reference the Materials Definition 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\M06_002.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\M06_002.tbc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Boundary Conditions Control File</tt></font> <br>
<font color="blue"><tt>Read Materials File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\materials_M06_002.csv</tt></font> <font color="green"><tt> ! Reference the Materials Definition File</tt></font> <br>
<li>Add Material Rainfall Loss (RFML) as an additional Map Output Data Type. This output is discussed in the Results section. <br>
<font color="blue"><tt>Map Output Data Types </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> h V d dt RFC RFR n RFML </tt></font> <font color="green"><tt> ! Outputs water levels, velocities, depths, minimum timestep, cumulative rainfall, rainfall rate, material based rainfall loss</tt></font>
<li>Save the TCF.</ol>
Line 162 ⟶ 175:
<li>Open the '''M06_5m_002.tlf''' from the '''Module_06\TUFLOW\runs\log''' folder in a text editor.
<li>Review the losses applied in the materials layer:<br>
{{Video|name=Animation_M06_Check_002_01c.mp4|width=826}}<br>
▲<br>
▲[[File:Animation M06 Check 002 01.gif]]<br>
▲<br>
<li>Review the hyetograph information. The TLF shows the conversion for each histogram:<br>
{{Video|name=Animation_M06_Check_002_02a.mp4|width=826}}<br>
</ol>
Line 179 ⟶ 188:
== GIS Inputs ==
Create, import and view input data:<br>
:*<u>[[Tutorial_M06_003_GIS_Inputs_QGIS | QGIS - SHP]]</u><br>
:*<u>[[Tutorial_M06_003_GIS_Inputs_QGIS_GPKG | QGIS - GPKG]]</u><br>
== Simulation Control Files ==
===TUFLOW Rainfall Control File (TRFC) ===
The TRFC commands generate rainfall grids based on point rainfall gauges. There are three spatial interpolation methods available, this tutorial uses Inverse Distance Weighting (IDW). For more information on IDW and the other available methods,
The TRFC is processed during model initialisation, outputting a series of rainfall grids which are used by the simulation to vary the rainfall over the 2D domain. The rainfall grids are output to a separate folder '''RFG\<TCF name>''' in the location of the TRFC (e.g. '''Module_06\TUFLOW\model\RFG\M06_5m_003'''). This approach reduces memory usage while TUFLOW is running. <br>
<ol>
<li>Create a new text file '''M06_point2grid_003.trfc''' and save it in the '''Module_06\TUFLOW\model''' folder.
<li>Add the following commands:<br>
<u>'''QGIS - SHP'''</u><br>
▲<font color="blue"><tt>RF Grid Format </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>FLT</tt></font> <font color="green"><tt> ! Sets the output grid format</tt></font> <br>
<font color="blue"><tt>RF Grid Format </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>TIF</tt></font> <font color="green"><tt> ! Sets the output grid format</tt></font> <br>
<font color="blue"><tt>RF Interpolation Method </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>IDW</tt></font> <font color="green"><tt> ! Sets the interpolation approach between rainfall locations </tt></font> <br>
<font color="blue"><tt>RF Grid Cell Size </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>25</tt></font> <font color="green"><tt> ! Sets the cell size for the generated rainfall grids</tt></font> <br>
<font color="blue"><tt>Read GIS RF Points </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_rf_M06_pt2grid_003_P.shp</tt></font> <font color="green"><tt> ! Reads the point rainfall locations in the 2d_rf file format</tt></font> <br>
<u>'''QGIS - GPKG'''</u><br>
<font color="blue"><tt>RF Grid Format </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>TIF</tt></font> <font color="green"><tt> ! Sets the output grid format</tt></font> <br>
<font color="blue"><tt>RF Interpolation Method </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>IDW</tt></font> <font color="green"><tt> ! Sets the interpolation approach between rainfall locations </tt></font> <br>
<font color="blue"><tt>RF Grid Cell Size </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>25</tt></font> <font color="green"><tt> ! Sets the cell size for the generated rainfall grids</tt></font> <br>
<font color="blue"><tt>Read GIS RF Points </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>2d_rf_M06_pt2grid_003_P</tt></font> <font color="green"><tt> ! Reads the point rainfall locations in the 2d_rf file format</tt></font> <br>
<li>Save the TRFC.</ol>
Line 198 ⟶ 215:
<li>Save a copy of '''M06_002.tbc''' as '''M06_003.tbc''' in the '''Module_06\TUFLOW\model''' folder.
<li>Open the '''M06_003.tbc''' in a text editor and comment out the Read GIS RF command:<br>
<u>'''QGIS - SHP'''</u><br>
<font color="green"><tt>! Read GIS RF == gis\2d_rf_M06_polygons_002_R.shp </tt></font><br>
<u>'''QGIS - GPKG'''</u><br>
<font color="green"><tt>! Read GIS RF == 2d_rf_M06_polygons_002_R </tt></font><br>
<li>Save the TBC.</ol>
Line 204 ⟶ 224:
<ol>
<li>Save a copy of '''M06_5m_002.tcf''' as '''M06_5m_003.tcf''' in the '''Module_06\TUFLOW\runs''' folder.
<li>Open the '''M06_5m_003.tcf''' in a text editor and
<u>'''QGIS - SHP'''</u><br>
<font color="blue"><tt>BC Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>..\model\M06_003.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\M06_003.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\M06_003.tbc</tt></font> <font color="green"><tt> ! Reference the TUFLOW Boundary Conditions Control File</tt></font> <br>
<li>Include a reference to the TRFC in the Model Inputs section: <br>
<font color="blue"><tt>Rainfall Control File </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt> ..\model\M06_point2grid_003.trfc </tt></font> <font color="green"><tt> ! Reference the TUFLOW Rainfall Control File</tt></font> <br>
<li>Save the TCF.</ol>
Line 221 ⟶ 245:
:*Navigate to the '''Module_06\TUFLOW\model\RFG\M05_5m_003''' folder with rainfall grids created from the rainfall interpolation.
:*The timestep matches the one specified in the rainfall hyetographs (10 minutes). Hours are used in the rainfall grids names:<br>
<ol>[[File:
</ol><br>
:*A total rainfall depth '''M06_5m_003_rf_total.
<ol>
<br>
Line 236 ⟶ 260:
= Conclusion =
:*Direct rainfall approach was used in three ways - applied globally, to separate polygons using 2d_rf layer and varying temporally and spatially using a TUFLOW Rainfall Control (TRFC).
:*Depth varying material values were used.
:*Rainfall losses were applied in the materials layer.
:*TUFLOW log files and rainfall grids were used to check the rainfall was applied correctly.
:*Map outputs RFC, RFR, n and RFML 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>
:*Alternatively, see the <u>[[TUFLOW_Example_Models#Example_Model_Catalogue | TUFLOW Example Models]]</u> to explore the full list of TUFLOW features.
<br>
Line 247 ⟶ 274:
<li>Open the csv. The file requires two columns, the first is time (in simulation hours) and the second is the rainfall grid.<br>
<br>
[[File:
<br>
<li>Save a copy of '''M06_5m_003.tcf''' as '''M06_5m_004.tcf'''. Change the commands to read in the grids created in the RFG folder:<br>
<font color="green"><tt>! Rainfall Control File == ..\model\M06_point2grid_003.trfc ! Reference the Rainfall Control File</tt></font> <br>
<font color="blue"><tt>Read Grid RF </tt></font> <font color="red"><tt>== </tt></font> <tt> ..\bc_dbase\M06_004_rf.csv </tt> <br>
<li>Save the TCF, update the batch file and run the model.
<li>Compare the results with the Part 3 results.
<li>Check the run times in the '''_ TUFLOW Simulations.log''' from the '''TUFLOW\runs''' folder. For large models, the initialisation time is faster with the gridded rainfall set up.
| |||