River flow: how a stock responds to its flows

A river fills a reservoir and the dam releases a fixed share of whatever is stored each month. Change the flows and watch the water level head toward the point where inflow equals outflow.

Inflow
Stock
Outflow
S*
Time t
0 months
Stock S
0
Inflow I(t)
0
Outflow O(t)
0
Net change dS/dt = I − O
0
Steady state S* = Ī/k
0
Time constant 1/k
0 months
Half-life ln2/k
0 months
Mean amount that flows in each month.
Inflow swings ± this % around its mean over a 12-month cycle.
Share of the current stock that leaves each month.
Simulated months per real second.
Stock S (left axis) Steady state S* (left axis) Inflow I (right axis) Outflow O (right axis)
dS/dt = I(t) − k·S  ·  I(t) = Ī(1 + a·sin(2πt/12))  ·  S* = Ī/k