diff options
author | Prashant S | 2020-04-14 10:25:32 +0530 |
---|---|---|
committer | GitHub | 2020-04-14 10:25:32 +0530 |
commit | 06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch) | |
tree | 2b1df110e24ff0174830d7f825f43ff1c134d1af /Mass_Transfer_Operations_by_R_E_Treybal/8-Gas_Absorption.ipynb | |
parent | abb52650288b08a680335531742a7126ad0fb846 (diff) | |
parent | 476705d693c7122d34f9b049fa79b935405c9b49 (diff) | |
download | all-scilab-tbc-books-ipynb-master.tar.gz all-scilab-tbc-books-ipynb-master.tar.bz2 all-scilab-tbc-books-ipynb-master.zip |
Initial commit
Diffstat (limited to 'Mass_Transfer_Operations_by_R_E_Treybal/8-Gas_Absorption.ipynb')
-rw-r--r-- | Mass_Transfer_Operations_by_R_E_Treybal/8-Gas_Absorption.ipynb | 1016 |
1 files changed, 1016 insertions, 0 deletions
diff --git a/Mass_Transfer_Operations_by_R_E_Treybal/8-Gas_Absorption.ipynb b/Mass_Transfer_Operations_by_R_E_Treybal/8-Gas_Absorption.ipynb new file mode 100644 index 0000000..b799a92 --- /dev/null +++ b/Mass_Transfer_Operations_by_R_E_Treybal/8-Gas_Absorption.ipynb @@ -0,0 +1,1016 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Gas Absorption" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1: Ideal_Liquid_Solutio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 8.1\n", +"// Page: 278\n", +"\n", +"printf('Illustration 8.1 - Page: 278\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"P_star = 2*10^(5);// [N/square m]\n", +"X_methane = 0.6;\n", +"X_ethane = 0.2;\n", +"X_propane = 0.08;\n", +"X_nbutane = 0.06;\n", +"X_npentane = 0.06;\n", +"//******//\n", +"\n", +"MoleFraction = [0.6 0.2 0.08 0.06 0.06]\n", +"Heading = ['Component' 'Equilibrium Partial Pressure' 'Vapour Pressue ' 'Mole Fraction'];\n", +"Component = ['Methane' 'Ethane ' 'Propane' 'n-Butane' 'n-Pentane'];\n", +"VapPressure = [0 42.05 8.96 2.36 0.66];// [N/square m]\n", +"Sum = 0;\n", +"for i = 1:4\n", +" printf('%s \t',Heading(i));\n", +"end\n", +"printf('\n');\n", +"for i = 1:5\n", +" printf('%s \t ',Component(i));\n", +" printf('%e \t \t \t',(MoleFraction(i)*P_star));\n", +" printf('%e \t \t',(VapPressure(i)*10^(5)));\n", +" if (VapPressure(i) = = 0)\n", +" printf('\t \n');\n", +" Sum = Sum+0;\n", +" else\n", +" printf('%f \n',(MoleFraction(i)*P_star)/(VapPressure(i)*10^(5)));\n", +" Sum = Sum+(MoleFraction(i)*P_star)/(VapPressure(i)*10^(5));\n", +"\n", +"end\n", +"end\n", +"printf('Mole Fraction Of solvent Oil is %f',1-Sum);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2: Minimum_Liquid_Gas_Ratio_for_absorbers.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 8.2\n", +"// Page: 286\n", +"\n", +"printf('Illustration 8.2 - Page: 286\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// Absorber:\n", +"G = 0.250;// [cubic m/s]\n", +"Temp1 = 273+26;// [K]\n", +"Pt = 1.07*10^(5);// [N/square m]\n", +"y1 = 0.02;\n", +"x2 = 0.005;\n", +"//******//\n", +"\n", +"G1 = G*(273/Temp1)*(Pt/(1.0133*10^(5)))*(1/22.41);// [kmol/s]\n", +"Y1 = y1/(1-y1);// [kmol benzene/kmol dry gas]\n", +"Gs = G1*(1-y1);// [kmol dry gas/s]\n", +"// For 95% removal of benzene:\n", +"Y2 = Y1*0.05;\n", +"X2 = x2/(1-x2);// [kmol benzene/kmol oil]\n", +"// Vapour pressure of benzene:\n", +"\n", +"P_star = 13330;// [N/square m]\n", +"X_star = zeros(20);\n", +"Y_star = zeros(20);\n", +"j = 0;\n", +"for i = 0.01:0.01:0.20\n", +" j = j+1;\n", +" x = i;\n", +" X_star(j) = i;\n", +" deff('[Y] = f27(y)','Y = (y/(1+y))-(P_star/Pt)*(x/(1+x))');\n", +" Y_star(j) = fsolve(0,f27);\n", +"end\n", +"// For min flow rate:\n", +"X1 = 0.176;// [kmolbenzene/kmol oil]\n", +"DataMinFlow = [X2 Y2;X1 Y1];\n", +"scf(6);\n", +"plot(X_star,Y_star,DataMinFlow(:,1),DataMinFlow(:,2));\n", +"minLs = (Gs*(Y1-Y2)/(X1-X2));// [kmol/s]\n", +"// For 1.5 times the minimum:\n", +"Ls = 1.5*minLs;// [kmol/s]\n", +"X1_prime = (Gs*(Y1-Y2)/Ls)+X2;// [kmol benzene/kmol oil]\n", +"DataOperLine = [X2 Y2;X1_prime Y1];\n", +"plot(X_star,Y_star,DataMinFlow(:,1),DataMinFlow(:,2),DataOperLine(:,1),DataOperLine(:,2));\n", +"xgrid();\n", +"xlabel('moles of benzene / mole wash oil');\n", +"ylabel('moles benzene / mole dry gas');\n", +"legend('Equlibrium Line','Min Flow Rate Line','Operating Line');\n", +"title('Absorption')\n", +"printf('The Oil circulation rate is %e kmol/s\n',Ls);\n", +"\n", +"// Stripping\n", +"Temp2 = 122+273;// [K]\n", +"// Vapour pressure at 122 OC\n", +"P_star = 319.9;// [kN/square m]\n", +"Pt = 101.33;// [kN/square m]\n", +"X_star = zeros(7);\n", +"Y_star = zeros(7);\n", +"j = 0;\n", +"for i = 0:0.1:0.6\n", +" j = j+1;\n", +" x = i;\n", +" X_star(j) = i;\n", +" deff('[Y] = f28(y)','Y = (y/(1+y))-(P_star/Pt)*(x/(1+x))');\n", +" Y_star(j) = fsolve(0,f28);\n", +"end\n", +"X1 = X2;// [kmol benzene/kmol oil]\n", +"X2 = X1_prime;// [kmol benzene/kmol oil]\n", +"Y1 = 0;// [kmol benzene/kmol steam]\n", +"// For min. steam rate:\n", +"Y2 = 0.45;\n", +"DataMinFlow = [X2 Y2;X1 Y1];\n", +"minGs = Ls*(X2-X1)/(Y2-Y1);// [kmol steam/s]\n", +"slopeOperat = 1.5*(Y2-Y1)/(X2-X1);\n", +"deff('[y] = f29(x)','y = slopeOperat*(x-X1)+Y1');\n", +"x = 0:0.01:0.14;\n", +"scf(7);\n", +"plot(Y_star,X_star,DataMinFlow(:,1),DataMinFlow(:,2),x,f29);\n", +"xgrid();\n", +"xlabel('moles of benzene / mole wash oil');\n", +"ylabel('moles benzene / mole dry gas');\n", +"legend('Equlibrium Line','Min Flow Rate Line','Operating Line');\n", +"title('Stripping');\n", +"printf('The Steam circulation rate is %e kmol/s\n',1.5*minGs);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3: Countercurrent_Multistage_Operation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 8.3\n", +"// Page: 292\n", +"\n", +"printf('Illustration 8.3 - Page: 292\n\n');\n", +"\n", +"// solution\n", +"\n", +"// Since tower is a tray device:\n", +"// Following changes in notation is made:\n", +"// L1 to LNp\n", +"// L2 to L0\n", +"// X1 to XNp\n", +"// X2 to X0\n", +"// G1 to GNpPlus1\n", +"// G2 to G1\n", +"// Y1 to YNpPlus1\n", +"// Y2 to Y1\n", +"// x1 to xNp\n", +"// x2 to x0\n", +"// y1 to yNpPlus1\n", +"// y2 to y1\n", +"// From Illustration 8.2:\n", +"yNpPlus1 = 0.02;\n", +"Y1 = 0.00102;\n", +"y1 = Y1/(1+Y1);\n", +"GNpPlus1 = 0.01075;// [kmol/s]\n", +"x0 = 0.005;\n", +"m = 0.125;// [m = y_star/x]\n", +"Ls = 1.787*10^(-3);// [kmol/s]\n", +"Gs = 0.01051;// [kmol/s]\n", +"XNp = 0.1190;\n", +"LNp = Ls*(1+XNp);// [kmol/s]\n", +"ANp = LNp/(m*GNpPlus1);\n", +"X0 = x0/(1-x0);\n", +"L0 = Ls*(1+X0);// [kmol/s]\n", +"G1 = Gs*(1+Y1);// [kmol/s]\n", +"A1 = L0/(m*G1);\n", +"A = (ANp*A1)^0.5;\n", +"// From Eqn. 5.55:\n", +"Np = (log((yNpPlus1-(m*x0))/(y1-(m*x0))*(1-(1/A))+(1/A)))/log(A);\n", +"printf('Absorber\n');\n", +"printf('From Analytical Method, no. of theoretical trays required is %f \n',Np);\n", +"// From Fig. 8.13 (Pg292):\n", +"Np = 7.6;\n", +"printf('From Graphical Method, no. of theoretical trays required is %f \n',Np);\n", +"\n", +"// Stripper\n", +"SNp = 1/ANp;\n", +"S1 = 1/A1;\n", +"// Due to relative nonconstancy of the stripping factor,graphical method should be used.\n", +"printf('Stripper\n');\n", +"// From Fig. 8.11 (Pg 289):\n", +"Np = 6.7;\n", +"printf('From Graphical Method, no. of theoretical trays required is %f \n',Np);\n", +"// From Fig. 5.16 (Pg 129):\n", +"Np = 6.0;\n", +"printf('From Fig. 5.16, no. of theoretical trays required is %f \n',Np);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4: Nonisothermal_Operation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 8.4\n", +"// Page: 295\n", +"\n", +"printf('Illustration 8.4 - Page: 295\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// a = CH4 b = C5H12\n", +"Tempg = 27;// [OC]\n", +"Tempo = 0;// [base temp,OC]\n", +"Templ = 35;// [OC]\n", +"xa = 0.75;// [mole fraction of CH4 in gas]\n", +"xb = 0.25;// [mole fraction of C5H12 in gas]\n", +"M_Paraffin = 200;// [kg/kmol]\n", +"hb = 1.884;// [kJ/kg K]\n", +"//********//\n", +"\n", +"Ha = 35.59;// [kJ/kmol K]\n", +"Hbv = 119.75;// [kJ/kmol K]\n", +"Hbl = 117.53;// [kJ/kmol K]\n", +"Lb = 27820;// [kJ/kmol]\n", +"// M = [Temp (OC) m]\n", +"M = [20 0.575;25 0.69;30 0.81;35 0.95;40 1.10;43 1.25];\n", +"// Basis: Unit time\n", +"GNpPlus1 = 1;// [kmol]\n", +"yNpPlus1 = 0.25;// [kmol]\n", +"HgNpPlus1 = ((1-yNpPlus1)*Ha*(Tempg-Tempo))+(yNpPlus1*(Hbv*(Tempg-Tempo)+Lb));// [kJ/kmol]\n", +"L0 = 2;// [kmol]\n", +"x0 = 0;// [kmol]\n", +"HL0 = ((1-x0)*hb*M_Paraffin*(Templ-Tempo))+(x0*hb*(Templ-Tempo));// [kJ/kmol]\n", +"C5H12_absorbed = 0.98*xb;// [kmol]\n", +"C5H12_remained = xb-C5H12_absorbed;\n", +"G1 = xa+C5H12_remained;// [kmol]\n", +"y1 = C5H12_remained/G1;// [kmol]\n", +"LNp = L0+C5H12_absorbed;// [kmol]\n", +"xNp = C5H12_absorbed/LNp;// [kmol]\n", +"// Assume:\n", +"Temp1 = 35.6;// [OC]\n", +"Hg1 = ((1-y1)*Ha*(Temp1-Tempo))+(y1*(Hbv*(Temp1-Tempo)+Lb));// [kJ/kmol]\n", +"\n", +"// Eqn. 8.11:\n", +"Qt = 0;\n", +"deff('[y] = f30(HlNp)','y = ((L0*HL0)+(GNpPlus1*HgNpPlus1))-((LNp*HlNp)+(G1*Hg1)+Qt)');\n", +"HlNp = fsolve(2,f30);\n", +"\n", +"deff('[y] = f31(TempNp)','y = HlNp-(((1-x0)*hb*M_Paraffin*(TempNp-Tempo))+(x0*hb*(TempNp-Tempo)))');\n", +"TempNp = fsolve(35.6,f31);\n", +"// At Temp = TempNp:\n", +"mNp = 1.21;\n", +"yNp = mNp*xNp;// [kmol]\n", +"GNp = G1/(1-yNp);// [kmol]\n", +"HgNp = ((1-yNp)*Ha*(TempNp-Tempo))+(yNp*(Hbv*(TempNp-Tempo)+Lb));// [kJ/kmol]\n", +"// Eqn. 8.13 with n = Np-1\n", +"deff('[y] = f32(LNpMinus1)','y = LNpMinus1+GNpPlus1-(LNp+GNp)');\n", +"LNpMinus1 = fsolve(2,f32);// [kmol]\n", +"\n", +"// Eqn. 8.14 with n = Np-1\n", +"deff('[y] = f33(xNpMinus1)','y = ((LNpMinus1*xNpMinus1)+(GNpPlus1*yNpPlus1))-((LNp*xNp)+(GNp*yNp))');\n", +"xNpMinus1 = fsolve(0,f33);// [kmol]\n", +"\n", +"// Eqn. 8.15 with n = Np-1\n", +"deff('[y] = f34(HlNpMinus1)','y = ((LNpMinus1*HlNpMinus1)+(GNpPlus1*HgNpPlus1))-((LNp*HlNp)+(GNp*HgNp))');\n", +"HlNpMinus1 = fsolve(0,f34);// [kJ/kmol]\n", +"deff('[y] = f35(TempNpMinus1)','y = HlNpMinus1-(((1-xNpMinus1)*hb*M_Paraffin*(TempNpMinus1-Tempo))+(xNpMinus1*hb*(TempNpMinus1-Tempo)))');\n", +"TempNpMinus1 = fsolve(42,f35);// [OC]\n", +"\n", +"// Thecomputation are continued upward through the tower in this manner until the gas composition falls atleast to 0.00662.\n", +"// Results = [Tray No.(n) Tn(OC) xn yn]\n", +"Results = [4.0 42.3 0.1091 0.1320;3 39.0 0.0521 0.0568;2 36.8 0.0184 0.01875;1 35.5 0.00463 0.00450];\n", +"scf(8);\n", +"plot(Results(:,1),Results(:,4));\n", +"xgrid();\n", +"xlabel('Tray Number');\n", +"ylabel('mole fraction of C5H12 in gas');\n", +"\n", +"scf(9);\n", +"plot(Results(:,1),Results(:,2));\n", +"xgrid();\n", +"xlabel('Tray Number');\n", +"ylabel('Temparature(OC)');\n", +"\n", +"// For the cquired y1\n", +"Np = 3.75;\n", +"printf('The No. of trays will be %f',Np);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5: Real_Trays_and_Tray_Efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 8.5\n", +"// Page: 299\n", +"\n", +"printf('Illustration 8.5 - Page: 299\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// a = NH3 b = H2 c = N2 w = water\n", +"P = 2;// [bars]\n", +"Temp = 30;// [OC]\n", +"L = 6.38;// [kg/s]\n", +"W = 0.53;// [weir length,m]\n", +"pitch = 12.5/1000;// [m]\n", +"D = 0.75;// [Tower diameter,m]\n", +"hW = 0.060;// [weir height,m]\n", +"t = 0.5;// [tray spacing,m]\n", +"//*******//\n", +"\n", +"// From Geometry of Tray Arrangement:\n", +"At = 0.4418;// [Tower Cross section,square m]\n", +"Ad = 0.0403;// [Downspout Cross section,square m]\n", +"An = At-Ad;// [square m]\n", +"Ao = 0.0393;// [perforation area,square m]\n", +"Z = 0.5307;// [distance between downspouts,square m]\n", +"z = (D+W)/2;// [average flow width,m]\n", +"h1 = 0.04;// [weir crest,m]\n", +"// From Eqn. 6.34\n", +"Weff = W*(sqrt(((D/W)^2)-((((D/W)^2-1)^0.5)+((2*h1/D)*(D/W)))^2));// [m]\n", +"q = Weff*(1.839*h1^(3/2));//[cubic m/s]\n", +"// This is a recommended rate because it produces the liquid depth on the tray to 10 cm.\n", +"Density_L = 996;// [kg/s]\n", +"Mw = 18.02;// [kg/kmol]\n", +"L1 = 6.38/Mw;// [kmol/s]\n", +"Ma = 17.03;// [kg/kmol]\n", +"Mb = 28.02;// [kg/kmol]\n", +"Mc = 2.02;// [kg/kmol]\n", +"MavG = (0.03*Ma)+(0.97*(1/4)*Mb)+(0.97*(3/4)*Mc);// [kg/kmol]\n", +"Density_G = (MavG/22.41)*(P/0.986)*(273/(273+Temp));// [kg/cubic m]\n", +"G = 0.893;// [kg/s]\n", +"sigma = 68*10^(-3);// [N/m]\n", +"abcissa = (L/G)*(Density_G/Density_L)^0.5;\n", +"// From Table 6.2 (Pg169):\n", +"alpha = 0.04893;\n", +"beeta = 0.0302;\n", +"// From Eqn. 6.30\n", +"Cf = ((alpha*log10(1/abcissa))+beeta)*(sigma/0.02)^0.2;\n", +"// From Eqn. 6.29\n", +"Vf = Cf*((Density_L-Density_G)/Density_G)^(1/2);// [m/s]\n", +"// 80% of flooding value:\n", +"V = 0.8*Vf;// [m/s]\n", +"G = 0.8*G;// [kg/s]\n", +"G1 = G/MavG;// [kmol/s]\n", +"Vo = V*An/Ao;// [m/s]\n", +"l = 0.002;// [m]\n", +"Do = 0.00475;// [m]\n", +"// From Eqn. 6.37\n", +"Co = 1.09*(Do/l)^0.25;\n", +"viscosity_G = 1.13*10^(-5);// [kg/m.s]\n", +"Reo = Do*Vo*Density_G/viscosity_G;\n", +"// At Reynold's No. = Reo\n", +"fr = 0.0082;\n", +"g = 9.81;// [m/s^2]\n", +"// From Eqn. 6.36\n", +"deff('[y] = f36(hD)','y = (2*hD*g*Density_L/(Vo^2*Density_G))-(Co*(0.40*(1.25-(Ao/An))+(4*l*fr/Do)+(1-(Ao/An))^2))');\n", +"hD = fsolve(1,f36);\n", +"// From Eqn. 6.31;\n", +"Aa = (Ao/0.907)*(pitch/Do)^2;// [square m]\n", +"Va = V*An/Aa;// [m/s]\n", +"// From Eqn. 6.38\n", +"hL = 6.10*10^(-3)+(0.725*hW)-(0.238*hW*Va*(Density_G)^0.5)+(1.225*q/z);// [m]\n", +"// From Eqn. 6.42\n", +"hR = 6*sigma/(Density_L*Do*g);// m\n", +"// From Eqn. 6.35\n", +"hG = hD+hL+hR;// [m]\n", +"Al = 0.025*W;// [square m]\n", +"Ada = min(Al,Ad);\n", +"// From Eqn. 6.43\n", +"h2 = (3/(2*g))*(q/Ada)^2;// [m]\n", +"// From Eqn.6.44\n", +"h3 = hG+h2;\n", +"// since hW+h1+h3 is essentially equal to t/2, flooding will not occur\n", +"abcissa = (L/G)*(Density_G/Density_L)^0.5;\n", +"V_by_Vf = V/Vf;\n", +"// From Fig.6.17, V/Vf = 0.8 & abcissa = 0.239\n", +"E = 0.009;\n", +"\n", +"// At the prevailing conditions:\n", +"Dg = 2.296*10^(-5);// [square m/s]\n", +"viscosity_G = 1.122*10^(-5);// [kg/m.s]\n", +"ScG = viscosity_G/(Density_G*Dg)\n", +"Dl = 2.421*10^(-9);// [square m/s]\n", +"\n", +"// From Henry's Law:\n", +"m = 0.850;\n", +"A = L1/(m*G1);\n", +"\n", +"// From Eqn. 6.61:\n", +"NtG = (0.776+(4.57*hW)-(0.238*Va*Density_G^0.5)+(104.6*q/Z))/(ScG^0.5);\n", +"// From Eqn. 6.64:\n", +"thetha_L = hL*z*Z/q;// [s]\n", +"// From Eqn. 6.62:\n", +"NtL = 40000*(Dl^0.5)*((0.213*Va*Density_G^0.5)+0.15)*thetha_L;\n", +"// From Eqn. 6.52:\n", +"NtoG = 1/((1/NtG)+(1/(A*NtL)));\n", +"// From Eqn. 6.51:\n", +"EoG = 1-exp(-NtoG);\n", +"// From Eqn. 6.63:\n", +"DE = ((3.93*10^(-3))+(0.0171*Va)+(3.67*q/Z)+(0.1800*hW))^2;// [square m/s]\n", +"// From Eqn. 6.59:\n", +"Pe = Z^2/(DE*thetha_L);\n", +"// From Eqn. 6.58:\n", +"eta = (Pe/2)*((1+(4*m*G1*EoG/(L1*Pe)))^0.5-1);\n", +"// From Eqn. 6.57:\n", +"EMG = EoG*(((1-exp(-(eta+Pe)))/((eta+Pe)*(1+(eta+Pe)/eta)))+((exp(eta)-1)/(eta*(1+(eta/(eta+Pe))))));\n", +"// From Eqn. 6.60:\n", +"EMGE = EMG/((1+(EMG*(E/(1-E)))));\n", +"// From Eqn. 8.16:\n", +"EO = log(1+EMGE*((1/A)-1))/log(1/A);\n", +"Np = 14*EO;\n", +"yNpPlus1 = 0.03;\n", +"x0 = 0;\n", +"// From Eqn. 5.54(a):\n", +"deff('[y] = f37(y1)','y = ((yNpPlus1-y1)/(yNpPlus1-m*x0))-(((A^(Np+1))-A)/((A^(Np+1))-1))');\n", +"y1 = fsolve(0.03,f37);\n", +"printf('Mole Fraction Of NH3 in effluent is %e',y1);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6: Continuous_Contact_Equipment.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 8.6\n", +"// Page: 304\n", +"\n", +"printf('Illustration 8.6 - Page: 304\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****// \n", +"// Gas:\n", +"// In:\n", +"y_prime1 = 0.02;\n", +"Y_prime1 = 0.0204;// [mol/mol dry gas]\n", +"// Out:\n", +"y_prime2 = 0.00102;\n", +"Y_prime2 = 0.00102;// [mol/mol dry gas]\n", +"// Non absorbed gas:\n", +"MavG = 11;// [kg/kmol]\n", +"G = 0.01051;// [kmol/s nonbenzene]\n", +"Gm = 0.01075;// [kmol/s]\n", +"T = 26;// [OC]\n", +"viscosity_G = 10^(-5);// [kg/m.s]\n", +"DaG = 1.30*10^(-5);// [square m/s]\n", +"\n", +"// Liquid:\n", +"// In:\n", +"x_prime2 = 0.005;\n", +"X_prime2 = 0.00503;// [mol benzene/mol oil]\n", +"// Out:\n", +"x_prime1 = 0.1063;\n", +"X_prime1 = 0.1190;// [mol benzene/mol oil]\n", +"// Benzene free oil:\n", +"MavL = 260;// [kg/kmol]\n", +"viscosity_L = 2*10^(-3);// [kg/kmol]\n", +"Density_L = 840;// [kg/cubic cm]\n", +"L = 1.787*10^(-3);// [kmol/s]\n", +"DaL = 4.77*10^(-10);// [square m/s]\n", +"sigma = 0.03;// [N/square m]\n", +"m = 0.1250;\n", +"//*******//\n", +"\n", +"A = 0.47^2*%pi/4;// [square m]\n", +"// At the bottom:\n", +"L_prime1 = ((L*MavL)+(X_prime1*L*78))/A;// [kg/square m.s]\n", +"// At the top\n", +"L_prime2 = ((L*MavL)+(X_prime2*L*78))/A;// [kg/square m.s]\n", +"L_primeav = (L_prime1+L_prime2)/2;// [kg/square m.s]\n", +"// At the bottom\n", +"G_prime1 = ((G*MavG)+(Y_prime1*G*78))/A;// [kg/square m.s]\n", +"// At the top\n", +"G_prime2 = ((G*MavG)+(Y_prime2*G*78))/A;// [kg/square m.s]\n", +"G_primeav = (G_prime1+G_prime2)/2;// [kg/square m.s]\n", +"\n", +"// From Illustration 6.6:\n", +"Fga = 0.0719;// [kmol/cubic cm.s]\n", +"Fla = 0.01377;// [kmol/cubic cm.s]\n", +"// Operating Line:\n", +"X_prime = [0.00503 0.02 0.04 0.06 0.08 0.10 0.1190];\n", +"x_prime = zeros(7);\n", +"Y_prime = zeros(7);\n", +"y_prime = zeros(7);\n", +"for i = 1:7\n", +" x_prime(i) = X_prime(i)/(1+X_prime(i));\n", +" deff('[y] = f38(Y_prime)','y = (G*(Y_prime1-Y_prime))-(L*(X_prime1-X_prime(i)))');\n", +" Y_prime(i) = fsolve(Y_prime1,f38);\n", +" y_prime(i) = Y_prime(i)/(1+Y_prime(i));\n", +"end\n", +"deff('[y] = f39(x)','y = m*x')\n", +"x = [0:0.01:0.14];\n", +"\n", +"// Interface compositions are determined graphically and according to Eqn. 8.21:\n", +"yi = [0.000784 0.00285 0.00562 0.00830 0.01090 0.01337 0.01580];\n", +"ylog = zeros(7);\n", +"y_by_yDiffyi = zeros(7);\n", +"for i = 1:7\n", +" ylog(i) = log10(yi(i));\n", +" y_by_yDiffyi(i) = y_prime(i)/(y_prime(i)-yi(i));\n", +"end\n", +"scf(10);\n", +"plot(x_prime,y_prime,x,f39,x_prime,yi);\n", +"legend('Operating Line','Equilibrium Line','Interface Composition');\n", +"xgrid();\n", +"xlabel('mole fraction of benzene in liquid');\n", +"ylabel('mole fraction of benzene in gas');\n", +"scf(11);\n", +"plot(ylog,y_by_yDiffyi);\n", +"xgrid();\n", +"xlabel('log y');\n", +"ylabel('y/(y-yi)');\n", +"title('Graphical Integration Curve');\n", +"// Area under the curve:\n", +"Ac = 6.556;\n", +"// Eqn. 8.28:\n", +"NtG = (2.303*Ac)+1.152*(log10((1-y_prime2)/(1-y_prime1)));\n", +"Gav = (Gm+(G/(1-Y_prime2)))/(2*A);// [kmol/square m.s]\n", +"HtG = Gav/Fga;// [m]\n", +"Z = HtG*NtG;// [m]\n", +"printf('The depth of packing recquired is %f m',Z);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7: Overall_height_of_Transfer_Units.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 8.7\n", +"// Page: 312\n", +"\n", +"printf('Illustration 8.7 - Page: 312\n\n');\n", +"\n", +"// solution\n", +"\n", +"// Fom Illustration 8.6:\n", +"y1 = 0.02;\n", +"y2 = 0.00102;\n", +"m = 0.125;\n", +"x2 = 0.005;\n", +"x1 = 0.1063;\n", +"\n", +"// Number of transfer units:\n", +"// Method a:\n", +"y1_star = m*x1;\n", +"y2_star = m*x2;\n", +"yDiffy_star1 = y1-y1_star;\n", +"yDiffy_star2 = y2-y2_star;\n", +"yDiffy_starm = (yDiffy_star1-yDiffy_star2)/log(yDiffy_star1/yDiffy_star2);\n", +"// From Eqn. 8.48:\n", +"NtoG = (y1-y2)/yDiffy_starm;\n", +"printf('NtoG according to Eqn. 8.48: %f\n',NtoG);\n", +"\n", +"// Mehod b:\n", +"// From Illustration 8.3:\n", +"A = 1.424;\n", +"NtoG = (log((((y1-(m*x2))/(y2-(m*x2)))*(1-(1/A)))+(1/A)))/(1-(1/A));\n", +"printf('NtoG according to Eqn. 8.50: %f\n',NtoG);\n", +"\n", +"// Method c:\n", +"// Operating Line:\n", +"// From Illustration 8.3:\n", +"X_prime = [0.00503 0.02 0.04 0.06 0.08 0.10 0.1190];\n", +"x_prime = [0.00502 0.01961 0.0385 0.0566 0.0741 0.0909 0.1063]\n", +"Y_prime = [0.00102 0.00357 0.00697 0.01036 0.01376 0.01714 0.0204];\n", +"y_prime = [0.00102 0.00356 0.00692 0.01025 0.01356 0.01685 0.0200];\n", +"deff('[y] = f2(x)','y = m*x')\n", +"x = [0:0.01:0.14];\n", +"scf(12);\n", +"plot(x_prime,y_prime,x,f2);\n", +"legend('Operating Line','Equilibrium Line',);\n", +"xgrid();\n", +"xlabel('mole fraction of benzene in liquid');\n", +"ylabel('mole fraction of benzene in gas');\n", +"// From graph:\n", +"NtoG = 8.7;\n", +"printf('NtoG from graph: %f\n',NtoG);\n", +"\n", +"// Method d:\n", +"// from Fig 8.10:\n", +"Y_star = [0.000625 0.00245 0.00483 0.00712 0.00935 0.01149 0.01347];\n", +"ordinate = zeros(7);\n", +"for i = 1:7\n", +" ordinate(i) = 1/(Y_prime(i)-Y_star(i));\n", +"end\n", +"scf(13);\n", +"plot(Y_prime,ordinate);\n", +"xgrid();\n", +"xlabel('Y');\n", +"ylabel('1/(Y-Y*)');\n", +"title('Graphical Integration');\n", +"// Area under the curve:\n", +"Ac = 8.63;\n", +"// From Eqn. 8.36:\n", +"NtoG = Ac+(1/2)*log((1+y2)/(1+y1));\n", +"printf('NtoG from graphical integration: %f\n',NtoG);\n", +"\n", +"// Height of transfer units:\n", +"NtoG = 9.16;\n", +"// From Illustration 6.6:\n", +"Fga = 0.0719;// [kmol/cubic m.s]\n", +"Fla = 0.01377;// [kmol/cubic m.s]\n", +"Gav = 0.0609;// [kmol/square m.s]\n", +"L = 1.787*10^(-3);// [kmol/s]\n", +"X1 = x1/(1-x1);\n", +"X2 = x2/(1-x2);\n", +"Area = 0.1746;// [square m]\n", +"Lav = L*((1+X1)+(1+X2))/(2*Area);\n", +"// From Eqn. 8.24:\n", +"Htg = Gav/Fga;// [m]\n", +"// From Eqn. 8.31:\n", +"Htl = Lav/Fla;// [m]\n", +"// since Solutions are dilute:\n", +"HtoG = Htg+Htl/A;// [m]\n", +"printf('HtoG: %f m\n',HtoG);\n", +"Z = HtoG*NtoG;// [m]\n", +"printf('The depth of packing recquired is %f m',Z);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8: Adiabatic_Absorption_and_Stripping.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 8.8\n", +"// Page: 317\n", +"\n", +"printf('Illustration 8.8 - Page: 317\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//***Data***\n", +"// a:NH3 b:air c:H2O\n", +"ya = 0.416;// [mole fraction]\n", +"yb = 0.584;// [mole fraction]\n", +"G1 = 0.0339;// [kmol/square m.s]\n", +"L1 = 0.271;// [kmol/square m.s]\n", +"TempG1 = 20;// [OC]\n", +"//********//\n", +"\n", +"// At 20 OC\n", +"Ca = 36390;// [J/kmol]\n", +"Cb = 29100;// [J/kmol]\n", +"Cc = 33960;// [J/kmol]\n", +"lambda_c = 44.24*10^6;// [J/kmol]\n", +"// Enthalpy base = NH3 gas, H2O liquid, air at 1 std atm.\n", +"Tempo = 20;// [OC]\n", +"lambda_Ao = 0;// [J/kmol]\n", +"lambda_Co = 44.24*10^6;// [J/kmol]\n", +"\n", +"// Gas in:\n", +"Gb = G1*yb;// [kmol air/square m.s]\n", +"Ya1 = ya/(1-ya);// [kmol NH3/kmol air]\n", +"yc1 = 0;// [mole fraction]\n", +"Yc1 = yc1/(1-yc1);// [kmol air/kmol NH]\n", +"// By Eqn 8.58:\n", +"Hg1 = (Cb*(TempG1-Tempo))+(Ya1*(Ca*(TempG1-Tempo))+lambda_Ao)+(Yc1*(Cc*(TempG1-Tempo)+lambda_Co));// [J/kmol air]\n", +"\n", +"// Liquid in:\n", +"xa1 = 0;// [mole fraction]\n", +"xc1 = 1;// [mole fraction]\n", +"Hl1 = 0;// [J/kmol air]\n", +"\n", +"//Gas out:\n", +"Ya2 = Ya1*(1-0.99);// [kmol NH3/kmol air]\n", +"// Assume:\n", +"TempG2 = 23.9;// [OC]\n", +"yc2 = 0.0293;\n", +"deff('[y] = f(Yc2)','y = yc2-(Yc2/(Yc2+Ya2+1))');\n", +"Yc2 = fsolve(0.002,f);// [kmol H2O/kmol air]\n", +"Hg2 = (Cb*(TempG2-Tempo))+(Ya2*(Ca*(TempG2-Tempo))+lambda_Ao)+(Yc2*(Cc*(TempG2-Tempo)+lambda_Co));// [J/kmol air]\n", +"\n", +"// Liquid out:\n", +"Lc = L1-(Yc1*Gb);// [kmol/square m.s]\n", +"La = Gb*(Ya1-Ya2);// [kmol/square m.s]\n", +"L2 = La+Lc;// [kmol/square m.s]\n", +"xa = La/L2;\n", +"xc = Lc/L2;\n", +"// At xa & tempo = 20 OC\n", +"delta_Hs = -1709.6*1000;// [J/kmol soln]\n", +"\n", +"// Condition at the bottom of the tower:\n", +"// Assume:\n", +"TempL = 41.3;// {OC}\n", +"// At(TempL+TempG1)/2:\n", +"Cl = 75481;// [J/kmol]\n", +"deff('[y] = f40(Cl)','y = Hl1+Hg1-((Gb*Hg2)+(L2*(Cl*(TempL-Tempo)+delta_Hs)))');\n", +"Cl = fsolve(7,f40);// [J/kmol.K]\n", +"\n", +"// For the Gas:\n", +"MavG = 24.02;// [kg/kmol]\n", +"Density_G = 0.999;// [kg/cubic m]\n", +"viscosity_G = 1.517*10^(-5);// [kg/m.s]\n", +"kG = 0.0261;// [W/m.K]\n", +"CpG = 1336;// [J/kg.K]\n", +"Dab = 2.297*10^(-5);// [square m/s]\n", +"Dac = 3.084*10^(-5);// [square m/s]\n", +"Dcb = 2.488*10^(-5);// [square m/s]\n", +"PrG = CpG*viscosity_G/kG;\n", +"\n", +"// For the liquid:\n", +"MavL = 17.97;// [kg/kmol]\n", +"Density_L = 953.1;// [kg/cubic m]\n", +"viscosity_L = 6.408*10^(-4);// [kg/m.s]\n", +"Dal = 3.317*10^(-9);// [square m/s]\n", +"kl = 0.4777;// [W/m.K]\n", +"ScL = viscosity_L/(Density_L*Dal);\n", +"PrL = 5.72;\n", +"sigma = 3*10^(-4);\n", +"G_prime = G1*MavG;// [kg/square m.s]\n", +"L_prime = L2*MavL;// [kg/square m.s]\n", +"// From data of Chapter 6:\n", +"Ds = 0.0472;// [m]\n", +"a = 57.57;// [square m/cubic m]\n", +"shiLt = 0.054;\n", +"e = 0.75;\n", +"// By Eqn. 6.71:\n", +"eLo = e-shiLt;\n", +"// By Eqn. 6.72:\n", +"kL = (25.1*Dal/Ds)*(Ds*L_prime/viscosity_L)^0.45*ScL^0.5;// [m/s]\n", +"c = Density_L/MavL;// [kmol/cubic m]\n", +"Fl = kL*c;// [kmol/cubic m]\n", +"// The heat mass transfer analogy of Eqn. 6.72:\n", +"hL = (25.1*kl/Ds)*(Ds*L_prime/viscosity_L)^0.45*PrL^0.5;// [m/s]\n", +"// The heat transfer analogy of Eqn. 6.69:\n", +"hG = (1.195*G_prime*CpG/PrG^(2/3))*(Ds*G_prime/(viscosity_G*(1-eLo)))^(-0.36);// [W/square m.K]\n", +"// To obtain the mass transfer coeffecients:\n", +"Ra = 1.4;\n", +"Rc = 1-Ra;\n", +"// From Eqn. 8.83:\n", +"Dam = (Ra-ya)/(Ra*((yb/Dab)+((ya+yc1)/Dac))-(ya/Dac));// [square m/s]\n", +"Dcm = (Rc-yc1)/(Rc*((yb/Dcb)+((ya+yc1)/Dac))-(yc1/Dac));// [square m/s]\n", +"ScGa = viscosity_G/(Density_G*Dam);\n", +"ScGc = viscosity_G/(Density_G*Dcm);\n", +"// By Eqn. 6.69:\n", +"FGa = (1.195*G1/ScGa^(2/3))*(Ds*G_prime/(viscosity_G*(1-eLo)))^(-0.36);// [kmol/square m.K]\n", +"FGc = (1.195*G1/ScGc^(2/3))*(Ds*G_prime/(viscosity_G*(1-eLo)))^(-0.36);// [kmol/square m.K]\n", +"Ra = Ra-0.1;\n", +"// From Eqn. 8.80:\n", +"scf(14);\n", +"for i = 1:3\n", +" deff('[yai] = f41(xai)','yai = Ra-(Ra-ya)*((Ra-xa)/(Ra-xai))^(Fl/FGa)');\n", +" xai = xa:0.01:0.10;\n", +" plot(xai,f41)\n", +" Ra = Ra+0.1;\n", +"end\n", +"xgrid();\n", +"xlabel('Mole fraction NH3 in the liquid, xa');\n", +"ylabel('Mole fraction NH3 in the gas ya');\n", +"title('Operating Line curves');\n", +"Rc = Rc-0.1;\n", +"// From Eqn. 8.81:\n", +"scf(15);\n", +"for i = 1:3\n", +" deff('[yci] = f42(xci)','yci = Rc-(Rc-yc1)*((Rc-xc)/(Rc-xci))^(Fl/FGc)');\n", +" xci = xc:-0.01:0.85;\n", +" plot(xci,f42)\n", +" Rc = Rc+0.1;\n", +"end\n", +"xgrid();\n", +"xlabel('Mole fraction H2O in the liquid, xc');\n", +"ylabel('Mole fraction H2O in the gas, yc');\n", +"title('Operating line Curves');\n", +"// Assume:\n", +"Tempi = 42.7;// [OC]\n", +"// The data of Fig. 8.2 (Pg 279) & Fig 8.4 (Pg 319) are used to draw the eqb curve of Fig 8.25 (Pg 320).\n", +"// By interpolation of operating line curves with eqb line and the condition: xai+xci = 1;\n", +"Ra = 1.38;\n", +"Rc = 1-Ra;\n", +"xai = 0.0786;\n", +"yai = f41(xai);\n", +"xci = 1-xai;\n", +"yci = f42(xci);\n", +"// From Eqn. 8.77:\n", +"dYa_By_dZ = -(Ra*FGa*a/Gb)*log((Ra-yai)/(Ra-ya));// [kmol H2O/kmol air]\n", +"// From Eqn. 8.78:\n", +"dYc_By_dZ = -(Rc*FGc*a/Gb)*log((Rc-yci)/(Rc-yc1));// [kmol H2O/kmol air]\n", +"// From Eqn. 8.82:\n", +"hGa_prime = -(Gb*((Ca*dYa_By_dZ)+(Cc*dYc_By_dZ)))/(1-exp(Gb*((Ca*dYa_By_dZ)+(Cc*dYc_By_dZ))/(hG*a)));// [W/cubic m.K]\n", +"// From Eqn. 8.79:\n", +"dtG_By_dZ = -(hGa_prime*(TempG1-Tempi))/(Gb*(Cb+(Ya1*Ca)+(Yc1*Cc)));// [K/m]\n", +"// When the curves of Fig. 8.2 (pg 279) & 8.24 (Pg 319) are interpolated for concentration xai and xci, the slopes are:\n", +"mar = 0.771;\n", +"mcr = 1.02;\n", +"lambda_c = 43.33*10^6;// [J/kmol]\n", +"// From Eqn. 8.3:\n", +"Hai = Ca*(Tempi-Tempo)+lambda_Ao-(mar*lambda_c);// [J/kmol]\n", +"Hci = Cc*(Tempi-Tempo)+lambda_Co-(mcr*lambda_c);// [J/kmol]\n", +"// From Eqn. 8.76\n", +"Tempi2 = TempL+(Gb/(hL*a))*(((Hai-Ca*(TempG1-Tempo)-lambda_Ao)*dYa_By_dZ)+((Hci-Cc*(TempG1-Tempo)-lambda_Co)*dYc_By_dZ)-((Cb+(Ya1*Ca)+(Yc1*Cc))*dtG_By_dZ));// [OC]\n", +"// The value of Tempi obtained is sufficiently close to the value assumed earlier.\n", +"\n", +"deltaYa=-0.05;\n", +"// An interval of deltaYa up the tower\n", +"deltaZ = deltaYa/(dYa_By_dZ);// [m]\n", +"deltaYc = (dYc_By_dZ*deltaZ);\n", +"// At this level:\n", +"Ya_next = Ya1+deltaYa;// [kmol/kmol air]\n", +"Yc_next = Yc1+deltaYc;// [kmol H2O/kmol air]\n", +"tG_next = TempG1+(dtG_By_dZ*deltaZ);// [OC]\n", +"L_next = L1+Gb*(deltaYa+deltaYc);// [kmol/square m.s]\n", +"xa_next = ((Gb*deltaYa)+(L1*xa))/L_next;// [mole fraction NH3]\n", +"Hg_next = (Cb*(tG_next-Tempo))+(Ya_next*(Ca*(tG_next-Tempo))+lambda_Ao)+(Yc_next*(Cc*(tG_next-Tempo)+lambda_Co));// [J/kmol air]\n", +"Hl_next = (L1*Hl1)+(Gb*(Hg_next-Hg2)/L_next);// [J/kmol]\n", +"// The calculation are continued where the specified gas outlet composition are reached.\n", +"// The packed depth is sum of all deltaZ\n", +"Z = 1.58;// [m]\n", +"printf('The packed depth is: %f m\n',Z);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.9: Multicomponent_Sysems.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 8.9\n", +"// Page: 327\n", +"\n", +"printf('Illustration 8.9 - Page: 327\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// C1=CH4 C2=C2H6 C3=n-C3H8 C4=C4H10\n", +"Abs=0.15;// [Total absorption,kmol]\n", +"T=25;// [OC]\n", +"y1=0.7;// [mol fraction]\n", +"y2=0.15;// [mol fraction]\n", +"y3=0.10;// [mol fraction]\n", +"y4=0.05;// [mol fraction]\n", +"x1=0.01;// [mol fraction]\n", +"x_involatile=0.99;// [mol fraction]\n", +"L_by_G=3.5;// [mol liquid/mol entering gas]\n", +"//******//\n", +"\n", +"LbyG_top=L_by_G/(1-y2);\n", +"LbyG_bottom=(L_by_G+y2)/1;\n", +"LbyG_av=(LbyG_top+LbyG_bottom)/2;\n", +"// The number of eqb. trays is fixed by C3 absorption:\n", +"// For C3 at 25 OC;\n", +"m=4.10;\n", +"A=LbyG_av/m;\n", +"Frabs=0.7;// [Fractional absorption]\n", +"X0=0;\n", +"// From Eqn. 8.109:\n", +"deff('[y]=f43(Np)','y=Frabs-((A^Np)-A)/((A^Np)-1)');\n", +"Np=fsolve(2,f43);\n", +"printf('Number of trays required is %f \n',Np);" + ] + } +], +"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 +} |