Diffusion in Solids

Fick's laws, diffusion mechanisms, and applications in materials processing

Fick's First Law

Fick's first law relates the diffusive flux to the concentration gradient under steady-state conditions (concentration profile does not change with time):

$$J = -D\frac{dC}{dx}$$

where $J$ is the flux (atoms/mΒ²/s or mol/mΒ²/s),$D$ is the diffusion coefficient (mΒ²/s), and $dC/dx$ is the concentration gradient. The negative sign indicates that diffusion occurs down the concentration gradient (from high to low concentration).

Fick's Second Law

For non-steady-state diffusion where the concentration changes with time:

$$\frac{\partial C}{\partial t} = D\frac{\partial^2 C}{\partial x^2}$$

This is a parabolic partial differential equation (the heat equation). For a semi-infinite solid with constant surface concentration $C_s$ and initial uniform concentration $C_0$, the solution involves the complementary error function:

$$C(x,t) = C_0 + (C_s - C_0)\,\text{erfc}\!\left(\frac{x}{2\sqrt{Dt}}\right)$$

The characteristic diffusion length is $x_d = 2\sqrt{Dt}$, which sets the penetration depth of the diffusion front.

Temperature Dependence of Diffusion

Like reaction rates, the diffusion coefficient follows an Arrhenius-type temperature dependence:

$$D = D_0 \exp\!\left(-\frac{Q}{RT}\right)$$

where $D_0$ is the pre-exponential factor (frequency factor),$Q$ is the activation energy for diffusion,$R = 8.314$ J/(molΒ·K), and $T$ is absolute temperature. Plotting $\ln D$ vs $1/T$ gives a straight line with slope $-Q/R$.

Diffusion Mechanisms

Vacancy Diffusion

An atom jumps into an adjacent vacant lattice site. Requires both a neighboring vacancy and sufficient thermal energy to overcome the migration barrier. Dominant in substitutional alloys. $Q$ is typically 1–3 eV.

Interstitial Diffusion

Small atoms (C, N, H, O) move through the interstices between larger host atoms. No vacancy needed, so it is much faster than vacancy diffusion. Typical $Q \sim 0.5\text{--}1$ eV. Example: carbon in iron.

Kirkendall Effect

In a binary diffusion couple (e.g., Cu-Zn), the two species diffuse at different rates. The faster-diffusing species creates a net vacancy flux in the opposite direction, causing the interface (marked by inert markers) to shift. This was the first direct proof that diffusion in metals occurs by the vacancy mechanism, not by direct atomic interchange.

Applications

Carburization

Diffusing carbon into the surface of steel at 900–950Β°C to increase surface hardness while maintaining a tough core. Case depth controlled by $2\sqrt{Dt}$.

Semiconductor Doping

Thermal diffusion of dopants (B, P, As) into silicon at controlled temperatures to create p-n junctions. Being replaced by ion implantation for precise depth control.

Oxidation

Growth of oxide layers on metals. Parabolic growth law $x^2 = 2Dt$ when oxygen diffusion through the growing oxide is rate-limiting (Wagner theory).

Python: Fick's Second Law (Finite Difference)

Solves the diffusion equation numerically using an explicit finite difference method (FTCS scheme) for carburization of steel. Compares the numerical solution with the analytic error function result.

Fick's Second Law: Carburization

Python

Finite difference solution of the diffusion equation with error function comparison for steel carburization

script.py101 lines

Click Run to execute the Python code

Code will be executed with Python 3 on the server

Fortran: Diffusion Coefficient & Penetration Depth

Computes the diffusion coefficient at various temperatures and the penetration depth for carburization of steel, using the Arrhenius relation.

Diffusion Coefficient & Penetration Depth

Fortran

Computes D(T) for carbon in iron and carburization penetration depth vs time

diffusion_calc.f9061 lines

Click Run to execute the Fortran code

Code will be compiled with gfortran and executed on the server

Video Lectures

Lecture 35: Diffusion I

Lecture 36: Diffusion II