diff options
Diffstat (limited to 'Chemical_Reactor_Design_by_P_Harriott')
10 files changed, 3484 insertions, 0 deletions
diff --git a/Chemical_Reactor_Design_by_P_Harriott/1-Homogeneous_Kinetics.ipynb b/Chemical_Reactor_Design_by_P_Harriott/1-Homogeneous_Kinetics.ipynb new file mode 100644 index 0000000..0331541 --- /dev/null +++ b/Chemical_Reactor_Design_by_P_Harriott/1-Homogeneous_Kinetics.ipynb @@ -0,0 +1,257 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Homogeneous Kinetics" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: Activation_energy_from_packed_bed_data.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436. \n", +"//Chapter-1 Ex1.4 Pg No. 23\n", +"//Title: Activation energy from packed bed data\n", +"//=========================================================================================================\n", +"clear\n", +"clc\n", +"clf\n", +"// COMMON INPUT\n", +"L= [0 1 2 3 4 5 6 9];//Bed length in feet(ft)\n", +"T=[330 338 348 361 380 415 447 458 ] //Temperature Corresponding the bed length given (°C) \n", +"R=1.98587E-3;//Gas constant (kcal/mol K)\n", +"\n", +"//CALCLATION (Ex1.4.a)\n", +"//Basis is 1mol of feed A(Furfural) X moles reacted to form Furfuran and CO \n", +"x=(T-330)./130;//Conversion based on fractional temperature rise\n", +"n=length (T);//6 moles of steam per mole of Furfural is used to decrease temperature rise in the bed\n", +"P_mol=x+7;//Total No. of moles in product stream\n", +"for i=1:(n-1)\n", +" T_avg(i)= (T(i)+T(i+1))/2\n", +" P_molavg(i)= (P_mol(i)+P_mol(i+1))/2\n", +" delta_L(i)=L(i+1)-L(i)\n", +" k_1(i)=((P_molavg(i))/delta_L(i))*log((1-x(i))/(1-x(i+1)))\n", +" u1(i)=(1/(T_avg(i)+273.15));\n", +"end\n", +"v1=(log(k_1));\n", +"i=length(u1);\n", +"X1=[u1 ones(i,1) ];\n", +"result1= X1\v1;\n", +"k_1_dash=exp(result1(2,1));\n", +"E1=(-R)*(result1(1,1));\n", +"\n", +"//OUTPUT (Ex1.4.a)\n", +"//Console Output\n", +"mprintf('\n OUTPUT Ex1.4.a');\n", +"mprintf('\n========================================================================================\n')\n", +"mprintf('L \t \t T \t\t x \t\t T_average \t(7+x)ave \tk_1')\n", +"mprintf('\n(ft) \t \t (°C) \t\t \t\t (°C) \t ')\n", +"mprintf('\n========================================================================================')\n", +"for i=1:n-1\n", +"mprintf('\n%f \t %f \t %f ',L(i+1),T(i+1),x(i+1))\n", +"mprintf('\t %f \t %f \t %f',T_avg(i),P_molavg(i),k_1(i))\n", +"end\n", +"mprintf('\n\nThe activation energy from the slope =%f kcal/mol',E1 );\n", +"//=====================================================================================================\n", +"\n", +"\n", +"//Title: II Order Reaction \n", +"//=========================================================================================================\n", +"//CALCULATION (Ex 1.4.b)\n", +"for i=1:(n-1)\n", +" T_avg(i)= (T(i)+T(i+1))/2\n", +" P_molavg(i)= (P_mol(i)+P_mol(i+1))/2\n", +" delta_L(i)=L(i+1)-L(i)\n", +" k_2(i)=((P_molavg(i))/delta_L(i))*((x(i+1)-x(i))/((1-x(i+1))*(1-x(i))))\n", +" u2(i)=(1/(T_avg(i)+273.15));\n", +"end\n", +"v2=(log(k_2));\n", +"plot(u1.*1000,v1,'o',u2.*1000,v2,'*');\n", +"xlabel('1000/T (K^-1)');\n", +"ylabel('ln k_1 or ln k_2');\n", +"xtitle('ln k vs 1000/T ');\n", +"legend('ln k_1','ln k_2');\n", +"j=length(u2);\n", +"X2=[u2 ones(j,1) ];\n", +"result2= X2\v2;\n", +"k_2_dash=exp(result2(2,1));\n", +"E2=(-R)*(result2(1,1));\n", +"\n", +"//OUTPUT (Ex 1.4.b)\n", +"mprintf('\n OUTPUT Ex1.4.b');\n", +"mprintf('\n========================================================================================\n')\n", +"mprintf('L \t \t T \t\t x \t\t T_average \t(7+x)ave \tk_2')\n", +"mprintf('\n(ft) \t \t (°C) \t\t \t\t (°C) \t ')\n", +"mprintf('\n========================================================================================')\n", +"for i=1:n-1\n", +"mprintf('\n%f \t %f \t %f ',L(i+1),T(i+1),x(i+1))\n", +"mprintf('\t %f \t %f \t %f',T_avg(i),P_molavg(i),k_2(i))\n", +"end\n", +"mprintf('\n\nThe activation energy from the slope =%f kcal/mol',E2 );\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter1-Ex4-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex1.4.a');\n", +"mfprintf(fid,'\n========================================================================================\n')\n", +"mfprintf(fid,'L \t \t T \t\t x \t\t T_average \t(7+x)ave \tk_1')\n", +"mfprintf(fid,'\n(ft) \t \t (°C) \t\t \t\t (°C) \t ')\n", +"mfprintf(fid,'\n========================================================================================')\n", +"for i=1:n-1\n", +"mfprintf(fid,'\n%f \t %f \t %f ',L(i+1),T(i+1),x(i+1))\n", +"mfprintf(fid,'\t %f \t %f \t %f',T_avg(i),P_molavg(i),k_1(i))\n", +"end\n", +"mfprintf(fid,'\n\nThe activation energy from the slope =%f kcal/mol',E1 );\n", +"mfprintf(fid,'\n\n========================================================================================\n')\n", +"mfprintf(fid,'\n OUTPUT Ex1.4.b');\n", +"mfprintf(fid,'\n========================================================================================\n')\n", +"mfprintf(fid,'L \t \t T \t\t x \t\t T_average \t(7+x)ave \tk_2')\n", +"mfprintf(fid,'\n(ft) \t \t (°C) \t\t \t\t (°C) \t ')\n", +"mfprintf(fid,'\n========================================================================================')\n", +"for i=1:n-1\n", +"mfprintf(fid,'\n%f \t %f \t %f ',L(i+1),T(i+1),x(i+1))\n", +"mfprintf(fid,'\t %f \t %f \t %f',T_avg(i),P_molavg(i),k_2(i))\n", +"end\n", +"mfprintf(fid,'\n\nThe activation energy from the slope =%f kcal/mol',E2 );\n", +"mclose(all);\n", +"\n", +"//============================================================END OF PROGRAM===========================================\n", +"//Disclaimer (Ex1.4.a):The last value of tavg and k_1 corresponding to L=9 in Table 1.6 (Pg No. 25)of the textbook is a misprint.\n", +"// The value should be 452.5 and 4.955476 respectively instead of 455 and 18.2 as printed in the textbook.\n", +"//Hence there is a change in the activation energy obtained from the code \n", +"// The answer obtained is 21.3935 kcal/mol instead of 27 kcal/mol as reported in the textbook.\n", +"//Figure 1.8 is a plot between ln k_1 vs 1000/T instead of k_1 vs 1000/T as stated in the solution of Ex1.4.a\n", +"//=========================================================================================================\n", +"//Disclaimer (Ex1.4.b): There is a discrepancy between the computed value of activation energy and value reported in textbook \n", +"// Error could have been on similar lines as reported for example Ex.1.4.a \n", +"// Further, intermeidate values for Ex.1.4.b is not available/ reported in textbook and hence could not be compared. \n", +"//Figure 1.8 is a plot between ln k_2 vs 1000/T instead of k_2 vs 1000/T as stated in the solution of Ex1.4.b\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5: Methods_to_determine_km_and_vm.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436. \n", +"//Chapter-1 Ex1.5 Pg No. 29\n", +"//Title: Methods to determine km and vm\n", +"//========================================================================================\n", +"clear\n", +"clc\n", +"clf\n", +"//INPUT\n", +"S=[2;5;10;15]*10^(-3);//Concentration of substrate [HCO3]\n", +"r_reciprocal=[95;45;29;25]*10^(3);//Reciprocal rates (L-sec/mol)\n", +"\n", +"//CALCULATION\n", +"//Plot 1 refer equation 1.24 Pg No.29\n", +"x1=(S).^(-1);\n", +"y1=r_reciprocal;\n", +"scf(0)\n", +"plot(x1,y1*10^(-3),'RED');\n", +"xlabel('1/[S]');\n", +"ylabel('(1/r)*10^-3');\n", +"xtitle('1/r versus 1/S');\n", +"p=length(x1);\n", +"X_1=[x1 ones(p,1)];\n", +"R1=X_1\y1;\n", +"slope(1)=R1(1,1);\n", +"intercept(1)=R1(2,1);\n", +"v_m(1)=(1/(intercept(1)));//Maximum Reaction Rate(mol/L-sec)\n", +"k_m(1)=slope(1)*v_m(1);//Michaelis-Menton constant\n", +"\n", +"//Plot 2 refer equation 1.25 Pg No.29\n", +"x2=S;\n", +"y2=S.*r_reciprocal;\n", +"scf(1)\n", +"plot(x2*10^(3),y2);\n", +"xlabel('(S)*10^3');\n", +"ylabel('(S)/r');\n", +"xtitle('(S)/r versus (S)');\n", +"q=length(x2);\n", +"X_2=[x2 ones(q,1)];\n", +"R2=X_2\y2;\n", +"slope(2)=R2(1,1);\n", +"intercept(2)=R2(2,1);\n", +"v_m(2)=1/(slope(2));//Maximum Reaction Rate (mol/L-sec)\n", +"k_m(2)=intercept(2)/(slope(2));//Michaelis-Menton constant\n", +"\n", +"\n", +"//OUTPUT\n", +"mprintf('\n======================================================================================');\n", +"mprintf('\n \t\tMethod_1\tMethod_2');\n", +"mprintf('\n======================================================================================');\n", +"i=1\n", +" mprintf('\n Slope \t%f\t%f',slope(i),slope(i+1));\n", +" mprintf('\n Intercept \t%f\t%f',intercept(i),intercept(i+1));\n", +" mprintf('\n Km (M) \t%f\t%f',k_m(i),k_m(i+1));\n", +" mprintf('\n Vm(mol/L-sec) %f\t%f',v_m(i),v_m(i+1));\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter1-Ex5-Output.txt','w');\n", +"mfprintf(fid,'\n======================================================================================');\n", +"mfprintf(fid,'\n \t\tMethod_1\tMethod_2');\n", +"mfprintf(fid,'\n======================================================================================');\n", +"i=1\n", +" mfprintf(fid,'\n Slope \t%f\t%f',slope(i),slope(i+1));\n", +" mfprintf(fid,'\n Intercept \t%f\t%f',intercept(i),intercept(i+1));\n", +" mfprintf(fid,'\n Km (M) \t%f\t%f',k_m(i),k_m(i+1));\n", +" mfprintf(fid,'\n Vm(mol/L-sec) %f\t%f',v_m(i),v_m(i+1));\n", +"mclose(fid);\n", +"\n", +"//========================================================================END OF PROGRAM=================================\n", +"//Disclaimer: Least Square method is used to find the slope and intercept in this example.\n", +"// Hence the values differ from the graphically obtained values of slope and intercept in the textbook.\n", +" \n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Chemical_Reactor_Design_by_P_Harriott/10-Novel_Reactors_.ipynb b/Chemical_Reactor_Design_by_P_Harriott/10-Novel_Reactors_.ipynb new file mode 100644 index 0000000..d973c25 --- /dev/null +++ b/Chemical_Reactor_Design_by_P_Harriott/10-Novel_Reactors_.ipynb @@ -0,0 +1,255 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Novel Reactors " + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1: Fraction_unconverted_naphthalene_based_on_model_II.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P., 2003, Chemical Reactor Design (I-Edition), Marcel Dekker, Inc., USA, pp 436.\n", +"//Chapter-10 Ex10.1 Pg No. 408\n", +"//Title:Fraction unconverted naphthalene based on model II\n", +"//===========================================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"T_ref=273;//Reference Temperature\n", +"T_feed=300+T_ref;//Temperature in (K)\n", +"SV_STP=[60000 120000];//Space velocity(Hr-1)\n", +"t_cell=0.04;//Thickness(cm)\n", +"cell_unit_area=100/(2.54^2);//No of cells per unit area(cells/cm2)\n", +"L_inch=6;// Length of monolithic converter (Inches)\n", +"Epsilon=0.68;//Porosity\n", +"myu=0.0284*(10^-2);//Viscosity of air(Poise)\n", +"rho=6.17*10^(-4);//Density of air (g/cm3)\n", +"\n", +"\n", +"//CALCULATION\n", +"d=sqrt(1/cell_unit_area)- t_cell;\n", +"Epsilon=(d^2/(d+t_cell)^2);\n", +"\n", +"//Assume the wash coating lowers d to 0.21 cm and Epsilon to 0.68:\n", +"d_new=0.21;\n", +"Epsilon_new =0.68\n", +"a=4*Epsilon_new/d_new;\n", +"SV=SV_STP.*(T_feed/(T_ref*3600));//Refer equation 10.13\n", +"L_cm=L_inch*2.54;\n", +"u0=SV.*(L_cm);\n", +"u=u0.*(1/Epsilon);\n", +"Nu=myu/rho;//Kinematic viscosity\n", +"D_CO_N2_1=0.192;//Diffusion coefficients for binary gas mixtures(cm2/sec) at 288K\n", +"D_CO_N2_2=D_CO_N2_1*(T_feed/288)^(1.7);////Diffusion coefficients for binary gas mixtures(cm2/sec) at 573K\n", +"Sc=Nu/D_CO_N2_2;\n", +"for i=1:2\n", +"Re(i)=d_new*u(i)/Nu;\n", +"Re_Sc_d_by_L(i)=Re(i)*Sc*(d_new/L_cm);\n", +"Sh(i) = 3.66 *(1+0.095*Re_Sc_d_by_L(i))^(0.45);//Refer equation 10.7\n", +"k_c(i)=Sh(i)*D_CO_N2_2/d_new;\n", +"X(i)=1-exp((-k_c(i)*a*L_cm*u0(i)^(-1)));//Refer equation10.12\n", +"Percent_X(i)=X(i)*100;\n", +"end\n", +"\n", +"//OUTPUT\n", +"mprintf('\n The Conversion expected for the given space velocities ');\n", +"mprintf(' \n Space Velocity (hr-1)\t \t Conversion (%%)');\n", +"mprintf('\n ======================================================');\n", +"for i=1:2\n", +" mprintf('\n %.0f \t \t \t \t %.1f',SV_STP(i),Percent_X(i));\n", +"end\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter10-Ex1-Output.txt','w');\n", +"mfprintf(fid,'\n The Conversion expected for the given space velocities ');\n", +"mfprintf(fid,' \n Space Velocity (hr-1)\t \t Conversion (%%)');\n", +"mfprintf(fid,'\n ======================================================');\n", +"for i=1:2\n", +" mfprintf(fid,'\n %.0f \t \t \t \t %.1f',SV_STP(i),Percent_X(i));\n", +"end\n", +"mclose(fid);\n", +"\n", +"\n", +"//================================================END OF PROGRAM=========================================================\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2: Conversion_as_a_function_of_No_of_Gauzes.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P., 2003, Chemical Reactor Design (I-Edition), Marcel Dekker, Inc., USA, pp 436.\n", +"//Chapter-10 Ex10.2 Pg No. 414\n", +"//Title:Conversion as a function of No. of Gauzes\n", +"//===========================================================================================================\n", +"clear\n", +"clc\n", +"// COMMON INPUT\n", +"M_NH3=17;//Molecular weight NH3\n", +"M_air=29;//Molecular weight air\n", +"f_air=0.9;//Fraction of air in feed\n", +"f_NH3=(1-f_air);//Fraction of NH3 in feed\n", +"myu_air=0.0435*(10^-2);//Viscosity of air (Poise)\n", +"P_atm=(100+14.7)/14.7;//Pressure of the system\n", +"P_ref=1;//Reference Pressure\n", +"T_ref=273;//Reference temperature\n", +"T_inlet=300+T_ref;//Inlet Temperature\n", +"V_ref=22400;\n", +"T_surf=700+T_ref;//Surface Temperature\n", +"u0=1.8;//Velocity at 300 °C (m/sec)\n", +"d=0.076*(10^-1);//Size of wire (cm)\n", +"D_NH3_N2=0.23;//Diffusivity at 298 K 1 atm(cm2/s)\n", +"N=32;//Gauzes (wires/cm)\n", +"frac_N2 = 0.25*(10^(-2));//Fraction of NH3 fed into N2 (Byproduct reaction)\n", +"n =[1 2 5 10 15 20];//No. of Gauzes\n", +"\n", +"\n", +"//CALCULATION (Ex 10.2.a)\n", +"M_ave =f_air*M_air+f_NH3*M_NH3;\n", +"rho =(M_ave*T_ref*P_atm)/(V_ref*T_surf*P_ref);\n", +"u0_surf = u0*(T_surf/T_inlet);\n", +"Re = rho*u0_surf*100*d/myu_air;\n", +"Gamma = [1-32*(d)]^2;//From equation 10.5\n", +"Re_Gamma = Re/Gamma;\n", +"D_NH3 = 0.23*(T_surf/298)^(1.7)*(1/7.8);// at 7.8 atm 700 °C\n", +"Sc =(myu_air*P_ref)/(rho*D_NH3);\n", +"j_D = 0.644*(Re_Gamma)^(-0.57);//Refer equation 10.14\n", +"k_c = j_D*(u0_surf*100/Gamma)*(1/(Sc)^(2/3));\n", +"a_dash = 2*(%pi)*(d)*N\n", +"k_c_a_dash_u0 =(k_c*a_dash)/(u0_surf*100);\n", +"m = length(n)\n", +"for i = 1:m\n", +" X(i) = (1-exp(-k_c_a_dash_u0*n(i)));\n", +"end\n", +"//CALCULATION (Ex 10.2.b)\n", +"for i = 1:m\n", +" X(i) = (1-exp(-k_c_a_dash_u0*n(i)));\n", +" Yield(i) = X(i)-frac_N2*n(i);\n", +"end\n", +"\n", +"\n", +"//OUTPUT(Ex 10.2.a)\n", +"mprintf('\n OUTPUT Ex10.2.a');\n", +"mprintf('\n=====================================');\n", +"mprintf('\n \tThe Ammonia Conversion');\n", +"mprintf('\n=====================================');\n", +"mprintf('\n\t Gauzes Conversion');\n", +"mprintf('\n\t (n) (X)');\n", +"mprintf('\n=====================================');\n", +"for i=1:m\n", +" mprintf('\n\t %.0f \t \t %.3f',n(i),X(i));\n", +"end\n", +"\n", +"//OUTPUT(Ex 10.2.b)\n", +"mprintf('\n\n\n OUTPUT Ex10.2.b');\n", +"mprintf('\n==========================================');\n", +"mprintf('\n \tThe Ammonia Yield');\n", +"mprintf('\n==========================================');\n", +"mprintf('\n\t Gauzes Yield');\n", +"mprintf('\n\t (n) (X-%fn)',frac_N2);\n", +"mprintf('\n==========================================');\n", +"for i=1:m\n", +" mprintf('\n\t %.0f \t \t %.3f',n(i),Yield(i));\n", +"end\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter10-Ex2-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex10.2.a');\n", +"mfprintf(fid,'\n=====================================');\n", +"mfprintf(fid,'\n \tThe Ammonia Conversion');\n", +"mfprintf(fid,'\n=====================================');\n", +"mfprintf(fid,'\n\t Gauzes Conversion');\n", +"mfprintf(fid,'\n\t (n) (X)');\n", +"mfprintf(fid,'\n=====================================');\n", +"for i=1:m\n", +" mfprintf(fid,'\n\t %.0f \t \t %.3f',n(i),X(i));\n", +"end\n", +"mfprintf(fid,'\n\n\n OUTPUT Ex10.2.b');\n", +"mfprintf(fid,'\n==========================================');\n", +"mfprintf(fid,'\n \tThe Ammonia Yield');\n", +"mfprintf(fid,'\n==========================================');\n", +"mfprintf(fid,'\n\t Gauzes Yield');\n", +"mfprintf(fid,'\n\t (n) (X-%fn)',frac_N2);\n", +"mfprintf(fid,'\n==========================================');\n", +"for i=1:m\n", +" mfprintf(fid,'\n\t %.0f \t \t %.3f',n(i),Yield(i));\n", +"end\n", +"mclose(fid);\n", +"\n", +"//====================================================END OF PROGRAM====================================================\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Chemical_Reactor_Design_by_P_Harriott/2-Kinetic_Models_for_Heterogeneous_Reactions.ipynb b/Chemical_Reactor_Design_by_P_Harriott/2-Kinetic_Models_for_Heterogeneous_Reactions.ipynb new file mode 100644 index 0000000..0597118 --- /dev/null +++ b/Chemical_Reactor_Design_by_P_Harriott/2-Kinetic_Models_for_Heterogeneous_Reactions.ipynb @@ -0,0 +1,133 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Kinetic Models for Heterogeneous Reactions" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: Effectiveness_factor_for_solid_catalyzed_reaction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc. USA,pp 436.\n", +"//Chapter-2 Ex2.1 Pg No.52\n", +"//Title: Effectiveness factor for solid catalyzed reaction\n", +"//======================================================================================================================\n", +"clear\n", +"clc\n", +"clf\n", +"//INPUT\n", +"// Case: I constant hydrogen pressure: P_H2= 2110 torr \n", +"P_B=[70 185 286];// Benzene Pressure (torr)\n", +"r_1=1E-3 *[4.27 5.4 6.12];//(mol/hr g) observed rates\n", +"P_H2_const=2110;//Constant Hydrogen Pressure (torr)\n", +"\n", +"\n", +"// Case: II Constant benzene pressure P_B_const=70 torr\n", +"P_H2=[1050 2105 2988];// Hydrogen Pressure (torr)\n", +"r_2=1E-3 * [3.81 4.27 4.5];//(mol/hr g) observed rates\n", +"P_B_const=70;//Constant Benzene Pressure (torr)\n", +"\n", +"//CALCULATION\n", +"// Case: I constant hydrogen pressure: P_H2= 2110 torr \n", +"\n", +"n=length(P_B)\n", +"for i=1:n\n", +" Y_1(i)=(P_B(i)*P_H2_const/r_1(i))^(1/3);\n", +" X_1(i)=P_B(i);\n", +"end\n", +"coefs_I=regress(X_1',Y_1');\n", +"intercept_1=coefs_I(1)\n", +"slope_1=coefs_I(2)\n", +"\n", +"// Case: II Constant benzene pressure P_B_const=70 torr\n", +"m=length(P_H2)\n", +"for i=1:n\n", +" Y_2(i)=(P_B_const*P_H2(i)/r_2(i))^(1/3);\n", +" X_2(i)=(P_H2(i))^0.5;\n", +"end\n", +"coefs_II=regress(X_2',Y_2');\n", +"intercept_2=coefs_II(1);\n", +"slope_2=coefs_II(2);\n", +"coef_1=(intercept_1)^0.5;\n", +"coef_2=(slope_1*slope_2)^(1/2)*(slope_1/slope_2)*intercept_1;\n", +"\n", +"function y=funct1(K_H2)\n", +" y=coef_2*K_H2^0.5-coef_1*K_H2^(4/3)-1\n", +"endfunction\n", +"\n", +"[K_H2_res]=fsolve(0,funct1);\n", +"\n", +"K_B=K_H2_res^(4/3)*(slope_1/slope_2);\n", +"\n", +"k=(0.635)^(-1/3)*K_B^2/K_H2_res;\n", +"scf(0)\n", +"plot(X_1,Y_1,'-*-')\n", +"xtitle('Benzene Hydrogenation(a)Variable benzene pressure')\n", +"xlabel('P_B (torr)');\n", +"ylabel('(P_H2 P_B/10^3 r)^(1/3)');\n", +"legend('T=67.6 °C');\n", +"\n", +"scf(1)\n", +"plot(X_2,Y_2,'-*-')\n", +"xtitle('Benzene Hydrogenation(b)Variable hydrogen pressure')\n", +"xlabel('P_H2 (torr)');\n", +"ylabel('(P_H2 P_B/10^3 r)^(1/3)');\n", +"legend('T=67.6 °C');\n", +"\n", +"//OUTPUT\n", +"mprintf('\n Solving for the three parameters gives');\n", +"mprintf('\n K_H2 = %f torr^-1',K_H2_res);\n", +"mprintf('\n K_B = %f torr^-1',K_B);\n", +"mprintf('\n k = %E ',k);\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter2-Ex1-Output.txt','w');\n", +"mfprintf(fid,'\n Solving for the three parameters gives');\n", +"mfprintf(fid,'\n K_H2 = %f torr^-1',K_H2_res);\n", +"mfprintf(fid,'\n K_B = %f torr^-1',K_B);\n", +"mfprintf(fid,'\n k = %E ',k);\n", +"mclose(fid);\n", +"\n", +"//===============================================================================================================================================================\n", +"//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\n", +"// 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. \n", +"//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" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Chemical_Reactor_Design_by_P_Harriott/3-Ideal_Reactors.ipynb b/Chemical_Reactor_Design_by_P_Harriott/3-Ideal_Reactors.ipynb new file mode 100644 index 0000000..f601ed6 --- /dev/null +++ b/Chemical_Reactor_Design_by_P_Harriott/3-Ideal_Reactors.ipynb @@ -0,0 +1,598 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Ideal Reactors" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1: Time_to_reach_desired_conversion_for_bimolecular_batch_reaction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436. \n", +"//Chapter-1 Ex3.1 Pg No.84\n", +"//Title:Time to reach desired conversion for bimolecular batch reaction\n", +"//========================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"C_A0=1;//Assuming 1mol basis for the limiting reactant\n", +"C_B0_old=1.02;//2% Excess of reactant B is supplied\n", +"R_old=C_B0_old/C_A0;//Refer equation 3.7 Pg No.\n", +"X_A=0.995;// Conversion interms of limiting reactant\n", +"t_old=6.5;//Time required for the given conversion (hr)\n", +"C_B0_new=1.05;//5% Excess of reactant B\n", +"R_new=C_B0_new/C_A0;//Refer equation 3.7 Pg No.83\n", +"\n", +"//CALCULATION\n", +"k=(log((R_old-X_A)/(R_old*(1-X_A)))/((R_old-1)*t_old *C_A0));\n", +"t_new=log((R_new-X_A)/(R_new*(1-X_A)))/((R_new-1)*k*C_A0);\n", +"\n", +"//OUTPUT\n", +"mprintf('\nTime required to achieve required conversion for 5%% excess of B= %f hr',t_new);\n", +"\n", +"//FILE OUTPUT\n", +"fid=mopen('.\Chapter3-Ex1-Output.txt','w');\n", +"mfprintf(fid,'\nTime required to achieve required conversion for 5%% excess of B= %f hr',t_new);\n", +"mclose(fid);\n", +"//=================================================END OF PROGRAM==================================" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: Residence_time_and_heat_generation_for_four_STR_s_in_series.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-3 Ex3.2 Pg No. 96\n", +"//Title:Residence time and heat generation for four STR's in series\n", +"//========================================================================================\n", +"clear\n", +"clc\n", +"// COMMON INPUT\n", +"X_A=0.95;//Given conversion\n", +"t_batch=6;//Batch time to reach the desired conversion\n", +"N=4//No.of reactors in series\n", +"X_final=X_A;\n", +"\n", +"//CALCULATION (Ex3.2.a)\n", +"k=log((1/(1-X_A)))/t_batch;//Refer equation 3.29 Pg No. 90\n", +"t_1=((1/(1-X_A))^(1/N)-1)/k;//Refer equation 3.40 Pg No. 94\n", +"t_Tot=N*t_1;\n", +"\n", +"//OUTPUT (Ex3.2.a)\n", +"mprintf('\n OUTPUT Ex3.2.a');\n", +"mprintf('\n==================================================================');\n", +"mprintf('\nThe total residence time of the four reactors in series= %f hr',t_Tot);\n", +"\n", +"//=======================================================================================\n", +"\n", +"//Title:Heat generation in CSTR in Series\n", +"//=============================================================================================================\n", +"//CALCULATION (Ex3.2.b)\n", +"t_1=((1/(1-X_final))^(1/N)-1)/k;//Refer equation 3.40 Pg No. 94\n", +"for i=1:N\n", +" X(i)=1-(1/(1+k*t_1)^(i));\n", +"end\n", +"\n", +"delQ_by_Q(1)=(X(1))/X_final; // Ratio of heat generated in 1st reactor \n", +"for i=1:N-1\n", +" delQ_by_Q(i+1)=(X(i+1)-X(i))/X_final; // Ratio of heat generated in 2nd, 3rd and 4th reactors \n", +"end\n", +"\n", +"//OUTPUT (Ex3.2.b)\n", +"mprintf('\n========================================================================================\n')\n", +"mprintf('\n OUTPUT Ex3.2.b');\n", +"mprintf('\n==================================================================');\n", +"mprintf('\nReactor vessel \t Conversion \t Fraction of total heat released \n')\n", +"mprintf('\n==================================================================')\n", +"for i=1:N\n", +" mprintf('\n %d \t \t %0.3f \t \t \t %0.3f \n',i,X(i),delQ_by_Q(i))\n", +"end\n", +"\n", +"//FILE OUTPUT\n", +"fid=mopen('.\Chapter3-Ex2-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex3.2.a');\n", +"mfprintf(fid,'\n==================================================================');\n", +"mfprintf(fid,'\nThe total residence time of the four reactors in series= %f hr',t_Tot);\n", +" mfprintf(fid,'\n==================================================================')\n", +" mfprintf(fid,'\nReactor vessel \t Conversion \t Fraction of total heat released \n')\n", +" mfprintf(fid,'\n==================================================================')\n", +"for i=1:N\n", +" mfprintf(fid,'\n %d \t \t %0.3f \t \t \t %0.3f \n',i,X(i),delQ_by_Q(i))\n", +"end\n", +"mclose(fid);\n", +"\n", +"\n", +"//=============================================================END OF PROGRAM================================" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: Effect_of_temperature_on_yield.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-3 Ex3.3 Pg No. 97\n", +"//Title:Effect of temperature on yield\n", +"//================================================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"C_A0=1;//Initial concentration of A\n", +"C_B0=5;//Initial concentration of B\n", +"E1=15;//Activation energy for first reaction(kcal)\n", +"E2=20;//Activation energy for second reaction(kcal)\n", +"X_A=0.88;// Total conversion of reactant A\n", +"Y=0.81;//Yield for the reaction to produce C\n", +"R=1.987;//Gas Constant(cal/K^-1 mol^-1)\n", +"T_0=350;//Temperature (K)\n", +"\n", +"//CALCULATION\n", +"//Assuming first order by taking concentration of B constant since B is in Excess\n", +"C_A= C_A0*(1-X_A);//Unreacted amount of A\n", +"C_B=C_B0-Y;//Unreacted amount of B\n", +"k1_plus_k2_t=(X_A/(1-X_A));\n", +"S=Y/X_A;//At 350K\n", +"k1_by_k2=11.57;\n", +"k1_plus_k2_by_k2=k1_by_k2+1;//Refer Ex3.3 for the coded equations\n", +"k2_t=k1_plus_k2_t/k1_plus_k2_by_k2;\n", +"k1_t=k1_plus_k2_t-k2_t;\n", +"T=345;\n", +"for i=1:7 \n", +"T=T+5;\n", +"Temp(i)=T;\n", +"k1_dash_t(i)=k1_t*exp(((E1*1000/R)*((1/T_0)-(1/T))));//Arrhenius law\n", +"k2_dash_t(i)=k2_t*exp(((E2*1000/R)*((1/T_0)-(1/T))));//Arrhenius law\n", +"k1_plus_k2_t_new(i)=k1_dash_t(i)+k2_dash_t(i);\n", +"X_A_new(i)=k1_plus_k2_t_new(i)/(1+k1_plus_k2_t_new(i));\n", +"S_new(i)=((k1_dash_t(i)/k2_dash_t(i))/(1+(k1_dash_t(i)/k2_dash_t(i))));\n", +"Y_new(i)=S_new(i)*X_A_new(i);\n", +"end\n", +"\n", +"//OUTPUT\n", +"mprintf('=======================================');\n", +"mprintf('\n\t T \t X_A \t S \t Y');\n", +"mprintf('\n\t K \t (-) \t (-) \t (-)');\n", +"mprintf('\n======================================');\n", +"for i=1:7\n", +" mprintf('\n\t %d \t %0.3f \t %0.3f \t %0.3f',Temp(i),X_A_new(i),S_new(i),Y_new(i));\n", +"end\n", +" maximum=max(Y_new);\n", +" mprintf('\n\t\nThe maximum value of yield is %f ',maximum);\n", +" mprintf('\n\t\nHigh yield is obtained between 365K to 375K');\n", +"\n", +"//FILE OUTPUT\n", +"fid=mopen('.\Chapter3-Ex3-Output.txt','w');\n", +"mfprintf(fid,'=======================================');\n", +"mfprintf(fid,'\n\t T \t X_A \t S \t Y');\n", +"mfprintf(fid,'\n\t K \t (-) \t (-) \t (-)');\n", +"mfprintf(fid,'\n======================================');\n", +"for i=1:7\n", +" mfprintf(fid,'\n\t %d \t %0.3f \t %0.3f \t %0.3f',Temp(i),X_A_new(i),S_new(i),Y_new(i));\n", +"end\n", +" maximum=max(Y_new);\n", +" mfprintf(fid,'\n\t\nThe maximum value of yield is %f ',maximum);\n", +" mfprintf(fid,'\n\t\nHigh yield is obtained between 365K to 375K');\n", +" mclose(fid);\n", +"//======================================================END OF PROGRAM===================================================\n", +"//Disclaimer:Refer Ex3.3 in the textbook The Arrhenius law equation has a typo error. Exponential term missing in the textbook \n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: Volume_of_reactor_for_Gas_Phase_isothermal_reactio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-3 Ex3.4 Pg No. 101\n", +"//Title:Volume of reactor for Gas Phase isothermal reaction\n", +"//==================================================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"//First Order Reaction\n", +"//Basis: 1mol of feed\n", +"k=0.45;//Rate constant of first order reaction(s-1)\n", +"v0=120;//Volumetric flow rate(cm3/s)\n", +"C_A0=0.8;//Initial amount of reactant A (mol)\n", +"X_A=0.95;//Conversion in terms of reactant A\n", +"C_inert=0.2;//Concentration of inert (Nitrogen)in feed\n", +"\n", +"//CALCULATION\n", +"E_A=((2*C_A0+C_inert)-(C_A0+C_inert))/(C_A0+C_inert);//Volume fraction\n", +"Tot_mol=(C_A0+C_inert)+(E_A);//Total No. of moles\n", +"V=v0*((-(E_A)*X_A)+Tot_mol*(log(1/(1-X_A))))/(k);//Refer Performance Equation equation 3.44 and 3.42 in Pg No. 100 \n", +"V_l=V*10^-3;//Volume of reactor in liters\n", +"\n", +"//OUTPUT\n", +"mprintf('\n\tThe Volume of the reactor required for the given conversion is %.0f cm3 or %0.2f liters',V,V_l);\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter3-Ex4-Output.txt','w');\n", +"mfprintf(fid,'\n\tThe Volume of the reactor required for the given conversion is %.0f cm3 or %0.2f liters',V,V_l);\n", +"mclose(fid);\n", +"//==============================================================END OF PROGRAM==========================================\n", +"\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5: Rate_Equation_to_fit_Initial_Rate_data.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-3 Ex3.5 Pg No. 104\n", +"//Title: Rate Equation to fit Initial Rate data\n", +"//==========================================================================================================\n", +"clear\n", +"clc\n", +"clf()\n", +"//INPUT (Ex3.5.1)\n", +"//Initial Rate Data\n", +"B_by_A= [5 7 10 20 37];//B/A Mol Ratio\n", +"r_0=[75 65 50 33 18];//Rate (mol/hr g)\n", +"\n", +"//CALCULATION (Ex3.5.1)\n", +"//Assuming Eley Rideal Mechanism for the benzene alkylation with propylene \n", +"for i=1:5\n", +" C_B(i)= (B_by_A(i)/(1+B_by_A(i)));//In terms of Mol Fraaction\n", +" C_A(i)= (1/(1+B_by_A(i)));\n", +" CA_CB(i)=C_B(i)*C_A(i);\n", +" C_by_r(i)=CA_CB(i)/r_0(i);\n", +"end\n", +"coefs=regress(C_A,C_by_r);//The equation ((C_B*C_A)/r_0)= 1/(k*K_A) + (C_A/k)\n", +"scf(0)\n", +"plot(C_A,C_by_r,'*');\n", +"xtitle('Test of Eley-Rideal model for benzene alkylation');\n", +"xlabel(' CA ,Mol Fraction');\n", +"ylabel('CA CB/r_0');\n", +"intercept=coefs(1);\n", +"slope=coefs(2);\n", +"K_A=slope/intercept;\n", +"k=1/(slope);\n", +"K_A_k=k*K_A;\n", +"\n", +"//OUTPUT (Ex3.5.1)\n", +"mprintf('\n OUTPUT Ex3.5.1');\n", +"mprintf('\n=================================================')\n", +"mprintf('\nThe rate equation for Eley-Ridely Mechanism is:\n r= %0.0fC_A C_B/(1+%0.2fC_A)',K_A_k,K_A);\n", +"//=========================================================================================================\n", +"\n", +"//Title:Conversion as a function of Space velocity\n", +"//==========================================================================================================\n", +"//INPUT (Ex3.5.2)\n", +"x= [0.16 0.31 0.40 0.75];\n", +"Exp_Inverse_WHSV=(10^-3)*[4 8.2 17 39];//Weight Hourly Space Velocity\n", +"Feed_ratio=10;\n", +"\n", +"//CALCULATION (Ex3.5.2)\n", +"//The integrated rate equation in terms of conversion ln(1/(1-X))+0.236X= 60.4/WHSV (Page no. 106)\n", +"function [y]=integrated_rate_eqn(x0)\n", +" y=log(1 ./(1-x0))+ 0.236.*x0 - 60.4.*Exp_Inverse_WHSV\n", +"endfunction\n", +"\n", +"n=length(x)\n", +"x0=0.9*ones(1,n); // Provide guess value for conversion\n", +"[x_predicted]=fsolve(x0,integrated_rate_eqn,1d-15); // Using fsolve to determine conversion from integrated rate expression for each operating WHSV\n", +"\n", +"scf(1)\n", +"plot(Exp_Inverse_WHSV,x,'*',Exp_Inverse_WHSV,x_predicted,'--')\n", +"xtitle('Integral analysis','Inverse of WHSV','Conversion')\n", +"legend('Experimental','Predicted')\n", +"\n", +"//OUTPUT (Ex3.5.2)\n", +"//Console Output\n", +"mprintf('\n=================================================\n');\n", +"mprintf('\n OUTPUT Ex3.5.2');\n", +"mprintf('\n Predicted and Experimental Conversion Values')\n", +"mprintf('\n=================================================')\n", +"mprintf('\n10^3/WHSV\tX_experimental\tX_predicted')\n", +"mprintf('\n=================================================')\n", +"for i=1:n\n", +" mprintf('\n %0.2f\t\t%0.2f\t\t%0.2f ',Exp_Inverse_WHSV(i)*10^3,x(i),x_predicted(i))\n", +"end\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter3-Ex5-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex3.5.1');\n", +"mprintf('\n=================================================')\n", +"mfprintf(fid,'\nThe rate equation for Eley-Ridely Mechanism is:\n r= %0.0fC_A C_B/(1+%0.2fC_A)',K_A_k,K_A);\n", +"mfprintf(fid,'\n=================================================\n')\n", +"mfprintf(fid,'\n OUTPUT Ex3.5.2');\n", +"mfprintf(fid,'\n Predicted and Experimental Conversion Values')\n", +"mfprintf(fid,'\n=================================================')\n", +"mfprintf(fid,'\n10^3/WHSV\tX_experimental\tX_predicted')\n", +"mfprintf(fid,'\n=================================================')\n", +"for i=1:n\n", +" mfprintf(fid,'\n %0.2f\t\t%0.2f\t\t%0.2f ',Exp_Inverse_WHSV(i)*10^3,x(i),x_predicted(i))\n", +"end\n", +"mclose(fid)\n", +"\n", +"//===========================================END OF PROGRAM=================================\n", +"//Disclaimer:Regression method is used to find the slope and intercept in Ex3.5.2 .\n", +"// Hence the rate equation differ from the graphically obtained values of slope and intercept in the textbook.\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6: Optimum_reaction_temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-3 Ex3.6 Pg No. 114 \n", +"//Title: Optimum reaction temperature \n", +"//===========================================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"del_H=-20*10^3;//Heat of reaction(cal)\n", +"T_eq=[500 700];//Equivalent temperatures (K)\n", +"R=1.987;//Gas Constant (cal/mol K)\n", +"E2_by_E1=2;//Ratio of activation energy\n", +"\n", +"//CALCULATION\n", +"T_opt(1)=T_eq(1)/(1+(log(E2_by_E1)*(R/(-del_H)))*T_eq(1));//Refer equation 3.63 Pg No. 113 \n", +"T_opt(2)=T_eq(2)/(1+(log(E2_by_E1)*(R/(-del_H)))*T_eq(2));\n", +"delta_T(1)=T_eq(1)-T_opt(1);\n", +"delta_T(2)=T_eq(2)-T_opt(2);\n", +"\n", +"\n", +"//OUTPUT\n", +"mprintf('\n \t \t Temperature_1\t Temperature_2 ');\n", +"mprintf('\n \t \t==================================');\n", +"mprintf('\n(T_eq - T_opt)(K): \t%0.0f \t\t%0.0f',delta_T(1),delta_T(2));\n", +"mprintf('\n T_opt(K):\t \t%0.0f\t\t%0.0f', T_opt(1),T_opt(2));\n", +"\n", +"fid= mopen('.\Chapter3-Ex6-Output.txt','w');\n", +"mfprintf(fid,'\n \t \t Temperature_1\t Temperature_2 ');\n", +"mfprintf(fid,'\n \t \t==================================');\n", +"mfprintf(fid,'\n(T_eq - T_opt)(K): \t%0.0f \t\t%0.0f',delta_T(1),delta_T(2));\n", +"mfprintf(fid,'\n T_opt(K):\t \t%0.0f\t\t%0.0f', T_opt(1),T_opt(2));\n", +"mclose(fid);\n", +"\n", +"//=========================================================END OF PROGRAM=====================================\n", +"//Disclaimer:There is an arithmetic error in the optimum temperatures obtained in the textbook. \n", +"// Based on the values (T_eq - T_opt)1=17 and (T_eq - T_opt)2=32 the optimum temperatures obtained are \n", +"// T_opt1=483 K and T_opt2=668 K respectively." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7: Equilibrium_temperature_as_a_function_of_conversion_and_optimum_feed_temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc. USA,pp 436\n", +"//Chapter-3 Ex3.7 Pg No. 115\n", +"//Title:Equilibrium temperature as a function of conversion and Optimum Feed Temperature\n", +"//==========================================================================================================\n", +"clear\n", +"clc\n", +"// COMMON INPUT\n", +"P_opt=1.5; //(atm) Operating pressure of first converter\n", +"x=[0.5 0.6 0.7 0.8 0.9 0.95];// Conversion of SO2\n", +"k=[2E-06 5.1E-06 10.3E-06 18E-06 27E-06 37.5E-06 48E-06 59E-06 69E-06 77E-06] ; //Rate Constant (gmol/g cat sec atm)\n", +"T=420:20:600;// Temperature (°C)\n", +"X=0.68;\n", +"T_F=700;//Feed Temperature(K)\n", +"C_pi_800=[12.53 18.61 8.06 7.51];\n", +"F=100;// (mol) amount of feed\n", +"delta_H_700=-23270;//(cal/mol)\n", +"percent_SO2_f=11;//(%)Percentage of SO2 in feed\n", +"\n", +"\n", +"//CALCULATION (Ex3.7.a)\n", +"n=length(x);\n", +"m=length(k);\n", +"for i=1:n\n", +" K_eq(i)=((x(i)/(1-x(i))))*((100-5.5*x(i))/(10-5.5*x(i)))^0.5*(1/P_opt)^0.5;\n", +" T_eq(i)=(11412/(log(K_eq(i))+10.771));\n", +" P_O2(i)=(10*(10-5.5*x(i))*P_opt)/(100-5.5*x(i));\n", +" P_SO3(i)=(11*x(i)*P_opt)/(100-5.5*x(i));\n", +" P_SO2(i)=(11*(1-x(i))*P_opt)/(100-5.5*x(i));\n", +"end\n", +"\n", +"for i=1:n\n", +" for j=1:m\n", +" r(j,i)=k(j)*(P_SO2(i)/P_SO3(i))^0.5*(P_O2(i)-(P_SO3(i)/(P_SO2(i)*K_eq(i)))^2)\n", +" end\n", +" r_max(i)=max(r(j,i));\n", +"end\n", +"clf()\n", +"scf(0)\n", +"plot(x,T_eq-273,'*');\n", +"xtitle('Temperature in Stage 1 of an SO2 converter');\n", +"xlabel('x,SO2 Conversion');\n", +"ylabel('Temperature,°C' );\n", +"\n", +"//CALCULATION (Ex3.7.b)\n", +"n_SO2=F*percent_SO2_f*10^-2*(1-X);\n", +"n_SO3=F*percent_SO2_f*10^-2*X;\n", +"n_O2=(10-5.5*X);\n", +"n_N2=79;\n", +"sigma_n_C_pi=n_SO2*C_pi_800(1)+n_SO3*C_pi_800(2)+n_O2*C_pi_800(3)+n_N2*C_pi_800(4);\n", +"Temp_change=(F*percent_SO2_f*10^(-2)*X*(-1)*delta_H_700)/sigma_n_C_pi;//Refer equation 3.60 Pg No.110\n", +"mprintf('\nHeat Capacity evaluated at 800 K :%0.0f (cal/°C)',sigma_n_C_pi);\n", +"mprintf('\nTemperature Change to carry out the reaction at T_F,\nusing the energy to heat the product gas :%0.0f °C',Temp_change);\n", +"//From graphical procedure (Figure 3.19 ,Pg No.118) the final temperature is obtained as 410 °C\n", +"T_F=410;//(°C) Final temperature\n", +"//From Figure 3.19 ,Pg No.118 temperature for corresponding conversion is obtained \n", +"X_stage=[0.1;0.2;0.3;0.4;0.5;0.6]\n", +"T_stage=[441;470;500;540;565;580]\n", +"m=length(X_stage);\n", +"for i=1:m\n", +" K_eq(i)=exp((11412/T_stage(i))-10.771);\n", +"end\n", +"k=10^-6*[5.25 14.15 27 48 61.5 69];//From Table 3.5 Corresponding to the stage temperature data obtained form Figure 3.19\n", +"for i=1:m\n", +" P_SO2(i)=11*(1-X_stage(i))*P_opt/(100-5.5*X_stage(i))\n", +" P_SO3(i)=11*X_stage(i)*P_opt/(100-5.5*X_stage(i))\n", +" P_O2(i)=10*(10-5.5*X_stage(i))*P_opt/(100-5.5*X_stage(i))\n", +" r(i)=k(i)*(P_SO2(i)/P_SO3(i))^0.5*(P_O2(i)-(P_SO3(i)/(P_SO2(i)*K_eq(i)))^2)*10^6;\n", +" inverse_r(i)=(1/r(i));\n", +"end\n", +"scf(1)\n", +" plot(X_stage,inverse_r,'*');\n", +" xtitle('1/r vs x','X (conversion)','10^-6/r');\n", +"\n", +"\n", +"//OUTPUT (Ex3.7.a)\n", +"mprintf('\n\n OUTPUT Ex3.7.a');\n", +"mprintf('\n============================================================================');\n", +"mprintf('\n X\tPhi\t\tT_eq\tT_eq\t\tr_max');\n", +"mprintf('\n -\t(atm^-0.5)\t(K)\t(°C)\t\t(gmol/g cat sec)');\n", +"mprintf('\n============================================================================');\n", +"for i=1:n-1\n", +" mprintf('\n %0.2f\t%0.2f\t %0.0f\t%0.0f\t\t%0.6E',x(i),K_eq(i),T_eq(i),T_eq(i)-273,r_max(i));\n", +"end\n", +"mprintf('\n %0.2f\t%0.2f\t\t%0.0f\t%0.0f\t\t%0.6E',x(n),K_eq(n),T_eq(n),T_eq(n)-273,r_max(n));\n", +"\n", +"//OUTPUT (Ex3.7.b)\n", +"mprintf('\n\n\n OUTPUT Ex3.7.b');\n", +"mprintf('\n============================================================================');\n", +" mprintf('\n===========================================');\n", +" mprintf('\n 10^-6/r\tX (conversion)');\n", +" mprintf('\n (gmol/g cat,s) \t(-)');\n", +" mprintf('\n===========================================');\n", +" for i=1:m\n", +" mprintf('\n %0.2f\t\t\t%0.2f',inverse_r(i),X_stage(i));\n", +" end\n", +" mprintf('\nFrom graphical procedure (1/r vs x) the optimum temperature obtained is T_opt: 412°C');\n", +" \n", +"// FILE OUTPUT\n", +"fid= mopen('.\Chapter3-Ex7-Output.txt','w');\n", +"mfprintf(fid,'\nHeat Capacity evaluated at 800 K :%0.0f (cal/°C)',sigma_n_C_pi);\n", +"mfprintf(fid,'\nTemperature Change to carry out the reaction at T_F,\nusing the energy to heat the product gas :%0.0f °C',Temp_change);\n", +"mfprintf(fid,'\n OUTPUT Ex3.7.a');\n", +"mfprintf(fid,'\n============================================================================');\n", +"mfprintf(fid,'\n X\tPhi\t\tT_eq\tT_eq\t\tr_max');\n", +"mfprintf(fid,'\n -\t(atm^-0.5)\t(K)\t(°C)\t\t(gmol/g cat sec)');\n", +"mfprintf(fid,'\n============================================================================');\n", +"for i=1:n-1\n", +" mfprintf(fid,'\n %0.2f\t%0.2f\t %0.0f\t%0.0f\t\t%0.6E',x(i),K_eq(i),T_eq(i),T_eq(i)-273,r_max(i));\n", +"end\n", +"mfprintf(fid,'\n %0.2f\t%0.2f\t\t%0.0f\t%0.0f\t\t%0.6E',x(n),K_eq(n),T_eq(n),T_eq(n)-273,r_max(n));\n", +"mfprintf(fid,'\n\n\n OUTPUT Ex3.7.b');\n", +"mfprintf(fid,'\n============================================================================');\n", +" mfprintf(fid,'\n===========================================');\n", +" mfprintf(fid,'\n 10^-6/r\tX (conversion)');\n", +" mfprintf(fid,'\n (gmol/g cat,s) \t(-)');\n", +" mfprintf(fid,'\n===========================================');\n", +" for i=1:m\n", +" mfprintf(fid,'\n %0.2f\t\t\t%0.2f',inverse_r(i),X_stage(i));\n", +" end\n", +" mfprintf(fid,'\nFrom graphical procedure (1/r vs x) the optimum temperature obtained is T_opt: 412°C');\n", +" mclose(fid);\n", +"\n", +"//==========================================================END OF PROGRAM======================================\n", +"//Disclaimer: The optimum temperature for each conversion is found by trial at maximum rate and the kinetic data in the textbook is not sufficient to calculate the optimum temperature in the code.\n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Chemical_Reactor_Design_by_P_Harriott/4-Diffusion_and_Reaction_in_Porous_Catalysts.ipynb b/Chemical_Reactor_Design_by_P_Harriott/4-Diffusion_and_Reaction_in_Porous_Catalysts.ipynb new file mode 100644 index 0000000..b87b3e1 --- /dev/null +++ b/Chemical_Reactor_Design_by_P_Harriott/4-Diffusion_and_Reaction_in_Porous_Catalysts.ipynb @@ -0,0 +1,418 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Diffusion and Reaction in Porous Catalysts" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: Diffusivity_of_Chlorine_and_tortuosity_in_catalyst_pellet.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-4 Ex4.1 Pg No. 135\n", +"//Title:Diffusivity of Chlorine and tortuosity in catalyst pellet\n", +"//===========================================================================================================\n", +"clear\n", +"clc\n", +"\n", +"// COMMON INPUT \n", +"S_g=235;//Total surface per gram (m2/g)\n", +"V_g=0.29E-6;//Pore volume per gram (cm3/g)\n", +"rho_p=1.41;//Density of particle (g/cm3)\n", +"D_He=0.0065;//Effective diffusivity of He (cm2/sec)\n", +"D_AB=0.73;// at 1atm and 298K\n", +"M_He=4;//Molecular weight of He\n", +"M_Cl2=70.09;//Molecular weight of Cl2\n", +"T_ref=293;//Reference temperature\n", +"T_degC=300;\n", +"T_01=T_degC+273;//Reaction temperature(K) (Ex4.1.a)\n", +"T_02=298;//Operating temperature (Ex4.1.b)\n", +"T_03=573;//operating temperature (Ex4.1.c)\n", +"P_ref=1;//Reference pressure\n", +"D_Cl2_CH4=0.15;//at 1atm 273K\n", +"P=15;//operating pressure \n", +"//tau=1.25;//From value calculated in Ex4.1.b Pg. No. 136\n", +"\n", +"\n", +"//CALCULATION (Ex4.1.a)\n", +"r_bar=2*V_g/S_g;//Mean Pore radius\n", +"D_Cl2_Ex_a=D_He*((M_He/M_Cl2)*(T_01/T_ref))^(0.5);//Assuming Knudsen flow at 573K\n", +"\n", +"//CALCULATION (Ex4.1.b)\n", +"r_bar=2*V_g*(10^6)/(S_g *(10^4));\n", +"D_K=9700*(r_bar)*(T_ref/M_He)^(0.5);//Knudsen flow\n", +"D_AB1=D_AB*(293/298)^(1.7)// at 1.5 atm and 293K\n", +"D_pore=1/((1/D_K)+(1/D_AB1));//pore diffusion\n", +"Epsilon=V_g*rho_p*(10^6);\n", +"tau=(D_pore*Epsilon)/D_He;//Tortusity\n", +"\n", +"//CALCULATION (Ex4.1.c)\n", +"D_Cl2_CH4_new=D_Cl2_CH4*(P_ref/P)*(T_03/T_ref)^(1.7);\n", +"D_K_Cl2=9700*r_bar*sqrt(T_03/M_Cl2);\n", +"D_pore=1/((1/D_Cl2_CH4_new)+(1/D_K_Cl2));\n", +"Epsilon=V_g*rho_p;\n", +"D_Cl2_Ex_c=D_pore*Epsilon/tau;\n", +"\n", +"\n", +"//OUTPUT\n", +"mprintf('\n OUTPUT Ex4.1.a');\n", +"mprintf('\n=================================================');\n", +"mprintf('\nThe predicted diffusivity of Chlorine is %0.2e cm2/s ',D_Cl2_Ex_a);\n", +"mprintf('\n\n OUTPUT Ex4.1.b');\n", +"mprintf('\n=================================================');\n", +"mprintf('\nThe tortusity value = %0.2f',tau);\n", +"mprintf('\n\n OUTPUT Ex4.1.b');\n", +"mprintf('\n=================================================')\n", +"mprintf('\nThe Effective diffusivity of Chlorine at %g K and %g atm = %0.2e cm2/sec ',T_03, P, D_Cl2_Ex_c); \n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter4-Ex1-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex4.1.a');\n", +"mfprintf(fid,'\n=================================================');\n", +"mfprintf(fid,'\nThe predicted diffusivity of Chlorine is %0.2e cm2/s ',D_Cl2_Ex_a);\n", +"mfprintf(fid,'\n\n OUTPUT Ex4.1.b');\n", +"mfprintf(fid,'\n=================================================');\n", +"mfprintf(fid,'\nThe tortusity value = %0.2f',tau);\n", +"mfprintf(fid,'\n\n OUTPUT Ex4.1.b');\n", +"mfprintf(fid,'\n=================================================')\n", +"mfprintf(fid,'\nThe Effective diffusivity of Chlorine at %g K and %g atm = %0.2e cm2/sec ',T_03, P, D_Cl2_Ex_c);\n", +"mclose(fid)\n", +"//============================================END OF PROGRAM=================================================\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: Effective_diffusivity_of_O2_in_air.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-4 Ex4.2 Pg No. 140\n", +"//Title:Effective diffusivity of O2 in air\n", +"//============================================================================================================\n", +"clear\n", +"clc\n", +"// COMMON INPUT\n", +"S_g=150;//Total surface per gram (m2/g)\n", +"V_g=0.45;//Pore volume per gram (cm3/g)\n", +"V_i=0.30;//Micropore volume per gram (cm3/g)\n", +"V_a=0.15;// Macropore volume per gram (cm3/g)\n", +"rho_P=1.2;//Density of particle (g/cm3)\n", +"tau=2.5;// Tortusity\n", +"r_bar_i=40*(10^(-8));//Micropore radius\n", +"r_bar_a=2000*(10^(-8));//Macropore radius\n", +"D_AB=0.49;//For N2–O2 at 1 atm (cm2/s)\n", +"M_O2=32;//Molecular weight of O2\n", +"T=493;//Opereating Temperature (K)\n", +"\n", +"\n", +"\n", +"//CALCULATION (Ex4.2.a)\n", +"Epsilon=V_g*rho_P;\n", +"D_K_i=9700*(r_bar_i)*sqrt(T/M_O2);//Knudsen flow for micropore\n", +"D_Pore_i=1/((1/D_K_i)+(1/D_AB))\n", +"D_K_a=9700*(r_bar_a)*sqrt(T/M_O2);\n", +"D_Pore_a=1/((1/D_K_a)+(1/D_AB));////Knudsen flow for macropore\n", +"D_Pore_Avg=(V_i*D_Pore_i+V_a*D_Pore_a)/(V_i+V_a);\n", +"D_e=Epsilon*D_Pore_Avg/tau;\n", +"\n", +"//CALCULATION (Ex4.2.b)\n", +"Epsilon=V_g*rho_P;\n", +"r_bar=2*V_g/(S_g*10^4);\n", +"D_K=9700*(r_bar)*sqrt(T/M_O2);//Knudsen Flow\n", +"D_Pore=1/((1/D_K)+(1/D_AB));\n", +"tau=D_Pore*Epsilon/D_e;\n", +"\n", +"//OUTPUT\n", +"mprintf('\n OUTPUT Ex4.2.a');\n", +"mprintf('\n=================================================');\n", +"mprintf('\n The effective diffusivity of O2 in air = %0.2e cm2/s',D_e); \n", +"mprintf('\n\n OUTPUT Ex4.2.b');\n", +"mprintf('\n=================================================');\n", +"mprintf('\n The calculated surface mean pore radius = %.0e cm',r_bar); \n", +"mprintf('\n The predicted pore diffusivity = %0.2e cm2/sec',D_Pore); \n", +"mprintf('\n The corresponding tortusity = %0.2f',tau);\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter4-Ex2-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex4.2.a');\n", +"mfprintf(fid,'\n=================================================');\n", +"mfprintf(fid,'\n The effective diffusivity of O2 in air = %0.2e cm2/s',D_e); \n", +"mfprintf(fid,'\n\n OUTPUT Ex4.2.b');\n", +"mfprintf(fid,'\n=================================================');\n", +"mfprintf(fid,'\n The calculated surface mean pore radius = %.0e cm',r_bar); \n", +"mfprintf(fid,'\n The predicted pore diffusivity = %0.2e cm2/sec',D_Pore); \n", +"mfprintf(fid,'\n The corresponding tortusity = %0.2f',tau);\n", +"mclose(fid);\n", +"\n", +"\n", +"//======================================================END OF PROGRAM========================================" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: Influence_of_Pore_diffusion_over_rate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-4 Ex4.3 Pg No. 154\n", +"//Title:Influence of Pore diffusion over rate\n", +"//============================================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"d_p=1/4;//Spherical Catalyst pellet size(inch)\n", +"k=[7.6*10^-3 14*10^-3];//Reaction rates (mol/hr)\n", +"f_A=[0.1 0.2];//Feed fraction of reactant A\n", +"D_e=0.0085;// Diffusivity of A (cm2/s)\n", +"rho_p=1.4 ;// Density of catalyst particle(g/cm3)\n", +"V_ref=22400;// reference volume(cm3)\n", +"T_ref=273;//Reference Temperature (K)\n", +"P_ref=1;//Reference Pressure (atm)\n", +"P=1.2;//Operating Pressure (atm)\n", +"T_C=150;\n", +"T=T_C+273;//Operating Temperature (K)\n", +"\n", +"//CALCULATION\n", +"//For 10% of A\n", +"C_A(1)=f_A(1)*T_ref*P_ref/(V_ref*T*P);\n", +"R=d_p*2.54/2;\n", +"k_app(1)=k(1)*rho_p/(3600*C_A(1));//Refer equation 4.53 Pg. No. 153\n", +"phi_app(1)=R*sqrt(k_app(1)/D_e);//Refer equation 4.55 Pg. No. 155 \n", +"C_A(2)=f_A(2)*T_ref*P_ref/(V_ref*T*P);\n", +"//If C_A is doubled the order is quite close to 1,from the Figure 4.8 Pg. No. 148, refer value of effectiveness\n", +"eta_graph=0.42;\n", +"k_app(2)=k_app(1)/eta_graph;\n", +"phi_app(2)=R*sqrt(k_app(2)/D_e);\n", +"eta_calc=(3/phi_app(2))*((1/tanh(phi_app(2)))-(1/phi_app(2)));\n", +"eff_rate=(1-eta_graph)*100;\n", +"\n", +"//OUTPUT\n", +"mprintf('\n The effectiveness from graph = %0.2f \n The calculated effectiveness = %0.2f',eta_graph,eta_calc);\n", +"mprintf('\n The pore diffusion decreased the rate by %.0f%%',eff_rate);\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter4-Ex3-Output.txt','w');\n", +"mfprintf(fid,'\n The effectiveness from graph = %0.2f \n The calculated effectiveness = %0.2f',eta_graph,eta_calc);\n", +"mfprintf(fid,'\n The pore diffusion decreased the rate by %.0f%%',eff_rate);\n", +"mclose(fid);\n", +"//==============================================================END OF PROGRAM===============================" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4: Effectiveness_factor_for_solid_catalyzed_reaction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc. USA,pp 436.\n", +"//Chapter-4 Ex4.4 Pg No.157\n", +"//Title: Effectiveness factor for solid catalyzed reaction\n", +"//======================================================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"D_e_A=0.02;//(cm2/s)\n", +"D_e_B=0.03;//(cm2/s)\n", +"D_e_C=0.015;//(cm2/s)\n", +"X_f_A=0.3;\n", +"X_f_B=(1-X_f_A);\n", +"eta_assumed=0.68;//Effectiveness factor from Fig.4.8 for first order reaction\n", +"T=150;//(deg C)\n", +"T_K=T+273;//(K)\n", +"r=0.3;//(cm)Radius of catalyst sphere\n", +"P_opt=4;//(atm)Operating Pressure \n", +"R=82.056;//(cm3 atm/K mol)Gas constant \n", +"\n", +"\n", +"//CALCULATION\n", +"//Kinetic equation r= (2.5*10^-5*P_A*P_B)/(1+0.1*P_A+2*P_C)^2\n", +"P_A=X_f_A*P_opt;\n", +"P_B=X_f_B*P_opt;\n", +"r_star=(2.5*10^-5*P_A*P_B)/(1+0.1*P_A)^2;\n", +"C_A=P_A/(R*T_K);\n", +"k=r_star/C_A;\n", +"Phi= r*(k/D_e_A)^(0.5);\n", +"P_A_bar=eta_assumed*P_A;\n", +"delta_P_A=P_A*(1-eta_assumed);\n", +"delta_P_B=delta_P_A*(D_e_A/D_e_B);\n", +"P_B_bar=P_B-delta_P_B;\n", +"delta_P_C=delta_P_A*(D_e_A/D_e_C);\n", +"P_C_bar=delta_P_C;\n", +"r_calc=(2.5*10^-5*P_A_bar*P_B_bar)/(1+0.1*P_A_bar+2*P_C_bar)^2\n", +"eta_calc=r_calc/r_star;\n", +"eta_approx=(eta_calc+eta_assumed)/2;\n", +"\n", +"//OUTPUT\n", +"//Console Output\n", +"mprintf('\tBased on average pressures calculated Rate and Effectiveness factor');\n", +"mprintf('\n\t r : %0.2E (mol/s cm3)',r_calc);\n", +"mprintf('\n\t eta_calc : %0.3f ',eta_calc);\n", +"mprintf('\n The actual value of Effectiveness factor eta_actual :%0.1f',eta_approx);\n", +"\n", +"//File Output\n", +"fid= mopen('.\Chapter4-Ex4-Output.txt','w');\n", +"mfprintf(fid,'\tBased on average pressures calculated Rate and Effectiveness factor');\n", +"mfprintf(fid,'\n\t r : %0.2E (mol/s cm3)',r_calc);\n", +"mfprintf(fid,'\n\t eta_calc : %0.3f ',eta_calc);\n", +"mfprintf(fid,'\n The actual value of Effectiveness factor eta_actual :%0.1f',eta_approx);\n", +"mclose(fid);\n", +"//================================================END OF PROGRAM==================================================================================\n", +"\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5: The_optimum_pore_size_distribution_for_a_spherical_pellet.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-4 Ex4.5 Pg No. 164\n", +"//Title:The optimum pore size distribution for a spherical pellet\n", +"//=============================================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"d_pellet=5*10^-1;//Catalyst pellet size (cm)\n", +"k_cat =3.6;// True Rate Constant (sec-1)\n", +"V_g_cat=0.60 ;// Pore Volume of the catalyst(cm3/g)\n", +"S_g_cat=300*10^4;//Surface area of catalyst (cm2/g)\n", +"dp=0.02;// Size of powdered catalyst(cm)\n", +"rho_p=0.8 ;// Density of catalyst particle(g/cm3)\n", +"r_bar_narrow= 40*10^(-10)//narrow distribution \n", +"D_KA=0.012 ;//(cm2/sec)\n", +"D_AB= 0.40 ;//(cm2/sec)\n", +"r_macro=2000*10^(-10);//For Macropores\n", +"V_cat=1/rho_p;//Total catalyst volume (cm3/g)\n", +"eta=1;//For powdered catalyst\n", +"\n", +"//CALCULATION\n", +"epsilon=V_g_cat/V_cat;\n", +"r_bar=2*V_g_cat/S_g_cat;\n", +"R=dp/2;\n", +"R_pellet=d_pellet/2;\n", +"D_pore_a=1/((1/D_KA)+(1/D_AB));\n", +"tau=3;//Assumed value\n", +"D_e_cat=D_pore_a*epsilon/tau;\n", +"Phi_app=R*sqrt(k_cat/D_e_cat);//Refer equation 4.55 Pg. No. 153 \n", +"D_KB=D_KA*(r_macro/r_bar_narrow);\n", +"D_pore_b=1/((1/D_KB)+(1/D_AB));\n", +"V_a_end=0.35;\n", +"del_V_a=-0.05;\n", +"V_a=V_g_cat:del_V_a:V_a_end;\n", +" for i=1:6 \n", +" V_b(i)=V_g_cat-V_a(i);//Refer Equation 4.81 Pg. No. 164\n", +" S_a(i)=2*(V_a(i)/r_bar_narrow)*(10^-6);\n", +" S_b(i)=2*(V_b(i)/r_macro)*(10^-6);\n", +" S_g(i)=S_a(i)+S_b(i);\n", +" k(i)=k_cat*S_g(i)/(S_g_cat*10^-4);\n", +" D_e(i)=((D_pore_a*V_a(i)+D_pore_b*V_b(i))/V_g_cat)*(epsilon/tau);\n", +" phi(i)=R_pellet*sqrt(k(i)/D_e(i));\n", +" eta(i)=(3/phi(i))*((1/tanh(phi(i)))-(1/phi(i)));\n", +" eta_k(i)=eta(i)*k(i)\n", +" end\n", +" //OUTPUT\n", +" mprintf('\n===================================================================================================================')\n", +" mprintf('\nV_a \t V_b \t\t S_a \t S_b \t S_g \t k \t D_e \t phi\teta\teta_k');\n", +" mprintf('\nVolume \t cm3/g \t\t Surface Area \t m2/g \t\t s-1 \t cm2/s \t (-)\t(-) \t (-)');\n", +" mprintf('\n===================================================================================================================')\n", +" for i=1:6\n", +" mprintf('\n %.2f \t %0.2f \t\t %.0f \t %.1f \t %0.1f \t\t %0.2f \t%0.2e\t%0.2f \t %0.2f \t %0.2f',V_a(i),V_b(i),S_a(i),S_b(i),S_g(i),k(i),D_e(i),phi(i),eta(i),eta_k(i));\n", +" end \n", +" \n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter4-Ex5-Output.txt','w');\n", +" mfprintf(fid,'\n===================================================================================================================')\n", +" mfprintf(fid,'\nV_a \t V_b \t\t S_a \t S_b \t S_g \t k \t D_e \t phi\teta\teta_k');\n", +" mfprintf(fid,'\nVolume \t cm3/g \t\t Surface Area \t m2/g \t\t s-1 \t cm2/s \t (-)\t(-) \t (-)');\n", +" mfprintf(fid,'\n===================================================================================================================')\n", +" for i=1:6\n", +" mfprintf(fid,'\n %.2f \t %0.2f \t\t %.0f \t %.1f \t %0.1f \t\t %0.2f \t%0.2e\t%0.2f \t %0.2f \t %0.2f',V_a(i),V_b(i),S_a(i),S_b(i),S_g(i),k(i),D_e(i),phi(i),eta(i),eta_k(i));\n", +" end \n", +"//==============================================================END OF PROGRAM===================================================" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Chemical_Reactor_Design_by_P_Harriott/5-Heat_and_Mass_Transfer_in_Reactors_.ipynb b/Chemical_Reactor_Design_by_P_Harriott/5-Heat_and_Mass_Transfer_in_Reactors_.ipynb new file mode 100644 index 0000000..3ea91b3 --- /dev/null +++ b/Chemical_Reactor_Design_by_P_Harriott/5-Heat_and_Mass_Transfer_in_Reactors_.ipynb @@ -0,0 +1,314 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Heat and Mass Transfer in Reactors " + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: Temperature_Profiles_for_tubular_reactor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc. USA,pp 436\n", +"//Chapter-5 Ex5.1 Pg No. 185\n", +"//Title: Temperature Profiles for tubular reactor\n", +"//==========================================================================================================\n", +"clear\n", +"clc\n", +"clf\n", +"//INPUT\n", +"delta_H=-25000;//(kcal/mol) Enthalpy\n", +"D=2;//(cm)Diameter of Tubular Reactor \n", +"C_A0=0.002;//(mol/cm3) Initial concentration of feed\n", +"k=0.00142;//(s-1) Rate Constant\n", +"E_by_R=15000;//(K-1)\n", +"rho=0.8;//(g/cm3)\n", +"c_p= 0.5;// (cal/g°C)\n", +"U=0.025;//(cal/sec cm2°C )\n", +"u=60;//(cm/s)\n", +"\n", +"\n", +"//CALCULATION\n", +"function diffeqn = Simul_diff_eqn(l,y,T_j)\n", +" diffeqn(1) =(k*exp(E_by_R*((1/T_initial)-(1/y(2)))))*(1-y(1))/u;// Derivative for the first variable \n", +" diffeqn(2) =(C_A0*(k*exp(E_by_R*((1/T_initial)-(1/y(2)))))*(1-y(1))*(-1*delta_H)-U*(4/D)*(y(2)-T_j))/(u*rho*c_p) ; // Derivative for the second variable \n", +"endfunction\n", +"\n", +"// =======================================\n", +"\n", +"T_j_data = [ 348 349 350 351];\n", +"m = length(T_j_data);\n", +"n = 1;\n", +"while n <= m \n", +"T_j = T_j_data(n)\n", +"T_initial=340;// for rate constant\n", +"x0=0;\n", +"T0=344;\n", +"l0=0;\n", +"l=0:0.1E2:70E2; \n", +"y = ode([x0;T0],l0,l,list(Simul_diff_eqn,T_j));\n", +"x_data(n,:) = y(1,:);\n", +"T_data(n,:) = y(2,:);\n", +"n = n + 1;\n", +"end\n", +"// ================================\n", +"scf(0)\n", +"plot(l,T_data(1,:),'r-',l,T_data(2,:),'b-',l,T_data(3,:),'k-',l,T_data(4,:),'g-')\n", +"xtitle('Temperature Profiles for a jacketed tubular reactor')\n", +"xlabel('Length (cm)')\n", +"ylabel('Temperature (K)')\n", +"legend(['348';'349';'350';'351']);\n", +"\n", +"scf(1)\n", +"plot(l,x_data(1,:),'r-',l,x_data(2,:),'b-',l,x_data(3,:),'k-',l,x_data(4,:),'g-')\n", +"xtitle('Conversion for a jacketed tubular reactor');\n", +"xlabel('Length (cm)')\n", +"ylabel('Conversion')\n", +"legend(['348';'349';'350';'351']);\n", +"\n", +"//OUTPUT\n", +"mprintf('\n The Temperature profiles for four feed temperatures are plotted');\n", +"mprintf('\n For T0:348 K attains its maximum temperature at conversion of about 25%%-30%%');\n", +"mprintf('\n At T0:351 K the temperature increases by 6.5°C high senstivity that the reactor is nearing unstable');\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter5-Ex1-Output.txt','w');\n", +"mfprintf(fid,'\n The Temperature profiles for four feed temperatures are plotted.');\n", +"mfprintf(fid,'\n For T0:348 K attains its maximum temperature at conversion of about 25%%-30%%');\n", +"mfprintf(fid,'\n At T0:351 K the temperature increases by 6.5°C high senstivity that the reactor is nearing unstable');\n", +"mclose(fid);\n", +"\n", +"//===================================================END OF PROGRAM======================================================\n", +"\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: Maximum_internal_temperature_difference.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-5 Ex5.2 Pg No. 194\n", +"//Title: Maximum internal temperature difference\n", +"//=============================================================================================================\n", +"clear\n", +"format(16)\n", +"clc\n", +"//INPUT\n", +"T_C=200;//Temperature(°C)\n", +"P=1.2;//Pressure (atm)\n", +"f_ethylene=0.05;//fraction of ethylene\n", +"k_s=8*10^(-4);//Solid conductivity (cal/sec cm°C)\n", +"D_e=0.02;//Diffusivity for ethylene (cm2/s)\n", +"del_H= -32.7*10^(3);//Heat of reaction (cal)\n", +"V_ref=22400;// reference volume(cm3)\n", +"T_ref=273;//Reference Temperature (K)\n", +"P_ref=1;//Reference Pressure (atm)\n", +"T_K=T_C+273;//Reaction Temperature (K)\n", +"\n", +"//CALCULATION\n", +"C_s=f_ethylene*P*T_ref/(V_ref*T_K*P_ref);\n", +"Tc_minus_Ts=D_e*C_s*(-del_H)/k_s;//Refer equation 5.51 Pg No. 194\n", +"\n", +"//OUTPUT\n", +"mprintf('\n\tThe maximum internal temperature difference %0.3f °C',Tc_minus_Ts);\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter5-Ex2-Output.txt','w');\n", +"mfprintf(fid,'\n\tThe maximum internal temperature difference %0.3f °C',Tc_minus_Ts);\n", +"mclose(fid);\n", +"\n", +"//=====================================================END OF PROGRAM=================================================" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3: EX5_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-5 Ex5.3 Pg No. 209\n", +"//Title:Overall heat transfer coefficients and radial average bed temperature for packed bed reactor\n", +"//=============================================================================================================\n", +"clear\n", +"clc\n", +"\n", +"// COMMON INPUT\n", +"k_s= 8*10^(-4);//(cal/sec cm°C)\n", +"M_air_avg=29.24;// Average Molecular weight of air\n", +"Cp_air_mol=7.91;// cal/mol°C;\n", +"Cp_air_g=Cp_air_mol/M_air_avg;//cal/g°C\n", +"dp=0.4;//Size of the catalyst pellet (cm)\n", +"D=3.8;//Diameter of tube (cm)\n", +"R_pellet=D/2;//Radius\n", +"f_EO=0.7;//Fraction of ethylene forming ethylene oxide \n", +"f_CO2_H2O=1-f_EO;//Fraction of ethylene forming CO2 and H2O\n", +"rho_p=2.5;//Density of catalyst particle (g/cm3)\n", +"V_ref=22400;//Reference volume(cm3)\n", +"T_ref=273;// Reference Temperature (K)\n", +"P_ref=1;//Reference Pressure (atm)\n", +"P=5;//System Pressure (atm)\n", +"T_C=230;//System Temperature (°C)\n", +"T=T_C+273;//System Temperature (K)\n", +"u_ft=[1.5 3];//Velocity (ft/s)\n", +"myu=0.026*(10^(-2));//Viscosity of air (Poise)\n", +"M_wt=[28 32 44 28];//Molecular weight\n", +"M_fraction=[0.04 0.07 0.06 0.83];\n", +"Cp=[15.3 7.4 10.7 7.4];//(cal/mol°C)\n", +"k_g=9.27*10^(-5);//(cal/sec cm°C)\n", +"del_H_rxn=[-29.9 -317];//(kcal/mol)\n", +"E=18*1000;//Activation Energy (cal)\n", +"R=1.987;//Gas Constant (cal/K.mol)\n", +"\n", +"//CALCULATION (Ex5.3.a)\n", +"rho=M_air_avg*P*T_ref/(V_ref*P_ref*T);\n", +"u=30.533.*u_ft;//Velocity in (cm/s)\n", +"Re_p=(rho*dp/myu).*u;\n", +"Pr=Cp_air_g*myu/k_g;\n", +"ks_by_kg=k_s/k_g;\n", +"k0e_by_kg=3.5;//From figure 5.16 Pg. No. 203\n", +"kr_by_kg=2.5;//From equation 5.68 and 5.69 Pg. No. 204\n", +"for i=1:2\n", +" ktd_by_k_air(i)=(0.1*Pr)*Re_p(i);\n", +"ke_by_kg(i)=(k0e_by_kg+kr_by_kg)+ktd_by_k_air(i);\n", +"k_e(i)=ke_by_kg(i)*k_g;\n", +"h_bed(i)=4*k_e(i)/R_pellet;\n", +"Nu_w(i)=(1.94*Pr^(0.33))*Re_p(i)^(0.5);//Refer equation 5.83 Pg. No. 208\n", +"h_w(i)=(k_g/dp)*Nu_w(i);//(cal/sec cm2 K)\n", +"h_j=100*10^(-3);//Assumed\n", +" U(i)=1/((1/h_j)+(1/h_w(i))+(1/h_bed(i)));\n", +"end\n", +"\n", +"//CALCULATION (Ex5.3.b)\n", +"minus_delH=f_EO*(-del_H_rxn(1))+f_CO2_H2O*(-del_H_rxn(2));\n", +"T_max=T+20;\n", +"del_Tc= R*(T_max)^2/E;\n", +"T_new=250 +273;\n", +"X_E=0.1;\n", +"k250_by_k230=exp((E/R)*((1/T)-(1/T_new)));\n", +"P_E=P*(1-X_E)*M_fraction(1);\n", +"P_O2=P*(1-f_EO*X_E)*M_fraction(2);\n", +"P_CO2=P*(1+f_CO2_H2O*X_E)*M_fraction(3);\n", +"r=k250_by_k230*((0.076*P_E*P_O2)/(1+2*P_E+15*P_CO2));\n", +"Q_dash=r*minus_delH*10^3/3600;\n", +"epsilon=0.4;\n", +"rho_bed=rho_p*(1-0.4);\n", +"A_percm3=4/D;\n", +"Q=(Q_dash*rho_bed)\n", +"for i=1:2\n", +" delta_T(i)=(Q/A_percm3)*(1/U(i));\n", +"end\n", +"\n", +"//OUTPUT ((Ex5.3.a))\n", +"mprintf('\n OUTPUT Ex5.3.a');\n", +"mprintf('\n==========================================================')\n", +"mprintf('\nThe Overall Heat transfer coefficient for given Velocities' )\n", +"mprintf('\n==========================================================')\n", +"mprintf('\n u(velocity) U')\n", +"mprintf('\n (ft/s) (cal/cm2 sec K)')\n", +"mprintf('\n==========================================================')\n", +"for i=1:2\n", +" mprintf('\n %0.1f %3E',u_ft(i),U(i))\n", +"end\n", +"\n", +"//OUTPUT ((Ex5.3.b)\n", +"mprintf('\n\n\n OUTPUT Ex5.3.b');\n", +"mprintf('\n==========================================================')\n", +"mprintf('\nThe Peak Radial average bed temperature for given Velocities' )\n", +"mprintf('\n==========================================================')\n", +"mprintf('\n u(velocity) delta_T')\n", +"mprintf('\n (ft/s) (°C)')\n", +"mprintf('\n==========================================================')\n", +"for i=1:2\n", +" mprintf('\n %0.1f \t \t %0.0f',u_ft(i),delta_T(i))\n", +"end\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter5-Ex3-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex5.3.a');\n", +"mfprintf(fid,'\n==========================================================')\n", +"mfprintf(fid,'\nThe Overall Heat transfer coefficient for given Velocities' )\n", +"mfprintf(fid,'\n==========================================================')\n", +"mfprintf(fid,'\n u(velocity) U')\n", +"mfprintf(fid,'\n (ft/s) (cal/cm2 sec K)')\n", +"mfprintf(fid,'\n==========================================================')\n", +"for i=1:2\n", +" mfprintf(fid,'\n %0.1f %3E',u_ft(i),U(i))\n", +"end\n", +"mfprintf(fid,'\n\n\n OUTPUT Ex5.3.b');\n", +"mfprintf(fid,'\n==========================================================')\n", +"mfprintf(fid,'\nThe Peak Radial average bed temperature for given Velocities' )\n", +"mfprintf(fid,'\n==========================================================')\n", +"mfprintf(fid,'\n u(velocity) delta_T')\n", +"mfprintf(fid,'\n (ft/s) (°C)')\n", +"mfprintf(fid,'\n==========================================================')\n", +"for i=1:2\n", +" mfprintf(fid,'\n %0.1f \t \t %0.0f',u_ft(i),delta_T(i))\n", +"end\n", +"mclose(fid);\n", +"//===============================================END OF PROGRAM=======================================================\n", +"\n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Chemical_Reactor_Design_by_P_Harriott/6-Nonideal_Flow.ipynb b/Chemical_Reactor_Design_by_P_Harriott/6-Nonideal_Flow.ipynb new file mode 100644 index 0000000..086ad45 --- /dev/null +++ b/Chemical_Reactor_Design_by_P_Harriott/6-Nonideal_Flow.ipynb @@ -0,0 +1,330 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Nonideal Flow" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1: Power_Consumption_at_300_rpm_speed_of_stirrer_and_blending_time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P., 2003, Chemical Reactor Design (I-Edition), Marcel Dekker, Inc., USA, pp 436.\n", +"//Chapter-6 Ex6.1 Pg No.236\n", +"//Title:Power Consumption at 300 rpm,speed of stirrer and blending time\n", +"//====================================================================================================================\n", +"clear\n", +"clc\n", +"// COMMON INPUT\n", +"D_a=0.1;\n", +"D_t=0.3;\n", +"H=0.3;\n", +"N_P=5.5;\n", +"rho=1000;\n", +"n=5;\n", +"S_f=6;//Scale up factor in diameter\n", +"P_by_V_limit=10;//Pressure per unit volume (HP/1000gal)\n", +"n1=5;\n", +"Da_by_Dt1=D_a/D_t;\n", +"Da_by_Dt2=0.5;\n", +"\n", +"//CALCULATION (Ex6.1.a)\n", +"P_unit_vol=(N_P*n^3*D_a^5)/(%pi*(1/4)*D_t^2*H);\n", +"P_thousand_gal=P_unit_vol*5.067;\n", +"t=(4/n)*(D_t/D_a)^2*(H/D_t);\n", +"P_unit_vol_new=S_f^2*P_thousand_gal;\n", +"\n", +"//CALCULATION (Ex6.1.b)\n", +"n_limit=(P_by_V_limit/P_unit_vol_new)^(1/3) *n1;//Pressure per unit vol propotional to n3\n", +"t_inc_factor=n1/n_limit;//t inversely propotional to n\n", +"rotational_speed=n_limit*60;//Speed in rpm\n", +"\n", +"//CALCULATION (Ex6.1.c)\n", +"n2=(Da_by_Dt1/Da_by_Dt2)^(5/3)*n_limit;\n", +"rotaional_speed=n2*60;\n", +"t1=4*(1/Da_by_Dt1)^2*(H/D_t)*(1/n_limit);\n", +"t2=4*(1/Da_by_Dt2)^2*(H/D_t)*(1/n2);\n", +"\n", +"//OUTPUT (Ex6.1.a)\n", +"mprintf('\n OUTPUT Ex6.1.a');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\n The Power consumption per unit volume at 300rpm = %.2f HP/1000 gal',P_thousand_gal);\n", +"mprintf('\n\ The Power consumption scaling up sixfold in diameter = %.0f HP/1000 gal',P_unit_vol_new); \n", +"\n", +"\n", +"//OUTPUT (Ex6.1.b)\n", +"mprintf('\n\n\n OUTPUT Ex6.1.b');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\n The speed of the stirrer = %.2f sec-1 or %.0f rpm',n_limit,rotational_speed);\n", +"mprintf('\n Blending time increases by factor of %.2f ',t_inc_factor); \n", +"\n", +"//OUTPUT(Ex6.1.c)\n", +"mprintf('\n\n\n OUTPUT Ex6.1.c');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\n The new stirrer speed = %.2f sec-1 or %.0f rpm',n2,rotaional_speed); \n", +"mprintf('\n The new blending time for Da/Dt ratio of 0.5 = %.1f sec',t2); \n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter6-Ex1-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex6.1.a');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\n The Power consumption per unit volume at 300rpm = %.2f HP/1000 gal',P_thousand_gal);\n", +"mfprintf(fid,'\n\ The Power consumption scaling up sixfold in diameter = %.0f HP/1000 gal',P_unit_vol_new);\n", +"mfprintf(fid,'\n\n\n OUTPUT Ex6.1.b');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\n The speed of the stirrer = %.2f sec-1 or %.0f rpm',n_limit,rotational_speed);\n", +"mfprintf(fid,'\n Blending time increases by factor of %.2f ',t_inc_factor); \n", +"mfprintf(fid,'\n\n\n OUTPUT Ex6.1.c');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\n The new stirrer speed = %.2f sec-1 or %.0f rpm',n2,rotaional_speed); \n", +"mfprintf(fid,'\n The new blending time for Da/Dt ratio of 0.5 = %.1f sec',t2);\n", +"mclose(fid);\n", +"//======================================================END OF PROGRAM=================================================\n", +"//Disclaimer: In Ex6.1.c there is an arithematic error in the value of D_a/D_t. The value of D_a/D_t should be 11.4 instead of the value reported in the textbook for D_a/D_t=11.1." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2: Effect_of_diffusion_on_conversion_for_laminar_flow.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P., 2003, Chemical Reactor Design (I-Edition), Marcel Dekker, Inc., USA, pp 436.\n", +"//Chapter-6 Ex6.2 Pg No. 239\n", +"//Title:Effect of diffusion on conversion for laminar flow \n", +"//============================================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"D=1*10^(-2);//Diameter of pipeline (m)\n", +"R=D/2;//Radius (m)\n", +"D_m=10^(-4);//Diffusivity (m2/sec)\n", +"k=1;//Reaction rate constant (sec-1)\n", +"\n", +"\n", +"//CALCULATION\n", +"alpha=D_m/(k*(R^2));//Refer topic ('Diffusion in laminar flow reactors') Pg No.239\n", +"\n", +"\n", +"//OUTPUT\n", +"if (alpha<=0.01) \n", +" then\n", +" mprintf('\n The effect of radial diffusion on conversion can be neglected as alpha = %.0f',alpha )\n", +"else\n", +" mprintf('\n The effect of radial diffusion makes conversion almost as same as plug flow as alpha = %.0f',alpha)\n", +"end\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter6-Ex2-Output.txt','w');\n", +"if (alpha<=0.01) \n", +" then\n", +" mfprintf(fid,'\n The effect of radial diffusion on conversion can be neglected as alpha = %.0f',alpha )\n", +"else\n", +" mfprintf(fid,'\n The effect of radial diffusion makes conversion almost as same as plug flow as alpha = %.0f',alpha)\n", +"end\n", +"mclose(fid);\n", +"//================================================END OF PROGRAM======================================================== " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3: Effect_of_Axial_dispersion_and_length_on_conversion.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P., 2003, Chemical Reactor Design (I-Edition), Marcel Dekker, Inc., USA, pp 436.\n", +"//Chapter-6 Ex6.3 Pg No. 248\n", +"//Title:Effect of Axial dispersion and length on conversion\n", +"//====================================================================================================================\n", +"clear\n", +"clc\n", +"// COMMON INPUT\n", +"u=1;//Superficial velocity (cm/s)\n", +"D=2*10^(-5)//Molecular Diffusivity(cm2/s)\n", +"Re=30;//Reynolds No.\n", +"Pe_a=0.25;//Peclet No. corresponding Re No. from Fig 6.10\n", +"dp=3*(10^-1);//Particle Size (cm)\n", +"L=48;//Length of the bed (cm)\n", +"X_A=0.93;//Conversion\n", +"L_old=48;// Old bed length (cm)\n", +"L_new=L_old/2;//New bed length (cm)\n", +"\n", +"\n", +"\n", +"//CALCULATION (Ex6.3.a)\n", +"Pe_dash=Pe_a*L/dp;//Refer Pg.No.247\n", +"one_minus_X_A=(1-X_A);\n", +"k_rho_L_by_u1=2.65;//From Fig6.12 for given Pe_dash\n", +"X_A1=1-exp(-k_rho_L_by_u1);\n", +"//To increase the conversion more catalyst is needed\n", +"k_rho_L_by_u2=2.85;//From Fig6.12\n", +"X_A2=1-exp(-k_rho_L_by_u2);\n", +"Percentage_excess_cat_a=((k_rho_L_by_u2-k_rho_L_by_u1)/k_rho_L_by_u1)*100;\n", +"\n", +"//CALCULATION(Ex6.3.b)\n", +"k_rho_L_by_u_new=k_rho_L_by_u1/2;\n", +"X_A_cal=(1-exp(-k_rho_L_by_u_new));//Calculated conversion\n", +"Pe_dash_new=Pe_dash/2;\n", +"k_rho_L_by_u_graph=1.3992;//Value obtained from Figure6.12 for the calculated conversion\n", +"Percentage_excess_cat_b=((k_rho_L_by_u_graph-k_rho_L_by_u_new)/k_rho_L_by_u_new)*100;\n", +"\n", +"//OUTPUT(Ex6.3.a)\n", +"mprintf('\n OUTPUT Ex6.3.a');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\n The effect of axial dispersion is significant and the percentage excess of catalyst = %.0f%%',Percentage_excess_cat_a );\n", +"\n", +"//OUTPUT (Ex6.3.b)\n", +"mprintf('\n\n\n OUTPUT Ex6.3.b');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\n The effect of axial dispersion is less on reducing the bed length \n The percentage excess of catalyst = %.0f%%',Percentage_excess_cat_b );\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter6-Ex3-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex6.3.a');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\n The effect of axial dispersion is significant and the percentage excess of catalyst = %.0f%%',Percentage_excess_cat_a );\n", +"mfprintf(fid,'\n\n\n OUTPUT Ex6.3.b');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\n The effect of axial dispersion is less on reducing the bed length \n The percentage excess of catalyst = %.0f%%',Percentage_excess_cat_b );\n", +"mclose(fid);\n", +"//==============================================END OF PROGRAM=========================================================\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4: Conversion_in_packed_bed_for_same_superficial_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Harriot P., 2003, Chemical Reactor Design (I-Edition), Marcel Dekker, Inc., USA, pp 436.\n", +"//Chapter-6 Ex6.4 Pg No.251\n", +"//Title:Conversion in packed bed for same superficial velocity\n", +"//====================================================================================================================\n", +"clear\n", +"clc\n", +"//COMMON INPUT \n", +"L=2.5;//Lendth of bed(ft)\n", +"X_A=0.95;//Conversion\n", +"L_a=3;//Length of section a (ft)\n", +"L_b=2;//Length of section b (ft)\n", +"u_oa_by_u0=0.88;//Refer equation 3.64\n", +"u_ob_by_u0=1.12;\n", +"L=2.5;//(ft)\n", +"\n", +"\n", +"//CALCULATION (Ex6.4.a)\n", +"k_rho_L_by_u=log(1/(1-X_A));//First Order reactions\n", +"//For Section a\n", +"k_rho_L_by_u_a=k_rho_L_by_u*(L_a/L);\n", +"X_A_section_a=(1-exp(-k_rho_L_by_u_a));\n", +"//For Section b\n", +"k_rho_L_by_u_b=k_rho_L_by_u*(L_b/L);//Dimensionless Group based on ideal plug flow for first order reaction\n", +"X_A_section_b=(1-exp(-k_rho_L_by_u_b));\n", +"X_A_Ave=(X_A_section_b+X_A_section_a)/2;\n", +"Percent_X_A_Ave=X_A_Ave*100\n", +"\n", +"//CALCULATION (Ex6.4.b)\n", +"k_rho_L_by_u=log(1/(1-X_A));//First Order reaction\n", +"//For Section a\n", +"k_rho_L_by_u_a=k_rho_L_by_u*(L_a/L)*(1/u_oa_by_u0);\n", +"X_A_section_a=(1-exp(-k_rho_L_by_u_a));\n", +"delP_a_by_alpha_u0_pow=L_a*(u_oa_by_u0);//Refer equation 3.64\n", +"\n", +"//For Section b\n", +"k_rho_L_by_u_b=k_rho_L_by_u*(L_b/L)*(1/u_ob_by_u0);//Dimensionless Group based on ideal plug flow for first order reaction\n", +"delP_b_by_alpha_u0_pow=L_b*u_ob_by_u0;\n", +"X_A_section_b=(1-exp(-k_rho_L_by_u_b));\n", +"X_A_avg=(u_oa_by_u0*X_A_section_a+u_ob_by_u0*X_A_section_b)/2;\n", +"Percent_X_A_avg=X_A_avg*100;\n", +"\n", +"//OUTPUT(Ex6.4.a)\n", +"mprintf('\n OUTPUT Ex6.4.a');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\nThe average converion when each section has same superficial velocity:%0.1f%%',Percent_X_A_Ave );\n", +"\n", +"//OUTPUT(Ex6.4.b)\n", +"mprintf('\n\n\n OUTPUT Ex6.4.b');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\nThe overall conversion for different velocities:%0.1f%% ',Percent_X_A_avg );\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter6-Ex4-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex6.4.a');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\nThe average converion when each section has same superficial velocity:%0.1f%%',Percent_X_A_Ave );\n", +"mfprintf(fid,'\n\n\n OUTPUT Ex6.4.b');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\nThe overall conversion for different velocities:%0.1f%% ',Percent_X_A_avg );\n", +"mclose(fid);\n", +"//=======================================================END OF PROGRAM=================================================" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Chemical_Reactor_Design_by_P_Harriott/7-Gas_Liquid_Reactions.ipynb b/Chemical_Reactor_Design_by_P_Harriott/7-Gas_Liquid_Reactions.ipynb new file mode 100644 index 0000000..fc0df3c --- /dev/null +++ b/Chemical_Reactor_Design_by_P_Harriott/7-Gas_Liquid_Reactions.ipynb @@ -0,0 +1,748 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Gas Liquid Reactions" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1: EX7_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-7 Ex7.1 Pg No.260\n", +"//Title:Overall Reaction Rate Coefficient, Percent Resistance, Reaction Volume and Reactor Size\n", +"//===========================================================================================================\n", +"clear\n", +"clc\n", +"// COMMON INPUT\n", +"k2=8.5;//Reaction rate constant (L/mol-sec)\n", +"T=50;//Reaction condition temperature(°C)\n", +"P=2;//Reaction Pressure (atm)\n", +"H_O2=8*10^4;// Solubility (atm/mol fraction)\n", +"F=17000//Feed rate (L/hr)\n", +"C_B_feed=1.6;//Feed concentration(M)\n", +"C_B_product=0.8;//Product concentration(M)\n", +"k_L_a=900;//Liquid film mass transfer coefficient(hr-1)\n", +"k_g_a=80;//Gas film mass transfer coefficient(mol/hr L atm)\n", +"Epsilon=0.1;//Porosity\n", +"percent_inc=0.2;//Percentage excess required for reactor volume\n", +"\n", +"\n", +"//CALCULATION (Ex7.1.a)\n", +"H_O2_conv=H_O2*18/1000;// Convert (atm L/mole O2)\n", +"k_L_a_by_H=k_L_a/H_O2_conv;\n", +"reaction_resistance=H_O2_conv/(k2*C_B_product*(1-Epsilon)*3600);\n", +"Kg_a=1/((1/k_g_a)+(1/k_L_a_by_H)+(reaction_resistance));//Refer equation7.10\n", +"gasfilm_resistance_per=((1/k_g_a)/(1/Kg_a))*100;\n", +"liq_film_resistance_per=((1/k_L_a_by_H)/(1/Kg_a))*100;\n", +"reaction_resistance_per=((reaction_resistance)/(1/Kg_a))*100;\n", +"\n", +"//CALCULATION (Ex7.1.b)\n", +"delta_C_B=C_B_feed-C_B_product;\n", +"mol_O2_needed=F*delta_C_B/4;\n", +"N_air=100;//Assuming 100 mole of feed air\n", +"f_O2=0.209;//Fraction of O2\n", +"f_N2=1-f_O2;//Fraction of N2\n", +"N_O2_in=N_air*f_O2;\n", +"N_N2_in=N_air*f_N2;\n", +"N_O2_out=N_O2_in/2;//Half of O2 fed\n", +"N_N2_out=N_N2_in;\n", +"N_air_out=N_N2_out+N_O2_out;\n", +"P_O2_out=P*(N_O2_out/N_air_out);\n", +"P_O2_in=P*(N_O2_in/N_air);\n", +"P_O2_bar=(P_O2_in-P_O2_out)/(log(P_O2_in/P_O2_out));//Log mean Pressure\n", +"volume=mol_O2_needed/(Kg_a*P_O2_bar);\n", +"reactor_vol=volume+volume*percent_inc;\n", +"volume_gal=volume*0.264;\n", +"reactor_vol_gal=reactor_vol*0.264;\n", +"\n", +"\n", +"//OUTPUT (Ex7.1.a)\n", +"mprintf('\n OUTPUT Ex7.1.a');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\nThe percentage gas-film resistance : %0.1f%%',gasfilm_resistance_per);\n", +"mprintf('\nThe percentage liquid-film resistance: %0.1f%%',liq_film_resistance_per);\n", +"mprintf('\nThe percentage chemical reaction resistance: %0.1f%%',reaction_resistance_per);\n", +"\n", +"//OUTPUT (Ex7.1.b)\n", +"mprintf('\n\n\n OUTPUT Ex7.1.b');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\n Reaction volume calculated : %0.0f L ',volume );\n", +"mprintf('\n Reactor size to be chosen : %0.0f L',reactor_vol);\n", +"\n", +"\n", +"// FILE OUTPUT\n", +"fid= mopen('.\Chapter7-Ex1-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex7.1.a');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\nThe percentage gas-film resistance : %0.1f%%',gasfilm_resistance_per);\n", +"mfprintf(fid,'\nThe percentage liquid-film resistance: %0.1f%%',liq_film_resistance_per);\n", +"mfprintf(fid,'\nThe percentage chemical reaction resistance: %0.1f%%',reaction_resistance_per);\n", +"mfprintf(fid,'\n\n\n OUTPUT Ex7.1.b');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\n Reaction volume calculated : %0.0f L ',volume );\n", +"mfprintf(fid,'\n Reactor size to be chosen : %0.0f L',reactor_vol);\n", +"mclose(fid);\n", +"//===================================================END OF PROGRAM======================================================\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: The_gradient_for_B_in_the_liquid_film.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc. USA,pp 436.\n", +"//Chapter-7 Ex7.2 Pg No.270\n", +"//Title:The gradient for B in the liquid film\n", +"//===========================================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"C_B0_by_C_Ai=40;\n", +"D_A_by_D_B=1.2;\n", +"sqrt_M=10;\n", +"phi=sqrt_M;//Assume the gradient for A is the same as when the gradient for B is negligible\n", +"eff_diff_distA_by_xL=(1/phi);\n", +"\n", +"//CALCULATION\n", +"eff_diff_distB_by_xL=(1-eff_diff_distA_by_xL);\n", +"CB0_minus_CBbar_by_CB0=D_A_by_D_B*(1/C_B0_by_C_Ai)*(eff_diff_distB_by_xL/eff_diff_distA_by_xL);\n", +"C_Bbar_by_C_B0=(1-CB0_minus_CBbar_by_CB0);\n", +"sqrt_kC_B=sqrt(C_Bbar_by_C_B0);\n", +"phi_corrected=phi*sqrt_kC_B;\n", +"Percent_change=((phi-phi_corrected)/(phi))*100;\n", +"\n", +"//OUTPUT\n", +"mprintf('\n Percentage Decrease in Rate :%0.0f%% ',Percent_change);\n", +"mprintf('\n The decrease in rate is significant ,hence the gradient for B is significant in liquid film');\n", +"fid= mopen('.\Chapter7-Ex2-Output.txt','w');\n", +"mfprintf(fid,'\n Percentage Decrease in Rate :%0.0f%% ',Percent_change);\n", +"mfprintf(fid,'\n The decrease in rate is significant ,hence the gradient for B is significant in liquid film');\n", +"mclose(fid);\n", +"//================================================END OF PROGRAM==========================================================" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3: Overall_mass_transfer_coefficient_and_percent_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436\n", +"//Chapter-7 Ex7.3 Pg No.274\n", +"//Title:Overall mass transfer coefficient and percent resistance \n", +"//===========================================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"k2=8500;//(L/mol sec) at 25 °C\n", +"kg_a= 7.4 //(mol/hr ft3 atm)\n", +"k_star_L_a=32;//(hr-1)\n", +"a=34;//(ft2/ft3)\n", +"H_CO2=1.9*10^(3);//(atm/m f) Henry's Constant\n", +"D_CO2=2*10^(-5);//(cm2/sec)\n", +"D_OH=2.8*10^(-5);//(cm2/sec)\n", +"P_CO2_in=0.04;//(atm)\n", +"P_CO2_out=0.004;//(atm)\n", +"Caustic_conc=[0.5 0.75];//Cocentration on both the ends of the column bottom and top(M)\n", +"n=2;\n", +"M_H2O=18;//Molecular Weight\n", +"H_H2O=62.3;//(g/ft3) Henry's Constant\n", +"H_H2O_dash=H_H2O/M_H2O;//Henry's Constant converted into consistent units with kg_a\n", +"\n", +"\n", +"//CALCULATION\n", +"C_Ai=P_CO2_in/H_CO2*(1000/18);\n", +"k_star_L=(k_star_L_a/(a*3600))*(30.5);\n", +"H_CO2_dash=H_CO2*(1/H_H2O_dash);\n", +"for i=1:2\n", +"Phi_a(i)=(1+(Caustic_conc(i)/(n*C_Ai))*(D_OH/D_CO2));//Refer equation7.51\n", +"sqrt_M(i)=sqrt(k2*Caustic_conc(i)*D_CO2)/k_star_L;\n", +"Phi(i)=sqrt_M(i);//Refer fig 7.7\n", +"K_ga(i)=(1/((1/kg_a)+(H_CO2_dash/(Phi(i)*k_star_L_a))));//Overall Mass transfer coefficient\n", +"Percent_resis_gasfilm(i)=(K_ga(i)/kg_a)*100;\n", +"end\n", +"\n", +"//OUTPUT\n", +"mprintf('\n \t\t\t\t\t\t\tTop\t Bottom');\n", +"mprintf('\n Overall mass transfer coefficient (mol/hr ft3 atm): %0.1f\t %0.1f',K_ga(1),K_ga(2));\n", +"mprintf('\n Percenage resistance in gas film: %0.0f%%\t %0.0f%% ',Percent_resis_gasfilm(1) ,Percent_resis_gasfilm(2) );\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter7-Ex3-Output.txt','w');\n", +"mfprintf(fid,'\n \t\t\t\t\t\t\tTop\t Bottom');\n", +"mfprintf(fid,'\n Overall mass transfer coefficient (mol/hr ft3 atm): %0.1f\t %0.1f',K_ga(1),K_ga(2));\n", +"mfprintf(fid,'\n Percenage resistance in gas film: %0.0f%%\t %0.0f%% ',Percent_resis_gasfilm(1) ,Percent_resis_gasfilm(2) );\n", +"mclose(fid);\n", +"//========================================================================END OF PROGRAM=================================================================================\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4: Local_selectivity_due_to_mass_transfer_limitations.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436\n", +"//Chapter-7 Ex7.4 Pg No.279\n", +"//Title:Local selectivity due to mass transfer limitations\n", +"//===========================================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"C_Ai=0.02;//(M)\n", +"C_B0=3;//(M)\n", +"D_A=10^(-5);//(cm2/sec)\n", +"D_B=D_A;//(cm2/sec)\n", +"D_C=D_B;//(cm2/sec)\n", +"k_1=10^(4);//(L/mol sec)\n", +"k_star_l=0.015;//(cm/sec)\n", +"n=1;\n", +"C_c0=[0 1.4];\n", +"X=[0 0.5]// Conversion\n", +"Phi=[33 23];//From figure 7.7\n", +"\n", +"\n", +"//CALCULATION\n", +"k_2=0.09*k_1;\n", +"for i=1:2\n", +" C_B(i)=(1-X(i))*C_B0;\n", +"sqrt_M(i)=sqrt(C_B(i)*k_1*D_A)/k_star_l;\n", +"Phi_a(i)=(1+(C_B(i)/(n*C_Ai))*(D_B/D_A));//Refer equation 7.51\n", +"C_Bbar_by_C_B(i)=(Phi(i)/sqrt_M(i))^2;//Refer equation 7.59\n", +"delta_C_B(i)=(1-C_Bbar_by_C_B(i))*C_B(i);//Refer equation 7.60\n", +"delta_C_c(i)=delta_C_B(i);\n", +"C_cbar(i)=delta_C_c(i)+C_c0(i);\n", +"C_Bbar(i)=C_Bbar_by_C_B(i)*(C_B(i));\n", +"S(i)=(1-(k_2*C_cbar(i)/(C_Bbar(i)*k_1)))*100;//Refer equation 7.56\n", +"end\n", +"\n", +"//OUTPUT\n", +"mprintf('\n\tLocal selectivity due to mass transfer limitations ');\n", +"mprintf('\n\tThe local selectivity for Zero Conversion : %0.0f%%',S(1));\n", +"mprintf('\n\tThe local selectivity for 50%% Conversion : %0.0f%%',S(2));\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter7-Ex4-Output.txt','w');\n", +"mfprintf(fid,'\n\tLocal selectivity due to mass transfer limitations ');\n", +"mfprintf(fid,'\n\tThe local selectivity for Zero Conversion is %0.0f%%',S(1));\n", +"mfprintf(fid,'\n\tThe local selectivity for 50%% Conversion is %0.0f%%',S(2));\n", +"mclose(fid);\n", +"//======================================================END OF PROGRAM===================================================\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5: Maximum_rate_of_CO_absorption_and_Dimensions_of_Bubble_Column_Reactor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436\n", +"//Chapter-7 Ex7.5 Pg No.293\n", +"//Title:Maximum rate of CO absorption and Dimensions of Bubble Column Reactor\n", +"//===========================================================================================================\n", +"clear\n", +"clc\n", +"// COMMON INPUT\n", +"P_dash=5;//Partial pressure of acetic acid (atm)\n", +"P_total=20;//Total Pressure (atm)\n", +"myu=0.19;// Viscosity of acetic acid\n", +"T_C=180;//Temperature in (°C)\n", +"T_K=T_C+273;//Temperature in (K)\n", +"sigma_20=28;//Surface Tension(Dynes/cm) at 20 (°C)\n", +"sigma_180=20;//Surface Tension (Dynes/cm)at 180 (°C)\n", +"M_CO=28;//Molecular weight of CO\n", +"M_B=60.05;//Molecular weight acetic acid\n", +"V_A= 30.7;//Molar volume\n", +"S_CO=7*10^(-3);//Solubility of CO (mol/L atm)\n", +"f_CO=0.75;//Fraction of CO in feed\n", +"f_acetic_acid=1-f_CO;//Fraction of Acetic acid\n", +"R=82.056*(10^-3);//(cm3 atm/ K mol)\n", +"rho_air=1.21;//(kg/m3)density of air at 20 (°C)\n", +"sigma_H2O=72;//Surface tension (Dynes/cm)\n", +"myu_H2O=1;//Viscosity of water\n", +"k_L_a_air_water=0.051;//(sec-1)\n", +"D_O2_water=2.4*(10^-5);//(cm2/sec)diffusivity for oxygen in waterat 20(°C) \n", +"Conc_Rh=4*10^(-3);//Concentration of Rohdium(M)\n", +"Conc_CH3I=1;//Concentration of Methyl Iodide(M)\n", +"F_product_acetic_acid=0.1;// Rate of acetic acid produced (kmol/sec)\n", +"f_CO_reacted=0.8;//80% of CO reacted\n", +"u_g=0.1;//(m/sec)\n", +"Epsilon_air_water_new=0.07;//At velocity 3(cm/sec)\n", +"Epsilon_air_water_old= 0.12;//At velocity 6(cm/sec)\n", +"u_g_c=5*(10^(-2));//Gas Velocity Ex7.5.c(m/sec)\n", +"\n", +"\n", +"\n", +"//CALCUATION (Ex7.5.a)\n", +"D_CO=(7.4*10^(-8)*M_B^(1/2)*T_K)/(myu*V_A^(0.6));//Diffusivity of CO (Wilke–Chang equation Eq4.17)\n", +"M_ave=f_CO*M_CO+M_B*f_acetic_acid;//Average Molecular weight\n", +"rho_g=M_ave*P_total/(R*T_K);//From ideal gas law\n", +"epsilon_air_water= 0.12;//At velocity 6(cm/sec)\n", +"epsilon=epsilon_air_water*(sigma_H2O/sigma_180)^(0.4)*(myu/myu_H2O)^(0.2)*(rho_g/rho_air)^(0.2);//From equation 7.64\n", +"u_G=6;//From figure 7.12(cm/sec)\n", +"k_L_a=k_L_a_air_water*(D_CO/D_O2_water)^(0.5)*(epsilon/epsilon_air_water);//From equation 7.69\n", +"P_CO=P_total-P_dash;\n", +"C_CO_Star=S_CO*P_CO;\n", +"r_max=C_CO_Star*k_L_a;//Rate of CO absorption at 15 atm\n", +"r_test=158.8*(10^(6))*exp(-8684/T_K)*(Conc_Rh)*(Conc_CH3I);//Kinetic rate at 180 (°C) \n", +"\n", +"//CALCULATION(Ex7.5.b)\n", +"F_feed_CO=F_product_acetic_acid/f_CO_reacted;//Rate of flow of CO (kmol/sec)\n", +"F_total=F_feed_CO/f_CO;\n", +"Q=F_total*R*T_K/(P_total);\n", +"S=Q/u_g;\n", +"D_t=sqrt(4*S/%pi);\n", +"r_test_b=(158.8*(10^(6))*exp(-8684/T_K)*(Conc_Rh)*(Conc_CH3I))*(10^(-3));//Kinetic rate at 180 (°C) \n", +"liquid_vol= (F_product_acetic_acid/r_test_b)*(10^(-3));//liquid volume (m3)\n", +"h0=liquid_vol/S;//clear liquid\n", +"h=h0/(1-epsilon);//aerated liquid\n", +"\n", +"//CALCULATION(Ex7.5.c)\n", +"Q=F_total*R*T_K/(P_total);\n", +"S=Q/u_g_c;\n", +"D_t_c=sqrt(4*S/%pi);\n", +"Epsilon_new=(Epsilon_air_water_new/Epsilon_air_water_old)*epsilon;\n", +"liquid_vol= (F_product_acetic_acid/r_test_b)*(10^(-3));//liquid volume (m3)\n", +"h0=liquid_vol/S;//clear liquid\n", +"h_new=h0/(1-Epsilon_new);//aerated liquid\n", +"\n", +"//OUTPUT (Ex7.5.a)\n", +"mprintf('\n OUTPUT Ex7.5.a');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\n\tThe maximum rate of CO absorption at 15 atm : %f (mol/L s)',r_max);\n", +"mprintf('\n\tThe kinetic rate of CO absorption at 180(°C) : %f (mol/L s)',r_test);\n", +"mprintf('\n\tThe predicted value of k_L_a : %0.2f (s-1)',k_L_a);\n", +"\n", +"//OUTPUT (Ex7.5.b)\n", +"mprintf('\n\n\n OUTPUT Ex7.5.b');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\n\tThe Dimensions of the reactor are ');\n", +"mprintf('\n\tDiameter:%0.0f m',D_t); \n", +"mprintf('\n\tHeight:%0.2f m',h); \n", +"\n", +"//OUTPUT (Ex7.5.c)\n", +"mprintf('\n\n\n OUTPUT Ex7.5.c');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\n\tThe new dimensions of the reactor');\n", +"mprintf('\n\tDiameter:%0.1f m',D_t_c);\n", +"mprintf('\n\tHeight:%0.1f m',h_new);\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter7-Ex5-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex7.5.a');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\n\tThe maximum rate of CO absorption at 15 atm : %f (mol/L s)',r_max);\n", +"mfprintf(fid,'\n\tThe kinetic rate of CO absorption at 180(°C) : %f (mol/L s)',r_test);\n", +"mfprintf(fid,'\n\tThe predicted value of k_L_a : %0.2f (s-1)',k_L_a);\n", +"mfprintf(fid,'\n\n\n OUTPUT Ex7.5.b');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\n\tThe Dimensions of the reactor are ');\n", +"mfprintf(fid,'\n\tDiameter:%0.0f m',D_t); \n", +"mfprintf(fid,'\n\tHeight:%0.2f m',h); \n", +"mfprintf(fid,'\n\n\n OUTPUT Ex7.5.c');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\n\tThe new dimensions of the reactor');\n", +"mfprintf(fid,'\n\tDiameter:%0.1f m',D_t_c);\n", +"mfprintf(fid,'\n\tHeight:%0.1f m',h_new);\n", +"mclose(fid);\n", +"\n", +"//=================================================END OF PROGRAM===========================================================\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6: Fraction_of_O2_Power_of_agitator_kLa_and_average_dissolved_oxygen_concentration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc., USA,pp 436.\n", +"//Chapter-7 Ex7.6 Pg No.300\n", +"//Title:Fraction of O2,Power of agitator, k_L_a and average dissolved oxygen concentration.\n", +"//======================================================================================================================\n", +"clear\n", +"clc\n", +"// COMMON INPUT\n", +"Vol_reactor=200;//Volume of reactor (m3)\n", +"D=4;//Diameter of reactor (m)\n", +"depth=12;//Depth of reactor (m) \n", +"u_g=3;//Superficial velocity (cm/sec)\n", +"T_C=30;//Temperature (°C)\n", +"T_K=273+T_C;//Temperature (K)\n", +"f_O2=0.21;//Fraction of O2 in air\n", +"myu_soln=1.5*(10^(-3));//Viscosity of solution (Pa sec)\n", +"R=0.08206;//Gas constant (m3 atm/ K kmol)\n", +"r_O2_peak=45*(10^(-3));//Flow rate of O2 at peak demand \n", +"Da_by_Dt=(1/3);\n", +"Da=1.333;//(m)\n", +"N=120;//(rpm)\n", +"N_conv=(N/60);//(sec-1)\n", +"Press_top=1;//Pressure at the top of the vessel (atm) \n", +"rho=1000;//Density of water (kg/m3)\n", +"ug_sup1=3*(10^(-2));//based on 30(°C) and 1 (atm)\n", +"V=151;//Volume of solution calculated Ex7.6.a (m3)\n", +"ug_sup1=3*(10^(-2));//based on 30(°C) and 1 atm.\n", +"Press_top=1;//Pressure at the top of the vessel (atm) \n", +"Press_bottom=2;//From Ex7.6.c\n", +"ug_sup2=ug_sup1/Press_bottom;// at 2atm superficial velocity (cm/sec)\n", +"ug_ave=(ug_sup1+ug_sup2)/2;//Average superficial velocity (cm/sec)\n", +"depth=12;//Depth of reactor (m) \n", +"one_atm_water=10.3;//1 atm pressure corresponds to 10.3 (m) height of water\n", +"k_H_O2=5.2*10^(4)// Henery's law constant for O2 in water for O2 (atm/mol fraction) \n", +"M_O2=32;//Molecular weight of O2\n", +"M_H2O=18;//Molecular weight of water\n", +"C_O2_critical=1*10^(-3);//Critical O2 Concentration (g/L)\n", +"percent_reduction=40/100;//Mass transfer coefficient in the upper region of the reactor is 40% less than the average\n", +"kLa_soln=0.22;//Value calculated in Ex7.6.d \n", +"r_conv=1.25*10^(-5);//Rate at peak O2 demand (mol/L sec)\n", +"depth=12;//Depth of reactor (m) \n", +"\n", +"\n", +"//CALCULATION (Ex7.6.a )\n", +"S=%pi*(D^2)/4;//Cross section area (m2)\n", +"V=S*depth;//Volume of solution(m3)\n", +"F_air=(S*u_g*(10^(-2))*3600)/(R*(10^(-3))*T_K);\n", +"F_O2=f_O2*F_air;//Feed rate of O2 (mol/hr)\n", +"F_O2_used=r_O2_peak*V*(10^(3));//O2 used for aerobic fermentation (mol/hr)\n", +"F_O2_left=F_O2-F_O2_used;//O2 left after aerobic fermentation(mol/hr)\n", +"f_O2_exitgas=F_O2_left/F_air;//Fraction of O2 in exit gas\n", +"Percent_O2_exitgas=(f_O2_exitgas)*(100);\n", +"Frac_O2_used=((f_O2-f_O2_exitgas)/f_O2);\n", +"\n", +"//CALCULATION (Ex7.6.b )\n", +"Re=(rho*N_conv*Da^2)/myu_soln;\n", +"N_p=6;//For a standard turbine \n", +"N_p_pitched=1.7;//For a pitched-blade turbine\n", +"P0=(N_p*rho*(N_conv^3)*(Da^5))*(10^(-3));//Refer equation 7.73 (kW)\n", +"//If the turbine is 2 m from the bottom, or 10 m below the surface,the pressure is about 2 atm since 1atm= 10.3 m water\n", +"Press_bottom=2\n", +"ug_sup2=ug_sup1/Press_bottom;\n", +"Q=ug_sup2*S;\n", +"N_Ae=Q/(N_conv*(Da^3));\n", +"Pg_by_P0=0.55;//From figure 7.15 based on N_Ae value calculated\n", +"Pg=Pg_by_P0*P0;//When aerated\n", +"P0_pitched=(N_p_pitched/N_p)*P0;\n", +"Pg_by_P0_pitched=0.8;//Solution reaching the upper stirrers is already aerated\n", +"Pg_pitched=Pg_by_P0_pitched*P0_pitched;\n", +"Tot_Pow_no_air=P0+Press_bottom*P0_pitched;//Total power when no air is presented\n", +"Tot_Pow_aerated=Pg+Press_bottom*Pg_pitched;//Total power when it is aerated\n", +"\n", +"//CALCULATION (Ex7.6.c )\n", +"P_by_V_ave=Tot_Pow_aerated/V;\n", +"kLa_O2_sulfite=0.32;//Using figure7.16 based on ave(P/V) value and ug_average value\n", +"kLa_soln=0.7*kLa_O2_sulfite;//kLa for this solution is 70% of the value for oxygen absorption in sodium sulfite (sec-1)\n", +"y_O2=0.086;//If gas is backmixed\n", +"depth_ave=depth/2;\n", +"Press_ave=(Press_top+(depth_ave/one_atm_water));//Pressure at average depth (atm)\n", +"C_O2_star=(Press_ave*y_O2/k_H_O2)*(1000/M_H2O);//Conversion (mol/L)\n", +"r_conv=r_O2_peak/3600;//Rate at peak O2 demand (mol/L sec)\n", +"C_ave=(C_O2_star-(r_conv/kLa_soln))\n", +"C_ave_conv=C_ave*M_O2*1000;//Converted value of O2 concentration in(mg/L)\n", +"\n", +"//CALCULATION (Ex7.6.d)\n", +"depth_ave=depth/2;\n", +"Press_ave=(Press_top+(depth_ave/one_atm_water));//Pressure at average depth (atm)\n", +"kLa_soln_reduced=kLa_soln*(1-percent_reduction);\n", +"C_star_minus_C=r_conv/kLa_soln_reduced;\n", +"C_O2_new=(C_O2_star-(C_star_minus_C));\n", +"C_O2_new_conv=C_O2_new*M_O2*1000;//Converted value of O2 concentration in(mg/L)\n", +"C_O2_star_new=C_O2_star/Press_ave;\n", +"\n", +"//OUTPUT (Ex7.6.a)\n", +"mprintf('\n OUTPUT Ex7.6.a');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\nAt the peak demand, fraction of the oxygen supplied = %.3f ',Frac_O2_used);\n", +"\n", +"//OUTPUT(Ex7.6.b )\n", +"mprintf('\n\n\n OUTPUT Ex7.6.b');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\nThe total power required for the agitator before the air is turned on: %0.0f kW',Tot_Pow_no_air);\n", +"mprintf('\nThe total power required for the agitator after the air is turned on: %0.0f kW',Tot_Pow_aerated);\n", +"\n", +"//OUTPUT (Ex7.6.c )\n", +"mprintf('\n\n\n OUTPUT Ex7.6.c');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\nThe calculated value of kLa (mass transfer coefficient) of solution:%0.2f (sec-1)',kLa_soln);\n", +"mprintf('\nThe calculated value of average dissolved O2 concentration: %0.2f (mg/L)',C_ave_conv);\n", +"\n", +" //OUTPUT (Ex7.6.d)\n", +" mprintf('\n\n\n OUTPUT Ex7.6.d');\n", +"mprintf('\n==========================================================');\n", +" mprintf('\nThe new calculated value of average dissolved O2 concentration %0.2f (mg/L)',C_O2_new_conv);\n", +" if(C_star_minus_C>C_O2_star_new)\n", +" mprintf('\nThe reactor is operated above critical O2 concentration ');\n", +" else\n", +" mprintf('\nThe reactor should be operated at higher air rate otherwise C_O2 would drop to zero')\n", +" end\n", +" // FILE OUTPUT\n", +"fid= mopen('.\Chapter7-Ex6-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex7.6.a');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\nAt the peak demand, fraction of the oxygen supplied = %.3f ',Frac_O2_used);\n", +"mfprintf(fid,'\n\n\n OUTPUT Ex7.6.b');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\nThe total power required for the agitator before the air is turned on: %0.0f kW',Tot_Pow_no_air);\n", +"mfprintf(fid,'\nThe total power required for the agitator after the air is turned on: %0.0f kW',Tot_Pow_aerated);\n", +"mfprintf(fid,'\n\n\n OUTPUT Ex7.6.c');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\nThe calculated value of kLa (mass transfer coefficient) of solution:%0.2f (sec-1)',kLa_soln);\n", +"mfprintf(fid,'\nThe calculated value of average dissolved O2 concentration: %0.2f (mg/L)',C_ave_conv);\n", +"mfprintf(fid,'\n\n\n OUTPUT Ex7.6.d');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\nThe new calculated value of average dissolved O2 concentration %0.2f (mg/L)',C_O2_new_conv);\n", +" if(C_star_minus_C>C_O2_star_new)\n", +" mfprintf(fid,'\nThe reactor is operated above critical O2 concentration ');\n", +" else\n", +" mfprintf(fid,'\nThe reactor should be operated at higher air rate otherwise C_O2 would drop to zero')\n", +" end\n", +" mclose(fid);\n", +"//===================================================END OF PROGRAM======================================================\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7: EX7_7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-7 Ex7.7 Pg No.304\n", +"//Title:Apparent value of kLa, regime of operation and selectivity dependency on gas mixing\n", +"//======================================================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"Vol_reactor=35;//Volume of reactor(L)\n", +"No_reactor=3;//No. of reactor\n", +"T_C=155;//Operating Temperature (°C)\n", +"T_ref=273;//Reference Temperature (°C)\n", +"T_K= T_C+T_ref;//Operating Temperature (K)\n", +"P=8.2;//Operating Pressure (atm)\n", +"X_conversion=9.5*10^(-2);//Conversion\n", +"S=73*10^(-2);//Selectivity\n", +"M_cyclohexane=84.16;//Molecular weight of cyclohexane\n", +"F_cyclohexane=100;//Feed rate of cyclohexane (L/hr)\n", +"F_air=9.9;//Feed rate of air (nm3/hr)\n", +"f_O2_air=0.21;//Fraction of O2 in air\n", +"V_ref=22400;//Reference volume at STP(cm3/mol)\n", +"y_O2=0.002;//O2 in vent gas\n", +"f_O2_consumed=0.99;//Fraction of O2 Consumed\n", +"rho_cyclohexane=0.779;//Density of cyclohexane at 20 (°C)\n", +"main_pdt_ratio=3/2;\n", +"by_pdt_ratio=(1-main_pdt_ratio);\n", +"stoi_rxn_O2=[0.5 1];\n", +"rho_M=0.650;//Density of Cyclohexane at 155 (°C)\n", +"P_dash=5.8;//Vapour Pressure of cyclohexane at 155 (°C)\n", +"D_reactor=30;//Diameter of reactor (cm)\n", +"h_reactor=50;//Height of reactor (cm)\n", +"myu_20=0.98;//(cp) Viscosity at 20(°C) \n", +"myu_155=0.2// (cp) Viscosity at 155(°C)\n", +"x_O2=6.38*(10^(-6));//Mol fraction of O2\n", +"D_B_by_D_A=0.5;//Assumed value (refer Ex7.7)\n", +"Phi=20;//Refer Fig. 7.7\n", +"n=1/(0.7);\n", +"\n", +"\n", +"//CALCULATION (Ex7.7.a )\n", +"F_O2=(F_air*10^(6)*f_O2_air)/(3600*V_ref);\n", +"delta_N_O2=F_O2*f_O2_consumed;\n", +"F_C6=(F_cyclohexane*10^(3)*rho_cyclohexane)/(3600*M_cyclohexane)\n", +"F_prdts=F_C6*X_conversion*S;\n", +"F_O2_prdts=F_prdts*(main_pdt_ratio*stoi_rxn_O2(1)+by_pdt_ratio*stoi_rxn_O2(2));\n", +"F_O2_remain_used=delta_N_O2-F_O2_prdts;\n", +"F_O2_prdts_conver=F_O2_prdts/(F_C6*X_conversion*S);\n", +"F_O2_remain_used_conver=F_O2_remain_used/(F_C6*X_conversion*(1-S));\n", +"X_O2=10^(0.366*log10(T_K)-3.8385);//O2 solubility from Wild et al. [37]:\n", +"PO2_plus_PN2=P-P_dash;\n", +"P_O2=y_O2*PO2_plus_PN2;\n", +"x_O2=P_O2*X_O2;//Mol fraction of O2\n", +"C_M=rho_M*10^(3)/M_cyclohexane;\n", +"C_O2_star=C_M*x_O2;\n", +"\n", +"//Assume each reactor has 30 L solution\n", +"V_soln_n=30;//Volume of solution in each reactor \n", +"apparent_kLa=(delta_N_O2)/(V_soln_n*No_reactor*C_O2_star);\n", +"F_total=(F_air*10^(6)/3600)*(T_K/T_ref)*(8.2/2.4)*(1/8.2);//The total vapor flow is 8.2/2.4 times the air flow\n", +"CSA_reactor=%pi*(D_reactor^2)/4;\n", +"u_g=F_total/(CSA_reactor*No_reactor);\n", +"//Calculation for predicted value of kLa\n", +"kLa_20=0.16;//From Figure 7.16, for O2–C6H12 at 20 (°C), 2 cm/sec, 5 kW/m3\n", +"T_data=20+T_ref;//Temperature at which data is taken from the table\n", +"D_155_by_D_20=(T_K/T_data)*(myu_20/myu_155);\n", +"Predicted_kLa=kLa_20*(D_155_by_D_20^(0.5))*(u_g/2)^(0.5);\n", +"\n", +"//CALCULATION (Ex7.7.b )\n", +"C_M=rho_M*10^(3)/M_cyclohexane;\n", +"C_B0=(1-X_conversion)*C_M;\n", +"C_Ai=C_M*x_O2;\n", +"Phi_a=(1+(C_B0/(C_Ai*n))*(D_B_by_D_A)^(0.5));\n", +"ratio=Phi_a/Phi;\n", +"\n", +"//OUTPUT (Ex7.7.a )\n", +"mprintf('\n OUTPUT Ex7.7.a');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\nThe value of apparent kLa: %0.2f (sec-1)',apparent_kLa);\n", +"mprintf('\n The value of predicted kLa: %0.2f (sec-1)',Predicted_kLa);\n", +"if (apparent_kLa>Predicted_kLa)\n", +" mprintf('\nThe absorption of oxygen is greatly enhanced by chemical reactions in the liquid film')\n", +" mprintf('\nThe kinetics can be approximated by a first-order expression,the reaction would fall in the pseudo-first-order regime,\nwhere the rate varies with the square root of the oxygen diffusivity and the rate constant.')\n", +"end\n", +"\n", +"//OUTPUT (Ex7.7.b )\n", +"mprintf('\n\n\n OUTPUT Ex7.7.b');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\nThe value of Phi (enhancement factor) %0.4E ',Phi_a);\n", +"mprintf('\nThe value of ratio Phi_a_by_Phi:%0.1E',ratio);\n", +"mprintf('\nFrom the ratio value Phi_a is greater than Phi hence there is no significant gradient for cyclohexane');\n", +"\n", +"// FILE OUTPUT\n", +"fid= mopen('.\Chapter7-Ex7-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex7.7.a');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\nThe value of apparent kLa: %0.2f (sec-1)',apparent_kLa);\n", +"mfprintf(fid,'\n The value of predicted kLa: %0.2f (sec-1)',Predicted_kLa);\n", +"if (apparent_kLa>Predicted_kLa)\n", +" mfprintf(fid,'\nThe absorption of oxygen is greatly enhanced by chemical reactions in the liquid film')\n", +" mfprintf(fid,'\nThe kinetics can be approximated by a first-order expression,the reaction would fall in the pseudo-first-order regime,\nwhere the rate varies with the square root of the oxygen diffusivity and the rate constant.')\n", +"end\n", +"mfprintf(fid,'\n\n\n OUTPUT Ex7.7.b');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\nThe value of Phi (enhancement factor) %0.4E ',Phi_a);\n", +"mfprintf(fid,'\nThe value of ratio Phi_a_by_Phi:%0.1E',ratio);\n", +"mfprintf(fid,'\nFrom the ratio value Phi_a is greater than Phi hence there is no significant gradient for cyclohexane');\n", +"mclose(fid);\n", +"//==========================================================END OF PROGRAM===============================================\n", +"\n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Chemical_Reactor_Design_by_P_Harriott/8-Multiphase_Reactors.ipynb b/Chemical_Reactor_Design_by_P_Harriott/8-Multiphase_Reactors.ipynb new file mode 100644 index 0000000..c45fdb1 --- /dev/null +++ b/Chemical_Reactor_Design_by_P_Harriott/8-Multiphase_Reactors.ipynb @@ -0,0 +1,269 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Multiphase Reactors" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1: Gas_absorption_coefficient_and_fraction_of_overall_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P., 2003, Chemical Reactor Design (I-Edition), Marcel Dekker, Inc., USA, pp 436.\n", +"//Chapter-8 Ex8.1 Pg No. 323\n", +"//Title:Gas absorption coefficient and fraction of overall resistance\n", +"//============================================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"rho_oil=0.8;//Density of oil (g/cm3)\n", +"IV_init=130;//Iodine Value initial\n", +"IV_final=80;//Iodine Value final\n", +"P=45;//Pressure of system (psig)\n", +"T_C=204;// Temperature of system (°C)\n", +"t_run=[26 17];//Time required for hydrogenation run 2;\n", +"frac_Ni=[0.005 0.0125]//Fraction of Nickel used for different run\n", +"\n", +"//CALCULATION\n", +"r_ave=((IV_init -IV_final))*(0.039*rho_oil)*(1/60).*(t_run.^(-1));//Relationship between Iodine value and Hydrogen consumption (mol- H2/ L sec)\n", +"H_H2= 4*10^(-3);//Solubility of H2 from Fig8.4 Pg No.322\n", +"P_H2=(P/14.7)+1;//Absolute Pressure in (atm)\n", +"C_H2=P_H2 *H_H2;\n", +"Ci_by_r=C_H2.*(r_ave.^(-1));\n", +"Coeff_R_cat=frac_Ni.^(-1);\n", +"equation=[ones(1,2);Coeff_R_cat]//Simultaneous Equation\n", +"Resistance= Ci_by_r*inv(equation);\n", +"Gas_abs_resistance=(Resistance(1)*100 ).*(Ci_by_r.^(-1));\n", +"Gas_abs_coefficient=(1/Resistance(1));\n", +"\n", +"//OUTPUT\n", +"mprintf('\nThe Gas absorption coefficient is %f sec-1',Gas_abs_coefficient);\n", +"mprintf('\n The Fraction of overall resistance due to gas absorption\n Run 1 %0.0f%% \n Run 2 %0.0f%%',Gas_abs_resistance(1),Gas_abs_resistance(2));\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter8-Ex1-Output.txt','w');\n", +"mfprintf(fid,'\nThe Gas absorption coefficient is %f sec-1',Gas_abs_coefficient);\n", +"mfprintf(fid,'\n The Fraction of overall resistance due to gas absorption\n Run 1 %0.0f%% \n Run 2 %0.0f%%',Gas_abs_resistance(1),Gas_abs_resistance(2));\n", +"mclose(fid);\n", +"//=======================================================END OF PROGRAM=================================================" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2: External_Mass_Transfer_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P., 2003, Chemical Reactor Design (I-Edition), Marcel Dekker, Inc., USA, pp 436.\n", +"//Chapter-8 Ex8.2 Pg No. 329\n", +"//Title:External Mass Transfer resistance\n", +"//===========================================================================================================\n", +"\n", +"clear\n", +"clc\n", +"//INPUT\n", +"Chi=1.9;\n", +"M_A=2;//Molecular weight of Hydrogen\n", +"M_B=32;//Molecular weight of methanol\n", +"rho=0.79;//Density of methanol\n", +"myu=0.52;//Viscosity of methanol (cP)\n", +"V_A=14.3//Molar volume H2\n", +"T_C=30;//Operating Temperature(°C)\n", +"T_K=273+T_C//Temperature (K)\n", +"Epsilon=0.4;//Porosity\n", +"rho_cat_dry=1.2;//Density of dry catalyst (g/cm3)\n", +"rho_s=2;//Solid density\n", +"g=9.8// Acceleration due to gravity(m/s2)\n", +"d_p=10^(-3);//Size of catalyst (cm)\n", +"lambda=1.3;//From equation 8.4 Pg. No. 317\n", +"r_vol=2.4;//Measured rate (L/min)\n", +"V_mol=22.4;//(L/mol) assuming ideal gas\n", +"C_H2=4.1*10^(-3);//From Figure 8.3 (mol/L) Pg. No. 321\n", +"\n", +"\n", +"//CALCULATION\n", +"//Assume D_H2 is three times the value given by the Wilke–Chang Equation\n", +"D_H2=3*(7.4*(10^(-8))*(Chi*M_B)^(0.5)*T_K)/(myu*(V_A)^0.6)\n", +"Sc=myu*10^-2/(rho*D_H2);\n", +"rho_cat_methanol=(1-Epsilon)*rho_s+Epsilon*rho;\n", +"delta_rho=rho_cat_methanol-rho;\n", +"v_t=(g*10*(d_p)^2*delta_rho)/(18*myu*10^-2);// From Stoke's Law\n", +"Re=rho*v_t*d_p/(myu*10^-2);\n", +"Sh_star=2+0.6*(Re)^(0.5)*(Sc^(1/3));//Refer equation 8.9 Pg.No.325\n", +"kc_star=Sh_star*D_H2/d_p;\n", +"kc=2*kc_star;//With vigorous agitation\n", +"a_c=6*lambda/(d_p*rho_cat_dry);//From Equation 8.4 Pg. No. 317 \n", +"r_mol=r_vol/(22.4*60);//\n", +"delta_C_ext=r_mol*10^3/(kc*a_c);\n", +"percent_ext_resistance=(delta_C_ext/C_H2)*100;\n", +"\n", +"//OUTPUT\n", +"mprintf('\nThe external mass transfer resistance is about %0.0f%% of overall resistance',percent_ext_resistance);\n", +"mprintf('\n The external mass transfer resistance is barely significant');\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter8-Ex2-Output.txt','w');\n", +"mfprintf(fid,'\nThe external mass transfer resistance is about %0.0f%% of overall resistance',percent_ext_resistance);\n", +"mfprintf(fid,'\n The external mass transfer resistance is barely significant');\n", +"mclose(fid);\n", +"//=====================================================END OF PROGRAM=========================================\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3: Apparent_rate_constant_and_consistency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P., 2003, Chemical Reactor Design (I-Edition), Marcel Dekker, Inc., USA, pp 436.\n", +"//Chapter-8 Ex8.3 Pg No.\n", +"//Title:Apparent rate constant and consistency\n", +"//===========================================================================================================\n", +"\n", +"clear\n", +"clc\n", +"// COMMON INPUT\n", +"LHSV_inv=[0.75 1.39];//Refer table 8.2 Test Results (Liquid Hourly Space Velocity)\n", +"X_S=[0.77 0.83];//Refer table 8.2 Percentage Sulphur removal\n", +"T_C=365;//Operating Temperature (°C)\n", +"rho=0.64;//Density of Sulphur Compounds (g/cm3)\n", +"myu=0.5;//Viscosity(cP)\n", +"T_K=273+T_C;//Temperature (K)\n", +"M_B=374;//For CHS compounds(Refer table8.1)\n", +"V_A=M_B/0.6;//Molar volume\n", +"Chi=1;\n", +"Epsilon_by_tau=0.1;\n", +"D_pore_by_D_bulk=0.5;//Hinderance due to large molecules\n", +"epsilon_holdup=0.6;// Assuming bed consists 60% catalyst\n", +"k_app_rhob=1.96//Refer Ex8.3.a Run 1\n", +"eta=0.74;\n", +"R=0.095;//Size of particle\n", +"C_H2_incorrect=0.48;//Solubility of H2 at 56 atm\n", +"P_incorrect=56;//Incorrect Pressure\n", +"P_correct=65;//Correct Pressure\n", +"m_feed=640;// Concentration of Feed (g/L);\n", +"percent_S=2.04;//Percentage of Sulphur\n", +"MW_S=32;//Molecular weight of Sulphur\n", +"N_H2=1.5;//Moles of H2\n", +"V_H2=14.3;//Solubility of Hydrogen\n", +"\n", +"//CALCULATION (Ex8.3.a)\n", +"for i=1:2\n", +" kapp_rhob(i)=log((1/(1-X_S(i))))*(1/LHSV_inv(i));//Refer Equation 8.21\n", +" \n", +"end\n", +"L=LHSV_inv(2)/LHSV_inv(1);\n", +"kapp_ratio=kapp_rhob(1)/kapp_rhob(2);\n", +"n=log10(kapp_ratio)/log10(L);\n", +"\n", +"//CALCULATION (Ex8.3.b)\n", +"//FOR SULPHUR\n", +"D_CHS=(7.4*(10^(-8))*(Chi*M_B)^(0.5)*T_K)/(myu*(V_A)^0.6);\n", +"D_e_S=Epsilon_by_tau*D_pore_by_D_bulk*D_CHS;\n", +"epsilon_holdup=0.6;// Assuming bed consists 60% catalyst\n", +"k_app_S=k_app_rhob/(3600*epsilon_holdup);//Refer Ex8.3.a\n", +"phi_app_S=R*(k_app_S/D_e_S)^(0.5);\n", +"//FOR H2\n", +"C_H2_corrected=C_H2_incorrect*(P_correct/P_incorrect);\n", +"C_S_initial=m_feed*percent_S*10^(-2)/MW_S;\n", +"Initial_rate=k_app_rhob*C_S_initial;\n", +"k_app_H2=N_H2*Initial_rate/(3600*epsilon_holdup*C_H2_corrected);\n", +"//Assume D_H2 is three times the value given by the Wilke–Chang Equation\n", +"D_H2=3*(7.4*(10^(-8))*(Chi*M_B)^(0.5)*T_K)/(myu*(V_H2)^0.6);\n", +"D_e_H2=Epsilon_by_tau*D_H2;\n", +"phi_app_H2=R*(k_app_H2/D_e_H2)^(0.5);\n", +"\n", +"//OUTPUT (Ex8.3.a)\n", +"mprintf('\n OUTPUT Ex8.3.a');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\n\tThe Apparent rate constants are \n\t Run1 %0.2f hr-1 \n\t Run2 %0.2f hr-1 ',kapp_rhob(1),kapp_rhob(2))\n", +"mprintf('\n\tThe exponent value = %0.1f hence the difference is not consistent with repect to equations (8.23) and (8.24) for the apparent rate constants obtained',n); \n", +"mprintf('\n\tThe error may be due to error in assuming a first order reaction');\n", +"\n", +"//OUTPUT (Ex8.3.b)\n", +"mprintf('\n\n\n OUTPUT Ex8.3.b');\n", +"mprintf('\n==========================================================');\n", +"mprintf('\n\tThe internal effectiveness factor based on Sulphur and Hydrogen diffusion are %0.2f and %0.2f respectively',phi_app_S,phi_app_H2);\n", +"mprintf('\n\tThe internal effectiveness factor based on Hydrogen is negligible');\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter8-Ex3-Output.txt','w');\n", +"mfprintf(fid,'\n OUTPUT Ex8.3.a');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\n\tThe Apparent rate constants are \n\t Run1 %0.2f hr-1 \n\t Run2 %0.2f hr-1 ',kapp_rhob(1),kapp_rhob(2))\n", +"mfprintf(fid,'\n\tThe exponent value = %0.1f hence the difference is not consistent with repect to equations (8.23) and (8.24)for the apparent rate constants obtained',n); \n", +"mfprintf(fid,'\n\tThe error may be due to error in assuming a first order reaction');\n", +"mfprintf(fid,'\n\n\n OUTPUT Ex8.3.b');\n", +"mfprintf(fid,'\n==========================================================');\n", +"mfprintf(fid,'\n\tThe internal effectiveness factor based on Sulphur and Hydrogen diffusion are %0.2f and %0.2f respectively',phi_app_S,phi_app_H2);\n", +"mfprintf(fid,'\n\tThe internal effectiveness factor based on Hydrogen is negligible');\n", +"mclose(fid);\n", +"//============================================END OF PROGRAM=================================================\n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Chemical_Reactor_Design_by_P_Harriott/9-Fluidized_Bed_Reactors.ipynb b/Chemical_Reactor_Design_by_P_Harriott/9-Fluidized_Bed_Reactors.ipynb new file mode 100644 index 0000000..023819e --- /dev/null +++ b/Chemical_Reactor_Design_by_P_Harriott/9-Fluidized_Bed_Reactors.ipynb @@ -0,0 +1,162 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Fluidized Bed Reactors" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1: Model_II_Volumetric_Mass_Transfer_Coefficient_K.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-9 Ex9.1 Pg No.376\n", +"//Title:Model II- Volumetric Mass Transfer Coefficient (K)\n", +"//============================================================================================================\n", +"\n", +"clear\n", +"clc\n", +"//INPUT\n", +"u0=[ 0.1 0.3 0.5 0.75 0.95 1.15];//Fluid Velocities (m/sec)\n", +"X=[0.923 0.872 0.846 0.775 0.728 0.664];//Conversion\n", +"h_by_h0=[1.26 1.44 1.66 2.0 2.3 2.7];//Height of bed under fluidized condition by height of packed bed\n", +"Epsilon_m=0.456;//Fraction of voids in packed bed\n", +"h0=0.75;//Height of packed bed (m)\n", +"k_r=4.45 ;//Reaction rate constant(sec-1)\n", +"W=5;//Weight of the bed (kg)\n", +"\n", +"\n", +"//CALCULATION\n", +"n=length(X);\n", +"for i=1:n\n", +" K0_L_by_u0(i)=log(1/(1-X(i)));//Refer equation 9.21 Pg No.371\n", +" L(i)=h_by_h0(i)*h0;\n", +" one_minus_epsilon(i)=(1-Epsilon_m)/h_by_h0(i); \n", +" k_rhob(i)=k_r*one_minus_epsilon(i); \n", +" K0(i)=K0_L_by_u0(i)*u0(i)/L(i);\n", +" K(i)=1/((K0(i).^(-1))-(1/k_rhob(i))); //Refer equation 9.19 Pg No.371\n", +"end\n", +"\n", +"\n", +"//OUTPUT\n", +"mprintf('\nThe values of K for given velocities')\n", +"mprintf('\n u (m/sec) \t K (sec-1) ');\n", +"mprintf('\n===================================================================');\n", +"for i=1:n\n", +" mprintf('\n %.3g \t \t %0.3f',u0(i),K(i)); \n", +"end\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter9-Ex1-Output.txt','w');\n", +"mfprintf(fid,'\nThe values of K for given velocities')\n", +"mfprintf(fid,'\n u (m/sec) \t K (sec-1) ');\n", +"mfprintf(fid,'\n===================================================================');\n", +"for i=1:n\n", +" mfprintf(fid,'\n %.3g \t \t %0.3f',u0(i),K(i)); \n", +"end \n", +"\n", +"//==============================================END OF PROGRAM============================================= \n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2: Model_II_Fraction_unconverted_naphthalene.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Harriot P.,2003,Chemical Reactor Design (I-Edition) Marcel Dekker,Inc.,USA,pp 436.\n", +"//Chapter-9 Ex9.2 Pg No.389\n", +"//Title: Model II-Fraction unconverted naphthalene\n", +"//===========================================================================================================\n", +"clear\n", +"clc\n", +"//INPUT\n", +"D=2.13 ;//Reactor Diameter(m)\n", +"L=7.9;//Reactor length (m)\n", +"dp_bar= 53*10^(-6);//Particle size (m)\n", +"u_mf=0.077;//Minimum fluidzation velocity(cm/s)\n", +"u_mb=0.5;//Minimum bubbling velocity(cm/s)\n", +"rho_bulk=770;//Bulk density (kg/m3)\n", +"rho_b=350;//Density (kg/m3)\n", +"Epsilon_m=0.44;//Porosity of bed\n", +"T_K=636;//Reaction Temperature (K)\n", +"P=266;//Reaction Pressure (kPa)\n", +"k_1=1.8;//Reaction rate constant (sec-1)\n", +"k_2=k_1;\n", +"u0=0.43;//Velocity (m/sec)\n", +"C0=2*10^(-2);//Initial concentration (%)\n", +"\n", +"//CALCULATION\n", +"k=k_1+k_2;\n", +"one_minus_epsilon=(1-Epsilon_m)*(rho_b/rho_bulk);\n", +"k_corrected=k*one_minus_epsilon;//based on bed volume\n", +"Nr=k_corrected*L/u0;\n", +"K=0.8;//From figure 9.12 at u0=0.43m/sec Pg No.376\n", +"Nm=K*L/u0;//Refer equation 9.21 Pg No.371\n", +"N=1/((1/Nm)+(1/Nr));//Refer equation 9.22 Pg No.371\n", +"X=(1-exp(-N));//Refer equation 9.23 Pg No.371\n", +"C_out=(1-X)*C0;\n", +"C_out_ppm=C_out*(10^6);\n", +"\n", +"//OUTPUT\n", +"mprintf('\nThe fraction of naphthalene unconverted is %0.0f ppm ',C_out_ppm);\n", +"\n", +"//FILE OUTPUT\n", +"fid= mopen('.\Chapter9-Ex2-Output.txt','w');\n", +"mfprintf(fid,'\nThe fraction of naphthalene unconverted is %0.0f ppm ',C_out_ppm);\n", +"mclose(fid);\n", +"\n", +"\n", +"//===========================================END OF PROGRAM=================================================\n", +"\n", +"\n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |