Wednesday, December 26, 2012

HTAB Problems with using the Drawdown Scheme for troubleshooting.

Written by Chris Goodell, P.E., D. WRE   |   WEST Consultants
Copyright © RASModel.com. 2012.  All rights reserved.

A very convenient way to troubleshoot instability problems with very complex models is the use of a hotstart run with a stepdown scheme.  Creating a stepdown scheme hotstart plan is covered in detail here.  In a previous post, I explained some problems with running the stepdown scheme when you have bridges.  Here I want to highlight problems you may run into with cross sections while running the stepdown scheme.
While drowning out the entire model to provide a high degree of numerical stability, you will be exceeding the maximum HTAB computation points, sometimes by several hundred feet/meters or more.  Technically, this is okay, since HEC-RAS will extrapolate the HTAB curves as needed.  However, extrapolation is done linearly off the last two HTAB points on the computed curve.  If the last two points of the curve happen to be at a location of discontinuity on the curve, bad things can happen.  Take for instance this computed HTAB curve of Conveyance vs. Stage:
image
It looks pretty good.  However, if you zoom in on the end point, you can see that there is a discontinuity in the curve. 
image
Not a big deal, since normally we are well below the last point on the HTAB plots.  However if you are running a step-down scheme, RAS will have to extrapolate off of the last two points when the model is “drowned” and you can see that there will be an overestimation of water surface elevation at the subject cross section during the stepdown process as shown below in the profile plot.  If the overestimation of stage is severe enough, the resulting “stairstep” could lead to numerical instability, causing your model to crash.image
A quick fix to this problem is to just slightly change how the HTAB curves are constructed for the problem cross sections.  Simply remove the last point in the curve by reducing the number of points in the Cross Section Table Properties by 1 (in the example below, change 100 to 99). 
image
This will provide a much better linear extrapolation and get rid of the “stairstep” problem in the stepdown scheme. 
image
Of course a “seasoned” RAS modeler will recognize what is causing the discontinuity in the HTAB curve in the first place and could eliminate that problem by fixing the geometry, whether it be better definition of ineffective flow areas, levee markers, n-value breakpoints, etc.  However, the savvy modeler would recognize that the discontinuity exists at the end points of the cross section, well above the normal water surface elevation range.  Once the model is stable, there’s no need to spend time fixing this.  

Wednesday, November 7, 2012

Connecting a River to an Off-channel Storage Area using a Lateral Structure

Written by Chris Goodell, P.E., D. WRE | WEST Consultants
Copyright © RASModel.com. 2012.  All rights reserved.

An off-channel storage area in HEC-RAS can be a very useful way to simulate flooding in interior areas, adjacent ponds and lakes, urban areas next to rivers, green storage, or just about any area that you expect to flood but will be better represented as ponded water versus actively conveying water.  Connecting rivers to off-channel storage areas is done via lateral structures.  Although it is possible to use lateral structures and storage areas in steady flow modeling, typically lateral structures and storage areas are used in unsteady flow modeling, where quantification of storage and hydrograph attenuation are very important.

Here’s a simple example of using a lateral structure to connect a river to an off-channel storage area (this happens to be the LeveeBreach.prj project that comes with the HEC-RAS installation).



To begin, first make sure your cross sections are all included and correctly entered.  Then you draw in (or import from GIS) your storage area.  To do that, simply click on the Storage Area button on the top of the geometry schematic and start clicking points to define the perimeter of the storage area.  Double-click to complete the storage area.  Now you are ready to connect the river to the storage area.
Select the Lateral Structure button on the left side of the geometry schematic.    When you do this the first time, the following graphic will be blank, but in this case, the lateral structure (which is being used to simulate a levee) is already entered in.  The figure below shows the lateral structure in profile view.  The stationing plotted on the x-axis is the lateral structure stationing (which you will define in the Weir/Embankment editor).  It is NOT the same as the river stationing.

image
The River, Reach, and HW RS (Headwater River Station) define the location of the lateral structure in your system.  The upstream end of your lateral structure will be located at the HW RS (but can be shifted downstream of this station in the weir/embankment editor).  Notice that lateral structures are stationed from upstream to downstream (i.e. 0 is the most upstream point on the lateral structure).  The vertical lines in the graphic represent cross sections that are spanned by the lateral structure.  The vertical line that sits at station 0 is the HW RS.  The boxes on the bottom of the vertical lines represent the invert elevation of the respective cross sections, and the boxes on the top represent the end points of the cross section (on the side of the cross section that the lateral structure is located: left or right).  The red dots represent the bank stations of the respective cross sections.

