Creating a HEC-RAS 2D mesh that correctly represents the flow area being modelled can take some time to add the appropriate details to the model to represent the components and terrain data to be included.
When working with complex meshes, there may be times when the mesh generation fails to run. When this situation occurs, it will require the user to review the data that has been assigned to construct the mesh.
For example, the below 2D mesh fails to correctly generate an adaptive mesh.
However, upon review of the polygon boundary used to define the mesh, the upper boundary contains a large number of unnecessary and redundant vertices.
In this situation, the Map Edit > Simplify Elements command can be used to correct this issue by removing the redundant vertices along the 2D mesh boundary.
The following sections describe how to perform this task.
Export 2D Flow Area Mesh as Shapefile
To be able to simplify the 2D flow area mesh boundary, it needs to be exported as a shapefile. Follow these steps:
- From the Input ribbon menu, click the Export Data menu item, and then select the Export HEC-RAS to Shapefiles command.
- Click the […] button adjacent to the HEC-RAS shapefiles folder entry and then choose the directory to save the exported shapefiles.
- Under the HEC-RAS Input Data section, turn off all the HEC-RAS element checkboxes except for the 2D flow area boundaries check box.
- Click the [Export] button.
- The software will export the 2D flow area mesh boundary as a polygon shapefile.
Import Polygon Shapefile
Next, we need to import the polygon shapefile that was exported. Follow these steps:
- Right-click on the Map Data Layers panel and then select Add Layers from the displayed context menu.
- Browse and select the exported polygon shapefile, and then click the [Open] button.
- The selected shapefile should be loaded and correctly overlay the HEC-RAS model area.
The imported polygon shapefile will be used to recreate the 2D flow area for the HEC-RAS model. However, the number of vertices that define the shapefile polygon first needs to be simplified. Follow these steps:
- From the Map Edit ribbon menu, select the Simplify Elements command.
- The Simplify Elements dialog box will be displayed.
- Click the [Pick] button adjacent to the Select polylines/polygons entry.
- The Simplify Elements dialog box will temporarily disappear, and a prompt will be displayed on the status line describing what to do next.
- From the Map View, select the imported polygon. Then, right-click and choose Done from the displayed context menu.
- The Simplify Elements dialog box will reappear.
- The software uses the Douglas-Peucker algorithm to reduce the number of redundant vertices that define polylines and polygons, thereby simplifying the geometry. The threshold value represents the amount of displacement a vertex can have from the adjacent vertices. A larger threshold value results in fewer vertices used to define the polyline or polygon. An illustration of how the Douglas-Peucker algorithm iteratively simplifies a polyline is shown below. The threshold value is depicted as the radius of the green circle. Critical vertices are first identified, which define the representative shape of the element. Then, redundant vertices are discarded.
A reasonable starting value use would be 10 feet (3 meters). This value can be increased to remove additional vertices. Some engineering judgement should be used when deciding on a final value.
- Click the [OK] button.
The polygon will be simplified, reducing the number of redundant vertices used to describe the polygon boundary.
Assigning Polygon as 2D Flow Area Mesh
After simplifying the polygon, it can used be to define the 2D mesh. Follow these steps:
- From the Input ribbon menu, select the 2D Flow Areas menu item and then choose the Assign 2D Flow Areas command.
- The Assign 2D Flow Areas dialog box will be displayed.
- Click the [Pick] button adjacent to the 2D flow area polyline/polygon entry.
- The Assign 2D Flow Areas dialog box will temporarily disappear, and a prompt will be displayed on the status line describing what to do next.
- From the Map View, select the polygon that was simplified.
- The Assign 2D Flow Areas dialog box will reappear.
- From the 2D Flow Area General Specifications section, define the 2D flow area ID.
- From the 2D meshing scheme dropdown combo box, select the mesh type to use.
- Click the [Apply] button, and the software will assign the polygon as a 2D flow area.
- Double-click on the 2D mesh on the Map View to display the 2D Flow Area Data dialog box.
- Click the [Update] button.
- The software will generate the 2D mesh without the previously reported error.