Stock Flow Bathtub Intuition Diagram Builder
Build a labeled stock-flow bathtub diagram and calculate ending stock and stock-to-net-flow time intuition.
Description
A stock-flow bathtub connects an initial stock with a constant net flow over discrete periods.
A stock-flow bathtub connects an initial stock with a constant net flow over discrete periods. The initial-stock/net-flow ratio gives a scale of time.1
The returned values include Stock-flow diagram, Ending stock, Stock-to-net-flow ratio. The How section below explains the calculation, input rules and interpretation.
When to use Stock Flow Bathtub Intuition Diagram Builder
Use Stock Flow Bathtub Intuition Diagram Builder when you need to evaluate the supplied records under the calculation and evidence rules below. No separate inflow/outflow values or variable-flow dynamics are modeled.
Define the question, evidence and scenario assumptions first. Supply the chosen score scales, time horizons or reference selection explicitly. Interpret generated text as a discussion template and screen labels as the stated rules.
How to use Stock Flow Bathtub Intuition Diagram Builder and understand its results
- Define the question, evidence and scenario assumptions first. Supply the chosen score scales, time horizons or reference selection explicitly. Interpret generated text as a discussion template and screen labels as the stated rules.
- Enter initialStock, inflowLabel, netFlowPerPeriod, outflowLabel, periods, stockLabel using the field table and calculation rules, then run the tool.
- Read diagram, endingStock, stockToNetFlowRatio. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| initialStock | Initial stock | number; minimum: 0 | Required |
| inflowLabel | Inflow label | string | Required |
| netFlowPerPeriod | Net flow per period | number | Required |
| outflowLabel | Outflow label | string | Required |
| periods | Periods | integer; minimum: 0 | Required |
| stockLabel | Stock label | string | Required |
Trim nonblank labels, require nonnegative finite stock, finite signed flow and nonnegative safe-integer periods. Reject negative/nonfinite ending stock. Return labeled text, ending stock and ratio. Zero flow returns zero as a placeholder rather than a finite depletion time.
ending=initial+netFlow×periods; ratio=netFlow=0?0:initial/abs(netFlow) Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| diagram | Stock-flow diagram | string |
| endingStock | Ending stock | number; minimum: 0 |
| stockToNetFlowRatio | Stock-to-net-flow ratio | number; minimum: 0 |
{
"input": {
"initialStock": 100,
"inflowLabel": "Deposits",
"netFlowPerPeriod": -5,
"outflowLabel": "Withdrawals",
"periods": 4,
"stockLabel": "Water"
},
"output": {
"diagram": "[Water = 100] <- + Deposits | - Withdrawals -> ending stock = 80",
"endingStock": 80,
"stockToNetFlowRatio": 20
}
} Limitations and assumptions
No separate inflow/outflow values or variable-flow dynamics are modeled.
Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing fields without a declared default, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use Long Now Decade Century Timeframe Scale Lookup: A long planning horizon can be expressed in decades and centuries. Summing horizons is a numeric aggregate, not a calendar endpoint. For a complementary task, use Causal Loop Diagram Reinforcing Balancing Mapper: The sign product of a closed causal loop distinguishes reinforcing from balancing feedback. Link signs must already be combined by the caller.
References
Similar or alternative tools
- Long Now Decade Century Timeframe Scale Lookup
A long planning horizon can be expressed in decades and centuries. Summing horizons is a numeric aggregate, not a calendar endpoint.
- Causal Loop Diagram Reinforcing Balancing Mapper
The sign product of a closed causal loop distinguishes reinforcing from balancing feedback. Link signs must already be combined by the caller.