summaryrefslogtreecommitdiff
path: root/539/CH5
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /539/CH5
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '539/CH5')
-rwxr-xr-x539/CH5/EX5.1/Example_5_1.sce19
-rwxr-xr-x539/CH5/EX5.2/Example_5_2.sce23
-rwxr-xr-x539/CH5/EX5.3/Example_5_3.sce17
-rwxr-xr-x539/CH5/EX5.4/Example_5_4.sce17
-rwxr-xr-x539/CH5/EX5.5/Example_5_5.sce23
-rwxr-xr-x539/CH5/EX5.6/Design_Example_5_1.sce33
6 files changed, 132 insertions, 0 deletions
diff --git a/539/CH5/EX5.1/Example_5_1.sce b/539/CH5/EX5.1/Example_5_1.sce
new file mode 100755
index 000000000..dbe95e30c
--- /dev/null
+++ b/539/CH5/EX5.1/Example_5_1.sce
@@ -0,0 +1,19 @@
+//Diffusion Flux Computation
+
+clear;
+clc;
+
+printf("\tExample 5.1\n");
+
+Ca=1.2; //Concentration at A in kg/m^3
+Cb=0.8; //Concentration at B in kg/m^3
+
+xa=5*10^-3; //Position 1 in m
+xb=10*10^-3; //Position 2 in m
+
+D=3*10^-11; //Diffusion coefficient in m^2/s
+
+J=-D*(Ca-Cb)/(xa-xb);
+printf("\nDiffusion flux is %.1f * 10^-9 kg/m^2-s",J/10^-9);
+
+//End \ No newline at end of file
diff --git a/539/CH5/EX5.2/Example_5_2.sce b/539/CH5/EX5.2/Example_5_2.sce
new file mode 100755
index 000000000..62114cc04
--- /dev/null
+++ b/539/CH5/EX5.2/Example_5_2.sce
@@ -0,0 +1,23 @@
+//Nonsteady-State Diffusion Time Computation I
+
+clear;
+clc;
+
+printf("\tExample 5.2\n");
+
+Co=0.25; //Initial Conc. in wt%
+Cs=1.2; //Surface conc. in wt%
+Cx=0.8; //Conc. at any x in wt%
+
+x=5*10^-4; //Position in m
+D=1.6*10^-11; //Diffusion coeff in m^2/s
+
+C=1-((Cx-Co)/(Cs-Co));
+z=erfinv(C);
+
+//But C=erf(x/2sqrt(Dt))
+t=x^2/(4*D*z^2);
+
+printf("\nTime required is %d s or %.1f h\n",t,t/3600);
+
+//End \ No newline at end of file
diff --git a/539/CH5/EX5.3/Example_5_3.sce b/539/CH5/EX5.3/Example_5_3.sce
new file mode 100755
index 000000000..51fc97cb6
--- /dev/null
+++ b/539/CH5/EX5.3/Example_5_3.sce
@@ -0,0 +1,17 @@
+//Nonsteady-State Diffusion Time Computation II
+
+clear;
+clc;
+
+printf("\tExample 5.3\n");
+
+D500=4.8*10^-14; //Diffusion coefficient at 500 C
+
+D600=5.3*10^-13; //Diffusion coefficient at 600 C
+t600=10; //Time in hours to diffuse
+
+t500=D600*t600/D500;
+
+printf("\nTime to diffuse at 500 C is %.1f h\n",t500);
+
+//End \ No newline at end of file
diff --git a/539/CH5/EX5.4/Example_5_4.sce b/539/CH5/EX5.4/Example_5_4.sce
new file mode 100755
index 000000000..09b563c1f
--- /dev/null
+++ b/539/CH5/EX5.4/Example_5_4.sce
@@ -0,0 +1,17 @@
+//Diffusion Coefficient Determination
+
+clear;
+clc;
+
+printf("\tExample 5.4\n");
+
+T=550+273; //in K
+D0=1.2*10^-4; //Temperature independent preexponential in m^2/s
+Qd=131000; //Activation energy in J/mol-K
+R=8.31; //Universal Gas constt
+
+D=D0*exp(-Qd/(R*T));
+
+printf("\nDiffusion coefficient is %.1f * 10^-13 m^2/s\n",D/10^-13);
+
+//End \ No newline at end of file
diff --git a/539/CH5/EX5.5/Example_5_5.sce b/539/CH5/EX5.5/Example_5_5.sce
new file mode 100755
index 000000000..f16339a69
--- /dev/null
+++ b/539/CH5/EX5.5/Example_5_5.sce
@@ -0,0 +1,23 @@
+//Diffusion Coefficient Activation Energy and Preexponential Calculations
+
+clear;
+clc;
+
+printf("\tExample 5.5\n");
+
+//From graph log D ad 1/T are deducted
+inv_T1=0.8*10^-3; //Reciprocal of temp. in K^-1
+inv_T2=1.1*10^-3; //Reciprocal of temp. in K^-1
+logD1=-12.4;
+logD2=-15.45;
+
+R=8.31; //Gas law Constant in J/mol-K
+
+Qd=-2.3*R*(logD1-logD2)/(inv_T1-inv_T2);
+printf("\nActivation energy is %d kJ/mol",Qd/1000);
+
+//For calculating Peexponential factor
+D0=10^(logD2+(Qd*inv_T2/(2.3*R)));
+printf("\nPreexponential factor D0 is %.1f * 10^-5 m^2/s\n",D0/10^-5);
+
+//End \ No newline at end of file
diff --git a/539/CH5/EX5.6/Design_Example_5_1.sce b/539/CH5/EX5.6/Design_Example_5_1.sce
new file mode 100755
index 000000000..33e90e73b
--- /dev/null
+++ b/539/CH5/EX5.6/Design_Example_5_1.sce
@@ -0,0 +1,33 @@
+//Diffusion Temperature–Time Heat Treatment Specification
+
+clear;
+clc;
+
+printf("\tDesign Example 5.1\n");
+
+C0=0.2; //Initial concentration in wt%
+Cs=1; //Surface conc in wt%
+Cx=0.6; //Conc at any position X in wt%
+x=7.5*10^-4; //Position in m
+D0=2.3*10^-5; //Preexponential factor in m^2/s
+R=8.31; //Gas law constant in J/mol-K
+Qd=148000; //Activation energy in J/mol
+
+C=1-((Cx-C0)/(Cs-C0));
+z=erfinv(C);
+Dt=(x/(2*z))^2;
+
+//Dt=D0*exp(-Qd/RT)*t = value of variable Dt
+D=Dt/D0;
+
+T=[900 950 1000 1050];
+for i=1:4
+ t(i)=D/exp(-Qd/(R*(T(i)+273)))/3600;
+end
+
+printf("\nTemperature(in Celsius) is\n");
+disp(T);
+printf("\nTime is (in hours)\n");
+disp(t);
+
+//End \ No newline at end of file