Wednesday, September 30, 2015

Maximum Release based on Time of Year and Pool Elevation

This post was developed to demonstrate the use of IF statements to set a maximum release based on time of year and pool elevation.  I use a simple one reservoir model to demonstrate this.


I have one outlet at the reservoir with a capacity of 3,000 cfs.  I have 500 cfs of inflow coming into the main stem, into the upstream tributary, and into the downstream tributary.  I use null routing for simplicity.  This gives a constant of 1,000 cfs coming into the reservoir.  


The release requirements are as follows:

From January to June, release a maximum of 1,000 cfs if the pool is >= 82 feet and release a maximum of 700 cfs if the pool is < 82 feet.  From July to December, release a maximum of 1,000 cfs if the pool is >= 83 feet and release a maximum of 600 cfs if the pool is < 83 feet.  I repeat these IF blocks in the Conservation pool.    

Note that you can also set a rule to release inflow by making the rule a function of a model variable and selecting the inflow into the reservoir as the model variable.       



The figure below shows the development of the IF statement to define the time period from 01Jan to 30Jun.



The figure below shows the development of the IF statement for the pool being greater than or equal to 82 feet.  


The figure below shows the development of the 1000 cfs maximum rule.  


The figure below shows the results of the simulation.  The pool starts at the top of conservation.  With 1,000 cfs of inflow, the release is limited to 700 cfs from January through June when the pool is less than 82 feet.  This causes a rise in the pool elevation since inflow exceeds outflow.  Once the pool is at 82 feet, a release of 1,000 cfs is allowed.  Since this equals inflow, the pool is steady.  

On 01 July, the release is limited to 600 cfs when the pool is less than 83 feet.  It rises rapidly to 83 feet at which time, the maximum allowable release becomes 1,000 cfs.  Since this equals inflow, the pool once again is steady.  



Monday, August 10, 2015

How to Develop a Working Model

The previous blog posts showed specific applications using the HEC-ResSim software.  This post will show the creation of an HEC-ResSim model taking the reader through the Watershed Setup module, the Reservoir Network module, and the Simulation module.

The initial model development will be that of a flow through model.  It is recommended that the initial model setup be a flow through model to test the connectivity of the stream network and the overall behavior of the initial model setup.

A flow through model consists of the following model characteristics:

1.)  No rules of operation are entered into the model
2.)  A constant inflow is applied at the upstream ends of the main stem and all tributaries
3.)  The reservoirs are set to the top of the conservation pool and are releasing inflow in the lookback period.
4.)  The routing is set to null routing.

Once the results of the flow through model verify the connectivity and behavior of the model, additional inflow points with correct inflows, updated rules of operation, updated lookback values, and updated routing information can be incorporated.

Step 1:  Create a New Directory

For this example, I created a new folder on my local drive titled, "building a ResSim model".


 

Step 2:  Create a New Model

Go to Tools > Options.  Select the Model Directories tab.  Select Add Location.  Find the directory that you created in Step 1 and give the location a name.  The name for this example is "Sample Build of ResSim model".


Go to File > New Watershed.  Give the watershed a name and description.  Select location name.  Select units.  Select time zone.



Step 3:  Draw Schematic in Watershed Setup

Stream alignments can be imported from a GIS shapefile, but for this example, the alignment will be drawn in.  The stream is drawn first and then the reservoirs and computations points are added. Streams and reservoirs are drawn from upstream to downstream.

In this schematic, there is a main stream with a single reservoir.  There are tributaries coming in to the main stream both upstream and downstream of the reservoir.  I added the computation points named point 1 and point 2.




Step 4:  Create and Save Configuration

Go to Watershed > Configuration Editor.  The name given to the configuration is "sample build". The time step is 1 hour.



With the Watershed Setup completed, the Reservoir Network is then developed.  In the Reservoir Network, the physical and operational data is input.


Step 5:  Create the Reservoir and Dam Physical Data

Select the Reservoir Network module.  Create a new network.



Right click on the reservoir and select Pool.  Enter the elevation-storage data for the pool.  Elevation-area data is needed for evaporation.  It is left out of this example since we are ignoring evaporation for simplicity.


For this example, we will code one controlled outlet with a release capacity of 1,000 cfs for all elevations.  Right click on Dam at main stream and select "Add controlled outlet".


Step 6:  Create the Reservoir Operational Data

Go to Operations > New.  Since we are developing a flow through model for testing, no rules are entered at this time, only the zone elevations.  For this example, I put in elevations for top of flood control (75 ft), top of conservation (50 ft), and top of inactive (25 ft).


Step 7:  Create the Routing Reaches

