Background Theory: Diffusion in 2D¶
Go back to the interactive notebook
Source code: https://github.com/osscar-org/quantum-mechanics/blob/master/notebook/statistical-mechanics/theory/diffusion_2d.ipynb
Random walks¶
A random walk is the process where a particle (or an ensemble of particles) perform a succession of steps in space, where the direction and/or the amplitude of movement is random. A random walk can be an effective model for Brownian motion: the motion of particles (e.g. pollen in a liquid) experiencing random scattering events that completely randomize their momentum. Although each step is random, if we have a sufficiently large number of particles we can study their collective behaviour from a statistical standpoint, connecting the microscopic (random) behavior with the macroscopic observation (that can be well predicted by analytical diffusion expressions).
According to Fick's laws of diffusion, the mean squared displacement (at time $t$) for a Brownian motion is given by: $$\text{MSD}(t) = \langle(x-x_0)^2 \rangle = 2nDt \quad (1)$$ where $x_0$ is the starting position of each particle (i.e., its position at time $t=0$), $n$ is the dimensionality of the problem (e.g. 2 in 2D), and $D$ is the diffusion coefficient. The square root of MSD indicates how far, on average, particles have drifted away after time $t$, which is why we define in the main interactive plots the quantity $r_{\text{std}}=\sqrt{\text{MSD}}$. For more details on the theory of Brownian motion you can check out the wikipedia article https://www.wikiwand.com/en/Brownian_motion.
The normal distribution¶
The normal distribution or Gaussian distribution is a continuous probability distribution in real space. The density function in 1 dimension is given by:
$$f(x)=\frac{1}{\sigma \sqrt{2 \pi}} \exp(-\frac 1 2 (\frac {x - \mu}{\sigma})) \quad (2)$$
where $\sigma$ is the standard deviation of the distribution and $\mu$ is its mean. In the case of a discretized 1D random walk, where at each time step the particle can move by a step size $l$ on the left or on the right, and $q$ is the probability of moving in the positive direction (i.e., $1-q$ being the probability of moving in the negative direction), we have at time step $N$ that the mean and the standard deviation are given by: $$\mu(N) = \langle x \rangle = Nl(2q - 1) \quad (3)$$ $$\sigma^2(N) = 4Nl^2q(1-q) \quad (4)$$
From equations (3) and (4), we can easily obtain that if the random walk is unbiased ($q=0.5$, same probability of moving to the left or to the right), the mean is always zero, while the standard deviation of the particle positions at step $N$ is given by: $$\sigma(N) = l \sqrt{N} \quad (5)$$