Flood Modeller Tutorial Module01: Difference between revisions
Content deleted Content added
No edit summary |
|||
| (50 intermediate revisions by 8 users not shown) | |||
Line 2:
In this module we will link an existing 2D TUFLOW domain to an existing Flood Modeller 1D model. The 2D TUFLOW domain will represent the floodplain in the study area, and the 1D Flood Modeller model will represent the watercourse and all online structures. <br>
1D-2D linked models are able to utilise the individual benefits of 1D and 2D solution schemes. In this example, the 1D Flood Modeller scheme is used to represent the watercourses where the flow is essentially
<br>
As [[
[[file:Poor_2d_rep.png|400px]]<br>
Using a cell size that is coarse relative to the width of the
* decrease the width of the 2D cells; and/or
* model the channel as a 1D network, dynamically linked to the 2D domain (the floodplain).
In the [[
TUFLOW may be dynamically linked to 1D networks using the hydrodynamic solutions of ESTRY (TUFLOW 1D), Flood Modeller
Setting up a 1D/2D model where the 1D channel cuts through the 2D domain is probably the most time-consuming type of a model to setup. However, the reduction in simulation time can be beneficial and make this a good approach. For this module, the complete Flood Modeller 1D model has been provided, to allow for progressing through the module in a relatively short period of time.<br>
=Existing Model Data=
This tutorial builds upon the 2D TUFLOW domain that was constructed as part of [[Tutorial
The model developed in these tutorial modules already contains some culverts modelled as 1D elements. The culverts are modelled in ESTRY, TUFLOW's internal 1D engine. One of these culverts will be kept in ESTRY and the other will be
The 2D boundary conditions (upstream inflows and downstream stage-discharge boundary) will be removed from the model. These will instead be represented in Flood Modeller as it is a more typical schematisation for a 1D/2D linked model.<br>
The existing TUFLOW model consists of:
Line 24 ⟶ 25:
*1D/2D boundary links to connect the 1D ESTRY culverts to the 2D TUFLOW domain.
==Flood Modeller==
Line 33 ⟶ 34:
*<b>IEF</b>: A blank folder in which to store Flood Modeller Event Files used to simulate the model.
*<b>RES</b>: A blank folder in which to write the Flood Modeller result files.
For further information on each file type, please refer to the [
For this tutorial, the floodplain of the study area will be modelled entirely in TUFLOW.
The cross-sections in the Flood Modeller 1D model have been trimmed to the top of bank to ensure there is no double-counting of storage within the floodplain.
Upstream and downstream boundary data is contained separately within the IED files. These will be referenced and linked to the Flood Modeller 1D model via the IEF
=GIS and Model Inputs=
Line 69 ⟶ 70:
==TUFLOW Control Files==
==TUFLOW Geometry Control File==
We will first update the TUFLOW Geometry Control (TGC) file.
* We have deactivated the cells along the watercourse which are represented in the 1D Flood Modeller component of the model
* We have enforced bank elevations along the watercourse.
<br>
<ol>
<li> In the
<li> Open <b>FMT_M01_001.tgc</b><br>
'''Mapinfo'''<br>
Add an extra command line
:<font color="blue"><tt>Read GIS Code BC </tt></font> <font color="red"><tt>== </tt></font> mi\
Note that the order of the commands is important. The layer '''2d_code_FMT_M01_001.MIF''' first activates cells within the modelled area then the layer '''2d_bc_FMT_M01_HX_001_R.MIF''' deactivates selected cells along the watercourse.<br>
'''Other GIS'''<br>
Add an extra command line
:<font color="blue"><tt>Read GIS Code BC </tt></font> <font color="red"><tt>== </tt></font> gis\
Note that the order of the commands is important. The layer '''2d_code_FMT_M01_001_R.shp''' first activates cells within the modelled area then the layer '''2d_bc_FMT_M01_HX_001_R.shp''' deactivates selected cells along the watercourse.
<li> Topography amendments should be added in a new section at the bottom of the TGC. These are: </li>
'''Mapinfo'''<br>
:<font color="blue"><tt>Read GIS Z HX Line MAX </tt></font> <font color="red"><tt>==</tt></font> mi\
The two GIS layers must be read in together on the same command line. This tells TUFLOW to associate the points within the '''2d_bc_FMT_M01_HX_001_P.MIF''' layer (defining elevation) with the polylines within the '''2d_bc_FMT_M01_HX_001_L.MIF''' layer (defining bank location).
'''Other GIS'''<br>
:<font color="blue"><tt>Read GIS Z HX Line MAX </tt></font> <font color="red"><tt>==</tt></font> gis\2d_bc_FMT_M01_HX_001_L.shp | gis\2d_bc_FMT_M01_HX_001_P.shp <font color="green"><tt>! Defines the bank crest levels (1D/2D boundary cell elevations). The 'MAX' option prevents any zpt elevations from being lowered </tt></font>
The two GIS layers must be read in together on the same command line. This tells TUFLOW to associate the points within the '''2d_bc_FMT_M01_HX_001_P.shp''' layer (defining elevation) with the polylines within the '''2d_bc_FMT_M01_HX_001_L.shp''' layer (defining bank location).
<li> Save the file. The geometry control file is now ready to be used.
</ol>
==TUFLOW Boundary Condition Control File==
We will now update the TUFLOW Boundary Condition control file (tbc) to reference the model boundary files created in previous steps.
<li>
<li>
<li>
<ol>
Line 106 ⟶ 111:
<li> Remove the boundary linking to the TUFLOW inflows by:<br>
'''Mapinfo'''
:Put an exclamation mark before the line reading. This tells TUFLOW to treat this command line as a comment:<br>
:<font color="blue"><tt>Read GIS BC</tt></font> <font color="red"><tt>== </tt></font> mi\
'''Other GIS'''
:Put an exclamation mark before the line reading:<br>
:<font color="blue"><tt>Read GIS BC</tt></font> <font color="red"><tt>== </tt></font> gis\2d_bc_M01_002_L.SHP
<li>
'''Mapinfo'''
:<font color="blue"><tt>Read GIS BC</tt></font> <font color="red"><tt>== </tt></font> mi\
'''Other GIS'''
:<font color="blue"><tt>Read GIS BC</tt></font> <font color="red"><tt>== </tt></font> gis\2d_bc_M04_culverts_001_L.shp <font color="green"><tt>! This command reads in SX boundaries linking the 1D ESTRY culverts to the 2D domain</tt></font>
<li>
'''Mapinfo'''
:<font color="blue"><tt>Read GIS BC </tt></font> <font color="red"><tt>== </tt></font> mi\2d_bc_FMT_M01_HX_001_p.MIF | mi\2d_bc_FMT_M01_HX_001_L.MIF<font color="green"><tt>! This command reads in HX boundaries linking the 1D Flood Modeller watercourse to the 2D domain</tt></font>
'''Other GIS'''
:<font color="blue"><tt>Read GIS BC </tt></font> <font color="red"><tt>== </tt></font> gis\2d_bc_FMT_M01_HX_001_p.shp | gis\2d_bc_FMT_M01_HX_001_L.shp <font color="green"><tt>! This command reads in HX boundaries linking the 1D Flood Modeller watercourse to the 2D domain</tt></font>
<li> Save the file. The boundary control file is now ready to be used.
</ol>
==TUFLOW Control File==
Finally, we need to edit the TUFLOW control file (.tcf).
<li> Remove reference to model parameters that will be read in from Flood Modeller</li>
<li>
<li>
<li> Add a reference to the ESTRY Control File
<li> Update reference to the boundary control file (.tbc) and geometry control file </li>
<br>
<ol>
<li> In the \FMT_Tutorial\FMT_M01\TUFLOW\runs folder, save a copy of the TUFLOW file created as a part of module 2 ('''M02_5m_001.tcf''') as '''FMT_M01_001.tcf'''. </li>
<li> In a linked Flood Modeller - TUFLOW model, the Start Time, End Time and 2D Timestep are read from the Flood Modeller .ief file. It is best practice to therefore remove these parameters from the tcf. And an exclamation mark in front of each of the below commands.<br>
<font color="green"><tt>! SIMULATION TIME CONTROL COMMANDS </tt></font>
Line 141 ⟶ 150:
:<font color="blue"><tt>End Time </tt></font> <font color="red"><tt>== </tt></font>3 <font color="green"><tt>! Specifies a simulation end time of 3 hours </tt></font> </li>
<li> We need to read in the GIS layers of the Flood Modeller Nodes. Place the below command line anywhere in the .tcf. It is good practice to create a section within the .tcf to reference all 1D commands: <br> </li>
'''Mapinfo'''<br>
:<font color="blue"><tt>Read GIS X1D Nodes</tt></font> <font color="red"><tt>== </tt></font>..\model\mi\
'''Other GIS'''<br>
:<font color="blue"><tt>Read GIS X1D Nodes</tt></font> <font color="red"><tt>== </tt></font>..\model\gis\
<li> Add commands to read in the GIS layers referencing Water Level Lines drawn along the Flood Modeller component of the model: <br> </li>
'''Mapinfo'''<br>
:<font color="blue"><tt>Read GIS X1D Network</tt></font>
:<font color="blue"><tt>Read GIS X1D WLL</tt></font> <font color="red"><tt>== </tt></font> ..\model\mi\1d_x1d_WLL_FMT_M01_001_L.MIF <font color="green"><tt>! GIS layer containing WLLs for visualising 1D results in 2D (optional)</tt></font>
'''Other GIS'''<br>
:<font color="blue"><tt>Read GIS X1D Network</tt></font>
:<font color="blue"><tt>Read GIS X1D WLL</tt></font> <font color="red"><tt>== </tt></font> ..\model\gis\1d_x1d_WLL_FMT_M01_001_L.shp <font color="green"><tt>! GIS layer containing WLLs for visualising 1D results in 2D (optional)</tt></font>
<li> Add commands to read in the an Esty Control File which contains references to some of the culverts present on the floodplain: <br> </li>
:<font color="blue"><tt>ESTRY Control File</tt></font> <font color="red"><tt>== </tt></font>..\model\FMT_M01_001.ecf <font color="green"><tt>!Reference the ESTRY Control File </tt></font>
<li> Finally, update the links to the Geometry control file, the Boundary Condition control file and the bc_dbase file:</li>
:<font color="blue"><tt>Geometry Control File</tt></font> <font color="red"><tt>== </tt></font>..\model\FMT_M01_001.tgc
:<font color="blue"><tt>BC Control File</tt></font> <font color="red"><tt>== </tt></font>..\model\FMT_M01_001.tbc
:<font color="blue"><tt>BC Database</tt></font> <font color="red"><tt>== </tt></font>..\bc_dbase\bc_dbase_FMT_M01.csv
This concludes the changes that we need to make to the .tcf
</ol>
==Flood Modeller Simulation Files==
Line 167 ⟶ 179:
The DAT and IED files are complete and will not require any modification to link to TUFLOW.<br>
However, we will alter the IEF to create the link. The IEF alterations can be done either in a text editor of your choice or using the Flood Modeller Interface.<br>
The instructions below have been written for the Flood Modeller Interface
==IEF File==
Line 174 ⟶ 186:
<li> Right click 'Event Data' and select 'Add Item'. Navigate to '''\FMT_Tutorial\FMT_M01\Flood_Modeller\IED''' and load the '''FMT_Inflows.IED'''.</li>
[[file:FMT Load1Dnwk.JPG|500px]]
<li> On the 'Simulation' tab, click New 1D Simulation. Save the file when prompted in the
<li> On the 'Files' Tab of the simulation window, set the following parameters:</li>
*Event Title: FMT_M01_001
Line 180 ⟶ 192:
*Use Initial Conditions from: Network File (.dat)
*Results File: the full path to \FMT_Tutorial\FMT_M01\Flood_Modeller\RES\FMT_M01_001
<li>To the right of the Event Data box, click Add and select the '''
[[file:FMT Simulation files.JPG|500px]]
<li>On the 'Times' tab, we will replace the simulation time parameters that were removed from TUFLOW. Enter the following parameters:</li>
*Run Type: Unsteady (Fixed Timestep)
*Start Time (hrs): 0
*
*Timestep (s):1
*Save Interval (s): 300
[[file:FMT Simulation times.JPG|500px]]
<li> Add the 'Links' tab by clicking View> Tabs >
*2-d Scheme: TUFLOW
*2-d Timestep: 2
Line 195 ⟶ 207:
[[file:FMT Simulation links.JPG|500px]]
<li> Add the 'Additional Output' tab by clicking View> Tabs > Additional Output. On the 'Additional Output' tab, select the check box for '2D Flow...'. This will add extra output to check the Flood Modeller and TUFLOW link. We will review this additional output in the following section.</li>
<li> Save the Scenario Data. </li>
</ol>
=Run the Simulation=
Line 202 ⟶ 215:
<br>
In the <b>Complete_Model\FMT_M01\Flood_Modeller\IEF</b> folder a batch file has been provided. To use the batch file in this tutorial:<br>
*Ensure that you [
*Move the batch file to the <b>FMT_Tutorial\FMT_M01\Flood_Modeller\IEF</b> folder
*Open the batch file in a text editor. On the 'set FloodModeller=' line, change the path from the one provided to the full path to the ISISf32.exe file that you set up with the installation folders.
Line 208 ⟶ 221:
*Double click the batch file in your file explorer to run the file
<br>
When the simulation is running, the Flood Modeller status window will open. Flood Modeller will then open a
[[file:
The simulation will take a few minutes depending on the hardware setup.<br>
<br>
=Review the Results=
Modelled results can be processed, reviewed and visualised in many different packages.<br>
For a complete introduction to the different options, [[Tutorial_Module01_Archive#Viewing_Results | refer to Tutorial Module 1]]. <br>
<br>
==TUFLOW HPC==
To run the linked TUFLOW-Flood Modeller Pro model using HPC we simply need to add a single line to the Tuflow Control File. The HPC solver will only speed up the 2D calculations within the linked 1D-2D model, it will not speed up the 1D calculations that take place in the Flood Modeller Engine.
The relatively small nature of this specific model means that use of HPC on multiple CPU cores may not lead to significant improvements to model run times. However, should the machine have an NVIDIA GPU card present then it is possible to run the HPC solver on the GPU to significantly improve model runs times. The larger the 2D domain, the more significant the improvements to model run times through the use of the HPC solver.
To utilise the HPC solver:-
<ol>
<li> Save the TUFLOW runfile ( <b>FMT_M01_001.tcf</b>) as <b>FMT_M01_002.tcf</b>.</li>
<li> Add the following command to the TCF file:
:<font color="blue"><tt> Solution Scheme </tt></font> <font color="red"><tt>== </tt></font>HPC <font color="green"><tt>! Use HPC solver to run the simulation</tt></font>
<li> If you have a CUDA enabled NVIDIA GPU device, you can also add the following command to run the HPC solver using GPU hardware:
:<font color="blue"><tt> Hardware </tt></font> <font color="red"><tt>== </tt></font>GPU <font color="green"><tt>! Run HPC solver on GPU</tt></font>
<li> Save the TCF file and run the model.Troubleshooting for GPU Simulation
</ol>
===Troubleshooting for GPU Simulation===
If you receive the following error when trying to run the TUFLOW HPC model using GPU hardware:
<pre>TUFLOW GPU: Interrogating CUDA enabled GPUs …
TUFLOW GPU: Error: Non-CUDA Success Code returned
</pre>
or
<pre>ERROR 2785 - No GPU devices found, enabled or compatible.
</pre>
Please try the following steps:
<ol>
<li> Check if your GPU card is an NVIDIA GPU card. Currently, TUFLOW does not run on AMD type GPU.
<li> Check if your NVIDIA GPU card is CUDA enabled and whether the latest drivers are installed. Please see <u>[[GPU_Setup | GPU Setup]]</u>.
</ol>
<br>
If you experience an issue that is not detailed above please send an email to [mailto:support@tuflow.com support@tuflow.com]<br>
=Conclusion=
We introduced the user to the linking of a TUFLOW 2D domain to a 1D Flood Modeller model.<br>
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>
<br>
{{Tips Navigation
|uplink=[[Flood_Modeller_Tutorial_Model| Back to Flood Modeller Tutorial Model]]
}}
| |||