Meshing M02 Tutorial SMS Community: Difference between revisions

From TUFLOW FV Wiki
Jump to navigation Jump to search
No edit summary
Line 213: Line 213:




Now we are ready to export our mesh file. To do this select '''File''' > '''Save As''' and make sure you are saving the file type as a '''.2dm'''. <br>
Now we are ready to export our mesh file. To do this select '''File''' > '''Save As''' and make sure you the mesh file as '''Riverine_Channel_000.2dm'''. <br>


[[File: tut_02_SaveAs_2dm_00.png|650px]] <br>
[[File: tut_02_SaveAs_2dm_00.png|650px]] <br>
Line 227: Line 227:
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>
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 support@tuflow.com
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 15:01, 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

In this tutorial, we will be building a mesh for an inbank area of a riverine channel using Aquaveo SMS Community version 13.2.0. Specifically, you will learn how to generate a mesh, apply boundary conditions and develop skills to help you refine your mesh. By the following steps outlined in this tutorial, you will create a computational mesh using Aquaveo SMS Community. The mesh file you create in this tutorial can be used in Tutorial Module 02 with SMS Community.
Specifically in this tutorial you will:

  • Generate a mesh
  • Insert nodestrings to define the location of boundary conditions

In the equivalent Meshing M02 Tutorial SMS Interface and Meshing M02 Tutorial GIS Mesher meshing tutorials, multiple materials were assigned to the mesh. This will not be undertaken in this tutorial as SMS Community Edition does not support the application of multiple materials to the .2dm mesh file. However, multiple materials can be assigned via GIS integration in TUFLOW FV. If you would like to know more, please contact support at support@tuflow.com.

TUFLOW FV doesn't have its own graphical user interface (GUI), it uses GIS software, surface water modeling software such as SMS 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 SMS version 13.2.0. If using a different version of SMS, 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
SMS SMS Aquaevo is a system software designed to build and simulate surface water models. The SMS Community Edition has been designed to offer a simple way to set the model geometry and parameters, a licence is not required to use the Community version of SMS.

This tutorial was developed using SMS 13.2.0, it recommended to use this version or later versions of SMS. If using a different version of SMS, 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.

SMS licence and download information can be found here SMS Aquaveo.
Model Data The data provided for the completion of this tutorial includes:
  • The Module_Data folder contains bathymetry data as a SMS Scatter TIN dataset, land-use areas provided as a SMS Map Coverage format and boundary condition data provided in comma separated variable (.csv) format,
  • The Complete_Mesh folder has 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. Therefore, each step will be clearly explained. If you run into any problems or need help, please contact support@tuflow.com

Model Setup

The following tutorial demonstrates the development of a simple model mesh using the Aquaveo SMS Community. SMS supports the building of meshes for TUFLOW FV. For this tutorial, step by step instructions are given to get you started with meshing in SMS Community. 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 an inbank riverine channel.

By now you should have downloaded the Meshing M02 Tutorial SMS Community Model data from TUFLOW FV Tutorial Models. This includes the Module_Data, Complete_Model and working, please copy these folders to your preferred working location.

SMS Project Initilisation

Open a new SMS project and save as Riverine_Channel_000.sms into the working directory.

From the Module_Data folder in the tutorial dataset, open the provided bathymetry scatter dataset RiverBend_Bathymetry.tin in SMS.

Mod 02 scaatterdata 00.png

Colour the bathymetry by going to Display > Display Options (or if you prefer try the ctrl+d keyboard shortcut). In the Scatter option select the Scatter tab > untick Points and Breaklines and > tick Contours.

Mod 02 disp scatter 00.png

In the Scatter option select the Contours tab > Color Fill for the Contour Method. Click on the Color Ramp button and Reverse the Palette Preview.

Mod 01 countors 02.pngMod 01 colour ramp 02.png

The bathymetry will be displayed as below.

Mod 02 riverbathy 00.png

Now in the Display Options - Scatter, tick Triangles to match the display below.

