Tutorial RiverineChannel Meshing SMSInterface

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

In this tutorial, we will be building a mesh for an inbank area of a riverine channel using Aquaveo SMS TUFLOW FV interface version 13.2.0. Specifically, you will learn how to generate a mesh, apply multiple materials, apply boundary condtions and develop skills to help you refine your mesh using Aquaveo SMS TUFLOW FV interface.

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

Tutorial Data

Download the Tutorial RENAME [TBC] dataset from the TUFLOW Website: http://www.tuflow.com/FV%20TutorialModel.aspx

The folders provided in this tutorial include Module_Data, Complete_Mesh, and working. Copy these folders to where you would like to work with the project.

  • 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
  • The working folder is for the files you create and work within.

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

Model Setup

SMS Project Initilisation

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

From the Module_Data folder, open the provided landuse dataset RiverBend_LandUse.map.

Mod 02 riverlanduse 00.png

We now will colour the landuse data by going to Display > Display Options. In the Map untick Point/Node and Vertex and tick Fill and Legend. Note: you may need to adjust the transparency.

Mod dips opt 00.png

Click on the Options button next to the Legend. In the Font section click on the displayed text AaBb and adjust the font style and size.

Mod 02 disp font.png

The landuse will be displayed as below.

Mod 02 landusecolour.png

The dataset contains three landuse types for this project: Sand, Gravel and Vegetation. When loaded correctly, the table of contents in SMS should contain the scatter dataset containing the bathymetry and a map dataset containing the land use polygons, as shown below.

Mod 02 TOC.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 02 mesh gen 00.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 Generator 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 the Select Feature Arc tool to select the feature arc Tut 02 Select Feature Arc.png, then right click and use the Redistribute Vertices... to redistribute 9 vertices specified as Number of segments 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 Select Feature Point tool Tut 02 Select Feature Point.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. Using 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 Select Feature Polygon tool Tute2 018.png, select the polygon which has been created from the feature arcs 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 tool 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 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

Creating a new TUFLOW FV Simulation

We will now create our TUFLOW FV simulation in SMS. This will enable the interface to read the mesh file you have created. To create a new simulation, right click on the Project dialog box > New Simulation > and select TUFLOWFV.


Tut 01 interface TFV SIM.png

Now we need to apply our mesh file to the TUFLOWFV simulation. To do this, right click on your mesh file > Apply to > TUFLOWFV Simulations-> Sim. See the below example.

Tut 02 apply mesh to sim 00.png

Applying Materials

We will now use the Land_Use .map file previously loaded into your SMS project.

Firstly, we need to change the coverage type of the material file to a TUFLOW FV material. Do this by right clicking on the material file and selecting Type > Models > TUFLOWFV > Materials.

Tut 02 change mat type 00.png

Now we need to assign the materials roughness for the gravel section of the river. To assign the roughness values for the gravel area within the model domain, please follow the below steps:

1. Using the Select Feature Polygon Tute2 018.png tool, double click on the polygon in the upper reaches of the main channel. Depending on your display setting this may be labeled 2,
2. The Assign Material dialog box should appear. Select the Add MaterialsTut 02 add mat 00.png button. A new material will appear in row 2,
A. Change the colour to a grey
B. Change the Name to Gravel
C. Check Override Bottom Roughness
D. Change the Bottom Roughness value to 0.028
E. Make sure that row 2 is selected
F. Select OK

Tut 02 mat gravel 01.png

To assign the roughness values for the sandy area within the model domain, please follow the below steps:

1. Using the Select Feature Polygon Tute2 018.png tool, double click on the polygon in the lower reaches of the main channel. Depending on your display setting this may be labeled 1,
2. The Assign Material dialog box should appear. Select the Add Materials Tut 02 add mat 00.png button. A new material will appear in row 3,
A. Change the colour to yellow
B. Change the Name to Sand
C. Check Override Bottom Roughness
D. Change the Bottom Roughness value to 0.035
E. Make sure that row 3 is selected
F. Select OK

Tut 02 mat sand 01.png

To assign the roughness values for the vegetated areas within the model domain, please follow the below steps:

