Meshing M01 GIS Mesher: Difference between revisions

From TUFLOW FV Wiki
Jump to navigation Jump to search
(Created page with "MB to fill :)")
 
No edit summary
Line 1: Line 1:
MB to fill :)
{| class="wikitable" align="right"
| colspan="3" style="text-align:center;" | '''USEFUL LINKS'''
|-
| width="220pt" style="text-align:center;" | '''Wiki Links'''
| width="220pt" style="text-align:center;" | '''Help'''
| width="220pt" style="text-align:center;" | '''Downloads'''
|-
| [http://fvwiki.tuflow.com/index.php?title=Main_Page ''TUFLOW FV Wiki Main Page'']
| ''[[Contact|Products Support/Contact]]''
| [https://www.tuflow.com/downloads/ ''TUFLOW FV Downloads'']
|-
| ''[[Tutorial Model Introduction|TUFLOW FV Tutorials]]''
| ''[[Requesting a Licence]]''
| [https://www.tuflow.com/downloads/tuflow-fv-models/ ''Tutorial Module Data'']
|-
| [https://wiki.tuflow.com/index.php?title=Main_Page ''TUFLOW Classic/HPC Wiki'']
| ''[[TUFLOW FV Glossary|TUFLOW FV Glossary]]''
| [https://www.tuflow.com/downloads/ ''Manuals'']
|}
 
=Tutorial Description=
This tutorial is designed to introduce the fundamentals of creating a mesh in GIS Mesher. Specifically, you will create a water passage along a simple geometry, trapezoidal channel. By the following steps outlined in this tutorial, you will create a trapezoidal channel and the computational mesh using GIS Mesher. The mesh files you create in this tutorial can be used in the TUFLOW FV [https://fvwiki.tuflow.com/index.php?title=Tutorial_M01_GIS_Mesher Tutorial Module 01 with GIS Mesher]. '''
 
Specifically in this tutorial you will:
* Create the project using the GIS Mesher<br>
* Define the model domain (boundary polygon) <br>
* Define the mesh sizes <br>
* Specify the nodestring locations <br>
* Add the Elevation data <br>
* Build the mesh using the GIS Mesher <br>
 
For this simple model a single material will be used for the full domain.
 
TUFLOW FV doesn't have its own graphical user interface (GUI), it uses GIS software, GIS Mesher software, and a text editor for its model creation and result viewing. As such, it is very efficient and flexible and doesn't have the same data load/visualisation limitations using big datasets as other modelling software GUIs
Please note this tutorial has been created using GIS Mesher 2023.01. If using a different version of the GIS Mesher GUI, some of the dialogue boxes and screen shots may change slightly, however the overall workflow should be similar. If you run into any problems or need help, please contact [mailto:support@tuflow.com support@tuflow.com]. <br>
 
=Requirements and Downloads=
{| class="wikitable" width="75%"
 
! style="background-color:#005581; font-weight:bold; color:white;"| Requirement
! style="background-color:#005581; font-weight:bold; color:white;" | Brief Description
! style="background-color:#005581; font-weight:bold; color:white;" | Download
|-
| '''GIS Mesher''' || The GIS Mesher developed by Rising Water Software builds meshes for hydrodynamic models that use a combination of quadrilateral and triangular meshes. Spatial data is provided to the mesher as GIS layers, so that you can use your favorite GIS application to build quality meshes quickly and easily. Solution guided meshing uses results from initial mesh solutions to iteratively improve meshes. Making it easy to generate good meshes for even complicated hydrodynamic <br>
 
This tutorial was developed using GIS Mesher version 2023.01, it recommended to use this version or later versions of GIS Mesher. If using a different version of the GIS Mesher, some of the dialogue boxes and screen shots may change slightly, however the overall workflow should be similar. If you run into any problems or need help, please contact [mailto:support@tuflow.com support@tuflow.com]''. <br>
 
|| GIS Mesher downloads and release notes can be found here <u>[https://www.risingwatersoftware.com/installation/ GIS Mesher]</u>.
|-
 
| '''QGIS''' <br><br>QGIS TUFLOW plugin || The geographic information system (GIS) QGIS will be used in this tutorial to build the mesh. This tutorial was developed with QGIS 3.20.1, it is recommended to use this version or later versions. If using a different version of QGIS, some of the dialogue boxes and screen shots may change slightly.
 
The TUFLOW plugin includes numerous tools to increase workflow efficiency. <br>
 
|| QGIS can be download from <u>[https://qgis.org/en/site/forusers/download.html Latest 64-bit version of QGIS]</u>.  <br><br>
 
<u>[https://wiki.tuflow.com/TUFLOW_QGIS_Plugin QGIS TUFLOW Plugin Installation]</u>.
 
|-
| '''Model Data''' || The data provided for the completion of this tutorial includes: <br>
* The Module_Data folder which contains the bathymetry data as a raster (.tif) dataset for the trapezoidal channel and a projection file (.prj) for the project
* The Complete_Mesh folder that contains the files for the completed tutorial in case you get stuck, and <br>
* A working folder is provided for the files you create and work within. <br>
||<u>[https://www.tuflow.com/downloads/tuflow-fv-models/ TUFLOW FV Tutorial Models]</u>. <br><br>
 
|-
| '''Assumed Knowledge''' || No prior knowledge is required for the completion of this tutorial. We have designed this tutorial to provide an introduction to meshing for all modelling levels. If you run into any problems or need help, please contact [mailto:support@tuflow.com support@tuflow.com]
 
|}
 
= Building the Mesh =
The GIS Mesher supports the building of meshes for TUFLOW FV, the following tutorial demonstrates the development of a very simple model mesh using the GIS Mesher. For this tutorial, step by step instructions are given to get you started with the GIS Mesher. This example problem demonstrates the development of a basic model mesh. Follow the steps performed here and expand upon them to develop more complex, real-world models. The example is a trapezoidal channel, dimensions as shown:
 
* Top width = 100 m
* Bottom width = 50 m
* Depth = 5 m
* Length of channel = 1,000 m
* Grade of channel = 1 in 1,000
* The model domain should have a resolution of 12.5 m across the channel and 25 m along the channel.
 
By now you should have downloaded the Meshing M01 Tutorial GIS Mesher Model data from [https://www.tuflow.com/downloads/tuflow-fv-models/ TUFLOW FV Tutorial Models]. This includes the '''Module_Data''','''Complete_Model''' and '''working''' folders. Please copy these folders to your preferred working location.
 
* The Module_Data folder contains the data files required to complete this tutorial
* The Complete_Mesh folder has the files for the completed tutorial in case you get stuck, and
* The working folder is for the files you create and work within.
 
=== Creating the Project ===
The GIS Mesher GUI provides tools for building projects, creating GIS files, running the mesher, and running TUFLOW FV. Firstly, we need to create a new project using the GIS Mesher GUI. <br>
Do this by selecting '''File > New Project''' from the menu. <br>
[[File:River_chan_Newproj_00.png|500px]]<br>
<br>
In the '''New Project''' dialog box, select the following: <br>
'''1.''' Specify the parent folder as the '''working''' folder in your tutorial folder (likely different than specified below), <br>
'''2.''' Set the project name as '''Trap_Channel''', <br>
'''3.''' Click on the '''[...]''' for the working projection and select the '''working_projection.prj''' file from the '''Module_Data''' folder, <br>
'''4.''' We will leave the GIS file type as ESRI Shapefile, <br>
'''5.''' For the Initial GIS files, please check '''mesh_polylines''', '''nodestrings''', and '''boundary''' and uncheck the remaining GIS file types, and <br>
'''6.''' Leave the filenames and other settings as default. <br>
<br>
The dialog should look similar to the figure below. '''Click Ok'''.
 
[[File:Trap_chan_projSetup_00.png|500px]]
<br>
<br>
Creating a new project creates a set of folders and files that we will use as a starting point to build the model. The folder structure is shown in the figure below. The '''.GISmesher''' folder stores the project settings for the GIS Mesher GUI. The '''meshing''' folder will have the meshing control files and has subfolders for '''GIS''' and '''Tables'''. The GIS folder has the blank GIS files for the boundary, mesh polylines (used to define size information), and nodestrings which will be used in the meshing process. The '''Tables''' folder is used for an advanced meshing technique called solution guided meshing which we will not be using. The '''TUFLOWFV''' folder and subfolders contain a TUFLOW FV simulation that can be used as a starting point to build models. Some of the folders and files will be referred to later.
 
[[File:Trap_chan_folderstructure_01.png]]
<br>
<br>
 
=== Defining the model domain ===
Now that the project has been created, we need to fill in the layers that were created by the GIS Mesher GUI. We'll start with the model domain (boundary GIS layer).
 
''Note: You may need to add the QGIS plugin '''NumericalDigitize''' to access the Numeric Digitizing tool''<br>
 
To set up the model boundary  '''(QGIS instructions)''':<br>
'''1.''' Open a new QGIS project and set the project CRS to '''WGS 84 / UTM zone 60S [EPGS:32760]''', <br>
'''2.''' Load the file '''working\Trap_Channel\meshing\GIS\boundary_001.shp''' by selecting '''Layer | Add Layer | Vector Layer''' from the menu. Select the file for the Vector Dataset(s) and click '''Add''', <br>
'''3.''' Make sure that the Digitizing Toolbar is active (right-click on the toolbar area to add it if needed). Select the '''boundary_001''' layer and make editable by selecting the '''Toggle Editing'''[[File:tut_01_qgis_editable_00.png]]button. Click on the '''Numerical Digitizing'''[[File:numericaldigi.png]]button and fill in the x and y values, as shown in the figure below. Select Coordinates are given '''in the CRS of the Layer''' and click '''OK''',<br>
 
 
[[File:tut_01_numeric_digi_00.png|350px]]
 
<br>
'''4.''' Make the '''ID 1''' in the dialog that pops up, and<br>
 
'''5.''' In the Digitizing Toolbar, click the '''save''' button and then the '''Toggle Editing''' to stop editing. <br>
 
Your Boundary shapefile should now look the same as the below screen grab: <br>
[[File:tut_01_boundaryshape_00.png|800px]]
 
=== Define the mesh size information ===
The mesh size information can be specified on mesh points but we are going to use mesh polylines so we can elongate the cells in the direction of flow. Mesh polylines specify sizes as a size parallel to the polyline and a size perpendicular to the polyline. <br>
 
To create the polylines and set the mesh sizes (QGIS instructions):<br>
'''1.''' Add the file '''Working\Trap_channel\meshing\GIS\mesh_polylines_001.shp''' to QGIS using the '''Layer | Add Layer | Vector Layer''' Command, <br>
'''2.''' Select the '''mesh_polylines_001''' layer in the layers panel and click the '''Toggle Editing'''[[File:tut_01_qgis_editable_00.png]]button on the Digitizing Toolbar, and <br>
'''3.''' Use the '''Numerical Digitizing'''[[File:numericaldigi.png]] tool to create mesh polylines with the following geometry and attributes. Please note that to use this tool, the '''NumericalDigitize''' plugin must be installed. To install this plugin, go to '''Plugins | Manage and Install Plugins''', search for "NumericalDigitize" to select the plugin, and then click '''Install Plugin'''. <br>
 
:''' a. Polyline 1 south side of flume''' <br>
:: '''i.''' geometry: from 0,0 to 1000, 0 <br>
:: '''ii.''' attributes: sizePara = 25, SizePerp = 12.5 <br>
 
 
[[File:tut_01digi_polylines_00.png|800px]] <br>
 
:''' b. Polyline 2 north side of flume <br>'''
:: '''i.''' geometry: from 0,100 to 1000,100 <br>
:: '''ii.''' attributes: sizePara = 25, SizePerp = 12.5 <br>
'''4.''' Click the '''Save''' button and then '''Toggle Editing''' button on the digitizing toolbar. <br>
 
Your mesh_polylines shapefile should now look the same as the below screen grab <br>
[[File:tut_01_polylines_00.png|800px]] <br>
 
=== Specify the nodestring locations ===
Now that we have told the mesher how to size the mesh cells, we need to identify the nodestring locations. We need a nodestring on the upstream side (west) of the model for the inflow boundary condition and a nodestring on the downstream side (east) of the model for the outflow boundary condition. <br>
 
To specify the nodestring locations (QGIS instructions):<br>
'''1.''' Add the file '''Working\Trap_Channel\meshing\GIS\nodestrings_001.shp''' to QGIS using the '''Layer | Add Layer | Vector Layer''' Command, <br>
'''2.''' Select the '''nodestrings_001''' layer in the layers panel and click the '''Toggle Editing'''[[File:tut_01_qgis_editable_00.png]]button on the Digitizing Toolbar, <br>
'''3.''' With '''snapping enabled''' [[File:tut_01_EnableSnapping_00.png]] (Snapping Toolbar), '''Add a Line Feature''' [[File:tut_01_digiLine_00.png]] for the inflow on the left side of the mesh (from 0, 0 to 0, 100). Set the ID to '''1''' and specify '''T''' for External which forces the nodestring to follow the mesh boundary, and <br>
'''4.''' Repeat step 3 for the downstream side of the mesh (1000, 0 to 1000,100). Set the ID to '''2''' and External to '''T'''.<br>
'''5.''' Click the '''Save''' button and then the '''Toggle Editing''' button on the digitizing toolbar.<br>
 
The figure below shows the direction and ID of your newly created nodestrings <br>
 
[[File:tut_01_Nodestrings_00.png|800px]]
<br>
 
=== Add the Elevation data ===
We need to tell the GIS Mesher the elevation data to apply to the model. This is done by changing the meshing control file.
 
To specify the flume bathymetry for elevations: <br>
'''1.''' Open the file '''working\Trap_Channel\meshing\Trap_Channel_000.mcf''' in a text editor (Notepad++ is a free editor that has a lot of useful features) and <br>
'''2.''' Find the line that has '''Read Grid Zpts'''. The line starts with an exclamation mark (!) which comments it out. Remove the exclamation mark and change it to '''Read Grid Zpts == ..\..\..\Module_Data\bathy_raster.tif''', as shown in the figure below.<br>
 
[[File:Tut_01_MCF_GRID_COMMANDS_00.png]]
<br>
 
=== Build the mesh using the GIS Mesher ===
Now we need to build the mesh from the GIS Mesher GUI. To do this:<br>
'''1.''' In the '''Run Mesher''' tab, verify that the control file is '''Trap_Channel_000.mcf''',<br>
'''2.''' Click '''Run'''. The text in the output should provide feedback on the meshing process and after a few seconds display the line ''GIS Mesher Finished Successfully, and''<br>
[[File:Trap_chan_RunMesher_00.png]] <br>
 
If your simulation ran successfully you should now have three new sub folders in the Meshing folder these include the output, check, and log folders. <br>
 
'''3.''' Load the file '''meshing\output\Trap_Channel_000_Cells.shp''' into your GIS Application. <br>
This shapefile provides a representation of the mesh file. This should look something like the figure below if styled similarly based upon '''Z''' value and coloured using the Viridis color ramp. <br>
 
[[File:tut_01_00_mesh_cells.png|800px]] <br>
 
The '''Trap_Channel_000.2dm''' file located in .\meshing\output\ is the meshing input file for TUFLOW FV. This '''.2dm''' file will later become the geometry input file for the TUFLOW FV tutorial model in [https://fvwiki.tuflow.com/index.php?title=Tutorial_M01_GIS_Mesher Tutorial Module 01 with GIS Mesher]. Congratulations on building your first mesh. <br>
 
=Conclusion=
Congratulations on completing [https://fvwiki.tuflow.com/index.php?title=Meshing_M01_Tutorial_GIS_Mesher Meshing M01 Tutorial GIS Mesher]. You have now learnt how to build a simple mesh model in the GIS Mesher which can be used in [https://fvwiki.tuflow.com/index.php?title=Tutorial_M01_GIS_Mesher Tutorial Module 01 with GIS Mesher].
 
To complete more tutorials or learn more tips and tricks, please return to the [[Main Page|TUFLOW FV Wiki Mainpage]]. <br>
 
We will continue to add more functionality over time so please periodically review. If you wish to keep up to date with all things TUFLOW and TUFLOW FV then please join [https://www.linkedin.com/groups/1908583 our LinkedIn group]. <br>
 
If you have any queries, feedback or requests for new functionality, please feel free to get in contact with [mailto:support@tuflow.com support@tuflow.com]

Revision as of 14:25, 24 May 2023

USEFUL LINKS
Wiki Links Help Downloads
TUFLOW FV Wiki Main Page Products Support/Contact TUFLOW FV Downloads
TUFLOW FV Tutorials Requesting a Licence Tutorial Module Data
TUFLOW Classic/HPC Wiki TUFLOW FV Glossary Manuals

Tutorial Description

This tutorial is designed to introduce the fundamentals of creating a mesh in GIS Mesher. Specifically, you will create a water passage along a simple geometry, trapezoidal channel. By the following steps outlined in this tutorial, you will create a trapezoidal channel and the computational mesh using GIS Mesher. The mesh files you create in this tutorial can be used in the TUFLOW FV Tutorial Module 01 with GIS Mesher.

Specifically in this tutorial you will:

  • Create the project using the GIS Mesher
  • Define the model domain (boundary polygon)
  • Define the mesh sizes
  • Specify the nodestring locations
  • Add the Elevation data
  • Build the mesh using the GIS Mesher

For this simple model a single material will be used for the full domain.

TUFLOW FV doesn't have its own graphical user interface (GUI), it uses GIS software, GIS Mesher software, and a text editor for its model creation and result viewing. As such, it is very efficient and flexible and doesn't have the same data load/visualisation limitations using big datasets as other modelling software GUIs Please note this tutorial has been created using GIS Mesher 2023.01. If using a different version of the GIS Mesher GUI, some of the dialogue boxes and screen shots may change slightly, however the overall workflow should be similar. If you run into any problems or need help, please contact support@tuflow.com.

Requirements and Downloads

Requirement Brief Description Download
GIS Mesher The GIS Mesher developed by Rising Water Software builds meshes for hydrodynamic models that use a combination of quadrilateral and triangular meshes. Spatial data is provided to the mesher as GIS layers, so that you can use your favorite GIS application to build quality meshes quickly and easily. Solution guided meshing uses results from initial mesh solutions to iteratively improve meshes. Making it easy to generate good meshes for even complicated hydrodynamic

This tutorial was developed using GIS Mesher version 2023.01, it recommended to use this version or later versions of GIS Mesher. If using a different version of the GIS Mesher, some of the dialogue boxes and screen shots may change slightly, however the overall workflow should be similar. If you run into any problems or need help, please contact support@tuflow.com.

GIS Mesher downloads and release notes can be found here GIS Mesher.
QGIS

QGIS TUFLOW plugin
The geographic information system (GIS) QGIS will be used in this tutorial to build the mesh. This tutorial was developed with QGIS 3.20.1, it is recommended to use this version or later versions. If using a different version of QGIS, some of the dialogue boxes and screen shots may change slightly.

The TUFLOW plugin includes numerous tools to increase workflow efficiency.

QGIS can be download from Latest 64-bit version of QGIS.

QGIS TUFLOW Plugin Installation.

Model Data The data provided for the completion of this tutorial includes:
  • The Module_Data folder which contains the bathymetry data as a raster (.tif) dataset for the trapezoidal channel and a projection file (.prj) for the project
  • The Complete_Mesh folder that contains the files for the completed tutorial in case you get stuck, and
  • A working folder is provided for the files you create and work within.
TUFLOW FV Tutorial Models.

Assumed Knowledge No prior knowledge is required for the completion of this tutorial. We have designed this tutorial to provide an introduction to meshing for all modelling levels. If you run into any problems or need help, please contact support@tuflow.com

Building the Mesh

The GIS Mesher supports the building of meshes for TUFLOW FV, the following tutorial demonstrates the development of a very simple model mesh using the GIS Mesher. For this tutorial, step by step instructions are given to get you started with the GIS Mesher. This example problem demonstrates the development of a basic model mesh. Follow the steps performed here and expand upon them to develop more complex, real-world models. The example is a trapezoidal channel, dimensions as shown:

  • Top width = 100 m
  • Bottom width = 50 m
  • Depth = 5 m
  • Length of channel = 1,000 m
  • Grade of channel = 1 in 1,000
  • The model domain should have a resolution of 12.5 m across the channel and 25 m along the channel.

By now you should have downloaded the Meshing M01 Tutorial GIS Mesher Model data from TUFLOW FV Tutorial Models. This includes the Module_Data,Complete_Model and working folders. Please copy these folders to your preferred working location.

  • The Module_Data folder contains the data files required to complete this tutorial
  • The Complete_Mesh folder has the files for the completed tutorial in case you get stuck, and
  • The working folder is for the files you create and work within.

Creating the Project

The GIS Mesher GUI provides tools for building projects, creating GIS files, running the mesher, and running TUFLOW FV. Firstly, we need to create a new project using the GIS Mesher GUI.
Do this by selecting File > New Project from the menu.
River chan Newproj 00.png

In the New Project dialog box, select the following:
1. Specify the parent folder as the working folder in your tutorial folder (likely different than specified below),
2. Set the project name as Trap_Channel,
3. Click on the [...] for the working projection and select the working_projection.prj file from the Module_Data folder,
4. We will leave the GIS file type as ESRI Shapefile,
5. For the Initial GIS files, please check mesh_polylines, nodestrings, and boundary and uncheck the remaining GIS file types, and
6. Leave the filenames and other settings as default.

The dialog should look similar to the figure below. Click Ok.

Trap chan projSetup 00.png

Creating a new project creates a set of folders and files that we will use as a starting point to build the model. The folder structure is shown in the figure below. The .GISmesher folder stores the project settings for the GIS Mesher GUI. The meshing folder will have the meshing control files and has subfolders for GIS and Tables. The GIS folder has the blank GIS files for the boundary, mesh polylines (used to define size information), and nodestrings which will be used in the meshing process. The Tables folder is used for an advanced meshing technique called solution guided meshing which we will not be using. The TUFLOWFV folder and subfolders contain a TUFLOW FV simulation that can be used as a starting point to build models. Some of the folders and files will be referred to later.

Trap chan folderstructure 01.png

Defining the model domain

Now that the project has been created, we need to fill in the layers that were created by the GIS Mesher GUI. We'll start with the model domain (boundary GIS layer).

Note: You may need to add the QGIS plugin NumericalDigitize to access the Numeric Digitizing tool

To set up the model boundary (QGIS instructions):
1. Open a new QGIS project and set the project CRS to WGS 84 / UTM zone 60S [EPGS:32760],
2. Load the file working\Trap_Channel\meshing\GIS\boundary_001.shp by selecting Layer | Add Layer | Vector Layer from the menu. Select the file for the Vector Dataset(s) and click Add,
3. Make sure that the Digitizing Toolbar is active (right-click on the toolbar area to add it if needed). Select the boundary_001 layer and make editable by selecting the Toggle EditingTut 01 qgis editable 00.pngbutton. Click on the Numerical DigitizingNumericaldigi.pngbutton and fill in the x and y values, as shown in the figure below. Select Coordinates are given in the CRS of the Layer and click OK,


Tut 01 numeric digi 00.png


4. Make the ID 1 in the dialog that pops up, and

5. In the Digitizing Toolbar, click the save button and then the Toggle Editing to stop editing.

Your Boundary shapefile should now look the same as the below screen grab:
Tut 01 boundaryshape 00.png

Define the mesh size information

The mesh size information can be specified on mesh points but we are going to use mesh polylines so we can elongate the cells in the direction of flow. Mesh polylines specify sizes as a size parallel to the polyline and a size perpendicular to the polyline.

To create the polylines and set the mesh sizes (QGIS instructions):
1. Add the file Working\Trap_channel\meshing\GIS\mesh_polylines_001.shp to QGIS using the Layer | Add Layer | Vector Layer Command,
2. Select the mesh_polylines_001 layer in the layers panel and click the Toggle EditingTut 01 qgis editable 00.pngbutton on the Digitizing Toolbar, and
3. Use the Numerical DigitizingNumericaldigi.png tool to create mesh polylines with the following geometry and attributes. Please note that to use this tool, the NumericalDigitize plugin must be installed. To install this plugin, go to Plugins | Manage and Install Plugins, search for "NumericalDigitize" to select the plugin, and then click Install Plugin.

a. Polyline 1 south side of flume
i. geometry: from 0,0 to 1000, 0
ii. attributes: sizePara = 25, SizePerp = 12.5


Tut 01digi polylines 00.png

b. Polyline 2 north side of flume
i. geometry: from 0,100 to 1000,100
ii. attributes: sizePara = 25, SizePerp = 12.5

4. Click the Save button and then Toggle Editing button on the digitizing toolbar.

Your mesh_polylines shapefile should now look the same as the below screen grab
Tut 01 polylines 00.png

Specify the nodestring locations

Now that we have told the mesher how to size the mesh cells, we need to identify the nodestring locations. We need a nodestring on the upstream side (west) of the model for the inflow boundary condition and a nodestring on the downstream side (east) of the model for the outflow boundary condition.

To specify the nodestring locations (QGIS instructions):
1. Add the file Working\Trap_Channel\meshing\GIS\nodestrings_001.shp to QGIS using the Layer | Add Layer | Vector Layer Command,
2. Select the nodestrings_001 layer in the layers panel and click the Toggle EditingTut 01 qgis editable 00.pngbutton on the Digitizing Toolbar,
3. With snapping enabled Tut 01 EnableSnapping 00.png (Snapping Toolbar), Add a Line Feature Tut 01 digiLine 00.png for the inflow on the left side of the mesh (from 0, 0 to 0, 100). Set the ID to 1 and specify T for External which forces the nodestring to follow the mesh boundary, and
4. Repeat step 3 for the downstream side of the mesh (1000, 0 to 1000,100). Set the ID to 2 and External to T.
5. Click the Save button and then the Toggle Editing button on the digitizing toolbar.

The figure below shows the direction and ID of your newly created nodestrings

Tut 01 Nodestrings 00.png

Add the Elevation data

We need to tell the GIS Mesher the elevation data to apply to the model. This is done by changing the meshing control file.

To specify the flume bathymetry for elevations:
1. Open the file working\Trap_Channel\meshing\Trap_Channel_000.mcf in a text editor (Notepad++ is a free editor that has a lot of useful features) and
2. Find the line that has Read Grid Zpts. The line starts with an exclamation mark (!) which comments it out. Remove the exclamation mark and change it to Read Grid Zpts == ..\..\..\Module_Data\bathy_raster.tif, as shown in the figure below.

Tut 01 MCF GRID COMMANDS 00.png

Build the mesh using the GIS Mesher

Now we need to build the mesh from the GIS Mesher GUI. To do this:
1. In the Run Mesher tab, verify that the control file is Trap_Channel_000.mcf,
2. Click Run. The text in the output should provide feedback on the meshing process and after a few seconds display the line GIS Mesher Finished Successfully, and
Trap chan RunMesher 00.png

If your simulation ran successfully you should now have three new sub folders in the Meshing folder these include the output, check, and log folders.

3. Load the file meshing\output\Trap_Channel_000_Cells.shp into your GIS Application.
This shapefile provides a representation of the mesh file. This should look something like the figure below if styled similarly based upon Z value and coloured using the Viridis color ramp.

Tut 01 00 mesh cells.png

The Trap_Channel_000.2dm file located in .\meshing\output\ is the meshing input file for TUFLOW FV. This .2dm file will later become the geometry input file for the TUFLOW FV tutorial model in Tutorial Module 01 with GIS Mesher. Congratulations on building your first mesh.

Conclusion

Congratulations on completing Meshing M01 Tutorial GIS Mesher. You have now learnt how to build a simple mesh model in the GIS Mesher which can be used in Tutorial Module 01 with GIS Mesher.

To complete more tutorials or learn more tips and tricks, please return to the TUFLOW FV Wiki Mainpage.

We will continue to add more functionality over time so please periodically review. If you wish to keep up to date with all things TUFLOW and TUFLOW FV then please join our LinkedIn group.

If you have any queries, feedback or requests for new functionality, please feel free to get in contact with support@tuflow.com