This example we calculate diffusion
in a metal alloy
and what we have is
a surface layer that we want to diffuse carbon
into to change the properties or harden the material. The alloy starts out with
a carbon concentration that's uniform a tenth percent
Then we are going to do diffusion at 1000 degrees. We need high temperatures to
do it in a realistic amount of time and we are going to do this by maintaining a constant
surface concentration of 1.5 weight percent
We have a gas-phase that deposits carbon
on the surface and keeps that constant. And the question is how long does it take
before we get to a certain concentration? In this case we calculate
when the carbon concentration in the alloy is one percent
at a distance one millimeter below the surface
and we are given the diffusion coefficient
at a thousand-degrees C
So essentially what we're looking at is this physical situation. Initially
if I'm plotting concentration. So I am plotting concentration in this direction
distance into the alloy in this direction
X equal 0. We start off with a uniform concentration
a tenth percent. Then at time zero we're going to make the concentration 1.5
percent
right at the surface and then at later times what's going to happen? We're
maintaining the
concentration at 1.5 percent and we're diffusing
into the alloy. So at longer distances it is still a tenth percent
So this is a short time, longer time
This is the time we're interested in where one millimeter in the
concentration now
is one percent. So we want to calculate
the time to get to this concentration profile
So in this system we have two
independent variables, the distance and the time
and then the concentration is our third variable
The system is modeled by Fick's 2nd law
an unsteady state equation, namely things are changing with time
So the partial derivative the concentration with respect to
time is related to the partial derivative with respect to x
where D is the diffusion coefficient of carbon
in the alloy. A common simplification
is to assume this diffusion coefficient is a constant
at a given temperature. We have to have partial derivatives because we have these two
variables and then of course we need boundary conditions to be able to
solve this and so what we write is
at the start t equals 0 the concentration
is initial concentration which in this case a tenth-percent
and that's everywhere. We are assuming this is
a big enough material, we're only defusing the surface layer that
far enough out we're still gonna be at a tenth
of a weight percent, our initial concentration. So now time greater than 0
right at the surface we jump the concentration up
1.5 percent. Call that the surface concentration
and for our problem it's 1.5 percent. And then
at X equals infinity
in which we're far enough away, we assume we haven't changed the concentration, it
is still that
0.1%. So we're assuming the slab is thick enough
that we haven't diffused carbon all the way to the
other end otherwise these equations would not apply
So this equation has been solved and there are books that list solutions to these type
of equations
And so for these boundary conditions it turns out
the concentration at any point x minus the
initial concentration at time equals 0 over the surface concentration minus
"c0"
is one minus, its in terms of an
error function, and the square root of time
and the diffusivity. And the error function is just a mathematical function
that arises in a number of cases. So the error function
of y is 2 over the square root of pi
integral from 0 to y exp(-t^2) dt
So there are tables of error functions
or there are programs that can calculate the error functions. So we want to use that
to determine for our problem how long it takes to get
the concentration of 1 percent one millimeter into this alloy
So here I have substituted in the values. We want
the concentration X namely one millimeter
equal to 1 percent. Initial concentration is a tenth
and the surface concentration, which is constant, is 1.5
The error function of one millimeter is 10 minus 3 meters
so we want units to be consistent. And here's the diffusivity
and so this number is, which means we could
rearrange this equation so all I've done here's the algebra
I bring the error function to left side this 0.6429 to the right side
Keep in mind the way I have written this the
time has units of seconds because the units in
diffusivity are seconds. Everything inside this parenthesis I call y
This is equal 0.3571. So I can go to error function table or
program, I happen to use Polymath,
to calculate the value of y. y is
0.328 which means
this term here is equal to 0.328
And so the time is a large number of seconds
or 6.45 hours. So this is the time to diffuse
until one millimeter has a concentration of 1 percent carbon