Difference between revisions of "Flood Modeller Tutorial Module01 Provisional"

From Tuflow
Jump to navigation Jump to search
(Created page with "=Introduction= 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...")
 
 
(49 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
=Introduction=
 
=Introduction=
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>
+
In this module, an existing 2D TUFLOW domain is linked to a Flood Modeller 1D model.
  
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 uni-directional. A 2D scheme is suited to the representation of floodplains where more complex flow patterns may occur. <br>
+
The 2D domain represents the floodplain, while the 1D model represents the watercourse and in-channel structures. Linked 1D–2D models combine the strengths of both approaches. Here, the 1D scheme represents the largely unidirectional flow of the watercourse, while the 2D scheme captures the more complex floodplain hydraulics.  
<br>
 
As [[Tutorial_Module01_Archive#Reviewing_Model_Performance | discussed in Module 1 of the TUFLOW Tutorial Model]], the main watercourse channel is not very well represented using the 5m 2D cell size. In parts, the watercourse is only 5-10m wide and the 5m cell size could be considered too coarse to accurately represent the watercourse topography.<br>
 
[[file:Poor_2d_rep.png|400px]]<br>
 
Using a cell size that is coarse relative to the width of the watercourse channel may reduce the accuracy of the conveyance in the channel.  There are two options for improving the representation of the creek channel:<br>
 
* 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 [[Tutorial_Module01_Archive#Advanced_-_Model_Resolution_.28Optional.29 | optional section of Module 1 of the TUFLOW Tutorial Model]], we looked at reducing the cell size to get a better representation of the channel. In this module we will adopt the second approach of modelling the creek as 1D elements using Flood Modeller.<br>
 
  
TUFLOW may be dynamically linked to 1D networks using the hydrodynamic solutions of ESTRY (TUFLOW 1D), Flood Modeller, XP-SWMM and 12D Solutions’ Dynamic Drainage.<br>
+
In the below 2D model example, the main channel is only 5-10 m wide, making the 5 m grid resolution too coarse to represent it accurately. This reduces the accuracy of conveyance within the channel.<br>
 +
[[file:Poor_2d_rep.png|400px]]<br>There are several options for improving the representation of this creek channel:
 +
* Decrease the width of the 2D cells, either globally or by using Quadtree, and/or apply sub-grid sampling.
 +
* Model the channel as a 1D network dynamically linked to the 2D domain (the floodplain).
 +
For this module, the second option will be demonstrated.
  
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>
+
TUFLOW can also link with other 1D solvers, including ESTRY (TUFLOW 1D), XP-SWMM and 12D Solutions’ Dynamic Drainage. Setting up a channel that cuts through a 2D domain is typically one of the more time-consuming tasks.  
  
 +
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.
 
=Existing Model Data=
 
=Existing Model Data=
This tutorial builds upon the 2D TUFLOW domain that was constructed as part of [[Tutorial Module01_Archive|Module 1]] and [[Tutorial Module02_Archive|Module 2]] of the TUFLOW Tutorial Model.<br>
+
This tutorial builds upon the 2D TUFLOW domain that was constructed as part of [[Tutorial_M01 |Module 1]] and [[Tutorial_M02 |Module 2]] of the TUFLOW Tutorial Model.
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 added to the Flood Modeller model.<br>
+
 
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 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 added to the Flood Modeller model. 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.
 +
 
 
The existing TUFLOW model consists of:
 
The existing TUFLOW model consists of:
*Definition of Active/In-Active Areas
+
*Definition of Active/Inactive Areas
*Definition of Land Use
+
*Definition of Land Use areas for the spatial distribution of roughness values
 
*1D ESTRY culverts
 
*1D ESTRY culverts
 
*1D/2D boundary links to connect the 1D ESTRY culverts to the 2D TUFLOW domain.
 
*1D/2D boundary links to connect the 1D ESTRY culverts to the 2D TUFLOW domain.
  
For further information on these elements, please refer to [[Tutorial Module01_Archive|Module 1]] and [[Tutorial Module02_Archive|Module 2]] of the TUFLOW Tutorial Model.
+
=GIS and Model Inputs=
 +
The steps required to modify each of the GIS inputs are demonstrated in QGIS using SHP and GPKG formats. Instructions for completing the module in ArcGIS or MapInfo are available on the archive page for [[Flood_Modeller_Tutorial_Module01_Archive |Tutorial Module 01]].  
  
==Flood Modeller==
+
===Define the External 1D Networks===
A complete Flood Modeller 1D model of the watercourse has been provided for the purposes of this tutorial.<br>
+
This part of the module creates the GIS layers that specify the location of the Flood Modeller nodes that are to be connected to the 2D domain.
The model data has been arranged in the following folder structure:
 
*<b>DAT</b>: Contains the Flood Modeller 1D network file.
 
*<b>IED</b>: Contains event data of the model.
 
*<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 [https://help.floodmodeller.com/docs Flood Modeller User Manual].<br>
 
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 simulation file.
 
  
=GIS and Model Inputs=
+
Follow the instructions below for the preferred GIS format.  
The steps necessary to modify each of the GIS inputs are demonstrated in MapInfo, ArcGIS and QGIS. At each stage please select your GIS package to view relevant instructions.
 
  
==Define the External 1D Networks==
+
* [[FM Tutorial M01_QGIS_SHP_x1D_Nodes | QGIS - SHP]]
This part of the module creates the GIS layers that specify the location of the Flood Modeller nodes that are to be connected to the 2D domain. Follow the instructions below for your preferred GIS package.
+
* [[FM Tutorial M01_QGIS_GPKG_x1D_Nodes | QGIS - GPKG]]
* [[FM Tute M01_ARC_x1D_Nodes | ArcGIS]]
 
* [[FM Tute M01_MI_x1D_Nodes | MapInfo]]
 
* [[FM Tute M01_QGIS_x1D_Nodes | QGIS]]
 
  
==Define the 1D/2D Boundary Links==
+
===Define the 1D/2D Boundary Links===
This part of the module creates the 1D/2D boundaries to link the Flood Modeller 1D component to the TUFLOW 2D domain. Follow the instructions below for your preferred GIS package.
+
This part of the module creates the 1D/2D boundaries to link the Flood Modeller 1D component to the TUFLOW 2D domain.   
* [[FM Tute M01_ARC_1D2D_Links | ArcGIS]]
 
* [[FM Tute M01_MI_1D2D_Links  | MapInfo]]
 
* [[FM Tute M01_QGIS_1D2D_Links | QGIS]]
 
  
==Define Bank Elevations==
+
Follow the instructions below for the preferred GIS format.  
This part of the module defines the bank elevations of the watercourse which are the elevations of the 1D/2D boundary links created in the previous section. Follow the instructions below for your preferred GIS package.
+
* [[FM Tutorial M01_QGIS_SHP_1D2D_Links | QGIS - SHP]]
* [[FM Tute M01_ARC_Banks | ArcGIS]]
+
* [[FM Tutorial M01_QGIS_GPKG_1D2D_Links | QGIS - GPKG]]
* [[FM Tute M01_MI_1D2D_Banks | MapInfo]]
 
* [[FM Tute M01_QGIS_1D2D_Banks | QGIS]]
 
  
==Deactivate 2D cells ==
+
===Define Bank Elevations===
This part of the module describes the steps to deactivate the 2D cells where the 1D model is replacing the 2D solution. Follow the instructions below for your preferred GIS package.
+
This part of the module defines the bank elevations of the watercourse which are the elevations of the 1D/2D boundary links created in the previous section.   
* [[FM Tute M01_ARC_Code | ArcGIS]]
 
* [[FM Tute M01_MI_1D2D_Code  | MapInfo]]
 
* [[FM Tute M01_QGIS_1D2D_Code | QGIS]]
 
  
=Modify Simulation Control Files=
+
Follow the instructions below for the preferred GIS format.  
Now that we have made all of the necessary changes to the GIS layers, we need to update the TUFLOW control files and Flood Modeller Simulation Files to create a linked model.
+
* [[FM Tutorial M01_QGIS_SHP_Banks | QGIS - SHP]]
==TUFLOW Control Files==
+
* [[FM Tutorial M01_QGIS_GPKG_Banks | QGIS - GPKG]]
==TUFLOW Geometry Control File==
 
We will first update the TUFLOW Geometry Control (TGC) file. The following changes have been changes made to the geometry:
 
* 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 '''FMT_Tutorial\FMT_M01\TUFLOW\model''' folder, save a copy of <b>M01_5m_002.tgc</b> as <b>FMT_M01_001.tgc</b>. </li>
 
<li> Open <b>FMT_M01_001.tgc</b><br>
 
  
'''Mapinfo'''<br>
+
===Deactivate 2D cells ===
Add an extra command line after <font color="blue"><tt> Read GIS Code </tt></font><font color="red"><tt>==</tt></font>..\model\mi\2d_code_FMT_M01_001_R.MIF </li>
+
This part of the module describes the steps to deactivate the 2D cells where the 1D model is replacing the 2D solution.
:<font color="blue"><tt>Read GIS Code BC </tt></font> <font color="red"><tt>== </tt></font> mi\2d_bc_FMT_M01_HX_001_R.MIF<font color="green"><tt> ! Deactivates the cells where the watercourse has been modelled in 1D </tt></font>
 
  
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>
+
Follow the instructions below for the preferred GIS format.
'''Other GIS'''<br>
+
* [[FM Tutorial M01_QGIS_SHP_1D2D_Code  | QGIS – SHP ]]
Add an extra command line after <font color="blue"><tt> Read GIS Code </tt></font><font color="red"><tt>==</tt></font>..\model\gis\2d_code_FMT_M01_001_R.shp
+
* [[FM Tutorial M01_QGIS_GPKG_1D2D_Code  | QGIS - GPKG]]
:<font color="blue"><tt>Read GIS Code BC </tt></font> <font color="red"><tt>== </tt></font> gis\2d_bc_FMT_M01_HX_001_R.shp <font color="green"><tt> ! Deactivates the cells where the watercourse has been modelled in 1D </tt></font>
+
=Modify Simulation Control Files=
  
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.  
+
With the input GIS layers modified, the next step is to update the TUFLOW control files and Flood Modeller simulation files to create a linked model.
  
<li> Topography amendments should be added in a new section at the bottom of the TGC. These are: </li>
+
= TUFLOW Geometry Control File (TGC) =
'''Mapinfo'''<br>
+
At this stage, the following changes will be made to the geometry:
:<font color="blue"><tt>Read GIS Z HX Line MAX </tt></font> <font color="red"><tt>==</tt></font> mi\2d_bc_FMT_M01_HX_001_L.MIF | mi\2d_bc_FMT_M01_HX_001_P.MIF <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 cells along the watercourse that are represented in the 1D Flood Modeller component of the model are deactivated.
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).  
+
*Bank elevations along the watercourse are enforced.<ol>
  
'''Other GIS'''<br>
+
<li> In the '''FMT_Tutorial\FMT_M01\TUFLOW\model''' folder, save a copy of <b>M01_5m_002.tgc</b> as <b>FMT_M01_001.tgc</b>. </li>
:<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>
+
<li> Open <b>FMT_M01_001.tgc</b><br><u>'''QGIS - SHP'''</u><br>Add an extra command line after <font color="blue"><tt>Read GIS Code </tt></font><font color="red"><tt>==</tt></font>..\model\gis\2d_code_FMT_M01_001_R.shp<br><font color="blue"><tt>Read GIS Code BC </tt></font> <font color="red"><tt>== </tt></font> gis\2d_bc_FMT_M01_HX_001_R.shp <font color="green"><tt> ! Deactivates the cells where the watercourse has been modelled in 1D </tt></font><br>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. <br><u>'''QGIS - GPKG'''</u><br>Add an extra command line after <font color="blue"><tt>Read GIS Code </tt></font><font color="red"><tt>==</tt></font> 2d_code_FMT_M01_001_R<br><font color="blue"><tt>Read GIS Code BC </tt></font> <font color="red"><tt>== </tt></font> 2d_bc_FMT_M01_HX_001_R <font color="green"><tt> ! Deactivates the cells where the watercourse has been modelled in 1D </tt></font><br>Note that the order of the commands is important. The layer '''2d_code_FMT_M01_001_R''' first activates cells within the modelled area then the layer '''2d_bc_FMT_M01_HX_001_R''' deactivates selected cells along the watercourse. </li><li> Topography amendments should be added in a new section at the bottom of the TGC. These are:<br><u>'''QGIS - SHP'''</u><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><br>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). <br><u>'''QGIS - GPKG'''</u><br><font color="blue"><tt>Read GIS Z HX Line MAX </tt></font> <font color="red"><tt>==</tt></font> 2d_bc_FMT_M01_HX_001_L | gis\2d_bc_FMT_M01_HX_001_P  <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><br>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''' layer (defining elevation) with the polylines within the '''2d_bc_FMT_M01_HX_001_L''' layer (defining bank location). </li>
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.
 
<li> Save the file. The geometry control file is now ready to be used.
 
</ol>
 
</ol>
  
==TUFLOW Boundary Condition Control File==
+
=TUFLOW Boundary Control File (TBC)=
We will now update the TUFLOW Boundary Condition control file (tbc) to reference the model boundary files created in previous steps.
+
Next, update the TBC to reference the model boundary files created in the previous steps, as described below:
<li> Add the 1D/2D boundaries that link the Flood Modeller open channel to the 2D floodplain</li>
+
 
<li> Update the 1D/2D boundaries which link the ESTRY culverts to the 2D floodplain, as some of these culverts are now modelled in Flood Modeller</li>
+
*Add the 1D/2D boundaries that link the Flood Modeller open channel to the 2D floodplain.
<li> Remove the external inflows applied to the TUFLOW model, as these are now applied in Flood Modeller</li>
+
*Update the 1D/2D boundaries which link the ESTRY culverts to the 2D floodplain, as some of these culverts are now modelled in Flood Modeller.
 +
*Remove the external inflows applied to the TUFLOW model, as these are now applied in Flood Modeller.
  
 
<ol>
 
<ol>
 
<li> Open '''M02_5m_001.tbc''' and save a copy as '''FMT_M01_001.tbc'''.  
 
<li> Open '''M02_5m_001.tbc''' and save a copy as '''FMT_M01_001.tbc'''.  
<li> Remove the boundary linking to the TUFLOW inflows by:<br>
+
<li> Remove the boundary linking to the TUFLOW inflows by putting an exclamation mark before the line reading:<br><u>'''QGIS - SHP'''</u><br><font color="blue"><tt>Read GIS BC</tt></font> <font color="red"><tt>== </tt></font> gis\2d_bc_M01_002_L.shp<br><u>'''QGIS - GPKG'''</u><br><font color="blue"><tt>Read GIS BC</tt></font> <font color="red"><tt>== </tt></font> 2d_bc_M01_002_L<li> Update the 1D/2D boundary links at the ESTRY culverts  with the new layer:
'''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\2d_bc_M01_002_L.MIF
 
'''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> Update the 1D/2D boundary links at the ESTRY culverts  with the new layer:</li>
+
<br><u>'''QGIS - SHP'''</u><br><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><br><u>'''QGIS - GPKG'''</u><br><font color="blue"><tt>Read GIS BC</tt></font> <font color="red"><tt>== </tt></font> 2d_bc_M04_culverts_001_L <font color="green"><tt>! This command reads in SX boundaries linking the 1D ESTRY culverts to the 2D domain</tt></font><li> Add reference to the 1D/2D boundary links that connect Flood Modeller to the 2D floodplain:
'''Mapinfo'''
 
:<font color="blue"><tt>Read GIS BC</tt></font> <font color="red"><tt>== </tt></font> mi\2d_bc_M04_culverts_001_L.MIF <font color="green"><tt>! This command reads in SX boundaries linking the 1D ESTRY culverts 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_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> Add reference to the 1D/2D boundary links that connect Flood Modeller to the 2D floodplain:</li>
+
<br><u>'''QGIS - SHP'''</u><br><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><br><u>'''QGIS - GPKG'''</u><br><font color="blue"><tt>Read GIS BC </tt></font> <font color="red"><tt>== </tt></font> 2d_bc_FMT_M01_HX_001_P | 2d_bc_FMT_M01_HX_001_L <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.
'''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>
 
</ol>
  
==TUFLOW Control File==
+
= TUFLOW Control File (TCF) =
Finally, we need to edit the TUFLOW control file (.tcf). We will:
+
Finally, the TCF is updated as follows:
<li> Remove reference to model parameters that will be read in from Flood Modeller</li>
 
<li> Read in the GIS layer of the Flood Modeller Nodes </li>
 
<li> Read in the GIS layers to create Water Level Lines along the Flood Modeller component of the model (optional) </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>
 
<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>Remove references to model parameters that are read from Flood Modeller.
 +
<li>Read in the GIS layer of the Flood Modeller nodes.
 +
<li>Read in the GIS layers used to create Water Level Lines along the Flood Modeller component of the model (optional).
 +
<li>Add a reference to the ESTRY Control File.
 +
<li>Update references to the TBC and TGC.
 +
 
 +
The following steps outline how to apply these updates:
  
<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>
+
In the \FMT_Tutorial\FMT_M01\TUFLOW\runs folder, save a copy of the TUFLOW file created as a part of [[Tutorial_M02 |Module 2]] ('''M02_5m_001.tcf''') as '''FMT_M01_001.tcf'''.  
  
<font color="green"><tt>! SIMULATION TIME CONTROL COMMANDS </tt></font>
+
<li>Remove the Start Time, End Time, and 2D Timestep parameters from the TCF, as these are read from the Flood Modeller .ief file in a linked Flood Modeller-TUFLOW model.  
:<font color="blue"><tt>Timestep </tt></font> <font color="red"><tt>== </tt></font> 1.5  <font color="green"><tt>! Specifies a 2D computational timestep of 1.5 seconds </tt></font>
 
:<font color="blue"><tt>Start time </tt></font> <font color="red"><tt>== </tt></font> 0  <font color="green"><tt>! Specifies a simulation start time of 0 hours </tt></font>
 
:<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>
+
<li>Add an exclamation mark in front of each of the following commands.<br><font color="green"><tt>! SIMULATION TIME CONTROL COMMANDS</tt></font><br><font color="blue"><tt>Timestep </tt></font> <font color="red"><tt>== </tt></font> 1.5  <font color="green"><tt>! Specifies a 2D computational timestep of 1.5 seconds </tt></font><br><font color="blue"><tt>Start time </tt></font> <font color="red"><tt>== </tt></font> <font color="green"><tt>! Specifies a simulation start time of 0 hours</tt></font><br><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>
'''Mapinfo'''<br>
 
:<font color="blue"><tt>Read GIS X1D Nodes</tt></font> <font color="red"><tt>== </tt></font>..\model\mi\1d_x1d_FMT_M01_nodes_001_P.MIF <font color="green"><tt>! GIS layer referencing node IDs from Flood Modeller </tt></font>
 
'''Other GIS'''<br>
 
:<font color="blue"><tt>Read GIS X1D Nodes</tt></font> <font color="red"><tt>== </tt></font>..\model\gis\1d_x1d_FMT_M01_nodes_001_P.shp <font color="green"><tt>! GIS layer referencing node IDs from Flood Modeller </tt></font>
 
  
<li> Add commands to read in the GIS layers referencing Water Level Lines drawn along the Flood Modeller component of the model: <br> </li>
+
<li>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><u>'''QGIS - SHP'''</u><br><font color="blue"><tt>Read GIS X1D Nodes</tt></font> <font color="red"><tt>== </tt></font>..\model\gis\1d_x1d_FMT_M01_nodes_001_P.shp <font color="green"><tt>! GIS layer referencing node IDs from Flood Modeller </tt></font><br><u>'''QGIS - GPKG'''</u><br><font color="blue"><tt>Read GIS X1D Nodes</tt></font> <font color="red"><tt>== </tt></font> 1d_x1d_FMT_M01_nodes_001_P <font color="green"><tt>! GIS layer referencing node IDs from Flood Modeller</tt></font>
'''Mapinfo'''<br>
 
:<font color="blue"><tt>Read GIS X1D Network</tt></font> <font color="red"><tt>== </tt></font>..\model\mi\1d_x1d_FMT_M01_nwk_001_L.MIF <font color="green"><tt>! GIS layer representing channels to allow for the digitisation of Water Level Lines (optional)</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="red"><tt>== </tt></font>..\model\gis\1d_x1d_FMT_M01_nwk_001_L.shp <font color="green"><tt>! GIS layer representing channels to allow for the digitisation of Water Level Lines (optional)</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>
+
<li>Add commands to read in the GIS layers referencing Water Level Lines drawn along the Flood Modeller component of the model:<br><u>'''QGIS - SHP'''</u><br><font color="blue"><tt>Read GIS X1D Network</tt></font> <font color="red"><tt>== </tt></font>..\model\gis\1d_x1d_FMT_M01_nwk_001_L.shp <font color="green"><tt>! GIS layer representing channels to allow for the digitisation of Water Level Lines (optional)</tt></font><br><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><br><u>'''QGIS - GPKG'''</u><br><font color="blue"><tt>Read GIS X1D Network</tt></font> <font color="red"><tt>== </tt></font> 1d_x1d_FMT_M01_nwk_001_L  <font color="green"><tt>! GIS layer representing channels to allow for the digitisation of Water Level Lines (optional)</tt></font><br><font color="blue"><tt>Read GIS X1D WLL</tt></font> <font color="red"><tt>== </tt></font>  1d_x1d_WLL_FMT_M01_001_L <font color="green"><tt>! GIS layer containing WLLs for visualising 1D results in 2D (optional)</tt></font><br>The addition of TUFLOW Water Level Lines (WLL) allows the Flood Modeller 1D results to be visualised within the TUFLOW 2D map outputs. They provide a means by which to remove the gaps in the map outputs where the 1D Flood Modeller domains are located and the 2D cells are deactivated. To do this, TUFLOW requires a 1D_WLL layer to define the cross sections locations, and a 1d_nwk layer that defines the river centre line. The layers are not used in the hydraulic calculations and their inclusion is not always required. The Dist_for_Add_Points determines the intervals in metres at which interpolation points are inserted along each WLL.
:<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>
+
<li>Add commands to read in an ESTRY Control File which contains references to some of the culverts present on the floodplain:<br><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>  
:<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
+
<li>Update the links to the Geometry control file, the Boundary Condition control file and the bc_dbase file:<br><font color="blue"><tt>Geometry Control File</tt></font>  <font color="red"><tt>== </tt></font>..\model\FMT_M01_001.tgc <br><font color="blue"><tt>BC Control File</tt></font>  <font color="red"><tt>== </tt></font>..\model\FMT_M01_001.tbc <br><font color="blue"><tt>BC Database</tt></font>  <font color="red"><tt>== </tt></font>..\bc_dbase\bc_dbase_FMT_M01.csv
 
</ol>
 
</ol>
 +
This concludes the changes needed to be made to the TCF.
 +
 +
=Flood Modeller Simulation Files=
 +
A complete Flood Modeller model is provided in the '''FMT_M01\Flood_Modeller''' folder. The model files are located in the DAT, IED and IEF folders.
  
==Flood Modeller Simulation Files==
+
The DAT and IED files are complete and do not require modification to link with TUFLOW. The IEF file must be altered to create the link. These alterations can be made in a text editor or in the Flood Modeller interface.
In the FMT_M01\Flood_Modeller folder, we have provided a complete Flood Modeller model. It is located in the DAT, IED and IEF folders.<br>
 
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 version 4.2.<br>
 
  
==IEF File==
+
The instructions below are written for Flood Modeller interface version 7.2.
 +
 
 +
===IEF File===
 
<ol>
 
<ol>
 
<li> Open Flood Modeller. Select 'Load 1D Network'. Navigate to '''\FMT_Tutorial\FMT_M01\Flood_Modeller\DAT''' and load the '''FMT_M01_001.dat'''.</li>
 
<li> Open Flood Modeller. Select 'Load 1D Network'. Navigate to '''\FMT_Tutorial\FMT_M01\Flood_Modeller\DAT''' and load the '''FMT_M01_001.dat'''.</li>
 
<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>
 
<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 '''\FMT_Tutorial\FMT_M01\Flood_Modeller\IEF''' folder as'''FMT_M01_001.ief'''</li>
 
<li> On the 'Simulation' tab, click New 1D Simulation. Save the file when prompted in the '''\FMT_Tutorial\FMT_M01\Flood_Modeller\IEF''' folder as'''FMT_M01_001.ief'''</li>
 
<li> On the 'Files' Tab of the simulation window, set the following parameters:</li>
 
<li> On the 'Files' Tab of the simulation window, set the following parameters:</li>
Line 191: Line 131:
 
*1D Data File: The full path to the \FMT_Tutorial\FMT_M01\Flood_Modeller\DAT\FMT_M01_001.dat
 
*1D Data File: The full path to the \FMT_Tutorial\FMT_M01\Flood_Modeller\DAT\FMT_M01_001.dat
 
*Use Initial Conditions from: Network File (.dat)
 
*Use Initial Conditions from: Network File (.dat)
*Results File: the full path to \FMT_Tutorial\FMT_M01\Flood_Modeller\RES\FMT_M01_001
+
*Results File: set 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 '''FMT_Inflows.IED''' file in the '''\FMT_Tutorial\FMT_M01\Flood_Modeller\IED''' folder.</li>
 
<li>To the right of the Event Data box, click Add and select the '''FMT_Inflows.IED''' file in the '''\FMT_Tutorial\FMT_M01\Flood_Modeller\IED''' folder.</li>
[[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>
+
<li>On the 'Times' tab, replace the simulation time parameters that were removed from TUFLOW. Enter the following parameters:</li>
 
*Run Type: Unsteady (Fixed Timestep)
 
*Run Type: Unsteady (Fixed Timestep)
 
*Start Time (hrs): 0
 
*Start Time (hrs): 0
Line 200: Line 140:
 
*Timestep (s):1
 
*Timestep (s):1
 
*Save Interval (s): 300
 
*Save Interval (s): 300
[[file:FMT Simulation times.JPG|500px]]
+
 
 
<li> Add the 'Links' tab by clicking View> Tabs > Links. On the 'Links' tab, enter the following parameters:
 
<li> Add the 'Links' tab by clicking View> Tabs > Links. On the 'Links' tab, enter the following parameters:
 
*2-d Scheme: TUFLOW
 
*2-d Scheme: TUFLOW
 
*2-d Timestep: 2
 
*2-d Timestep: 2
 +
*Check the box for ‘Perform corrective 1D timestep’
 
*2-d control file: full path to the '''FMT_M01_001.tcf''' from the '''\FMT_Tutorial\FMT_M01\TUFLOW\runs''' folder
 
*2-d control file: full path to the '''FMT_M01_001.tcf''' from the '''\FMT_Tutorial\FMT_M01\TUFLOW\runs''' folder
[[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=
+
<li> Save the Scenario Data. </li>{{Video|name=Setting up FMP IEF Simulation File.mp4 |width=1123}}</ol>
There are a number of different methods in which to start a Flood Modeller – TUFLOW model. Please refer to the [[Running_linked_Flood_Modeller_-_TUFLOW_Models | following page]] for a detailed discussion on each of these methods. <br>
+
 
Use your preferred method to start the model <b>FMT_M01_001.ief</b> or follow the guidance below. If the simulation fails to start, please refer to the troubleshooting guidance on this page. <br>
+
= Review the Results =
<br>
+
Instructions for viewing the TUFLOW mesh (XMDF) and 1D time series (.tpc) outputs are provided in [[Tutorial_M01_Results_QGIS | Module 1]] and [[Tutorial_M03_Results_QGIS | Module 3.]] It is often useful to view 1D Flood Modeller results alongside 2D TUFLOW map outputs. The Flood Modeller results can be opened in QGIS with the TUFLOW Viewer plugin, together with the TUFLOW mesh results, by following the linked instructions. Alternatively, the TUFLOW mesh results can be loaded directly into the Flood Modeller Pro interface.
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 [https://wiki.tuflow.com/Running_linked_Flood_Modeller_-_TUFLOW_Models set up the installation folders].
 
*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.
 
*Save and close the file
 
*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 tab with the TUFLOW output. <br>
 
[[file:FMP_Sim_Screen.png|500px]]<br>
 
The simulation will take a few minutes depending on the hardware setup.<br>
 
<br>
 
  
=Review the Results=
+
The video below demonstrates both methods:
Modelled results can be processed, reviewed and visualised in many different packages.<br>
+
*Loading Flood Modeller results in QGIS using the TUFLOW Viewer plugin.
For a complete introduction to the different options, [[Tutorial_Module01_Archive#Viewing_Results | refer to Tutorial Module 1]]. <br>
+
*Loading TUFLOW mesh results in Flood Modeller Pro.
<br>
+
{{Video|name=Viewing Results in Flood Modeller and TUFLOW.mp4.mp4 |width=1123}}
  
==TUFLOW HPC==
+
= TUFLOW HPC =
 +
To run the linked TUFLOW-Flood Modeller Pro model using HPC add a single line to the TCF.  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.
  
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.
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:-
 
  
 +
To utilise the HPC solver:
 
<ol>
 
<ol>
<li> Save the TUFLOW runfile ( <b>FMT_M01_001.tcf</b>) as <b>FMT_M01_002.tcf</b>.</li>
+
<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:<br><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> Add the following command to the TCF file:
+
<li> If a CUDA enabled NVIDIA GPU device is available, the following command may be added to run the HPC solver using GPU hardware.:<br><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>
:<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> Save the TCF file and run the model.
<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>
 
</ol>
===Troubleshooting for GPU Simulation===
+
=== Troubleshooting for GPU Simulation ===
If you receive the following error when trying to run the TUFLOW HPC model using GPU hardware:  
+
If the following error is encountered when running the TUFLOW HPC model using GPU hardware: :  
 
<pre>TUFLOW GPU: Interrogating CUDA enabled GPUs …  
 
<pre>TUFLOW GPU: Interrogating CUDA enabled GPUs …  
 
TUFLOW GPU: Error: Non-CUDA Success Code returned  
 
TUFLOW GPU: Error: Non-CUDA Success Code returned  
Line 254: Line 177:
 
<pre>ERROR 2785 - No GPU devices found, enabled or compatible.
 
<pre>ERROR 2785 - No GPU devices found, enabled or compatible.
 
</pre>
 
</pre>
 
 
Please try the following steps:  
 
Please try the following steps:  
 
<ol>
 
<ol>
<li> Check if your GPU card is an NVIDIA GPU card. Currently, TUFLOW does not run on AMD type GPU.
+
<li> Check if the 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>.
+
<li> Check if the NVIDIA GPU card is CUDA enabled and whether the latest drivers are installed (see <u>[[GPU_Setup |GPU Setup)]]</u>.
</ol>
+
</ol>If an issue not described above is encountered, an email should be sent to [mailto:support@tuflow.com support@tuflow.com].<br>
<br>
+
 
If you experience an issue that is not detailed above please send an email to [mailto:support@tuflow.com support@tuflow.com]<br>
+
{{Tips Navigation
 +
|uplink=[[Flood_Modeller_Tutorial_Model_Provisional| Back to Tutorial Introduction Main Page]]
 +
}}

Latest revision as of 17:54, 3 September 2025

Introduction

In this module, an existing 2D TUFLOW domain is linked to a Flood Modeller 1D model.

The 2D domain represents the floodplain, while the 1D model represents the watercourse and in-channel structures. Linked 1D–2D models combine the strengths of both approaches. Here, the 1D scheme represents the largely unidirectional flow of the watercourse, while the 2D scheme captures the more complex floodplain hydraulics.

In the below 2D model example, the main channel is only 5-10 m wide, making the 5 m grid resolution too coarse to represent it accurately. This reduces the accuracy of conveyance within the channel.
Poor 2d rep.png
There are several options for improving the representation of this creek channel:

  • Decrease the width of the 2D cells, either globally or by using Quadtree, and/or apply sub-grid sampling.
  • Model the channel as a 1D network dynamically linked to the 2D domain (the floodplain).

For this module, the second option will be demonstrated.

TUFLOW can also link with other 1D solvers, including ESTRY (TUFLOW 1D), XP-SWMM and 12D Solutions’ Dynamic Drainage. Setting up a channel that cuts through a 2D domain is typically one of the more time-consuming tasks.

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.

Existing Model Data

This tutorial builds upon the 2D TUFLOW domain that was constructed as part of Module 1 and Module 2 of the TUFLOW Tutorial Model.

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 added to the Flood Modeller model. 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.

The existing TUFLOW model consists of:

  • Definition of Active/Inactive Areas
  • Definition of Land Use areas for the spatial distribution of roughness values
  • 1D ESTRY culverts
  • 1D/2D boundary links to connect the 1D ESTRY culverts to the 2D TUFLOW domain.

GIS and Model Inputs

The steps required to modify each of the GIS inputs are demonstrated in QGIS using SHP and GPKG formats. Instructions for completing the module in ArcGIS or MapInfo are available on the archive page for Tutorial Module 01.

Define the External 1D Networks

This part of the module creates the GIS layers that specify the location of the Flood Modeller nodes that are to be connected to the 2D domain.

Follow the instructions below for the preferred GIS format.

Define the 1D/2D Boundary Links

This part of the module creates the 1D/2D boundaries to link the Flood Modeller 1D component to the TUFLOW 2D domain.

Follow the instructions below for the preferred GIS format.

Define Bank Elevations

This part of the module defines the bank elevations of the watercourse which are the elevations of the 1D/2D boundary links created in the previous section.

Follow the instructions below for the preferred GIS format.

Deactivate 2D cells

This part of the module describes the steps to deactivate the 2D cells where the 1D model is replacing the 2D solution.

Follow the instructions below for the preferred GIS format.

Modify Simulation Control Files

With the input GIS layers modified, the next step is to update the TUFLOW control files and Flood Modeller simulation files to create a linked model.

TUFLOW Geometry Control File (TGC)

At this stage, the following changes will be made to the geometry:

  • The cells along the watercourse that are represented in the 1D Flood Modeller component of the model are deactivated.
  • Bank elevations along the watercourse are enforced.
  • In the FMT_Tutorial\FMT_M01\TUFLOW\model folder, save a copy of M01_5m_002.tgc as FMT_M01_001.tgc.
  • Open FMT_M01_001.tgc
    QGIS - SHP
    Add an extra command line after Read GIS Code ==..\model\gis\2d_code_FMT_M01_001_R.shp
    Read GIS Code BC == gis\2d_bc_FMT_M01_HX_001_R.shp  ! Deactivates the cells where the watercourse has been modelled in 1D
    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.
    QGIS - GPKG
    Add an extra command line after Read GIS Code == 2d_code_FMT_M01_001_R
    Read GIS Code BC == 2d_bc_FMT_M01_HX_001_R  ! Deactivates the cells where the watercourse has been modelled in 1D
    Note that the order of the commands is important. The layer 2d_code_FMT_M01_001_R first activates cells within the modelled area then the layer 2d_bc_FMT_M01_HX_001_R deactivates selected cells along the watercourse.
  • Topography amendments should be added in a new section at the bottom of the TGC. These are:
    QGIS - SHP
    Read GIS Z HX Line MAX == gis\2d_bc_FMT_M01_HX_001_L.shp | gis\2d_bc_FMT_M01_HX_001_P.shp ! Defines the bank crest levels (1D/2D boundary cell elevations). The 'MAX' option prevents any zpt elevations from being lowered
    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).
    QGIS - GPKG
    Read GIS Z HX Line MAX == 2d_bc_FMT_M01_HX_001_L | gis\2d_bc_FMT_M01_HX_001_P ! Defines the bank crest levels (1D/2D boundary cell elevations). The 'MAX' option prevents any zpt elevations from being lowered
    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 layer (defining elevation) with the polylines within the 2d_bc_FMT_M01_HX_001_L layer (defining bank location).
  • Save the file. The geometry control file is now ready to be used.

    TUFLOW Boundary Control File (TBC)

    Next, update the TBC to reference the model boundary files created in the previous steps, as described below:

    • Add the 1D/2D boundaries that link the Flood Modeller open channel to the 2D floodplain.
    • Update the 1D/2D boundaries which link the ESTRY culverts to the 2D floodplain, as some of these culverts are now modelled in Flood Modeller.
    • Remove the external inflows applied to the TUFLOW model, as these are now applied in Flood Modeller.
    1. Open M02_5m_001.tbc and save a copy as FMT_M01_001.tbc.
    2. Remove the boundary linking to the TUFLOW inflows by putting an exclamation mark before the line reading:
      QGIS - SHP
      Read GIS BC == gis\2d_bc_M01_002_L.shp
      QGIS - GPKG
      Read GIS BC == 2d_bc_M01_002_L
    3. Update the 1D/2D boundary links at the ESTRY culverts with the new layer:
      QGIS - SHP
      Read GIS BC == gis\2d_bc_M04_culverts_001_L.shp ! This command reads in SX boundaries linking the 1D ESTRY culverts to the 2D domain
      QGIS - GPKG
      Read GIS BC == 2d_bc_M04_culverts_001_L ! This command reads in SX boundaries linking the 1D ESTRY culverts to the 2D domain
    4. Add reference to the 1D/2D boundary links that connect Flood Modeller to the 2D floodplain:
      QGIS - SHP
      Read GIS BC == gis\2d_bc_FMT_M01_HX_001_p.shp | gis\2d_bc_FMT_M01_HX_001_L.shp ! This command reads in HX boundaries linking the 1D Flood Modeller watercourse to the 2D domain
      QGIS - GPKG
      Read GIS BC == 2d_bc_FMT_M01_HX_001_P | 2d_bc_FMT_M01_HX_001_L ! This command reads in HX boundaries linking the 1D Flood Modeller watercourse to the 2D domain
    5. Save the file. The boundary control file is now ready to be used.

    TUFLOW Control File (TCF)

    Finally, the TCF is updated as follows:

    1. Remove references to model parameters that are read from Flood Modeller.
    2. Read in the GIS layer of the Flood Modeller nodes.
    3. Read in the GIS layers used to create Water Level Lines along the Flood Modeller component of the model (optional).
    4. Add a reference to the ESTRY Control File.
    5. Update references to the TBC and TGC. The following steps outline how to apply these updates: 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.
    6. Remove the Start Time, End Time, and 2D Timestep parameters from the TCF, as these are read from the Flood Modeller .ief file in a linked Flood Modeller-TUFLOW model.
    7. Add an exclamation mark in front of each of the following commands.
      ! SIMULATION TIME CONTROL COMMANDS
      Timestep == 1.5 ! Specifies a 2D computational timestep of 1.5 seconds
      Start time == 0 ! Specifies a simulation start time of 0 hours
      End Time == 3 ! Specifies a simulation end time of 3 hours
    8. 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:
      QGIS - SHP
      Read GIS X1D Nodes == ..\model\gis\1d_x1d_FMT_M01_nodes_001_P.shp ! GIS layer referencing node IDs from Flood Modeller
      QGIS - GPKG
      Read GIS X1D Nodes == 1d_x1d_FMT_M01_nodes_001_P ! GIS layer referencing node IDs from Flood Modeller
    9. Add commands to read in the GIS layers referencing Water Level Lines drawn along the Flood Modeller component of the model:
      QGIS - SHP
      Read GIS X1D Network == ..\model\gis\1d_x1d_FMT_M01_nwk_001_L.shp ! GIS layer representing channels to allow for the digitisation of Water Level Lines (optional)
      Read GIS X1D WLL == ..\model\gis\1d_x1d_WLL_FMT_M01_001_L.shp ! GIS layer containing WLLs for visualising 1D results in 2D (optional)
      QGIS - GPKG
      Read GIS X1D Network == 1d_x1d_FMT_M01_nwk_001_L ! GIS layer representing channels to allow for the digitisation of Water Level Lines (optional)
      Read GIS X1D WLL == 1d_x1d_WLL_FMT_M01_001_L ! GIS layer containing WLLs for visualising 1D results in 2D (optional)
      The addition of TUFLOW Water Level Lines (WLL) allows the Flood Modeller 1D results to be visualised within the TUFLOW 2D map outputs. They provide a means by which to remove the gaps in the map outputs where the 1D Flood Modeller domains are located and the 2D cells are deactivated. To do this, TUFLOW requires a 1D_WLL layer to define the cross sections locations, and a 1d_nwk layer that defines the river centre line. The layers are not used in the hydraulic calculations and their inclusion is not always required. The Dist_for_Add_Points determines the intervals in metres at which interpolation points are inserted along each WLL.
    10. Add commands to read in an ESTRY Control File which contains references to some of the culverts present on the floodplain:
      ESTRY Control File == ..\model\FMT_M01_001.ecf !Reference the ESTRY Control File
    11. Update the links to the Geometry control file, the Boundary Condition control file and the bc_dbase file:
      Geometry Control File == ..\model\FMT_M01_001.tgc
      BC Control File == ..\model\FMT_M01_001.tbc
      BC Database == ..\bc_dbase\bc_dbase_FMT_M01.csv

    This concludes the changes needed to be made to the TCF.

    Flood Modeller Simulation Files

    A complete Flood Modeller model is provided in the FMT_M01\Flood_Modeller folder. The model files are located in the DAT, IED and IEF folders.

    The DAT and IED files are complete and do not require modification to link with TUFLOW. The IEF file must be altered to create the link. These alterations can be made in a text editor or in the Flood Modeller interface.

    The instructions below are written for Flood Modeller interface version 7.2.

    IEF File

    1. Open Flood Modeller. Select 'Load 1D Network'. Navigate to \FMT_Tutorial\FMT_M01\Flood_Modeller\DAT and load the FMT_M01_001.dat.
    2. Right click 'Event Data' and select 'Add Item'. Navigate to \FMT_Tutorial\FMT_M01\Flood_Modeller\IED and load the FMT_Inflows.IED.
    3. On the 'Simulation' tab, click New 1D Simulation. Save the file when prompted in the \FMT_Tutorial\FMT_M01\Flood_Modeller\IEF folder asFMT_M01_001.ief
    4. On the 'Files' Tab of the simulation window, set the following parameters:
      • Event Title: FMT_M01_001
      • 1D Data File: The full path to the \FMT_Tutorial\FMT_M01\Flood_Modeller\DAT\FMT_M01_001.dat
      • Use Initial Conditions from: Network File (.dat)
      • Results File: set the full path to \FMT_Tutorial\FMT_M01\Flood_Modeller\RES\FMT_M01_001
    5. To the right of the Event Data box, click Add and select the FMT_Inflows.IED file in the \FMT_Tutorial\FMT_M01\Flood_Modeller\IED folder.
    6. On the 'Times' tab, replace the simulation time parameters that were removed from TUFLOW. Enter the following parameters:
      • Run Type: Unsteady (Fixed Timestep)
      • Start Time (hrs): 0
      • Finish Time (hrs): 3
      • Timestep (s):1
      • Save Interval (s): 300
    7. Add the 'Links' tab by clicking View> Tabs > Links. On the 'Links' tab, enter the following parameters:
      • 2-d Scheme: TUFLOW
      • 2-d Timestep: 2
      • Check the box for ‘Perform corrective 1D timestep’
      • 2-d control file: full path to the FMT_M01_001.tcf from the \FMT_Tutorial\FMT_M01\TUFLOW\runs folder
    8. Save the Scenario Data.

    Review the Results

    Instructions for viewing the TUFLOW mesh (XMDF) and 1D time series (.tpc) outputs are provided in Module 1 and Module 3. It is often useful to view 1D Flood Modeller results alongside 2D TUFLOW map outputs. The Flood Modeller results can be opened in QGIS with the TUFLOW Viewer plugin, together with the TUFLOW mesh results, by following the linked instructions. Alternatively, the TUFLOW mesh results can be loaded directly into the Flood Modeller Pro interface.

    The video below demonstrates both methods:

    • Loading Flood Modeller results in QGIS using the TUFLOW Viewer plugin.
    • Loading TUFLOW mesh results in Flood Modeller Pro.

    TUFLOW HPC

    To run the linked TUFLOW-Flood Modeller Pro model using HPC add a single line to the TCF. 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:

    1. Save the TUFLOW runfile (FMT_M01_001.tcf) as FMT_M01_002.tcf.
    2. Add the following command to the TCF file:
      Solution Scheme == HPC ! Use HPC solver to run the simulation
    3. If a CUDA enabled NVIDIA GPU device is available, the following command may be added to run the HPC solver using GPU hardware.:
      Hardware == GPU ! Run HPC solver on GPU
    4. Save the TCF file and run the model.

    Troubleshooting for GPU Simulation

    If the following error is encountered when running the TUFLOW HPC model using GPU hardware: :

    TUFLOW GPU: Interrogating CUDA enabled GPUs … 
    TUFLOW GPU: Error: Non-CUDA Success Code returned 
    

    or

    ERROR 2785 - No GPU devices found, enabled or compatible.
    

    Please try the following steps:

    1. Check if the GPU card is an NVIDIA GPU card. Currently, TUFLOW does not run on AMD type GPU.
    2. Check if the NVIDIA GPU card is CUDA enabled and whether the latest drivers are installed (see GPU Setup).
    If an issue not described above is encountered, an email should be sent to support@tuflow.com.
    Up
    Go-up.png Back to Tutorial Introduction Main Page