Meshing M01 video draft

From TUFLOW FV Wiki
Jump to navigation Jump to search
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

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

This tutorial is designed to introduce the fundamentals of creating a mesh. Using the steps outlined in this tutorial you will create two alternate trapezoidal channel computational meshes. Specifically in this tutorial you will:

  • Create a trapezoidal mesh topology.
  • Define the elevation data.
  • Build and adjust two alternative mesh designs.

Trapezoidal Channel Project Area

The trapezoidal channel has dimensions as shown below:

  • 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 will have a resolution of 12.5 m across the channel and 25 m along the channel.
Oblique view of the completed model mesh displayed in SMS

Requirements And Downloads

Requirement Brief Description
Meshing Data Download the Meshing Module 1 Data Package.
Assumed Knowledge No prior knowledge is required for the completion of this tutorial. However it is assumed that you have read and downloaded the required software outlined in the Tutorial Introduction. 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

Prepare Your Working Environment

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

  • The Complete_Mesh folder has the files for the completed tutorial in case you get stuck.
  • The Working folder is where we will save our files and build our mesh.
    DataPackage meshing.png
    Note: All file paths referred to will be relative to this base directory. For example, Complete_Mesh\Trap_Channel_001 refers to E:\TUFLOWFV\Meshing_M01\Complete_Mesh\Trap_Channel_001.

Setup Your SMS Project

Launch SMS and the workspace will be as shown below. Before starting to mesh the working projection needs to be set and the workspace saved.

M01 SC 001.png

Setting The Workspace Projection

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

  1. From the menu bar select Display > Display Projection....
  2. In the Display Projection dialogue box check Global projection.
  3. The Horizontal Projection dialogue will appear. In Filter Strings: search WGS 84 UTM zone 60s and under Southern Hemisphere select WGS 84 UTM zone 60 > OK > OK.

Save The SMS Project

Use the below steps and video to save the workspace:

  1. From the menu bar select File > Save As....
  2. Navigate to Working folder and save the project as Trap_Channel_000.sms.

Constructing The Mesh

This section demonstrates key steps to building a simple mesh which includes:

  • Creating the mesh topology by digitising a series nodes and arcs within a mesh generator map coverage.
  • Defining the bathymetry data.
  • Building polygons in the mesh generator map coverage to define the mesh resolution and apply the bathymetric dataset for interpolation.
  • Generating an initial mesh, followed by mesh refinement and improvement.

Create The Mesh Topology

Use the below steps and video to set the mesh generator map coverage type:

  1. Create a Mesh Generator coverage type by right clicking on the Map Data label and select New Coverage.
  2. In the New Coverage dialog under Generic type select Mesh Generator and OK.
  3. Within the map Data panel right click on Area Property select Delete and Yes. This helps maintain a tidy workspace.

Use the below steps and videos to digitise feature points used to create the mesh boundaries:

  1. Select the Create Feature Point 1.1.1B.png tool.
  2. Digitise a point anywhere in the SMS Graphics Window.
  3. Use the coordinate boxes in the toolbar above the main display window to manually update the coordinates (x and y), and elevation value (z). Create eight points in total and update their x, y, and z values as specified in the table below and refer to the videos as a guide.
Note if the points are not visible in the graphics window, right click on Mesh generator and select Zoom to Coverage.
PT X Y Z
1 0.0 0.0 0.0
2 0.0 25 -5
3 0.0 75 -5
4 0.0 100 0.0
5 1000 0.0 0.0
6 1000 25 -6
7 1000 75 -6
8 1000 100 0.0

This video demonstrates digitisation of points 1-4:

This video demonstrates digitisation of points 5-8:

Remember to continually save the project.
:M01 SMSInter 004.png

Use the below steps and videos to enable snapping:

  1. Select Edit > Preferences
  2. In SMS Preferences select Map and check Snap feature object to displayed nodes and vertices

Use the below video to guide and digitise feature arcs used to define the mesh

  1. Select the Create Feature Arc Tute1 FV002.PNG tool.
  2. Snap onto a feature point and digitise and arc to the adjacent point (refer to video).

Define Elevation Data

In SMS, scatter points are x, y, z coordinates used to define mesh bathymetry and topography. We use them during the mesh generation build phase to interpolate elevation data onto the model mesh. In this tutorial the scatter dataset is created from the Map Coverage.

