Pages

Tuesday, October 8, 2013

Stabilizing a Dynamic Unsteady HEC-RAS Model

One of the most frustrating aspects of unsteady HEC-RAS modeling can be the model stabilization process. You know, you’ve gone to great lengths collecting the best survey/topo data and solid hydrology. Then you’ve painstakingly spent hours…possibly days entered all of that data only to find that once you press the “Compute” button, the model crashes. The dreaded “Red Bar”! Sometimes you can get your simulation to complete without crashing, but the listed numerical errors are so high that you can’t with good conscience submit that as your final simulation. Either way, approaching an unsteady HEC-RAS model (especially a dynamic one) as a beginner with little experience and understanding of how to stabilize it can cause significant delays in your project and worse, completely blow up your budget. I’ve uploaded two HEC-RAS projects to the following Google Drive Site: https://drive.google.com/folderview?id=0B_s8OLJOgOi0YU92SGZQZm9raWM&usp=sharing

RawleyResUnstable.prj is an unsteady flow dam breach HEC-RAS project recently sent to me for help. Although the model ran to completion without crashing, it had unacceptably high errors.
RawleyResStable.prj is the fully stabilized version of the model with no numerical errors.

The following lists out the courses of action taken to stabilize the model. Feel free to download the “Unstable” and “Stable” models and try these techniques on your own. The links following some of these items will take you to more information about that particular technique.

1. Cross Section Spacing. The initial spacing was way too coarse. A visual check alone of the geometry schematic and profile plot should encourage you to investigate a finer cross section spacing.

Dam Breach models typically have time steps on the order of a minute or less. This model was initially set with a computation interval of 10 minutes which is high even for the largest and “slowest” of dam breach models. I changed the time step to 10 seconds. The selection of 10 seconds was based on “gut” feel and lots of experience doing dam breach models. There are some methods for approximating good timesteps, notably the Courant Condition and Fread’s equation. Also, setting the cross section spacing/timestep ratio equal to a representative stream velocity will get you close. In this case, the cross section spacing is 50 ft, and I was able to pull some velocities (prior to the model crashing) at about 6 ft/s. That suggests a time step of 8.3 seconds. Close enough to 10 seconds, so we’ll stick with that.

Notice in the following profile plot of the downstream end of the reach how the water surface at the boundary cross section is below critical depth (the red dot). This creates an overestimation of the water depth at the next upstream cross section, which in turns creates some instability over the next several timesteps.

The proper way to handle this would be to find out what is downstream of your model and select a boundary condition that best represents those conditions. In absence of downstream conditions, the 0.001 slope for normal depth provides a reasonable solution. Either way, this underscores the importance of moving your downstream boundary far away from your area of interest in your study reach. That way the errors that do originate from your downstream boundary assumption will have diminished to negligible levels before impacting your area of interest.

In the unsteady flow editor, the initial flow and the first time step flow should always be equal. In the original model, the initial flow is left blank (which is actually okay because RAS will use the first timestep flow if left blank). However, the first time step flow is very low at 0.14 cfs. Peak discharge of your inflow hydrograph is around 600 cfs. I put in a baseflow (minimum flow) of 5% of this, which is 30 cfs. Just to be safe, I put 30 cfs in the initial flow input box as well. It’s important to make sure that the 30 cfs baseflow does not have an impact on the peak of the breach outflow hydrograph. http://hecrasmodel.blogspot.com/2009/02/minimum-flow-requirements.html

The upstream end of your reservoir is very steep (14%). This one was easy to spot in the profile plot because of the very nice smooth profile plot followed by a sudden spike in the energy level (green dashed line) at the upstream end. Notice to that there is a corresponding supercritical solution at the upstream most cross section. These are both indications that more cross sections are needed here. http://hecrasmodel.blogspot.com/2010/01/another-reason-for-interpolated-cross.html

I added more cross sections by interpolating the steep slope at the upstream end of the reservoir (10 ft spacing).

From RS 4577 to 3791 you have your main channel defined in a small elevated side channel. The right overbank is lower in elevation than the channel.

This is problematic in RAS. Using the graphical cross section editor, I redefined the bank stations to get rid of this problem.

Notice now in the HTAB parameters property table, the HTAB definition begins at the elevation of the invert of the side channel that was previously defined as the main channel. There is a big gap in the computation points in the newly defined main channel. This poses problems with HEC-RAS, particularly at low discharges/stages, since RAS will have to extrapolate to obtain a solution over that range.

