Skip to content
Case Study 02
The Math of an Epidemic

Watch how a single case multiplies exponentially, and how vaccinations safely flatten the curve before the system collapses.

Moving beyond a single tank, we can chain stocks together to watch how populations move from one state to another. The SIR (Susceptible, Infected, Recovered) model maps the flow of a virus through a connected society.

Because the infection rate relies on both infected and susceptible people colliding, we get a fascinating, delayed wave effect.

The Core Mechanics

🧍

The Susceptible Pool

The source tank of uninfected individuals. As this drains, the virus runs out of fuel.

🦠

The Infection Engine

A reinforcing loop driven by the contact rate. More infections lead to faster spread.

🛡️

Herd Immunity

The final tank. As people recover (or get vaccinated), they break the chain of transmission.

The Sandbox

Try this: Drag the Infectivity higher. Watch the peak of the Infected tank spike aggressively, overwhelming the system before burning out.

Try this: Increase the Vaccination_Fraction. Notice how it bypasses the dangerous Infected tank entirely, safely draining the susceptible pool straight into recovery.

sir_epidemic.sim

Nature's Balancing Act

While the SIR model burns through its fuel and eventually stops, biological systems in the wild often stabilize into eternal, repeating cycles.

Let's look at what happens when the "infected" pool needs the "susceptible" pool to survive long-term.