Use the the below steps and video to generate and review the scatter dataset:

  1. Select Feature Objects > Map -> Scatter.
  2. Under Scatter point Z-Value Source check Arc end points and vertex elevations and select OK.
  3. Select the display button Mod 01 Display options.01.png. In the Scatter Display Options check the Contours. Then select the Contours tab and set the Contour method to Color Fill and select OK.
  4. Review the scatter dataset.

Note: The approach demonstrated presents an introductory test case. For real world applications often contain a variety of data sources are required. To learn more about working with scatter data in SMS refer to the scatter dataset tutorials on the Aquaveo Wiki.

Build Polygons And Generate The Mesh

Before generating a mesh, polygons must be built using the Build Polygons tool. These polygons are derived from the arcs and nodes previously created in the Mesh Generator coverage and help define the structure and properties of the mesh. They are used to specify mesh type—patch (quadrilaterals) or paving (triangles), as well as to assign bathymetry or set the mesh to active or inactive, for example to omit an island from the mesh.

  1. Select Feature Objects > Map -> Build Polygons.
  2. From the project panel right click on Mesh Generator and select Convert > Map ->2D Mesh. Leave the mesh name as the default Mesh Generator Mesh.
  3. The resulting mesh has been created using 6 triangular elements (paving element type) connected by nodes which are the 8 points used to define the extents of the trapezoidal channel. It doesn’t look very good, but it is a mesh, which will be improved throughout the tutorial. As this mesh does a poor job of representing the channel geometry right click on Mesh Generator Mesh and select Remove to delete the mesh prior to moving to the next section.

Modify Polygons

This section demonstrates how improve the mesh and create a quadrilateral (patch) mesh that follows the geometry of the trapezoidal channel.

Use the below steps and video review the polygon options:

1. Select the Mesh Generator to make it editable.
2. Using the Select Feature Polygon button 1.1.5A.png double click on the lower polygon. Review the options within the 2D Mesh Polygon Properties dialog. Note for a full summary of the features available check out the 2D Mesh Polygon Properties on the XMS Wiki.

This will be quadrilateral (patch) mesh with a resolution of 12.5 m across the channel and 25 m along the channel. Use the below steps and videos to specify the mesh attributes and resolution:

  1. From the 2D Mesh Polygon Properties dialog use the Select Feature Arc 1.1.5B.png tool to select the upper arc.
  2. Under Arc Options check Distribute and update the number of vertices to 1,000 / 25 - 1 = 39.
  3. Repeat the steps 1-2 for the lower arc.
  4. Use the Zoom tool 1.1.5C.png and zoom into the the left arc.
  5. Use the Select Feature Arc 1.1.5B.png tool to select the left arc and under Arc Options check Distribute and update the number of vertices to 25 / 12.5 - 1 = 1. To return to previous view select the Pan tool
  6. Repeat the steps 4-5 for the right arc.
  7. From the the Mesh Type down select Patch.
  8. From the Elevation (bathy/topo) type drop down select Scatter set.
    • Select Scatter Options.
    • The interpolation dialog box should now be visible. Make sure the elevation data is selected and select OK.
  9. Use the Preview Mesh to view the mesh and select OK.

Use the below steps and videos to specify the mesh attributes and resolution of the center polygon:

  1. Using the Select Feature Polygon button 1.1.5A.png double click on the center polygon.
  2. From the 2D Mesh Polygon Properties dialog use the Select Feature Arc 1.1.5B.png tool to select the upper arc. Note the lower vertex distribution was specified in the previous section.
  3. Under Arc Options check Distribute and update the number of vertices to 1,000 / 25 - 1 = 39.
  4. Use the Zoom tool 1.1.5C.png and zoom into the the left arc.
  5. Use the Select Feature Arc 1.1.5B.png tool to select the left arc and under Arc Options check Distribute and update the number of vertices to 25 / 12.5 - 1 = 3. To return to previous view select the Pan tool
  6. Repeat the steps 4-5 for the right arc.
  7. From the the Mesh Type down select Patch.
  8. From the Elevation (bathy/topo) type drop down select Scatter set.
    • Select Scatter Options.
    • The interpolation dialog box should now be visible. Make sure the elevation data is selected and select OK.
  9. Use the Preview Mesh to view the mesh and select OK.

