Tuesday, May 19, 2015

My Unsteady HEC-RAS Model is Unstable…Why?

Written by Christopher Goodell, P.E., D.WRE  |  WEST Consultants
Copyright © The RAS Solution 2015.  All rights reserved.

This question (or some variation of it) comes up quite a bit on The RAS Solution:  “I have an unsteady flow model.  When I run it, it goes completely unstable.  What is causing this?”  Many times a screen shot of the computation window with the dreaded “red bar” is attached.  

image

While the person asking the question genuinely needs help, what he/she doesn't understand is that it is impossible for anyone to troubleshoot his/her model with this limited amount of information or without the model data files.  There are an almost infinite number of possible reasons the model crashed.  

If I could sum up my approach to troubleshooting unsteady HEC-RAS models in one sentence, it would be
“HEC-RAS likes things to change gradually”

If your model is crashing, look for places or times where something is changing drastically.  It could be a sudden and significant change in the size and shape of the main channel from one cross section to the next.  It could be a sudden increase/decrease in flow.  It could be a sudden increase/decrease in stage.  Whatever steps you take to try to stabilize your model, make sure you are confident that the steps you are taking will improve stability without giving up more accuracy then you’re willing to sacrifice.  Haphazardly making changes and adjustments to your model without any forethought or strategy, in an attempt to make it stable could very well make it worse and get you nowhere-and waste a lot of time.  Making methodical, logical, and beneficial changes to your model is a much better approach.  By methodical, I mean understand what you are doing, and why it can improve numerical stability.  Also understand what accuracy (if any) you are sacrificing to achieve the increased stability.  Keep in mind, stabilizing your model may require more than one “change”.  This is why it is important to understand the theory behind the computations in HEC-RAS.  That understanding will allow you to make informed and intelligent decisions on what techniques to use to stabilize your model. 

Here are some very helpful references that deal directly with how to troubleshoot HEC-RAS unsteady flow models that are unstable and/or crashing.  If you’re having trouble with your unsteady flow model, please carefully read through these references.  And consider taking an HEC-RAS training course if you can.  The “Unsteady Flow” and “Dam Breach” classes both cover techniques for troubleshooting an unsteady flow HEC-RAS model. 
  • HEC-RAS User’s Manual Chapter 8, Performing an Unsteady Flow Analysis.  Particularly the section on Model Accuracy, Stability, and Sensitivity.  This manual (along with the Hydraulic Reference Manual) comes with the installation of the HEC-RAS software.  You can access it from the main HEC-RAS window under Help…User’s Manual.
image



image







[clip_image002%255B5%255D.jpg]

 Stabilizing a Dynamic Unsteady HEC-RAS Model.  Post on The RAS Solution.  Steps taken to stabilize a HEC-RAS model, along with the dataset used.  http://hecrasmodel.blogspot.com/2013/10/stabilizing-dynamic-unsteady-hec-ras.html





image








image