Mod 02 riverbathy tin 00.png

Don't forget to Save your SMS Project as you step through this tutorial. Select File > Save as… and save the project (ensure the file is being saved as a project file type *.sms). Opening this SMS projected file in the future will load all of the model data.

Mesh Creation

Now that the required datasets are loaded, we can begin to create the model mesh. We need to create a new coverage in the map module. Right click on the Map Data heading and select New Coverage as shown below. The coverage type should be set to Generic > Mesh Generator. Name the coverage Mesh_Features and then select OK.

Tut 01 ComEd Mesh Gen Setup 01.png


Make sure the newly created Mesh_Features layer is selected in the table of contents as per the image below.

Tute2 005.png

In this layer we need to create a feature arc (polyline) to define our model extent. In the majority of cases this can be done using the create feature arc button Tute2 006.png. For this tutorial however, the model we are going to create covers the full extent of our bathymetry scatter dataset. We can use the extent of the bathymetry dataset to define our model extent. This is done by converting the data on the scatter dataset into an object in our Mesh_Features layer.

To do this right click on the RiverBend_Bathymetry scatter dataset and the select Convert > Scatter Boundary -> Map.

Mod 02 scatter boundary.png

When prompted, select the Mesh_Features map layer as the target coverage.
Tute2 FV001.PNG

After the conversion, the scatter dataset boundary should be in the Mesh_Features layer (this is easier to see with the scatter set turned off). This is shown in the image below. Note you may need to change the display options to view the nodes and vertices.

Mod 02 meshfeatures 00.png

Zoom in to the northern boundary of the model, and select the two corner vertices (Tute2 009.png). After they are selected, right click and select Nodes<->Vertices to convert these to nodes.

Mod 02 vertex to node.png


Use Select the Feature Arc tool to select the feature arc (Tute2 012.png), then right click and use the Redistribute Vertices... to redistribute 9 vertices along the line.

Mod 02 redistribute vertcies.png


Mod 02 redistribute noSeg.png

We will repeat the process at the southern edge of the model. There may already be a node already associated with the southern edge or the model. Use the Node Select tool (Tute2 FV003.PNG) to convert it to a vertex before redistributing the vertex spacing. This is done by selecting the node (left click), right click and select Nodes<->Vertices. After doing this, follow the steps that were used for the northern end of the model. Use the Redistribute Vertices... to redistribute 9 vertices along the line.

Mod 02 Sthedge redistribute noSeg.png

Select the two feature arcs (if you hold down the shift key while clicking you can select multiple arcs) along the banks of the river and this time redistribute with a Specified Spacing of 20 (meters).

Mod 02 specified spacing 00.png


In order to build a mesh, we need to create a polygon from the feature arcs. To do this, select Feature Objects > Build Polygons.

Tute2 016.png

Using the Polygon Select tool (Tute2 018.png), select the polygon which has been created from the feature arcs. Right click, select Polygon Attributes..., and in 2D Mesh Polygon Properties dialog box select Preview Mesh. The default mesh type is paving, using this mesh type, the default elements are triangles as per the image below.

Mod 02 paving ,mesh.png

The mesh type patch uses quadrilateral elements preferentially. Change the mesh type to Patch and select Preview Mesh. With the entire section of river as a single patch mesh, the quadrilateral elements get wrapped around the bend.

Note: You may receive the following error.


Mod 02 Error patch ,mesh.png

To avoid this, it is best to include sections across the channel (perpendicular to flow) at regular spacing along the channel, and in particularly around the bends.

To do this use the Create Feature Arc button (Tute2 021.png) to create the lines across the river. These do not need to snap to existing vertices, new ones will be created if required. An example is shown below. Once the lines are drawn, 9 vertices should be distributed along each arc. Using the Select tool, multiple arcs can be selected when holding down shift.

Mod 02 addNS sections 00.png

