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) 900
Initial Conc. C₀ (mol/m³) 1000
Observation Time t (s) 3600
x Range (mm) 5
Arrhenius Parameters
Pre-exp. D₀ (m²/s) 2e-5
Activation Energy Q (kJ/mol) 142
Summary
D (m²/s)
Depth 2√Dt (mm)
Time for C/C₀=0.1 (s)
x_L position (mm)

Governing Equations

$$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)

Concentration Profile — C(x) at multiple times
Arrhenius Plot — D vs 1/T

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.

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.

Related Engineering Fields

The concepts behind this diffusion simulation appear in various engineering fields beyond materials engineering. For example, in battery development. The charging and discharging of lithium-ion batteries is essentially the process of lithium ions diffusing within the cathode and anode materials. Here too, the Arrhenius-type temperature dependence is at play, contributing to reduced battery performance at low temperatures. The value of the diffusion coefficient D is a key parameter determining the battery's output characteristics and charging speed.

Another field is corrosion engineering. Metal oxidation (rusting) progresses as oxygen ions or metal ions diffuse through the oxide scale (scale). Predicting high-temperature corrosion rates precisely utilizes Fick's laws and the Arrhenius model. For instance, this calculation forms the basis for evaluating how quickly a boiler steel tube loses thickness in high-temperature steam.

Furthermore, it's also applied in food and pharmaceutical engineering. The drying or salting of food ingredients, and the release of components from sustained-release drug formulations, are phenomena of moisture, salt, or drug diffusion. The mathematical forms for oxygen diffusion into silicon and salt diffusion into jerky are surprisingly similar. In this way, diffusion theory is used as a nearly universal physical language for phenomena involving the "movement" of atoms or molecules.

For Further Learning

Once you've gained an intuitive understanding with this simulator, as a next step, I recommend venturing into the world of "numerical computation". The error function solution used here is a "special case" with very simple initial and boundary conditions. In practice, because the diffusion coefficient D may change with concentration (interdiffusion) or you may deal with complex geometries, you'll usually need to solve the partial differential equation numerically using a computer. Learning those methods (like the finite difference method or finite element method) will significantly enhance your foundational skills for mastering CAE tools.

Mathematically, try delving deeper into the relationship between the error function erf(x) and the normal (Gaussian) distribution. In the argument of the solution's formula $$C(x,t) = \frac{C_0}{2}\,\mathrm{erfc}\!\left(\frac{x}{2\sqrt{Dt}}\right)$$, you find the characteristic length scale $ \sqrt{Dt} $. This is an estimate for the diffusion distance; it's useful to remember that for many phenomena, "the approximate diffusion depth is proportional to $ \sqrt{Dt} $". For example, if D becomes four times larger, the depth reached in the same time becomes two times larger.

As a next topic, it would be good to move on to "models combining diffusion and mass transport". In an actual carburizing furnace, carbon supply from the furnace gas (mass transport at the surface) and diffusion into the steel occur simultaneously, limiting each other's rates. To handle such combined processes, you need models with more realistic boundary conditions. Understanding this allows you to approach the very core of practical work: optimizing heat treatment processes.