Monday, May 14, 2018

Closing the wormhole with the new features in HEC-RAS 5.0.4!

Written by Krey Price  |  Surface Water Solutions
Copyright © The RAS Solution 2018.  All rights reserved





The Great Hobbiton Flood


For those who have used wormhole culverts or mega-cell culverts in previous versions of HEC-RAS, you'll be relieved to hear that they have officially been retired with the May 2 release of the new Version 5.0.4.


It sounds like the new features are already getting lots of use, and online and face-to-face training courses are popping up all over the world. Given the surge in interest, we thought we'd post a quick overview of the new features and compare some model results between versions. We've found, for example, that the new coordinate-based culvert features in Version 5.0.4 give identical results to wormhole culverts in Version 5.0.3, with both methods drawing flow from the 2D cells that cover the actual inlet location:




[Left-click to play, then right-click on the video to loop the particle tracing - a handy trick to keep file sizes small while providing a continuous animation in a presentation!]


This article highlights the new culvert capabilities along with the following features, each of which is also covered in an accompanying instructional video here:
  • Culverts. We’ll see how the new culvert editor gets rid of the need for wormhole culverts (RIP!) by allowing the inlet and outlet of each barrel to be defined by its own set of coordinates.
  • Mesh Polygons. We’ll then add a “Refinement Region” to a 2D Flow Area using the new RAS Mapper tool that allows you to assign customized computational grid spacing with polygon features.
  • Internal Boundary Conditions. Next we’ll add inflow hydrographs inside of the 2D Flow Area as internal boundary conditions.
  • Adjustable Time Steps. We’ll set Courant Number criteria to allow variable time steps to be selected based on computed velocities.
  • Rating Curves. We’ll then run the model and generate rating curves in a single step (rather than having to extract flow and stage time series hydrographs separately and combine them in Excel).
  • Speed Enhancements. Finally we’ll compare run times to see how the speed improvements stack up.
This demonstration model uses terrain data covering the Hobbit movie set in New Zealand. You can download the terrain for free if you want to follow along (instructions for setting up the project with saved views and static aerial imagery are available here.)

Culverts
If a HEC-RAS model contained wormhole culverts in Version 5.0.3, they will be ignored when the project is opened in Version 5.0.4, so we’ll need to convert any wormhole culverts to “coordi-culverts”, with coordinates assigned to each barrel’s inlet and outlet either manually or with a great new feature to import culvert centerlines from a shape file:

