Meshing M04 Draft

From TUFLOW FV Wiki
Jump to navigation Jump to search

THIS PAGE IS UNDER CONSTRUCTION


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, Meshing Module 2, and Meshing Module 3. Specifically, this tutorial includes:

  • Using SMS Toolbox to modify coverages and generate a floodplain mesh composed of quadrilaterals and triangle
  • Integrating essential floodplain elements, such as a low-flow channel, roads, and dams, into the mesh for accurate terrain representation.

The optional Going Further section demonstrates MADDYTODO make this page where we use the constant triangular paving in the paid version of sms to get a better mesh.

This tutorial was developed using SMS 13.3.14.

Mesh Extent

The tutorial focuses on a inland floodplain. The mesh is 0.5 km² and includes a low-flow channel, roads, and dams.

M04 MeshExtent 001.png

Requirements And Downloads

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

Prepare Your Working Environment

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

  • 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\Floodplain_001.2dm refers to E:\TUFLOWFV\Meshing_M04\Complete_Mesh\Floodplain_001.2dm.

Provided Project files

To save time and allow focus on meshing techniques multiple files have been provided.

Module_Data\Aerial Description
Aerial_Image.jpg Aerial imagery will assist in the generation of mesh. The spatial reference system is WGS84 / UTM zone 60s (EPSG:32760).
Module_Data\DEM
DEM_UTM_z60s.tif Digital elevation model of the model domain at 0.5m grid size. The spatial reference system is WGS84 / UTM zone 60s (EPSG:32760).
Module_Data\GIS
Model_Boundary_001.* GIS regions (polygon) layer that defines the model boundary and used to assist in the generation of mesh. The spatial reference system is WGS84 / UTM zone 60s (EPSG:32760).
River_Centreline_001.* GIS polyline layer that defines the channel centerline and used to assist in the generation of mesh. The spatial reference system is WGS84 / UTM zone 60s (EPSG:32760).
Road_Centrelines_001.* GIS polyline layer that defines the road centerlines and used to assist in the generation of mesh. The spatial reference system is WGS84 / UTM zone 60s (EPSG:32760).

*Multiple files with the same name as the shapefile but with a different file extension support a shapefile (e.g. .shx, .prj, .cpg, .dbf).

Set Up 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 Floodplain_001.sms.

Set The Workspace Projection

Set the projection WGS 1984 UTM Zone 60s 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 WGS 1984 UTM Zone 60s. Select the projection and OK > OK.

Load And Display The Data

Use the below steps and videos to open and set the display options for the provided files:

In the windows explorer navigate to the Module Data folder and drag the below files from the respective folders into the SMS workspace:

  • DEM/DEM_UTM_z60s.tif
  • Aerial/Aerial_Image.jpg
  • GIS/Model_Boundary_001.shp, River_Centreline_001.shp, and Road_Centrelines_001.shp

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

  1. From the project panel right click on Aerial_Image.jpg and select Transparency....
  2. Update the transparency to 80%. Select OK.
  3. From the tool bar select Display > Lighting Options...
  4. Under the Display Options Lighting tab check Enable lights. Select Ok. The display may take a moment to update.

Constructing The Mesh

Prepare Coverages

In this section GIS shape files are converted into SMS map data. Specifically the this section demonstrates how to convert the data, display and redistribute the vertices for the model boundary, river center line and road center lines.

Use the below steps and video prepare the model boundary coverage:

  1. From the Map Data panel right click on the Property Area and rename it Model Boundary.
  2. From the GIS Data panel right click on Model_Boundary_001.shp and select Convert > Shapes -> Feature Objects. Set the following:
    • Within the GIS to Feature Objects Wizard -- Step 1 of 2 dialog check the Select coverage for mapping is set to Model Boundary and that under Select shapefiles to map Model_Boundary_001.shp is checked. Select Next >.
    • Within the GIS to Feature Objects Wizard -- Step 2 of 2 select Finish.
  3. Uncheck the shapefiles under the GIS Data panel and review the Model Boundary under the Map Data panel.
  4. Select Display Options DisplayOptionToolSMS.png and set the follwing in the Display Options fdialog:
    • 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.
  5. Using the Select Feature Arc select the Model Boundary 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 2.0 and select OK.

Here the vertices are redistribute by 2m to make it easier to connect roads and river polygons to the boundary during the later stages of the tutorial. We will change the resolution before meshing·

Use the below steps and video prepare the river center line coverage:    

  1. Right click on the Map Data and select New Coverage.
  2. From the New Coverage dialog make sure the Area Property coverage type is select and rename it River Centre Line. Select OK.
  3. From the GIS Data panel right click on River_Centreline_001.shp and select Convert > Shapes -> Feature Objects. Set the following:
    • Within the GIS to Feature Objects Wizard -- Step 1 of 2 dialog check the Select coverage for mapping is set to River Centre Line and that under Select shapefiles to map River_Centreline_001.shp is checked. Select Next >.
    • Within the GIS to Feature Objects Wizard -- Step 2 of 2 select Finish.
  4. Using the Select Feature Arc select the Model Boundary 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 3.5.
    • Check Use cubic spline and select OK.

