Fick's Second Law of Diffusion formula
| Symbol | Quantity | SI unit | Meaning |
|---|---|---|---|
| C(x,t) | Concentration at depth x | — | Concentration at depth x after time t |
| Cₛ | Surface concentration | — | Constant concentration held at the surface |
| C₀ | Initial concentration | — | Uniform concentration in the solid before diffusion starts |
| x | Depth | m | Distance below the surface |
| D | Diffusion coefficient | m²/s | Diffusion coefficient at the process temperature |
| t | Time | s | Diffusion time |
What is Fick's Second Law of Diffusion?
Fick's Second Law of Diffusion: The rate of change of concentration at a point equals the diffusion coefficient times the curvature of the concentration profile. — Adolf Fick, 1855
Fick's second law governs non-steady-state diffusion, where the concentration at each point changes over time. For a semi-infinite solid whose surface is held at a constant concentration Cs, with uniform initial concentration C0 and constant D, the equation has the classic error-function solution shown above.
This is the standard model for gas carburizing and nitriding of steel, predeposition doping of silicon, and many corrosion and contamination problems. The quantity √(Dt) is the characteristic diffusion distance. Doubling the depth at the same concentration requires four times the time.
Enter any five values and the calculator solves for the sixth. For depth, time or diffusion coefficient it inverts the complementary error function numerically.
Concentrations can be in any unit (wt%, at%, mol/L, atoms/cm³) as long as C, Cₛ and C₀ use the same one. The semi-infinite assumption holds while the specimen thickness is much larger than √(Dt).
How to use this calculator
- Choose the quantity you want to find in the Calculate menu. It is highlighted as the result field.
- Enter the known values. Scientific notation such as
1.6e-11is accepted. - Select a unit for each value. Units are converted to SI automatically.
- The answer updates as you type. Open Show calculation steps to see the working, or use Copy result to share a link with your inputs.
Worked example
A steel with 0.20 wt% carbon is carburized at a temperature where D = 1.6 × 10⁻¹¹ m²/s. The surface is held at 1.20 wt% C. What is the carbon content 0.5 mm below the surface after 10 hours?
- t = 10 h = 36 000 s, so √(Dt) = √(1.6 × 10⁻¹¹ × 36 000) = 7.59 × 10⁻⁴ m.
- z = x / (2√(Dt)) = 5 × 10⁻⁴ / (2 × 7.59 × 10⁻⁴) = 0.329.
- erfc(0.329) ≈ 0.641.
- C = 0.20 + (1.20 − 0.20) × 0.641 = 0.84 wt% C.
Frequently asked questions
What is the error function (erf)?
erf(z) = (2/√π)∫₀ᶻ e^(−u²) du. It rises from 0 at z = 0 toward 1 as z grows, and erfc(z) = 1 − erf(z). It appears because the solution of the diffusion equation is built from Gaussian functions.
How do I find the time needed to reach a certain case depth?
Choose "Time (t)" in the Calculate menu, then enter the target concentration C, Cₛ, C₀, the depth x and D. The calculator finds z = erfc⁻¹[(C − C₀)/(Cₛ − C₀)] and returns t = (x / 2z)² / D.
Why does the calculator say there is no physical solution?
C must lie strictly between C₀ and Cₛ, because the profile approaches Cₛ only at the surface and C₀ only at infinite depth. Values outside that range have no solution.
What if the diffusion coefficient depends on temperature?
It nearly always does. Use the Arrhenius diffusion calculator to get D at your process temperature from D₀ and the activation energy Q, then enter that D here.