We compute the rate of absorption and the concentration profile of a solute of limited solubility, which diffuses into a semi-infinite domain and undergoes a first-order reaction.
We compute and plot the concentration profile for two different cases:
1- The first case is when penetration depth is limited by diffusion.
2- In the second case, penetration depth is limited by reaction.
We also compare our results with the analytical solution derived in Ref. 1. We find that both results are in agreement.
Governing equation and boundary conditions are:​​
Analytical solution was derived by P. V. Danckwerts in Ref.1.​​
Diffusion coefficient is
D
AB
. Rate constant is k. c0 is surface concentration.
In[]:=
D
AB
=1.510^-9;
In[]:=
k=35;
In[]:=
c0=3 10^-2;
Case 1: Penetration depth is limited by reaction:
δ
d
δ
r
>>1
In[]:=
t=10^2;
In[]:=
δ
d
=Sqrt[
D
AB
t]
Out[]=
0.000387298
In[]:=
δ
r
=Sqrt[
D
AB
/k]
Out[]=
6.54654×
-6
10
In[]:=
δ
d
δ
r
Out[]=
59.1608
In[]:=
c=.;t=.;
Solving the governing equation with NDSolve using the following boundary condition c[10
δ
r
]=0 with
δ
r
~
-5
10
.
In[]:=
sol=NDSolve[{D[c[t,x],{t,1}]
D
AB
D[c[t,x],{x,2}]-kc[t,x],c[0,x]c0Exp[-10^20x],c[t,0]c0,c[t,110^-4]0},c[t,x],{x,0,110^-4},{t,0,100}]
Out[]=
c[t,x]InterpolatingFunction
Domain: {{0.,100.},{0.,0.0001}}
Output: scalar
[t,x]
In[]:=
plt1=Plot[Chop[c[t,x]/.sol/.t->10^2],{x,0,1 10^-4},PlotRange->{0,0.03},PlotStyle->{Thick,RGBColor[1,0,0]},Frame->True,
FrameLabel->{Style["position",16],Style[" concentration ",16]},GridLines->Automatic,AspectRatio->1]
Out[]=
We plot Danckwerts' analytical solution
In[]:=
c=c0(0.5Exp[-x(k/
D
AB
)^0.5]Erfc[x/(2(t
D
AB
)^0.5)-(tk)^0.5]+0.5Exp[x(k/
D
AB
)^0.5]Erfc[x/(2(t
D
AB
)^0.5)+(tk)^0.5])
Out[]=
3
100
0.5
-152753.x

Erfc-5.91608
0.5
t
+
12909.9x
0.5
t
+0.5
152753.x

Erfc5.91608
0.5
t
+
12909.9x
0.5
t

In[]:=
plt2=Plot[Chop[c/.t->10^2],{x,0,10^-4},PlotRange->{0,0.03},PlotStyle->{Dashed,RGBColor[0,0,1]},Frame->True,
FrameLabel->{Style["position",16],Style[" concentration ",16]},GridLines->Automatic,AspectRatio->1]
Out[]=
Both methods give the same concentration profile
In[]:=
Show[plt1,plt2]
Out[]=
Let us determine the quantity of solute absorbed, Q. Using the analytical concentration expression, one gets (see Ref.1) :​1/ the Rate of absorption :​​
​​2/ the quantity of solute absorbed, Q.​​
In[]:=
D
AB
=.;
In[]:=
k=.;
In[]:=
c0=.;
In[]:=
t=.;
In[]:=
c=c0(1/2Exp[-xSqrt[k/
D
AB
]]Erfc[x/(2Sqrt[t
D
AB
])-Sqrt[tk]]+1/2Exp[xSqrt[k/
D
AB
]]Erfc[x/(2Sqrt[t
D
AB
])+Sqrt[tk]])
Out[]=
c0
1
2
-x
k
D
AB

Erfc-
kt
+
x
2
t
D
AB
+
1
2
x
k
D
AB

Erfc
kt
+
x
2
t
D
AB

In[]:=
rateofabsorption=-
D
AB
D[c,{x,1}]/.x0//FullSimplify
Out[]=
c0kErf[
kt
]
k
D
AB
+
c0
-kt

t
D
AB
π
t
In[]:=
D
AB
=1.510^-9;
In[]:=
k=35;
In[]:=
c0=3 10^-2;
In[]:=
t=.;
In[]:=
Qanalytical=NIntegrate[rateofabsorption,{t,0,10^2}]
Out[]=
0.000687386
In[]:=
Qanalytical=Quiet[c0Sqrt[
D
AB
/k]((kt+1/2)Erf[kt]+Sqrt[kt/Pi]Exp[-kt])/.t10^2.]
Out[]=
0.000687485
Case 2: Penetration depth is limited by diffusion:
δ
d
δ
r
<<1
In[]:=
t=10^-7;
In[]:=
c=.;t=.;
In[]:=
plt1=Plot[Chop[c[t,x]/.sol/.t->10^-7],{x,0,1 10^-7},PlotRange->{0,0.03},PlotStyle->{RGBColor[1,0,0],Thick},
FrameLabel->{Style["position",16],Style[" concentration ",16]},Frame->True,GridLines->Automatic,AspectRatio->1]
Let us plot Danckwerts' analytical solution:
In[]:=
plt2=Plot[Chop[c/.t->10^-7],{x,0,1 10^-7},PlotRange->{0,0.03},PlotStyle->{Dashed,RGBColor[0,0,1]},
FrameLabel->{Style["position",16],Style[" concentration ",16]},Frame->True,GridLines->Automatic,AspectRatio->1]
Both methods give the same concentration profile
In[]:=
Show[plt1,plt2]

References

◼
  • [1] P. V. Danckwerts, Absorption by simultaneous diffusion and chemical reaction, Trans. Faraday Soc., 46, pp. 300-304 (1950).
  • ◼
  • [2] C. J. Geankoplis, Transport Processes and Unit Operations, 3rd edition, Prentice Hall, 1993.
  • CITE THIS NOTEBOOK

    Unsteady-State Diffusion and Reaction in a Semi-infinite Medium​
    by Housam Binous and Ahmed Bellagi
    Wolfram Community, STAFF PICKS, February 18, 2024
    ​https://community.wolfram.com/groups/-/m/t/3125417