Random walk models of anisotropic diffusion on rectangular and hexagonal lattices
Luke P. Filippini, Adrianne L. Jenner, Elliot J. Carr
TL;DR
This work addresses simulating anisotropic diffusion in two dimensions by constructing equivalent discrete-space discrete-time random walk models for a diffusion equation with a spatially invariant tensor $\mathbf{D}$ under no-flux boundaries. A vertex-centered finite-volume discretisation on rectangular and hexagonal lattices, combined with forward Euler time-stepping, yields a simple Markov-chain representation with transition matrix $\mathbf{P}=\mathbf{I}+\tau\mathbf{C}$ and explicit transition probabilities. Rectangular lattices impose tensor-dependent constraints (e.g., $\det(\mathbf{D})\ge 3D_{xy}^2$) for valid probabilities, whereas flat-top and pointy-top hexagonal lattices accommodate any SPD diffusion tensor, ensuring a stochastic mapping. Across multiple test tensors and initial conditions, the random-walk models show good agreement with the deterministic PDE solutions, quantified by low mean-squared error, and the authors provide MATLAB code for replication. This framework offers a practical, analytically tractable approach to simulate anisotropic diffusion with intrinsic randomness on common lattice geometries.
Abstract
The diffusive transport of particles in anisotropic media is a fundamental phenomenon in computational, medical and biological disciplines. While deterministic models (partial differential equations) of such processes are well established, their inability to capture inherent randomness, and the assumption of a large number of particles, hinders their applicability. To address these issues, we present several equivalent (discrete-space discrete-time) random walk models of diffusion described by a spatially-invariant tensor on a two-dimensional domain with no-flux boundary conditions. Our approach involves discretising the deterministic model in space and time to give a homogeneous Markov chain governing particle movement between (spatial) lattice sites over time. The spatial discretisation is carried out using a vertex-centred element-based finite volume method on rectangular and hexagonal lattices, and a forward Euler discretisation in time yields a nearest-neighbour random walk model with simple analytical expressions for the transition probabilities. For each lattice configuration, analysis of these expressions yields constraints on the time step duration, spatial steps and diffusion tensor to ensure the probabilities are between zero and one. We find that model implementation on a rectangular lattice can be achieved with a constraint on the diffusion tensor, whereas a hexagonal lattice overcomes this limitation (no restrictions on the diffusion tensor). Overall, the results demonstrate good visual and quantitative (mean-squared error) agreement between the deterministic model and random walk simulations for several test cases. All results are obtained using MATLAB code available on GitHub (https://github.com/lukefilippini/Filippini2025).
