skip to main content
Reservoir Diversions
Diversions are made directly out of a reservoir to meet a demand. Demands can be a water user or another reservoir. Each demand can draw from multiple reservoirs and each reservoir can act as a source for multiple water users or demand points.
Model Setup
A diversion consists of a Reservoir, Diversion object, and Water User. In the simplest case, there is one of each as shown in Figure 3.11. A specific linking structure must be employed between the reservoir, diversion object, and water user objects. This can only be set up after the appropriate methods have been selected. Thus, the method selections are described first, then the linking structure is revisited. Each of these objects must have methods selected as described in the following sections.
Figure 3.11  Sample diversion from reservoir setup
Note:  If the reservoir is disabled and is set to Pass Inflows, no diversions are made. See Diversions Based on Disabled Reservoirs for details.
Reservoir Methods
There are no required method selections on the reservoir objects as the Diversion slot exists on all reservoirs. In previous versions, it was necessary to select the Available Flow Based Diversion from the Diversion from Reservoir category. This is no longer necessary nor encouraged as the RPL function ComputeReservoirDiversions calculates the available flow, which is different than the Available for Diversion slot used in this method.
Diversion Object Methods
On the Diversion object, the Solve Given Outflow should be selected from the Diversion Object Solution Direction category. This tells the object that the outflow will be set and cause the object to dispatch. See Solve Given Outflow in Objects and Methods for details on this method.
Also, the Available Flow Diversion method should be selected from the Available Flow category. This category adds the Max Diversion and Min Diversion slots which must be user input.
Water User Methods
On the water user, the user must select a method from the categories summarized in Table 3.2
 
Table 3.2   
Category
Method
Section in Objects
Return Flow
Fractional Return Flow
Fraction Return Flow Input
Input Fraction, Zero Fraction, or Periodic Fraction
Diversion and Depletion Request
Use either Input Request, Periodic Diversion Requests, or Reservoir Level Lookup.The last one allows the Diversion Request to be based on the operating level of a reservoir.
Multiple Supply Sources
Multiple Supply Reservoirs. Even if there is only one source, this adds the Supply From Reservoirs slot which will be used in the linking step below. It also adds the Maximum Delivery Rates which specifies the maximum flow that this water user can take.
Computational Subbasin Methods
A computation subbasin must be defined that contains all of the reservoir, diversion object and water users that are part of the system. Typically, this can be the same subbasin used for flood control. On this subbasin, the user should select the Operating Level-Based method from the Diversions from Reservoirs category; see Operating Level-based in Objects and Methods for details.
Linking Setup
Figure 3.12 shows the linking setup that must be used. The Diversion slot on each reservoir is linked to the Diversion slot on the Diversion Object.
Note:  Do not link Reservoir.Available For Diversion to DiversionObject.Available For Diversion as this unnecessary and can lead to excessive dispatching.
The demands are represented by the Water User objects. Thus, the Supply From Reservoirs slot on each Water User is linked to the Multi Outflow slot on each Diversion Object that can act as a supply for that demand.
Figure 3.12  Schematic diagram for ComputeReservoirDiversions function
RPL Implementation
A rule will need to be created for each subbasin that has reservoirs that divert. Typically, the same basin used for flood control can be used. In the rule, a predefined RPL function, ComputeReservoirDiversions, is used to compute the diversion from each reservoir and the supply to each water user. The function takes a computational subbasin as an argument. See ComputeReservoirDiversions in RiverWare Policy Language (RPL) for details.
Figure 3.13 shows a sample rule that meets the Reservoir Diversion demands using the computational subbasin name FloodBasin. The execution constraint forces the rule to execute only once.
Figure 3.13  Sample reservoir diversion rule
ComputeReservoirDiversions Function—Detailed Description of Logic
When the rule executes the ComputeReservoirDiversions predefined function, the following process occurs. See ComputeReservoirDiversions in RiverWare Policy Language (RPL) for details on the function.
Each Water User in the subbasin is visited (the order does not matter since these objects are diversions and have no upstream/downstream orientation). For each Water User, the following steps are taken.
1. A list of supplying reservoirs is generated based on the links to the Supply From Reservoirs slot. The links are followed to the diversion object then to the reservoir.
2. The reservoirs are ranked by Operating Level (highest level first). Reservoirs below the bottom of the conservation pool are ignored.
3. Loop through each reservoir. If the Limit by Reservoir Level method is selected (on the Water User object), and the Demand Reservoir has a higher level than the supply reservoir, move on to the next Water User object. If the Demand Reservoir is in the flood pool, skip ahead to the next Water User object.
4. The appropriate subslot (corresponding to the link to the current reservoir in the list) is computed as the minimum of the following:
– Diversion Requested
– Maximum Delivery Rate corresponding to that subslot (in the Maximum Delivery Rates table slot on the Water User)
– The amount of water that would draw the reservoir down to the bottom of the conservation pool
5. Each reservoir is visited until the Diversion Requested is met or there are no more reservoirs.
6. Move on to the next Water User object.
The reservoir levels are updated when moving to each water user object because multiple Water Users can divert from the same reservoir. Also, Remember, this computation is all done within the predefined function, no values on the workspace have been set.
The RPL function returns a list of slot, value pairs - the subslot and the value to be set on the subslot and also the Incoming Available Water slot and the total of all the subslots.
The rule sets the subslots on the Supply From Reservoirs slot and the Incoming Available Water slot. The Water User object can then dispatch Solve given Diversion Requested (given Diversion Requested and Incoming Available Water).
The Supply From Reservoir slot propagates to the Multi Outflow slots on the connected Diversion Objects. The Diversion objects solve for their Diversion slot Solve given Multi Outflow. The Diversion values are passed to the Diversion slot on the Reservoir object and the water is removed from the Reservoir.
Revised: 07/17/2020