Sand
Sand#
Extra Credit
This page is 10 points extra credit
On this page you will simulate a model of sand building up on a table (and the resulting avalanches that it causes).
In this model, sand will be placed on a table which has
For the first part of this problem, we are going to have sand rain from the sky onto random spots on the table.
This gives us essentially a cellular automata with four rules:
Choose a random spot on the table and add a new piece of sand
While some column of sand has more then
pieces:choose a random such column and replace it with
pieces of sand and increase the sand on each of its neighbors by one.
This is not only a cellular automata but also a markov chain (the probability of a new configuration is independent of anything but the current configuration).
Write a simulation which performs this cellular automata. Use
Grading
Measure the following two properties using a window averaging of 100 steps:
the number of pieces of sand as a function of time.
the size of each avalanch as a function fo time.
a snapshot of the sand in equilibrium (i.e. after 2000 steps).
You should get results that look something like this:
Grading
Also choose a single prototype avalanch (preferably a large one) and visualize it.
You should see something like this
(it would be fun to turn this into a video - it shouldn’t be too hard if you look up how animations work in pylab)
The number of avalanches actually follow a power law - i.e. the probability of an avalanch goes as
My graph looks like this:
Grading
Produce this plot and compute
There are various other fun (not graded) activities you can do with this model:
For the two dimensional system, you can not have sand rain from the sky. Instead, just start with a large lattice (say 200x200) with an extremely tall pile of grains on the center pixel (say 30,000 grains) and just let the avalanches happen. You will get a pretty interest pattern (shown below)
You can also go ahead and do a sand-pile model for 1-dimension instead of 2-dimensions. In many ways this is easier to visualize.