Meshing M03 Draft

From TUFLOW FV Wiki
Jump to navigation Jump to search

Tutorial Description

Read the Tutorial Introduction before starting this tutorial. It outlines the required links to download SMS, which will be use for mesh generation.

This tutorial is designed to introduce the skills required for creating a complex mesh, and builds on the skills introduced in Meshing Module 1 and Meshing Module 2. Specifically, this tutorial includes:

  • Creation and modification of a complex mesh, including the use of the SMS topographic pre-processor TOPAZ.
  • Meshing techniques for different regions of a model domain, including channelised areas, intertidal mangrove zones, and the offshore region.

The optional Going Further section demonstrates how to create breaklines to define elevations within the model domain, and provides steps on how to use multiple elevation data types to build a bathymetric surface in SMS Community.

Mesh Extent

The tutorial focuses on Cudgen Creek, a small coastal estuary on the eastern Australian coastline. The mesh extends approximately 20 km north-south and 12km east-west.

CC meshDomain.png

Requirements And Downloads

Requirement Brief Description
Meshing Data Download the Meshing Module 3 Data Package.
Assumed Knowledge It is recommended to complete the Meshing Module 1 and Meshing Module 2 prior to completing this tutorial. If you run into any problems or need help, please contact support@tuflow.com

Prepare The Working Environment

Unzip the required Data Package to your preferred working location, for example E:\TUFLOWFV\Meshing_M03.

  • The Complete_Mesh folder has the files for the completed tutorial.
  • The Module_Data folder has the files for the completed tutorial.
  • The Working folder is where files associated with mesh development will be saved.
M03 Mesh folder structure.png

Note: All file paths referred to will be relative to this base directory. For example, Complete_Mesh\Cudgen_Creek_001.2dm refers to E:\TUFLOWFV\Meshing_M03\Complete_Mesh\Cudgen_Creek_001.2dm .

Provided Project files

To save time and allow focus on meshing techniques multiple files have been provided. Copy the following files from the Model_Data folder into the specified folders:

Module_Data\ Copy to Description
Base_Data.map Working\Map SMS map data file that will assist in the generation of mesh. The spatial reference system is GDA94 / MGA zone 56 (EPSG:28356). The vertical datum is the Australian Height Datum (AHD).
DEM_Catchment_5m_AHD_MGA56.tif Working\DEM Digital elevation model of the Cudgen Creek catchment at 5m grid size. The spatial reference system is GDA94 / MGA zone 56 (EPSG:28356). The vertical datum is the Australian Height Datum (AHD).
Channel_Bathy_5m_AHD_MGA56.tif Working\DEM Bathymetry of the lower estuary at a 5m grid size. The spatial reference system is GDA94 / MGA zone 56 (EPSG:28356). The vertical datum is the Australian Height Datum (AHD).

Setup The SMS Project

Save The Workspace

Launch SMS and use the below steps and video to save the workspace in the Working folder:

1. From the menu bar select File > Save As.
2. Navigate to Working folder.
3. Save the workspace as Cudgen_Creek_001.sms.

Set The Workspace Projection

Set the projection GDA 1994 MGA Zone 56 from the menu bar Display > Display Projection....

Use the below steps and video to set the workspace projection:

  1. Go to Display > Display Projection....
  2. Select Global projection.
  3. The Horizontal Projection dialog will appear. In the Filter strings: type GDA 1994 MGA Zone 56. Select the projection and OK > OK.

Load And Display The Data

Use the below steps and video to open and set the display options for map files and aerial imagery:

1. Select File > Open.... Navigate to Working\Map\Base_Data.map and Open. Specify the display as below:
  • Within the Map Data panel turn on Breaklines to view the current display.
  • Select Display Options DisplayOptionToolSMS.png.
  • In the Display Options select the point/Node dropdown and set the the colour to red.
  • Check the Vertex attributes are on and update symbol attributes to a crosshair symbol +.
  • Select OK > OK.
2. Select File > Add Online Maps.... From the Get Online Maps dialog select World Imagery > OK. Specify the display as below:
  • From the project panel right click on World Imagery and select Transparency....
  • Update the transparency to 30%. Select OK.

Constructing The Mesh

TUFLOW FV solves the Nonlinear Shallow Water Equation (NLSWE) on unstructured geometries and is commonly referred to as a flexible mesh model. Compared to structured rectilinear grids (i.e. fixed grids) the design of the flexible mesh tends to have a greater influence on model performance. Therefore, more time and effort should be spent preparing the model mesh geometry. Over the life cycle of a modelling project, a well assembled mesh will save time (for both modellers and computers).