In the figure below, notice all of the “red” areas in this zoomed in section of the upstream end of the reach.

These are areas that are near critical depth. I turned on the “Mixed Flow” option in the Unsteady Flow Analysis window, which helps stabilize the near critical depths at the upstream end of the reservoir. http://hecrasmodel.blogspot.com/2011/04/mixed-flow-regime-options-lpi-method.html If you’ve been following along correcting your own copy of the model, you’ll notice that the model now finally runs to completion without crashing. There are still a few minor errors as shown in the Computation Messages.

It’s debatable whether you need to take care of these relatively small errors. Particularly for a dam breach model, where the presumed errors of the input data probably far outweigh these small numerical errors. Nevertheless, there’s a sense of pride in putting out a very robust model, completely free of numerical errors. So…let’s continue.

The errors in the computation window above suggest a problem around river station 6200. That happens to be the upstream end of the reservoir and the source of the error can clearly be seen with the energy grade line and critical depth turned on.

The section at the upstream end of the reservoir is very steep at about 13.5%. In fact, that’s greater than the suggested maximum slope of 10%, as stated in the HEC-RAS manuals. You can see as the pool starts to lower, the steep reach is exposed and because of the low n values, the water surface is calculated to be supercritical. Let’s assume that the geometry is correct, and the upstream end of the reservoir really is that steep. Jarrett’s Equation suggests very high n values should be used here (~0.2), based on the bed slope and hydraulic radius (after the breach when the reservoir has drained). The original model had 0.07 and 0.035 for the overbanks and main channel, respectively. I changed all the n values in this steep reach to 0.15, because I think 0.2 might be a little overkill. http://hecrasmodel.blogspot.com/2009/12/n-values-in-steep-streams.html

There…no errors! However, there is still a Warning about extrapolating above/beyond the rating curve at a bridge (R.S. 277).

To get rid of that warning, I increased the HTAB headwater maximum elevation at River Station 277 (the bridge) from 278 ft to 280 ft so that RAS doesn’t have to extrapolate.

Yes. That is okay. RAS will use the empirical structure equations (inline structure, bridge, culvert, etc) to compute from downstream to upstream. RAS will not interpolate over bridges and inline structures.

Another suggestion for the most upstream issues (last one you discussed) would be just to delete the last "real" XS and the two last interpolated XS, as the amount of storage in those sections is negligible.

Chris,I have a model I am currently working on that runs with minimal errors (2 errors) and am encountering the same error as the last listed within the above example, extrapolating above/beyond rating curve at bridge/culvert. I tried increasing my HTab Headwater Max Elevation firstly to 0.5m above what it initially was to no avail. I then tried several other steps above this even using an unrealistic value double that of what was initially used with the error extrapolating above rating curve at bridge/culvert still occuring? Do you have any suggestion of what may be happening here and how I may go about amending this problem?

Hey Sam- If our model is stable, go to the water surface profile plot and check the max ws profile and see what was actually computed for the headwater elevation of that bridge. If you pick an elevation just above that for your Max Headwater, the error message should go away. Is it possible that you are getting errors with your computed water surface that aren't showing up in the computation window? The water surface profile plot should reveal this. Hope this helps.

Yes, you can create a "dummy" tributary and connect it to the existing reach. RAS will then create a junction there. You can then delete the "dummy" tributary and choose to maintain the junction. But...why would you want to do this?

Apologies for the delayed response! I was attempting to create a junction to join a section of reach (downstream of my main channel) that was to be added below the most DS XS of the main channel (an afterthought for a railway crossing that was not included in the model to begin with). I have managed to work my way around the problem by using -ve chainages for the new DS XS's and renaming the new reach names to match the existing. Thanks for the advice on creating a dummy tributary though, it might come in handy one day :)

Absolutely! If you can think it up, it can be done. You will need to start and stop HEC-RAS with predefined date/times for when you want to make changes to the cross sections. While the simulation is stopped, you can re-write the geometry text file with new cross section(s). Then define the next time window by writing a new plan text file. Then call the Compute_CurrentPlan procedure. It can definitely be done. "Breaking the HEC-RAS Code" has valuable information that will help you do this. Good luck!

Hi Chris. I've been getting this error for months now off and on. (I often give up on unsteady and revert back to steady flow) I've had a few emails back and forth with the HEC but not any solutions to date. What I am curious is if this is an error associated with a mem stack problem. I've been on most of the blogs and nothing has helped, even the fortran blogs. I'm running Win 7, 16GB RAM, and a Tbyte of hard drive.

