28 TracerDiffusion PDF
28 TracerDiffusion PDF
28 TracerDiffusion PDF
M P Gururajan‡
28 February, 2023
1
Tracer diffusion†
MM 677: Diffusion and Kinetics
M P Gururajan‡
28 February, 2023
In this tutorial, we will use solve two problems. One is the tracer diffusion data
from which we evaluate the diffusivity. The second is the Boltzmann-Matano
anlysis to obtain the composition dependent diffusivity. For this, we will take
the diffusion couple experimental data from the Cu-Zn system and carry out
the Matano analysis and the evaluation of concentration dependent diffusivity.
X <-read.csv("Data/TracerDiffusionData.csv")
View(X)
plot(X$x,X$c,xlab="Depth in cm", ylab="Isotope fraction",main="Oxygen tracer diffusion in Fe
2
Distance (in cm Normalised fraction of iostopes
0.0002122 0.015616
0.0004751 0.015085
0.0007642 0.014471
0.0010528 0.01353
0.0014736 0.012754
0.0018941 0.011814
0.0022095 0.011119
0.0025514 0.010465
0.0029723 0.00977
0.0033933 0.009117
0.0037616 0.008463
0.004209 0.00781
0.0045509 0.007197
0.0049194 0.006666
0.005367 0.006136
0.0058674 0.005606
0.0063939 0.004912
0.0070523 0.004219
0.0078163 0.003567
0.008633 0.002875
0.0093183 0.002469
0.0102673 0.001982
0.0111371 0.001454
0.0119809 0.001131
0.0133787 0.00077
0.0148294 0.000491
0.0164914 0.000336
0.0185227 0.000183
0.0203169 0.000152
0.0218472 0.00016
3
Oxygen tracer diffusion in Fe−doped SrTiO$_3$
0.015
0.010
Isotope fraction
0.005
0.000
Depth in cm
Figure 1: Plot of the depth (in cm) versus isotope fraction; oxygen tracer diffu-
sion in Fe-doped SrTiO3 , for a sample annealed at 973 K for 86300 seconds
4
Note that x is in cm and the normalised isotope fraction is a proxy for the
concentration.
Let us now consider the thin-film source solution. This solution is given by
M x2
c(x, t) = √ exp − (1)
4πDt 4Dt
Taking logarithm, we obtain
x2
M
log c(x, t) = log √ − (2)
4πDt 4Dt
Let us now try to compare the fit and the data first:
fity = exp(coefficients(fit)[1])*exp(-(X$x)^2/(4*D*t))
plot(X$x,fity,type="l",ylim=c(0,0.016),xlab="Depth in cm", ylab="Isotope fraction",main="Oxy
points(X$x,X$c)
From the plot, it is clear that the fit is not great. This is because of a factor
called tracer surface exchange coefficient; the paper of De Souza and Martin
has the details about this coefficient and the correct form of solution to fit – in
their appendix. Even though we will not go into the details of this correction,
the tutorial does show how to fit the data to the thin-film source solution.
The second thing we need to do is to plot the residuals. Let us do that.
The residuals show a pattern indicating that the errors are not normally dis-
tributed and are systematic.
Finally, we can also look at the fit paramters using the commands summary and
confint:
summary(fit)
##
## Call:
## lm(formula = lnc ~ x2)
5
Oxygen tracer diffusion in Fe−doped SrTiO$_3$
0.015
0.010
Isotope fraction
0.005
0.000
Depth in cm
Figure 2: Plot of the data on depth (in cm) versus isotope fraction and the fit
to x2 versus log(c); oxygen tracer diffusion in Fe-doped SrTiO3 , for a sample
annealed at 973 K for 86300 seconds
6
Residual plot for the fit
0.006
0.004
Residuals
0.002
0.000
Depth in cm
7
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.55447 -0.33694 -0.03682 0.28201 1.09949
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -4.693e+00 9.104e-02 -51.55 <2e-16 ***
## x2 -1.078e+04 5.788e+02 -18.63 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4037 on 28 degrees of freedom
## Multiple R-squared: 0.9253,Adjusted R-squared: 0.9227
## F-statistic: 347 on 1 and 28 DF, p-value: < 2.2e-16
confint(fit)
## 2.5 % 97.5 %
## (Intercept) -4.879962 -4.506975
## x2 -11967.903958 -9596.540958
We can see that the fit parameters are good even though the fit is not great from
our point of view – in terms of systematic errors and the tracer exchange coef-
ficient correction. So, in addition to statistical measures, it is always essential
to also look at the other aspects to evaluate the fit.
M x2
c(x, t) = √ exp − (3)
4πDt 4Dt
R allows for non-linear fit using the functional form. Knowing the solution for
D, we can give the initial guess for D. For M, we start with unity.
X <-read.csv("Data/TracerDiffusionData.csv")
c <- X$c
x <- X$x
t = 86300
M = 1
D = 2.5e-10
fit <- nls(c ~ (M/sqrt(4*pi*t*D))*exp(-(x^2)/(4*D*t)),
start = list(M=1,D=2.5e-10))
summary(fit)
8
##
## Formula: c ~ (M/sqrt(4 * pi * t * D)) * exp(-(x^2)/(4 * D * t))
##
## Parameters:
## Estimate Std. Error t value Pr(>|t|)
## M 1.485e-04 4.155e-06 35.73 < 2e-16 ***
## D 1.091e-10 7.357e-12 14.83 8.7e-15 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0008602 on 28 degrees of freedom
##
## Number of iterations to convergence: 9
## Achieved convergence tolerance: 2.467e-06
fity = (coefficients(fit)[1]/sqrt(4*pi*t*coefficients(fit)[2]))*exp(-(x^2)/(4*coefficients(f
plot(X$x,fity,type="l",ylim=c(0,0.016),xlab="Depth in cm", ylab="Isotope fraction",main="Oxy
points(X$x,X$c)
9
Oxygen tracer diffusion in Fe−doped SrTiO$_3$
0.015
0.010
Isotope fraction
0.005
0.000
Depth in cm
plot(x,c-fity,xlab="Position",ylab="Residual",main="Plot of residuals")
10
Plot of residuals
0.0020
0.0015
0.0010
Residual
0.0005
0.0000
−0.0005
−0.0010
Position
Note that the diffusivity is the same order as earlier – but the number itself
is off by a factor or 2 or so. In this case also, the residuals are not normally
distributed; and, the data and the fit are not great. As indicated in the previous,
there are other physics that we have missed incorporating here. However, this
exercise still indicates how we can do non-linear least squares fitting to data.
11