A note on the bathtub analogy

Adapted from “A note on the bathtub analogy,” Pål Davidsen, Erling Moxnes, Mauricio Munera Sánchez, David Wheat, 2011 System Dynamics Conference.

Abstract

The bathtub analogy has been used extensively to illustrate stock and flow relationships. Because this analogy is frequently used, System Dynamicists should be aware that the natural outflow of water from a bathtub is a nonlinear function of water volume. A questionnaire suggests that students with one year or more of System Dynamics training tend to assume a linear relationship when asked to model a water outflow driven by gravity. We present Torricelli’s law for the outflow and investigate the error caused by assuming linearity. We also construct an “inverted funnel” which does behave like a linear system. We conclude by pointing out that the nonlinearity is of no importance for the usefulness of bathtubs or funnels as analogies. On the other hand, simplified analogies could make modellers overconfident in linear formulations and not able to address critical remarks from physicists or other specialists.

See my related blog post for details.

Units balance.

Runs in Vensim (any version): ToricelliBathtub.mdl ToricelliBathtub.vpm

The Economic Long Wave

This is John Sterman’s model of long waves (long-duration economic cycles), driven by capital accumulation dynamics. This version is replicated from a JEBO article,

STERMAN, J. D. (1985) A Behavioral Model of the Economic Long Wave. Journal of Economic Behavior and Organization, 6, 17-53.

There’s some interesting related literature (including other economic models in this library). From Sterman’s publications list:

STERMAN, J. D. & MOSEKILDE, E. (1994) Business Cycles and Long Waves: A Behavioral, Disequilibrium Perspective. IN SEMMLER, W. (Ed.) Business Cycles: Theory and Empirical Methods. Boston, Kluwer Academic Publishers.

STERMAN, J. D. (1994) The Economic Long Wave: Theory and Evidence. IN SHIMADA, T. (Ed.) An Introduction to System Dynamics. Tokyo.

STERMAN, J. D. (2002) A Behavioral Model of the Economic Long Wave. IN EARL, P. E. (Ed.) The Legacy of Herbert Simon in Economic Analysis. Cheltenham, UK, Edward Elgar.

STERMAN, J. D. (1985) An Integrated Theory of the Economic Long Wave. Futures, 17, 104-131.

RASMUSSEN, S., MOSEKILDE, E. & STERMAN, J. D. (1985) Bifurcations and Chaotic Behavior in a Simple Model of the Economic Long Wave. System Dynamics Review, 1, 92-110.

STERMAN, J. D. (1983) The Long Wave. Science, 219, 1276.

KAMPMANN, C., HAXHOLDT, C., MOSEKILDE, E. & STERMAN, J. D. (1994) Entrainment in a Disaggregated Economic Long Wave Model. IN LEYDESDORFF, L. & VAN DEN BESSELAAR, P. (Eds.) Evolutionary Economics and Chaos Theory. London, Pinter.

MOSEKILDE, E., LARSEN, E. R., STERMAN, J. D. & THOMSEN, J. S. (1993) Mode Locking and Nonlinear Entrainment of Macroeconomic Cycles. IN DAY, R. & CHEN, P. (Eds.) Nonlinear Economics and Evolutionary Economics. New York, Oxford University Press.

MOSEKILDE, E., THOMSEN, J. S. & STERMAN, J. D. (1992) Nonlinear Interactions in the Economy. IN HAAG, G., MÜLLER, U. & TROITZSCH, K. (Eds.) Economic Evolution and Demographic Change. Berlin, Springer Verlag.

THOMSEN, J. S., MOSEKILDE, E. & STERMAN, J. D. (1991) Hyperchaotic Phenomena in Dynamic Decision Making. IN SINGH, M. G. & TRAVÉ-MASSUYÈS, L. (Eds.) Decision Support Systems and Qualitative Reasoning. Amsterdam, Elsevier Science Publishers.

THOMSEN, J. S., MOSEKILDE, E., LARSEN, E. R. & STERMAN, J. D. (1991) Mode-Locking and Chaos in a Periodically Driven Model of the Economic Long Wave. IN EBELING, W. (Ed.) Models of Self Organization in Complex Systems. Berlin, Akademie Verlag.

STERMAN, J. D. (1988) Nonlinear Dynamics in the World Economy: The Economic Long Wave. IN CHRISTIANSEN, P. & PARMENTIER, R. (Eds.) Structure, Coherence, and Chaos in Dynamical Systems. Manchester, Manchester University Press.

STERMAN, J. D. (1987) Debt, Default, and Long Waves: Is History Relevant? IN BOECKH, A. (Ed.) The Escalation in Debt and Disinflation: Prelude to Financial Mania and Crash? Montreal, BCA Publications.

