summaryrefslogtreecommitdiff
path: root/1040/CH2/EX2.1
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1040/CH2/EX2.1
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '1040/CH2/EX2.1')
-rw-r--r--1040/CH2/EX2.1/Chapter2_Ex1.sce84
1 files changed, 84 insertions, 0 deletions
diff --git a/1040/CH2/EX2.1/Chapter2_Ex1.sce b/1040/CH2/EX2.1/Chapter2_Ex1.sce
new file mode 100644
index 000000000..d0026aeba
--- /dev/null
+++ b/1040/CH2/EX2.1/Chapter2_Ex1.sce
@@ -0,0 +1,84 @@
+//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc. USA,pp 436.
+//Chapter-2 Ex2.1 Pg No.52
+//Title: Effectiveness factor for solid catalyzed reaction
+//======================================================================================================================
+clear
+clc
+clf
+//INPUT
+// Case: I constant hydrogen pressure: P_H2= 2110 torr
+P_B=[70 185 286];// Benzene Pressure (torr)
+r_1=1E-3 *[4.27 5.4 6.12];//(mol/hr g) observed rates
+P_H2_const=2110;//Constant Hydrogen Pressure (torr)
+
+
+// Case: II Constant benzene pressure P_B_const=70 torr
+P_H2=[1050 2105 2988];// Hydrogen Pressure (torr)
+r_2=1E-3 * [3.81 4.27 4.5];//(mol/hr g) observed rates
+P_B_const=70;//Constant Benzene Pressure (torr)
+
+//CALCULATION
+// Case: I constant hydrogen pressure: P_H2= 2110 torr
+
+n=length(P_B)
+for i=1:n
+ Y_1(i)=(P_B(i)*P_H2_const/r_1(i))^(1/3);
+ X_1(i)=P_B(i);
+end
+coefs_I=regress(X_1',Y_1');
+intercept_1=coefs_I(1)
+slope_1=coefs_I(2)
+
+// Case: II Constant benzene pressure P_B_const=70 torr
+m=length(P_H2)
+for i=1:n
+ Y_2(i)=(P_B_const*P_H2(i)/r_2(i))^(1/3);
+ X_2(i)=(P_H2(i))^0.5;
+end
+coefs_II=regress(X_2',Y_2');
+intercept_2=coefs_II(1);
+slope_2=coefs_II(2);
+coef_1=(intercept_1)^0.5;
+coef_2=(slope_1*slope_2)^(1/2)*(slope_1/slope_2)*intercept_1;
+
+function y=funct1(K_H2)
+ y=coef_2*K_H2^0.5-coef_1*K_H2^(4/3)-1
+endfunction
+
+[K_H2_res]=fsolve(0,funct1);
+
+K_B=K_H2_res^(4/3)*(slope_1/slope_2);
+
+k=(0.635)^(-1/3)*K_B^2/K_H2_res;
+scf(0)
+plot(X_1,Y_1,'-*-')
+xtitle('Benzene Hydrogenation(a)Variable benzene pressure')
+xlabel("P_B (torr)");
+ylabel("(P_H2 P_B/10^3 r)^(1/3)");
+legend('T=67.6 °C');
+
+scf(1)
+plot(X_2,Y_2,'-*-')
+xtitle('Benzene Hydrogenation(b)Variable hydrogen pressure')
+xlabel("P_H2 (torr)");
+ylabel("(P_H2 P_B/10^3 r)^(1/3)");
+legend('T=67.6 °C');
+
+//OUTPUT
+mprintf('\n Solving for the three parameters gives');
+mprintf('\n K_H2 = %f torr^-1',K_H2_res);
+mprintf('\n K_B = %f torr^-1',K_B);
+mprintf('\n k = %E ',k);
+
+//FILE OUTPUT
+fid= mopen('.\Chapter2-Ex1-Output.txt','w');
+mfprintf(fid,'\n Solving for the three parameters gives');
+mfprintf(fid,'\n K_H2 = %f torr^-1',K_H2_res);
+mfprintf(fid,'\n K_B = %f torr^-1',K_B);
+mfprintf(fid,'\n k = %E ',k);
+mclose(fid);
+
+//===============================================================================================================================================================
+//Disclaimer: Page 53 There is a typo in the equation for Y obtained for Model case I: Constant hydrogen pressure and variable benzene pressure formulation
+// From Fig 2.7(a), It is evident that for P_H2 = 2110 torr, three experimental points are considered for linear regression. However, from table 2.1, only two points corresponds to P_H2 = 2110 torr. In comparison with Fig. 2.7(a), the table value corresponding to P_H2 = 2105 is also read as P_H2 = 2110.
+//Therefore the values of the constants are different from that obtained in the textbook. Also regression is used to obtain the values of slopes and intercept whereas the textbook considers graphical method for the computation of the codes