Use the below steps and videos to specify the mesh attributes and resolution of the center polygon:

  1. Using the Select Feature Polygon button 1.1.5A.png double click on the upper polygon.
  2. From the 2D Mesh Polygon Properties dialog use the Select Feature Arc 1.1.5B.png tool to select the upper arc. Note the lower vertex distribution was specified in the previous section.
  3. Under Arc Options check Distribute and update the number of vertices to 1,000 / 25 - 1 = 39.
  4. Use the Zoom tool 1.1.5C.png and zoom into the the left arc.
  5. Use the Select Feature Arc 1.1.5B.png tool to select the left arc and under Arc Options check Distribute and update the number of vertices to 25 / 12.5 - 1 = 1. To return to previous view select the Pan tool
  6. Repeat the steps 4-5 for the right arc.
  7. From the the Mesh Type down select Patch.
  8. From the Elevation (bathy/topo) type drop down select Scatter set.
    • Select Scatter Options.
    • The interpolation dialog box should now be visible. Make sure the elevation data is selected and select OK.
  9. Use the Preview Mesh to view the mesh and select OK.

Generate And Save The Mesh

The refined mesh can now be generated and saved as a 2D mesh (.2dm) file. The .2dm file format is used by TUFLOW FV to read in mesh files.

Use the below steps and videos generate, display and save the mesh:

  1. Deselect any polygons by away from the polygons clicking in the workspace.
  2. From the project panel right click on Mesh Generator and select Convert > Map ->2D Mesh. Update the name to Trap_Channel_000.
  3. Select the display button Mod 01 Display options.01.png. In the 2D Mesh Display Options check the Contours. Then select the Contours tab and set the Contour method to Color Fill and select OK.
  4. Review the newly generated mesh.
  5. Select File > Save As and select the type 2D Mesh files (*.2dm). Save the file using the name default Trap_Channel_000.2dm.

Visualisation

A useful way to review the mesh is to visualise it in perspective view. Use the below steps and video to review the mesh:

  1. Select the Rotate tool 1.1.8.png and select and rotate the mesh to view in perspective view (refer to video).
  2. Use shift-P to return to plan view.

Going Further (Optional)

The best way to learn more is through experimentation. This section steps through the process of modifying the mesh to include a raised feature, a 'bump' in the center of the mesh, and a flow constriction further downstream. In case you get stuck, the completed mesh files are provided in Complete_Mesh\Trap_Channel_001.

Use the below steps and video to save and duplicate a new mesh:

  1. Save the current workspace as Trap_Channel_001.sms.
  2. Duplicate the original Mesh Generator map file by right clicking Mesh Generator > Duplicate.
  3. Right click on the duplicated map file Mesh Generator (2) and select Rename and call it Trap_Channel_001.
  4. Select the display button Mod 01 Display options.01.png and in the Display Options check the Vertex option.

Editing the Mesh

This section demonstrates how to adjust the mesh and elevations to represent an elevation change and channel constriction.

Use the below steps and video to digitise additional arcs:

  1. Select the Create Feature Arc Tute1 FV002.PNG tool.
  2. Digitise 12 Arcs perpendicular to the flow toward the middle of the mesh. The horizontal length of the bump should contain approximately 3 vertices along the mesh (refer to video).

Use the below steps, figure and video to apply new elevations values:

  1. Select the Select Feature Point Tut 02 Select Feature Point.png tool.
  2. As shown in the figure and video below, hold shift and select feature points A and B (refer to figure) update the Z value to -5.3.
  3. Repeat step 2 for:
    • Feature points C, D, E, & F with a Z value of -3.5.
    • Feature points G & H with a Z value of -5.5.
  4. Use the Select Feature Point Tut 02 Select Feature Point.png tool to check the new elevations have been applied correctly.

Tut 01 node elv 03.png



Use the below steps and video to redistribute the vertices:

  1. Select the Select Feature Arc 1.1.5B.png tool. Holding shift select the four arcs within the bump (refer to video).
  2. Right click and select Redistribute Vertices....
  3. In the Redistribute Vertices dialog set the following:
    • From the Specify drop down select Number a of Segments.
    • Update the Number of segments to 1.

Use the below steps and video to add the arc that will form the channel constriction:

  1. Select the Create Feature Arc Tute1 FV002.PNG tool.
  2. Digitise 6 Arcs perpendicular to the flow at the downstream end of the mesh (refer to video).