The tutorial is designed to introduce key skills required in developing a model mesh including how to:

  • Construct an in channel mesh.
  • Construct an intertidal mangrove mesh.
  • Construct an ocean mesh.

Whilst working through the tutorial remember to save the project frequently.

Building An In Channel Mesh

The mesh in this example uses high resolution quadrilaterals to simulate in-channel hydrodynamics. For demonstration purposes, meshing will be undertaken downstream of the bridge to the estuary entrance only. However, the same meshing techniques can be applied to other channelised areas of the model domain. Specifically this section demonstrates how to:

  • Run TOPAZ.
  • Create bank lines.
  • Edit bank lines.
  • Define the downstream bridge opening.
  • Use blended arcs to define smooth bank lines.
  • Generate a mesh.

The SMS topographic preprocessor TOPAZ helps to guide mesh development as it allows the extraction of topographic features from the DEM such as the channel centreline and banks. To maintain continuity in the tutorial, a separate DEM has been provided for running the TOPAZ processor. However, in real-world studies, modellers should always develop the mesh using the model DEM.

Use the following steps and video to open the data and run TOPAZ:

  1. Select File > Open.... Navigate to Working\DEM\DEM_Catchment_5m_AHD_MGA56.tif and Open.
  2. Right click on DEM_Catchment_5m_AHD_MGA56.tif and select Run TOPAZ. TOPAZ processing may take some time.
  3. Once complete select OK.
  4. Navigate to Working\DEM and two new files (.Tz and .TZlnv) will have been created.


The lower channel bathymetry has been provided and will help guide mesh generation in the lower estuary mesh. Use the below steps and video to load and display the bathymetry:

Select File > Open.... Navigate to Working\DEM\Channel_Bathy_5m_AHD_MGA56.tif and Open. Specify the display as below.
  • Right click on Channel_Bathy_5m_AHD_MGA56.tif and select Zoom To Extents.
  • Right click on Channel_Bathy_5m_AHD_MGA56.tif and select Transparency....Update the transparency to 40%.
  • Right click on Channel_Bathy_5m_AHD_MGA56.tif and select Display Options....
  • Select Contour Options... from the Raster Display Options Dialog.
  • Check Specify a range.
  • Update the Min field to-2.0 and the Max to 1.0. Select OK > OK.


To create the Bank Lines the Stream and Guidance map data have been provided. These are required to define the bank lines when using the Extract Banks tool. Use the following steps and videos to create the channel bank lines:

  1. In the project panel right click on Map Data > New Folder. Rename it Channel mesh.
  2. Under the Base data folder select Stream coverage. Right click and select duplicate.
  3. Move Streams (2) into the Channel mesh folder and rename it CL.
  4. From the provided Map Data select the Guidance coverage and use the following steps to copy the guidance Feature Point.
    • Using the Select Objects tool select the point at the estuary entrance. Right click and select Copy to Coverage....
    • From the dialog select CL coverage and OK.
  5. The copied feature point will appear in the CL coverage.

Now that the stream line and guidance point are within the same coverage bank lines can be created using the following steps and video:

  1. Using the Select Objects tool hold Ctrl > drag the curser over the the arc in the CL coverage.
  2. Now holding Shift select the guidance point that was copied into this coverage. Right click and select Extract Banks....
  3. From the Extract Features dialog update the following:
    • From the Use the depth drop down select Closest to centreline.
    • Set the Distance from Centerline maximum to 125.0.
    • Update the Output Coverage name to Channel_mesh.
  4. Select the new Channel_mesh coverage and right click and select Type > Generic > Mesh Generator.


The Break walls coverage has been provided to focus on building the in channel mesh. Use the following steps and video to copy the break walls into the Mesh coverage:

  1. Under the Base data folder select the Breakwalls coverage.
  2. Using the Select Objects tool click and drag the cursor across the nodes, vertices, arcs and polygons within the Breakwalls coverage (refer to video).
  3. Right click and select Copy to Coverage....
  4. From the dialog select Channel_mesh and OK. The breakwalls are now represented in the Mesh coverage.
  5. Use the Select Feature Point tool to snap the bankline feature arcs to the breakwall arcs (refer to video).

