The Fire Model

2023.05.09 00:00

Fun Projects

Who should read it

Anyone interested in programming or to learn about the spread of wildfires.

Simple but instructive

The Fire Model is an agent-based model used to simulate wildfires and how they spread. There are two reasons why I like this model:

  • It is easy to understand, and thus a perfect entry point to start programming.
  • Despite its simplicity, the results are extremely interesting.

How it works

The forest is simulated using a grid of trees and non-flammable objects (e.g. rocks). On the left of the grid there is a fire line and the fire spreads from left to right. However, as rocks can’t burn they limit the spread of the fire. Now there is one model assumption that fire spreads from tree to tree and a tree catches fire when it is in direct contact with the fire line. The fire line moves from left to right as long as there are trees touching the fire line. For simplicity, only direct neighbors are considered, and fire does not spread diagonally.

Here is an example of a simulated forest with a fire line on the left (no trees burned yet).

Now there is one parameter we can vary and that is the tree density of the forest. For example, we could set the tree density to 100 and once fire spreads the whole forest would burn off. On the other extreme, a tree density of zero would imply no possibility for the fire to spread as there are no flammable materials. In the example above tree density is set to 57%. So we choose a tree density and then the forest is populated randomly with trees. Now one potential research question is:

Given a certain tree density, how many trees will burn off?

If we assume that there is a city on the right side of the forest, we could ask a more practical question,:

Will the fire reach the city at a certain tree density?

Take a moment to guess how far the fire will spread in the simulated forest above.

Now run the animation (does not work on iPhone).