skip to main content
Accounting : Account Reference : Storage Account : Account Solution Equations
Account Solution Equations
Solutions for Storage accounts vary, depending on whether time(t) is set to the Begin Accrual Date.
Note:  When the Storage is solved in interactive mode, the account solves for as many timesteps as there are required known slots. When the account is solved during a run, the account solves for the current timestep and the following timestep. For models using the water rights solver, the storage account is allowed to solve through the current plus Local Timestep Offset, as defined on the sibling passthrough, to include the effects of lagging in the system. This difference was implemented for performance reasons.
Account Solution Detail When Time is Not the Begin Accrual Date  
For each timestep in the accounting period in which there are the required knowns, solve for Storage(t) when Storage(t-1) is known and time(t) is not the Begin Accrual Date.
Required Known Slots
• Storage(t-1), Accrual(t-1), Slot Inflow(t), Gain Loss(t)
    
    
Account Solution Detail When Time is the Begin Accrual Date  
Solve for Storage(t) if time(t) is the Begin Accrual Date.
Required Known Slots
• If CarryoverAllStorage method is selected: Storage(t-1), Accrual(t-1), Slot Inflow(t), Gain Loss(t)
• If NoCarryover method is selected: Slot Inflow(t), Gain Loss(t)
    
    
Using the Empty Storage Flag
When setting supply values interactively, you may want to set a supply such that it completely empties a storage account; that is, you want all of the water in that Storage account to move downstream on a particular supply.
Although you can enter the correct number, or copy and paste the storage into the outflow supply (as a volume), these methods are error-prone and need to be repeated if other supplies change. Instead, use the Empty Storage Flag, denoted with the letter “E”, to perform this operation. This flag computes the supply value that will lead to zero storage.
Figure 2.2 shows the Empty Storage Flag on the outflow supply on 1/3 and a transfer supply on 1/2/2004
Figure 2.2  Empty Storage Flag displayed on the Edit Account dialog box
 
“E” Flag Features
Following are some features of the “E” flag:
• The flag is associated with a timestep and a supply coming out of a storage account. There are no restrictions on the downstream account type. It is not possible to set the flag on other account’s supplies.
• When the flag is present on a supply, it computes and sets the supply value necessary to lead to a zero Storage at that timestep.
• The flag should be set on at most one outflow or transfer supply out of a Storage account at each timestep.
Note:  Setting the flag on more that one supply will lead to undefined behavior; the first supply will take all of the storage. A warning message is posted in the diagnostics when this happens.
• Once set, the “E” flag remains until explicitly cleared by the user.
• When a storage account unsolves, the “E” flag remains, the supply value is set to NaN.
Setting the Flag
Interactively, the flag can be set on the supply in the following contexts:
• In the Edit Account dialog box for the upstream storage account’s outflow or transfer supplies, do either of the following:
– Select TimeStep I/O, then Set to Empty Storage.
– Right-click and select Set to Empty Storage in the context menu.
• In the Open Slot dialog box for the upstream storage account's Outflow supplies, do either of the following.
– Right-click, then select Set to Empty Storage in the context menu.
– Select TimeStep I/O, then Set to Empty Storage.
• In the Account Editor dialog box for the downstream account, on the Inflow slot, if there is only one incoming supply for that account (and that supply comes from a Storage account).
• In the Open Slot dialog for the downstream account's Inflow or Transfers In slot, if there is more than one incoming supply for the slot.
• In the Open Slot dialog for a supply, select TimeStep I/O, then Set to Empty Storage.
• In the SCT dialog, when the outflow supply is shown, select Edit, then Empty Storage.
The flag cannot be set by a rule. In addition, the flag does not have a priority associated with it, so any rule can overwrite the flag and value.
Removing the Flag
Once set, the “E” flag remains until explicitly cleared by the user. To remove the flag, right-click and select Clear Values in the context menu.
Revised: 07/03/2024