# Molecular diffusion

Molecular diffusion, often simply called diffusion, is the thermal motion of all (liquid or gas) particles at temperatures above absolute zero. The rate of this movement is a function of temperature, viscosity of the fluid and the size (mass) of the particles. Diffusion explains the net flux of molecules from a region of higher concentration to one of lower concentration. Once the concentrations are equal the molecules continue to move, but since there is no concentration gradient the process of molecular diffusion has ceased and is instead governed by the process of self-diffusion, originating from the random motion of the molecules. The result of diffusion is a gradual mixing of material such that the distribution of molecules is uniform. Since the molecules are still in motion, but an equilibrium has been established, the result of molecular diffusion is called a "dynamic equilibrium". In a phase with uniform temperature, absent external net forces acting on the particles, the diffusion process will eventually result in complete mixing.
Consider two systems; S$_1$ and S$_2$ at the same temperature and capable of exchanging particles. If there is a change in the potential energy of a system; for example μ$_1$>μ$_2$ (μ is Chemical potential) an energy flow will occur from S$_1$ to S$_2$, because nature always prefers low energy and maximum entropy.
Molecular diffusion is typically described mathematically using Fick's laws of diffusion.

## Applications

Diffusion is of fundamental importance in many disciplines of physics, chemistry, and biology. Some example applications of diffusion:
* Sintering to produce solid materials (powder metallurgy, production of ceramics)
* Chemical reactor design
* Catalyst design in chemical industry
* Steel can be diffused (e.g., with carbon or nitrogen) to modify its properties
* Doping during production of semiconductors.

## Significance

Diffusion is part of the transport phenomena. Of mass transport mechanisms, molecular diffusion is known as a slower one.

### Biology

In cell biology, diffusion is a main form of transport for necessary materials such as amino acids within cells. Diffusion of solvents, such as water, through a semipermeable membrane is classified as osmosis.
Metabolism and respiration rely in part upon diffusion in addition to bulk or active processes. For example, in the alveoli of mammalian lungs, due to differences in partial pressures across the alveolar-capillary membrane, oxygen diffuses into the blood and carbon dioxide diffuses out. Lungs contain a large surface area to facilitate this gas exchange process.

## Tracer, self- and chemical diffusion

Fundamentally, two types of diffusion are distinguished:
* Tracer diffusion and Self-diffusion, which is a spontaneous mixing of molecules taking place in the absence of concentration (or chemical potential) gradient. This type of diffusion can be followed using isotopic tracers, hence the name. The tracer diffusion is usually assumed to be identical to self-diffusion (assuming no significant isotopic effect). This diffusion can take place under equilibrium. An excellent method for the measurement of self-diffusion coefficients is pulsed field gradient (PFG) NMR, where no isotopic tracers are needed. In a so-called NMR spin echo experiment this technique uses the nuclear spin precession phase, allowing to distinguish chemically and physically completely identical species e.g. in the liquid phase, as for example water molecules within liquid water. The self-diffusion coefficient of water has been experimentally determined with high accuracy and thus serves often as a reference value for measurements on other liquids. The self-diffusion coefficient of neat water is: 2.299·10$^{−9}$ m$^2$·s$^{−1}$ at 25 °C and 1.261·10$^{−9}$ m$^2$·s$^{−1}$ at 4 °C.
* Chemical diffusion occurs in a presence of concentration (or chemical potential) gradient and it results in net transport of mass. This is the process described by the diffusion equation. This diffusion is always a non-equilibrium process, increases the system entropy, and brings the system closer to equilibrium.
The diffusion coefficients for these two types of diffusion are generally different because the diffusion coefficient for chemical diffusion is binary and it includes the effects due to the correlation of the movement of the different diffusing species.

## Non-equilibrium system

Because chemical diffusion is a net transport process, the system in which it takes place is not an equilibrium system (i.e. it is not at rest yet). Many results in classical thermodynamics are not easily applied to non-equilibrium systems. However, there sometimes occur so-called quasi-steady states, where the diffusion process does not change in time, where classical results may locally apply. As the name suggests, this process is a not a true equilibrium since the system is still evolving.
Non-equilibrium fluid systems can be successfully modeled with Landau-Lifshitz fluctuating hydrodynamics. In this theoretical framework, diffusion is due to fluctuations whose dimensions range from the molecular scale to the macroscopic scale.
Chemical diffusion increases the entropy of a system, i.e. diffusion is a spontaneous and irreversible process. Particles can spread out by diffusion, but will not spontaneously re-order themselves (absent changes to the system, assuming no creation of new chemical bonds, and absent external forces acting on the particle).