Next, give a description for the lateral structure in the Description box and then define where its headwater position is.  You can place the lateral structure in either of the overbanks (left or right side) or adjacent to either bank station (left or right). 

The plan data Optimization button is just a shortcut to the plan file to quickly define whether or not you want to optimize the flow split over the lateral structure during the initial conditions run.  Typically you will want to optimize this if you have flow over the lateral structure at the beginning of the simulation.  If your initial conditions are below the lateral structure, leave this off.  The Breach button is a shortcut to the breach editor, if you want to breach this lateral structure during the simulation.

The “Tailwater Connection” is really the subject of this post-this is how you connect the river to the storage area.  Make sure you select “Storage Area” as your Type and then go choose the storage area you want to connect to by clicking the “Set SA” button.  Alternatively you could connect a lateral structure to another river/reach or you could connect it to nothing (send the flow over/through the lateral structure out of the system). 

There’s still work to be done to define the Weir/Embankment (if not already done), but the Storage area and the river are now connected via the lateral structure.  If you want to make sure you are connected, look at the points of the lateral structure on the geometry schematic.  If you see thin black lines connecting the end of the lateral structure to the storage area, then you know RAS recognizes them as being connected (sometimes you have so zoom in close to see the “connection lines”).

image


If you are having difficulty connecting lateral structures to rivers and/or storage areas, I highly encourage you to open up this example in HEC-RAS and have a look around.  Normally you will find the example projects in C:\Program Files\HEC\HEC-RAS\4.1.0\Example Projects.

The “4.1.0” might be different if you’re using a different version of HEC-RAS.  If you don’t see the example projects here, go to the Help menu item on the main HEC-RAS window and select “Install Example Projects…”

image

Wednesday, October 31, 2012

Inline Structure Flow Stability Factor

Written by Chris Goodell, P.E., D. WRE | WEST Consultants
Copyright © RASModel.com. 2012. All rights reserved.

So many of us know that if you experience instabilities at or near your inline structure, you should bump up the Inline Structure Flow Stability Factor from the default of 1 to the most stable value of 3.  But what is really going on when you do this?
image image










Here’s an example of a RAS model where the computations are going unstable around an inline structure and the model ultimately crashes.  Notice the energy spike just upstream of the structure.  Simply changing the inline structure flow stability factor from 1 to 3 got rid of this problem and the model ran without any errors at all. 
image
When RAS encounters an inline structure, it uses an iterative approach of guessing an energy slope projection upstream of the inline structure, then solving the weir equation.  If the guess is close enough (within the predefined tolerance), RAS calls the solution good and moves on.  Herein lies the problem.  Sometimes RAS will guess a slope projection that produces an upstream energy level that is too high.  Normally not a big deal, as the next iterative guess will try something lower and ideally the true solution will be converged upon. 
However, if that first guess is so erroneous that its error oscillates and grows (instead of decays) during the iterative procedure, the model can eventually become completely unstable and crash.  The Inline Structure Flow Stability Factor seeks to dampen out or eliminate those oscillations by reducing the energy slope projection for the first iterative “guess” at inline structures. 
The result is much more stability at inline structures in your model.  Contrary to other stability factors in HEC-RAS, bumping up this one from the default of 1 to the most stable value of 3 does NOT decrease accuracy.  Theoretically, you should arrive at the same answer with 2 stable models whether you use “1” or “3”.  The difference is how RAS gets to that answer in the iterative procedure.  The default of 1 uses a slope projection guess that should arrive at the answer fastest (fewest number of iterations), assuming it remains stable.  A value of 3 will arrive at the solution using more iterations, but will avoid “guesses” that may cause instability along the way.  I’ll wager that if bumping up to “3” stabilizes your model, you won’t notice the extra iterations…

Friday, August 17, 2012

Flow spike after peak of dam breach floodwave.

Written by Chris Goodell, P.E., D. WRE | WEST Consultants
Copyright © RASModel.com. 2012. All rights reserved.

