summaryrefslogtreecommitdiff
path: root/249/CH21/EX21.2
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /249/CH21/EX21.2
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 '249/CH21/EX21.2')
-rwxr-xr-x249/CH21/EX21.2/21_02.sce39
1 files changed, 39 insertions, 0 deletions
diff --git a/249/CH21/EX21.2/21_02.sce b/249/CH21/EX21.2/21_02.sce
new file mode 100755
index 000000000..74b961c15
--- /dev/null
+++ b/249/CH21/EX21.2/21_02.sce
@@ -0,0 +1,39 @@
+clear
+clc
+PAo=3;//atm
+R=82.06*10^-6;//m3.atm/mol.k
+T=730;//k
+W=1000;//kg
+FAo=5000;//mol/hr
+CAo=PAo/(R*T);
+tau=W*CAo/FAo;
+i=0;
+for t=0:5:120
+ i=i+1;
+ //Part a
+a(i)=1-(8.3125*10^-3)*t;
+XA(i)=(tau^2)*a(i)/(1+(tau^2)*a(i));
+//Part b
+a1(i)=exp(-0.05*t);
+XA1(i)=(tau^2)*a1(i)/(1+(tau^2)*a1(i));
+//Part c
+a2(i)=1/(1+3.325*t);
+XA2(i)=(tau^2)*a2(i)/(1+(tau^2)*a2(i));
+//Part d
+a3(i)=1/(sqrt(1+1333*t));
+XA3(i)=(tau^2)*a3(i)/(1+(tau^2)*a3(i));
+end
+t=[0:5:120];
+plot(t,XA,t,XA1,t,XA2,t,XA3)
+xlabel('Time(days)')
+ylabel('XA')
+legend('Zero Order','1st Order','2nd Order','3rd Order');
+XA_avg=(1/120)*integrate('(100*(1-(8.3125*10^-3)*t))/(1+100*(1-(8.3125*10^-3)*t))','t',0,120);
+XA1_avg=(1/120)*integrate('(100*exp(-0.05*t))/(1+100*exp(-0.05*t))','t',0,120);
+XA2_avg=(1/120)*integrate('(100*(1/(1+3.325*t)))/(1+100*(1/(1+3.325*t)))','t',0,120);
+XA3_avg=(1/120)*integrate('(100*1/(sqrt(1+1333*t)))/(1+100*(1/sqrt(1+1333*t)))','t',0,120);
+printf("\n for d=0,the mean conversion is % f",XA_avg)
+printf("\n for d=1,the mean conversion is % f",XA1_avg)
+printf("\n for d=2,the mean conversion is % f",XA2_avg)
+printf("\n for d=3,the mean conversion is % f",XA3_avg)
+