## Concentration dependent "collective" diffusion

Collective diffusion is the diffusion of a large number of particles, most often within a solvent.
Contrary to brownian motion, which is the diffusion of a single particle, interactions between particles may have to be considered, unless the particles form an ideal mix with their solvent (ideal mix conditions correspond to the case where the interactions between the solvent and particles are identical to the interactions between particles and the interactions between solvent molecules; in this case, the particles do not interact when inside the solvent).
In case of an ideal mix, the particle diffusion equation holds true and the diffusion coefficient D the speed of diffusion in the particle diffusion equation is independent of particle concentration. In other cases, resulting interactions between particles within the solvent will account for the following effects:
* the diffusion coefficient D in the particle diffusion equation becomes dependent of concentration. For an attractive interaction between particles, the diffusion coefficient tends to decrease as concentration increases. For a repulsive interaction between particles, the diffusion coefficient tends to increase as concentration increases.
* In the case of an attractive interaction between particles, particles exhibit a tendency to coalesce and form clusters if their concentration lies above a certain threshold. This is equivalent to a precipitation chemical reaction (and if the considered diffusing particles are chemical molecules in solution, then it is a precipitation).

## Molecular diffusion of gases

Transport of material in stagnant fluid or across streamlines of a fluid in a laminar flow occurs by molecular diffusion. Two adjacent compartments separated by a partition, containing pure gases A or B may be envisaged. Random movement of all molecules occurs so that after a period molecules are found remote from their original positions. If the partition is removed, some molecules of A move towards the region occupied by B, their number depends on the number of molecules at the region considered. Concurrently, molecules of B diffuse toward regimens formerly occupied by pure A. Finally, complete mixing occurs. Before this point in time, a gradual variation in the concentration of A occurs along an axis, designated x, which joins the original compartments. This variation, expressed mathematically as -dC$_A$/dx, where C$_A$ is the concentration of A. The negative sign arises because the concentration of A decreases as the distance x increases. Similarly, the variation in the concentration of gas B is -dC$_B$/dx. The rate of diffusion of A, N$_A$, depend on concentration gradient and the average velocity with which the molecules of A moves in the x direction. This relationship is expressed by Fick's law
    $N_{A}=-D_{AB}{\frac {dC_{A}}{dx}}$ (only applicable for no bulk motion)
where D is the diffusivity of A through B, proportional to the average molecular velocity and, therefore dependent on the temperature and pressure of gases. The rate of diffusion N$_A$ is usually expressed as the number of moles diffusing across unit area in unit time. As with the basic equation of heat transfer, this indicates that the rate of force is directly proportional to the driving force, which is the concentration gradient.
This basic equation applies to a number of situations. Restricting discussion exclusively to steady state conditions, in which neither dC$_A$/dx or dC$_B$/dx change with time, equimolecular counterdiffusion is considered first.

## Equimolecular counterdiffusion

If no bulk flow occurs in an element of length dx, the rates of diffusion of two ideal gases (of similar molar volume) A and B must be equal and opposite, that is $N_{A}=-N_{B}$.
The partial pressure of A changes by dP$_A$ over the distance dx. Similarly, the partial pressure of B changes dP$_B$. As there is no difference in total pressure across the element (no bulk flow), we have
    ${\frac {dP_{A}}{dx}}=-{\frac {dP_{B}}{dx}}$.
For an ideal gas the partial pressure is related to the molar concentration by the relation
    $P_{A}V=n_{A}RT$
where n$_A$ is the number of moles of gas A in a volume V. As the molar concentration C$_A$ is equal to n$_A$/ V therefore
    $P_{A}=C_{A}RT$
Consequently, for gas A,
    $N_{A}=-D_{AB}{\frac {1}{RT}}{\frac {dP_{A}}{dx}}$
where D$_{AB}$ is the diffusivity of A in B. Similarly,
    $N_{B}=-D_{BA}{\frac {1}{RT}}{\frac {dP_{B}}{dx}}=D_{AB}{\frac {1}{RT}}{\frac {dP_{A}}{dx}}$
Considering that dP$_A$/dx=-dP$_B$/dx, it therefore proves that D$_{AB}$=D$_{BA}$=D. If the partial pressure of A at x$_1$ is P$_{A1}$ and x$_2$ is P$_{A2}$, integration of above equation,
    $N_{A}=-{\frac {D}{RT}}{\frac {(P_{A2}-P_{A1})}{x_{2}-x_{1}}}$
A similar equation may be derived for the counterdiffusion of gas B.