Home▸Articles▸Society & Economics

Epidemic Spread (2D): Understanding the Spatial SIR Model

A powerful tool for modeling how infectious diseases spread through populations in a spatial context.

mysimulator teamUpdated June 2026≈ 4 min read▶ Open the simulation

What is the SIR Model?

The Susceptible-Infected-Recovered (SIR) model is a fundamental epidemiological framework used to understand how infectious diseases propagate through populations. The model divides the population into three compartments: susceptible individuals who can catch the disease, infected individuals who are spreading it, and recovered individuals who have developed immunity.

In the 2D spatial SIR model, these compartments are further refined by considering the physical space in which agents (representing individuals) move and interact. This adds a layer of complexity that reflects real-world scenarios more accurately.

How Does Spatial Spread Work?

In the 2D SIR model, each agent moves randomly within its environment, representing individual people in a community. When susceptible agents come into close contact with infected agents, transmission of the disease can occur based on the transmission probability set by the user. The infectious period slider determines how long an infected agent remains contagious before recovering and moving to the recovered compartment.

The mobility slider controls how frequently and far agents move, which influences the likelihood of encounters between different compartments and thus the spread of the disease. This spatial aspect is crucial for understanding phenomena such as local outbreaks and the impact of social distancing measures.

live demo · related simulation● LIVE

Why Does It Matter?

Understanding how diseases spread in a 2D space helps public health officials design effective strategies to control and mitigate epidemics. By simulating different scenarios, policymakers can test the efficacy of interventions like vaccinations (controlled by the vaccination coverage slider) or quarantine measures.

The model also aids researchers in studying the dynamics of disease propagation under various conditions, such as varying population densities, movement patterns, and environmental factors.

Real-World Applications

The 2D SIR model has been applied to study historical pandemics like the Spanish flu and more recent outbreaks such as Ebola and COVID-19. It helps predict the potential spread of a disease, assess the impact of different interventions, and inform public health policies.

Moreover, this model can be adapted to simulate other types of contagions beyond diseases, including information or behavioral trends in social networks.

Frequently asked questions

How does changing the transmission probability affect the spread of disease?

Increasing the transmission probability leads to a faster and more widespread infection as agents are more likely to pass the disease to others during close encounters. Conversely, decreasing it slows down the spread.

What is the significance of the infectious period slider in the model?

The infectious period slider determines how long an infected agent remains contagious and can spread the disease before recovering. A longer infectious period generally results in a more prolonged and extensive outbreak.

How does mobility impact the spread of disease in the 2D SIR model?

Higher mobility increases the likelihood of encounters between different compartments, accelerating the spread of the disease across larger areas. Lower mobility tends to confine outbreaks to smaller regions.

Can this model be used for other types of contagion besides diseases?

Yes, the 2D SIR model can be adapted to simulate the spread of information or behaviors in social networks, providing insights into how trends and ideas propagate through populations.

Try it live

Everything above runs in your browser — open Epidemic Spread (2D): Spatial SIR Model and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Epidemic Spread (2D): Spatial SIR Model simulation

What did you find?

Add reproduction steps (optional)