It’s fire season
In July, the Western United States entered the core of the fire season. Many parts of the country are experiencing below-average precipitation and above-average temperatures—creating hot, dry conditions that are ideal for wildfires.
Mathematical models of fire behavior are an important part of fire mitigation. Fire models can help determine where a fire is likely to start, how quickly it will spread (and in what direction), and how much heat it will generate; these important clues can save lives and substantially curb financial losses.
Huygens principle of wave propagation
Some of the most widely used fire simulators (e.g., FARSITE, Prometheus) are based on Huygens principle of wave propagation. Huygens principle was originally proposed to describe traveling light waves, and also explains how sound waves can travel around corners. The crux of Huygens principle is that every point on the edge of a wave-front can be an independent source of secondary wavelets that propagate (i.e., spread) the wave.
Although Huygens studied light (not sound) and never married, this is what I imagine:
Fire models that incorporate Huygens principle simulate fire spread as an elliptical wave that propagates via smaller secondary elliptical fire wavelets on the fire front. At each time step, the model uses information about the fire environment to define the shape, direction, and size (spread rate) of each wavelet. Shape and direction are determined by the wind-slope vector, while size is determined by fuel conditions.
The new wave-front is the surface tangential to all the secondary wavelets. In other words, the small ellipses form a kind of envelope around the original fire perimeter, and the outer edge of this envelope is the new fire front.
A very idealized forest fire can be represented using a cellular automaton. A simple cellular automaton forest fire model consists of a grid of cells, where each cell can be in one of three states:
At each time step, the state of each cell on the grid is determined by four rules that the model carries out simultaneously:
A cellular automaton forest fire model is similar to a grid-based fire simulation, but doesn't use an existing model of fire spread to determine the rate of fire growth. Cellular automata exemplify self-organized criticality, and have been used to model several natural and social phenomena—including avalanches and epidemics. Skip ahead to the final section of this article for an example of a cellular automaton forest fire model in Python.
Yes, fire modeling is more complicated than this
Fire models must also capture information about the weather, fuel type (fuel is anything that can burn), and topography, which greatly influence fire growth. Additionally, “fires create their own weather,” altering humidity and other aspects of their surrounding environment; this poses a formidable challenge for fire modelers.
Consider FARSITE (now part of the FlamMap fire mapping and analysis system)—a prominent fire simulator used by the U.S. Forest Service, the National Park Service, and other state and federal agencies.
FARSITE implements Huygens principle using a set of differential equations developed by G.D. Richards in 1990. However, as the table below illustrates, FARSITE also incorporates many other equations—as well as several geospatial data layers—to simulate fire growth. Richards’s equations are only used for a single step of the surface fire calculations and a single step of the crown fire calculations, making them a relatively minor component of a complex simulation process.
Fire modeling is a balancing act
Fire modeling requires tradeoffs among accuracy, data availability, and speed. For real-time responses to fire, speed is critical—yet the most physically complex models are impossible to solve faster than real time. As University of Denver researcher Jan Mandel articulated3:
“The cost of added physical complexity is a corresponding increase in computational cost, so much so that a full three-dimensional explicit treatment of combustion in wildland fuels by direct numerical simulation (DNS) at scales relevant for atmospheric modeling does not exist, is beyond current supercomputers, and does not currently make sense to do because of the limited skill of weather models at spatial resolution under 1 km.”
Notably, there are many types of fire behavior models, and these models can be classified based on the types of equations they use, the variables they study, and the physical systems they represent. For the interested reader, the appendix includes a breakdown of the different model classifications.
→ Coding challenge
Can you build your own model (e.g., a cellular automaton) to simulate fire spread?
- What additional factors can you add to your model?
- How do you implement them?
Let us know your thoughts in the comments section!
A cellular automaton forest fire model in Python
Four fire model rules are implemented by the iterate function of a cellular automaton model created by Christian Hill1. You can view the full code, with an aggressive amount of explanatory comments, here.
Modifying the model
Some simple modifications to the code can add other features to the model that influence fire spread. For example, to add water bodies—which can block fire spread, I first defined a new cell state (WATER) and expanded the color list and bounds accordingly:
Then, I added another rule to the iterate function, which simply ensures that WATER cells remain WATER cells.
Finally, I defined the boundaries of the water bodies (in this case, four vertical “streams”).
These adjustments produce a model that shows how fire growth is restricted by water:
Notably, in the real world, fire can sometimes “jump” over barriers—a behavior called spotting that creates trouble for fire modelers and responders alike.
The original model can also be modified to include wind, which can dramatically affect fire spread. To achieve this, I first modified the original neighborhood (commented out below), such that NY and NX respectively represent the first and second coordinates of the original neighborhood.
Just below NY and NX, I defined NZ, which represents wind. Each value in NZ corresponds to one of the coordinates in neighborhood (NY and NX). If at least one of the index values in a neighbor-specifying pair of NY, NX is negative, the corresponding NZ value is 0.1. Otherwise, NZ is 1. As a concrete example, the first value of both NY and NX is -1, so this first pair of coordinates corresponds to the neighbor at (-1,-1). Thus, the NZ value corresponding to this pair is 0.1. This modification ends up biasing fire spread in the direction that wind is blowing, as I explain shortly.
The final step is to modify the iterate function to check all neighboring cells. If a neighbor is on fire AND a randomly generated number is less than the neighbor's NZ value (0.1 or 1), the cell catches on fire. Since the random number is a float >0 and <1, when NZ = 1, the random number will always be smaller and the cell will burn. Similarly, 0.1 is below most random numbers generated. This biases fire spread with wind direction.
This example code produces a fire model with wind blowing uniformly from the southeast.
Classification of fire models based on equation type used, variables studied, and physical systems modeled. Most models currently used operationally in the United States—including FARSITE—are semi-empirical. Many questions about fire behavior remain unanswered.
- Badger, Stephen, and Matthew Foley. “NFPA Journal - Fire Loss Report, November/December 2019“. National Fire Protection Association (NFPA), September 1, 2019. https://www.nfpa.org/News-and-Research/Publications-and-media/NFPA-Journal/2019/November-December-2019/Features/Large-Loss.
- Hill, Christian. “Scipython-Maths: the Forest-Fire Model.” GitHub, March 13, 2018. https://github.com/scipython/scipython-maths/blob/master/forest_fire/forest_fire.py.
- Mandel, Jan, Jonathan D Beezley, Janice L Coen, and Minjeong Kim. “Data Assimilation for Wildland Fires: Ensemble Kalman Filters in Coupled Atmosphere-Surface Models.” IEEE Control Systems 29, no. 3 (June 2009): 47–65. https://doi.org/10.1109/mcs.2009.932224.
- “Modeling Fire Growth (FARSITE Technical Documentation).” http://fire.org/downloads/farsite/WebHelp/technicalreferences/tech_modeling_fire_growth.htm.
- “National Significant Wildland Fire Potential Outlook: Outlook Period – July, August, September, and October 2020.” National Interagency Coordination Center (NICC). Predictive Services National Interagency Fire Center, July 1, 2020. https://www.predictiveservices.nifc.gov/outlooks/monthly_seasonal_outlook.pdf.
- Pais, Cristobal, Jaime Carrasco, David L. Martell, Andres Weintraub, and David L. Woodruff. “Cell2Fire: A Cell Based Forest Fire Growth Model,” May 22, 2019. https://arxiv.org/abs/1905.09317.
- Pastor, E. “Mathematical Models and Calculation Systems for the Study of Wildland Fire Behaviour.” Progress in Energy and Combustion Science 29, no. 2 (2003): 139–53. https://doi.org/10.1016/s0360-1285(03)00017-0.
- Richards, Gwynfor D. “An Elliptical Growth Model of Forest Fire Fronts and Its Numerical Solution.” International Journal for Numerical Methods in Engineering 30, no. 6 (1990): 1163–79. https://doi.org/10.1002/nme.1620300606.
Triplebyte helps engineers find great jobs by assessing their abilities, not by relying on the prestige of their resume credentials. Take our 30 minute multiple-choice coding quiz to connect with your next big opportunity and join our community of 200,000+ engineers.