Before drawing the routing reaches, I recommend adding junctions to the confluence of the tributaries and the main stem.  In the schematic below, I added the following junctions: "us trib and main" and "downstream trib and main".  Note that junctions 6, 7, and 8 were added automatically when I created the reaches.  Reaches are drawn from junction to junction upstream to downstream.  The computation points, "point 1" and "point 2", become junctions in the Reservoir Network module.  The default routing method of Null is used in the flow through model.  

  

Step 8:  Create the Inflow DSS File

For the flow through example, create a single dss file with a constant 500 cfs of inflow.  This will be applied to the upstream end of the tributaries and the main stream.  

Open HEC-DSSVue.  Create a new DSS file in your shared sub-directory.  



Under data entry, select "Manual Time Series".  Enter the pathname parts with the time series increment.  This data set is being created with a 1-hour increment.  Use a start date and end date that will cover the entire simulation including lookback.



Step 9:  Create Alternative

Go back to ResSim and create the alternative.




Set lookback elevation to top of conservation (50 ft) and the lookback release to the inflow (1000 cfs).  These numbers will cause ResSim to hold top of conservation by releasing inflow.  This will help test the proper functioning of the model before moving on to adding rules, routing parameters, etc.  


Select flow through as your operations set.



Select upstream junctions in the model and indicate that inflow is coming in at these locations.  The 1.0 factor means that the inflow from the DSS file will not be increased or decreased.


Select the DSS filename and path for the three inflow locations.  




Finally, set time step to 1 hour under Run Control.


Step 10:  Create and Run Simulation

Select Simulation > New.  The lookback period is to ensure that model locations are populated with data once the simulation begins.  You need to make sure that your lookback period and simulation period are covered by the data in your DSS file.  Once this is complete, run your simulation.



Step 11:  Review Results

I first look at the flow into the reservoir (Junction CP1).  This inflow should be 1,000 cfs since I have 500 cfs coming in at Junction 6 and Junction 7.


Since the dam has the capacity to pass the inflow and there are no rules of operation, I expect to see the pool elevation remain constant at top of conservation (50 ft) and the outflow to be 1,000 cfs.

  

The junction, "Point 1", should have a flow a 1,000 cfs since that is being passed from the dam and there are no local inflows between the dam and "Point 1".


The junction, "Point 2", will have a local inflow of 500 cfs from the downstream tributary giving a total flow of 1,500 cfs when combined with the outflow from the dam.


At this point, we should feel comfortable that the model connectivity seems correct and that the behavior is what we would expect.  New inflow locations, new operations sets with rules, and new routing parameters can be added.

To show a simple example, the flow through operation set will be duplicated and re-named max release.  In this operation set, a maximum release rule of 750 cfs will be added.


The alternative named flow thru will be saved as "max rel".  The operations set under the operations tab will be changed to max release.


Since the dates of our simulation are staying the same, we can add the max rel alternative to Jan-Feb 2015 sim and uncheck flow thru.


Now, when the simulation is computed, there is a rise into the flood pool since the rule is limiting the maximum release below the inflow.


It is advisable to build ResSim models in this step by step method and to observe the results after each addition to the operational rules or changes to other parameters.  It makes debugging the model much easier.

One final point is that this model was developed in English units.  By selecting View > Unit System in the simulation module, the results can be viewed in SI.






Wednesday, June 10, 2015

Water Supply Yield Analysis

This example will demonstrate a simple yield analysis computation in ResSim for a single reservoir. The model consists of a single stream with one reservoir.  The only inflow point is at the upstream junction.  The yield analysis is concerned with the minimum flow at the junction, "downstream compute point".  For ease of computation, null routing is used in the routing reaches.      



The elevation-storage table for the pool is shown below.  I have set the top of conservation pool at elevation 50 ft.  This gives us a storage value of 200,000 acre-ft.  I have set the top of the inactive pool at elevation 25 ft.  This gives us a storage value of 100,000 acre-ft.  So, the total conservation pool is 100,000 acre-ft.  




There is one rule governing operation of the reservoir.  This rule requires a minimum release of 20 cfs at the junction, "downstream compute point".





This is the inflow hydrograph that I developed for this example.  The flow varies from 500 cfs to 25 cfs.  So, this should inform us that the yield of the reservoir will be greater than 25 cfs since we have 25 cfs coming into the reservoir.  Note that I neglect evaporation and other losses in this example.  It should also inform us that the critical period will begin in 2011 and end in 2013.  



 In the alternative editor, I specify that I am performing a yield analysis.



I select the demand rule as the minimum flow at the downstream location.  Recall that it was set to 20 cfs.  This will be the initial estimate for ResSim.  The tolerance is set to 5 cfs.  This will be explained in the results.  The tolerance for the storage lower limit is 1000 acre-ft.  This will also be covered in the results discussion.  



