Diffusion




Contents

This lecture provides an introduction to diffusive motion from the microscopic and macroscopic point of view. Diffusion is an important process for understanding the behavior of liquids and gases. Analyzing diffusion allows us to deploy various tools of general usefulness: probability and statistiscs, differential equations, connections between micro- and macroscopic descriptions.

Microscopic description: diffusion as random walk

Probability reminder: the binomial distribution
In a binomial process each random trial has two possible outcomes ("success" or "failure") with probabilities p and q, respectively, p + q = 1. For a set of N independent trials, the probability of m successes is

\begin{displaymath}P(N,m) ~=~ \left(\stackrel{N}{m}\right)p^mq^{N-m} ~~~~;~~~~
\left(\stackrel{N}{m}\right) ~=~ \frac{N!}{m!(N-m)!} \end{displaymath}

The binomial distribution has the following simple properties:

\begin{displaymath}\langle m \rangle ~=~ Np \end{displaymath}


\begin{displaymath}\langle m^2 \rangle ~=~ Np[p(N-1) ~+~ 1] \end{displaymath}


\begin{displaymath}\sigma^2 ~=~ \langle (m ~-~ \langle m \rangle)^2) \rangle ~=~
Npq \end{displaymath}

A simple example is a coin toss, for which the two outcomes are "heads" or "tails", and for a regular coin p = q = 0.5. For this process the mean number of "heads" is

\begin{displaymath}\langle m \rangle ~=~ Np ~=~ \frac{N}{2} \end{displaymath}


\begin{displaymath}\langle m^2 \rangle ~=~ Np[p(N-1)+1] ~=~ \frac{N(N+1)}{4} \end{displaymath}

and the standard deviation of the mean is

\begin{displaymath}\sigma_m ~=~ \frac{\sigma}{N} ~=~ \sqrt{\frac{pq}{N}} ~=~
\frac{1}{\sqrt{N}} \end{displaymath}

For more details see the binomial distribution lecture.

One-dimensional symmetric random walk
Consider a 1-dimensional random walk along the x axis, in which the walker starts at the origin (x = 0) and takes steps of fixed length a at random, either to the right (with probability p=0.5) or to the left (with pobability q = 1 - p = 0.5). After taking N steps altogether, m steps will be to the right and N-m steps to the left. We can calculate the walker's positon relative to starting point x=0:

\begin{displaymath}x ~=~ m a ~-~ (N-m) a ~=~ (2m ~-~ N) a \end{displaymath}

Now imagine that we have performed a large number of such random walks and ask about the statistics of the random variable x. We can symbolically calculate the averages of x in terms of the random variable m, when N and a are fixed at some given values:

\begin{displaymath}\langle x \rangle ~=~ \langle (2m ~-~ N)a \rangle ~=~
(2\langle m \rangle ~-~ N)a \end{displaymath}


\begin{displaymath}\langle x^2 \rangle ~=~ \langle [(2m ~-~ N)a]^2 \rangle ~=~
[4\langle m^2 \rangle ~-~4N\langle m \rangle ~+~ N^2]a^2 \end{displaymath}

Clearly, m is a random variable having a binomial distribution with p = q = 0.5, so the averages of $m$ and $m^2$ are the same as given above for a coin toss. We use this to calculate properties of x

\begin{displaymath}\langle x \rangle ~=~ (2\langle m \rangle ~-~ N)a ~=~ (N~-~N)a = 0\end{displaymath}


\begin{displaymath}\langle x^2 \rangle ~=~
[4\langle m^2 \rangle ~-~4N\langle m \rangle ~+~ N^2]a^2 ~=~
[N(N+1) ~-~ 2N^2 ~+~ N^2]a^2 ~=~ N a^2 \end{displaymath}

Our first result is that the average expected position of the walker is x=0. This makes intuitive sense. As the walker has equal probabilities of moving right or left, we expect that it its average position will be in the center. The second result is less intuitive, telling us that the square of the distance travelled is proportional to the number of steps taken N. Mathematically, we expect $<x^2>$ to be positive, as $x^2$ is a positive quantity (except at x=0). Taken together, the results for $<x>$ and $<x^2>$ tell us that while the probability of finding the walker to the left or right of x=0 are the same, we should expect to find the walker further and further away from the origin as the number of steps N increases.

Diffusion as random walk
Consider a molecule moving in a gas (or liquid). We assume the molecule moves in a series of jumps, moving in straight line over a short period of time $\tau$ with average velocity c, then colliding with another molecule. The collision is "instantaneous", i.e. very fast compared to $\tau$ and results in a random change of the velocity direction (left or right in 1 dimension, more choices in 3-dimensional world). The collision is followed by motion in straight line over an average time $\tau$ with constant average velocity c in the new direction, leading to another collision, ... etc. etc.

