Oslo model implemented in numba.
This is based on the Complexity and Networks course at Imperial College London (probably my favourite).
It was one of my first coding projects and I wrote the model with a while loop.
I set my notebook running overnight and hoped for the best.
Going to see if numba
works better.
The Oslo model is a simple 1D model of a ricepile that exhibits self-organised criticality (scale invariance) when it reaches a steady state.
Refer to Christensen, Kim, and Nicholas R. Moloney. Complexity and criticality. Vol. 1. World Scientific Publishing Company, 2005. for the full details.
Each site of the ricepile has a height,
Once the sites are initialised with
-
Drive. Add a grain of sand to the first site,
$h_1 \to h_1 + 1$ (so$z_1 \to z_1 + 1$ ). -
Relaxation. If the local slope of a site exceeds the threshold,
$z_i > z_c$ , then the site relaxes (topples).
In words, a rice grain falls from site
The time to reach steady state is equal to number of grains added before a grain leaves the system for the first time, or
After this critical point, the ricepile passes through a set of recurrent configurations.
The avalanche size,
Run the code for pile sizes
uv run oslo -L 512 -N 1_000_000 --plot
Below is the result for