Software Exercise 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Exercise 2: Unsteady flow in a channel with a weir

We will now look at a case with an unsteady input flow, of the type that might result from a storm. The channel will be much longer than in the first exercise, and we will also add a weir approximately half way down the channel. The basic cross-section will be the same as in the first exercise.

Geometry: channel
In HEC-RAS open the project you used in the first exercise (File > Open project). Immediately save the project with a new description and file name (File > Save project as). This will automatically copy a new set of related files (plan, geometry and steady flow) so you wont overwrite your original project. To make the channel longer, use Edit > Geometric Data to bring up the Geometric Data window. Now delete the existing interpolated cross sections (Tools > XS interpolation > Between 2 XSs > Delete existing interpolated XS, and Close) Back in the Geometric Data window, select the upstream cross-section and click the Cross Section Editor Increase the Reach Lengths to approximately 20 km (use a simple multiple of the inverse slope, as before), and click Apply Data Now edit the downstream cross section, reducing the elevations (Options > Adjust elevations) to give the correct slope. Remember it will already be some height below the upstream cross section (e.g. in my example 3 m, and I increased the length to 25000 m, so I only need to reduce the height by 97 m). Apply data and close the Cross section window Back in the Geometric Data window, use Tools > XS interpolation > Between 2 XSs to interpolate a new set of cross sections. Close to go back to the Geometric Data window, and save the Geometric Data

Steady flow
At this point its worth checking the geometry with a simple steady flow. Run a steady flow analysis with just a single flow rate that you know produces a sub-critical flow within the channel. You should be able to do this just be editing your existing Steady Flow Data (from the Edit menu on the HEC-RAS main window) and using your existing Steady Flow Analysis plan (from the Run menu on the HEC-RAS main window). Look at the results, in particular zooming in on the profile near the downstream end.

Geometry: Weir
Now we will insert a weir about half way down the channel. In the Geometric Data window, zoom in (View > Zoom in) to a point about half way along the channel so that you can see the River Stations for the interpolated cross sections. You need to choose a River Station number that lies between the two cross-sections where you want to insert the weir. The actual position relative to the upstream cross section will be determined later, the River Station just relates to the ordering of the various things along the river.

In my case, I will use a River Station of 50.0, which will put the weir in between the sections labelled 49.906 and 50.005. Click on Inline Structure to bring up a blank Inline Structure Data window. Click on Options > Add an inline structure and input the River Station you want for the weir. The River Station will then appear in the new window, as will the label of the upstream cross section and a plot of the cross section. You can enter a description of the structure. Now click on the Weir/Embankment button.

In defining the weir shape, the software automatically fills in the region below the levels you define with a weir, if the level is above the ground, and ignores it if it is below the ground. Thus you only need to define a weir height and use (horizontal) stations well to each side of the channel. Pick an elevation that is about half the channel depth.

Distance is distance from the upstream cross section. (Number needs to be smaller than distance to next section.) Width is actually the width of the structure in the downstream direction. Only used in producing visualisation. Leave the weir coefficient at its default value (and leave the weir shape as Broad Crested) Station here is the horizontal coordinate on the cross section (not the River Station).

150 m

250 m

In the example above Ive picked the horizontal locations 150 m and 250 m as being well to each side of the channel, and an elevation of 50 m. Zooming in on the plot in the Inline Structure Data window (View > Zoom in), you can see the weir has simply filled in everything in the channel below an elevation of 50 m.

Click on Apply Data, then close the Inline Structure Data window Finally Save the new Geometry in the Geometric Data window (File > Save Geometry Data).

Steady flow: weir


Again run a simple steady low flow through your new geometry with a weir. Look at the weir cross section, and the profile in the neighbourhood of the weir.

We will use this as the base flow in the unsteady calculations.

Unsteady flow boundary conditions


We will start by using the unsteady analysis part of the software to run a steady flow. On the HEC-RAS main menu use Edit > Unsteady Flow Data to bring up the window below.

The upstream boundary condition is a Flow Hydrograph. Leave all the defaults in the Flow Hydrograph and simply input a constant flow rate (the one you used in the Steady Flow above). It will automatically interpolate if you leave blank entries, so just enter the flow rate you want at 00:00 and at e.g. 48:00 (scroll down), then click on Interpolate Missing Values. Finally click on OK.