13 comments:

  1. Hi Chris,
    I understand your idea about a sudden change and its impact on model stability. However, if one is going to model a dam breach or reservoir operation, the outflow will be, no doublet, a dramatic change and decrease of flow and stage in a very short time. How do you deal with model instability caused by such cases?

    ReplyDelete
    Replies
    1. Great question. You are correct, which is why dam breach models are among the most difficult to stabilize in HEC-RAS. The Mixed Flow option is a great tool for minimizing the effects of large accelerations at the front end of a dam breach wave. Providing a good "cushion" at the front end of a dam breach wave will help as well (i.e. use a higher minimum flow value).

      Delete
    2. Thanks Chris

      A further question about unsteady flow analysis. We are thinking to use HEC RAS for flow routing, either for flooding, forecast flow, or for planed water release (flow scenarios) from an upstream dam. If we want to know how flow affects downstream in terms of water surface elevation, unsteady flow is an appropriate method based on some studies, such as Hicks and Peacock (2005) and Alaska Energy Authority (2013).

      I calibrated HEC RAS with unsteady flow analysis (with more interpolated cross sections and a good calculation time step). Then when I use this “calibrated” model for a planned water release (i.e., daily flow for 15 days, flow goes high then low….), but this HEC RAS model goes to instable again. Why? Because planned water release changes too rapidly? It seems that error was related with a bridge, and I have about 15 bridges in this model; should I delete bridges?

      Is this a major reason that HEC RAS is not commonly used for operation flow forecast, because each flow situation could cause instability? Sorry for bit long questions.

      Delete
    3. It's impossible to say why your model goes unstable without seeing it. There are any number of reasons. That being said, nearly all instabilities occur due to sudden and abrupt changes in something (could be stage, flow, velocities, flow area, energy slope, etc). My suggestion is to get your model stable for extreme releases of flow, then calibrate it. Then your model should be robust enough to handle all operational scenarios. If the errors are originating at a bridge, try refining your htab parameters (i.e. add more resolution). Yes, new users can have difficulties with model instabilities, but like everything else, with practice, you get good at solving them. And I don't look at model instability as a negative thing, but rather a nice warning to you that there is something wrong with the setup of your model. Software that never goes unstable is either not using the full dynamic wave equation, or is making assumptions for you to stabilize the model. Personally, I'd rather the software not make assumptions for me, I'd rather have control over it myself.

      Delete
  2. hello chris
    i am facing a unique error which i am unable to figure it out and had tired alot but still it prevails.the issue is when i run unsteady simulation at 1 day time step it doesn't show error and model runs successful but when i see the mapper for results the water vanish away all of sudden just after first 2 days of simulation and no flow shown for the remaining season . similar model when run on 1 hour time step gives a convergence error on exactly same time from which the flow disappears on wards. i am using 5.0.3 version and please help me out and give me your email so that i may share my model with you

    ReplyDelete
    Replies
    1. Both a 1 day and 1 hour time step are very coarse. Your model is probably unstable. Suggest checking courant number for a more suitable time step.

      Delete
  3. Good day all. I'm having a slightly different issue which I'm hoping members can shed a light on. I'm running a 2D simulation for an urban catchment with one upstream boundary condition (24 hydrograph with a peak flow rate of 4.3m3/s) and a normal depth downstream boundary condition. The model runs well (using diffusion wave. note flow momentum crashes) however I'm getting an unusually high depth (in the order of 5m). I did a 1D model and the average depth is on 0.5m.
    Is there a reason for these usually high and dpeths?

    ReplyDelete
  4. when ever i run unsteady flow analysis i always get stuck in it and my simulation gives this error!
    SOLUTION SOLVER FAILED! Unstable for Initial Iteration at 17SEP2006 2400

    ReplyDelete
    Replies
    1. Check your initial conditions and boundary conditions. Check all of your input. Make sure your n values aren't too low. Reading through the literature referenced above is the best place to start trying to troubleshoot this.

      Delete
  5. Hi Chris, I am having trouble stabilizing a 1D/2D model for a large storm event. The model consists of a 1D reach with a 2D overflow area connected by lateral structures along the river bank. Once water overtops the bank and enters the 2D area, floodwater flows away from the main channel towards
    an auxiliary outlet. This auxiliary outlet is a restrictive culvert underneath a tall railroad embankment. I modeled the storage immediately upstream of this railroad culvert as a 1D storage area in order to input a flow hydrograph from the contributing subbasin. The 2D area drains into the 1D storage area through two SA/2D connections.

    The model runs fine (minimal error) for all storms up to the 100yr. However, the 500yr storm will not run, and I get a lot of 1D/2D flow errors before the model ultimately crashes with the following error: "error with program: RasUnsteady64.exe Exit Code = -1073741819". The1D/2D flow errors are occurring where the 2D area drains into the 1D storage area.

    FYI, I am using a 20-ft grid, 12 sec timestep, full momentum eqn. I have been adjusting (loosening) different parameters and have increased the iterations to 20 (max).

    Any help on this issue is much appreciated. Thank you.

    ReplyDelete
    Replies
    1. Seems like you could use a smaller timestep to satisfy a Courant number = 1. Also, you might try adding some 1D/2D iterations, if you haven't already.

      Delete