<jupyter_start><jupyter_text>The BAK–TANG–WIESENFELD Sandpile General features+ First published by Bak, Tang, and Wiesenfeld (1987).+ Motivated by avalanching behaviour of a real sandpile.+ In one dimension rules represent downward movement of sand grains.+ Defined in any dimension, exactly solved (trivial) in one.+ Stochastic (bulk) drive, deterministic relaxation.+ Non-Abelian in its original definition.+ Many results actually refer to Dhar’s (1990a) Abelian sandpile, Sec. 4.2.+ Simple scaling behaviour disputed, multiscaling proposed.+ Exponents listed in Table 4.1, p. 92, are for the Abelian BTW Model. Rules+ d dimensional (usually) hyper-cubic lattice and q the coordination number (on cubic lattices q = 2d).+ Choose (arbitrary) critical slope z^c = q − 1.+ Each site n ∈ {1,..., L}^d has slope z_n.+ _Initialisation_: irrelevant, model studied in the stationary state.+ _Driving_: add a grain at n0 chosen at random and update all uphill nearest neighbours n'0 of n0:z_n0 →z_n0 + q/2z_n0 →z_n'0 − 1.+ _Toppling_: for each site n with z_n > z^c distribute q grains among its nearest neighbours n':z_n →z_n − q∀n'.nn.n z_n →z_n + 1.In one dimension site n = L relaxes according to z_L → z_L − 1z_L−1 → z_L−1 + 1.+ _Dissipation_: grains are lost at open boundaries.+ _Parallel update_: discrete microscopic time, sites exceeding zc at time t topple at t + 1 (updates insweeps).+ _Separation of time scales_: drive only once all sites are stable, i.e. z_n ≤ z^c (quiescence).+ _Key observables_ (see Sec. 1.3):avalanche sizes, the total number of topplings until quiescence;avalanche duration T , the total number of parallel updates until quiescence<jupyter_code>from SOC.models import BTW<jupyter_output>/progs/miniconda3/lib/python3.7/site-packages/statsmodels/tools/_testing.py:19: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
  import pandas.util.testing as tm<jupyter_text>Empty model<jupyter_code>b = BTW(30, save_every = 10)
b.run(10000, wait_for_n_iters=0)<jupyter_output>Waiting for wait_for_n_iters=0 iterations before collecting data. This should let the system thermalize.<jupyter_text>pomysł na test: cała siatka pełna trójek, upuszczamy jedno ziarenko, AvalancheSize powinno pójść po całości<jupyter_code>b.animate_states(notebook=True)
b.plot_state();
b.run(50000)
b.plot_state();
b.animate_states(notebook=True)<jupyter_output><empty_output><jupyter_text>Uniform model load<jupyter_code>b2 = BTW(10)
b2.values[1:-1,1:-1] = 5
b2.plot_state()
b2.AvalancheLoop()
b2.plot_state()
b2 = BTW(50)
b2.values[1:-1,1:-1] = 40
b2.plot_state()
b2.AvalancheLoop()
b2.plot_state();<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09843982169390787, 'fraction_numerical': 0.029717682020802376, 'mean_word_length': 5.6004901960784315, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '71845', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1006, 'n_tokens_neox': 906, 'n_words': 317, 'path': 'docsrc/source/BTW.ipynb', 'repo_name': 'amjankowska/SocSIM', 'size': '2692'}