Once the additional arcs have been created, the polygons need to be rebuilt. To do this select Feature Objects > Build Polygons from the menu. Once rebuilt, the individual polygons can be selected and have different mesh types applied. Select the southernmost polygon and select attributes (or double click on the polygon). Ensure the Mesh Type is set to patch and then hit Preview Mesh.

Mod 02 unaligned patch mesh.png

In the Mesh Preview window, the mesh is now much better aligned with the predominant flow direction than previously. However, along one bank there are more vertices than the other; TUFLOW FV can handle both triangles and quadrilateral elements, so this is not a major issue. However, to align the elements with the flow direction, quadrilaterals are preferred over triangles (small elements, such as triangles in deep water can also reduce the timestep).

In this scenario, the river width remains relatively constant and we will use quadrilateral elements throughout the mesh. To achieve this, in the Mesh Properties dialogue, select the two bank lines and then in the Arc Options the number of vertices can be redistributed. If both are selected, each bank will have the same number of vertices and quadrilateral elements will be created. Steps to achieve this are outlined below.
Mod 02 aligned patch mesh 00.png

Repeat the process along the channel, an example is shown below.

Mod 02 All addNS sections 00.png

When you have finished creating your mesh areas, we need to specify an elevation data source. This can be done individually for each polygon, however, as the bathymetry source is consistent, we can select all polygons using the Polygon Select tool (Tute2 026.png). To select all polygons you can drag a box around the polygons. With all the polygons selected, right click and select Polygon Attributes....

Mod 02 poly attributes.png

In the prompt, tick the Elevation (bathytopo) type and the select Scatter Set. Once selected, hit the Scatter Options button. In the Scatter Options set the interpolation to Linear and the extrapolation to "Single Value" and enter a single value of 2. When SMS has reshaped the vertices along the edge of the model it is possible that some are just outside the bathymetry dataset. The extrapolation method defines how these are set; we have used a high elevation, and an alternative option is to use the Inverse Distance Weighting option.

Mod 02 poly elv.png

Mod 02 interpolation.png

Configuring Mesh

The following section outlines how to generate the mesh and apply the materials and boundary conditions to the mesh.

Mesh Generation

Firstly, convert your Mesh Generator coverage to a 2D mesh by right clicking on the Mesh Generator and selecting Map ->2D Mesh and name your new mesh "Riverine_Channel_000".

Mod 02 MakeMESH 00.png

Congratulations you've made a mesh! Your mesh should look similar to the below.

Tut 02 Mesh 00.png

Nodestrings (Boundary Conditions)

The last step is to insert nodestrings. Nodestrings are a string of nodes that can be used to define the location of boundary condition inflows/outflows. For this example, there will be an upstream (southern edge of the model domain) and a downstream (northern edge of the model domain) boundary condition applied.

Tut 02 US DS loc 02.png

To insert the nodestrings please follow the below steps:

1. Press the Create Nodestring 1.1.7.png tool, then click along the nodes that make up the upstream boundary (southern edge of the model domain). Nodestrings should all be created from right to left while looking downstream.
2. Repeat this procedure along the downstream boundary (northern edge of the model domain).
Hint – hold the “Shift” button down to select all nodes between first clicked and second clicked nodes. Now hit "Enter" to finish editing.
3. To visualise the direction of your nodestrings press the Select Nodestring Mod 01 Select NS.00.png button, and select a nodestring.

Your mesh should now look similar to this:

Tut 02 Meshwith NS 00.png


Now we are ready to export our mesh file. To do this select File > Save As and make sure you the mesh file as Riverine_Channel_000.2dm.

Tut 02 SaveAs 2dm 00.png


Congratulations, you have completed the construction of a mesh. Great work! This mesh can be used in Tutorial Module 02 with SMS Community.

Conclusion

Congratulations on completing meshing a riverine channel using the Community Version of SMS. We've covered a lot in this tutorial, including mesh generation, refining your mesh and applying the boundary conditions. You can now use your completed mesh in Tutorial Module 02 with SMS Community.

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