Mass Diffusion Simulator Back
Mass Transfer Simulator

Mass Diffusion Simulator — Fick's Law & Arrhenius Model

Compute exact concentration profiles using Fick's diffusion equation (erfc solution). Slide temperature to explore Arrhenius D(T) and understand carbon carburizing or semiconductor doping in real time.

Material Preset
Diffusion Parameters
Temperature T (°C)
°C
Initial Conc. C₀ (mol/m³)
mol/m³
Observation Time t (s)
s
x Range (mm)
mm
Arrhenius Parameters
Pre-exp. D₀ (m²/s)
Activation Energy Q (kJ/mol)
kJ/mol
Summary

While paused, move the sliders to update the result instantly.

Steady Diffusion Through a Film — Molecules Drift Down the Gradient
Molar flux N (mol/m²·s)
Gradient dC/dx (mol/m⁴)
Diffusivity D (m²/s)
Transfer rate N·A (mol/s)

Fick's first law $N=-D\,\dfrac{dC}{dx}$. For a steady film $N=D\,\dfrac{C_1-C_2}{L}$. Arrow length ∝ flux. Watch the net drift from the high-concentration side (left) to the low side (right).

Results
D (m²/s)
Depth 2√Dt (mm)
Time for C/C₀=0.1 (s)
x_L position (mm)
1000
Initial C₀ (mol/m³)
Concentration Profile — C(x) at multiple times
Arrhenius Plot — D vs 1/T
Theory & Key Formulas
$$C(x,t) = \frac{C_0}{2}\,\mathrm{erfc}\!\left(\frac{x}{2\sqrt{Dt}}\right)$$ $$D(T) = D_0\,\exp\!\left(-\frac{Q}{RT}\right)$$

R = 8.314 J/(mol·K)

What is Mass Diffusion?

🙋
What exactly is mass diffusion? I see the simulator talks about concentration profiles, but what's physically happening?
🎓
Basically, it's the process where atoms or molecules move from an area of high concentration to low concentration, trying to even things out. In practice, it's like a drop of ink spreading in water. In this simulator, we model a classic case: a material with a high surface concentration, and we watch how deep the atoms penetrate over time. Try moving the "Observation Time t" slider above to see how the profile spreads.
🙋
Wait, really? So the "Initial Conc. C₀" is like the strength of the ink drop? And what's this "erfc" function in the equation? It looks complicated.
🎓
Exactly! C₀ sets the concentration at the surface (x=0). The "erfc" – complementary error function – is just a mathematical shape that describes the smooth decay from high to low concentration. It's the standard solution for this "step" initial condition. A common case is steel carburizing, where carbon atoms diffuse from a carbon-rich gas into the steel surface to harden it. The shape you see on the graph is that erfc profile.
🙋
Okay, that makes sense for one temperature. But why are there two separate equations? What does the Arrhenius model with Temperature T and Activation Energy Q do?
🎓
Great question! The first equation tells you where atoms go. The second, the Arrhenius model, tells you how fast they can move, and it's wildly sensitive to temperature. The "Activation Energy Q" is like an energy barrier atoms must hop over to diffuse. When you increase the Temperature T slider, you give atoms more thermal energy, making them hop much faster. Try it: crank up the temperature and watch the profile penetrate much deeper in the same time. This is why heat treatment processes are so hot!

Physical Model & Key Equations

The concentration profile C(x,t) for diffusion into a semi-infinite material from a constant surface concentration is given by Fick's second law. The solution is the complementary error function (erfc) profile:

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

C(x,t): Concentration at depth x and time t [mol/m³].
C₀: Initial/Surface concentration [mol/m³].
x: Depth from the surface [m].
t: Diffusion time [s].
D: Diffusion coefficient [m²/s]. It controls the spread rate.

The diffusion coefficient D is not constant; it depends exponentially on temperature, described by the Arrhenius equation. This is the core of thermal activation in solid-state diffusion.

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

D₀: Pre-exponential factor (maximum diffusivity) [m²/s].
Q: Activation energy for diffusion [J/mol]. The energy barrier an atom must overcome to move.
R: Universal gas constant, 8.314 J/(mol·K).
T: Absolute temperature [K].
The physical meaning: A small increase in T dramatically increases D, making diffusion processes exponentially faster.

Frequently Asked Questions

When you change the temperature slider, the diffusion coefficient D is recalculated based on the Arrhenius model. Higher temperatures result in a larger D, allowing you to observe in real time a concentration profile where substances penetrate deeper over the same duration.
The initial value is set to a typical value for carbon in steel (e.g., approximately 1e-11 m²/s at 1000°C). When changed with the temperature slider, it is automatically calculated according to the Arrhenius equation (D = D0 exp(-Q/RT)). The parameters corresponding to the material type are fixed internally.
Since it is an exact solution under the ideal conditions of a semi-infinite body and constant surface concentration, it is useful for obtaining approximate penetration depth estimates. However, in actual processes, finite thickness and complex boundary conditions have an impact, so numerical simulation is recommended for detailed design.
By default, it is displayed in meters (m). Since the order of magnitude varies greatly depending on the application—such as the µm order for carbon diffusion in steel and the nm order for oxygen in semiconductors—please interpret the units appropriately according to the numerical values of the simulation results.

Real-World Applications

Steel Carburizing: A key process to harden gear and bearing surfaces. Components are heated in a carbon-rich atmosphere (setting C₀), and carbon atoms diffuse into the steel. Engineers use these exact equations to calculate time and temperature needed to achieve a specific hardened case depth.

Semiconductor Doping: Creating the p-n junctions in silicon chips. Dopant atoms (like boron or phosphorus) are diffused into silicon wafers at high temperatures. Precise control of the concentration profile (via D and t) is critical for transistor performance.

Battery Electrode Design: The rate at which lithium ions can diffuse into an electrode material (its diffusivity D) limits how fast a battery can be charged or discharged. The Arrhenius model helps predict battery performance at different operating temperatures.

Corrosion & Oxidation: The growth of protective oxide layers (like alumina on aluminum) or the penetration of corrosive species into a metal is governed by diffusion. Understanding how temperature (via the Arrhenius model) affects these rates is essential for material selection in harsh environments.

Common Misconceptions and Points to Note

When you start using this simulator, there are several points beginners often stumble on. First, "the diffusion coefficient D is not a fixed material property". This is really important. When you select "Carbon in Steel" in the tool, the initial D value displayed is merely one value at the initial temperature (e.g., 900°C). When you move the temperature slider, D changes dramatically; this is not because the material changed, but because for the same material, the ease of diffusion changes exponentially with temperature. In practice, it's dangerous to memorize "D for this material is this value"; you must always consider "D at what temperature?" as a set.

Next, set the surface concentration C₀ realistically. While you can change it freely in the simulator, in actual carburizing processes, the upper limit is the "equilibrium surface concentration at that temperature," determined by the carbon potential of the furnace atmosphere and the temperature. For example, when carburizing steel at 950°C, the surface carbon concentration is limited to about 1.0–1.2 wt% at most. If you set this to an unrealistic value like 2.0%, the calculation results become completely useless.

Finally, understand the limitations of the "semi-infinite solid" model. This exact solution holds when the material is sufficiently thick, and the influence of the opposite end can be ignored. It cannot be used for cases like diffusion from both sides of a thin sheet (e.g., a 1mm thick sheet). If your calculation results deviate from reality, you need to re-examine the applicability of the model itself.