MakarovSuites
English
EnglishDeutschРусскийУкраїнськаFrançaisEspañolItalianoPolski
Contact & licences

Math

Sandpile

Four grains spill to the neighbours - and out of one rule come avalanches of every size, a critical state and a fractal nobody drew; the identity of the sandpile group is spilled in front of you.

Sandpile — Actual application image
Actual application image

What happens

A square of cells on the floor, each painted by how many grains it holds: night for none, sea blue for one, amber for two, cream for three. The rule is the only rule: a cell holding four or more gives one grain to each of its four neighbours, and grains that fall off the edge are gone. A cell spilling right now flares. The first scene drops grains on ONE cell, in batches that double - 1, 1, 2, 4 … up to 65 536 - and the pile spreads into the circular fractal: four times the grains, twice the radius, and every symmetry of the square. The order of spilling does not matter (the model is abelian), so the animation, which spills everything at once in parallel sweeps, ends on exactly the pile the grains would make one at a time. The second scene rains grains on random cells: while the pile is low the avalanches are tiny, and once the mean height climbs to about 2.1 they come in every size - the chart plots how many avalanches of each size on log-log axes and the points fall on a straight line, a power law with no typical size. The third scene spills the identity of the sandpile group in two phases: six grains on every cell spilled down, then what was left over spilled down again; the result is e, and the button adds e to itself and spills - it comes back cell for cell. Click the floor to drop grains anywhere; right-drag orbits.

Equations used in the module
Equations
rule:  h_i ≥ 4  →  h_i − 4,  h_j → h_j + 1 for the four neighbours j;  grains leaving the grid are lost (the edge is the sink);  q = floor(h_i / 4) topplings at once give the same pile as q in turn
abelian:  the stable pile reached from a configuration does not depend on the order of toppling, and neither does the number of topplings - so the parallel sweeps of the animation end on the exact pile
pile from one point:  2^k grains on the centre - topplings 1220 / 20384 / 312768, radius 6.32 / 12.81 / 25.00 cells, occupied 116 / 476 / 1752 for k = 8 / 10 / 12;  r ∝ √n,  mean height inside ≈ 2.04 … 2.16;  all eight symmetries of the square
rain:  grains on random cells; the mean height climbs to ⟨h⟩ ≈ 2.1 (2.125 in the literature) and stays;  P(s) ∝ s^−τ for the avalanche size s (topplings), measured slope −1.08 of the log-log density on 65 × 65 after 30 000 grains
group:  stable piles that recur under the rain form an abelian group under "add and spill";  identity  e = (2δ − (2δ)°)°  with δ the all-3 pile and ° stabilisation;  e + c = c for every recurrent c,  e + e = e;  Dhar's burning test: c is recurrent exactly when adding one grain per missing neighbour (the sinks' share) and spilling gives c back
identities:  1 × 1: 0;  2 × 2: all 2;  3 × 3: 2 1 2 / 1 0 1 / 2 1 2;  15 × 15: 448 grains, 17 / 32 / 112 / 64 cells with 0 / 1 / 2 / 3

Related experiments

Back to catalogue
Galton board (3D) — Actual application image

Physics / Math

Galton board (3D)

Real balls on a peg lattice pile into a two-dimensional bell.

Random walks — Actual application image

Math

Random walks

A swarm leaving home on the lattice: the cloud grows like √n, the endpoints go Gaussian, and in three dimensions two thirds never come back.

Ising model — Actual application image

Physics / Math

Ising model

A ferromagnet's phase transition: domains and critical temperature.