Use the below steps and video to adjust the channel constriction:

  1. Select the Select Feature Point Tut 02 Select Feature Point.png tool.
  2. As shown in the figure and video below, hold shift and select feature points A and B (refer to figure) update the Y value to 65.
  3. Repeat step 2 for feature points C & D (refer to figure and) and update update the Y value to 35.

Tut 01 contriction nodes 02.png


Create Scatter Points

Scatter points contain elevation information which will be interpolated onto the model mesh.

Use the the below steps and video to generate and review the scatter dataset:

  1. Select Feature Objects > Map -> Scatter.
  2. Under Scatter point Z-Value Source check Arc end points and vertex elevations and select OK.
  3. Review the scatter dataset. Note if the Scatter data is not displayed as shown in the video refer to Create Scatter Points for display options.

Distributing the Mesh Vertices

Before interpolating the new scatter set onto the mesh, the vertices along the arcs need to be redistributed.

Use the below steps and video to redistribute the vertices:

  1. Uncheck the scatter data set and select Trap_Channel_001 from the Map data.
  2. Select the Select Feature Arc 1.1.5B.png tool. Holding shift select the four horizontal arcs within the bump (refer to video).
  3. Right click and select Redistribute Vertices....
  4. In the Redistribute Vertices dialog set the following:
    • From the Specify drop down select Number a of Segments.
    • Update the Number of segments to 4.

Note once completed, always remember to deselect the feature points by clicking anywhere in the workspace.


Use the below figure, steps and video to redistribute the vertices along the bump:
Redist 001 01.png

  1. Using the Select Feature Arc 1.1.5B.png tool and holding shift select Arcs 1-8 and right click to select Redistribute Vertices....
  2. In the Redistribute Vertices dialog set the following:
    • Specify: Number a of Segments.
    • Number of segments: 2.

  1. Using the Select Feature Arc 1.1.5B.png tool and holding shift select Arcs 9 and 10, right click to select Redistribute Vertices....
  2. In the Redistribute Vertices dialog set the following:
    • Specify: Number a of Segments.
    • Number of segments: 4.
  3. Holding shift select Arcs 11 and 12, and right click to select Redistribute Vertices....
  4. In the Redistribute Vertices dialog set the following:
    • Specify: Number a of Segments.
    • Number of segments: 6.


Use the below figure, steps and video to redistribute the vertices along the channel constriction:
Redist 002 01.png

  1. Using the Select Feature Arc 1.1.5B.png tool and holding shift select Arcs 1-4 and right click to select Redistribute Vertices....
  2. In the Redistribute Vertices dialog set the following:
    • Specify: Number a of Segments.
    • Number of segments: 2.

  1. Using the Select Feature Arc 1.1.5B.png tool and holding shift select Arcs 5-7 and right click to select Redistribute Vertices....
  2. In the Redistribute Vertices dialog set the following:
    • Specify: Number a of Segments.
    • Number of segments: 6.

Build Polygon And Generate The Mesh

This section outlines how to build the polygons, define their attributes, and generate and review the modified mesh.

Use the below steps and video to build the polygons, define the polygon attributes and assign the elevation data:

  1. Select Feature Objects > Map -> Build Polygons.
  2. Using the Select Feature Polygon 1.1.5A.png tool, drag the tool across all the polygons.
  3. Right click and select Polygon Attributes.... Update with polygon attributes with the following:
    • Check Mesh type * and from the drop down select Patch (quadrilaterals).
    • Check Elevation (bathy/top) type and leave the default Scatter set in the drop down.
    • Select Scatter Options.
    • In the Interpolation dialog under Scatter Set To Inpertpolate From select elevation under Trap_Channel_001 Scatter (active) and select OK > OK.


Use the below steps and video generate and save the mesh file:

  1. Deselect any polygons by away from the polygons clicking in the workspace.
  2. Under Under Map Data right click on Trap_Channel_001 and select Convert > Map ->2D Mesh. Update the name to Trap_Channel_001.
  3. Review mesh.
  4. Select File > Save As and select the type 2D Mesh files (*.2dm). Save the file using the name default Trap_Channel_001.2dm.


Select the Rotate tool 1.1.8.png and select and rotate the mesh to view in perspective view (refer to video). Use shift-P to return to plan view.

Feedback

If you have any queries, feedback or requests for new functionality you'd 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 the Trapezoidal Channel Mesh Build. You have now learnt how to build and modify a simple mesh.

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