# Diffusion

If you grow a layered structure, you want the layers to be exactly as you have deposited them. In particular, you don't want atoms to diffuse into other layers so that the sharp boundary of layers with different compositions becomes smeared out, changing the electronic properties of the material. That is where a good understanding of diffusion processes are necessary: controlling diffusion means controlling the composition of the compound. In this section, a very short derivation of the equation modeling diffusion in general is derived, followed by a description of methods to measure diffusion and finally, a wideley used phenomenological model for fitting real-life data of diffusion will be presented.

Suppose we have a lattice with atoms which can sit on the lattice sites. Let the concentration of atoms of a certain species in the crystal at position $x$ and time $t$ be $C(x,t)$. We want to know how the concentration at time $t+\delta t$. Let the probability that an atom at position $x-\delta x_i$ will jump to $x$ be given by the function $W(\delta x_i,t)$  (or jump back in the othe other direction if the number is negative). Of course there is mass conservation so the probability that all the atoms are somewhere on the crystal lattice is 1 at all times,  so $\sum_i W(\delta x_i,t)=1$. $W(\delta x_i,t)$ is a probability distribution function. Now we can express the new concentration at position $x$ and time $t$ in terms of the old one and the distribution:

$C(x,t+\delta t)=\sum_i C(x-\delta x_i,t)W(\delta x_i,t)$

let's consider this equation in one dimension first for simplicity. We can expand it in $t$ and $x$ so that we obtain

$C(x,t)+\delta t \frac{\partial C}{\partial t}+...=\sum_i ( C(x,t)-\delta x_i \frac{\partial C}{\partial x}+\frac{\delta x^2}{2}\frac{\partial^2 C}{\partial x^2}+...)W(\delta x_i,t)$

Now as explained before, $W(\delta x_i,t)$ is a probability distribution function and $av(\delta x_i^n)=\sum_i \delta x_i^n W(\delta x_i,t)$ for $n \in \mathbf{N}$ is an weighted average. Of course, $av(x_i)=0$ for a distribution $W(\delta x_i,t)$ not subject to an external force since it the probability should be (on average) evenly distributed over the solid angles. So in terms of this new average notation and this remark, the expansion of $C(x,t)$ upto second order derivatives becomes

$\frac{\partial C}{\partial t}=\frac{av(x_i^2)}{2 \delta t} \frac{\partial^2 C}{\partial x^2}$

we define the diffusion coefficient

$D_x=\frac{av(\delta x_i^2)}{2 \delta t}$

with physical dimension area per unit time. We generalise the above differential equation to three dimensions, noting that we can always define the coordinates in such a way that mixed partial derivatives do not occur. The final result is:

$\frac{\partial C}{\partial t}=\sum_j D_{x_j}\frac{\partial^2 C}{\partial x_j^{2}}$

This equation is known as the linear diffusion equation and solving it with the initial concentration distribution and diffusion constant predicts the concentration distribution in time.

The next step is of course how to measure the diffusion constant. One can, for instance, do neutron scattering or X-ray (see the measurement techniques section). From first-order scattering theory, one knows that the obtained intensity of whatever wave is used is proportional to the square of the concentration (or density). The most general solution of the diffusion equation can be expressed in terms of a Fourier series

$c(x)=\sum_i c_i \cos(k_i x+\alpha_i)$

with $k_i = \frac{2 \pi n}{\lambda}$ where $n$ is the n-th diffraction Bragg peak order, $\lambda$ the wavelength of the particle/wave used and $\alpha_i$ a phase factor. As stated before $I \propto c_i^2$ so inserting the Fourier series in the diffusion equation yields

$I(t)=I(0)\exp(-\frac{8 \pi^2 n^2 D}{\lambda^2}t)$

or, in terms of the diffusion coefficient,

$D=\frac{\lambda^2}{8 \pi^2 n^2 t}\log(\frac{I_0}{I(t)})$

So the diffusion coefficient can be extracted from measured data using this formula.

Of course, D depends on temperature as well as on strain. To express this dependence, one uses the phenomenological Arrhenius relation

$D=D_0 \exp(-\frac{E_a}{kT})\exp(k_1 \epsilon_{strain})$

one fits this model to a dataset and $D_0$ and $E_a$ are extracted providing a model which can be used for intrapolation or extrapolation outside the known temperature or strain range.

It is basically a Boltzmann factor where $E_a$ is the activation energy for diffusion to occur (the energy), $k_1$ a prefactor for the strain energy and $\epsilon$ the strain. $D_0$ is the saturation value of the diffusion.