Forest Fire Simulation in MATLAB
November 18th, 2008 by SplineGuy
In my Fall course of Math Models, I have three groups working on projects to finish up the semester. One of the groups have an assignment to explore a model of the spread of a forest fire. The assumptions are that the trees are on a rectangular grid, or a lattice. The time is a discrete variable and at each time step the probability that the fire spreads from one point in the lattice to an adjacent point (up, down, left or right) is given by p. For simplicity, the event that the fire spreads to each point is assumed to be independent of any other point.
Part of their project is to implement a numerical simulation of their forest fire. I couldn’t let them have all the fun, so below is an example of my version of the simulation in MATLAB. I have to hold off on posting the code until after they have handed in their project.
In the graphical representation of my simulation, green represents an unburnt tree, black is burnt and red is currently on fire. The fire lasts for exactly one time step. I also implemented a 3-D version, where a height of 1 is unburnt, 2 is on fire, and 0 is burnt. I’ll confess to having way too much fun with this.
I have used a 200×200 lattice with p = 0.5.








What’s the smallest value of p for which you can get the fire to burn out without reaching an edge?
How big does p have to be to burn the whole forest?
Cool. Oh the neat things that we can model with math and then get really cool visual models from things like MATLAB. That’s looks like a project to work on.
(@Bill)
In other words, answer the next two questions on their project? In fact, their next goal is to establish an upper and lower bound for p which would lead to infinite spread (with a bit of help along the way).
This is the first time I’ve assigned this project in the Models class. I gave it to Jarrod A, Zack G. and Chris Igo. I think they are going to have fun with it.
Plus they’ll be presenting it on Friday, Dec. 5 at 1:30 in MSB 109.
I was wondering if it is possible to get the matlab script that you used for this forest-fire project?
Best regards
Mads from Denmark
I will post it to the blog after my students have handed in their report. Sorry for the delay but I don’t want to be giving away trade secrets, at least not before they need to write the code themselves.