1. Using the Select Feature Polygon Tute2 018.png tool, double click on the eastern outer bank polygon. Depending on your display setting this may be labeled 3
2. The Assign Material dialog box should appear. Select the Add Materials Tut 02 add mat 00.png button. A new material will appear in row 4,
A. Change the colour to green
B. Change the Name to Vegetation
C. Check Override Bottom Roughness
D. Change the Bottom Roughness value to 0.06
E. Make sure that row 4 is selected
F. Select OK

Tut 02 mat vege 01.png

3. For the western vegetated bank, double click on the western outer bank polygon. Depending on your display setting this may be labeled 4,
4. Select row 4 and OK. The western outer bank should now be the same colour as the eastern bank.

Your materials should look similar to the below figure.
Tut 02 mateials disp 01.png


Lastly, we need to apply our materials to the TUFLOW FV simulations. To do this, please right click on Land_Use > Apply to > TUFLOWFV Simulations-> Sim.

In this tutorial we have demonstrated how to apply the materials to your TUFLOW FV simulation via a .2dm file, however the SMS Interface provides an option to apply the materials as a shapefile to your model.

tut_02_mateials_as_shp_01.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 each of 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

Firstly, we will apply the flow boundary condition at the upstream boundary of the model domain. Please follow the below steps:

1. Create a new coverage by right clicking on Map Data and selecting New Coverage > Models > TUFLOWFV > Boundary Conditions. Name the coverage nodestrings.

Tut 02 coverage BC 02.png

2. Using the Create Feature Arc Tute2 006.png tool, we will create the upstream boundary condition. Digitise a nodestring offset from the upstream boundary of the mesh, from right to left while looking dowstream. Your nodestring look similar to the below example.

Tut 02 NS digi US BC 02.png

3. Now we need to assign a boundary condition to the Feature Arc. Using the Select Feature Arc Tut 02 Select Feature Arc.png tool, double click on the Feature Arc and the Assign Boundary Condition window should appear.

Tut 01 assign BC 00.png

4. From the BC Types drop down, select Q (Nodestring Flow) and a few different options should appear. Firstly, change the subtype to Sub-type 3 and now select Define Cure... . The BC Curve Editor dialog should appear.

5. We will import the flow rates from a CSV. Select Import... and navigate to your Module_Data folder and select flows.csv.

Tut 02 US flowRate 01.png

Select OK and OK.

Now we will apply the water level boundary condition at the downstream boundary of the model domain. Please follow the below steps:

1. Using the Create Feature Arc Tute2 006.png tool, we will create the downstream boundary condition. Digitise a nodestring offset from the downstream boundary of the mesh, from right to left while looking downstream.

2. Now we need to assign a boundary condition to the Feature Arc. Using the Select Feature Arc Tut 02 Select Feature Arc.png tool, double click on the Feature Arc and the Assign Boundary Condition window should appear.
From the BC Types drop down, select WL (Water Level). This time leave the subtype as Sub-type 1 and select Define Cure..... The BC Curve Editor dialog should appear.

3. We will import the water levels from a CSV. Select Import..., navigate to your Module_Data folder and select tide.csv

Tut 02 DS tide 01.png

Select OK and OK.

Now, we need to apply our materials to the TUFLOW FV simulations. To do this, please right click on nodestrings > Apply to > TUFLOWFV Simulations->Riverine_Channel_000.

In this tutorial we have demonstrated how to apply the boundary conditions as nodestrings to your TUFLOW FV simulation via a .2dm file, however the SMS Interface provides an option to apply the nodestrings as a shapefile to your model.
This can be achieved through navigating to Assign Boundary Conditions and selecting the "Shapefile" option under the Export format tab.

Tut 02 ns as shp 02.png


Lastly, we need to export the mesh by saving the simulation, right clicking on the simulation and selecting Save Simulation. For your reference, the interface will automatically save the .2dm mesh into _models\TUFLOWFV\model\geo folder. This can later become the geometry input file for the TUFLOW FV tutorial model in XHYPERLINKX [TBC].

Tut 01 assign WS SaveSim.png


Congratulations, you have completed the construction of a mesh. Great work! This mesh can be used in Tutorial 02 (HYPER LINK) [TBC]

Conclusion

Congratulations on completing Tutorial XX [TBC]. We've covered a lot in this tutorial, including mesh generation, application of multiple materials, and applying boundary conditions to a mesh using the SMS TUFLOW FV interface.

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