We introduce the quantity called the mean free path a, $a ~=~ c \tau$, describing the average distance travelled between collisions. For motion in 1 dimension, we can treat the molecular motion as a random walk with step size a, with N steps taken over time t, N = t/$\tau$. Using our random walk results, the mean square of the distance travelled over time t is then

\begin{displaymath}d^2 ~=~ \langle x^2 \rangle ~=~ Na^2 ~=~ \frac{t}{\tau} a^2 ~=~
\frac{a^2}{\tau} t ~=~ ac t~~~~(1-dimensional ~diffusion)\end{displaymath}

Where we used the property that $a/\tau ~=~ c$. Finally, we introduce the diffusion coefficient D, which for 1-dimensional motion is defined as

\begin{displaymath}D ~=~ \frac{\langle x^2 \rangle}{2t} ~~~~(def~of~D~in~1-dimension)\end{displaymath}

or

\begin{displaymath}\langle x^2 \rangle ~=~ 2Dt ~~~~~(def~of~D~in~1-dimension)\end{displaymath}

which leads to the expression for D for a 1-dimensional gas:

\begin{displaymath}D ~=~ \frac{a^2}{2\tau} ~=~ \frac{1}{2}a c t \end{displaymath}

i.e. the diffusion coefficient D is proportional to the mean free path a and mean molecular speed c.

Nature of diffusive motion. For a molecule executing ballistic motion, i.e. moving with a constant velocity c in a straight line, the distance travelled in time t is

\begin{displaymath}d ~=~ ct ~~~and~~~ d^2 ~=~ c^2t^2 ~~~~~(ballistic~motion)\end{displaymath}

Distance travelled d is proportional to time.
For diffusive motion, which consists of short ballistic flights separated by collisions (and corresponding changes in direction of motion)

\begin{displaymath}d^2 ~=~ 2Dt ~~~and~~~ d ~=~ \sqrt{2Dt} ~~~~~(diffusive~motion~in~1-dim)\end{displaymath}

Square of distance traveled $d^2$ is proportional to time.

Overall, in a sample of gas (or liquid) we might have three kinds of motions.

  1. Over short periods of time, comparable to $\tau$, molecules move in straight lines with average thermal velocity c. Typical times between collisions are about $10^{-9} s$ in gases and $10^{-12} s$ in liquids. As explained by the Kinetic Theory of Gases, the mean speeds are inversely proportional to the square root of the molecular mass, being about 500 m/s for $O_2$ and $N_2$ in air under normal conditions.
  2. Over periods of time much longer than $\tau$, molecules move diffusively within the sample.
  3. Finally, we can have convection, or convective flow, in which bulk (macroscopic) segments of the gas (or liquid) are moving together with some flow velocity v, like wind, a river or water in a pipe.

Diffusion is an effective mode of transport over short distances, e.g. inside a cell of size $10^{-6} m$. To move molecules over the whole human body (size about 1 m) it is more efficient to put them in the bloodstream, where they flow convectively with some average constant rate, powered by pumping of our heart.

Macroscopic description: Fick's laws

Concentration and flux
Consider a fluid in a tube of cross-section A extending along the x axis. Our system could be pure gas, pure liquid or a mixture. We introduce the concentration of our species of interest (gas, solute or solvent) at time t and point x along the x axis as c(x,t). We focus attention on a "slice" of the tube close to point x, between $x-b/2$ and $x+b/2$. Suppose there are n moles in this slice at time t, then the concentration c = n/V at point x and time t is defined as


\begin{displaymath}c(x,t) ~=~ \frac{n}{V} ~=~ \frac{n}{Ab} \end{displaymath}

where V is slice volume V = Ab. c(x,t) is our usual molar comcentration in moles per liter. In general c(x,t) may vary with position and with time. The second quantity we need is the flux of matter J(x,t), also called the flow of matter. J(x,t) is defined as the number of moles passing in the x direction through a surface perpendicular to the axis at point x, per unit area and unit time. The flux has a direction - it is positive when matter moves along x and negative when matter moves opposite to x direction.

Suppose the number of moles in our slice changed by a small number $\Delta n$ over a short period of time $\Delta t$. We assume there are no chemical reactions in our system, so matter will be conserved, i.e. the change of number of moles inside the slice must be equal to the number of moles which passed through the slice boundaries: $J(x-b/2)A\Delta t$ at left boundary (entering slice if J is positive) and $-J(x+b/2)A\Delta t$ at right boundary (leaving slice if J is positive):

\begin{displaymath}\Delta n ~=~ J(x-b/2,t)A\Delta t - J(x+b/2,t)A\Delta t \end{displaymath}

dividing both sides by the factor $bA\Delta t$ gives