Just ran into an interesting phenomenon.  I was running a dam breach model with fairly typical breach parameters and piping failure mode.  After the peak of the breach hydrograph, there appeared a mysterious “spike” as shown in the figure below. 
image
This happens to be right at the same time the flow through the developing breach becomes freeflowing (as opposed to pressure flow through the breach opening) as shown in the next two figures.
image
image
This is the point at which RAS switches from using the orifice equation to the weir equation.  The breach editor allows you to specify a breach weir coefficient.  By lowering this weir coefficient, you can get rid of the spike and have a smoother hydrograph.  I'm not concluding that this spike is incorrect. In fact, it is quite possible that you do experience a real surge when the breach collapses in and goes freeflowing.  In that case, you may find the spike acceptable.  Whichever result you use, be sure you can back it up with sound reasoning.  Given the extreme uncertainty in both breach weir coefficients and piping coefficients, it's probably best that you run a sensitivity analysis to gain a full understanding ot the effects these coefficients have on the dam breach hydrograph. 


Breach weir coefficient = 3.0
image
Breach weir coefficient = 2.0
image
Breach weir coefficient = 1.0
image
Looks like a breach weir coefficient of 1.0 does the trick. 

Tuesday, July 31, 2012

How to draw cross sections.

Written by Chris Goodell, P.E., D. WRE | WEST Consultants
Copyright © RASModel.com. 2012. All rights reserved.

Cross sections must be perpendicular to the flow lines at all locations.  And they cannot intersect with each other.  That is why it is common to see cross sections snap at different angles outside the main channel (we call this doglegging).  The trick is to keep them from intersecting, while also staying perpendicular to flow lines.  In the figure below, the dark blue line represents the main channel.  The brown lines represent the edge of the flood plain.  The light blue lines are my impression of the flow lines through this terrain, if water were flowing appreciably in the floodplain.  The green lines are cross sections.  Notice that the cross sections are drawn so that they are not only perpendicular to the main channel, but also to my perception of the flow lines in the floodplain.  It can be very helpful to draw these flow lines before cutting cross sections. 
clip_image002
It takes a little bit of practice to do this correctly, and most of the time some trial and error, but as long as you remain perpendicular to the flow lines and don’t intersect, you’ll have a good set of cross sections. 
Where it can get tricky is at a junction.  The following RAS Bloggery article will help with junctions.  http://hecrasmodel.blogspot.com/2009/02/how-to-best-model-junction.html

Thursday, June 28, 2012

Q & A: Flow Attenuation

Written by Chris Goodell, P.E., D. WRE | WEST Consultants
Copyright © RASModel.com. 2012. All rights reserved.

Question
When running an unsteady flow model with a single inflow hydrograph, why does my discharge decrease in the downstream direction for a given output profile? 

Answer
This is called flow attenuation.  You see this to varying degrees in all unsteady flow models and it is a real phenomenon.  The shallower the reach, or the wider the floodplain, the more pronounced this effect will be.  In very steep streams, you may not notice flow attenuation at all. 
The physical process is as follows:  As the flood level rises, water moving downstream fills in available volume.  This volume is called storage.  Water going into storage is taken away from the flow going downstream and that is why you see a decrease in discharge as you move in the downstream direction.  Wider floodplains and shallower reaches have more available storage volume, which is why flow attenuation is pronounced under these situations.  Once the flood wave passes, and you are on the receding limb of the flood hydrograph, the water that had gone into storage now returns to the active discharge.  In this case you’ll see an increase in flow as you move in the downstream direction.  Notice in the figure below that the discharge at time 0042 (before the peak of the flood wave) decreases in the downstream direction, while the flow at time 0124 (after the peak of the flood wave) increases in the downstream direction.
image
You can also see this effect when viewing hydrographs in the figure below from two cross sections, one upstream (River Station 2500) and one downstream (River Station 2400).  The attenuation of flow is the difference in peak discharge between these two hydrographs-in this case, about 2.3 cms.  The area between these two curves represents a volume of water.  The area to the left, where the upstream discharge is greater than that downstream discharge, represents water going into storage.  The area to the right, where the upstream discharge is less than the downstream discharge, represents water leaving storage.
image
Attenuation is included in the conservation of mass equation, which is one of the two equations (the St. Venant equations) used to define the movement of water through a reach in HEC-RAS-the other being conservation of momentum.    From the HEC-RAS Hydraulic Reference Manual (Page 2-22), “Conservation of mass for a control volume states that the net rate of flow into the volume be equal to the rate of change of storage inside the volume.”    In other words, Inflow minus outflow equals the change in storage over time.  The equation is:
clip_image002
where A = flow area, Q equals discharge, t = time, and x = length. 
The discretized form of this is more practical to use and may be more familiar: 
clip_image004
Where I = Inflow to a discrete control volume, O = Outflow, DS = Change in Storage, Dt = time duration (i.e. time step).

Monday, February 27, 2012

Coefficients of Contraction/Expansion at Bridges.

Written by Chris Goodell, P.E., D. WRE | WEST Consultants
Copyright © RASModel.com. 2012. All rights reserved.

In HEC-RAS, it is a well known modeling technique to increase the coefficients of contraction and expansion in the vicinity of a bridge for steady flow modeling. 
This is done to capture the energy loss resulting from increased flow contraction approaching the bridge, and increased flow expansion when leaving the bridge.  This energy loss is not accounted for in the friction loss, so HEC has added in the ability to account for it using the contraction and expansion coefficients, multiplied by the difference in velocity head between two cross sections.  Typically, RAS modelers will apply the higher coefficients (0.3 for contraction, 0.5 for expansion) at Cross Sections 4, 3, and 2 of the traditional cross section layout for bridges (see figure at the bottom of this post).  Cross Section number 1 (the most downstream of the 4-cross section layout) is typically left at the default values of 0.1 and 0.3, respectively.  imageA common question is “why is Cross Section #1 left with the default values?”
The coefficients of contraction and expansion are applied to the reach from the cross section at which they are defined to the next cross section downstream.  In the energy equation,
clip_image002, he represents the head loss from one cross section to the next.  The equation for head loss, he, is:
clip_image004
Where C is the coefficient of contraction or expansion.  Subscripts 1 and 2 represent the two neighboring cross sections.  So here you can see clearly that the coefficient of contraction or expansion is applied over a reach, defined by L, which is the length between Cross Sections 1 and 2.
So, for bridge modeling, the reach from Cross Section 4 to 3 defines the zone of contraction as flow approaches the bridge.  The higher coefficients are applied to Cross Section 4 in this case.
The reach from Cross Section 3 to 2 defines the fully contracted zone though the bridge.  You could make a case that since the flow is fully contracted in this zone, that the typical coefficients should be used (0.1 and 0.3).  However, since there is usually a higher amount of turbulence in this zone, traditionally everyone keeps the higher coefficients (0.3 and 0.5).  The higher coefficients are applied to Cross Section 3 in this case.
The reach from Cross Section 2 to 1 defines the expansion zone downstream of the bride.  The higher coefficients are applied to cross section 2 in this case.
At Cross Section 1 and further on downstream, the flow is considered fully expanded, so Cross Section 1 maintains the typical coefficients (0.1 and 0.3). 
clip_image002[4]

Thursday, February 23, 2012

How to get a table of Peak Flows and Peak Stages for Unsteady Simulations

Written by Chris Goodell, P.E., D. WRE | WEST Consultants
Copyright © RASModel.com. 2012. All rights reserved.

This is a common question.  It’s often desirable to have a table of timing for peak stages and flows for dam breach models.  This allows you to track the arrival of the flood wave at all locations downstream of the dam.  However, the typical output plots in HEC-RAS are not very helpful in providing this information.  You could look at each cross section’s stage and flow hydrograph, and pick off the time for the peaks, but this can be very tedious and time-consuming.  There is a much faster way to get this information using the DSS Viewer in HEC-RAS.

Go to the DSS viewer on the main RAS window.
image
Once there, filter the records as follows by clicking in the blank cell at the top of each column and selecting what you want to see from the dropdown box:

Part A: Select the Reach you want to look at
Part B: Leave Blank
Part C: Select LOCATION-TIME
Part D: Leave Blank
Part E: Select MAX STAGE or MAX FLOW
Part F: Select the Plan you want to view.

image
Once you have the record you’re interested in, double click it in the filter table so that it is brought down to the list box at the bottom. Then highlight the record in the list box and click “Plot/Tabulate Selected Pathname(s). You should see a graph that plots out the Simulation Time for Max Flow or Stage for every cross section in the selected reach.

For peak stage…
image


For peak flow…
image
image

Within the DSS Plot window, select the “Table” tab to see tabular output.
image