A
Code for the BTW Sandpile
We list here one example of how the updating algorithm (see (4.9)) of the BTW model can be simulated in two dimensions. The implementation given is meant to be simple and easy to understand. This piece of code is included as inspiration to people who have little or no experience in programming this kind of problem. The code is written in FORTRAN simply because the author knows how to program in this language. A change to any other language should not cause problems. The code given is not fast; it is, in fact, very slow. But as soon as one gets the hang of it, optimizing a code by gradual improvements is reasonably straightforward. For a particularly fast and efficient implementation of BTW-like models, see Grassberger ...
No credit card required