STERMAN, J. D. (1987) An Integrated Theory of the Economic Long Wave. IN WANG, Q., SENGE, P., RICHARDSON, G. P. & MEADOWS, D. H. (Eds.) Theory and Application of System Dynamics. Beijing, New Times Press.

STERMAN, J. D. (1987) The Economic Long Wave: Theory and Evidence. IN VASKO, T. (Ed.) The Long Wave Debate. Berlin, Springer Verlag.

RASMUSSEN, S., MOSEKILDE, E. & STERMAN, J. D. (1987) Bifurcations and Chaotic Behavior in a Simple Model of the Economic Long Wave. IN WANG, Q., SENGE, P., RICHARDSON, G. P. & MEADOWS, D. H. (Eds.) Theory and Application of System Dynamics. Beijing, New Times Press.

And from Christian Kampmann,

“The Role of Prices in Long Wave Entrainment” (with C. Haxholdt, E. Mosekilde, and J.D. Sterman), International System Dynamics Conference, Stirling, U.K. and at the Spring 1994 ORSA/TIMS conference, Boston, MA. 1994.
“Disaggregating a simple model of the economic long wave” International Conference of the System Dynamics Society, Keystone, CO, 1985.
The long wave model was the guine pig for Kampmann’s interesting ’96 conference paper that combined a graph-theoretic identification of a set of feedback loops having independent gains with eigenvalue analysis,
Kampmann, Christian E.   Feedback Loop Gains and System Behavior
There also used to be a nifty long wave game, programmed on NEC minicomputers (32k memory?), but I’ve lost track of it. I’d be interested to here of a working version.

Economic Cycles: Underlying Causes

Nathaniel Mass’ model of economic cycles, replicated from his 1975 book, Economic Cycles: An Analysis of Underlying Causes, which unfortunately seems to have disappeared from the Productivity Press site (though you can still find used copies).

I haven’t checked, but I’m guessing that the model is quite similar to that in his PhD thesis, which you can get from MIT libraries here. Here’s the abstract:


The models: mass2.mdl mass2.vpm

These don’t have units defined, unfortunately – I’d love to have a copy with units if you’re so inclined.

The Dynamics of Commodity Production Cycles

These classic models are from Dennis Meadows’ dissertation, the Dynamics of Commodity Production Cycles:

While times have changed, the dynamics described by these models are still widespread.

These versions should work in all recent Vensim versions:

DLMhogs2.vpm DLMhogs2.mdl

DLMgeneric2.vpm DLMgeneric2.mdl

 

Lotka-Volterra predator-prey system

The Lotka-Volterra equations, which describe a predator-prey system, must be one of the more famous dynamic systems. There are many generalizations and applications outside of biology.

Wikipedia has a nice article, which I used as the basis for this simple model.

Continue reading “Lotka-Volterra predator-prey system”

Path Dependence, Competition, and Succession in the Dynamics of Scientific Revolution

This is a very interesting model, both because it tackles ‘soft’ dynamics of paradigm formation in ‘hard’ science, and because it is an aggregate approach to an agent problem. Unfortunately, until now, the model was only available in DYNAMO, which limited access severely. It turns out to be fairly easy to translate to Vensim using the dyn2ven utility, once you know how to map the DYNAMO array FOR loops to Vensim subscripts.

Path Dependence, Competition, and Succession in the Dynamics of Scientific Revolution

J. Wittenberg and J. D. Sterman, 1999

Abstract

What is the relative importance of structural versus contextual forces in the birth and death of scientific theories? We describe a dynamic model of the birth, evolution, and death of scientific paradigms based on Kuhn’s Structure of Scientific Revolutions. The model creates a simulated ecology of interacting paradigms in which the creation of new theories is stochastic and endogenous. The model captures the sociological dynamics of paradigms as they compete against one another for members. Puzzle solving and anomaly recognition are also endogenous. We specify various regression models to examine the role of intrinsic versus contextual factors in determining paradigm success. We find that situational factors attending the birth of a paradigm largely determine its probability of rising to dominance, while the intrinsic explanatory power of a paradigm is only weakly related to the likelihood of success. For those paradigms that do survive the emergence phase, greater explanatory power is significantly related to longevity. However, the relationship between a paradigm’s ‘strength’ and the duration of normal science is also contingent on the competitive environment during the emergence phase. Analysis of the model shows the dynamics of competition and succession among paradigms to be conditioned by many positive feedback loops. These self-reinforcing processes amplify intrinsically unobservable micro-level perturbations in the environment – the local conditions of science, society, and self faced by the creators of a new theory – until they reach macroscopic significance. Such dynamics are the hallmark of self-organizing evolutionary systems.

