skip to main content
Agg Diversion Site Water Quality
Water Quality
Agg Diversion Site Water Quality
The Agg Diversion Sites has water quality methods to model salt using either the Propagate Salt or Well Mixed Salt method.
For Sequential or No Structure configurations, the actual water quality work is done on the Water User elements. For Lumped configurations, the aggregate does the water quality solution.
Links are automatically created between Water Users within (and to) the aggregate when using the Sequential structure
User Methods
Following are descriptions of each user-selectable method on the Agg Diversion Site.
Agg Diversion Site Water Quality
The methods in this category specify the constituents and approach.
* None
No Water Quality is modeled and no slots are added.
* Propagate Salt
Salt is propagated to the elements. This method has no slots on the aggregate. When used, it automatically selects the Salinity method on water user elements. See “Salinity” for details.
* Well Mixed Salt
Salt is modeled using the Well Mixed approach. This method has no slots on the aggregate. When used, it automatically selects the Salinity method on water user elements. See “Salinity” for details.
Return Flow Salt
Following are the user-selectable methods in the Return Flow Salt category. These methods are used to specify how the Return Flow Salt Mass should be calculated. In other words, how much salt is picked up in the return flow from the diversion site.
* None
This is the default method in this category. It does no calculations and instantiates no slots. It is the only available method for the No Structure Agg Diversion Site. Each water user element behaves independently, but each automatically uses the Propagate Salt method.
* Lumped Salt
This method models additional salt added to a lumped Agg Diversion Site. This is the only available method for the lumped Agg Diversion Site when using the Propagate Salt method. It is one of four available methods for the Well Mixed Salt method.
Slots Specific to This Method
Diversion Salt Concentration
Type: Series Slot
Units: Concentration
Description: Salt concentration associated with the Total Diversion
I/O: Input, set by a rule, or propagated via a link
Diversion Salt Mass
Type: Series Slot
Units: Mass
Description: Salt mass associated with the Total Diversion
I/O: Output only
Salt Loading
Type: Series Slot
Units: Mass
Description: The additional salt that is to be added to the return flow.
I/O: Input or set by a rule. If not specified, no additional salt is added.
Return Flow Salt Mass
Type: Series Slot
Units: Mass
Description: Salt mass associated with the Total Return Flow
I/O: Output only: solved by dispatch and user methods
Return Flow Salt Concentration
Type: Series Slot
Units: Concentration
Description: Salt concentration associated with the Total Return Flow
I/O: Output only: solved by dispatch and user methods
If Salt Loading is valid:
(3.1)    
Otherwise:
(3.2)    
Return Flow Salt Concentration is computed from the Return Flow Salt Mass and Return Flow volume.
* Sequential Salt
This method models salt on a sequential Agg Diversion Site. This is the only available method for the sequential Agg Diversion Site using Propagate Salt. It does not do any calculations but instantiates slots that can be linked to upstream or downstream objects.
Slots Specific to This Method
Diversion Salt Concentration
Type: Series Slot
Units: Concentration
Description: Salt concentration associated with the Total Diversion
I/O: Input, set by a rule, or propagated via a link
Total Unused Salt Concentration
Type: Series Slot
Units: Concentration
Description: Salt concentration of the Total Unused Water
I/O: Output only
* Variable Salt Pickup
This method is available for Well Mixed Salt on a Lumped Agg Diversion Site. It executes the selected method in the Salt Pickup category: either Salt Pickup Concentration or Salt Pickup Mass. No other calculations are performed.
Diversion Salt Concentration
Type: Series Slot
Units: Concentration
Description: Salt concentration associated with the Total Diversion
I/O: Input, set by a rule, or propagated via a link
Diversion Salt Mass
Type: Series Slot
Units: Mass
Description: Salt mass associated with the Total Diversion
I/O: Output only
Return Flow Salt Mass
Type: Series Slot
Units: Mass
Description: Salt mass associated with the Total Return Flow
I/O: Output only: solved by dispatch and user methods
Return Flow Salt Concentration
Type: Series Slot
Units: Concentration
Description: Salt concentration associated with the Total Return Flow
I/O: Output only: solved by dispatch and user methods
Return Flow Salinity Pickup Conc
Type: Series Slot
Units: Concentration
Description: The additional salinity that is to be added to the return flow.
I/O: Optional input.
Type: Not Linkable
* Distributed Annual Salt Loading
This method is available for Well Mixed Salt on a Lumped Agg Diversion Site. This method is typically used on a 1‑Month timestep to distribute annual salt loads.
Slots Specific to This Method
Diversion Salt Concentration
Type: Series Slot
Units: Concentration
Description: Salt concentration associated with the Total Diversion
I/O: Input, set by a rule, or propagated via a link
Diversion Salt Mass
Type: Series Slot
Units: Mass
Description: Salt mass associated with the Total Diversion
I/O: Output only
Return Flow Salt Mass
Type: Series Slot
Units: Mass
Description: Salt mass associated with the Total Return Flow
I/O: Output only: solved by dispatch and user methods
Return Flow Salt Concentration
Type: Series Slot
Units: Concentration
Description: Salt concentration associated with the Total Return Flow
I/O: Output only: solved by dispatch and user methods
Percent of Annual Demand
Type: Table Slot
Units: Decimal
Description: A 12X1 table of the monthly fraction of annual diversion demand
I/O: Required Input: This slot requires a percentage for each of the 12 months to calculate the equivalent annual shortage.
Percent of Annual Mass
Type: Table Slot
Units: Decimal
Description: A 12X1 table of the monthly fraction of annual salt mass
I/O: This slot requires a percentage for each of the 12 months to calculate the monthly non-shortage salt mass.
Return Flow Salinity Pickup Conc
Type: Series Slot
Units: Concentration
Description: The additional salinity that is to be added to the return flow.
I/O: Optional input. If Return Flow Salinity Pickup Mass is input, this slot cannot be input
Return Flow Salinity Pickup Mass
Type: Series Slot
Units: Mass
Description: The additional salinity that is to be added to the return flow.
I/O: Optional input. If Return Flow Salinity Pickup Conc is input, this slot cannot be input
Method Details
The Distributed Annual Salt Loading method calculates the annual mass and monthly non-shortage return flow salt mass.
First, the method determines whether the return flow pickup salinity is specified as a concentration or a mass by looking at the input status of the two slots.
• Return Flow Salinity Pickup Conc
• Return Flow Salinity Pickup Mass
One or the other must be input and it must be input for the entire run. If neither is input or both are input, an error will occur.
The variable annual salt mass for the current year is calculated in January by summing each month’s Return Flow Salinity Pickup Mass or each month’s Return Flow Salinity Pickup Conc times the computed Return Flow Volume.
A monthly Non Shortage Salt Mass is calculated each month by multiplying the annual salt mass by the percentage for that month specified in the Percent of Annual Mass table. The monthly value is stored as a local variable, nonShortRFSaltMass, during execution of the method.
The method then converts Total Return Flow, and Total Diversion from a flow to a volume.
Next, the local variable concentrated is computed as follows:
(3.3)    
Note:  If Total Return Flow Vol is zero, concentrated is set to zero.
(3.4)    
The method then gets the Return Flow slot from the reach to which this Total Return Flow slot is linked. If Total Return Flow is not linked to a Reach, an error will be issues and the run will be aborted. On this reach, the method gets the Outflow and the minimum value from the Outflow. If Total Return Flow is zero and the reach’s outflow is less than the minimum value, Return Flow Salt Mass and Distributed Salinity Pickup Mass are equal to zero and the method exits.
Otherwise, if the Total Diversion Requested or Total Depletion Requested is less than or equal to zero or Total Diversion equals Total Diversion Requested, there is no shortage and Return Flow Salt Mass is set equal to the following:
(3.5)    
And Distributed Salinity Pickup Mass is equal to nonShortRFSaltMass.
Otherwise, the method computes the percent short, as follows:
(3.6)    
If the % Short is greater than 75%, Return Flow Salt Mass is set equal to concentrated times Total Return Flow Volume, and Distributed Salinity Pickup Mass is zero. Else, if the Percent of Annual Demand for the given month is zero, the equivalentAnnualShortage is zero. Otherwise, the equivalentAnnualShortage is computed by dividing the percent of shortage in a month’s diversion by Percent of Annual Demand (from the table) for the current month.
Finally, the Return Flow Salt Mass is set equal to the following:
(3.7)    
Distributed Salinity Pickup Mass is equal to the following:
(3.8)    
* Variable Salt Pickup with Debt
This method is available for Well Mixed Salt on a Lumped Agg Diversion Site. This method calculates Return Flow Salt Mass and Return Flow Salt Concentration based on a salt debt policy if it applies. This can be used to simulate Water Quality Improvement Projects (WQIPs). This method determines if there is sufficient salt in the river to satisfy the WQIP. If not, the amount of salt removal is set equal to the amount available. The Salt Debt slot is used to track the deficiency and the method will attempt to repay the debt in subsequent timesteps.
Slots Specific to This Method
Diversion Salt Concentration
Type: Series Slot
Units: Concentration
Description: Salt concentration associated with the Total Diversion
I/O: Input, set by a rule, or propagated via a link
Diversion Salt Mass
Type: Series Slot
Units: Mass
Description: Salt mass associated with the Total Diversion
I/O: Output only
Return Flow Salt Mass
Type: Series Slot
Units: Mass
Description: Salt mass associated with the Total Return Flow
I/O: Output only: solved by dispatch and user methods
Return Flow Salt Concentration
Type: Series Slot
Units: Concentration
Description: Salt concentration associated with the Total Return Flow
I/O: Output only: solved by dispatch and user methods
Salt Debt
Type: Series Slot
Units: Mass
Description: The debt (of mass) associated with the return flow salt
I/O: Output only, initial value is a required input
Return Flow Salinity Pickup
Type: Series Slot
Units: Concentration
Description: The additional salinity that is to be added to the return flow.
I/O: Output only
Method Details
If the Total Return Flow is zero, the Return Flow Salt Concentration, Return Flow Salt Mass and Salt Debt are set to zero and the method is exited.
The method then converts Total Return Flow, Total Diversion, Total Diversion Requested, and Total Depletion Requested from a flow to a volume (TotalReturnFlowVol, TotalDiversionVol, TotalDiversionRequestedVol, and TotalDepletionRequesetedVol).
Next, the local variable concentrated is computed as follows:
(3.9)    
Then, the method initializes the Return Flow Salt Concentration slot to be equal to concentrated. Set the current timestep’s Salt Debt equal to the previous timestep’s value. Calculate the local variables unshortReturnFlowVol and massRequested:
(3.10)    
(3.11)    
The method then gets the Return Flow slot from the reach to which this Total Return Flow is linked. If Total Return Flow is not linked to a Reach, an error will be issued and the run will be aborted. On this reach, the method gets the Inflow volume (reachInflowVol) and the minimum value from the slot Outflow Salt Concentration (reachOutSaltMin).
If the Diversion Salt Concentration is less than the reachOutSaltMin, then set Salt Debt equal to the previous timestep’s value plus the massRequested. If the new WaterQualitySaltDebt is less than zero, reset it to zero. Then go to Equation 3.18 or Equation 3.19 and finish the method.
Otherwise, the Diversion Salt Concentration is greater than or equal to reachOutSaltMin, the river has some of the salt that the WQIP needs, determine if is all or not. First calculate the estimated outflow volume (estOutVol), as follows:
(3.12)    
Compute the mass than can be returned (massThatCanBe) as follows:
(3.13)    
If massThatCanBe is greater than massRequested, the river can meet all of the WQIP and any excess can be used to repay the debt. If Salt Debt is positive, set Return Flow Salt Concentration equal to Return Flow Salinity Pickup and go to Equation 3.18 or Equation 3.19. Otherwise, Salt Debt is set to:
(3.14)    
(3.15)    
Else, massThatCanBe is less than or equal to massRequested, so meet part of the request and increases the debt.
(3.16)    
(3.17)    
IF concentrated is greater than zero, then
(3.18)    
ELSE
(3.19)    
Finally, set the salt mass as follows:
(3.20)    
Salt Pickup
This category is dependent on the Variable Salt Pickup method being selected in the Return Flow Salt category.
* Salt Pickup Concentration
This method determines the Return Flow Salt Mass as a function of Diversion Salt Concentration, Return Flow Pickup and Return Flow Volume.
Method Details
The method first converts Total Return Flow, and Total Diversion from a flow to a volume (TotalReturnFlowVol and TotalDiversionVol).
Next, the local variable concentrated is computed as follows:
(3.21)    
Note:  If TotalReturnFlowVol is zero, concentrated is set to zero.
If both of the local variables concentrated and TotalReturnFlowVol are less than zero, then Return Flow Salt Concentration equals the following:
(3.22)    
Else, Return Flow Salt Concentration equals:.
(3.23)    
At the end of this method, Return Flow Salt Mass is calculated as follows:
(3.24)    
* Salt Pickup Mass
This method determines the Return Flow Salt Mass as a function of Diversion Salt Concentration, Return Flow Pickup and Return Flow Volume. The user specified salt mass can be negative or positive and can add salt even when Return Flow equals zero.
Slots Specific to This Method
Annual Salinity Pickup Mass
Type: Table Slot
Units: Mass
Description: A table holding the Salinity Pickup mass for the year
Note:  This slot is not used in any calculations. It is strictly for user comparison purposes.
I/O: Input only
Annual Return Flow Volume
Type: Table Slot
Units: Volume
Description: A table holding the return flow volume for the year
Note:  This slot is not used in any calculations. It is strictly for user comparison purposes.
I/O: Input only
Return Flow Salinity Pickup Mass
Type: SeriesSlot
Units: Mass
Description: slot for salinity pickup mass
Information: user specified salinity pickup mass is entered in the slot.
I/O: Required Input
The method first converts Total Return Flow and Total Diversion from a flow to a volume (TotalReturnFlowVol and TotalDiversionVol). Next, the local variable concentrated is computed as follows:
(3.25)    
Note:  If TotalReturnFlowVol is zero, concentrated is set to zero.
The Salt Pickup Mass method first checks if Return Flow Salinity Pickup Mass is valid. If it is not valid, the run will abort and an error will be posted. If Total Return Flow equals zero, Return Flow Salinity Pickup and Return Flow Salt Concentration is set equal to zero and Return Flow Salt Mass is calculated as follows:
(3.26)    
If Total Return Flow does not equal zero, Return Flow Salinity Pickup is calculated as follows:
(3.27)    
Then, Return Flow Salt Mass is calculated as follows:
(3.28)    
Return Flow Salt Concentration is calculated as follows:
(3.29)    
Salt Removal Category
This category is available when Well Mixed Salt is used. The methods in this category model salt removed directly from a linked Reach.
* None
This is the default method. No slots are instantiated and no calculations are performed.
* Salt Mass Removal
This method allows you to specify a mass of salt to remove. Two links are required between the Agg Diversion Site and Reach. The Salt Mass Removal slots on both objects should be linked to each other, and the Salt Available For Removal slots should be linked.
Slots Specific to This Method
Salt Mass Removal
Type: Series Slot
Units: Mass
Description: The amount of salt that is removed from the linked reach
I/O: Output only
Salt Mass Removal Request
Type: Series Slot with Periodic Input
Units: Mass
Description: The mass of salt you would like to remove.
I/O: Required input
Salt Available For Removal
Type: Series
Units: Mass
Description: The maximum salt mass that can be removed from the linked reach without dropping below the specified minimum salt concentration (if solving downstream) or exceeding the specified maximum salt concentration (if solving upstream). The value in this linked slot will be solved for by the linked reach.
I/O: Output only
The method checks that both Salt Mass Removal and Salt Available For Removal are linked to a Reach. If they are not linked to a Reach, an error will be issued, and the run will be aborted.
Next, the method checks if Salt Available For Removal is less than zero and if so, sets it to zero.
(3.30)    
If massThatCanBeRemoved is greater than Salt Mass Removal Request, the river can meet all of the salt mass request. The Salt Mass Removal is set to:
(3.31)    
* Salt Mass Removal with Debt
This method allows you to specify a mass of salt you would like to remove. If it cannot remove all the salt, the debt is tracked and met at later timesteps. Two links are required between the Agg Diversion Site and Reach. The Salt Mass Removal slots on both objects should be linked to each other, and the Salt Available For Removal slots should be linked.
Slots Specific to This Method
Salt Mass Removal
Type: Series Slot
Units: Mass
Description: The amount of salt that is removed from the linked reach
I/O: Output only
Salt Mass Removal Request
Type: Series Slot with Periodic Input
Units: Mass
Description: The mass of salt you would like to remove.
I/O: Required input
Salt Available For Removal
Type: Series
Units: Mass
Description: The maximum salt mass that can be removed from the linked reach without dropping below the specified minimum salt concentration (if solving downstream) or exceeding the specified maximum salt concentration (if solving upstream). The value in this linked slot will be solved for by the linked reach.
I/O: Output only
Salt Debt
Type: Series Slot
Units: Mass
Description: The cumulative mass of salt that was intended to be removed but could not because it was not available.
I/O: Output only, initial value is an optional input or it is assumed to be zero
The method checks that both Salt Mass Removal and Salt Available For Removal are linked to a Reach. If they are not linked to a Reach, an error will be issued, and the run will be aborted.
Next, the method checks if Salt Available For Removal is less than zero and if so, sets it to zero.
(3.32)    
If massThatCanBeRemoved is greater than Salt Mass Removal Request, the river can meet all of the salt mass request, and any excess can be used to meet the debt. The slots are set as follows:
(3.33)    
(3.34)    
Dispatch Methods
Following is the available dispatch method for an Agg Diversion Site that uses the Lumped structure. No structure and sequential Agg Diversion Sites do not have dispatch methods.
* Solve Lumped Salt Removal
If either the Salt Mass Removal method or the Salt Mass Removal with Debt method is selected in the Salt Removal category, then the following dispatch conditions apply:
Required Known slots
• Salt Available For Removal
• Salt Mass Removal Request
Required Unknown slots
• Salt Mass Removal
The dispatch method executes the selected method(s) in the Return Flow Salt category and Salt Removal category where the work is done and the unknown slots are set.
* Solve Lumped Return Flow Salt
This dispatch method is available for Lumped Agg Diversion Sites
Required Known slots
• Diversion Salt Concentration
• Total Return Flow
• Total Diversion
Required Unknown slots
Return Flow Salt Mass,
Return Flow Salt Concentration
Method Details
The Diversion Salt Mass is set by multiplying the Total Diversion volume by the Diversion Salt Concentration.
Then, the dispatch method executes the selected methods in the Return Flow Salt category and Salt Removal category where the work is done and the unknown slots are set.
Revised: 06/03/2019