Skip to content

CeciPani/Forest_fire_models

Repository files navigation

Forest fire models simulation code

Synopsis

This project aim to reproduce the results and the analysis done by Bak et al. and by B.Drossel et al. in their studies of firest-fire models. The forest fire model is defined as a cellular automaton on a LxL grid, this model display self-organized criticality as shown in the analysis of the clusters area of the Drossel model simulations.

Usage

This project contains two Jupyter Notebooks for two distinct forest fire models:

Once you run the cell code two directories are created, these will contain all the images created in the simulations. These images are used to create a GIF showing the time evolution of the forest.

The results of the Drossel forest fire model are analysed using powerlaw python library.

Prerequisites

To create the GIF and to perform the analysis you need to install two python libraries:

$ pip install -U images2gif

In images2gif.py change line 426:

for im in images: palettes.append( getheader(im)[1] )

to

for im in images: palettes.append(im.palette.getdata()[1])
$ pip install -U powerlaw

Outputs

  • Two GIF showing the model time evolution
  • One csv file containing simulation results
  • One log-log plot of cluster area vs. frequency of cluster area (exponentially truncated power law)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published