Note: This workshop is designed for the February+ build with major mesh updates  

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  and select Create
    2. Click the check box next to Conceptual Mesh to turn it on.
    3. Click on the Conceptual Mesh node to select it.
    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. All four Arcs RAS will create a Region.
  3. Build a Simple Triangular Mesh
    1. Hover over the Region to access the quick meshing utility.  
    2. Click on the meshing utility and select the triangle and set the cell size to 20.  
    3. To make a mesh, press the Regenerate Mesh button on the top of the Project Tree (upper left)

    4. You can also just type 20 into the blank cell under the Quick Edit Picker since triangles are default.  

  4. 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. Enter a Rotation angle to try to align these cells with flow.
    7. Stretch the 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.

  5. Build a mesh with Quads
    1. From the meshing utility choose a Quad cell type .
    2. Lets start with symmetrical quads, so leave the Cell Size as 40 but delete the secondary cell size.
    3. Press the Regenerate Mesh Button. 
    4. Now add a smaller, Secondary Cell Size like you did with the Cartesian meshes.

    5. Regenerate mesh.  


The Quad mesh automatically aligns with the channel and fills the whole region 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, but 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 arcs upstream that include the contraction and structure to make a second region.
    1. Select the Conceptual Mesh in the tree on the right and the editing tool from the toolbar at the top of the map.
    2. Start by double clicking on one of the existing, upstream nodes from the channelized reach
    3.  Finish by double clicking on the other upstream node so that the two regions share an Arc.
    4. Make sure your new region has 4 Arcs and 4 Nodes.
       
  2. Generate a Quad Mesh in the new region.
    1. Click on the Regions tab in the components menu.  You will finish digitizing on the arcs.

    2. Select the quad option and give the region the same parameters as the channel region: (Length = 40, Width=20)
      Warning: If you don't see the cell sizes you are probably still on the arcs.
    3. Regenerate the mesh.    

      In order to keep a cell width of 20 through an expansion, the mesh generator has to add some transitional triangles.

  3. Instead of defining the cell width as a length, lets define the number of cells we want across the channel.
    1. Hover over the upstream arc until you see the Arc Utility of the downstream (upper-right) arc
    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. The mesh fixed your specified cell spacing at that arc but transitioned to the previous spacing at the upstream arc.

    6. Set the Cell Count to 16 at both of the other "width" arcs (i.e. "transverse" arcs across the channel).
      1. Try setting the middle arc first, regenerating, and then setting the upstream arc so you can see intermediate changes.
      2. Click on the Layer tab and select the Show Arc Cell Sizes and Show Region Cell Sizes options for some visual cues to what you have specified (and what the mesh is interpolating because it is not specified)

This approach fixes the number of cells at each of these arcs to a constant value, forcing the same number of cells across the channel throughout.
The "length" arcs (e.g. banks) are not specified so the mesh is trying to keep these close to 40 while holding the width counts strictly.



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 Quick Edit Picker tool and select Triangles .
      1. (Or just type the cell size below the quick edit picker since triangles are default).
    2. We want a coarser spacing here, so try 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, digitize a floodplain mesh south (right 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 150 for the Region.
    3. Regenerate the mesh.  

      There is not room to transition from 40ft cells at the channel boundary to 200ft Cartesian cells so the mesh only generates big triangles:

      This is not a good mesh

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