In this section of the tutorial, the focus will be on modifying and reviewing the lower estuary channel only. However in a real world example the modeller would review and refine the entire mesh. To accurately represent the estuary channel we need modify the bank lines using the DEM and aerial imagery as guides. In this section we will delete unnecessary vertices and use the SMS tools redistribute vertices and to create a smooth arcs that are later used to generate the mesh. It is recommended to minimise manual redistribution of vertices.

Use the following steps and videos to as a guide to edit the banks:

1. Turn on the DEM and aerial image. Use both datasets to visualise where the channel banks are located. Note when editing vertices SMS does not have an undo function therefore it may be beneficial for some users to duplicate the map data as changes are made.
2. Starting at the left bank use the Select Feature Vertex to select and delete unnecessary vertices so that the channel is adequately represented. You may need to move some vertices into place. Use the below video as a guide.


3. Repeat steps 1-2 for the right bank and use the below video as a guide:


Use the below steps and video to redistribute the vertices and smooth the channel bank lines:

4. Using the Select Feature Arc tool hold shift and select both arcs.
5. Right click and select Redistribute Vertices....
6. Set the following attribute in the Redistribute Vertices:
  • From the Specify drop down select Specified spacing.
  • Set an average spacing of 5.
  • Check Use cubic spline and select OK.
7. Whilst both arcs are still select right click and select Smooth Arc(s).... In the Smooth Arcs Tool dialog set the Number of neighbors to 7. Leave the rest as the default and select OK.


Some sections of the channel may not be well defined. Repeat steps 1-7 until the channel is well defined. Use the below video as an example.


The following section outlines meshing techniques to resolve hydraulic flow through the downstream bridge opening. Refer to the aerial image as a spatial reference and follow the below steps and videos:

1. Select Create Feature Arc and digitise a new arc using the footpath on the bridge as a guide (refer to the video).

Now add two new internal arcs to resolve the bridge opening.

  1. Using the Create Feature Arc tool digitiise an internal arc on the left bank. Start from the bridge arc and digitise towards the left bank (Refer to video).
  2. Repeat the same for the right bank (Refer to video).

Redefine the bank lines use the below steps and videos:

  1. Using the Select Feature Arc select and right click on the arc along the bridge and select Redistribute Vertices.... Set the following attributes:
    • From the Specify drop down select Number of Segments.
    • Set the number of segments to 4.
    • Select OK.
  2. Select and delete both outer arcs.
  3. Using the Select Feature Point select the remaining nodes. Right click and select Nodes <-> Vertices.
  4. Using the Select Feature Arc tool hold shift and select both arcs. Right click and select Redistribute Vertices....Set the following attributes in the Redistribute Vertices:
    • From the Specify drop down select Specified spacing.
    • Set an average spacing of 5.
    • Check Use cubic spline and select OK.
  5. Whilst both arcs are still selected right click and select Smooth Arc(s).... In the Smooth Arcs Tool dialog set the Number of neighbors to 7. Leave the rest as the default and select OK.


The lower channel of the estuary is now delineated by the bank lines. Use the following steps and videos to define and generate a smooth mesh:

  1. Using the Select Feature Arc tool hold shift and select both arcs. Right click and select Blend Arcs.
  2. Select the new blended arc. Right click and select Redistribute Vertices....Set the following attributes in the Redistribute Vertices:
    • From the Specify drop down select Specified spacing.
    • Set an average spacing of 20.
    • Check Use cubic spline and select OK.
  3. Whilst the arc is still selected right click and select Smooth Arc(s).... In the Smooth Arcs Tool dialog set the Number of neighbors to 1. Leave the rest as the default and select OK.
  4. Hold shift and select the blended arc (noting the arc ID in the bottom commentary of the SMS window) and the left bank arc (note the Arc ID). Right click and select Redistribute Vertices....Set the following attributes in the Redistribute Vertices:
    • From the Specify drop down select Source Arc.
    • Update the Source Arc with the blended arc ID.
    • Update the Target Arc with the bank arc ID.
    • Check Use cubic spline and select OK.
  5. Repeat Step 4 on the right bank line arc.
  6. Delete the blended arc.


Use the below steps and video to generate the mesh:

  1. From the workspace toolbar select Feature Objects > Clean.... In the Clean Options dialog set the following:
    • Set Snap nodes and vertices to All nodes.
    • Set Clean coverage to All arcs and select OK.
  2. From the workspace toolbar select Feature Objects > Build Polygons.
  3. Using the Select Feature Polygon tool select the channel polygon. Right click and select Polygon Attributes....
  4. In the 2D Mesh Polygon Properties dialog set the Mesh type to Patch (quadrilaterals). Select OK.
  5. Right click on the Channel_mesh coverage and select Convert > Map -> 2D Mesh.
  6. Rename the mesh Channel_mesh and select OK.
  7. Uncheck any open Map Data and review the mesh. Delete the mesh when complete.


