Given some medium, e.g. water,
containing some material, say salt, the material will DIFFUSE from the
concentrated area to the dilute area. Diffusion can be generalised by Fick's law:
J=−DdxdC
where J is molar flux and D is diffusivity. Over a small control volume and
in a short period of time δt we can perform a mass balance over the
volume:
MOLES IN−MOLES OUT=Accumulated MOLES
−D∂x∂CAδt−[−D(∂x∂C+∂x2∂2Cδx)]Aδt=VΔC.
Replacing V=Aδx, and after some manipulation, we get:
−D∂x∂CAδt−[−D(∂x∂C+∂x2∂2Cδx)]Aδt=AδxΔC.
−D∂x∂CAδt+D(∂x∂C+∂x2∂2Cδx)Aδt=AδxΔC.
−D∂x∂C+D∂x∂C+D∂x2∂2Cδx=δxδtΔC.
D∂x2∂2C=δtΔC.
Taking the limit as the right hand side goes the zero we see that the above
equation approaches
∂t∂C=D∂x2∂2C
This is the 1D diffusion equation over a small control volume V.
Let us consider the case of transient diffusion through a semi-infinite
geometry. The boundary conditions in this case are
at t<0, CA=CA,i, which is the initial molar concentration.
at t>0, CA→CA,i at x=0.
at t>0, CA=CA,s.
Let us define a similarity variable, η, that combines the variable x and
t:
η=4Dtx
We can now re-write the diffusion equation in terms of the similarity variable.
Rewriting the boundary conditions in terms of η gives
CA=CA,i at t=0∴η→∞
CA=CA,s at t>0∴η=0
CA=CA,i at t>0 and as x→∞∴η=0
The similarity variable combines the variables x and t into a single
variable η. And so, the three boundary conditions collapse into two. In
order to now solve for C let U=dηdC. The above
equation then becomes,
dηdU=−2ηU
and now integrating both sides,
lnUU=−η2+C0=C1e−η2
Substituting back in for U we can solve for C.
dηdCC=C1e−η2=C1∫e−η2dη+C2
Applying the boundary conditions:
C(η=0)=Cs⇒C2=Cs
C(η→∞)=Ci⇒Ci=C1∫0∞e−η2dη+Cs
The above integral is half the Gaussian integral which can be evaluated to
2π (see this post and the resources and the end to see why
this is the case). We can, therefore, find the value of C1: