Wednesday, September 30, 2015

Transect for Extracting Flow in a 2D Area

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

*Update:  Version 5.0.2 now does flow transects in RAS Mapper with profile lines.  No longer necessary to use a 2D Area Connection to do this.

A very common output request in 2D modeling is for flow over (through) a transect line.  HEC-RAS 5.0 does not have a specific tool for extracting flow data along a line in a 2D area, however it CAN be done.  Here’s how you do it.
Inside your 2D area, draw a 2D Area Connection where you would like to extract flow.  In the figure below, I’ve drawn my 2D Area Connection line from bottom to top, which represents left to right, looking in the downstream direction. 
image
Notice that with the completely orthogonal cell orientation, but with a skewed 2D Area Connection line, the black and red striped connection line is “jagged”, following cell faces between the connecting cells.   To fix this, we need to use a breakline.  You could draw a break line on top of the 2D Area Connection (click the 2D Area Break Lines button on the top of the Geometric Data window), however, HEC-RAS also has a short cut for putting breaklines on 2D Area Connections.  If you right click on the 2D Area Connection (I’ve named if “Flow Line”), you’ll see an option to “Create 2D Flow Area Breakline”.  Select this for quick cell re-orientation around the 2D Area Connection Line.
image
image
Now you’re ready to enter data to the 2D Area Connection that you’ll use for extracting flow.  Click the SA/2D Area Conn button on the left side of the Geometric Data window. 
Make sure you connect “From” and “To” to the same 2D flow area.  Then choose “Normal 2D Equation Domain”.  This will force RAS to use the same 2D St. Venant equations over the terrain under the 2D Connection line as if the connection line wasn’t there.  BUT…you still have to define the Structure Type as a Weir and provide station-elevation data to define the crest of the weir, even though RAS will not use it.  Maybe this gets fixed in a later version.  HEC makes this easy though as you can extract the terrain profile from the 2D Connection cutline by clicking the button “Terrain Profile” as shown below.  Just copy and paste the terrain profile into your station-elevation table and you will  have defined a “zero-height” weir.  I guess it’s possible to use any crest definition, since RAS shouldn’t use the weir equation-it will use the normal 2D equation domain, but I haven’t tried it. 
image
Now you are ready to compute.  After computing, go to the Stage and Flow Hydrographs output window.
image
Make sure you select Type…Storage Area Connections (yes, it is technically an SA/2D Area Connection, but HEC hasn’t gotten around to renaming this yet in this window).  Now you can see the flow hydrograph for the flow line you’ve drawn.  You can check, but you’ll see the results are exactly the same as before including the flow line.

image

22 comments:

  1. In using this method, the weir created from copying the table is slightly lower than the cells that surround them in some locations….leading to an error when the model is run. However, when I add about 0.007 to each elevation value, then it runs well. Perhaps this is a rounding issue because the table is only up to 0.01?

    ReplyDelete
  2. Hey Chris,

    I'm having some issues getting the hydrograph outputs for the 2D storage areas. Is there some setting I'm missing to turn on storage of that output? I've used this in other models and it's worked before. The one I'm currently working on has two 2D area connections with the grid aligned to them and when I run the model, they produce no results in the Stage and Flow Hydrographs output window or in the DSS files.

    Any thoughts?

    Thanks

    ReplyDelete
    Replies
    1. 2D areas do not get stage and flow output hydrographs. There's just too many cells which can all potentially have different stages and flow. If you would like to define a transect line inside of your 2D area where you can get stage and flow hydrograph output, read this post: http://hecrasmodel.blogspot.com/2015/09/transect-for-extracting-flow-in-2d-area.html

      If you want to get stage for an individual cell, you can do that by highlighting the 2D Flow Areas layer in RAS Mapper under your Results and then right-clicking on the cell you are interested in. Then look at your time-series plots.

      Delete
  3. I apologize. I meant the 2D Area Connection isn't yielding a hydrograph for some reason. Not the 2D storage area. As I said, I've used this transect method before and it's worked well. For this particular model, I run the unsteady model and get results for everything but the 2D area connections that I'm using as transects.

    Like I said, the model has two 2D area connections, but it doesn't store results for them (I've checked the DSS and neither of them are saved there).

    ReplyDelete
    Replies
    1. No worries. But with that, I'm stumped. If the 2D area connection is properly connected, you've run through the simulation (without crashing), and flow is going over or through it, I can't see why it wouldn't have a stage and flow hydrograph available. I would try saving, closing RAS, reopening RAS, and rerunning. It's a stretch, but I can't think of anything else at the moment. Let me know if you figure it out.

      Delete
    2. I tried closing and re-opening, and unfortunately it didn't work. It's very odd. We're stuck too.

      Thank you though. I'll post again if we work it out.

      Delete
    3. Can you send me your dataset? I'd be happy to take a look and see if I can make any sense of it. Let me know which version you are using also.

      Delete
  4. Chris,

    I put two 2D Area Connections in my model as described in your post “Transect for Extracting Flow in a 2D Area”, but when I attempt to run the model I receive an error. The error calls out one of the 2D Area Connections and states “there is an error with the model data. Error Accepting the processor files.” If I delete one of the 2D Area Connection, then the model runs fine. Any ideas as to why I’m getting an error when I have two 2D Area Connections?

    Thanks,
    Nathan

    ReplyDelete
    Replies
    1. Nathan-

      I'm not sure. I haven't actually tried 2 in one 2D area yet. It's possible there is some bug that only allows 1. Try deleting the bad one and starting over with a new 2nd one and see if it works. Otherwise, I'm not sure what the problem could be.

      Delete
  5. Hello, How do i include the transects and other connections in the standard output tables. I am trying to extract velocity at different transects.

    ReplyDelete
    Replies
    1. You can try opening the standard table "Connection with Culverts" or "Connection with Weir and Gates".

      Delete
  6. I have tried that but the table is empty.

    ReplyDelete
    Replies
    1. I am running a model with only 2D (no 1D)

      Delete
  7. I have added a few SA/SD locations within my 2D geometry, as instructed above. After I save geometry, and compute. the program freezes during Geoemtry Processing. There error in red says "review your data at this location (ie the SA/SD location) for completeness and consistency".

    ReplyDelete
  8. I have added a few SA/SD locations within my 2D geometry, as instructed above. After I save geometry, and compute. the program freezes during Geoemtry Processing. There error in red says "review your data at this location (ie the SA/SD location) for completeness and consistency".

    ReplyDelete
    Replies
    1. Go through the steps in the manual for setting up a 2D area. Make sure you have not missed anything.

      Delete
  9. You said, "Version 5.0.2 now does flow transects in RAS Mapper with profile lines." Please add a link so we can see how to access this important improvement.

    ReplyDelete
    Replies
    1. Now we're up to 5.0.3. There's a link to it on the side bar on The RAS Solution.

      Delete
    2. Chris, I believe that HEC-RAS 5.0.3 measures flow along the jagged edges of the cells along the profile line drawn in a 2D flow area and not directly along the profile line itself. I think that there still is need for 2D flow area breaklines (and storage area connection) as previously-described if you want flow directly along a profile line. I can send a screenshot of how HEC-RAS shows both the profile line and the jagged line along cell faces after you right-click on the profile line and select "Time Series" --> "Flow". A funny thing is that HEC-RAS shows only the profile line when right-clicking and getting a plot of WSE.

      Delete
    3. Bill, I'm not surprised by that. My guess is that RAS extracts flow through cell faces. If those faces don't line up on the profile line you draw, then you get the "jagged line" output. I assume you could still forego the old method of using a SA/2D area connection by just drawing a breakline where you have your profile line drawn.

      Delete
  10. In the table on the right side of Stage and Flow Hydrographs are reported HW and TW max values. To which cell are they related?

    ReplyDelete