Modelling continuous-time random walks on fractal percolation clusters
This code implements the hybrid model for spatial and temporal disorder on graphene oxide, as described in our paper in Chemical Physics Letters.
In site percolation on a regular 2D lattice, each site is occupied with probability p. Spatial disorder is incorporated as intermediate values of p, where clusters of accessible sites will exhibit fractal-like characteristics. Particles undertaking random walks on such clusters will exhibit anomalous diffusion. Our hybrid model extends this diffusive behaviour using the theory of continuous-time random walks (CTRW), where the waiting times between jumps are drawn from a power-law distribution.
If you use this code in a publication, please cite our work:
T. Furnival, R. K. Leary, E. C. Tyo, S. Vajda, Q. M. Ramasse, J. M. Thomas, P. D. Bristowe and P. A. Midgley, "Anomalous diffusion of single metal atoms on a graphene oxide support", Chem. Phys. Lett., vol. 683, pp. 370–374, 2017. DOI:10.1016/j.cplett.2017.04.07.
ctrwfractal is released free of charge under the GNU General Public License (GPLv3).
This library makes use of the Armadillo C++ linear algebra library, which needs to be installed first. It is recommended that you use a high-speed replacement for LAPACK and BLAS such as OpenBLAS, MKL or ACML; more information can be found in the Armadillo FAQs.
$ sudo apt-get install libarmadillo-dev
# Alternatively, download and build Armadillo from source
$ sh ./install-dependencies.sh
To build the Python package from source:
$ git clone https://github.com/tjof2/ctrwfractal.git
$ cd ctrwfractal
$ pip install -e .
from ctrwfractal import CTRWfractal
est = CTRWfractal(
grid_size=64,
lattice_type="square",
n_walks=1,
n_steps=100,
)
est.run()
# Attributes:
# est.lattice_
# est.clusters_
# est.walks_
# est.analysis_
# est.occupied_fraction_
Both square and honeycomb (i.e. graphene) lattices are supported. The percolation clusters are generated using the periodic algorithm described in A fast Monte Carlo algorithm for site or bond percolation, M. E. J. Newman and R. M. Ziff, Phys. Rev. E 64, 016706 (2001).
Copyright (C) 2016-2020 Tom Furnival.