Building A Mangrove Mesh

This example uses triangles to mesh and capture intertidal hydrodynamics within mangrove areas. For demonstration purposes, meshing of the mangrove area will be undertaken in two intertidal regions upstream of the bridge. The same meshing techniques can be applied to other intertidal areas throughout the model domain. Specifically this section demonstrates how to:

  • Identify and digitise intertidal areas in a mesh.
  • Edit paving (triangles) polygons and merge triangles.
  • Generate a mesh.

A map coverage template for meshing the intertidal mangrove areas has been provided for demonstration purposes. Use the following steps and video to duplicate the template data and set up the workspace:

  1. In the project panel right click on Map Data > New Folder. Rename it Mangrove mesh.
  2. Under the Base data folder select Mangrove_mesh_template coverage. Right click and select duplicate.
  3. Move Mangrove_mesh_template (2) into the Mangrove mesh folder and rename it Mangrove_mesh.
  4. Zoom into the bridge at the lower estuary. Note in the template the bank areas downstream of the bridge have been included.
  5. Check on the Channel_Bathy_5m_AHD_MGA56. Right click and select Display Options....Set the below options:
    • Select Contour Options... from the Raster Display Options Dialog.
    • Check Specify a range.
    • Update the Min field to -1.5 and the Max field to 3.0. Select OK > OK.

First, create the mangrove area on the northern bank using the steps and video as a guide:

  1. Using the Create Feature Arc tool digitise the mangrove area on the northern bank. Remember to use the aerial and DEM as a guide (refer to video).
  2. Using the Select Feature Arc tool select the arc. Right click and select Redistribute Vertices....Set the following attributes in the Redistribute Vertices:
    • From the Specify drop down select Specified spacing.
    • Set an average spacing of 5.
    • Check Use cubic spline and select OK.
  3. Whilst the arc is still selected right click and select Smooth Arc(s).... In the Smooth Arcs Tool dialog set the Number of neighbors to 7. Leave the rest as the default and select OK.
  4. Again Redistribute the vertices with the following attributes:
    • From the Specify drop down select Number of Segments.
    • Set the number of segments to 10.
    • Select OK.
  5. From the workspace toolbar select Feature Objects > Clean.... In the Clean Options dialog set the following:
    • Set Snap nodes and vertices to All nodes.
    • Set Clean coverage to All arcs and select OK.
  6. From the workspace toolbar select Feature Objects > Build Polygons.
  7. Using the Select Feature Polygon tool select the channel polygon. Right click and select Polygon Attributes....
  8. In the 2D Mesh Polygon Properties dialog set the Mesh type to Paving (triangles). Select Preview to view the paving elements. Select OK.


Create the mangrove area on the southern bank using the steps and video as a guide:

  1. Using the Create Feature Arc tool digitise the mangrove area on the northern bank. Remember to use the aerial and DEM as a guide (refer to video).
  2. Using the Select Feature Arc tool select the arc. Right click and select Redistribute Vertices....Set the following attributes in the Redistribute Vertices:
    • From the Specify drop down select Specified spacing.
    • Set an average spacing of 5.
    • Check Use cubic spline and select OK.
  3. Whilst the arc is still selected right click and select Smooth Arc(s).... In the Smooth Arcs Tool dialog set the Number of neighbors to 7. Leave the rest as the default and select OK.
  4. Again Redistribute the vertices with the following attributes:
    • From the Specify drop down select Number of Segments.
    • Set the number of segments to 9.
    • Select OK.
  5. From the workspace toolbar select Feature Objects > Clean.... In the Clean Options dialog set the following:
    • Set Snap nodes and vertices to All nodes.
    • Set Clean coverage to All arcs and select OK.
  6. From the workspace toolbar select Feature Objects > Build Polygons.
  7. Using the Select Feature Polygon tool select the channel polygon. Right click and select Polygon Attributes....
  8. In the 2D Mesh Polygon Properties dialog set the Mesh type to Paving (triangles). Select Preview to view the paving elements. Select OK.

