Objective - This tutorial will take the user through steps and options for creating a mesh in HEC-RAS.
It will introduce the different mesh types, the options and parameters associated with them, and a few common errors.

Data Files

For this workshop you will need this terrain file:

RASMeshWorkshopTerrain.tif

These data are for demonstration purposes only and should not be used for engineering analysis.


Steps

If you are in the class and have access to the workshop credentials you can download your starting files from the model library.

Select Development Tools

Select the Model Library and then select 2_1_MeshWorkshop

Create your model and import your terrain

We only provided you with a terrain so you will need to start with a new model

  1. Open RAS2025 and Press the New Project button
  2. Give the project a name like "Mesh Workshop"
  3. You will need a projection before you can Create your project
    1. Pull your terrain (Tiff file) into the Drop a file here zone under Projection 

      4. Press the Create button to generate your project.
      5. Create a Terrain by pressing the "+" next to Terrain in the tree:
      6. Give your Terrain a name ("Terrain is fine for this exercise").
      7. Turn your Terrain on by selecting the check box.
      8. Select the Components tab in the Terrain editor on the right tab.
      9. Drag your GeoTiff onto the blue "+" button or press it and navigate to your terrain file.  
    10. The importer will show you a preview.  Press Import to bring the terrain in.  


 Try Quads, Cartesian, and Triangles in the Straight Channel

First we are going to experiment with the three main meshing techniques in one of the simplest possible configurations: a straight (but angled) channel.


  1. Create a Geometry File by pressing the "+"  button next to Geometry 
    1. Give it a name
    2. Click the check box next to Conceptual Mesh to turn it on.
    3. Click on the Conceptual Mesh node to select it.  
      1. Arcs, Regions, and Nodes should show up in the Components panel on the right.
    4. Select the Editing tool in the tool bar at the top of the display.


  2. Draw four connected Arcs that form a diagonal rectangular Region around the straight channel.
    1. Start and end each Arc by double clicking.
    2. End the final Arc where the first one started.
  3. If you connected all four Arcs RAS should create a Region.
    1. If you hover over the Region it should highlight yellow and show a meshing utility.
    2. If you click the orange meshing utility you can try the three main meshing approaches. 
      1. (Note: the default cell size will be too large for this small domain)
      2. Try to mesh this with aligned quads, aligned Cartesian, and triangular cells.
        1. Step by step instructions for each are included below, but try them first.
  4. Build a Simple Triangular Mesh
    1. Click on the meshing utility and select the triangle and set the cell size to 20.  
    2. To make a mesh, press the Regenerate Mesh button on the top of the Project Tree (upper left)




  5. Build a Cartesian mesh.
    1. Click on the meshing utility and select the Cartesian option and set the cell size to 20.  
      1. Note: For now the Cartesian and Quad options are both represented with squares...Cartesian is more of a "Grid"
    2. Regenerate mesh.  
    3. This will give you a classic vertical/horizontal Cartesian mesh.  We want to align it with flow
    4. In the Components tab on the right click on the Region tab.  
    5. Select your Region (there should only be one)
    6. Select a Rotation angle to try to align these cells with flow.
    7. Next, lets stretch these cells in the direction of flow.
    8. Give them a Cell Size of 40 in the Components Pane and set the Secondary Cell Size to 20.
    9.   Regenerate the mesh.  

    10. Experiment with different primary and secondary cell sizes.

      Cartesian meshes use triangles to make the structured mesh conform to irregular boundaries.

  6. Build a mesh with Quads.
    1. Hover over the region and select the Mesh Utility and choose a Quad cell type , setting the Length to 40 and width to 20. 
    2. Press the Regenerate Mesh Button.


The Quad mesh fills the whole region without using triangles to accommodate boundaries that are not exactly aligned, and uses Laplacian contouring which can align with curves and expand/contract.  Most of these advantages are not apparent in this straight channel, though. 

While both the Quad and Cartesian give you asymmetrical cells aligned with flow in this rare, straight channel system, the Laplacian contouring of the Quad cells will work best to align cells with flow in most channels.

    

Add a Contraction Sections

Next add the contraction section upstream of the straight channel, where the wide debris basin transitions to the narrow straight channel.

