From Rates to a Complete Water-Use Model
A water-use model must connect several quantities that are easy to confuse. Supply is the water entering a system per unit time. Demand is the amount users request per unit time. Storage is the amount held in a reservoir or tank. The amount delivered to users can be less than demand if supply and stored water are insufficient, while water can be lost as overflow if storage is already full.
A complete model keeps these quantities distinct, uses the initial storage to start its prediction, enforces the storage limits, and checks its predictions against observations. Its central accounting principle is that water cannot appear or disappear from the modeled system without a corresponding flow, overflow, or unmet demand.
Define the Quantities and Assumptions
Let \(t\) denote time, measured in hours. Let \(S(t)\) be stored water, measured in cubic metres, with initial storage \(S(0)=S_0\) and capacity \(C\). Let \(q(t)\) be the supply rate and \(d(t)\) the requested demand rate, both measured in cubic metres per hour. Assume \(q(t)\geq 0\), \(d(t)\geq 0\), and \(0\leq S_0\leq C\).
For this model, demand is served whenever water is available: incoming supply is used first, and storage covers any remaining demand. Water supplied beyond demand is stored until capacity is reached; additional water then overflows. There are no other flows, such as leakage or evaporation. Define \(u(t)\) as the actual delivery rate to users, \(o(t)\) as the overflow rate, and \(m(t)\) as the unmet-demand rate. All are measured in cubic metres per hour.
Write \(g(t)=q(t)-d(t)\) for the net rate that would change storage if all demand were met and no limit were active. Away from the limits, \(S'(t)=g(t)\), \(u(t)=d(t)\), and \(o(t)=m(t)=0\). At capacity, a positive net rate becomes overflow rather than additional storage. At zero storage, a negative net rate means that some demand cannot be met.
In a piecewise-constant model, supply and demand rates are held fixed over specified time intervals. On each interval, calculate when storage reaches a limit, if it does; then update the rates of storage change, delivery, overflow, and unmet demand as needed. This event-by-event accounting is important: simply integrating the net rate without enforcing the limits can produce an impossible storage value.
Why the Balance Equation Works
Over a short time interval of length \(\Delta t\), approximately \(q(t)\Delta t\) cubic metres enter. Approximately \(u(t)\Delta t\) are delivered and \(o(t)\Delta t\) overflow. The change in storage is therefore the incoming amount minus those two outgoing amounts. Dividing by \(\Delta t\) and taking the limit as \(\Delta t\) approaches zero gives the storage balance.
For a longer interval from time \(a\) to time \(b\), integrating that balance gives an especially useful check:
The integrals are total volumes over the interval. If unmet demand is recorded separately, actual delivery is demand minus unmet demand. Thus the model can also be checked against requested demand: total unmet demand is the integral of \(m(t)\), and total delivery equals total requested demand minus that amount.
Worked Example: Storage Reaches Capacity
Worked Example: Storage Reaches Capacity
A tank has capacity \(25\) cubic metres and initial storage \(18\) cubic metres. For the next \(3\) hours, supply is \(7\) cubic metres per hour and demand is \(4\) cubic metres per hour. Find the ending storage, delivered volume, and overflow.
The net rate before a limit is reached is \(7-4=3\) cubic metres per hour. The time required to fill the \(25-18=7\) cubic metres of available space is \(7/3\) hours. Since \(7/3<3\), the tank reaches capacity during the interval.
Before it fills, demand is fully served and storage increases at \(3\) cubic metres per hour. After it fills, demand remains fully served, but the excess supply rate \(7-4=3\) cubic metres per hour overflows. The remaining time is \(3-7/3=2/3\) hours, so overflow is \(3(2/3)=2\) cubic metres.
Delivered volume is \(4(3)=12\) cubic metres. Ending storage is \(25\) cubic metres. Check the volume balance: initial storage plus supply is \(18+7(3)=39\) cubic metres. Ending storage plus delivery plus overflow is \(25+12+2=39\) cubic metres, as required.
Worked Example: Storage Runs Out
Worked Example: Storage Runs Out
A tank starts with \(6\) cubic metres. Over the next \(4\) hours, supply is \(2\) cubic metres per hour and demand is \(5\) cubic metres per hour. Assume the tank has enough capacity that its upper limit is not reached. Find delivered volume, unmet demand, and ending storage.
While the tank contains water, the net storage rate is \(2-5=-3\) cubic metres per hour. It takes \(6/3=2\) hours for storage to fall to zero. In those first \(2\) hours, demand is fully served, so delivery is \(5(2)=10\) cubic metres.
For the remaining \(4-2=2\) hours, the tank is empty. The available supply of \(2\) cubic metres per hour is delivered, giving \(2(2)=4\) more cubic metres of delivery. Requested demand during those hours is \(5(2)=10\) cubic metres, so unmet demand is \(10-4=6\) cubic metres. Ending storage is zero.
Check the balance: initial storage plus total supply is \(6+2(4)=14\) cubic metres. Total delivery plus ending storage is \(10+4+0=14\) cubic metres. Also, total requested demand is \(5(4)=20\) cubic metres, and delivery plus unmet demand is \(14+6=20\) cubic metres.
Worked Example: Construct and Check an Integrated Model
Worked Example: Construct and Check an Integrated Model
A reservoir has capacity \(40\) cubic metres and starts with \(30\) cubic metres. The piecewise-constant rates are shown below. Compute storage and cumulative delivered use, then compare selected predictions with observations. Rates are in cubic metres per hour, and time is in hours.
| Time interval | Supply \(q\) | Demand \(d\) |
|---|---|---|
| 0 to 3 | 10 | 6 |
| 3 to 5 | 4 | 9 |
| 5 to 9 | 3 | 8 |
| 9 to 12 | 3 | 8 |
From time \(0\) to \(3\), the unconstrained net rate is \(10-6=4\). The reservoir has \(40-30=10\) cubic metres of space, so it reaches capacity after \(10/4=2.5\) hours. During the first \(2.5\) hours, storage increases by \(4(2.5)=10\) cubic metres. During the remaining \(0.5\) hours, the overflow rate is \(10-6=4\), producing \(4(0.5)=2\) cubic metres of overflow. Demand is fully served throughout, so delivered use over this interval is \(6(3)=18\) cubic metres. At \(t=3\), storage is \(40\).
From time \(3\) to \(5\), the net rate is \(4-9=-5\). Storage falls by \(5(2)=10\) cubic metres, ending at \(30\). Demand is fully served, so delivery over this interval is \(9(2)=18\) cubic metres. Cumulative delivery at \(t=5\) is \(18+18=36\).
From time \(5\) to \(9\), the net rate is \(3-8=-5\). Storage falls by \(5(4)=20\) cubic metres, ending at \(10\). Delivery is \(8(4)=32\) cubic metres, so cumulative delivery at \(t=9\) is \(36+32=68\).
From time \(9\) to \(11\), storage falls from \(10\) to zero at \(5\) cubic metres per hour. Delivery during those two hours is \(8(2)=16\) cubic metres. From \(t=11\) to \(12\), the reservoir is empty, so the supply rate of \(3\) is delivered and the remaining \(8-3=5\) cubic metres per hour of demand is unmet. Delivery in that final hour is \(3\) cubic metres, and unmet demand is \(5\) cubic metres. Thus storage at \(t=12\) is zero and cumulative delivery is \(68+16+3=87\) cubic metres.
The predictions and hypothetical observations are compared below. Each residual is the model prediction minus the observation.
| Time | Predicted storage | Observed storage | Storage residual | Predicted cumulative use | Observed cumulative use | Use residual |
|---|---|---|---|---|---|---|
| 3 | 40 | 39 | +1 | 18 | 19 | -1 |
| 8 | 15 | 16 | -1 | 60 | 61 | -1 |
| 12 | 0 | 2 | -2 | 87 | 84 | +3 |
For the \(t=8\) row, the reservoir has been in the \(5\)-to-\(9\) interval for \(3\) hours. Storage is \(30-5(3)=15\), and cumulative delivery is \(36+8(3)=60\). The residuals show the size and direction of disagreement; they do not by themselves identify its cause. At \(t=12\), for example, the model predicts less storage and more cumulative use than observed.
Finally, check the full-period water balance. Total supply is \(10(3)+4(2)+3(4)+3(3)=30+8+12+9=59\) cubic metres. Initial storage plus supply is \(30+59=89\). The model accounts for this as \(87\) delivered, \(2\) overflowed, and \(0\) remaining: \(87+2+0=89\). Requested demand totals \(6(3)+9(2)+8(4)+8(3)=92\) cubic metres. The model leaves \(5\) cubic metres unmet, so \(87+5=92\). Both checks agree.
Why Limits Must Be Applied Throughout
A common mistake is to calculate the final storage by adding all net changes and then clipping the result to the interval from zero to capacity. This can miss water that overflowed earlier, because overflow is not available to refill the reservoir after a later decline.
Worked Example: Why Clipping Only at the End Fails
Suppose a reservoir starts with \(8\) cubic metres and has capacity \(10\). During the first hour, supply is \(7\) and demand is \(2\), so the net rate is \(+5\). During the second hour, supply is \(1\) and demand is \(6\), so the net rate is \(-5\).
The incorrect end-only calculation gives \(8+5-5=8\) cubic metres, which lies within the capacity limits and therefore appears plausible. But during the first hour, the reservoir fills after \((10-8)/5=0.4\) hours. The remaining \(0.6\) hours produce \(5(0.6)=3\) cubic metres of overflow. At the start of the second hour storage is \(10\), and it then falls by \(5(1)=5\), leaving \(5\) cubic metres—not \(8\).
Check the correct balance. Total supply is \(7+1=8\); initial storage plus supply is \(8+8=16\). Ending storage, delivery, and overflow total \(5+(2+6)+3=16\). The balance confirms the event-by-event result.
The same principle applies at the lower limit. Once storage reaches zero, a continuing negative net rate cannot make storage negative; it represents unmet demand instead. A model that reports negative storage has not enforced its physical boundary, and a model that counts unmet demand as delivered use has overstated service.
A Practical Construction and Checking Sequence
Record supply, requested demand, initial storage, capacity, and the time intervals. Check that storage and capacity use the same volume units and that rates use volume per time.
Use \(q-d\) to predict the storage trend while demand is fully served and neither storage limit is active.
Calculate the time to capacity or to zero when the net rate points toward that boundary. Split the interval at the event if necessary.
Accumulate actual delivery, overflow, and unmet demand separately. At capacity, excess net inflow overflows; at zero storage, a deficit between demand and supply is unmet.
Compute prediction-minus-observation residuals at measured times, then check total water in against ending storage, delivered use, and overflow.
Interpreting Model-Observation Differences
Storage and cumulative-use observations provide different checks. A storage residual compares the model’s stock at a particular time with a measured stock. A cumulative-use residual compares total modeled delivery up to that time with measured total use. If both residuals are small relative to measurement precision and practical requirements, the model may be adequate for its intended purpose. If they are large or show a systematic pattern, revisit the inputs and assumptions, including rate estimates, initial storage, capacity, and the omission of other flows.
A close match does not prove that every assumption is correct: different errors can offset one another. Conversely, one disagreement does not identify a unique cause. The value of the integrated model is that it makes its accounting explicit, so observations can be compared with predictions and inconsistencies can be investigated without confusing demand, delivery, and storage.
Check Your Understanding
Use the rate, storage, and balance ideas in this tutorial to answer the following questions.
- A reservoir has \(12\) cubic metres of available capacity space and a net inflow of \(3\) cubic metres per hour. How long until it fills if that rate remains constant?
- When storage is empty, supply is \(4\) cubic metres per hour and demand is \(7\) cubic metres per hour. What are the delivery and unmet-demand rates?
- Why must a calculation be split when storage reaches its capacity during an interval?
- If a storage residual is defined as prediction minus observation and equals \(-2\) cubic metres, what does its sign say?
- State the total-volume balance that can be used to check a model over a time interval.