We consider the implications of these results for the rise and fall of new ideas in contexts outside the natural sciences such as management fads.

Cite as: J. Wittenberg and J. D. Sterman (1999) Path Dependence, Competition, and Succession in the Dynamics of Scientific Revolution. Organization Science, 10.

I believe that this version is faithful to the original, but it’s difficult to be sure because the model is stochastic, so the results differ due to differences in the random number streams. For the moment, this model should be regarded as a beta release.

Continue reading “Path Dependence, Competition, and Succession in the Dynamics of Scientific Revolution”

Polya urn with increasing returns

This set of models performs a variant of a Polya urn experiment, along the lines of that described in Bryan Arthur’s Increasing Returns and Path Dependence in the Economy, Chapter 10. There’s a small difference, which is that samples are drawn with replacement (Bernoulli distribution) rather than without (hypergeometric distribution).

The interesting dynamics arise from competing positive feedback loops through the stocks of red and white balls. There’s useful related reading at http://tuvalu.santafe.edu/~wbarthur/Papers/Papers.html

I did the physical version of this experiment with Legos with my kids:

I tried the Polya urns experiment over lunch. We put 5 red and 5 white legos in a bowl, then took turns drawing a sample of 5. We returned the sample to the bowl, plus one lego of whichever color dominated the sample. Iterate. At the start, and after 2 or 3 rounds, I solicited guesses about what would happen. Gratifyingly, the consensus was that the bowl would remain roughly evenly divided between red and white. After a few more rounds, the reality began to diverge, and we stopped when white had a solid 2:1 advantage. I wondered aloud whether using a larger or smaller sample would lead to faster convergence. With no consensus about the answer, we tried it – drawing samples of just 1 lego. I think the experimental outcome was somewhat inconclusive – we quickly reached dominance of red, but the sampling process was much faster, so it may have actually taken more rounds to achieve that. There’s a lot of variation possible in the outcome, which means that superstitious learning is a possible trap.

This model automates the experiment, which makes it easier and more reliable to explore questions like the sensitivity of the rate of divergence to the sample size.

PolyaUrn.vpm

This version works with Vensim PLE (though it’s not supposed to, because it uses the RANDOM BERNOULLI function). It performs a single experiment per run, but includes sensitivity control files for performing hundreds of runs at a time (requires PLE Plus). That makes for a nice map of outcomes:

Continue reading “Polya urn with increasing returns”

A System Zoo

I just picked up a copy of Hartmut Bossel’s excellent System Zoo 1, which I’d seen years ago in German, but only recently discovered in English. This is the first of a series of books on modeling – it covers simple systems (integration, exponential growth and decay), logistic growth and variants, oscillations and chaos, and some interesting engineering systems (heat flow, gliders searching for thermals). These are high quality models, with units that balance, well-documented by the book. Every one I’ve tried runs in Vensim PLE so they’re great for teaching.

I haven’t had a chance to work my way through the System Zoo 2 (natural systems – climate, ecosystems, resources) and System Zoo 3 (economy, society, development), but I’m pretty confident that they’re equally interesting.

You can get the models for all three books, in English, from the Uni Kassel Center for Environmental Systems Research – it’s now easy to find a .zip archive of the zoo models for the whole series, in Vensim .mdl format, on CESR’s home page: www2.cesr.de/downloads.

To tantalize you, here are some images of model output from Zoo 1. First, a phase map of a bistable oscillator, which was so interesting that I built one with my kids, using legos and neodymium magnets:

Continue reading “A System Zoo”

The Rise and Fall of the Saturday Evening Post

Replicated by David Sirkin and Julio Gomez from Hall, R. I. 1976. A system pathology of an organization: The rise and fall of the old Saturday Evening Post. Administrative Science Quarterly 21(2): 185-211. (JSTOR link). Just updated for newer Vensim versions.

This is one of the classic models on the Desert Island Dynamics list.

There are some units issues, preserved from the original by David and Julio. As I update it, I also wonder if there are some inconsistencies in the accounting for the subscription pipeline. Please report back here if you find anything interesting.

satevepost2011b.mdl

satevepost2011b.vmf

Boiling Water Reactor Dynamics

Replicated from “Hybrid Simulation of Boiling Water Reactor Dynamics Using A University Research Reactor” by James A. Turso, Robert M. Edwards, Jose March-Leuba, Nuclear Technology vol. 110, Apr. 1995.

This is a simple 5th-order representation of the operation of a boiling water reactor around its normal operating point, which is subject to interesting limit cycle dynamics.

The original article documents the model well, with the exception of the bifurcation parameter K and a nonlinear term, for which I’ve identified plausible values by experiment.

TursoNuke1.mdl