264. Stocks Flows

The foundation of system dynamics modeling. Two element types:

Stocks change only through flows. Flows change instantaneously based on system state.

264.1. Mathematical foundation

For a stock 𝑆(𝑡) with inflow rate 𝑓in(𝑡) and outflow rate 𝑓out(𝑡):

𝑑𝑆𝑑𝑡=𝑓in(𝑡)𝑓out(𝑡)

In integral form:

𝑆(𝑡)=𝑆(𝑡0)+𝑡0𝑡[𝑓in(𝜏)𝑓out(𝜏)]𝑑𝜏

Each stock obeys this conservation law: change in stock = net flow.

264.2. Units

Dimensional consistency is mandatory:

[stock]=[flow][time]

A model with mismatched units is wrong; checking units catches half of all SD modeling errors.

264.3. Three classes of stock-flow systems

First-order linear:

𝑆=𝑘𝑆+𝑓in

Equivalently: stock decays toward 𝑓in𝑘 with time constant 1𝑘. Examples: exponential decay (radioactive substance), goal-seeking (workforce hiring toward target).

Second-order linear: two stocks, coupled

𝑆1=𝑎𝑆1+𝑏𝑆2𝑆2=𝑐𝑆1+𝑑𝑆2

Eigenvalues determine behavior: stable / unstable spirals, exponential growth/decay, oscillation. Predator-prey, mass-spring, etc.

Nonlinear: 𝑆=𝑓(𝑆) with 𝑓 nonlinear — limit cycles, chaos, bifurcations. Most real-world systems.

264.4. Bathtub metaphor

A common teaching tool: a bathtub with a tap (inflow) and drain (outflow). Water level = stock. Tap and drain rates = flows.

Even simple bathtubs are non-intuitive: most people overestimate how fast filling a bathtub increases water level, because they fail to integrate the flow over time.

264.5. Stocks have memory; flows don’t

If you turn off the tap (set inflow to zero), the bathtub doesn’t suddenly empty — water remains. Same with inventory after halting production, or accumulated CO2 after stopping emissions. Stocks persist.

Conversely, a flow can change instantaneously: stop the inflow → inflow rate is zero immediately.

This distinction is fundamental: policy interventions on flows have delayed effects on stocks.

264.6. Connection to differential equations

Stocks and flows = the language of ordinary differential equations (ODEs). SD diagrams are just an alternative notation for systems of ODEs. The visual language helps:

264.7. See also