summaryrefslogtreecommitdiff
path: root/1085/CH7/EX7.2/ex7_2.sce
blob: 9a747b39884fa8bd03a89038c8cdf7382a4c34cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Exam:7.2
clc;
clear;
close;
D=4*10^(-17);//diffusion coefficient of carbon in given steel in m2/s
c_s=3*10^26;//Surface concentration of boron atoms in the surface
c_1=0;//Initial uniform concentration of the element in the solid
c_x=10^23;//Concentration of the diffusing element at a distance x from thesurface
x=2*10^(-6);//depth from the surface in m
//(c_s-c_x)/(c_s-c_1)=erf(x/(2*(D*t)^(1/2)))
a=(erfinv((c_s-c_x)/(c_s-c_1)));
disp(a,'==')
t=(x^2/(D*4*(2.55)^2));//time required to get a boron content of 1023 atoms per m3 at a depth of 2 micro meter
disp(t,'time required to get a boron content of 1023 atoms per m3 at a depth of 2 micro meter(in sec)=');
disp((c_s-c_x)/(c_s-c_1));
T=(x/(2*(2.55)*D^(1/2)))^2;
disp(T,'==')