Now the mangrove areas are delineated in the Map Data the mesh can can generated. Use the following steps and videos to define and generate the mesh and merge any unnecessary triangles within the mesh:

  1. From the Map Data right click on Mangrove_mesh. Select Convert > Map -> 2D Mesh.
  2. Rename the new mesh Mangrove_mesh.
  3. Uncheck any open Map Data. From the workspace toolbar select Elements > Merge Triangles. Note this is undertaken to remove thin triangles from the mesh that can potentially slow model runtimes.
  4. From the workspace toolbar select Nodes > Renumber.
  5. Review the mesh. Delete the mesh when complete.

Build An Ocean Mesh

This example demonstrates how to create a mesh for the offshore region using a mix of quadrilateral and triangular elements, and how to define the offshore boundary. Using tools available in the SMS Community, the mesh resolution in this example is deliberately designed to be finer near the estuary entrance and progressively coarser as it extends offshore. Specifically this section demonstrates how to:

  • Define the offshore boundary.
  • Alter the mesh resolution.
  • Generate the mesh and export the 2dm mesh file.

A map coverage template for meshing the offshore boundary has been provided for demonstration purposes. Use the following steps and video to duplicate the template data and set up the workspace:

  1. In the project panel right click on Map Data > New Folder. Rename it Ocean mesh.
  2. Under the Base data folder select Ocean_mesh_template coverage. Right click and select duplicate.
  3. Move Ocean_mesh_template (2) into the Ocean mesh folder and rename it Ocean_mesh.
  4. From the provided Map Data select the Coastline coverage and use the following steps to copy the feature arcs.
    • Using the Select Feature Arc tool select hold shift and select both arcs. Right click and select Copy to Coverage....
    • From the dialog select Ocean_mesh coverage and OK.


Use the following steps and video to set the onshore resolution using redistribution of vertices:

  1. Using the select feature arc select the northern coastal arc. Right click and select Redistribute Vertices....Set the following attributes in the Redistribute Vertices:
    • From the Specify drop down select Specified spacing.
    • Update the Average spacing to 150.
    • Update the Bias to 15.
    • Check Use cubic spline and select OK.
  2. Repeat the above steps for the southern coastal arc.


Use the following steps and video to define the offshore boundary arc and set the resolution:

  1. Using the Select Feature point tool hold shift and select the most northern and southern points (refer to video). Right click and select Define Domain. In the Domain Options set the following:
    • Check Semi-circular and OK. Note if the semicircular arc is oriented inland, then select and delete it, repeat this series of steps, but check the Switch side checkbox in the Define domain dialogue.
  2. Using the select feature arc select the new offshore boundary arc. Right click and select Redistribute Vertices....Set the following attributes in the Redistribute Vertices:
    • From the Specify drop down select Specified spacing.
    • Update the Average spacing to 750.
    • Update the Bias to 3.
    • Check 2nd bias (0.01-100.0) and update to 3.
    • Select OK.
  3. From the workspace toolbar select Feature Objects > Clean.... In the Clean Options dialog set the following:
    • Set Snap nodes and vertices to All nodes.
    • Set Clean coverage to All arcs and select OK.
  4. From the workspace toolbar select Feature Objects > Build Polygons.


Now that the entire model domain has been is delineated in the Map Data the final mesh can be generated. Use the following steps and videos to generate the mesh, merge any unnecessary triangles and save the mesh:

  1. From the Map Data right click on Ocean_mesh. Select Convert > Map -> 2D Mesh.
  2. Rename the new mesh Cudgen_Creek_001.
  3. Uncheck any open Map Data and from the workspace toolbar select Elements > Merge Triangles. Note this is undertaken to remove thin triangles from the mesh that can potentially slow model runtimes
  4. From the workspace toolbar select Nodes > Renumber.
  5. Review the mesh.
  6. To save the mesh as a 2D Mesh Files (*.2dm) select File > Save As. From the Save as type select 2D Mesh Files (*.2dm). Accept the default name Cudgen_Creek_001.2dm and Save.

Going Further (Optional)

This optional section Constructing Breaklines and Model Bathymetry (MADDYTODO update link) outlines the process of creating breaklines to define elevation and demonstrates how to combine multiple elevation datasets to generate model bathymetric in SMS Community. Use the below link to access the extended tutorial:

Feedback

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

If you wish to keep up-to-date with all things TUFLOW and TUFLOW FV, then please join our LinkedIn group.

Conclusion And Next Steps

Well done on completing Meshing Module 3. You have now learnt the skills to build a real-world coastal model mesh.

Return to the Tutorial Introduction Page to complete further meshing and model build tutorials.