Tony, prior to 5.0.3, those errors were typically related to cell violations in a 2D area. In my experience, HEC did a good job cleaning all of those up for version 5.0.3 and only on rare occasions do I see the stack of RASUnsteady64.exe Unknown errors. When I do, it's almost always fixed by saving RAS, shutting it down, and reopening it. You might also try a computer reboot too, if the first suggestion doesn't work. If that's not it, I'm afraid I won't be of much help. Just check all of your input. You can always strip down your project until it runs okay, then add stuff back one at a time. That's what I do when I'm all out of ideas for the cause of an error like this. Good luck-Chris

Hi Chris. have been running a model under the unsteady flow and it consistently gives me the same error, even tho I have already tried all possible solutions given in this forum. The latest error given was:

After this, the red bar starts running so I am kinda blocked on how to proceed to correct these errors. I have already increased the number of stations and limited the spacing to 300 m, I have changed the increment to 0.25 and the number of points to 100 - even tho it still extrapolates. Any help or suggestions on how I can fix it? I have tried (almost) everything! I have taken different time steps and it still crashes. I have readjusted the cross sections also (based on the warnings given in the outputs), but it doesnt really solve anything. I used the initial conditions as the first point of the hydrograph (even tried changing the ranges) and it still gave me the errors. No mater what I do, the simulation crashed!

Hey!I have been running a model under the unsteady flow and it consistently gives me the same error, even tho I have already tried all possible solutions given in this forum. The latest error given was:Maximum iterations of 40 at: RS WSEL ERRORSolution solver went unstable, iteration 40 at 20JAN2014 12:59:00Gave_Oloron Gave_Oloron 57846 145.74 16.950

After this, the red bar starts running so I am kinda blocked on how to proceed to correct these errors. I have already increased the number of stations and limited the spacing to 300 m, I have changed the increment to 0.25 and the number of points to 100 - even tho it still extrapolates. Any help or suggestions on how I can fix it? I have tried (almost) everything! I have taken different time steps and it still crashes. I have readjusted the cross sections also (based on the warnings given in the outputs), but it doesnt really solve anything. I used the initial conditions as the first point of the hydrograph (even tried changing the ranges) and it still gave me the errors. No mater what I do, the simulation crashed!Thanks

https://drive.google.com/folderview?id=0B_s8OLJOgOi0YU92SGZQZm9raWM&usp=sharingHello sir I have downloaded those files and saw the differences between stable and unstable model, still I am not able to run the model.Sir please help me... HEC-RAS must include tips to slove errors.In my place no one worked on it. No one is here to clarify my doubts.

hello sir....i have digitized my river in hecgeoras and imported in HECRAS....now i need to adjust cross sections data as surveyed data are given to me....how can I put my exact surveyed data without shifting the cross section from main channel????

WELCOME TO THE RAS SOLUTION

You've arrived at The RAS Solution. The best help site for all things HEC-RAS. Use the Search bar to find topics you are interested in. Do you have an idea for a blog post to The RAS Solution? I welcome and encourage guest authors. Please follow the instructions here. I do receive a lot of questions in the post comments. I try to respond to all questions, but sometimes it gets a little busy. Please be understanding. New to HEC-RAS? Here's a video from Practical Engineering on some of the great things that HEC-RAS can do.

The Author

Chris Goodell is the Director of Applied Research for WEST Consultants, Inc. and a former HEC-RAS Development Team member. Chris teaches HEC-RAS courses around the world and is the author of the popular book "Breaking the HEC-RAS Code."

"Breaking the HEC-RAS Code"

This book covers one of the most powerful, yet relatively unknown features available in HEC-RAS: the HECRASController! The HECRASController API has a wealth of procedures which allow a programmer to manipulate HEC-RAS externally by setting input data, retrieving input or output data, and performing common functions such as opening and closing HEC-RAS, changing plans, running HEC-RAS, and plotting output.

You may share this website or specific posts on this website by any of the following means:1. Using any of the share icons at the bottom of each post or on the website sidebar;2. Providing a back-link of the URL of the content you wish to disseminate; and3. You may quote extracts from this website with attribution to The RAS Solution and proper reference to www.therassolution.com.For any other mode of sharing, please contact the author.

Commercial use and distribution of the contents of the website is not allowed without express and prior written consent of the author.