Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

Abelian sandpile

This code allows to create, grow and visualize Abelian sandpiles.

Example sandplie

For the description of the model see wiki or p. 52-53 in Bak (1996).

Setup

Install requirenemtns and build Cython code to make it run signingicantly faster.

pip install -r requirements.txt
python setup.py build_ext --inplace

Usage

Pour sand on the sandpile and save the sandpile after each 1000 grains.

./sandpile_main.py pour --verbose \
  --grid_size 200 --n_steps 1e5 --checkpoint_every 1e3 \
  --checkpoint_dir ./checkpoints  --store_avalanche_sizes

Plot the sandpile grid.

./sandpile_main.py plot \
  ./checkpoints/sandpile-000007470000.pckl.gz ./data/plots/ 

License

This code was written by Paweł Mandera and is licensed under the Apache License 2.0.

References

Bak, P. (1996). How Nature Works: The Science of Self-Organized Criticality. New York: Copernicus.

About

Abelian sandpile model

Resources

License

Releases

No releases published

Packages

No packages published

Languages