The downstream condition is the same Normal Depth condition you used in the first exercise (with the same slope). Highlight the downstream location, click on Normal Depth and enter the slope value.

Now click on Initial Conditions and input an Initial flow distribution (the same steady flow rate as before). Click on Apply Data Finally use Save Unsteady Flow Data in the File menu.

Unsteady analysis: steady flow


Back in the HEC-RAS main window, click on Unsteady flow analysis in the Run menu to bring up the Unsteady Flow Analysis window. First put in start and end dates/times that cover a period no longer than the length of the input flow hydrograph (perhaps start with 24 hours). The actual times and dates dont matter, so you could, for example start at 00:00 on the 1st January 2000. The unsteady analysis can generate seriously big files, make sure you work in a directory where this is OK (you can always copy main results, geometry files, plans, etc to your P: drive).

Set the Computation Interval to 4 minutes, and both the Hydrograph Output Interval and Detailed Output Interval to 12 minutes. Next click on Stage and Flow Output Locations in the Options menu:

In Node Types make sure both Cross sections and Inline structures are checked (click on Node Types again), then click on the arrow to transfer all the cross sections and the weir location. Finally click on OK. Back in the Unsteady Flow Analysis window, Save the Plan (File menu). Now check the Geometry Preprocessor box and click Compute.

This will produce a new window, but should run without problems. Now uncheck the Geometry Preprocessor box and check BOTH the Unsteady Flow Simulation and Post Processor boxes. Click Compute.

This will take a little longer to run (perhaps a few minutes). Look at some of the output, e.g. below is a Stage and Flow Hydrograph (main HEC-RAS window, View menu).

Note that there is some problem in the early part of the flow, with a higher flow rate than there should be. Adjusting the computation parameters may improve this, but it is actually very common to get problems when starting an unsteady flow analysis. However, note the flow settles down after a few hours of simulation. We can take this steady flow from a later time and use that in our initial conditions. Look at output from different locations to decide how long it takes for the steady flow to settle down. Back in the Unsteady Flow Analysis window, select Output Options from the Output menu to give the following window: Check Write Initial Condition file Select a time to write the file (Ive used 12 hours) Click on OK

Now run the Unsteady analysis again. The output will look just the same as before, but now youve written an initial condition or restart file. To use this file, go back to the HEC-RAS main window and select Unsteady Flow Data from the Edit menu. In Initial Conditions: Select Use a Restart File Select the correct file Click on Apply Data Save Unsteady Flow Data

We dont want to keep on writing Restart files, so back in the Unsteady Analysis window, select Output Options from the Options menu and unselect Write Initial Conditions File. Finally, run the Unsteady analysis (check Unsteady flow simulation and Post processor and click on Compute). Now if you look at the output you should get something like:

Note the scales: the oscillations are now very small.

Unsteady analysis: unsteady flow


Now replace the inflow hydrograph with one that is similar to the sketch below. Q

time Main features: Steady flow before and after flood equal to the flow you used to get the Initial Conditions File (use the one youve already created). An initial steady flow for about two to three hours. Rise to a peak flow over about two to three hours. Ideally, peak flow big enough to flood outside the channel (based on your work in Exercise 1), but see below. Drop back to steady flow over a longer period than the rise time. By using the Interpolate Missing Values feature in the Boundary Conditions you should only have to type in values where the slope of the hydrograph changes. Try to use a large peak flow, but if you know the flow misbehaves past a certain flow rate, then limit your maximum flow rate below that. If you notice that the computation appears to be going wrong (e.g. odd oscillations in the flow rate or peaks in flow rate above the input maximum) then again reduce the peak flow. You could experiment with some of the computation parameters (e.g. reduce the Computation Interval) to see if that improves the results, but detailed consideration of numerical instabilities and other computational problems is beyond the scope of this exercise.

Results and write-up


Look at the Stage and Flow Hydrograph at different locations. Also look at cross sections, and perhaps the 3D view, especially around the weir, and any other information you think useful. In your report, explain what you did, the weir, the steady flow, the unsteady flow, the input hydrograph you used and include any useful plots. You should particularly consider how the shape of the hydrograph changes as you move downstream. How does the peak flow change? What time does the peak flow reach different locations, how quickly does the flow rise and fall at different locations? Comment on the ease of use of the software, any problems, etc.

You might also like