Meshing M02 video draft
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 Model Introduction before starting this tutorial. It outlines the required links to download SMS, which we will use for mesh generation.
In this tutorial we will a build mesh for a riverine channel using the Aquaveo SMS. Specifically we will:
- Use the topographic pre-processor TOPAZ to assist in defining the mesh geometry.
- Develop skills for designing an efficient in-channel mesh.
Riverine Channel Project Area
The dimensions of the meandering riverine channel are shown below:
- Channel depths to -7m.
- Length of channel ~2000m.
- Varying width of channel between 60m to 100m.
- Sinuous channel.
Requirements And Downloads
Requirement | Brief Description |
---|---|
Model Data | Download the Meshing Module 2 Data Package. |
Assumed Knowledge | It is recommended to complete the Meshing Module 1 prior to completing this tutorial. |
Prepare Your Working Environment
Copy and unzip the Model Data to your preferred working location, for example E:\TUFLOWFV\Meshing_M02.
- The Complete_Mesh folder contains a completed version of the tutorial and its supporting files. You can use this as a reference if you require.
- The Module_Data folder contains the required mesh files to complete this tutorial.
- The Working folder is where we will save our files and build our mesh.
Note: All file paths referred to will be relative to this base directory. For example, Complete_Mesh\Riverine_Channel_000 refers to E:\TUFLOWFV\Meshing_M02\Complete_Mesh\Riverine_Channel_000.
Setup Your SMS Project
Before we start meshing, we'll setup our working projection. Launch SMS and the workspace will be as shown below:
Setting The Workspace Projection
MADDYTODO think about re doing these videos- they seem a little jumpy..
- From the menu bar select Display > Display Projection....
- In the Display Projection dialogue box set Global projection and click Set Projection.
- 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:
- From the menu bar select File > Save As....
- Navigate to Working folder and save the project as Riverine_Channel_000.sms.
Prepare The Bathymetry Data
Load And Visualise Bathymetry Data
The bathymetry for the mesh is provided as a scattered dataset in a .TIN (Triangulated Irregular Network) file format. Use the below steps and videos open and display the bathymetry:
- From the menu bar select File > Open....
- Navigate to the the Module_Data and folder open the provided bathymetry scatter dataset RiverBend_Bathymetry.tin.
As previously mentioned, the bathymetry data is provided in .TIN format, which connects the irregularly spaced data points into non-overlapping triangles to model the bathymetry surface. Use the below steps and video to display the triangulation:
- Select the display button
.
- In the Scatter Display Options check Triangles and update the line colour to black.
- Select OK and review the triangulation of the bathymetry.
For visualisation purposes, the bathymetry will be displayed as contours for the remainder of the tutorial. Follow the steps and video below:
- Select the display button
.
- Under the Scatter tab uncheck the following Points, Triangles, and Breaklines.
- Check Contours.
- Select the Contours tab.
- Under the Contour method select Color Fill and select OK.
Prepare Bathymetry For TOPAZ Processing
Now that the required datasets are loaded, we can begin to create the model mesh. We will be using to the topographic preprocessor TOPAZ to help guide our mesh development.. Please note that TOPAZ processing may take some time if using a large dataset.
To run TOPAZ we need to convert the scatter dataset to a Digital Elevation Model (DEM). Use the below steps and video to create the DEM:
- Right click on the scatter data RiverBend_Bathymetry and select Convert > Scatter -> Raster.
- In the Interpolate to Raster dialog specify the Cell size as 1m and select OK.
- Save the new raster in the Working folder and leave the default name as RiverBend_Bathymetry.tif.
It's a good idea to regularly save your SMS Project as you work through the tutorial. Select File > Save as… and save the project (ensure the file is being saved as a project file type *.sms). Opening this SMS project file in the future will reload all layers in the project that you have saved.
Defining The Mesh Extent
We will be using the topographic preprocessor TOPAZ to help guide our mesh development. TOPAZ allows you to extract topographic features from the DEM such as the channel center line and banks. For more examples that use TOPAZ refer to the SMS tutorial Extract Features for Mesh Generation on the SMS Tutorials page.
Use the below steps and video to run TOPAZ:
- Right click on the DEM and select Run TOPAZ. Note the TOPAZ processing might take some time.
- From the Info dialog select OK.
Creating The Mesh Centre Line
Throughout this tutorial, the upstream and downstream sections of the channel will be referred to. Familiarise yourself with the figure below so that you can identify which section of the channel is being referenced at each stage.
Here, a feature point is created, which will serve as a guide for TOPAZ to generate the channel centerline.
Follow the bellow steps and video:
- Rename the default Area Property Map Data layer Centre_Line_PT.
- Select the display button
. Use the following setting to display the Map Data features to make it easier to review mesh nodes and vertices:
- Under Display Options select Map.
- Update Point/Node colour to Red.
- Check Vertex and update the symbol to a cross-hair +.
- Make sure Arcs are checked.
Digitise the feature point using the below steps and video:
- Zoom into the upstream boundary (refer to video).
- Select the feature point
tool.
- Digitise a feature point in a similar location to that shown in the video below.
Extract the centerline using the below steps and video:
- Using the Select Object
tool select and right click on the feature then select Extract Feature.
- In the Extract Feature dialog check the following are specified:
- Input raster to RiverBend_Bathyetry.tif.
- Feature type to Stream.
- Output Coverage is set to <Create New> and named Streams. Note the name Streams is not a requirement and can be changed as you see fit.
- Select OK.
- Under Map Data select Streams right click and select Zoom to Coverege and review. Note the channel centerline generated by TOPAZ represents the channel well; however, adjustments are required to make it suitable for meshing.
Adjusting The Mesh Centre Line
Although TOPAZ provided a good first approximation, we need to make some further adjustments of the centerline. In this section we will adjust the centerline to be more 'mesh friendly' by providing the line with a smoother geometry and more regular vertex intervals. Note: that your centerline may differ slightly from the below examples depending on how you digitised your point earlier in Centre_Line_PT.
Use the below steps and video as a guide to make further adjustments:
- Zoom into the upstream boundary (refer to video).
- Under Map Data select Streams.
- Use the Select Feature Point
tool to select the end node and drag it towards the upstream boundary. Note do not to extend the line beyond the DEM.
Use the below steps to redistribute vertices and smooth the centerline:
- Using the Select Feature Arc
tool select the Streams arc and right click and select Redistribute Vertices....
- In the Arc Redistribution dialog specify the following:
- Under Specify select Specified spacing.
- Set the Average Spacing to 20m.
- Check Use cubic spline and select OK. Note: the centerline has been smoothed and we have reduced the number of vertices.
In this section, we will delete unnecessary vertices and redistribute vertices to create a smooth and representative arc of the channel centerline. It is recommended to remove unnecessary vertices to minimise the need for extensive manual redistribution of vertices.
Use the following steps and videos to as a guide to edit the centerline:
- Zoom into the upstream boundary (refer to video).
- Using the Select Feature Vertex
tool delete vertices within the deepest section of the channel. To delete multiple vertices, click and drag the mouse to select the desired vertices, then press Delete and click OK in the dialogue box.
- Move the remaining vertices to align more consistently with the channel thalweg (refer to video).
- 4. Zoom into the midsection of the channel and repeat Steps 2 and 3 (refer to below video).
Use the below steps to redistribute vertices and smooth the centerline:
- Using the Select Feature Arc
tool select the arc and right click and select Redistribute Vertices....
- In the Arc Redistribution dialog specify the following:
- Under Specify select Specified spacing.
- Set the Average Spacing to 20m.
- Check Use cubic spline and select OK.
Creating The Mesh Bank Lines
In this section we will define the left and right bank lines using Extract Banks Tool in SMS. See Extract Features Tools for more information on SMS extraction tools.
Use the below steps and videos to extract the banks:
- Zoom into the upstream boundary (refer to video).
- Select the Streams coverage and using the Feature Point
tool digitise a point in the northwest corner of the bank (refer to video).
- 3. Use the Select Object
tool and hold shift to select both the new node and channel arc (refer to video).
- 4. Right click and select Extract Banks and specify the following in the Extract Features dialog:
- Input raster as RiverBend_Bathymetry.tif.
- Use the depth this is Closest to Previous.
- Leave Distance from Centerline as the default. If you have a much larger channel you may need to increase this value.
- Leave Output Coverage > Banks <Create New> as the default name Bank Lines.
- Leave the remaining options as default and select OK.
- 5. Zoom out and review review the new Bank Lines coverage. TOPAZ has provided a good first approximation of the bank lines, but we need to make some further adjustments to make them more 'mesh-friendly'. Note: your bank lines may differ slightly from the examples below, depending on how you digitised your points earlier in the Streams coverage.
Redistribute the vertices along the bank lines. This will make adjustments clearer and easier to carry out. Follow the steps and video below:
- Using the Select Feature Arc
tool and hold the Shift key to select both bank lines.
- Right click and select Redistribute Vertices and specify the following:
- Under Specify select Specified spacing.
- Set the Average Spacing to 20m.
- Check Use cubic spline and select OK.
In this section, we will delete unnecessary vertices and redistribute vertices to create a smooth and representative bank lines. Remember, your bank lines may differ slightly from those shown in the videos. Therefore use the videos as a general guide rather than trying to match them exactly:
- Zoom in to the upstream boundary (refer to the video) and identify any areas where the Bank Lines coverage does not accurately represent the channel bank.
- Depending on the placement of the bank feature point, the left bank arc may not align correctly. Use the Select Feature Point
tool to select the end node and drag it towards the bank edge (refer to the video). Note: do not extend the line beyond the DEM
- Using the Select Feature Vertex
tool to delete and manually move vertices on the left bank to follow the channel bank. Note: to delete multiple vertices, click and drag the mouse to select the desired vertices, then press Delete and Enter.
- 4. Again use the Select Feature Vertex
tool to delete and manually move vertices on the right bank to follow the channel bank. Note: Remember to use the videos as a general guide rather than trying to match them exactly. It's more important to follow the shape of the channel bank accurately, as the vertices will be redistributed later.
- Zoom in towards the mid section of the channel(refer to the video) and identify any areas where the Bank Lines coverage does not accurately represent the channel bank.
- Using the Select Feature Vertex
tool to delete and manually move vertices on both banks (refer to video).
- Zoom in slightly downstream of channel mid section (refer to the video) and identify any areas where the Bank Lines coverage does not accurately represent the channel bank.
- Using the Select Feature Vertex tool to delete and manually move vertices on both banks (refer to video).
- Zoom in to the downstream boundary (refer to the video) and identify any areas where the Bank Lines coverage does not accurately represent the channel bank.
- Depending on the placement of the bank feature point, the left and right bank arc may not align correctly. Use the Select Feature Point
tool to select the end nodes and drag each node towards the bank edge (refer to the video). Note: do not extend the line beyond the DEM.
- Using the Select Feature Vertex
tool to delete and manually move vertices on both banks (refer to video).
Review your adjustments by redistributing the vertices along the bank lines to see how well the arcs represent the channel banks (refer to the steps and video below). It is important to check that the arcs remain within the DEM (RiverBend_Bathymetry.tif) extent. You may need to make further adjustments, as demonstrated in the video:
- Using the Select Feature Arc
tool and hold the Shift key to select both bank lines.
- Right click and select Redistribute Vertices and specify the following:
- Under Specify select Specified spacing.
- Set the Average Spacing to 20m.
- Check Use cubic spline and select OK.
- Use the Select Feature Vertex
tool to make further adjustments and redistribute the vertices using Step 2.
- Before moving onto the next section make sure you have checked that all of your bank lines are within the DEM extent!
Once you're happy with how the arcs represent the channel banks, use the center line to redistribute the vertices along each bank line so that they mirror each other. Refer to the steps and video below:
- Select the Streams coverage and use the Select Feature Point tool to delete the node that the banks were created from (refer to video).
- Select the Bank_Lines coverage.
- Using the Select Feature Arc tool hold Shift and select both bank lines, right click and select Copy to Coverage.
- In the Select Coverage dialog box select Streams and Ok. Both bank lines should now be in the Streams coverage (refer to video).
Make sure the channel centerline has a vertex spacing of 20m. Use the below steps and video to redistribute the vertices:
- Using the Select Feature Arc
tool and select the centerline from the Stream coverage.
- Right click and select Redistribute Vertices and specify the following:
- Under Specify select Specified spacing.
- Set the Average Spacing to 20m.
- Check Use cubic spline and select OK.
Creating Mesh Extent
To produce the final mesh extent the vertices on each bank need to align and Feature Acrs need to be added at the upstream and downstream boundaries to close the mesh extent.
Vertices from the centreline will guide the placement of vertices on both banks, resulting in evenly spaced and aligned bank lines. Follow the steps and videos below:
- Use the Select Feature Arc
tool and select the center line from the Stream coverage. Record the arc ID displayed at the bottom of the window (refer to video). Repeat on the left arc.
- Using the Select Feature Arc
tool hold Shift and select both the center line and left bank.
- Right click and select Redistribute Vertices and specify the following:
- Specify set as Source Arc.
- Source Arc set as the center line ID no.. Note in this example it is Arc 1 but the ID for your center line might be different so be sure to check the ID of your line.
- Target Arc set as the left bank line ID no.. Note in this example it is Arc 2 but the ID for your left bank line might be different so be sure to check the ID of your line.
- Check Use cubic spline and select OK.
- 4. Repeat Steps 1 - 3 on the right bank (refer to video). Note in this example the right bank arc has an ID of 3 but the ID for your right bank line might be different so be sure to check the ID of your line.
- 5. Make sure to delete the center line as it is not needed for the final mesh.
Now that the bank lines are finalised, add feature arcs to the upstream and downstream boundaries to close the mesh extent. Follow the steps and videos below to add and redistribute the new arcs:
- Zoom into the upstream boundary.
- Using Create feature Arc
tool digitise an arc perpendicular to the channel at the usptream boundary. Making sure to snap the arc to each node at the end of the bank lines (refer to video). Note if snapping is not enabled select Edit > Preferences from the menu bar. In SMS Preferences select Map and check Snap feature object to displayed nodes and vertices.
- Using the Select Feature Arc
tool and select the new arc. Right click and select Redistribute Vertices and specify the following:
- Specify set as Specified spacing.
- Check both 2nd bias and Use cubic spline.
- Set the average spacing to 5.
- Set the Bias to 4.0.
- Set the 2nd Bias to 4.0.
- Select OK.
- 4. Repeat Steps 1-3 for the downstream boundary (refer to video).
Assigning Mesh Type & Elevation Data
Now that the mesh extent is complete we can to assign the mesh type, build polygons, and apply the elevation data. Use the below steps and video:
- Right click on the Streams coverage and select Type > Generic > Mesh Generator.
- From the tool bar click Build Polygons
.
- Using the select feature polygon
tool, select the polygon. Right click and select Polygon Attributes.
- In 2D Mesh Polygon Properties select the following:
- Set the Mesh Type to Patch.
- Set the Elevation (bathy/topo) type to Scatter Set.
- Select the Scatter Options... and the Interpolation dialog will appear.
- Set the Interpolation to Linear and make sure the RiverBend_Bathymerty Elevation is select under the Scatter Set to Interpolate From section.
- Set the Extrapolation to Inverse Distance Weighted.
- Select OK and OK.
Mesh Generation
The riverine channel 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 and review the mesh:
- Select the Streams coverage. Right click and select Convert > Map ->2D Mesh.
- Update the mesh name to Riverine_Channel_000.
- You should see smooth transitions in cell size and shape throughout the channel, without abrupt changes. This is important in hydrodynamic modelling for maintaining numerical stability, accuracy, and efficient run times. Pay particular attention around channel bends, where the geometry is more complex and poor transitions are more likely to cause issues.
Lastly, save the new mesh into the Working folder.
- From the Project panel make sure the mesh is selected. Then select File > Save As from the menu bar.
- Set the Save as type to 2D Mesh Files (*.2dm) and keep the default name Riverine_Channel_000.2dm.
- Click Save.
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 Meshing Module 2. You have now learnt how to construct and modify a mesh in SMS using TOPAZ feature extraction techniques.
Return to the Tutorial Introduction Page to complete further meshing and model build tutorials.