\begin{displaymath}\frac{\Delta n}{bA\Delta t} ~=~ \frac{J(x-b/2,t) - J(x+b/2,t)}{b} \end{displaymath}

Using V = Ab and $\Delta n/V = \Delta c$, the left hand side tells us about variation of c with time


\begin{displaymath}\frac{\Delta n}{bA\Delta t} ~=~ \frac{\Delta c(x,t)}{\Delta t} ~\approx~
\frac{\partial c}{\partial t} \end{displaymath}

while the right hand side tells us about variation of the flux function J(x) with position


\begin{displaymath}\frac{J(x-b/2,t)-J(x+b/2,t)}{b} ~=~ -\frac{\Delta J}{b} ~\approx~
-\frac{\partial J}{\partial x}\end{displaymath}

and finally we get the matter conservation equation:


\begin{displaymath}\frac{\partial c}{\partial t} ~=~ - \frac{\partial J}{\partial x} \end{displaymath}

in words: the rate of change of concentration with time is equal to minus the gradient of the flux. (A derivative of a function with respect to a position variable is called a gradient. When a quantity has a non-zero gradient, that is a complicated way of saying that its value varies with position.)

Fick's first law of diffusion
This law states that the flux of matter is proportional to the concentration gradient:


\begin{displaymath}J = -D \frac{\partial c}{\partial x} ~~~~~(Fick's~first~law)\end{displaymath}

The constant D is called the diffusion coefficient. This law makes sense thermodynamically. If there is a gradient of concentration, i.e. c(x,t) varies with position, that means there will be a spontaneous flow of matter from regions of high concentration (high chemical potential) to regions of low concentration (low chemical potenial). This spotaneous lowering of the free energy is in accord with the Second Law of thermodynamics. The minus sign in the above equation is due to the fact that the flux is directed from high to low concentrations. i.e. opposite the concentration gradient. Fick's first law is based on experimental observations.

Fick's second law of diffusion: diffusion equation
Combining Fick's first law with the matter conservation equation leads to


\begin{displaymath}\frac{\partial c}{\partial t} ~=~ D \frac{\partial^2 c}{\partial x^2}
~~~~(diffusion~equation)\end{displaymath}

which is called either Fick's second law of diffusion or simply the diffusion equation. This equation relates the rate of change of concentration c(x,t) with time to the rate of change of concentration in space at a given point. The rate of change of concentration with time is proportional to the second derivative of c with respect to x (also called the curvature). In regions of large curvature the concentration undergoes fast changes in time which lead to "flattening" of the c(x) curve, i.e. elimination of the curvature.

Notice that the rate of change of c is zero when the curvature of c is zero. This is true both when c(x) = const (zero curvature of n and zero flux J = -D dc/dx = 0) and when c varies linearly with x, c(x) = ax + b, in which case the curvature is also zero and the flux is constant J = -D dc/dx = -Da. In this last case for every "slice" along the x axis the inflow balances the outflow, so c(x,t) remains constant. This last situation could correspond to two large reservoirs with different concentrations, $c_1$ and $c_2$, connected by a thin pipe. In that case the c(x,t)=c(x) in the pipe will be not change in time, but vary linearly from $c_1$ to $c_2$ as we move along the pipe.

Solution of the diffusion equation
Let us prepare our system in a special state, in which all solute molecules (e.g. glucose) are initially collected in the yz plane (i.e. at x=0) in a disk of area A, with the rest of the container filled with pure solvent (e.g. water). The solution of the diffusion equation for the concentration of the solute as a function of time is


\begin{displaymath}c(x,t) ~=~ \frac{n_0}{A\sqrt{\pi D t}} e^{-\frac{x^2}{4Dt}} \end{displaymath}

where $n_0$ is the total amount of solute and D is the diffusion coefficient of the solute. The c(x,t) plot is a Gaussian or bell-shaped function, with the height of the peak at x=0 decreasing with time and the width of the bell increasing with time. We can calculate the mean square displacement of the solute during time t as


\begin{displaymath}\langle x^2 \rangle ~=~ \frac{\int_0^{\infty} x^2 c(x,t) dx}
{\int_0^{\infty} c(x,t) dx} ~=~ 2Dt \end{displaymath}

using the well-known integrals


\begin{displaymath}\int_0^{\infty} x^{2n}e^{-ax^2} dx ~=~ \frac{1\cdot 3\cdot 5 \cdots (2n-1)}
{2^{n+1} a^n} \sqrt{\frac{\pi}{a}} \end{displaymath}

This provides the link between our random walk and diffusion equation treatments.

About this document ...

This document was generated using the LaTeX2HTML translator Version 2002 (1.62)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -split 0 -link 0 -nonavigation diffusion.tex

The translation was initiated by Krzysztof Kuczera on 2005-10-05


Krzysztof Kuczera 2005-10-05