Use the below steps and video prepare the road center lines coverage:    

  1. Right click on the Map Data and select New Coverage.
  2. From the New Coverage dialog make sure the Area Property coverage type is select and rename it Road Centre Lines. Select OK.
  3. From the GIS Data panel right click on Road_Centrelines_001.shp and select Convert > Shapes -> Feature Objects. Set the following:
    • Within the GIS to Feature Objects Wizard -- Step 1 of 2 dialog check the Select coverage for mapping is set to Road Centre Lines and that under Select shapefiles to map Road_Centrelines_001.shp is checked. Select Next >.
    • Within the GIS to Feature Objects Wizard -- Step 2 of 2 select Finish.

Generate Low Flow Channel Polygons And Mesh

This section demonstrates how to generate the low flow channel of the mesh using the SMS Toolbox. Specifically this section includes:

  • Converting feature arcs to polygons.
  • Setting the mesh type.
  • Generating the mesh.

Use the below steps and video generate the low flow channel polygon:

  1. Under the Map Data panel turn on River Centre Line and select the Toolbox Toolbox.png from toolbar.
  2. From the Toolbox dialog select Coverages and double click Polygons from Arcs.
  3. In the Polygons from Arcs dialog set the following:
    • From the Input coverage drop down select Map Data/River Centre Line.
    • Set the Average element/cell width to 3.0.
    • Set the Number of elements/cells (must be 1 or even) to 2.
    • In Output coverage name the new coverage River Centre Line Poly 2x3m.
    • Leave the rest as default and select OK.
  4. Select the History. Right click on the latest Tool history select Edit and update the name to Polygons from Arcs- River Centre Line 2x3m and Close the dialog. Relabeling the tool history simplifies identifying tools that need to be re-run and is particularly useful if you are doing a lot of processing in the Toolbox.
  5. Review the River Centre Line Poly 2x3m coverage.

Use the below steps and video generate the low flow channel mesh:

  1. Select the new River Centre Line Poly 2x3m coverage. Right click and select Type > Generic > Mesh Generator.
  2. Zoom into the downstream end of the channel. Using the Select Feature Arc tool select the end transition triangle and delete the arc.
  3. Repeat step 2 at the upstream end of the channel.
  4. Right click on River Centre Line Poly 2x3m and select Zoom to Coverage.
  5. From the Toolbar click Build Polygons Build poly.png.
  6. Using the Select Feature Polygon tool select the channel polygon. Right click and select Polygon Attributes....
  7. In the 2D Mesh Polygon Properties dialog set the Mesh type to Patch (quadrilaterals) and select OK.
  8. Right click on River Centre Line Poly 2x3m and select Convert > Map -> 2D Mesh. Accept the default name. Uncheck the map data and review the mesh. Earlier, the Polygon from Arcs tool was configured to create a polygon with an average cell width of 3.0 and the number of cells set to 2. This configuration has resulted in the creation of a low-flow channel mesh that is 2 cells wide, with each cell measuring 3 meters in length. Right click on the Mesh and select Remove > Yes.

Generate Road Polygons And Mesh

This section demonstrates how to generate the roads within the mesh using the SMS Toolbox. Use the below steps and video generate the road polygons:

  1. Select the Toolbox Toolbox.png from toolbar.
  2. From the Toolbox dialog select Coverages and double click Polygons from Arcs.
  3. In the Polygons from Arcs dialog set the following:
    • From the Input coverage drop down select Map Data/Road Centre Lines.
    • Set the Average element/cell width to 3.0.
    • Set the Number of elements/cells (must be 1 or even) to 4.
    • In Output coverage name the new coverage Roads Centre Line Poly 4x3m.
    • Leave the rest as default and select OK.
  4. Select the History. Right click on the latest Tool history select Edit and update the name to Polygons from Arcs- Roads Centre Line Poly 4x3m and Close.
  5. Review the Roads Centre Line Poly 4x3m coverage and use the Select Feature Arc tool to delete the end transition triangles. There will be 5 arcs to delete in total.

Use the below steps and video generate a mesh of the roads:

  1. Right click on Roads Centre Line Poly 4x3m and select Type > Generic > Mesh Generator.
  2. From the Toolbar click Build Polygons Build poly.png.
  3. Using the Select Feature Polygon tool right click on the workspace and select Select All. Right click and select Polygon Attributes....
  4. In the 2D Mesh Multiple Polygon Properties dialog check Mesh types and set the type to Patch (quadrilaterals) and select OK.
  5. Right click on Roads Centre Line Poly 4x3m and select Convert > Map -> 2D Mesh. Accept the default name. Uncheck the map data and review the mesh. When finished right click on the Mesh and select Remove > Yes.

Trim And Merge Layers

