Title: Spreading of Fire
1Spreading of Fire
www.werc.usgs.gov
- Angela Shiflet
- Wofford College
- SC07
- November 10, 2007
http//www.wofford.edu/ecs/
2Background
- Inspiration
- "Fire!!" and "A Better Fire!!
- http//www.shodor.org/interactivate/activities/fir
e1/index.html - http//www.shodor.org/interactivate/activities/fir
e2/index.html - Woffords Emphasis in Computational Science
- Applying computer science mathematics to
science problems - Modeling and Simulation
- No prerequisites
- Software
- Mathematica, Maple, MATLAB
- Python or other programming language
3Cellular automaton simulation of spreading of
fire in classes
- Variety of classes
- CS1, CS2, computer graphics, modeling
simulations - Variety of assignments
- With or without graphics
- Team work
- Students love
- graphics animations
- creativity problem solving
- real-world type applications
- Particularly women
4With animation
- Grid of trees (green)
- For simplicity, surrounded by empty ground
(yellow) - Tree on fire in middle (red)
- (n25p55.mov)
5Without animation
- Vary probability of a tree adjacent to burning
tree catching fire from 0 to 100 - Plot
- Explain
6Simulation algorithm for fire(n, probCatch)
- spread
- Function for updating rules of each cell
- fire parameters
- n
- Size ( rows or columns) of internal grid
- probCatch
- Probability of tree catching fire from neighbor
burning tree
7Grid
- n-by-n array
- Possible cell values
- EMPTY (0)
- TREE (1)
- BURNING (2)
- Initially
- Empty border
- Trees inside
- 1 burning tree in middle
8Simulation Programfire(n, probCatch)
- initialize forest
- grids ? list containing forest
- do as long as a burning tree is in forest
- forest ? applySpread(forest, probCatch)
- Append forest to grids
9Applying spread to each cellapplySpread(mat,
probCatch)
- Applies spread(site, N, E, S, W) to each internal
cell in grid - Returns new grid
10Updating Rulesspread(site, N, E, S, W) function
- If site is EMPTY, remains EMPTY
- spread(EMPTY, N, E, S, W) returns EMPTY
- Burning tree burns down in 1 time step
- spread(BURNING, N, E, S, W) returns EMPTY
- If site is TREE and a neighbor is BURNING,
sometimes tree burns
11Variations
- Random trees on fire
- Different rules
- Lightning
- 2 time steps to burn
- Wind
- Probability of catching fire proportional to
number of neighbors on fire
12Other grid-based applications
- Spread of disease in society
- Attack of HIV on immune system
- Foraging
- Movement of ants
- Cloud formation
- Mushroom fairy rings
13Introduction to Computational Science Modeling
and Simulation for the Sciences
- Angela Shiflet George Shiflet
- Princeton University Press, 2006
- Cellular automaton simulations systems dynamics
modeling - www.wofford.edu/ecs/
- shifletab_at_wofford.edu
14(No Transcript)