Here’s the schematic plan view for four culvert methods available in Version 5.0.4, with the new “coordivert” in our demonstration model shown in the canal on the far right:
A description of each method is included here. (A fifth method, entering the bridge piers or culvert walls as 2D terrain only, wasn't included here since it is only appropriate for open channel flow.)

Mesh Polygons
To take advantage of the new capability to define a finer mesh within a polygon, we'll use a "Refinement Region" in RAS Mapper. After delineating a polygon under the refinement regions layer, the next step is to right-click on the shape and select “Edit Refinement Region Properties” and enter a cell spacing (in this case 1 meter by 1 meter):
With the higher resolution area defined, if you zoom in on the refinement region, you’ll see a more detailed computational mesh inside the 2D Flow Area:
In this case, I've defined a tighter mesh spacing around the roadway and culvert and left a lower-resolution mesh in the open channel areas. This feature can save a substantial amount of computation time and prevents the need to create multiple 2D areas to reflect varying resolution requirements – or the menial task of creating an excessive number of snaking breaklines with red-dot errors that need fixing!
Internal Boundary Conditions
In Version 5.0.4, BC lines can now be entered as internal boundary conditions inside the 2D Flow Area. Keep in mind that flow will be able to travel in both directions from an internal BC Line, and any BC line in 5.0.3 that crossed the external boundary of the 2D Flow Area will need to be edited to be either all in or all out. At this point flow can only be positive (can’t subtract flow to represent infiltration or a stormwater pit) but with Version 5.0.4 there isn’t any need to use the wormhole culvert hack to move flow around your 2D area anymore. To test it out, we’ve moved the BC lines inside of the upstream boundary, and the model behaved just fine:

Adjustable Time Step
The window with the new option to use the Courant Number criterion is shown below. With the adjusted time step selected, the model will increase or decrease the computational time step automatically based on the computed velocity. This can give you significant speed improvements if you were already conservative with your time step. If you had an unstable model, however, the use of this feature will slow it down as it slices the time step to stabilize it. In this case, our 0.5-second time step can be doubled four times or halved four times, giving it a potential range from 0.03 to 8 seconds:

Rating Curves
One last feature we’ll illustrate is the ability to plot rating curves directly along any saved profile line with a single command. Just right-click on your saved profile line name and select “Rating Curve” as a new option under Time Series (but watch out for the potential pitfalls mentioned in the article here!). Here’s where to find the rating curve function in RAS Mapper:

Speed Comparison
Using the same grid size and time step, this particular model runs twice as fast in 5.0.4 as it did in Version 5.0.3. Taking advantage of the refinement areas and variable time steps, it runs even faster - in less than a quarter of the 5.0.3 time without any significant loss of accuracy. We’ve seen similar speed enhancements with our other models as well.
Comparing results
In this particular demonstration model, the water surface elevation profile results in 5.0.4 look nearly identical to the results from 5.0.3. Here is the particle tracing with the coordi-culvert in 5.0.4 shown at the right-hand side of the image. This one matches the particle tracing in Version 5.0.3 using a wormhole culvert in place of the coordi-vert:
Here are the water surface profiles comparing the coordi-culvert to the wormhole culvert for open channel flow, pressure flow, and overtopping flow conditions:
As you can see, in the vicinity of the culvert, the results are effectively identical for all three flow conditions, which brings us to the bottom line: the wormhole has closed with the release of Version 5.0.4, and wormhole culverts have officially been retired – not just for long culverts, but for internal boundary conditions as well. Mega-cell culverts have also become obsolete now. From what we’ve seen so far, the new culverts provide equivalent results with much more functionality - particularly the fact that they work perfectly fine with the roadway/bridge deck represented as terrain or removed from the terrain and replaced with a weir embankment - so good riddance to both the worms and the Cells Of Unusual Size!
And finally just for fun, let’s ramp up the flow and see if an Orc-dam can flood out Hobbiton; if you want to see how the Hobbits fare in the flood, further details, animations, and comparisons of the new features are available here, or feel free to follow along with the instructional videos covering each of these new features separately.


In this case, our particle tracing shows that this one may catch Frodo in a whirlpool - and suck him right through the Orc-pipe that we can now move anywhere in our model thanks to the new coordiverts in Version 5.0.4!
[Again, right-click to loop]


We'd love to have you join us in an upcoming comprehensive training course, but in the meantime, we hope this has been a helpful overview of some of the new features in 5.0.4! We look forward to hearing how you are using the new features in your own projects.
Krey Price
Surface Water Solutions

4 comments:

  1. Hi Mr Price,
    Thanks for covering the new features provided by the new HEC-RAS version, the new RAS Mapper is working way better than the old one !
    However, there is something I noticed on the new version :
    I built one 1D/2D model using the 5.0.4 version and when I lunched the calculation I got the following error message :
    Geometric Preprocessor HEC-RAS 5.0.4 April 2018
    For the Lateral weir at station 5092.323
    in reach 1 in river riou
    the Headwater cross section weir stations are not correct.
    Each cross section weir station must be greater than the
    prior cross section weir station.
    So I checked my HW XS weir stations but everything looks normal to me since each XS weir station is greater than the prior one. Then I decided to run the model under the 5.0.3 version and it worked just fine, the previous error message didn't show up !
    Do you think that might be a compatibility issue or something else, is there something I should try to make it work under the 5.0.4 version ?
    Thanks in advance for the reply !
    Regards
    V. Mars

    ReplyDelete
    Replies
    1. Could be a bug. Not sure. There will be another release (5.0.4.1) soon. Hopefully that will fix it.

      Delete
    2. Allright thanks for the info !

      Delete
  2. This is excellent - looking forward to playing with 5.0.4.

    But the real question is how does it perform with the dam break analysis for Isengard??

    ReplyDelete