The next steps in mesh development involve trimming the low flow channel using road polygons, after which the roads and channel can be merged into the same coverage. Use the below steps and video to trim the low flow channel:

  1. Select the Toolbox Toolbox.png from toolbar.
  2. From the Toolbox dialog select Coverages and double click Trim Coverage.
  3. In the Trim Coverage dialog set the following:
    • From the Input coverage containing arcs to be trimmed select Map Data/River Centre Line Poly 2x3m.
    • From the Input coverage containing polygons to trim by select Map Data/Roads Centre Line Poly 4x3m.
    • Set the Trimming option to Trim to outside.
    • In Output coverage name the new coverage River Centre Line Poly 2x3m Roads Trim.
    • Leave the rest as default and select OK.
  4. Select the History. Right click on the latest Tool history select Edit and update the name to Trim Coverage- River Centre Line Poly 2x3m Roads Trim and Close.
  5. Review the new coverage and check that that the tool has trimmed the channel at the roads.
  6. Right click on River Centre Line Poly 2x3m Roads Trim and select Type > Generic > Mesh Mesh Generator.

Use the below steps and video to merge the coverages:

  1. From the Map Data panel select River Centre Line Poly 2x3m Roads Trim. Now holding shift also select Roads Centre Line Poly 4x3m.
  2. Right click and select Merge Coverages. When the Do you want to delete the coverages used to make the merged coverage? message appears select NO.
  3. Rename the new coverage River and Roads Poly Merge and review the new coverage.

Clean The Merged Channel and Road Polygons

With the roads and channel now in the same coverage, the channel arcs can be connected to the roads, and the vertices redistributed to form a seamless mesh between the channel and the roads.

Use the below steps and video to snap the downstream channel arcs to the the road polygon:

  1. Make sure River and Roads Poly Merge coverage is selected from the Map Data panel.
  2. Uncheck the GIS Data in the project panel and zoom into the road towards the downstream end of channel.
  3. Using the Select Feature Point tool, select the point at the end of the channel arc and snap it to the nearest vertex along the road arc. Then reposition the point back to its original location (refer to video).
  4. Repeat Step 2 for the remaining 3 points on each channel arc (refer to video).

Use the below steps and video to redistribute and clean the vertices along the channel:

  1. Using the Select Feature Vertex tool delete the unnecessary vertex on the channel arcs downstream of the road. Then reposition the remaining vertices to ensure they are approximately evenly spaced (refer to video).
  2. Repeat Step 1 on the channel arcs on the upstream side of the road (refer to video).

Use the below step and video to redistribute and clean the vertices along the road:

  1. Using the Select Feature Vertex tool reposition the vertices along the road polygon to ensure they are approximately evenly spaced (refer to video).

Use the below steps and video to redistribute the vertices along the feature arc:

  1. Using the Select Feature Arc tool hold shift and select both arcs perpendicular to the channel (refer to video). Right click and select Redistribute Vertices....
  2. Set the following attributes in the Redistribute Vertices:
    • From the Specify drop down select Number of segments.
    • Set the Number of segments to 2 and select OK.

Use the below steps and video to snap the upstream channel to the the road:

  1. Zoom into the road towards the upstream end of channel.
  2. Using the Select Feature Point tool, select the point at the end of the channel arc and snap it to the nearest vertex along the road arc. Then reposition the point back to its original location (refer to video).
  3. Repeat Step 2 for the remaining 3 points on each channel arc (refer to video).

Use the below steps and video to redistribute and clean the vertices along the channel:

  1. Using the Select Feature Vertex tool delete the unnecessary vertex on the channel arc upstream of the road. Then reposition the remaining vertices to ensure they are approximately evenly spaced (refer to video).
  2. On the downstream side of the road reposition the remaining vertices along the channel arcs to ensure they are approximately evenly spaced (refer to video).

Use the below step and video to redistribute and clean the vertices along the road:

  1. Using the Select Feature Vertex tool reposition the vertices along the road polygon to ensure they are approximately evenly spaced (refer to video).

Use the below steps and video to redistribute the vertices along the feature arc:

  1. Using the Select Feature Arc tool hold shift and select both arcs perpendicular to the channel (refer to video). Right click and select Redistribute Vertices....
  2. Set the following attributes in the Redistribute Vertices:
    • From the Specify drop down select Number of segments.
    • Set the Number of segments to 2 and select OK.

Use the below steps and video generate a mesh of the roads and channel:

  1. Right click River and Roads Poly Merge coverage and select Zoom to Coverage.
  2. Right click on River and Roads Poly Merge and select Type > Generic > Mesh Generator.
  3. From the Toolbar click Build Polygons Build poly.png.
  4. Using the Select Feature Polygon tool right click on the workspace and select Select All. Right click and select Polygon Attributes....
  5. In the 2D Mesh Multiple Polygon Properties dialog check Mesh types and set the type to Patch (quadrilaterals) and select OK.
  6. Right click on River and Roads Poly Merge and select Convert > Map -> 2D Mesh. Accept the default name. Uncheck the map data and review the mesh. When finished right click on the Mesh and select Remove > Yes.


MADDY IT TO HERE Trim To The Boundary Coverage

Merge the Trimmed River Polygons, Road Polygons And Boundary

Clean Floodplain_001 And Generate Preliminary Mesh – Community Edition

Fix Small Triangle

Assign Topography And Generate Mesh

Assign topo

gen mesh

Renumber Nodes And Save Mesh

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 4. You have now learnt the skills to build a real-world floodplain model mesh.

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