For the yield analysis, I used the bisection method.  The trial factor for the first iteration is 1.  This means that it uses the value that is currently in the rule, which is 20 cfs.  The simulated minimum storage is 200,000 acre-ft since it never leaves the top of conservation.  There is enough inflow to hold top of conservation and supply the downstream demand.  Since it does not get below 101,000 acre-ft (bottom of conservation plus storage tolerance of 1,000 acre-ft), it fails the storage convergence test.

For the next trial, the initial estimate of 20 cfs is doubled.  We see that the simulated minimum storage is in the conservation pool since it is below 200,000 acre-ft.  However, it is greater than 101,000 acre-ft so it fails the storage convergence test.  We also notice that 80 cfs fails the storage convergence test, but it is much closer to the 101,000 storage convergence value.

ResSim then tries 160 cfs.  This time it passes the convergence test.  Notice, however, the date of the minimum storage value is 04April2012.  This reaches the minimum value before the critical period ends.  At this point, ResSim checks to see if it can meet the flow tolerance of 5 cfs for the remainder of the critical period.  Basically, can it meet at least 155 cfs for the rest of the critical period.  It is unable to do this so it fails the flow convergence test.

ResSim continues its test by using values between the previous test and 80 cfs since it knows that 80 cfs put the minimum pool above its storage target.  ResSim discovers that using 85 cfs gives a minimum pool elevation on 15July2013.  This is very close to the end of the critical period, however, it is unable to maintain 80 cfs for the remainder of the critical period.  Finally, it tries 82.5 cfs, which passes both the storage convergence and the flow convergence tests.





Thursday, May 28, 2015

Modeling of a Hydropower System with Pumpback

This example demonstrates the modeling of pumpback in a hydropower system.  For this model, there are two reservoirs.  The first is the main reservoir, which contains a hydropower plant and a pump.  The lower reservoir is used for storage and pumpback into the main reservoir.  

The inflow into the system occurs at the upstream junction.  For this simulation, a constant inflow of 1,000 cfs is used.  Power is generated from the main reservoir during two time periods throughout the day.  In the late night / early morning hours, water that is stored in the pumpback reservoir is pumped back up to the main reservoir.  Basically, this is trying to simulate hydropower generation during peak periods and pumpback during low demand periods.  



The next image shows the modeling of the pump at the main reservoir.  Notice that there is a minimum tailwater of 20 feet and a maximum head differential of 200 ft.  This specifies the limits of the pump's capabilities.  In other words, it can't pump if the tailwater has a stage lower than 20 feet, and it can't pump if the head differential exceeds 200 feet.  Also, notice that the capacity of the pump is 3,000 cfs.


Remember that a tailwater definition needs to be added for a power plant and also for a pump.  In this case, the tailwater is simply set to a constant elevation of 40 feet.


For the operational data at the main reservoir, I specify two rules in the conservation zone.  The first rule is a power generation rule.  I am using a plant factor of 100% for the entire conservation zone.  This means that the entire generating capacity of the power plant is available anywhere in the conservation zone.



The next image shows the power generation pattern.  I have power being generated for 0600 hours to 1000 hours and from 1400 hours to 1900 hours.


Recall that the intent of the example was to have power being generated during a morning and afternoon peak.  The pumpback occurs in the overnight hours from 2300 hours to 0300 hours.  In the rule shown below, I have specified that the full pump capacity be used, and that the source of the pumping is the pumpback reservoir.


I added one simple minimum release rule from the pumpback reservoir.  This ensures that at least 10 cfs will be released.



The image below is showing the pool elevation at the main reservoir in the top plot and the release and pumpback in the bottom plot.  In the bottom plot, the green is showing the release from the power plant, and the red line is showing the pumpback into the main reservoir.  Throughout this entire simulation, the pool is in conservation.

Notice that during times of power generation that the pool elevation is declining since the release exceeds the 1,000 cfs inflow.  During times of no generation and no pumping, the pool is rising due to the inflow.  During times of pumping the pool rises faster since there is the combined effect of the upstream inflow along with the pumping into the reservoir.



The next image shows the impacts at the downstream reservoir.  The top plot shows the pool elevation.  The bottom plot shows the inflow (dark solid line), the outflow (green line), and the net inflow (dark dashed line).

When the upstream reservoir is generating, the inflow into the downstream pool from this generation causes the pool to rise.  When there is no generation and no pumping, the inflow into the pool is zero and the outflow is very small at 10 cfs.  The pool is essentially flat during these times.  When there is pumping from this reservoir, the net inflow goes negative and the pool elevation decreases.