Quads make sense in this transition because it is still essentially channel but has to go through a rapid contraction.
Quadrilateral cells are good at maintaining flow alignment and cell size while they pass through a contraction.

  1. Start with the Quad channel in the previous section and add three arks upstream that include the contraction and structure to make a second region.
    1. Make sure your final region has four Arcs and four Nodes.
    2. Select the Conceptual Mesh in the tree on the right and the editing tool from the toolbar at the top of the map.
    3. Start by double clicking on one of the existing, upstream nodes from the channelized reach and finish by double clicking on the other upstream node so that the two regions share an Arc.
       
  2. Build a Quad Mesh in the new region.
    1. Hover over the new region and select the mesh utility 
    2. Select the quad option and give the region the same parameters (Length = 40, Width=20)
    3. Regenerate the mesh.  


      If you had more cells on the upstream arc than you have on the downstream arc you could keep the cell size and shape similar through this transition.

  3. Add cells to the upstream Arc for a transition that maintains cell size and shape
    The Meshing Utility on the Map only has one "Width" cell size or count, so you will have to edit the Arc
    1. Hover over the upstream arc until you see the Arc Utility
    2. Click the arc utility on the upstream arc and change the type from size to count .
    3. Set the count to 16.
    4. Regenerate the mesh.  

    5. Nothing happened.  The current version of RAS2025 only overrides the initial Arc spacing if you enforce "Strict Cell Spacing" on both width arcs.

    6. Switch to Arcs in the Components pane on the right.
    7. Select the upstream arc (you should be able to just click on it in the map and it will select in the components pane).
    8. Turn on Stricter Cell Spacing.
      1. Note: You may often need to set Stricter Cell Spacing on the other Width Arc as well.  But in this case it keeps its original cell spacing because of the order of operations. 


Use Triangles for the North Floodplain

Next, you will build a floodplain mesh upstream (left bank) of the channel with a Triangular mesh.
We are using the "Inside-Out" meshing approach in this workshop, defining the channel first and then the floodplain.
We will use the "Outside-In" approach in other workshops.

Note: To keep the terrain light we did not include the full floodplain.  Build your floodplain region to include as much of it as you can, but make sure your whole region is included in the Terrain.

  1. Add a bounding region.
    1. You can technically use a single Arc to connect the upstream left channel Node to the downstream left Channel Node since you are using triangles.  
      Triangles regions do not need four sides.
      However, it is often good practice to build your overbank regions with four Arcs in case you want to switch to Quads at some point.
    2. Select the Conceptual Mesh in the tree on the right and the editing tool from the toolbar at the top of the map.
    3. Double click on the upstream, left, node to start digitizing the floodplain and end on the downstream, left, node.


  2. Build and evaluate a coarse (for this project scale) triangular mesh.
    1. Select the Mesh Utility  tool and select Triangles .
    2. We want a coarser spacing here, so let's go with a cell size of 200
    3. Regenerate the mesh.  

      No.  The new region has to accommodate the existing cell spacing at the shared boundary, so those will start smaller and transition to larger cells as it gets farther away from the shared Arc so cells have to start at 40.

      Then, there is not enough space for them to stretch at the default 0.2 (20% increase each cell) to more than 100.  


      Increasing your cell size won't work here.  Your stretching rate is controlling.  At the current stretching rate (0.2 or 20% increase per cell) there is not enough room for the cells to fully expand.  To reduce the number of cells you need to increase your stretching rate.

    4. Select your region and increase the Stretching Rate to 0.3.
    5. Regenerate the mesh.  
    6. Try it again at 0.4 and 0.5.  What do you think of these different meshes.

Use a Cartesian Mesh for the Southern Floodplain

Next, you will build a floodplain mesh upstream (left bank) of the channel with a Cartesian mesh.

  1. Add a bounding region.
    1. Select your conceptual mesh and the edit tool and draw a floodplain region with Arcs in the left (southern) floodplain.
    2. Select the Cartesian mesh type and set the cell size to 200.
    3. Regenerate the mesh.  

      There is not room to transition from 40ft cells at the channel boundary to 200ft Cartesian cells (especially at a stretching rate of 0.2, but in this case, even a higher stretching rate won't help.

      Therefore, the mesh uses triangles to 

    4. Try adjusting the region parameters until you are using the largest possible Cartesian cells in this floodplain.