diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /536/CH10/EX10.6 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '536/CH10/EX10.6')
-rwxr-xr-x | 536/CH10/EX10.6/Example_10_6.sce | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/536/CH10/EX10.6/Example_10_6.sce b/536/CH10/EX10.6/Example_10_6.sce new file mode 100755 index 000000000..969aa707f --- /dev/null +++ b/536/CH10/EX10.6/Example_10_6.sce @@ -0,0 +1,25 @@ +clear;
+clc;
+
+printf("Example 10.6\n");
+
+//Diffusivity of CO2 in ethanol
+D=4D-9; //in m^2/s
+t=100; //Time in sec
+
+//Solving all the integral as defined in the proces
+//as per described in the book
+//a useful result is obtained
+
+Cai=poly([0],'x');
+
+y=[0 10^-3];
+
+for i=1:2
+ mole(i)=((2*sqrt(D*t/%pi)*exp(-y(i)^2/(4*D*t)))-(y(i)*erfc(y(i)/(2*sqrt(D*t)))));
+end
+ret=(mole(1)-mole(2))/mole(1);
+
+printf("\nProportion retained is %.1f %%\n",ret*100);
+
+//End
\ No newline at end of file |