diff options
Diffstat (limited to 'Mass_Transfer_Operations_by_R_E_Treybal')
13 files changed, 9087 insertions, 0 deletions
diff --git a/Mass_Transfer_Operations_by_R_E_Treybal/1-The_Mass_Transfer_Operations.ipynb b/Mass_Transfer_Operations_by_R_E_Treybal/1-The_Mass_Transfer_Operations.ipynb new file mode 100644 index 0000000..6c61681 --- /dev/null +++ b/Mass_Transfer_Operations_by_R_E_Treybal/1-The_Mass_Transfer_Operations.ipynb @@ -0,0 +1,66 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: The Mass Transfer Operations" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1: Conversion_of_Units.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 1.1\n", +"// Page: 17\n", +"\n", +"printf('Illustration 1.1 - Page: 17\n\n');\n", +"\n", +"// solution\n", +"\n", +"// Taking conversion factor from table 1.5 (Pg 15)\n", +"// viscosity: [(lb/ft.h)]*4.134*10^(-4) [kg/m.s] (Pg 15)\n", +"// time: [h] = 3600 [s]\n", +"// Density: [lb/cubic feet]*16.09 = [kg/cubic m] (Pg 15)\n", +"// Length: [ft]*0.3048 = [m]\n", +"N = (2.778*10^(-4))*(30600/(1/(0.3048^(3/2))))*((1/(4.134*(10^(-4))*16.019))^0.111)*(((1/16.019)/(1/16.019))^0.26);\n", +"printf('The coeffecient for S.I. Unit is %f',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/Mass_Transfer_Operations_by_R_E_Treybal/10-Liquid_Extraction.ipynb b/Mass_Transfer_Operations_by_R_E_Treybal/10-Liquid_Extraction.ipynb new file mode 100644 index 0000000..5e1d9ef --- /dev/null +++ b/Mass_Transfer_Operations_by_R_E_Treybal/10-Liquid_Extraction.ipynb @@ -0,0 +1,1013 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Liquid Extraction" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.10: Number_Of_Transfer_Unit_Dilute_Solutions.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 10.10\n", +"// Page: 552\n", +"\n", +"printf('Illustration 10.10 - Page: 552\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//****Data****//\n", +"B = 1150;// [kg/h]\n", +"//*******//\n", +"\n", +"// x and y are taken in weight ratio.\n", +"x1_prime = 0.0101;// [Wt. fraction]\n", +"xF_prime = 0.0101;// [Wt. fraction]\n", +"y2_prime = 0;// [Wt. fraction]\n", +"x2_prime = 0.001001;// [Wt. fraction]\n", +"y1_prime = 0.0782;// [Wt. fraction]\n", +"// From Illustration 10.4:\n", +"A = 990;// [kg/h]\n", +"// At the dilute end:\n", +"m1_prime = 0.798;\n", +"Value1 = m1_prime*B/A;\n", +"// At the concentrated end:\n", +"m2_prime = 0.953;\n", +"Value2 = m2_prime*B/A;\n", +"ValueAv = (Value1*Value2)^0.5;\n", +"// From Eqn. 10.116:\n", +"// Since y2_prime = 0\n", +"Value3 = x2_prime/x1_prime;\n", +"NtoR = (log((1/Value3)*(1-(1/ValueAv))+(1/ValueAv)))/(1-(1/ValueAv));\n", +"printf('Number of theoretical Unit : %f\n',NtoR);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1: Single_Stage_Extraction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 10.1\n", +"// Page: 494\n", +"\n", +"printf('Illustration 10.1 - Page: 494\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// a:water b:isopropyl ether c:acetic acid\n", +"xF = 0.30;// [mol fraction]\n", +"yS = 0;// [mol fraction]\n", +"S1 = 40;// [kg]\n", +"B1 = 40;// [kg]\n", +"//*******//\n", +"\n", +"// Equilibrium data at 20 OC:\n", +"// Wa: Wt. percent of a\n", +"// Wb: Wt. percent of b\n", +"// Wc: Wt. percent of c\n", +"// Data1 = [Wc Wa Wb]\n", +"// Data1: water layer\n", +"Data1 = [0.69 98.1 1.2;1.41 97.1 1.5;2.89 95.5 1.6;6.42 91.7 1.9;13.30 84.4 2.3;25.50 71.1 3.4;36.70 58.9 4.4;44.30 45.1 10.6;46.40 37.1 16.5];\n", +"// Data2: isopropyl ether layer\n", +"Data2 = [0.18 0.5 99.3;0.37 0.7 98.9;0.79 0.8 98.4;1.93 1 97.1;4.82 1.9 93.3;11.40 3.9 84.7;21.60 6.9 71.5;31.10 10.8 58.1;36.20 15.1 48.7];\n", +"scf(20);\n", +"plot(Data1(:,3)/100,Data1(:,1)/100,Data2(:,3)/100,Data2(:,1)/100);\n", +"xgrid();\n", +"xlabel('Wt fraction of isopropyl ether');\n", +"ylabel('Wt fraction of acetic acid');\n", +"// x: Wt fraction of acetic acid in water layer.\n", +"// y: Wt fraction of acetic acid in isopropyl layer.\n", +"legend('x Vs fraction ether','y Vs fraction ether');\n", +"// The rectangular coordinates of Fig 10.9(a) will be used but only upto x = 0.30\n", +"a = gca();\n", +"a.data_bounds = [0 0;1 0.3];\n", +"// Stage 1:\n", +"F = 100;// [kg]\n", +"// From Eqn. 10.4:\n", +"M1 = F+S1;// [kg]\n", +"// From Eqn. 10.5:\n", +"xM1 = ((F*xF)+(S1*yS))/M1;\n", +"// From Fig. 10.15 (Pg 495):\n", +"// Point M1 is located on the line FB and with the help of tie line passing through M1:\n", +"x1 = 0.258;// [mol fraction]\n", +"y1 = 0.117;// [mol fraction]\n", +"// From Eqn. 10.8:\n", +"E1 = (M1*(xM1-x1)/(y1-x1));// [kg]\n", +"// From Eqn. 10.4:\n", +"R1 = M1-E1;// [kg]\n", +"\n", +"// Stage 2:\n", +"S2 = 40;// [kg]\n", +"B2 = 40;// [kg]\n", +"// From Eqn. 10.15:\n", +"M2 = R1+B2;// [kg]\n", +"// From Eqn. 10.16:\n", +"xM2 = ((R1*x1)+(S2*yS))/M2;\n", +"// Point M2 is located on the line R1B and the tie line passing through R2E2 through M2:\n", +"x2 = 0.227;\n", +"y2 = 0.095;\n", +"// From Eqn. 10.8:\n", +"E2 = (M2*(xM2-x2)/(y2-x2));// [kg]\n", +"// From Eqn. 10.4:\n", +"R2 = M2-E2;// [kg]\n", +"\n", +"// Stage 3:\n", +"S3 = 40;// [kg]\n", +"B3 = 40;// [kg]\n", +"// From Eqn. 10.15:\n", +"M3 = R2+B3;// [kg]\n", +"// From Eqn. 10.16:\n", +"xM3 = ((R2*x2)+(S3*yS))/M3;\n", +"// Point M3 is located on the line R2B and the tie line passing through R3E3 through M3:\n", +"x3 = 0.20;// [mol fraction]\n", +"y3 = 0.078;// [mol fraction]\n", +"// From Eqn. 10.8:\n", +"E3 = (M3*(xM3-x3)/(y3-x3));// [kg]\n", +"// From Eqn. 10.4:\n", +"R3 = M3-E3;// [kg]\n", +"Ac = x3*R3;\n", +"printf('The composited extract is %f kg\n',(E1+E2+E3));\n", +"printf('The acid content is %f kg\n',((E1*y1)+(E2*y2)+(E3*y3)));\n", +"printf('\n');\n", +"\n", +"// If an extraction to give the same final raffinate concentration were to be done in single stage, the point M would be at the intersection of tie line R3E3 and the line BF.\n", +"x = 0.20;// [mol fraction]\n", +"xM = 0.12;// [mol fraction]\n", +"// From Eqn. 10.6:\n", +"S = F*(xF-xM)/(xM-yS);// [kg]\n", +"printf('%f kg of solvent would be recquired if the same final raffinate concentration were to be obtained with one stage.\n',S);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2: Insoluble_Liquids.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 10.2\n", +"// Page: 497\n", +"\n", +"printf('Illustration 10.2 - Page: 497\n\n');\n", +"\n", +"printf('Illustration 10.2 (a)\n\n');\n", +"\n", +"// solution (a)\n", +"\n", +"//****Data****//\n", +"// a:water b:kerosene c:Nicotine\n", +"xF = 0.01;// [wt fraction nicotine]\n", +"F = 100;// [kg]\n", +"B = 150;// [kg]\n", +"//******//\n", +"\n", +"// Equilibrium data:\n", +"// x_prime = kg nicotine/kg water\n", +"// y_prime = kg nicotine/kg kerosene\n", +"// Data = [x_prime y_prme]\n", +"Data = [0 0;0.001011 0.000807;0.00246 0.001961;0.00502 0.00456;0.00751 0.00686;0.00998 0.00913;0.0204 0.01870];\n", +"xF_prime = xF/(1-xF);// kg nicotine/kg water\n", +"A = F*(1-xF);// [kg]\n", +"AbyB = A/B;\n", +"scf(21);\n", +"deff('[y] = f64(x)','y = -AbyB*(x-xF)');\n", +"x = 0:0.001:0.01;\n", +"plot(Data(:,1),Data(:,2),x,f64);\n", +"xgrid();\n", +"legend('Equilibrium line','Operating Line');\n", +"xlabel('kg nicotine / kg water');\n", +"ylabel('kg nicotine / kg kerosene');\n", +"title('Solution 10.2(a)')\n", +"// The operating line and equilibrium line intersect at:\n", +"x1_prime = 0.00425;// [kg nicotine/kg water]\n", +"y1_prime = 0.00380;// [kg nicotine/kg water]\n", +"extract = A*(0.01011-x1_prime);\n", +"printf('%f %% of nicotine is extracted.\n\n',extract*100);\n", +"\n", +"printf('Illustration 10.2 (b)\n\n');\n", +"\n", +"// Solution (b)\n", +"B = 50;// [kg]\n", +"// For each stage:\n", +"AbyB = A/B;\n", +"deff('[y] = f65(x1)','y = -AbyB*(x1-xF)');\n", +"x1 = 0:0.001:0.01;\n", +"deff('[y] = f66(x2)','y = -AbyB*(x2-0.007)');\n", +"x2 = 0:0.001:0.01;\n", +"deff('[y] = f67(x3)','y = -AbyB*(x3-0.005)');\n", +"x3 = 0:0.001:0.01;\n", +"scf(22);\n", +"plot(Data(:,1),Data(:,2),x1,f65,x2,f66,x3,f67);\n", +"xgrid();\n", +"a=gca();\n", +"a.data_bounds=[0 0;0.012 0.010];\n", +"legend('Equilibrium line','Operating Line from xF','Operating Line from 0.007','Operating Line from 0.005');\n", +"xlabel('kg nicotine / kg water');\n", +"ylabel('kg nicotine / kg kerosene');\n", +"title('Solution 10.2(b)')\n", +"// The final raffinate composition:\n", +"x3_prime = 0.0034;// [kg nicotine/kg water]\n", +"extract = A*(0.01011-x3_prime);\n", +"printf('%f %% of nicotine is extracted.\n',extract*100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3: Continuous_Countercurrent_Multistage_Extraction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 10.3\n", +"// Page: 502\n", +"\n", +"printf('Illustration 10.3 - Page: 502\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//****Data****//\n", +"// a:water b:isopropyl ether c:acetic acid\n", +"F = 8000;// [kg/h]\n", +"xF = 0.30;// [wt. fraction acetic acid]\n", +"//*******//\n", +"\n", +"// From Illustration 10.1 (Pg 494)\n", +"// Equilibrium Data:\n", +"// Eqb = [y_star*100 x*100]\n", +"Eqb = [0.18 0.69;0.37 1.41;0.79 2.89;1.93 6.42;4.82 13.30;11.40 25.50;21.60 36.70;31.10 44.30;36.20 46.40];\n", +"\n", +"// Solution(a)\n", +"\n", +"// From Figure 10.23 (Pg 503):\n", +"// For minimum solvent rate:\n", +"y1 = 0.143;// [Wt fraction of acetic acid in isopropyl ether layer]\n", +"xM = 0.114;// [Wt fraction of acetic acid in water layer]\n", +"// From Eqn. 10.24:\n", +"Bm = (F*xF/xM)-F;// [kg/h]\n", +"printf('Minimm solvent rate: %f kg/h\n',Bm);\n", +"printf('\n');\n", +"\n", +"// Solution (b)\n", +"\n", +"B = 20000;// [kg solvent/h]\n", +"yS = 0;\n", +"S = B;\n", +"// From Eqn 10.24:\n", +"xM = ((F*xF)+(S*yS))/(F+S);\n", +"// From Fig. 10.23 (Pg 503):\n", +"y1 = 0.10;\n", +"// Operating curve data:\n", +"// Operat = [YsPlus1 Xs]\n", +"Operat = [0 0.02;0.01 0.055;0.02 0.09;0.04 0.150;0.06 0.205;0.08 0.250;0.1 0.3];\n", +"scf(23);\n", +"plot(Eqb(:,2)/100,Eqb(:,1)/100,Operat(:,2),Operat(:,1));\n", +"xgrid();\n", +"a = gca();\n", +"a.data_bounds = [0 0;xF y1];\n", +"legend('Operating Line','Equilibrium Line');\n", +"xlabel('Wt. fraction acetic acid in water solution');\n", +"ylabel('Wt. fraction acetic acid in isopropyl ether solution');\n", +"title('Solution 10.3')\n", +"// From Figure scf(22):\n", +"xNp = 0.02;\n", +"Np = 7.6;\n", +"// By acid balance:\n", +"M = B+F;\n", +"E1 = M*(xM-xNp)/(y1-xNp);// [kg/h]\n", +"RNp = M-E1;// [kg/h]\n", +"printf('Number of theoretical Stages: %f\n',Np);\n", +"printf('Weight of the extract: %d kg/h\n',E1);\n", +"printf('Weight of the raffinate %d kg/h\n',RNp);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4: Continuous_Countercurrent_Multistage_Extraction_Insoluble_Liquids.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 10.4\n", +"// Page: 506\n", +"\n", +"printf('Illustration 10.4 - Page: 506\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//****Data****//\n", +"// a:water b:kerosene c:Nicotine\n", +"F = 1000;// [kg/h]\n", +"xF = 0.01;// [wt. fraction acetic acid]\n", +"//*******//\n", +"\n", +"// Equilibrium data:\n", +"// x_prime = kg nicotine/kg water\n", +"// y_prime = kg nicotine/kg kerosene\n", +"// Eqb = [x_prime y_prme]\n", +"Eqb = [0 0;0.001011 0.000807;0.00246 0.001961;0.00502 0.00456;0.00751 0.00686;0.00998 0.00913;0.0204 0.01870];\n", +"\n", +"// Solution (a)\n", +"\n", +"A = 1000*(1-xF);// [kg water/h]\n", +"yS = 0;\n", +"yS_prime = 0;\n", +"y1_prime = 0;\n", +"xF_prime = xF/(1-xF);// [kg nicotine/kg water]\n", +"// For xF_prime = 0.0101:\n", +"yk = 0.0093;\n", +"xNp = 0.001;// [wt. fraction acetic acid]\n", +"xNp_prime = xNp/(1-xNp);// [kg nicotine/kg water]\n", +"// For infinite stages:\n", +"// Operating Line should pass through (xNp_prime,y1_prime) & (xF_prime,yk)\n", +"Operat = [xNp_prime y1_prime;xF_prime yk];\n", +"scf(24);\n", +"plot(Eqb(:,1),Eqb(:,2),Operat(:,1),Operat(:,2));\n", +"xgrid();\n", +"legend('equilibrium Line','Operating Line');\n", +"xlabel('kg nicotine / kg water');\n", +"ylabel('kg nicotine / kg kerosene');\n", +"title('Solution 10.4(a)')\n", +"a = gca();\n", +"a.data_bounds = [0 0;0.012 0.01];\n", +"AbyBm = (yk-y1_prime)/(xF_prime-xNp_prime);\n", +"Bm = A/AbyBm;// [kg kerosene/h];\n", +"printf('Mininmum kerosene rate: %f kg kerosene/h \n',Bm);\n", +"\n", +"// Solution (b)\n", +"\n", +"B = 1150;// [kg/h]\n", +"AbyB = A/B;\n", +"// From Eqn. 10.36:\n", +"y2_prime = ((xF_prime-xNp_prime)*AbyB)+yS_prime;// [kg nicotine/kg kerosene]\n", +"// Operating Line should pass through (xNp_prime,y1_prime) & (xF_prime,y2_prime)\n", +"Operat = [xNp_prime y1_prime;xF_prime y2_prime];\n", +"scf(25);\n", +"plot(Eqb(:,1),Eqb(:,2),Operat(:,1),Operat(:,2));\n", +"xgrid();\n", +"legend('equilibrium Line','Operating Line');\n", +"xlabel('kg nicotine/kg water');\n", +"ylabel('kg nicotine/kg kerosene');\n", +"title('Solution 10.4(b)')\n", +"a = gca();\n", +"a.data_bounds = [0 0;0.012 0.01];\n", +"// From Figure:\n", +"Np = 8.3;\n", +"printf('Number of theoretical stages:%f \n',Np);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5: Continuous_Countercurrent_Extraction_with_Reflux.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 10.5\n", +"// Page: 510\n", +"\n", +"printf('Illustration 10.5 - Page: 510\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// a:ethylbenzne b:diethylene glycol c:styrene\n", +"F = 1000;// [kg/h]\n", +"xF = 0.5;// [Wt. fraction styrene]\n", +"xPE = 0.9;// [kg styrene/kg hydrocarbon]\n", +"xRNp = 0.1;// [kg styrene/kg hydrocarbon]\n", +"//******//\n", +"\n", +"// X: kg styrene/kg hydrocarbon\n", +"// Y: kg styrene/kg hydrocarbon\n", +"// N:kg glycol/kg hydrocarbon\n", +"// Equilibrium data:\n", +"// Hydrocarbon rich solutions:\n", +"// Eqb1 = [X N]\n", +"Eqb1 = [0 0.00675;0.0870 0.00817;0.1833 0.00938;0.288 0.01010;0.384 0.01101;0.458 0.01215;0.464 0.01215;0.561 0.01410;0.573 0.01405;0.781 0.01833;1 0.0256];\n", +"// Solvent rich solutions:\n", +"// Eqb2 = [Y_star N]\n", +"Eqb2 = [0 8.62;0.1429 7.71;0.273 6.81;0.386 6.04;0.480 5.44;0.557 5.02;0.565 4.95;0.655 4.46;0.674 4.37;0.833 3.47;1 2.69];\n", +"scf(26);\n", +"plot(Eqb1(:,1),Eqb1(:,2),Eqb2(:,1),Eqb2(:,2));\n", +"xgrid();\n", +"legend('X Vs N','Y Vs N');\n", +"xlabel('kg styrene / kg hydrocarbon');\n", +"ylabel('kg diethylene glycol / kg hydrocarbon');\n", +"title('Equilibrium Data')\n", +"// In Fig. 10.31 (Pg 512):\n", +"// Point E1 is located.\n", +"NE1 = 3.10;\n", +"\n", +"// solution (a)\n", +"\n", +"// From Fig. 10.30 (Pg 511):\n", +"Np = 9.5;\n", +"printf('Minimum number of theoretical stages: %f\n',Np);\n", +"printf('\n');\n", +"\n", +"// Solution (b)\n", +"\n", +"// The tie line when extended passes through F provides the minimum reflux ratio.\n", +"// From the plot:\n", +"N_deltaEm = 20.76;\n", +"// From Eqn. 10.48:\n", +"Ratiom = (N_deltaEm-NE1)/NE1;// [kg reflux/kg extract product]\n", +"printf('Minimum extract reflux ratio: %f kg reflux/kg extract product\n',Ratiom);\n", +"printf('\n');\n", +"\n", +"// Solution (c)\n", +"\n", +"Ratio = 1.5*Ratiom;// [kg reflux/kg extract product]\n", +"// From Eqn. 10.48;\n", +"N_deltaE = (Ratio*NE1)+NE1;\n", +"// Point deltaE is plotted.\n", +"// A straight line from deltaE through F intersects line X = 0.10 at deltaR.\n", +"N_deltaR = -29.6;\n", +"// In Fig. 10.31 (Pg 512):\n", +"// Random lines are drawn from deltaE for the concentrations to the right of F, and from deltaR for those to the left,and intersection of these with the solubility curves provide the coordinates of the opeating curve.\n", +"// The tie line data are plotted directly to provide the equilibrium curve.\n", +"// From Fig. 10.32 (Pg 513):\n", +"Np = 15.5;\n", +"// Feed is to be introduced in the seventh from the extract product end of cascade.\n", +"// From Fig. 10.31 (Pg 512):\n", +"XRNp = 0.10;\n", +"NRNp = 0.0082;\n", +"// Basis:1 hour.\n", +"// Overall plant balance:\n", +"// (1): PE_prime+RNp_prime = F\n", +"// C Balance\n", +"// (2): PE_prime*(1-XRNp)+RNp_prime*XRNp = F*xF\n", +"// Solving (1) & (2) simultaneously:\n", +"a = [1 1;(1-XRNp) XRNp];\n", +"b = [F;F*xF];\n", +"soln = a\b;\n", +"PE_prime = soln(1);// [kg/h]\n", +"RNp_prime = soln(2);// [kg/h]\n", +"RO_prime = Ratio*PE_prime;// [kg/h]\n", +"// From Eqn 10.39:\n", +"E1_prime = RO_prime+PE_prime;// [kg/h]\n", +"BE = E1_prime*NE1;// [kg/h]\n", +"E1 = BE+E1_prime;// [kg/h]\n", +"RNp = RNp_prime*(1+NRNp);// [kg/h]\n", +"S = BE+(RNp_prime*NRNp);// [kg/h]\n", +"printf('Number of theoretical stages: %f\n',Np);\n", +"printf('Extract Flow Rate: %f kg/h\n',E1);\n", +"printf('solvent Flow Rate: %f kg/h\n',S);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.6: Fractional_Extraction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 10.6\n", +"// Page: 516\n", +"\n", +"printf('Illustration 10.6 - Page: 516\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// a:heptane b:p-chloronitrobenzene c:o-chloronitrobenzene d:aq. methanol\n", +"xb = 0.4;// [Wt fraction]\n", +"xC = 0.60;// [Wt fraction]\n", +"F = 100;// [kg]\n", +"// The para isomer(b) favours the heptane(a) and the ortho isomer(c) favours the methanol(d).\n", +"// Basis: 1 hour.\n", +"A = 2400;// [kg/h]\n", +"D = 2760;// [kg/h]\n", +"xbW = 0.8;// [Wt fraction]\n", +"xbZ = 0.15;// [Wt fraction]\n", +"kb=1.35;\n", +"kc=0.835;\n", +"//*******//\n", +"\n", +"B = xb*F;// [kg]\n", +"C = F-B;// [kg]\n", +"// W = kg A rich product, after solvent removal\n", +"// Z = kg D rich product, after solvent removal\n", +"// B balance:\n", +"// (1): (0.80*W)+(0.15*Z) = B\n", +"// C balance:\n", +"// (2): (0.20*W)+(0.85*Z) = C\n", +"// Solving (1) & (2) simultaneously:\n", +"a = [0.80 0.15;0.20 0.85];\n", +"b = [B;C];\n", +"soln = a\b;\n", +"W = soln(1);\n", +"Z = soln(2);\n", +"Wb = xbW*W;// [kg]\n", +"Wc = W-Wb;// [kg]\n", +"Zb = xbZ*Z;// [kg]\n", +"Zc = Z-Zb;// [kg]\n", +"xB1_prime = Zb/D;\n", +"xC1_prime = Zc/D;\n", +"yB1_prime = Wb/D;\n", +"yC1_prime = Wc/D;\n", +"DbyA = D/A;\n", +"// Equilibrium curve:\n", +"// First distribution coeffecient: yB_star/xB_prime = 1.35\n", +"deff('[y] = f68(x1)','y = kb*x1');\n", +"x1 = 0:0.01:0.06;\n", +"// Second distribution coeffecient: yC_star/xC_prime = 0.835\n", +"deff('[y] = f69(x2)','y = kc*x2');\n", +"x2 = 0:0.01:0.06;\n", +"// Operating Line, corresponding to First distribution coeffecient:\n", +"deff('[y] = f70(x3)','y = (DbyA*x3)+yB1_prime');\n", +"x3 = 0:0.01:0.06;\n", +"deff('[y] = f71(x4)','y = DbyA*(x4-xB1_prime)');\n", +"x4 = 0:0.01:0.06;\n", +"// Operating Line, corresponding to Second distribution coeffecient:\n", +"deff('[y] = f72(x5)','y = (DbyA*x5)+yC1_prime');\n", +"x5 = 0:0.01:0.06;\n", +"deff('[y] = f73(x6)','y = (DbyA)*(x6-xC1_prime)');\n", +"x6 = 0:0.01:0.06;\n", +"scf(27);\n", +"plot(x1,f68,x3,f70,x4,f71);\n", +"xgrid();\n", +"legend('Equilibrium curve','Operating curve','Operating curve');\n", +"xlabel('xB_prime');\n", +"ylabel('yB_prime');\n", +"title('yB_star/xB_prime = 1.35');\n", +"a1 = gca();\n", +"a1.data_bounds = [0 0;0.05 0.07];\n", +"scf(28);\n", +"plot(x2,f69,x5,f72,x6,f73);\n", +"xgrid();\n", +"legend('Equilibrium curve','Operating curve','Operating curve');\n", +"xlabel('xC_prime');\n", +"ylabel('yC_prime');\n", +"title('yC_star/xC_prime = 0.835');\n", +"a2 = gca();\n", +"a2.data_bounds = [0 0;0.06 0.07];\n", +"// The stages are constructed.\n", +"// The feed matching is shown on Fig. 10.37 (Pg 518):\n", +"f_prime = 6.6;\n", +"fstage = 4.6;\n", +"printf('Number of ideal stage is %f\n',fstage+f_prime-1);\n", +"printf('The feed stage is %fth from the solvent-D inlet\n',fstage);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.7: Stage_Type_Extractors.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 10.7\n", +"// Page: 525\n", +"\n", +"printf('Illustration 10.7 - Page: 525\n\n');\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// c:Water d:Toulene \n", +"Density_c = 998;// [kg/cubic m]\n", +"viscosity_c = 0.95*10^(-3);// [kg/m.s]\n", +"Dc = 2.2*10^(-9);// [square m/s]\n", +"Density_d = 865;// [kg/cubic m]\n", +"viscosity_d = 0.59*10^(-3);// [kg/m.s]\n", +"Dd = 1.5*10^(-9);// [square m/s]\n", +"sigma = 0.022;// [N/m]\n", +"Dist = 20.8;// [Distribution Coeffecient]\n", +"d = 0.5;// [m]\n", +"h = 0.5;// [m]\n", +"di = 0.15;// [m]\n", +"N = 13.3;// [r/s]\n", +"g = 9.81;// [m/s^2]\n", +"qC = 3*10^(-3);// [cubic m/s]\n", +"qD = 3*10^(-4);// [cubic m/s]\n", +"//********//\n", +"\n", +"V = %pi*h*d^2/4;// [Vessel volume,cubic m]\n", +"phi_DF = qD/(qD+qC);// [Volume fraction toulene]\n", +"// Assume:\n", +"phi_Dbyphi_DF = 0.9;\n", +"phi_D = phi_Dbyphi_DF*phi_DF;\n", +"phi_W = 1-phi_D;\n", +"// From Eqn. 10.56:\n", +"Density_M = (Density_c*phi_W)+(Density_d*phi_D);// [kg/cubic m]\n", +"if phi_W>0.4\n", +" viscosity_M = (viscosity_c/phi_W)*(1+(6*viscosity_d*phi_D/(viscosity_d+viscosity_c)));// [kg/m s]\n", +"else\n", +" viscosity_M = (viscosity_c/phi_D)*(1-(1.5*viscosity_c*phi_W/(viscosity_d+viscosity_c)));// [kg/m s]\n", +"end\n", +"// Impeller Reynold's Number:\n", +"IRe = (di^2*N*Density_M/viscosity_M);\n", +"// From Fig 6.5 (Pg 152), curve g:\n", +"Po = 0.72;\n", +"P = Po*Density_M*N^3*di^5;// [W]\n", +"// From Eqn. 10.61:\n", +"Value1 = P*qD*viscosity_c^2/(V*sigma^3);\n", +"Value2 = viscosity_c^3/(qD*Density_c^2*sigma);\n", +"Value3 = Density_c/(Density_c-Density_d);\n", +"Value4 = sigma^3*Density_c/(viscosity_c^4*g);\n", +"Value5 = viscosity_d/viscosity_c;\n", +"phi_Dbyphi_DF = 3.39*Value1^0.247*Value2^0.427*Value3^0.430*Value4^0.401*Value5^0.0987;\n", +"// The value of phi_Dbyphi_DF is sufficiently close to the value 0.90 assumed earlier.\n", +"phi_D = phi_Dbyphi_DF*phi_DF;\n", +"// From Eqn. 10.6:\n", +"Value6 = viscosity_c/Density_c;// [square m/s]\n", +"Value7 = P/(V*Density_M);\n", +"Value8 = sigma/Density_c;\n", +"dp = 10^(-2.066+(0.732*phi_D))*Value6^0.0473*Value7^(-0.204)*Value8^(0.274);// [m]\n", +"a = 6*phi_D/dp;// [square m/cubic m]\n", +"Sca = viscosity_c/(Density_c*Dc);\n", +"// From Eqn. 10.65:\n", +"Shc = 65.3;\n", +"kLc = Shc*Dc/dp;// [kmol/square m s (kmol/cubic m)]\n", +"thetha = V/(qD+qC);// [s]\n", +"// From Table 10.1 (Pg 524):\n", +"// lambda = [lambda1 lambda2 lambda3]\n", +"lambda = [1.359 7.23 17.9];\n", +"// B = [B1 B2 B3]\n", +"B = [1.42 0.603 0.317];\n", +"Val = zeros(1,3);\n", +"Sum = 0;\n", +"for n = 1:3\n", +" Val(n) = (B(n)^2)*exp((-lambda(n))*64*Dd*thetha/dp^2);\n", +" Sum = Sum+Val(n);\n", +"end\n", +"// From Eqn. 10.66:\n", +"kLd = -(dp/(6*thetha))*log((3/8)*Sum);\n", +"mCD = 1/Dist;\n", +"// From Eqn. 10.67:\n", +"KLd = 1/((1/kLd)+(1/(mCD*kLc)));// [kmol/square m s (kmol/cubic m)]\n", +"Z = 0.5;// [m]\n", +"Vd = qD/(%pi*Z^2/4);// [m/s]\n", +"// From Eqn.10.70:\n", +"NtoD = Z/(Vd/(KLd*a));\n", +"// From Eqn. 10.71:\n", +"EMD = NtoD/(NtoD+1);\n", +"printf('Expected stage efficiency: %f\n',EMD);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.8: Sieve_Tray_Tower.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 10.8\n", +"// Page: 539\n", +"\n", +"printf('Illustration 10.8 - Page: 539\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// a:acetic acid c:Water d:Isopropylether layer\n", +"// Water solution (continuous):\n", +"C = 8000;// [kg/h]\n", +"xCn = 0.175;// [mass fraction]\n", +"Density_c = 1009;// [kg/cubic m]\n", +"viscosity_c = 3.1*10^(-3);// [kg/m.s]\n", +"Dc = 1.24*10^(-9);// [square m/s]\n", +"\n", +"// Isopropyl Ethr Layer:\n", +"D = 20000;// [kg/h]\n", +"xDnPlus1 = 0.05;// [mass fraction]\n", +"Density_d = 730;// [kg/cubic m]\n", +"viscosity_d = 0.9*10^(-3);// [kg/m.s]\n", +"Dd = 1.96*10^(-9);// [square m/s]\n", +"\n", +"sigma = 0.013;// [/N/m]\n", +"m = 2.68;// [Distributon coeffecient]\n", +"//*******//\n", +"\n", +"Ma = 60.1;\n", +"g = 9.81;// [m/square s]\n", +"cCn = xCn*Density_c/Ma;// [kmol/cubic m]\n", +"cDnPlus1 = xDnPlus1*Density_d/Ma;// [kmol/cubic m]\n", +"mCD = m*(Density_c/Density_d);// [(kmol/cubic min ether)/(kmol/cubic m in water)]\n", +"\n", +"// Perforations:\n", +"Do = 0.006;// [m]\n", +"pitch = 0.015;// [m]\n", +"qD = D/(3600*Density_d);// [cubic m/s]\n", +"delta_Density = Density_c-Density_d;// [kg/cubic m]\n", +"Value1 = Do/(sigma/(delta_Density*g))^0.5;\n", +"if Value1<0.1785\n", +" // From Eqn. 10.74(a):\n", +" doBydj = (0.485*Value1^2)+1;\n", +"else\n", +" // From Eqn. 10.74(b)\n", +" doBydj = (1.51*Value1)+0.12;\n", +"end\n", +"dj = Do/doBydj;// [m]\n", +"Vomax = 2.69*((dj/Do)^2)*(sigma/(dj*((0.5137*Density_d)+(0.4719*Density_c))))^0.5;// [m/s]\n", +"// Since Vomax is less than 0.1:\n", +"Vo = 0.1;// [m/s]\n", +"Ao = qD/Vo;// [square m]\n", +"No = Ao/(%pi*Do^2/4);// [square m]\n", +"// From Eqn. 6.30:\n", +"// Plate area for perforation:\n", +"Aa = Ao/(0.907*(Do/pitch)^2);// [square m]\n", +"\n", +"// Downspout:\n", +"dp = 0.0007;// [m]\n", +"// From Eqn. 10.75:\n", +"U = Density_c^2*sigma^3/(g*viscosity_c^4*delta_Density);\n", +"// From Fig. 10.47 (Pg 534):\n", +"ordinate = 1.515;\n", +"abcissa = 0.62;\n", +"deff('[y] = f74(Vt)','y = abcissa-(dp*Vt*Density_c/(viscosity_c*U^0.15))');\n", +"Vt = fsolve(7,f74);// [m/s]\n", +"Vd = Vt;// [m/s]\n", +"qC = C/(Density_c*3600);// [cubic m/s]\n", +"Ad = qC/Vd;// [square m]\n", +"// From Table 6.2 (Pg 169):\n", +"// Allowing for supports and unperforated area:\n", +"At = Aa/0.65;// [square m]\n", +"T = (At*4/%pi)^0.5;// [m]\n", +"An = At-Ad;// [square m]\n", +"\n", +"\n", +"// Drop Size:\n", +"alpha1 = 10.76;\n", +"alpha2 = 52560;\n", +"alpha3 = 1.24*10^6;\n", +"alpha4 = 3.281;\n", +"abcissa = (alpha2*sigma*Do/delta_Density)+(alpha3*Do^1.12*Vo^0.547*viscosity_c^0.279/delta_Density^1.5);\n", +"Parameter = alpha1*Density_d*Vo^2/(delta_Density);\n", +"ordinate = 0.024;\n", +"dp = ordinate/alpha4;\n", +"\n", +"// Coalesced layer:\n", +"Vn = qD/An;// [m/s]\n", +"// From Eqn. 10.80:\n", +"ho = (Vo^2-Vn^2)*Density_d/(2*g*0.67^2*delta_Density);// [m]\n", +"hD = ho;\n", +"// From Eqn. 10.82:\n", +"hC = 4.5*Vd^2*Density_c/(2*g*delta_Density);// [m]\n", +"// From Eqn. 10.78:\n", +"h = hC+hD;\n", +"// Since this is very shallow, increase it by placing an orifice at the bottom of the downspout.\n", +"// VR: Velocity through the restriction.\n", +"// hR: Corresponding depth of the coalesced layer.\n", +"// Assume:\n", +"Vr = 0.332;// [m/s]\n", +"hr = (Vr^2-Vd^2)*Density_c/(2*0.67^2*delta_Density);\n", +"Ar = qC/Vr;// [square m]\n", +"dr = (4*Ar/%pi)^0.5;// [m]\n", +"h = h+hr;// [m]\n", +"// The above results are satisfacyory.\n", +"Z = 0.35;// [m]\n", +"// Lead the downspout apron to within 0.1 m of the tray below.\n", +"\n", +"// Dispersed-phase holdup:\n", +"// From Eqn. 10.48:\n", +"Vsphi_D = Vn;\n", +"// From Fig. 10.47 (Pg 534):\n", +"ordinate = 165.2;\n", +"abcissa = 30;\n", +"deff('[y] = f75(Vt)','y = abcissa-(dp*Vt*Density_c/(viscosity_c*U^0.15))');\n", +"Vtl = fsolve(7,f75);// [m/s]\n", +"// For solids:\n", +"// From Fig. 10.48 (Pg 536):\n", +"abcissa = dp/(3*viscosity_c^2/(4*Density_c*delta_Density*g))^(1/3);\n", +"phi_D = [0 0.1 0.2 0.3];\n", +"// Corresponding ordinates, from Fig. 10.48 (Pg 536):\n", +"ordinate1 = [8.8 5.9 4.3 3.0];\n", +"Value1 = 1/(4*viscosity_c*delta_Density*g/(3*Density_c^2))^(1/3);\n", +"Val = zeros(4,6);\n", +"// Val = [phi_D ordinate Vs(1-phi_D) (Vs for solids) Vs/Vt (Vs for liquids) (Vs*phi_D (for liquids))]\n", +"for i = 1:4\n", +" Val(i,1) = phi_D(i);\n", +" Val(i,2) = ordinate1(i);\n", +" Val(i,3) = Val(i,2)/Value1;\n", +" Val(i,4) = Val(i,3)/(1-Val(i,1));\n", +" Val(i,5) = Val(i,4)/Val(1,4);\n", +" Val(i,6) = Vtl*Val(i,5);\n", +" Val(i,7) = Val(i,6)*Val(i,1);\n", +"end\n", +"\n", +"// By Interpolation:\n", +"Phi_D = 0.1;\n", +"// Mass transfer:\n", +"thetha_f = (%pi*(dp^3)/6)/(qD/No);// [s]\n", +"// From Eqn. 10.87:\n", +"const = 1.5;\n", +"kLDf = const*(Dd/(%pi*thetha_f))^0.5;// [m/s]\n", +"// From Eqn. 10.86\n", +"KLDf = 1/((1/kLDf)*(1+((1/mCD)*(Dd/Dc)^0.5)));// [m/s]\n", +"// The ordinate of Fig. 10.47 for the drops larger than 70. Hence mass transfer coeffecient during drop rise is given by Eqn. 10.89:\n", +"// From Eqn. 10.91:\n", +"b = 1.052*dp^0.225;\n", +"// From Eqn. 10.90:\n", +"omega = (1/(2*%pi))*sqrt(192*sigma*b/(dp^3*((3*Density_d)+(2*Density_c))));// [1/s]\n", +"del = 0.2;\n", +"kLDr = sqrt((4*Dd*omega/%pi)*(1+del+(1/2)*del^2));\n", +"KLDr = 1/1/((1/kLDr)*(1+((1/mCD)*(Dd/Dc)^0.5)));// [m/s]\n", +"// From Eqn. 10.98:\n", +"EMD = ((4.4*KLDf/Vo)*(dp/Do)^2)+(6*KLDr*Phi_D*(Z-h)/(dp*Vn))/(1+((0.4*KLDf/Vo)*(dp/Do)^2)+(3*KLDr*Phi_D*(Z-h)/(dp*Vn)));\n", +"printf('Stage Efficiency: %f',EMD);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.9: Number_Of_Transfer_Unit_Dilute_Solutions.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 10.9\n", +"// Page: 551\n", +"\n", +"printf('Illustration 10.9 - Page: 551\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"B = 20000;// [kg/h]\n", +"//******//\n", +"\n", +"// x and y are taken in weight fraction acetic acid.\n", +"x1 = 0.30;// [Wt fraction]\n", +"xF = 0.30;// [Wt fraction]\n", +"y2 = 0;// [Wt fraction]\n", +"x2 = 0.02;// [Wt fraction]\n", +"y1 = 0.10;// [Wt fraction]\n", +"// The operating diagram is plotted in Fig. 10.23:\n", +"// Data = [x x_star]\n", +"// From Fig. 10.23 (Pg 503):\n", +"Data = [0.30 0.230;0.25 0.192;0.20 0.154;0.15 0.114;0.10 0.075;0.05 0.030;0.02 0];\n", +"Val = zeros(7);\n", +"for i = 1:7\n", +" Val(i) = 1/(Data(i,1)-Data(i,2));\n", +"end\n", +"scf(29);\n", +"plot(Data(:,1),Val);\n", +"xgrid();\n", +"a = gca();\n", +"a.Data_bounds = [0.02 0;0.30 50];\n", +"xlabel('x');\n", +"ylabel('1/(x-x*)');\n", +"title('Graphical Integration');\n", +"// From Area Under the curve:\n", +"Area = 8.40;\n", +"// The mutual solubility of water and isopropyl ether is very small.\n", +"Ma = 18;// [kg/kmol water]\n", +"Mb = 60;// [kg/kmol isopropyl ether]\n", +"r = Ma/Mb;\n", +"// From Eqn. 10.110:\n", +"NtoR = Area+(1/2)*log(1-x2/(1-x1))+(1/2)*log(x2*(r-1)+1/(x1*(r-1)+1));\n", +"// Since the operating line and equilibrium line are parallel:\n", +"Np = NtoR;\n", +"printf('Number of theoretical Units: %f\n',NtoR);" + ] + } +], +"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/Mass_Transfer_Operations_by_R_E_Treybal/11-Adsorption_and_Ion_Exchange.ipynb b/Mass_Transfer_Operations_by_R_E_Treybal/11-Adsorption_and_Ion_Exchange.ipynb new file mode 100644 index 0000000..7abf86f --- /dev/null +++ b/Mass_Transfer_Operations_by_R_E_Treybal/11-Adsorption_and_Ion_Exchange.ipynb @@ -0,0 +1,957 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Adsorption and Ion Exchange" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.10: Calculation_of_Bed_depth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 11.10\n", +"// Page: 640\n", +"\n", +"printf('Illustration 11.10 - Page: 640\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//*****Data******//\n", +"// a:N2 b:H2O\n", +"Mb = 18;// [kg/kmol]\n", +"Ma = 29;// [kg/kmol]\n", +"Z = 0.268;// [m]\n", +"Xo_solid = 0.01;// [kg H20/kg solid]\n", +"Density_bed = 712.8;// [kg/cubic m]\n", +"T = 28.3;// [OC]\n", +"P = 593;// [kN/square m]\n", +"Gs = 4052;// [kg/square m.h]\n", +"Xo_gas = 1440*10^(-6);// [mole fraction]\n", +"//********************//\n", +"\n", +"// Yo_star is in equilibrium with Xo:\n", +"Xo = 0;// [kg H20/kg solid]\n", +"Yo_star = 0;// [kg H20/kg N2]\n", +"thetha_t = 12.8;// [h]\n", +"thetha_b = 9;// [h]\n", +"// The breakthrough data are plotted in the manner of Fig. 11.47 (Pg 639) and thetha_s is dtermined:\n", +"thetha_s = 10.9;// [h]\n", +"Xt = 0.21;// [kg H20/kg solid]\n", +"// From Eqn. 11.81:\n", +"LUB = (Z/thetha_s)*(thetha_s-thetha_b);\n", +"// For thetha_b = 15 h\n", +"thetha_b = 15;// [h]\n", +"Yo = (Xo_gas/(1-Xo_gas))*(Mb/Ma);// [kg H20/kg N2]\n", +"// From Eq. 11.82:\n", +"Zs = Gs*(Yo-Yo_star)*thetha_b/(Density_bed*(Xt-Xo_solid));// [m]\n", +"// From Eqn. 11.85:\n", +"Z = LUB+Zs;\n", +"printf('Height of adsorbent column: %f m\n',Z);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.11: Ion_Exchange.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 11.11\n", +"// Page: 645\n", +"\n", +"printf('Illustration 11.11 - Page: 645\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//****Data****//\n", +"// For collection of Cu2+:\n", +"V = 37850;// [l/h]\n", +"c1 = 20;// [meq Cu2+/l]\n", +"c2 = 0.01*c1;// [meq Cu2+/l]\n", +"Mass_rate = 2;// [meq Cu2+/g resin h (meq Cu2+/l)]\n", +"exchanged = V*(c1-c2);// [meq/h]\n", +"X2 = 0.30;// [meq Cu2+/g]\n", +"//************///\n", +"\n", +"// The point(c2,X2) is plotted in Fig. 11.48(a), Pg 645:\n", +"// For the minimum resin/solution ratio and an infinitely tall tower, the operating line pass though point P.\n", +"X = 4.9;// [meq Cu2+/g]\n", +"MinRate = exchanged/(X-X2);// [g/h]\n", +"Rate = 1.2*MinRate;// [g/h]\n", +"// Copper balance:\n", +"X1 = (exchanged/Rate)+X2;// [meq Cu2+/g resin]\n", +"// The point (c1,x1) is ploted in Fig. 11.48(a) and operating line drawn can be straight line at this low conc.\n", +"// Adapting Eqn. 11.48 and rearranging:\n", +"// S*Z*Density_s = (V/Mass_rate)*integrate(1/(c-c_star),c,c1,c2)\n", +"// Mass_rate = KL_prime*ap/Density_s\n", +"// From the equilibrium curve:\n", +"// Data = [c c_star]\n", +"Data = [20 2.4;16 1.9;12 0.5;8 0.25;4 0.10;2 0.05;1 .02;0.2 0];\n", +"Val = zeros(8);\n", +"for i = 1:8\n", +" Val(i) = 1/(Data(i,1)-Data(i,2));\n", +"end\n", +"scf(39);\n", +"plot(Data(:,1),Val);\n", +"xgrid();\n", +"xlabel('c');\n", +"ylabel('1 / (c-c*)');\n", +"title('Graphical Integration');\n", +"// From Graphical Integration:\n", +"Area = 5.72;\n", +"// holdup = S*Z*Density_s\n", +"holdup = V*Area/(Mass_rate);\n", +"printf('Resin Holdup: %f g\n',holdup);\n", +"\n", +"// Regeneration of resin:\n", +"// For 70% utilisation of 2N acid, feed must contain:\n", +"V = exchanged;\n", +"F = V/(0.70*2000);// [l/h]\n", +"c1 = 0;// [meq Cu2+/l]\n", +"c2 = V/F;// [meq Cu2+/l]\n", +"X1 = 0.30;// [meq Cu2+/g resin]\n", +"X2 = 4.12;// [meq cu2+/g resin]\n", +"// The points (c1,X1) and (c2,X2) are plotted on Fig 11.48(b), Pg 645\n", +"c1_star = 120;// [meq Cu2+/l]\n", +"c2_star = 1700;// [meq Cu2+/l]\n", +"logmean = ((c1_star-c1)-(c2_star-c2))/log((c1_star-c1)/(c2_star-c2));\n", +"Mass_rate = 0.018;// [meq Cu2+/g resin h (meq Cu2+/l)]\n", +"// Substituting in equation:\n", +"deff('[y] = f79(holdup)','y = (V*(c2-c1))-(Mass_rate*holdup*logmean)');\n", +"holdup = fsolve(7,f79);\n", +"printf('Resin Holdup in the regeneration Tower is %e g\n',holdup);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.1: Adsorption_Equilibria.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 11.1\n", +"// Page: 575\n", +"\n", +"printf('Illustration 11.1 - Page: 575\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//*****Data*****//\n", +"Temp = 30;// [OC]\n", +"//*************//\n", +"\n", +"// From Fig. 11.5 (Pg 572)\n", +"// The isosteres for various concentrations are straight and their slopes are measured with the help of milimeter rule.\n", +"// Data = [X(kg acetone/kg carbon) lambda(slope of isostere)]\n", +"Data = [0.05 1.170;0.10 1.245;0.15 1.3;0.20 1.310;0.25 1.340;0.30 1.327];// [kg acetone/kg carbon]\n", +"lambdar = 551;// [reference at 30 OC,kJ/kg]\n", +"Val = zeros(6,5);\n", +"for i = 1:6\n", +" Val(i,1) = Data(i,1);// [kg acetone/kg carbon]\n", +" Val(i,2) = Data(i,2);// [slope of isostere]\n", +" Val(i,3) = -Data(i,2)*lambdar;// [kJ/kg acetone]\n", +"end\n", +"scf(30);\n", +"plot(Val(:,1),Val(:,3));\n", +"xgrid();\n", +"xlabel('X (kg carbon / kg acetone)');\n", +"ylabel('Differential heat of adsorption (kJ / kg acetone)');\n", +"title('Graphical Integration');\n", +"// Area: The area under the curve between X = 0 to X = X\n", +"// Corresponding to Data(:,1):\n", +"Area = [-29.8 -63.0 -97.9 -134.0 -170.5 -207.5];\n", +"for i = 1:6\n", +" Val(i,4) = Area(i);\n", +" Val(i,5) = Area(i)+(lambdar*Val(i,1));\n", +"end\n", +"printf('X(kg acetone/kg carbon) Slope of isostere Differential heat of adsorption(kJ/kg acetone) deltaH_prime(vapour(kJ/kg carbon)) deltaH(liquid(kJ/kg carbon))\n');\n", +"for i = 1:6\n", +" printf('%f \t \t \t %f \t \t %f \t \t \t \t \t %f \t \t \t %f\n',Val(i,1),Val(i,2),Val(i,3),Val(i,4),Val(i,5));\n", +"end" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2: Freundlich_Equation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 11.2\n", +"// Page: 596\n", +"\n", +"printf('Illustration 11.2 - Page: 596\n\n');\n", +"\n", +"// solution\n", +"\n", +"//*****Data*****//\n", +"// x:kg carbon/kg soln\n", +"// y_star: Equilibrium colour, units/kg soln.\n", +"// X:adsorbate concentration, units/kg carbon\n", +"// Data = [x Y_star]\n", +"Data = [0 9.6;0.001 8.6;0.004 6.3;0.008 4.3;0.02 1.7;0.04 0.7];\n", +"Yo = 9.6;// [units of colour/kg soln]\n", +"Y1 = 0.1*Yo;// [units of colour/kg soln]\n", +"Ls = 1000;// [kg soln]\n", +"//****************//\n", +"\n", +"Data1 = zeros(5);\n", +"Val = zeros(5);\n", +"for i = 1:5\n", +" Data1(i,1) = Data(i+1,1);\n", +" Data1(i,2) = Data(i+1,2);\n", +" Val(i) = (Data(1,2)-Data1(i,2))/Data1(i,1);\n", +"end\n", +"scf(31);\n", +"plot2d1('gll',Val,Data1(:,2));\n", +"xlabel('units of colour/kg carbon');\n", +"ylabel('units of colour/kg solution');\n", +"title('Equilibium Data(on log scale)');\n", +"xgrid();\n", +"n = 1.66;// [slope of line]\n", +"// At X = 663, Y_star = 4.3\n", +"// From eqn. 11.5\n", +"X = 663;\n", +"Y_star = 4.3;\n", +"m = Y_star/X^n;\n", +"// Freundlich Equation:\n", +"deff('[Y] = f76(X)','Y = m*X^n');\n", +"X = 0:1:1000;\n", +"scf(32);\n", +"plot(X,f76);\n", +"xgrid();\n", +"xlabel('units of colour/kg carbon');\n", +"ylabel('units of colour/kg solution');\n", +"title('Equilibium Data(on arithmetic scale)');\n", +"\n", +"// Single Stage Operation:\n", +"// Since fresh carbn is used:\n", +"Xo = 0;// [units/kg carbon]\n", +"// From scf(30):\n", +"X1 = 270;// [units/kg carbon]\n", +"Data2 = [Xo Yo;X1 Y1];\n", +"scf(33);\n", +"plot(X,f76,Data2(:,1),Data2(:,2));\n", +"xgrid();\n", +"xlabel('units of colour/kg carbon');\n", +"ylabel('units of colour/kg solution');\n", +"legend('Equilbrium curve','Operating line curve');\n", +"title('Single stage operation');\n", +"// From Eqn. 11.4:\n", +"Ss = Ls*((Yo-Y1)/(X1-Xo));// [kg carbon/kg soln]\n", +"printf('Quantity of fresh carbon recquired for single stage operation: %f kg carbon/1000 kg solution\n',Ss);\n", +"\n", +"// Two stage cross current operation:\n", +"// For the minimumamount of carbon:\n", +"X1 = 565;// [units/kg carbon]\n", +"Y1 = 3.30;// [units of colour/kg soln]\n", +"X2 = 270;// [units/kg carbon]\n", +"Y2 = 0.96;// [units of colour/kg soln]\n", +"Data3 = [Xo Yo;X1 Y1];\n", +"Data4 = [0 Y1;X2 Y2];\n", +"scf(34);\n", +"plot(X,f76,Data3(:,1),Data3(:,2),Data4(:,1),Data4(:,2));\n", +"xgrid();\n", +"xlabel('units of colour/kg carbon');\n", +"ylabel('units of colour/kg solution');\n", +"legend('Equilbrium curve','First of two Cocurrent','Second of two Cocurrent');\n", +"title('Two stage Cross current operation');\n", +"// From Eqn. 11.8:\n", +"Ss1 = Ls*(Yo-Y1)/(X1-Xo);// [kg]\n", +"Ss2 = Ls*(Y1-Y2)/(X2-Xo);// [kg]\n", +"Ss = Ss1+Ss2;// [kg]\n", +"printf('Quantity of fresh carbon recquired for two stage crosscurrent operation: %f kg carbon/1000 kg solution\n',Ss);\n", +"\n", +"// Two Stage counter current operation:\n", +"Yo = 9.6;\n", +"Y2 = 0.96;\n", +"// By trial and error:\n", +"XNpPlus1 = 0;\n", +"X1 = 675;\n", +"Data5 = [X1 Yo;XNpPlus1 Y2];\n", +"scf(35);\n", +"plot(X,f76,Data5(:,1),Data5(:,2));\n", +"xgrid();\n", +"xlabel('units of colour/kg carbon');\n", +"ylabel('units of colour/kg solution');\n", +"legend('Equilbrium curve','Two stage Counter Current');\n", +"title('Two stage Counter Current operation');\n", +"// By eqn 11.14:\n", +"Ss = Ls*(Yo-Y2)/(X1-XNpPlus1);\n", +"printf('Quantity of fresh carbon recquired for two stage Counter Current operation: %f kg carbon/1000 kg solution\n',Ss);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3: Agitated_Vessel_for_Liquid_Solid_Contact.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 11.3\n", +"// Page: 602\n", +"\n", +"printf('Illustration 11.3 - Page: 602\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//***Data***//\n", +"T = 1; //[m]\n", +"di = 0.203;// [m]\n", +"n = 1;// [for one impeller]\n", +"Density_S = 2300;// [kg/cubic m]\n", +"Density_p = 2300;// [kg/cubic m]\n", +"C = 0.150;// [m]\n", +"S = 50;// [kg]\n", +"g = 9.807;// [m/s]\n", +"dp = 8*10^(-4);// [m]\n", +"N = 8.33; //[r/s]\n", +"Temp=25;// [OC]\n", +"//*************//\n", +"\n", +"// Assume:\n", +"Po = 5;\n", +"viscosity_L = 8.94*10^(-4);// [kg/m.s]\n", +"Density_L = 998;// [kg/cubic m]\n", +"delta_Density = Density_S-Density_L;// [kg/cubic m]\n", +"// By Eqn. 11.23:\n", +"Vts = g*dp^2*delta_Density/(18*viscosity_L);// [m/s]\n", +"// By defn. of power number:\n", +"// P = Po*Density_m*di^5*Ni^3\n", +"// vm = %pi*T^2*(Z+C)/4\n", +"// Solid Volume = S/Density_p;\n", +"// If these are substituted in Eqn. 11.22\n", +"deff('[y] = f(Z)','y = (((Z+C)^(1/3))*exp(4.35*Z/(T-0.1)))-((1.0839*Po*di^(11/2)*N^3*Density_p^(2/3))/(g*Vts*T^(7/6)*S^(2/3)))');\n", +"Z = fsolve(7,f);// [m]\n", +"phi_Sm = 4*S/(%pi*T^2*(Z+C)*Density_p);\n", +"Density_m = (phi_Sm*Density_p)+((1-phi_Sm)*Density_L);// [kg/cubic m]\n", +"phi_Ss = 0.6;\n", +"viscosity_m = viscosity_L/(1-(phi_Sm/phi_Ss))^1.8;// [kg/m.s]\n", +"Re = di^2*N*Density_m/viscosity_m;\n", +"P = Po*Density_m*N^3*di^5;// [W]\n", +"printf('Agitator Power required: %f W\n',P);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.4: Agitated_Power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 11.4\n", +"// Page: 604\n", +"\n", +"printf('Illustration 11.4 - Page: 604\n\n');\n", +"\n", +"//****Data*****//\n", +"// b: kerosene c:water\n", +"// c:kg water/cubic m liquid\n", +"Density_l = 783;// [kg/cubic m]\n", +"viscosity_l = 1.7*10^(-3);// [kg/m.s]\n", +"Mb = 200;// [kg/kmol]\n", +"Density_p = 881;// [kg/cubic m]\n", +"m = 0.522;// [(kg water/cubic m kerosene)/(kg water/kg gel)]\n", +"Xo = 0;// [kg H2O/kg gel]\n", +"//**************//\n", +"\n", +"// Solution (a)\n", +"co = Density_l*4*10^(-5);// [kg water/cubic m]\n", +"c1 = Density_l*5*10^(-6);// [kg water/cubic m]\n", +"// For Ss minimum:\n", +"X1 = c1/m;// [kg H2O/kg gel]\n", +"// By Water Balance:\n", +"SsminByVl = (co-c1)/(X1-Xo);// [kg gel/cubic m kerosene]\n", +"printf('Minimum Solid/Liquid ratio used: %f kg gel/cubic m kerosene',SsminByVl);\n", +"printf('\n');\n", +"\n", +"// Solution (b)\n", +"// Basis: 1 batch,1.7 cubic m kerosene\n", +"Vl = 1.7;// [cubic m]\n", +"Ss = 16*1.7;// [kg gel]\n", +"V = Ss/Density_p;// [Xol. solid, cubic m]\n", +"Vt = 1.7+V;// [Total batch volume, cubic m]\n", +"// Take Z = T\n", +"T = (Vt*4/%pi)^(1/3);// [m]\n", +"// To allow for the adequate free board:\n", +"h = 1.75;// [Vessel height,m]\n", +"// Use a six-blade disk impeller.\n", +"// From Fig. 11.26:\n", +"// dp corresponding to 14 mesh:\n", +"dp = 1.4/1000;// [m]\n", +"TBydi1 = 2;\n", +"Value1 = (Density_p-Density_l)/Density_l;\n", +"// From Fig. 11.26:\n", +"TBydi2 = 4.4;\n", +"TBydiAv = (TBydi1+TBydi2)/2;\n", +"di = T/TBydiAv;// [m]\n", +"fr = 0.6;// [settled volume fraction of solids]\n", +"Vs = V/fr;// [cubic m]\n", +"depth = Vs/((%pi*(T^2))/4);// [m]\n", +"// The depth of settled solid is negligible.\n", +"// Locate the turbine 150mm from the bottom of the tank.\n", +"C = 0.150;// [m]\n", +"\n", +"// Power:\n", +"// Use the sufficient agitator power to lift the solids to 0.6 m above the bottom of the vessel.\n", +"Z_prime = 0.6-C;// [m]\n", +"// The properties of the slurry in 0.6 m above the bottom of the vessel.\n", +"Vm = 0.6*%pi*T^2/4;// [square m]\n", +"phi_Sm = V/Vm;// [vol fraction solid]\n", +"// From Eqn. 11.24:\n", +"Density_m = (phi_Sm*Density_p)+((1-phi_Sm)*Density_l);// [kg/cubic m]\n", +"// From Eqn. 11.25:\n", +"phi_Ss = 0.8;\n", +"viscosity_m = viscosity_l/(1-(phi_Sm/phi_Ss))^1.8;// [kg/m.s]\n", +"g = 9.81;// [m/s^2]\n", +"// From Eqn. 11.23:\n", +"delta_Density = Density_p-Density_l;// [kg/cubic m]\n", +"Vts = g*dp^2*delta_Density/(18*viscosity_l);// [m/s]\n", +"// From Eqn. 11.22:\n", +"n = 1;\n", +"P = (g*n*Density_m*Vm*Vts)*(phi_Sm^(2/3))*(TBydiAv^(1/2))*exp((4.35*Z_prime/T)-0.1);// [W]\n", +"// Assume:\n", +"Po = 5;\n", +"N = (P/(Po*Density_m*di^5))^(1/3);// [r/s]\n", +"// Use:\n", +"N1 = 2;// [r/s]\n", +"Re = di^2*N1*Density_m/viscosity_m;\n", +"// From fig. 6.5: Po = 5\n", +"// Hence our assumption was right.\n", +"printf('Power delivered to the slurry: %f W\n',P*(N1/N)^3);\n", +"printf('Power to the motor will be larger, depending on the efficiency of the motor and speed reducer.\n');\n", +"\n", +"// Mass transfer: \n", +"// From Eqn. 11.28:\n", +"Rep = (dp^(4/3))*(P/Vl)^(1/3)*(Density_l^(2/3)/viscosity_l);\n", +"// From Eqn. 2.44:\n", +"Temp = 298;// [K]\n", +"phi = 1;\n", +"Va = 0.0756;// [Chapter 2 notation]\n", +"Dl = ((117.3*10^(-18))*((phi*Mb)^0.5)*Temp)/(viscosity_l*(Va^(0.6)));\n", +"ScL = viscosity_l/(Density_l*Dl);\n", +"if dp<(2/1000)\n", +" // From Eqn. 11.29:\n", +" ShL = 2+(0.47*Rep^0.62*(1/TBydiAv^0.17)*ScL^0.36);\n", +"else\n", +" // From Eqn. 11.30:\n", +" ShL = 0.222*Rep^(3/4)*ScL^(1/3);\n", +"end\n", +"kL = ShL*Dl/dp;// [m/s]\n", +"apS = (%pi*dp^2)/(%pi*dp^3*Density_p/6);\n", +"apL = apS*16;// [square m/cubic m liquid]\n", +"Ratio = Ss/(Vl*m);\n", +"// From Eqn. 11.40:\n", +"thetha = log((co/c1)/(1+(1/Ratio)-(1/Ratio)*(co/c1)))/((1+(1/Ratio))*kL*apL);\n", +"printf('Contacting Time required: %f min\n',thetha/60);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.5: Continuous_cocurrent_adsorption_and_liquid_and_solid_mass_transfer_resistances.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 11.5\n", +"// Page: 606\n", +"\n", +"printf('Illustration 11.5 - Page: 606\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//*****Data******//\n", +"Vl = 1.1*10^(-4);// [cubic m/s]\n", +"Ss = 0.0012;// [kg/s]\n", +"Density_p = 1120;// [kg/cubic m]\n", +"dp = 8*10^(-4);// [m]\n", +"Ds = 2*10^(-11);// [square m/s]\n", +"Dl = 7.3*10^(-10);// [square m/s]\n", +"m = 0.2;// [(kg Cu2+/cubic m soln)/(kg Cu2+/kg resin)]\n", +"T = 1;// [m]\n", +"//********************//\n", +"\n", +"Z = T;// [m]\n", +"// The particles will be lifted to the top of the vessel.\n", +"Z_prime = 0.5;// [m]\n", +"viscosity_l = 8.94*10^(-4);// [kg/m.s]\n", +"Density_l = 998;// [kg/cubic m]\n", +"delta_Density = Density_p-Density_l;// [kg/cubic m]\n", +"g = 9.80;// [m/square s]\n", +"// From Eqn. 11.23:\n", +"Vts = g*dp^2*delta_Density/(18*viscosity_l);\n", +"Vm = %pi*T^2*Z/4;// [cubic m]\n", +"Vs = Ss/Density_p;// [cubic m/s]\n", +"phi_Sm = Vs/(Vs+Vl);// [vol fraction]\n", +"// From eqn. 11.24:\n", +"Density_m = (phi_Sm*Density_p)+((1-phi_Sm)*Density_l);// [kg/cubic m]\n", +"// From Eqn. 11.22:\n", +"n = 1;\n", +"di = 0.3;// [m]\n", +"P = (g*n*Density_m*Vm*Vts)*(phi_Sm^(2/3))*((T/di)^(1/2))*exp((4.35*Z_prime/T)-0.1);// [W]\n", +"// To estimate the impeller speed:\n", +"// Assume:\n", +"Po = 5;\n", +"N = (P/(Po*Density_m*di^5))^(1/3);// [r/s]\n", +"Re = di^2*N*Density_m/viscosity_l;\n", +"// From fig. 6.5: Assumption of Po was correct.\n", +"printf('Speed of the impeller: %f r/s\n',N);\n", +"vT = (%pi/4)*T^2*Z;// [cubic m]\n", +"vL = vT*(1-phi_Sm);\n", +"// From Eqn. 11.28:\n", +"Rep = (dp^(4/3))*(P/vL)^(1/3)*(Density_l^(2/3)/viscosity_l);\n", +"ScL = viscosity_l/(Density_l*Dl);\n", +"if dp<(2/1000)\n", +" // From Eqn. 11.29:\n", +" ShL = 2+(0.47*Rep^0.62*((di/T)^0.17)*ScL^0.36);\n", +"else\n", +" // From Eqn. 11.30:\n", +" ShL = 0.222*Rep^(3/4)*ScL^(1/3);\n", +"end\n", +"ShL = 130.3;// Value wrong in book\n", +"kL = ShL*Dl/dp;// [m/s]\n", +"// Since the dispersion is uniform throughout the vessel, the residence time for both liquid and solid is same.\n", +"thetha = vL*(1-phi_Sm)/Vl;// [s]\n", +"// From Fig. 11.27:\n", +"abcissa = m*kL*dp/(2*Ds*Density_p);\n", +"Parameter = 2*m*kL*thetha/(dp*Density_p);\n", +"co = 100*Density_l/10^6;// [kg/cubic m]\n", +"EMS = 0.63;\n", +"Xo = 0;\n", +"// From Eqn. 11.44:\n", +"// (1): X1-(EMS/m)*c1 = 0\n", +"// Solute balance:\n", +"// (2): (Ss*X1)+(vL*c1) = (vL*co)+(Xo*Ss)\n", +"a = [1 -(EMS/m);Ss Vl];\n", +"b = [0;((Vl*co)+(Xo*Ss))];\n", +"soln = a\b;\n", +"X1 = soln(1);\n", +"c1 = soln(2);\n", +"printf('Effluent Cu2+ conc. %f ppm\n',c1*10^(6)/Density_l);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.6: Continuous_Countercurrent_Isothermal_Adsorber.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 11.6\n", +"// Page: 616\n", +"\n", +"printf('Illustration 11.6 - Page: 616\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//*****Data*****//\n", +"// a: air b:silica\n", +"Density_a = 1.181;// [kg/cubic m]\n", +"Density_b = 671.2;// [kg/cubic m]\n", +"kSap = 0.965;// [kg H2O/square m s]\n", +"Y1 = 0.005;// [kg H2O/kg dry air]\n", +"Y2 = 0.0001;// [kg H2O/kg dry air]\n", +"Ss = 0.680;// [square m/s]\n", +"Gs = 1.36;// [kg/square m.s]\n", +"X2 = 0;// [kg H2O/kg dry air]\n", +"// Equilibrium function:\n", +"m = 0.0185;\n", +"//************//\n", +"X1 = (Gs*(Y1-Y2)/Ss)+X2;// [kg H2O/kg dry air]\n", +"deff('[Y] = f77(X)','Y = m*X');\n", +"Y2_star = f77(X2);// [kg H2O/kg dry gel]\n", +"Y1_star = f77(X1);// [kg H2O/kg dry gel]\n", +"deltaY = ((Y1-Y1_star)-(Y2-Y2_star))/log((Y1-Y1_star)/(Y2-Y2_star));\n", +"NtoG = (Y1-Y2)/deltaY;\n", +"// If the fixed bed data are to be used for estimating the mass transfer coeffecient for a moving bed of solids\n", +"va = Ss/Density_b;// [m/s]\n", +"vb = Gs/Density_a;// [m/s]\n", +"rel_v = va+vb;// [relative velocity,m/s]\n", +"G_prime = rel_v*Density_a;// [relative mass velocity of air,kg/square m s]\n", +"HtG = Gs/(31.6*G_prime^0.55);// [m]\n", +"HtS = Ss/kSap;// [m]\n", +"// By Eqn. 11.52:\n", +"HtoG = HtG+(m*Gs/Ss)*HtS;// [m]\n", +"Z = NtoG*HtoG;// [m]\n", +"printf('Height of continuous countercurrent isothermal absorber for drying: %f m\n',Z);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.7: Fractionation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 11.7\n", +"// Page: 619\n", +"\n", +"printf('Illustration 11.7 - Page: 619\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//*****Data*****//\n", +"// a: C2H4 b:C3H8\n", +"// The equlibrium curve is plotted in Fig.11.33 (Pg 620)\n", +"// C3H8 is more strongly adsorbed component and composition in the gas and adsorbate are expressed as weight fraction C3H8.\n", +"Ma = 28;// [kg/kmol]\n", +"Mb = 44.1;// [kg/kmol]\n", +"xaF = 0.6;// [mole fraction]\n", +"xbF = 0.4;// [mole fraction]\n", +"xa1 = 0.05;// [mole fraction]\n", +"xa2 = 0.95;// [mole fraction]\n", +"//***************//\n", +"\n", +"xF = xbF*Mb/((xbF*Mb)+(xaF*Ma));// [wt. fraction C3H8]\n", +"xb1 = 1-xa1;// [mole fraction]\n", +"x1 = xb1*Mb/((xb1*Mb)+xa1*Ma);// [wt. fraction C3H8]\n", +"xb2 = 1-xa2;// [mole fraction]\n", +"x2 = xb2*Mb/((xb2*Mb)+(xa2*Ma));// [wt. fraction C3H8]\n", +"// Basis: 100 kg feed gas\n", +"F = 100;// [kg]\n", +"// (1): R2+PE = F [From Eqn. 11.63]\n", +"// (2): (R2*x2)+(PE*x1) = (F*xF) [From Eqn. 11.64]\n", +"// Solving simultaneously:\n", +"a = [1 1;x2 x1];\n", +"b = [F;(F*xF)];\n", +"soln = a\b;\n", +"R2 = soln(1);// [kg]\n", +"PE = soln(2);// [kg]\n", +"// Point F at xF and point E1 at x1 are located on the diagram.\n", +"// From the diagram:\n", +"N1 = 4.57;// [kg carbon/kg adsorbate]\n", +"// The minimum reflux ratio is found as it is for the extraction.\n", +"delta_Em = 5.80;\n", +"Ratio = (delta_Em/N1)-1;// [kg reflux gas/kg product]\n", +"R1_m = Ratio*PE;// [kg]\n", +"E1_m = R1_m+PE;// [kg]\n", +"B_m = N1*E1_m;// [kg carbon/100 kg feed]\n", +"Ratio1 = 2*Ratio;\n", +"// From Eqn. 11.58:\n", +"N_deltaE = (Ratio1+1)*N1;// [kg carbon/kg adsorbate]\n", +"// Point deltaE is located on the diagram:\n", +"R1 = Ratio1*PE;// [kg]\n", +"E1 = R1+PE;// [kg]\n", +"B = N1*E1;// [kg]\n", +"N_deltaR = -(B/R2);// [kg carbon/kg adsorbate]\n", +"// Random lines such as the delta_RK are drawn from detaR, and the intersection of equilibrium curves are projected downward in the manner shown to provide the adsorption section operating curve.\n", +"// Similarly random lines such as delta_EJ are drawn from deltaE, and the intersections are projected downwards to provide the enriching section operating curve.\n", +"// Data = [x x_star]\n", +"Data = [0.967 0.825;0.90 0.710;0.80 0.60;0.70 0.50;0.60 0.43;0.512 0.39;0.40 0.193;0.30 0.090;0.20 0.041;0.0763 0.003];\n", +"Val = zeros(10);\n", +"for i = 1:10\n", +" Val(i) = 1/((Data(i,1))-Data(i,2));\n", +"end\n", +"scf(36);\n", +"plot(Data(:,1),Val);\n", +"xgrid();\n", +"xlabel('x');\n", +"ylabel('1 / (x-x*)');\n", +"title('Graphical Integraion');\n", +"// The area under the curve between x1 & xF, for the enriching section:\n", +"Area1 = 2.65;\n", +"// The area under the curve between xF & x2, for the adsorption section:\n", +"Area2 = 2.67;\n", +"r = Ma/Mb;\n", +"// From Eqn.11.66:\n", +"// For the enriching section:\n", +"NtoG1 = Area1-log((1+(r-1)*x1)/(1+(r-1)*xF));\n", +"// For the adsortion section:\n", +"NtoG2 = Area2-log((1+(r-1)*x1)/(1+(r-1)*xF));\n", +"NtoG = NtoG1+NtoG2;\n", +"printf('Number of transfer units: %f',NtoG);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.8: Unsteady_State_Fixed_Bed_Absorbers.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 11.8\n", +"// Page: 627\n", +"\n", +"printf('Illustration 11.8 - Page: 627\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//******Data******//\n", +"rate = 0.1;// [kg/s]\n", +"conc = 3;// [kg vapour/100cubic m]\n", +"Density_p = 720;// [kg/cubic m]\n", +"Density_bed = 480;// [kg/cubic m]\n", +"capablity = 0.45;// [kg vapour/kg carbon]\n", +"dp = 0.0028;// [m]\n", +"time = 3;// [h]\n", +"//********************//\n", +"\n", +"Vap_adsorbed = time*3600*rate;// [kg]\n", +"C_required = Vap_adsorbed/capablity;\n", +"// Two beds will be needed: one adsorbing and another regenerated.\n", +"totC_required = 2*C_required;// [kg]\n", +"printf('Amount of caron required: %d kg\n',totC_required);\n", +"Vol = (C_required/Density_bed);\n", +"// Assume:\n", +"Z = 0.5;// [m]\n", +"Area = Vol/Z;// [square m]\n", +"// From Eqn. 6.66:\n", +"T = 35;// [OC]\n", +"viscosity_air = 1.82*10^(-5);// [kg/m.s]\n", +"Density_air = (29/22.41)*(273/(T+273));\n", +"e = 1-(Density_bed/Density_p);\n", +"G = rate*(100/conc)*(Density_air/(Area));// [kg/square m.s]\n", +"Re = dp*G/viscosity_air;\n", +"Z = 0.5;// [m]\n", +"deff('[y] = f78(delta_p)','y = ((delta_p/Z)*(e^3*dp*Density_air)/((1-e)*G^2))-(150*(1-e)/Re)-1.75');\n", +"delta_p = fsolve(7,f78);\n", +"printf('The pressure drop is: %f N/square m\n',delta_p);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.9: Time_Required_to_reach_Breakpoint.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 11.9\n", +"// Page: 636\n", +"\n", +"printf('Illustration 11.9 - Page: 636\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//*****Data******//\n", +"Yo = 0.00267;// [kg H2O/kg dry air]\n", +"Yb = 0.0001;// [kg H2O/kg dry air]\n", +"Ye = 0.024;// [kg H2O/kg dry air]\n", +"Z = 0.61;// [m]\n", +"G_prime = 0.1295;// [kg/square m.s]\n", +"//******************//\n", +"\n", +"// The equilicrium data is plotted in Fig. 11.45 (Pg 637)\n", +"// The gel is initially 'dry' and the effluent air initially of so low a humidity asto be substantially dry, so that the operating line passes through the origin of the figure\n", +"// The operating line is then drawn to intersect the equilibrium curve.\n", +"// Data = [Y[kg H2O/kg dry air] Y_star[kg H2O/kg dry air]]\n", +"Data = [0.0001 0.00003;0.0002 0.00007;0.0004 0.00016;0.0006 0.00027;0.0008 0.00041;0.0010 0.00057;0.0012 0.000765;0.0014 0.000995;0.0016 0.00123;0.0018 0.00148;0.0020 0.00175;0.0022 0.00203;0.0024 0.00230];\n", +"Val1 = zeros(13);\n", +"// Val1 = [1/(Y-Y_star)]\n", +"for i = 1:13\n", +" Val1(i) = 1/(Data(i,1)-Data(i,2));\n", +"end\n", +"// Graphical Integration:\n", +"scf(37);\n", +"plot(Data(:,1),Val1);\n", +"xgrid();\n", +"xlabel('Y(kg H20 / kg dry air)');\n", +"ylabel('1 / (Y-Y_star)');\n", +"title('Graphical Integration');\n", +"// Area under The curve between Y = Yb and Y = Y:\n", +"Area = [0 0.100 2.219 2.930 3.487 3.976 4.438 4.915 5.432 6.015 6.728 7.716 9.304];\n", +"// The total number of transfer unit corresponding to adsorption zone:\n", +"NtoG = 9.304;\n", +"Val2 = zeros(13);\n", +"Val3 = zeros(13);\n", +"// Val2 = [(w-wb)/wo]\n", +"// Val3 = [Y/Yo]\n", +"for i = 1:13\n", +" Val2(i) = Area(i)/NtoG;\n", +" Val3(i) = Data(i,1)/Yo;\n", +"end\n", +"// Eqn. 11.74 can be arranged as follows:\n", +"// f = integrate((1-(Y/Yo)),(w-wb)/wa,0,1)\n", +"scf(38);\n", +"plot(Val2,Val3);\n", +"xgrid();\n", +"xlabel('(w-wb) / wo');\n", +"ylabel('Y / Yo');\n", +"title('Break through curve');\n", +"// From area above the curve of scf(2):\n", +"f = 0.530;\n", +"\n", +"Gs = G_prime;// [kg/square m.s]\n", +"// From Illustration: 11.6\n", +"kYap = 31.6*G_prime^0.55;// [kg H2O/cubic m s delta_Y]\n", +"kSap = 0.965;// [kg H2O/cubic m s delta_X]\n", +"// From Fig. 11.48:\n", +"Xt = 0.0858;// [kg H2O/kg gel]\n", +"// From Eqn. 11.76:\n", +"Ss = Yo*Gs/Xt;// [kg/square m.s]\n", +"m = 0.0185;// [average slope of equilibrium curve]\n", +"// From Eqn. 11.51 & Eqn. 11.52:\n", +"HtG = Gs/kYap;// [m]\n", +"HtS = Ss/kSap;// [m]\n", +"HtoG = HtG+(m*Gs/Ss)*HtS;// [m]\n", +"// From Eqn. 11.79:\n", +"Za = NtoG*HtoG;// [m]\n", +"// From Eqn. 11.74:\n", +"Degree = (Z-(f*Za))/Z;\n", +"Density_bed = 671.2;// [Illustration 11.6, kg/cubic m]\n", +"mass_gel = Z*Density_bed;// [kg/square m]\n", +"// At saturation point the gel contins:\n", +"Y1 = mass_gel*Degree*Xt;// [kg H2O/square m cross section]\n", +"// The air introduces:\n", +"Y2 = Gs*Yo;// [kg/square m s]\n", +"printf('Time to reach breakpoint is: %f h\n',(Y1/(Y2*3600)));" + ] + } +], +"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/Mass_Transfer_Operations_by_R_E_Treybal/12-Drying.ipynb b/Mass_Transfer_Operations_by_R_E_Treybal/12-Drying.ipynb new file mode 100644 index 0000000..b0d6106 --- /dev/null +++ b/Mass_Transfer_Operations_by_R_E_Treybal/12-Drying.ipynb @@ -0,0 +1,749 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: Drying" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1: Moisture_Evaporated.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 12.1\n", +"// Page: 660\n", +"\n", +"printf('Illustration 12.1 - Page: 660\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//****Data****//\n", +"F=1000;// [kg]\n", +"Xo=0.8;// [wt. fraction water]\n", +"X1=0.05;// [wt. fraction water]\n", +"//************//\n", +"\n", +"Yo=Xo/(1-Xo);// [kg water/kg dry solid]\n", +"Y1=X1/(1-X1);// [kg water/kg dry solid]\n", +"solid=F*(1-X1);// [kg]\n", +"printf('Moisture to be evaporated: %f kg\n',solid*(Yo-Y1));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.2: Batch_Drying.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 12.2\n", +"// Page: 665\n", +"\n", +"printf('Illustration 12.2 - Page: 665\n\n');\n", +"\n", +"// Solution\n", +"\n", +"// ***Data***//\n", +"Y1 = 0.05;// [kg water/kg dry air]\n", +"Yair = 0.01;// [kg water/kg dry air]\n", +"TempG1 = 95;// [OC]\n", +"width = 1;// [m]\n", +"apart = 100/1000;// [m]\n", +"deep = 38/1000;// [m]\n", +"Rate_evaporation=7.5*10^(-3);// [kg/s]\n", +"//*****************//\n", +"\n", +"// From Table 7.1: (Pg 234)\n", +"vH = (0.00283+(0.00456*Y1))*(TempG1+273);// [cubic m/kg dry air]\n", +"freeArea = width*(apart-deep)*11;// [square m]\n", +"// Rate of air flow at 1:\n", +"Rate_air1 = 3*freeArea/vH;// [square m]\n", +"Y2 = Y1+(Rate_evaporation/Rate_air1);// [kg water/kg dry air]\n", +"// Assuming adiabatic drying:\n", +"// From adiabatic saturation curve, Fig 7.5: (Pg 232)\n", +"TempG2 = 86;// [OC]\n", +"// Overall Water Balance:\n", +"G = Rate_evaporation/(Y1-Yair);// [kg dry air/s]\n", +"// Rate of air flow at 3:\n", +"Rate_air3 = Rate_air1+G;// [kg dry air/s]\n", +"// Rate of air flow at 4:\n", +"Rate_air4 = Rate_air3;// [kg dry air/s]\n", +"// Volumetric Rate through fan:\n", +"Rate_fan = Rate_air3/vH;// [cubic m/s]\n", +"printf('Percentage of air recycled is: %f %%\n',(Rate_air1/Rate_air3)*100);\n", +"printf('\n');\n", +"\n", +"// From Fig. 7.5 (page 232):\n", +"// Saturated enthalpy at adiabatic saturation temp.\n", +"Enthalpy1 = 233;// [kJ/kg dry air]\n", +"Enthalpy2 = 233;// [kJ/kg dry air]\n", +"// Enthalpy of fresh air:\n", +"Enthalpy_air = 50;// [kJ/kg dry air]\n", +"// Assuming complete mixing, by Enthalpy mixing:\n", +"Enthalpy3 = ((Enthalpy1*Rate_air1)+(Enthalpy_air*G))/Rate_air3;// [kJ/kg dry air]\n", +"Enthalpy4 = Enthalpy3;// [kJ/kg dry air]\n", +"// From table 7.1: (Pg 234)\n", +"Temp_dry = ((Enthalpy3*1000)-(2502300*Y1))/(1005+(1884*Y1));\n", +"Power = (Enthalpy2-Enthalpy3)*Rate_air3;// [kW]\n", +"// From Fig. 7.5, (Pg 232)\n", +"DewPoint1 = 40.4;// [OC]\n", +"DewPoint2 = 41.8;// [OC]\n", +"DewPoint3 = 40.4;// [OC]\n", +"DewPoint4 = 40.4;// [OC]\n", +"printf('At Point 1\n')\n", +"printf('Enthalpy of air: %f kJ/kg dry air\n',Enthalpy1);\n", +"printf('Dew Point of air: %f OC\n',DewPoint1);\n", +"printf('\n');\n", +"printf('At Point 2\n')\n", +"printf('Enthalpy of air: %f kJ/kg dry air\n',Enthalpy2);\n", +"printf('Dew Point of air: %f OC\n',DewPoint2);\n", +"printf('\n');\n", +"printf('At Point 3\n')\n", +"printf('Enthalpy of air: %f kJ/kg dry air\n',Enthalpy3);\n", +"printf('Dew Point of air: %f OC\n',DewPoint3);\n", +"printf('\n');\n", +"printf('At Point 4\n')\n", +"printf('Enthalpy of air: %f kJ/kg dry air\n',Enthalpy4);\n", +"printf('Dew Point of air: %f OC\n',DewPoint4);\n", +"printf('\n');\n", +"printf('Dry bulb temparature of air: %f OC\n',Temp_dry);\n", +"printf('Power delivered by heater: %f kW\n',Power);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.3: Time_of_Drying.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 12.3\n", +"// Page: 671\n", +"\n", +"printf('Illustration 12.3 - Page: 671\n\n');\n", +"\n", +"// Solution\n", +"\n", +"// ***Data***//\n", +"SsByA = 40;\n", +"x1 = 0.25;// [moisture fraction]\n", +"x2 = 0.06;// [moisture fraction]\n", +"//***********//\n", +"\n", +"X1 = x1/(1-x1);// [kg moisture/kg dry solid]\n", +"X2 = x2/(1-x2);// [kg moisture/kg dry solid]\n", +"// Fig. 12.10 (Pg 668) indicates that both constant and falling rate periods are involved.\n", +"\n", +"// Constant Rate period:\n", +"// From Fig. 12.10 (Pg 668):\n", +"Xc = 0.200;// [kg moisture/kg dry solid]\n", +"Nc = 0.3*10^(-3);// [kg/square m.s]\n", +"// From Eqn. 12.4:\n", +"thetha1 = SsByA*(X1-Xc)/Nc;// [s]\n", +"\n", +"// Falling Rate Period:\n", +"// From Fig. 12.10 (Pg 668):\n", +"// Data=[x N*10^3]\n", +"Data = [0.2 0.3;0.18 0.266;0.16 0.239;0.14 0.208;0.12 0.180;0.10 0.150;0.09 0.097;0.08 0.070;0.07 0.043;0.064 0.025];\n", +"Val = zeros(10);\n", +"// Val=[(1/N)*10^(-3)]\n", +"for i = 1:10\n", +" Val(i) = 1/Data(i,2);\n", +"end\n", +"scf(40);\n", +"plot(Data(:,1),Val);\n", +"xgrid();\n", +"xlabel('x [kg moisture / kg dry solid]');\n", +"ylabel('10^(-3) / N');\n", +"title('Graphical Integration Falling Rate Period');\n", +"// Area under the curve:\n", +"Area = 1060;\n", +"// From Eqn. 12.3:\n", +"thetha2 = SsByA*Area;// [s]\n", +"thetha = thetha1+thetha2;// [s]\n", +"printf('Total Drying Time: %f h\n',thetha/3600);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.4: Cross_Circulation_Drying.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 12.4\n", +"// Page: 676\n", +"\n", +"printf('Illustration 12.4 - Page: 676\n\n');\n", +"\n", +"// Solution (a)\n", +"\n", +"//***Data***//\n", +"// For rectangular pan:\n", +"l = 0.7;// [m]\n", +"b = 0.7;// [m]\n", +"zS = 0.025;// [m]\n", +"zM = 0.0008;// [m]\n", +"d = 0.1;// [m]\n", +"Y1 = 0.01;// [kg water/kg dry air]\n", +"TempG = 65;// [OC]\n", +"v = 3;// [m/s]\n", +"TempR = 120;// [OC]\n", +"//*************//\n", +"\n", +"// From Table 7.1: (Pg 234)\n", +"vH = (0.00283+(0.00456*Y1))*(TempG+273);// [cubic m/kg dry air]\n", +"Density_G = (1+Y1)/vH;// [kg/cubic m]\n", +"G = v*Density_G;// [kg/square m.s]\n", +"de = 4*d*l/(2*(l+d));// [m]\n", +"// From Eqn. 12.20:\n", +"hc = 5.90*G^0.71/de^0.29;// [W/square m.K]\n", +"// Assume:\n", +"e = 0.94;\n", +"// Estimate:\n", +"TempS = 38;// [OC]\n", +"// From Eqn. 12.14:\n", +"hR = e*5.729*10^(-8)*((273+TempR)^4-(273+TempS)^4)/((273+TempR)-(273+TempS));\n", +"A = l*b;// [square m]\n", +"Am = A;// [square m]\n", +"As = 4*l*zS;// [square m]\n", +"Au = Am+As;// [square m]\n", +"// Thermal Coductivities:\n", +"kM = 45;// [W/m.K]\n", +"kS = 3.5;// [W/m.K]\n", +"// By Eqn. 12.16:\n", +"Uk = 1/(((1/hc)*(A/Au))+((zM/kM)*(A/Au))+((zS/kS)*(A/Am)));// [W/squre m.K]\n", +"// From Table 7.1: (Pg 234)\n", +"Cs = 1005+(1884*Y1);// [kJ/kg]\n", +"// At estimated 38 OC\n", +"lambdaS = 2411.4;// [kJ/kg]\n", +"// From Eqn. 12.18:\n", +"// (Ys-Y1)*lambdaS*10^3/Cs = ((1+(Uk/hc))*(TempG-Temps))+((hR/hC)*(TempR-TempS))\n", +"// On Simplifying:\n", +"// Ys = 0.0864-(10.194*10^(-4)*TempS)\n", +"// The eqn. is solved simultaneously with the saturated humidity curve of the psychometric chart for the air water mixture.\n", +"// From Fig. 12.12: (Pg 677)\n", +"Ys = 0.0460;// [kg water/kg dry air]\n", +"TempS = 39;// [OC]\n", +"// At 39 OC\n", +"lambdaS = 2409.7;// [kJ/kg]\n", +"// From Eqn. 12.17:\n", +"Nc = (((hc+Uk)*(TempG-TempS))+(hR*(TempR-TempS)))/(lambdaS*10^3);// [kg water evaporated/square m.s]\n", +"printf('The Evaporation Rate: %e kg/s\n',Nc*A);\n", +"\n", +"// Solution (b)\n", +"// When no radiation or conduction of heat through the solid occurs, the drying surface assumes wet bulb temparature of the air.\n", +"// From Fig. 12.12 (Pg 677)\n", +"TempS = 28.5;// [OC]\n", +"Ys = 0.025;// [kg water/kg dry air]\n", +"lambdaS = 2435;// [kJ/kg]\n", +"// From Eqn. 12.17:\n", +"Nc = hc*(TempG-TempS)/(lambdaS*10^3);// [kg/aquare m.s]\n", +"printf('The Evaporation Rate: %e kg/s\n',Nc*A);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5: Drying_of_Bound_Moisture.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 12.5\n", +"// Page: 684\n", +"\n", +"printf('Illustration 12.5 - Page: 684\n\n');\n", +"\n", +"// Solution \n", +"\n", +"//***Data***//\n", +"x1 = 0.025;// [moisture fraction]\n", +"x2 = 0.001;// [moisture fraction]\n", +"zS = 0.018;// [m]\n", +"dp = 2*10^(-4);// [m]\n", +"Density_S = 1350;// [kg dry solid/cubic m]\n", +"//***********//\n", +"\n", +"X1 = x1/(1-x1);// [kg water/kg dry air]\n", +"X2 = x2/(1-x2);// [kg water/kg dry air]\n", +"// From Fig 7.5 (Pg 232)\n", +"Y1 = 0.0153;// [kg water/kg dry air]\n", +"Tempas = 24;// [OC]\n", +"Yas = 0.0190;// [kg water/kg dry air]\n", +"Gs = 0.24;// [kg dry air/square m.s]\n", +"Gav = Gs+(Gs*(Y1+Yas)/2);// [kg dry air/square m.s]\n", +"// From Eqn. 12.26:\n", +"Nmax = Gs*(Yas-Y1);// [kg evaporated/square m.s]\n", +"viscosity_air = 1.8*10^(-5);// [kg/m.s]\n", +"Value = integrate('1/(Nmax*(1-exp(-(0.273/dp^0.35)*((dp*Gav/viscosity_air)^0.215)*(Density_S*zS*X)^0.64)))','X',X2,X1);\n", +"// From Eqn. 12.3:\n", +"thetha = Density_S*zS*Value;// [s]\n", +"printf('The time for drying: %f min\n',thetha/60);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.6: Constant_Rate_Period.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 12.6\n", +"// Page: 685\n", +"\n", +"printf('Illustration 12.6 - Page: 685\n\n');\n", +"\n", +"// Solution \n", +"\n", +"//***Data***//\n", +"Y1 = 0.01;// [kg water/kg dry air]\n", +"Gs = 1.1;// [kg dry air/square m.s]\n", +"dia = 13.5/1000;// [m]\n", +"l = 13/1000;// [m]\n", +"zS = 50/1000;// [m]\n", +"Density_S = 600;// [kg dry solid/square m.s]\n", +"a = 280;// [square m/cubic m]\n", +"//************//\n", +"\n", +"// From Fig 7.5 (Pg 232)\n", +"Yas = 0.031;// [kg water/kg dry air]\n", +"Gav = Gs+(Gs*(Y1+Yas)/2);// [kg/square m.s]\n", +"viscosity_air = 1.9*10^(-5);// [kg/m.s]\n", +"Area = (2*%pi*dia^2/4)+(%pi*dia*l);// [square m]\n", +"dp = (Area/%pi)^0.5;// [m]\n", +"// From Table 3.3 (Pg 74)\n", +"Re = dp*Gav/viscosity_air;\n", +"e = 1-(dp*a/6);// [fraction voids]\n", +"jD = (2.06/e)*Re^(-0.575);\n", +"// For air water mixture:\n", +"Sc = 0.6;\n", +"// From Eqn. 12.33:\n", +"kY = jD*Gs/Sc^(2/3);// [kg H2O/square m.s.deltaX]\n", +"// From Eqn. 12.30:\n", +"NtG = kY*a*zS/Gs;\n", +"// From Eqn. 12.25:\n", +"Nmax = Gs*(Yas-Y1);// [kg/square m.s]\n", +"// From Eqn. 12.31:\n", +"N = Nmax*(1-exp(-NtG));// [kg water evaporated/square m.s]\n", +"Y2 = (Yas-Y1)*(N/Nmax)+Y1;// [kg water/kg dry air]\n", +"// From Fig 7.5 (Pg 232)\n", +"Tempas = 33;// [OC]\n", +"// From eqn. 12.2:\n", +"Rate = N/(Density_S*zS);// [kg H2O/(kg dry solid).s]\n", +"printf('Humidity of the exit air: %f kg water/kg dry air\n',Y2);\n", +"printf('Temparature of exit air: %d OC\n',Tempas);\n", +"printf('Rate of Drying: %e kg H2O/(kg dry solid).s\n',Rate);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.7: Material_And_Enthalpy_Balances.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 12.7\n", +"// Page: 700\n", +"\n", +"printf('Illustration 12.7 - Page: 700\n\n');\n", +"\n", +"// Solution \n", +"\n", +"//***Data***//\n", +"x1 = 3.5;// [percent moisture]\n", +"x2 = 0.2;// [percent moisture]\n", +"dia = 1.2;// [m]\n", +"l = 6.7;// [m]\n", +"Rate_prod = 900;// [kg/h]\n", +"y2 = 0.5;// [Humidity]\n", +"TempG2 = 90;// [OC]\n", +"TempG1 = 32;// [OC]\n", +"TempS1 = 25;// [OC]\n", +"TempS2 = 60;// [OC]\n", +"//***********//\n", +"\n", +"X1 = x1/(100-x1);// [kg H2O/kg dry solid]\n", +"X2 = x2/(100-x2);// [kg H2O/kg dry solid]\n", +"Ss = Rate_prod*(1-X2);// [kg dry solid/h]\n", +"Rate_drying = Ss*(X1-X2);// [kg water evaporated/h]\n", +"Y2 = (y2/(1-y2))/100;// [kg water/kg dry air]\n", +"Tempo = 0;// [Base temp,OC]\n", +"// From Table 7.1: (Pg 234)\n", +"// Enthalpy of air entering the drier:\n", +"HG2 = (1005+(1884*Y2))*(TempG2-Tempo)+(2502300*Y2);// [J/kg dry air]\n", +"// For the outlet air:\n", +"// HG1 = (1005+(1884*Y1))*(TempG1-Tempo)+(2502300*Y1); [J/kg dry air]\n", +"// HG1 = (1005*TempG1)+((1884+TempG1)+2502300)*Y1; [J/kg dry air]\n", +"CsNH4 = 1507;// [J/kg.K]\n", +"CsH2O = 4187;// [J/kg.K]\n", +"// From Eqn. 11.45:\n", +"HS2 = CsNH4*(TempS2-Tempo)+(X2*CsH2O*(TempS2-Tempo));// [J/kg dry air]\n", +"HS1 = CsNH4*(TempS1-Tempo)+(X1*CsH2O*(TempS1-Tempo));// [J/kg dry air]\n", +"// The estimated combined natural convection and radiation heat transfer coeffecient from the drier to the surrounding:\n", +"h = 12;// [W/square m.K]\n", +"deltaTemp = ((TempG2-TempS1)+(TempG1-TempS1))/2;// [OC]\n", +"Ae = %pi*dia*l;// [square m]\n", +"Q = h*3600*Ae*deltaTemp;// [kJ/h]\n", +"// Moisture Balance, Eqn. 12.39:\n", +"// Ss*(X1-X2) = Gs(Y1-Y2)\n", +"// (Gs*Y1)-(Gs*Y2) = (Ss*(X1-X2)) ........(1)\n", +"// Enthalapy Balance, Eqn. 12.40:\n", +"// (Ss*HS1)+(Gs*HG2) = (Ss*HG2)+(Gs*HG1)+Q \n", +"// Gs*(HG2-HG1) = (Ss*HS2)+Q-(Ss*HS1)\n", +"// Gs*(HG2-((1005*TempG1)+((1884+TempG1)+2502300)*Y1)) = (Ss*HS2)+Q-(Ss*HS1)\n", +"// Gs*(HG2-(1005*TempG1))-(Gs*Y1*((1884+TempG1)+2502300)) = (Ss*HS2)+Q-(Ss*HS1)........ (2)\n", +"// Solving Simultaneously:\n", +"a = [(HG2-(1005*TempG1)),-((1884+TempG1)+2502300);(-Y2) 1];\n", +"b = [(Ss*HS2)+Q-(Ss*HS1);(Ss*(X1-X2))];\n", +"soln = inv(a)*b;\n", +"Gs = soln(1);// [kg dry air/h]\n", +"Y1 = soln(2)/soln(1);// [kg water/kg dry air]\n", +"// From Fig. 7.5 (Pg 232)\n", +"Enthalpy_air = 56;// [kJ/kg dry air]\n", +"HeatLoad = Gs*(HG2-Enthalpy_air*1000);// [W]\n", +"printf('Air Flow Rate: %f kg/h\n',Gs);\n", +"printf('Moisture content of air: %f kg water/kg dry air \n',Y1);\n", +"printf('Heat Load of drier: %f kW',HeatLoad/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.8: Rate_of_Drying_for_Continuous_Direct_Heat_Driers.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 12.8\n", +"// Page: 705\n", +"\n", +"printf('Illustration 12.8 - Page: 705\n\n');\n", +"\n", +"// Solution \n", +"\n", +"//***Data***//\n", +"x1 = 8;// [percent moisture]\n", +"x2 = 0.5;// [percent moisture]\n", +"Rate_prod = 0.63;// [kg/s]\n", +"// Drying Gas:\n", +"xCO2 = 0.025;// [mole fraction]\n", +"xO2 = 0.147;// [mole fraction]\n", +"xN2 = 0.760;// [mole fraction]\n", +"xH2O = 0.068;// [mole fraction]\n", +"TempG2 = 480;// [OC]\n", +"Cs = 0.837;// [kJ/kg.K]\n", +"Temp1 = 27;// [OC]\n", +"Temp2 = 150;// [OC]\n", +"dp = 200*10^(-6);// [m]\n", +"Density_S = 1300;// [kg/cubic m]\n", +"//***********//\n", +"\n", +"X1 = x1/(100-x1);// [kg water/kg dry solid]\n", +"X2 = x2/(100-x2);// [kg water/kg dry solid]\n", +"Ss = Rate_prod*(1-X2);// [kg dry solid/s]\n", +"Water_evap = Ss*(X1-X2);// [kg/s]\n", +"// Basis: 1 kmol of dry gas:\n", +"xDry = 1-xH2O;// [kmol]\n", +"XCO2 = 44*xCO2;// [kg]\n", +"XO2 = 32*xO2;// [kg]\n", +"XN2 = 28*xN2;// [kg]\n", +"Xdry = XCO2+XO2+XN2;// [kg]\n", +"cCO2 = 45.6;// [kJ/kmol.K]\n", +"cO2 = 29.9;// [kJ/kmol.K]\n", +"cN2 = 29.9;// [kJ/kmol.K]\n", +"cH2O = 4.187;// [kJ/kg.K]\n", +"Mav = Xdry/xDry;// [kg/kmol]\n", +"Y2 = xH2O*18.02/(xDry*Mav);// [kg water/kg dry gas]\n", +"cav = ((xCO2*cCO2)+(xO2*cO2)+(xN2*cN2))/(xDry*Mav);// [kJ/kmol.K]\n", +"// Assume:\n", +"TempG1 = 120;// [OC]\n", +"cDry = 1.005;// [kJ/kmol.K]\n", +"Tempo = 0;// [Base Temp,OC]\n", +"// By Eqn. 7.13:\n", +"HG2 = (cav+(1.97*Y2))*(TempG2-Tempo)+(2502.3*Y2);// [kJ/kg dry air]\n", +"// For the outlet air:\n", +"// HG1 = (1.005+(1.884*Y1))*(TempG1-Tempo)+(2502.3*Y1); [kJ/kg dry air]\n", +"// HG1 = (1.005*TempG1)+((1.884+TempG1)+2502.3)*Y1; [kJ/kg dry air]\n", +"// By Eqn. 11.45:\n", +"HS1 = (Cs*(Temp1-Tempo))+(cH2O*X1*(Temp1-Tempo));// [kJ/kg dry air]\n", +"HS2 = (Cs*(Temp2-Tempo))+(cH2O*X2*(Temp2-Tempo));// [kJ/kg dry air]\n", +"// Q = 0.15*HG2*Gs; [kJ/s]\n", +"// Moisture Balance, Eqn. 12.39:\n", +"// Ss*(X1-X2) = Gs(Y1-Y2)\n", +"// (Gs*Y1)-(Gs*Y2) = (Ss*(X1-X2)) ........(1)\n", +"// Enthalapy Balance, Eqn. 12.40:\n", +"// (Ss*HS1)+(Gs*HG2) = (Ss*HG2)+(Gs*HG1)+Q \n", +"// Gs*(HG2-HG1) = (Ss*HS2)+(0.15*HG2*Gs)-(Ss*HS1)\n", +"// Gs*(HG2-(0.15*HG2)-((1.005*TempG1)+((1.884+TempG1)+2502.3)*Y1)) = (Ss*HS2)+Q-(Ss*HS1)\n", +"// Gs*(HG2-(0.15*HG2)-(1.005*TempG1))-(Gs*Y1*((1.884+TempG1)+2502.3)) = (Ss*HS2)+Q-(Ss*HS1)........ (2)\n", +"a = [(HG2-(0.15*HG2)-(1.005*TempG1)),-((1.884+TempG1)+2502.3);(-Y2) 1];\n", +"b = [(Ss*HS2)-(Ss*HS1);(Ss*(X1-X2))];\n", +"soln = inv(a)*b;\n", +"Gs = soln(1);// [kg dry air/s]\n", +"Y1 = soln(2)/soln(1);// [kg water/kg dry gas]\n", +"HG1 = (1.005+(1.884*Y1))*(TempG1-Tempo)+(2502.3*Y1);// [kJ/kg dry air]\n", +"Q = 0.15*HG2*Gs;// [kJ/s]\n", +"// Assuming the sychrometric ratio of the gas as same as that of air:\n", +"// For Zone II:\n", +"Tempw = 65;// [OC]\n", +"Temp_A = 68;// [OC]\n", +"// At point A, Fig. 12.28 (Pg 702)\n", +"Enthalpy_A = Cs*(Temp_A-Tempo)+(X1*cH2O*(Temp_A-Tempo));// [kJ/kg dry air]\n", +"// At point B, Fig. 12.28 (Pg 702)\n", +"Temp_B = Temp_A;// [OC]\n", +"Enthalpy_B = Cs*(Temp_B-Tempo)+(X2*cH2O*(Temp_B-Tempo));// [kJ/kg dry air]\n", +"\n", +"// Assuming that the heat losses in the three zones are propotional to the number of transfer units in each zone and to the average temp. difference between the gas and the surrounding air.\n", +"// Fractional heat loss in each Zone:\n", +"fr1 = 0.14;\n", +"fr2 = 0.65;\n", +"fr3 = 0.20;\n", +"// Calculations for zone III:\n", +"Cs3 = cav+(1.97*Y2);// [kJ/(kg dry gas).K]\n", +"// Heat balance:\n", +"deff('[y]=f1(TempGD)','y=(Gs*Cs3*(TempG2-TempGD))-(Ss*(HS2-Enthalpy_B)+(fr3*Q))');\n", +"TempGD = fsolve(7,f1);// [OC]\n", +"delta_TempG = Ss*(HS2-Enthalpy_B)/(Gs*Cs3);// [OC]\n", +"delta_TempM = ((TempG2-Temp2)+(TempGD-Temp_A))/2;// [OC]\n", +"NtoG3 = delta_TempG/delta_TempM;\n", +"\n", +"// Calculations for zone I:\n", +"Cs1 = 1.005+(1.884*Y1);// [kJ/(kg dry gas).K]\n", +"// Heat balance:\n", +"deff('[y]=f2(TempGC)','y=(Gs*Cs1*(TempGC-TempG1))-(Ss*(Enthalpy_A-HS1)+(fr1*Q))');\n", +"TempGC = fsolve(7,f2);// [OC]\n", +"delta_TempG = Ss*(Enthalpy_A-HS1)/(Gs*Cs1);// [OC]\n", +"delta_TempM = ((TempGC-Temp_A)+(TempG1-Temp1))/2;// [OC]\n", +"NtoG1 = delta_TempG/delta_TempM;\n", +"\n", +"// Calculations for zone II:\n", +"Cs2 = (cav+Cs1)/2;// [kJ/(kg dry gas).K]\n", +"// Heat balance:\n", +"True_deltaTemp = TempGD-TempGC;// [OC]\n", +"delta_Temp = fr2*Q/(Cs1*Gs);// [Change in temp resulting from heat loss,OC]\n", +"delta_TempG = True_deltaTemp-delta_Temp;// [OC]\n", +"delta_TempM = ((TempGD-Temp_A)-(TempGC-Temp_A))/log((TempGD-Temp_A)/(TempGC-Temp_A));// [OC]\n", +"NtoG2 = delta_TempG/delta_TempM;\n", +"\n", +"NtoG = NtoG1+NtoG2+NtoG3;\n", +"\n", +"// Standard diameters are availaible at 1, 1.2 & 1.4 m.\n", +"Td = 1.2;// [m]\n", +"Area = %pi*Td^2/4;// [square m]\n", +"Gs = Gs/Area;// [kg/square m.s]\n", +"Ss = Ss/Area;// [kg/square m.s]\n", +"Gav = Gs*(1+(Y1+Y2)/2);// [kg/square m.s]\n", +"// From Eqn. 12.47:\n", +"Ua = 237*Gav^0.417/Td;// [W/square m.K]\n", +"HtoG = Gs*Cs2*1000/Ua;// [m]\n", +"Z = NtoG*HtoG;// [m]\n", +"// Assume:\n", +"v = 0.35;// [m/s]\n", +"N = v/(%pi*Td);// [1/s]\n", +"// From Eqn. 12.37:\n", +"K = 0.6085/(Density_S*dp^(1/2));\n", +"// Take:\n", +"phi_D = 0.05;\n", +"// From Eqn. 12.35:\n", +"phi_DO = phi_D-(K*Gav);\n", +"// From Eqn. 12.35:\n", +"s = 0.3344*Ss/(phi_DO*Density_S*N^0.9*Td);// [m/s]\n", +"printf('Height of the drier: %f m\n',Z);\n", +"printf('Drier Slope: %f m/m \n',s);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.9: Drying_at_low_temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 12.9\n", +"// Page: 709\n", +"\n", +"printf('Illustration 12.9 - Page: 709\n\n');\n", +"\n", +"// Solution \n", +"\n", +"//***Data***//\n", +"x1 = 0.46;// [fraction moisture]\n", +"x2 = 0.085;// [fraction moisture]\n", +"Y1 = 0.08;// [kg water/kg dry solid]\n", +"Y2 = 0.03;// [kg water/kg dry solid]\n", +"G = 1.36;// [kg/square m.s]\n", +"//**********//\n", +"\n", +"X1 = x1/(1-x1);// [kg water/kg dry solid]\n", +"X2 = x2/(1-x2);// [kg water/kg dry solid]\n", +"// By water balance:\n", +"SsByGs = (Y1-Y2)/(X1-X2);// [kg dry solid/kg air]\n", +"// Since the initial moisture content of the rayon is less than the critical, drying takes place entirely within zone III.\n", +"// Comparing with Eqn. 12.22:\n", +"// (kY*A/(Ss(Xc-X*)))=0.0137*G^1.47\n", +"// thetha=integrate('(1/(0.0137*G^1.47))*(1/((X-X_star)*(Yw-Y)))','X',X2,X1) // [s]\n", +"X = [X1 0.80 0.60 0.40 0.20 X2];// [kg water/kg dry solid]\n", +"Y = zeros(6);\n", +"for i = 1:6\n", +" // From Eqn. 12.54:\n", +" Y(i) = Y2+((X(i)-X2)*SsByGs);// [kg water/kg dry gas]\n", +"end\n", +"// From Fig. 7.5 (Pg 232):\n", +"Yw = [0.0950 0.0920 0.0790 0.0680 0.0550 0.0490];// [kg water/kg dry gas]\n", +"X_star = zeros(6);\n", +"Val = zeros(6);\n", +"P = 51780;// [vapour pressure, kN/square m]\n", +"for i = 1:6\n", +" // From Eqn 7.8:\n", +" deff('[y]=f(p)','y=Y(i)-((p/(101330-p))*(18/29))');\n", +" p = fsolve(7,f);// [kN/square m]\n", +" RH(i) = (p/P)*100;\n", +" X_star(i) = (RH(i)/4)/(100-(RH(i)/4));// [kg water/kg dry solid]\n", +" Val(i) = 1/((X(i)-X_star(i))*(Yw(i)-Y(i)));\n", +"end\n", +"scf(41);\n", +"plot(X,Val);\n", +"xgrid();\n", +"xlabel('X kg water/kg dry solid');\n", +"ylabel('1/((X-X*)*(Yw-Y))');\n", +"title('Graphical Integration');\n", +"// Area Under the curve:\n", +"Area = 151.6;\n", +"// From Eqn. 12.59:\n", +"thetha = Area/(0.0137*G^1.47);\n", +"printf('Time required for drying: %f h\n',thetha/3600);" + ] + } +], +"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/Mass_Transfer_Operations_by_R_E_Treybal/13-Leaching.ipynb b/Mass_Transfer_Operations_by_R_E_Treybal/13-Leaching.ipynb new file mode 100644 index 0000000..1f5fc0e --- /dev/null +++ b/Mass_Transfer_Operations_by_R_E_Treybal/13-Leaching.ipynb @@ -0,0 +1,356 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13: Leaching" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.1: Unsteady_State_Operation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 13.1\n", +"// Page: 722\n", +"\n", +"printf('Illustration 13.1 - Page: 722\n\n');\n", +"\n", +"// Solution \n", +"\n", +"//***Data***//\n", +"Density_L = 1137;// [kg/cubic m]\n", +"Density_S = 960;// [kg/cubic m]\n", +"Density_p = 1762;// [kg/cubic m]\n", +"A_prime = 16.4;// [square m/kg]\n", +"g = 9.81;// [square m/s]\n", +"sigma = 0.066;// [N/m]\n", +"Z = 3;// [m]\n", +"dia = 1;// [m]\n", +"//**********//\n", +"\n", +"e = 1-(Density_S/Density_p);// [fraction void]\n", +"ap = A_prime*Density_S;// [square m/cubic m]\n", +"// By Eqn. 6.67:\n", +"dp = 6*(1-e)/ap;// [m]\n", +"// By Eqn. 13.6:\n", +"K = dp^2*e^3*g/(150*(1-e)^2);// [cubic m/s]\n", +"check = K*Density_L*g/(g*sigma);\n", +"if check<0.02\n", +" // By Eqn. 13.3: \n", +" So = 0.075;\n", +"else\n", +" // By Eqn. 13.4:\n", +" So = 0.0018/(check)\n", +"end\n", +"// By Eqn. 13.2:\n", +"ZD = (0.275/g)/((K/g)^0.5*(Density_L/sigma));// [m]\n", +"// By Eqn. 13.1:\n", +"Sav = ((Z-ZD)*So/Z)+(ZD/Z);\n", +"// VolRatio=Vol liquid retained/Vol bed.\n", +"VolRatio = Sav*e;\n", +"printf('Vol liquid retained/Vol bed : %f cubic m/cubic m\n',VolRatio);\n", +"Mass = VolRatio*%pi*dia^2*Z*Density_L/4;// [kg]\n", +"// Mass ratio=Mass Liquid/Mass dry solid\n", +"MassRatio = VolRatio*Density_L/(Density_S);\n", +"printf('Mass liquid/Mass dry solid: %f kg/kg\n',MassRatio);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.2: Multistage_Crosscurrent_Leaching.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 13.2\n", +"// Page: 749\n", +"\n", +"printf('Illustration 13.2 - Page: 749\n\n');\n", +"\n", +"// Solution \n", +"\n", +"//***Data***//\n", +"// Eqb=[x(Wt fraction NaOH in clear solution) N(kg CaCO3/kg soln in settled sludge) y*(wt fraction NaOH in soln of settled sludge)]\n", +"// a=H2O b=CaCO3 c=NaOH\n", +"Eqb = [0.090 0.495 0.0917;0.0700 0.525 0.0762;0.0473 0.568 0.0608;0.0330 0.600 0.0452;0.0208 0.620 0.0295;0.01187 0.650 0.0204;0.00710 0.659 0.01435;0.00450 0.666 0.01015];\n", +"deff('[y]=f80(x)','y=0');\n", +"x = 0:0.01:0.12;\n", +"Mass_c = 0.1;// [kg]\n", +"Mass_b = 0.125;// [kg]\n", +"Mass_a = 0.9;// [kg]\n", +"//**************//\n", +"\n", +"scf(42);\n", +"plot(x,f80,Eqb(:,3),Eqb(:,2));\n", +"xgrid();\n", +"xlabel('x,y Wt. fraction of NaOH in loquid');\n", +"ylabel('N kg CaCO3 / kg solution');\n", +"legend('N Vs x','N Vs Y');\n", +"title('Equilibrium Plot')\n", +"// Basis: 1 kg soln in original mixture.\n", +"// As in Fig. 13.27 (Pg 750)\n", +"// The original mixture corresponds to M1:\n", +"NM1 = 0.125;// [kg CaCO3/kg soln]\n", +"yM1 = 0.1;// [kg NaOH/kg solution]\n", +"// The tie line through M1 is drawn. At point E1 representing the settled sludge:\n", +"N1 = 0.47;// [kg CaCO3/kg soln]\n", +"y1 = 0.100;// [kg NaOH/kg solution]\n", +"E1 = Mass_b/N1;// [kg soln. in sludge]\n", +"Ro = 1-E1;// [kg clear soln drawn]\n", +"\n", +"// Stage 2:\n", +"xo = 0;// [kg NaOH/kg soln]\n", +"// By Eqn. 13.11:\n", +"M2 = E1+Ro;// [kg liquid]\n", +"// By Eqn. 13.12:\n", +"NM2 = Mass_b/(E1+Ro);// [kg CaCO3/kg soln]\n", +"// M2 is located on line RoE1. At this value of N, and the tie line through M2 is drawn. At E2:\n", +"N2 = 0.62;// [kg CaCO3/kg soln]\n", +"y2 = 0.035;// [kg NaOH/kg solution]\n", +"E2 = Mass_b/N2;// [kg soln. in sludge]\n", +"Ro = 1-E2;// [kg clear soln drawn]\n", +"\n", +"// Stage 3:\n", +"xo = 0;// [kg NaOH/kg soln]\n", +"// By Eqn. 13.11:\n", +"M3 = E2+Ro;// [kg liquid]\n", +"// By Eqn. 13.12:\n", +"NM3 = Mass_b/M3;// [kg CaCO3/kg soln]\n", +"// Tie line E3R3 is located through M3.At E3:\n", +"N3 = 0.662;// [kg CaCO3/kg soln]\n", +"y3 = 0.012;// [kg NaOH/kg solution]\n", +"// By Eqn. 13.8:\n", +"E3 = Mass_b/N3;// [kg soln. in sludge]\n", +"printf('The fraction of original NaOH in the slurry: %f \n',E3*y3/Mass_c);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.3: Multistage_Countercurrent_Leaching.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 13.3\n", +"// Page: 754\n", +"\n", +"printf('Illustration 13.3 - Page: 754\n\n');\n", +"\n", +"// Solution (a)\n", +"\n", +"//***Data***//\n", +"// a=H2O b=CaCO3 c=NaOH \n", +"mass_c = 400;// [kg/h]\n", +"x1 = 0.1;// [wt fraction NaOH in overflow]\n", +"//**********//\n", +"\n", +"Mb = 100;// [kg/kmol]\n", +"Mc = 40;// [kg/kmol]\n", +"rate_c = mass_c/Mc;// [kmol/h]\n", +"rate_b = rate_c/2;// [kmol/h]\n", +"mass_b = rate_b*Mb;// [kg/h]\n", +"// After trial calculations:\n", +"y3 = 0.01;// [kg NaOH/kg solution]\n", +"N3 = 0.666;// [kg CaCO3/kg solution]\n", +"E3 = mass_b/N3;// [kg/h]\n", +"lost_c = E3*y3;// [kg/h]\n", +"sludge_a = E3-lost_c;// [kg/h]\n", +"overflow_c = mass_c-lost_c;// [kg NaOH/kg solution]\n", +"R1 = overflow_c/x1;// [kg overflow/h]\n", +"R1_a = R1-overflow_c;// [kg/h]\n", +"RNpPlus1 = R1_a+sludge_a;// [kg/h]\n", +"// For purpose of calculation, it may be imagined that agitators are not present in the flowsheet and the first thickner is fed with the dry mixture of the reaction products, CaCO3 and NaOH, together with overflow from the second thickner.\n", +"F = 400;// [kg NaOH/h]\n", +"NF = mass_b/F;// [kg CaCO3/kg NaOH]\n", +"yF = 1;// [wt fraction NaOH in dry solid, CaCO3 free basis]\n", +"// Points R1, E3, RNpPlus1 and F are plotted as in Fig 13.30 (Pg 755) and locate the point deltaR at the intersection of lines FR1 and E3RNpPlus1 extended. The coordinates of point deltaR are NdeltaR=-0.1419, ydeltaR=-0.00213. Further computation must be done on enlarged section of the equilibrium diagram (Fig 13.31 (Pg 755)). Point deltaR is plotted and the stages stepped off in a usual manner. The construction are projected on the xy diagram. Three stages produce a value: y3=0.001\n", +"printf('The NaOH lost in sludge: %f%%\n',(lost_c/mass_c)*100);\n", +"printf('\n');\n", +"\n", +"// Solution (b)\n", +"//*** Data***//\n", +"lost_c = 0.001*mass_c;// [kg/h]\n", +"//***********//\n", +"\n", +"NNp_by_yNp = mass_b/lost_c;// [kg CaCO3/kg NaOH in final sludge]\n", +"// In order to determine the liquid content of the final sludge:\n", +"// Eqb=[N y_star]\n", +"Eqb = [0.659 0.01435;0.666 0.01015;0.677 0.002;0.679 0.001;0.680 0.0005];\n", +"N_by_ystar = zeros(5);\n", +"for i = 1:5\n", +" N_by_ystar(i) = Eqb(i,1)/(Eqb(i,2));\n", +"end\n", +"scf(43);\n", +"plot(Eqb(:,1),Eqb(:,2));\n", +"xgrid();\n", +"xlabel('x Wt fraction of NaOH');\n", +"ylabel('N kg CaCO3 / kg solution');\n", +"title('Equilibrium plot')\n", +"// By Interpolation, for N_by_ystar=NNp_by_yNp:\n", +"NNp = interpln([(N_by_ystar)';Eqb(:,1)'],NNp_by_yNp);// [kg CaCO3/kg soln]\n", +"yNp = NNp/NNp_by_yNp;// [wt fraction NaOH in the liquid of the final sludge]\n", +"ENp = mass_b/NNp;// [kg/h]\n", +"ENp_a = ENp-lost_c;// [kg/h]\n", +"overflow_c = mass_c-lost_c;// [kg/h]\n", +"R1 = overflow_c/0.1;// [kg/h]\n", +"R1_a = R1-overflow_c;// [kg/h]\n", +"RNpPlus1 = R1_a+sludge_a;// [kg/h]\n", +"// On the operating diagram (Fig 13.32 (Pg 757)) point deltaR is located and stages were constructed. \n", +"// Beyond the fourth stage, the ratio of the overflow to the liquid in the sludge become substantially constant.\n", +"R_by_E = RNpPlus1/ENp;\n", +"// This is the initial slope of the operating line on the lower part of the figure.\n", +"// From Illustration 13.2:\n", +"m = 0.01015/0.00450;\n", +"Value1 = R_by_E/m;\n", +"xNpPlus1 = 0;// [kg NaOH/kg solution]\n", +"y4 = 0.007;// [wt fraction NaOH in the liquid]\n", +"Value2 = (yNp-(m*xNpPlus1))/(y4-(m*xNpPlus1));\n", +"// From Fig 5.16: (Pg 129):\n", +"// An Additional 2.3 stages beyond 4 are computed graphically are required.\n", +"// An additional two stage will make yNp/y4=0.099:\n", +"yNp = 0.099*y4;// [wt fraction NaOH in the liquid]\n", +"printf('%f kg NaOH was lost if 6 thickners were used\n',yNp*ENp);\n", +"// An additional three stage will make yNp/y4=0.0365:\n", +"yNp = 0.0365*y4;// [wt fraction NaOH in the liquid]\n", +"printf('%f kg NaOH was lost if 7 thickners were used\n',yNp*ENp);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.4: Multistage_Countercurrent_Leaching.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 13.4\n", +"// Page: 758\n", +"\n", +"printf('Illustration 13.4 - Page: 758\n\n');\n", +"\n", +"// Solution\n", +"\n", +"//***Data***//\n", +"// a:oil b:soyabean c:hexane\n", +"// Data=[100y*(Wt % oil in soln) 1/N(kg soln retained/kg insoluble solid)]\n", +"Data = [0 0.58;20 0.66;30 0.70];\n", +"// Soyabean feed:\n", +"percent_b = 20;// [soluble]\n", +"yF = 1;// [mass fraction oil,solid free basis]\n", +"// Solvent:\n", +"RNpPlus1 = 1;// [hexane,kg]\n", +"xNpPlus1 = 0;// [mass fraction oil]\n", +"// Leached Solids:\n", +"leached = 0.005;// [fraction of oil to be leached]\n", +"// Miscella:\n", +"percent_miscella = 10;// [percent of insoluble solid]\n", +"//**********//\n", +"\n", +"N = zeros(3);\n", +"ystar_By_N = zeros(3);\n", +"for i = 1:3\n", +" N(i) = 1/Data(i,2);// [kg insoluble solid/kg soln retained]\n", +" ystar_By_N(i) = Data(i,1)/(100*N(i));// [kg oil/kg insoluble solid]\n", +"end\n", +"// Basis: 1 kg flakes introduced\n", +"// Soyabean feed:\n", +"mass_b = 1-(percent_b/100);// [insoluble,kg]\n", +"F = 1-mass_b;// [kg]\n", +"NF = mass_b/F;// [kg insoluble solid/kg oil]\n", +"\n", +"// Leached Solids:\n", +"Ratio = leached/(1-leached);// [kg oil/kg insoluble solid]\n", +"// By interpolation:\n", +"Np = interpln([ystar_By_N';N'],Ratio);\n", +"miscella_b = (percent_miscella/100)*mass_b;// [Insoluble solid lost to miscella,kg]\n", +"leached_b = (1-(percent_miscella/100))*mass_b;// [Insoluble solid in miscella,kg]\n", +"ENp = leached_b/Np;// [kg soln retained]\n", +"retained_a = Ratio*leached_b;// [oil retained,kg]\n", +"retained_c = ENp-retained_a;// [Hexane retained,kg]\n", +"yNp = retained_a/ENp;// [mass fraction of oil in retained liquid]\n", +"\n", +"// Miscella:\n", +"mass_c = 1-retained_c;// [kg]\n", +"mass_a = F-retained_a;// [kg]\n", +"R1 = mass_c+mass_a;// [clear miscella,kg]\n", +"x1 = mass_a/R1;// [mass fraction of oil in the liquid]\n", +"NR1 = miscella_b/R1;// [kg insoluble solid/kg soln]\n", +"\n", +"// The operating diagram is shown in Fig 13.33 (Pg 759).\n", +"// Point R1 represents the cloudy miscella and is therefore is displaced from the axis of he graph at NR1. Point deltaR is located as usual and the stages determined with the N=0 axis for all the stages but the first.\n", +"printf('Between 4 and 5 stages are required\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/Mass_Transfer_Operations_by_R_E_Treybal/2-Molecular_Diffusion_In_Fluids.ipynb b/Mass_Transfer_Operations_by_R_E_Treybal/2-Molecular_Diffusion_In_Fluids.ipynb new file mode 100644 index 0000000..8319d86 --- /dev/null +++ b/Mass_Transfer_Operations_by_R_E_Treybal/2-Molecular_Diffusion_In_Fluids.ipynb @@ -0,0 +1,314 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Molecular Diffusion In Fluids" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: Steady_State_equimolal_counterdiffusion.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 2.1\n", +"// Page: 30\n", +"\n", +"printf('Illustration 2.1 - Page 30\n\n');\n", +"\n", +"// solution\n", +"\n", +"//***Data***//\n", +"// a = O2 & b = CO\n", +"Dab = 1.87*10^(-5);//[square m/s]\n", +"Pt = 10^5;//[N/square m]\n", +"z = 0.002;//[m]\n", +"R = 8314;//[Nm/kmol]\n", +"T = 273;//[K]\n", +"Pa1 = 13*10^(3);//[N/square m]\n", +"Pb1 = 10^(5)-13*10^(3);//[N/square m]\n", +"Pa2 = 6500;//[N/square m]\n", +"Pb2 = 10^(5)-6500;//[N/square m]\n", +"//********//\n", +"\n", +"// Calculation from Eqn. 2.30\n", +"Pbm = (Pb1-Pb2)/log(Pb1/Pb2);//[N/square m]\n", +"Na = Dab*Pt*(Pa1-Pa2)/(R*T*z*Pbm);//[kmol/square m.s]\n", +"printf('Rate of diffusion of oxygen is %e kmol/square m.sec',Na);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2: Steady_state_diffusion_in_multicomponent_mixtures.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration2.2\n", +"// Page: 30\n", +"\n", +"printf('Illustration 2.2 - Page: 30\n\n');\n", +"\n", +"// solution\n", +"\n", +"//***Data***//\n", +"Pt = 10^5;//[N/square m]\n", +"z = 0.002;//[m]\n", +"R = 8314;//[Nm/kmol]\n", +"T = 273;//[K]\n", +"//a = O2 b = CH4 c = H2\n", +"Pa1 = 13*10^(3);//[N/square m]\n", +"Pb1 = 10^(5)-13*10^(3);//[N/square m]\n", +"Pa2 = 6500;//[N/square m]\n", +"Pb2 = 10^(5)-6500;//[N/square m]\n", +"Dac = 6.99*10^(-5);//[N/square m]\n", +"Dab = 1.86*10^(-5);//[N/square m]\n", +"//*******//\n", +"\n", +"// Calculation from Eqn. 2.30\n", +"Pbm = (Pb1-Pb2)/log(Pb1/Pb2);//[N/square m]\n", +"Yb_prime = 2/(2+1);\n", +"Yc_prime = 1-Yb_prime;\n", +"Dam = 1/((Yb_prime/Dab)+(Yc_prime/Dac));//[square m.s]\n", +"Na = Dam*(Pa1-Pa2)*Pt/(R*T*z*Pbm);//[kmol/square m.s]\n", +"printf('Rate of diffusion is %e kmol/square m.sec',Na);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: Diffusivity_of_gases.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration2.3\n", +"// Page: 32\n", +"\n", +"printf('Illustration 2.3 - Page: 32\n\n');\n", +"\n", +"// solution\n", +"\n", +"//***Data***//\n", +"// a = C2H5OH b = air\n", +"Pt = 101.3*10^(3);//[N/square m]\n", +"T = 273;//[K]\n", +"//********//\n", +"\n", +"Ma = 46.07;// [kg/kmol]\n", +"Mb = 29;// [kg/kmol]\n", +"//For air from Table 2.2 (Pg 33)\n", +"Eb_by_k = 78.6;// [K]\n", +"rb = 0.3711; // [nm]\n", +"// For C2H5OH using Eqn. 2.38 & 2.39\n", +"// From Table 2.3\n", +"Va = (2*0.0148)+(6*0.0037)+(0.0074);// [cubic m/kmol]\n", +"Tba = 351.4;// [K]\n", +"ra = 1.18*(Va^(1/3));//[nm]\n", +"Ea_by_k = 1.21*Tba;// [K]\n", +"rab = (ra+rb)/2;// [nm]\n", +"Eab_by_k = sqrt(Ea_by_k*Eb_by_k);// [K]\n", +"Collision_value = T/Eab_by_k;\n", +"//From Fig. 2.5 (Page: 32) f(collision value)\n", +"Collision_func = 0.595;\n", +"Dab = (10^(-4)*(1.084-(0.249*sqrt((1/Ma)+(1/Mb))))*T^(3/2)*sqrt((1/Ma)+(1/Mb)))/(Pt*(rab^2)*Collision_func);//[square m/s]\n", +"printf('The diffusivity of ethanol through air at 1 atm. & 0C is %e square m/s\n',Dab);\n", +"printf('The observed value (Table 2.1) is 1.02*10^(-5) square m/s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: Molecular_Diffusion_in_Liquids.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 2.4\n", +"// Page: 34\n", +"\n", +"printf('Illustration 2.4 - Page: 34\n\n');\n", +"\n", +"// solution\n", +"\n", +"//***Data****//\n", +"// a = acetic acid b = H2O\n", +"z = 0.001;// [m]\n", +"Dab = 0.95*10^(-9);//[square m/s]\n", +"//************//\n", +"\n", +"Ma = 60.03;// [kg/kmol]\n", +"Mb = 18.02;// [kg/kmol]\n", +"//At 17 C & 9% solution\n", +"density1 = 1012; //[kg/cubic m]\n", +"Xa1 = (0.09/Ma)/((0.09/Ma)+(0.91/Mb));\n", +"Xb1 = 1-Xa1;\n", +"M1 = 1/((0.09/Ma)+(0.91/Mb));// [kg/kmol]\n", +"//At 17 C & 3% solution\n", +"density2 = 1003.2; //[kg/cubic m]\n", +"Xa2 = (0.03/Ma)/((0.03/Ma)+(0.97/Mb));\n", +"Xb2 = 1-Xa2;\n", +"M2 = 1/((0.03/Ma)+(0.97/Mb));// [kg/kmol]\n", +"avg_density_by_M = ((density1/M1)+(density2/M2))/2;//[kmol/cubic m]\n", +"// From Eqn. 2.42\n", +"Xbm = (Xb2-Xb1)/log(Xb2/Xb1);\n", +"// From Eqn. 2.41\n", +"Na = Dab*(avg_density_by_M)*(Xa1-Xa2)/(Xbm*z); //[square m/s]\n", +"printf('The rate of diffusion is %e square m/s',Na);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: Diffusivity_of_Liquids.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 2.5\n", +"// Page: 37\n", +"\n", +"printf('Illustration 2.5 - Page: 37\n\n');\n", +"\n", +"// solution\n", +"\n", +"//***Data****//\n", +"// a = mannitol b = H2O\n", +"T = 293; // [K]\n", +"//*****//\n", +"\n", +"Mb = 18.02;// [kg/kmol]\n", +"// From Table 2.3 (Pg 33)\n", +"Va = (0.0148*6)+(0.0037*14)+(0.0074*6); // [cubic m/kmol]\n", +"viscosity = 0.001005; // [kg/m.s]\n", +"association_factor = 2.26; // [water as a solvent]\n", +"Dab = (117.3*10^(-18))*((association_factor*Mb)^0.5)*T/(viscosity*Va^0.6); // [square m/s]\n", +"printf('Diffusivity of mannitol is %e square m/s\n',Dab);\n", +"printf('Observed value is 0.56*10^(-9) square m/s');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6: Diffusivity_of_Liquids.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 2.6\n", +"// Page: 37\n", +"\n", +"printf('Illustration 2.6 - Page 37\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"T2 = 70+273;// [K]\n", +"//**********//\n", +"\n", +"// a = mannitol b = H2O\n", +"// From Illustration 2.5 at 20 C\n", +"viscosity1 = 1.005*10^(-3); // [kg/m.s]\n", +"Dab1 = 0.56*10^(-9); //[m^2/s]\n", +"T1 = 273+20;// [K]\n", +"// At 70 C\n", +"viscosity2 = 0.4061*10^(-3); // kg/m.s\n", +"// Eqn. 2.44 indicates Dab*viscocity/T = constnt\n", +"Dab2 = Dab1*(T2)*(viscosity1)/(T1*viscosity2);// [square m/s]\n", +"printf('Diffusivity of mannitol at 70 OC is %e square/s\n',Dab2);\n", +"printf('Observed value at 70 OC is 1.56*10^(-9) square m/s');" + ] + } +], +"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/Mass_Transfer_Operations_by_R_E_Treybal/3-Mass_Transfer_Coeffecients.ipynb b/Mass_Transfer_Operations_by_R_E_Treybal/3-Mass_Transfer_Coeffecients.ipynb new file mode 100644 index 0000000..04d9756 --- /dev/null +++ b/Mass_Transfer_Operations_by_R_E_Treybal/3-Mass_Transfer_Coeffecients.ipynb @@ -0,0 +1,537 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Mass Transfer Coeffecients" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1: Mass_Transfer_Coeffecient_in_Laminar_Flow.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 3.1\n", +"// Page: 53\n", +"\n", +"printf('Illustration 3.1 - Page: 53\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data*****//\n", +"// a = CO2 b = H2O\n", +"Ca0 = 0;//[kmol/cubic m]\n", +"Cai = 0.0336;//[kmol/cubic m]\n", +"Dab = 1.96*10^(-9);// [square m/s]\n", +"//*******//\n", +"\n", +"density = 998;// [kg/cubic m]\n", +"viscosity = 8.94*10^(-4);//[kg/m.s]\n", +"rate = 0.05;//[kg/m.s] mass flow rate of liquid\n", +"L = 1;//[m]\n", +"g = 9.81;//[m/square s]\n", +"// From Eqn. 3.10\n", +"del = ((3*viscosity*rate)/((density^2)*g))^(1/3);// [m]\n", +"Re = 4*rate/viscosity;\n", +"// Flow comes out to be laminar\n", +"// From Eqn. 3.19\n", +"Kl_avg = ((6*Dab*rate)/(3.141*density*del*L))^(1/2);//[kmol/square m.s.(kmol/cubic m)]\n", +"bulk_avg_velocity = rate/(density*del);//[m/s]\n", +"// At the top: Cai-Ca = Cai_Ca0 = Cai\n", +"//At the bottom: Cai-Cal\n", +"// From Eqn. 3.21 & 3.22\n", +"Cal = Cai*(1-(1/(exp(Kl_avg/(bulk_avg_velocity*del)))));// [kmol/cubic m]\n", +"rate_absorption = bulk_avg_velocity*del*(Cal-Ca0);// [kmol/s].(m of width)\n", +"printf('The rate of absorption is %e',rate_absorption);\n", +"// The actual value may be substantially larger." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: Eddy_Diffusio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 3.2\n", +"// Page: 56\n", +"\n", +"printf('Illustration 3.2 - Page: 56\n\n');\n", +"\n", +"// solution\n", +"\n", +"//***Data****//\n", +"d = 0.025;// [m]\n", +"avg_velocity = 3;// [m/s]\n", +"viscosity = 8.937*10^(-4);// [kg/m.s]\n", +"density = 997;// [kg/m^3]\n", +"//*********//\n", +"\n", +"kinematic_viscosity = viscosity/density;// [square m/s]\n", +"Re = d*avg_velocity*density/viscosity;\n", +"// Reynold's number comes out to be 83670\n", +"// At this Reynold's number fanning factor = 0.0047\n", +"f = 0.0047;\n", +"L = 1;// [m]\n", +"press_drop = 2*density*f*L*(avg_velocity^2)/(d);// [N/square m]\n", +"P = 3.141*(d^2)*avg_velocity*press_drop/4;// [N.m/s] for 1m pipe\n", +"m = 3.141*(d^2)*L*density/4;\n", +"// From Eqn. 3.24\n", +"Ld = ((kinematic_viscosity^3)*m/P)^(1/4);// [m]\n", +"// From Eqn. 3.25\n", +"Ud = (kinematic_viscosity*P/m)^(1/4);// [m/s]\n", +"printf('Velocity of small eddies is %f m/s\n',Ud);\n", +"printf('Length scale of small eddies is %e m',Ld);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: Mass_Heat_And_Momentum_Transfer_Analogies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 3.3\n", +"// Page: 69\n", +"\n", +"printf('Illustration 3.3 - Page: 69\n\n');\n", +"\n", +"// solution\n", +"\n", +"// Heat transfer analog to Eqn. 3.12\n", +"// The Eqn. remains the same with the dimensionless conc. ratio replaced by ((tl-to)/(ti-to))\n", +"\n", +"// The dimensionless group:\n", +"// eta = 2*Dab*L/(3*del^2*velocity);\n", +"// eta = (2/3)*(Dab/(del*velocity))*(L/del);\n", +"// Ped = Peclet no. for mass transfer\n", +"// eta = (2/3)*(1/Ped)*(L/del);\n", +"\n", +"// For heat transfer is replaced by\n", +"// Peh = Peclet no. for heat transfer\n", +"// eta = (2/3)*(1/Peh)*(L/del);\n", +"// eta = (2/3)*(alpha/(del*velocity))*(L/del);\n", +"// eta = (2*alpha*L)/(3*del^2*velocity);\n", +"printf('Heat transfer analog to Eqn. 3.21 is eta = (2*alpha*L)/(3*del^2*velocity)');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: Mass_Heat_And_Momentum_Transfer_Analogies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 3.4\n", +"// Page: 69\n", +"\n", +"printf('Illustration 3.4 - Page: 69\n\n');\n", +"\n", +"// solution\n", +"\n", +"//***Data****//\n", +"// a = UF6 b = air\n", +"// The average heat transfer coefficient: Nu_avg = 0.43+0.532(Re^0.5)(Pr^0.31)\n", +"// The analogus expression for mass transfer coefficient: Sh_avg = 0.43+0.532(Re^0.5)(Sc^0.31)\n", +"d = 0.006;// [m]\n", +"velocity = 3;// [m/s]\n", +"surf_temp = 43;// [C]\n", +"bulk_temp = 60;// [C]\n", +"avg_temp = (surf_temp+bulk_temp)/2; //[C]\n", +"density = 4.10;// [kg/cubic m]\n", +"viscosity = 2.7*10^(-5);// [kg/m.s]\n", +"Dab = 9.04*10^(-6);// [square m/s]\n", +"press = 53.32;// [kN/square m]\n", +"tot_press = 101.33;// [kN/square m]\n", +"//******//\n", +"\n", +"avg_press = press/2; // [kN/square m]\n", +"Xa = avg_press/tot_press;\n", +"Xb = 1-Xa;\n", +"Re = d*velocity*density/viscosity;\n", +"Sc = viscosity/(density*Dab);\n", +"Sh_avg = 0.43+(0.532*(2733^0.5)*(0.728^0.5));\n", +"c = 273.2/(22.41*(273.2+avg_temp));// [kmol/cubic m]\n", +"F_avg = Sh_avg*c*Dab/d;//[kmol/cubic m]\n", +"Nb = 0;\n", +"Ca1_by_C = press/tot_press;\n", +"Ca2_by_C = 0;\n", +"Flux_a = 1;\n", +"// Using Eqn. 3.1\n", +"Na = Flux_a*F_avg*log((Flux_a-Ca2_by_C)/(Flux_a-Ca1_by_C));//[kmol UF6/square m.s]\n", +"printf('Rate of sublimation is %e kmol UF6/square m.s',Na);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5: Flux_Variation_with_Concentration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 3.5\n", +"// Page: 73\n", +"\n", +"printf('Illustration 3.5 - Page: 73\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"velocity = 15;// [m/s]\n", +"G = 21.3;// [kg/square m.s]\n", +"//******//\n", +"\n", +"// Since the experimental data do not include the effects of changing Prandtl number.\n", +"\n", +"// Jh = (h/(Cp*density*viscosity)) = (h/Cp*G)*(Pr^(2/3)) = Shi(Re);\n", +"\n", +"// Shi(Re) must be compatible with 21.3*(G^0.6);\n", +"// Let Shi(Re) = b*(Re^n);\n", +"// Re = (l*G)/viscosity;\n", +"\n", +"// h = (Cp*G/(Pr^(2/3)))*b*(Re^n);\n", +"// h = (Cp*G/(Pr^(2/3)))*b*((l*b/viscosity)^n) = 21.3*(G^0.6);\n", +"\n", +"n = 0.6-1;\n", +"// b = 21.3*((Pr^(2/3))/Cp)*((l/viscosity)^(-n));\n", +"\n", +"// Using data for air at 38 C & 1 std atm.\n", +"Cp1 = 1002;// [kJ/kg.K]\n", +"viscosity1 = 1.85*10^(-5);//[kg/m.s]\n", +"k1 = 0.0273;//[W/m.K]\n", +"Pr1 = (Cp1*viscosity1)/k1;\n", +"b_prime = 21.3*(Pr1^(2/3)/Cp1)*((1/viscosity1)^0.4);\n", +"// b = b_prime*l^(0.4);\n", +"// Jh = (h/(Cp*G))*Pr^(2/3) = b_prime*((l/Re)^(0.4)) = Shi(Re);\n", +"\n", +"// The heat mass transfer analogy will be used to estimate the mass transfer coefficient. (Jd = Jh)\n", +"\n", +"// Jd = (KG*Pbm*Mav*Sc^(2/3))/(density*viscosity) = Shi(Re) = b_prime*((l/Re)^0.4);\n", +"\n", +"// KG*Pbm = F = (b_prime*density*viscosity)/(Re^0.4*Mav*Sc^(2/3)) = (b_prime*(density*velocity)^0.6*(viscosity^0.4))/(Mav*Sc^(2/3));\n", +"\n", +"// For H2-H20, 38 C, 1std atm\n", +"viscosity2 = 9*10^(-6);// [kg/m.s]\n", +"density2 = 0.0794;// [kg/cubic m]\n", +"Dab = 7.75*10^(-5);// [square m/s]\n", +"Sc = viscosity2/(density2*Dab);\n", +"\n", +"// Assuming desity, Molecular weight and viscosity of the gas are essentially those of H2\n", +"\n", +"Mav = 2.02;// [kg/kmol]\n", +"F = (b_prime*(density2*velocity)^0.6*(viscosity2^0.4))/(Mav*Sc^(2/3));// [kmol/square m.s]\n", +"printf('The required mass transfer: %f kmol/square m.s',F);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6: Calculation_of_Bed_depth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 3.6\n", +"// Page: 77\n", +"\n", +"printf('Illustration 3.6 - Page: 77\n\n');\n", +"\n", +"// solution\n", +"\n", +"//***Data***//\n", +"Dp = 0.0125;// [m]\n", +"viscosity = 2.4*10^(-5);// [kg/m.s]\n", +"Sc = 2;\n", +"E = 0.3;\n", +"Go = (2*10^(-3))/0.1;// molar superficial mass velocity [kmol/square m.s]\n", +"//********//\n", +"\n", +"// a = CO b = Ni(CO)4\n", +"// Nb = -(Na/4);\n", +"Flux_a = 4/3;\n", +"Ca2_by_C = 0;// At the metal interface\n", +"// Ca1_by_C = Ya //mole fraction of CO in the bulk\n", +"\n", +"// Eqn. 3.1 becomes: Na = (4/3)*F*log((4/3)/((4/3)-Ya));\n", +"\n", +"// Let G = kmol gas/(square m bed cross section).s\n", +"// a = specific metal surface\n", +"// z = depth \n", +"// Therefore, Na = -(diff(Ya*G))/(a*diff(z));// [kmol/((square m metal surface).s)];\n", +"// For each kmol of CO consumed, (1/4)kmol Ni(CO)4 forms, representing a loss of (3/4) kmol per kmol of CO consumed.\n", +"// The CO consumed through bed depth dz is therefore (Go-G)(4/3) kmol;\n", +"// Ya = (Go-(Go-G)*(4/3))/G;\n", +"// G = Go/(4-(3*Ya));\n", +"// diff(YaG) = ((4*Go)/(4-3*Ya)^2)*diff(Ya);\n", +"\n", +"// Substituting in Eqn. 3.64\n", +"// -(4*Go/((4-3*Ya)^2*a))*(diff(Ya)/diff(z)) = (4/3)*F*log(4/(4-3*Ya));\n", +"\n", +"// At depth z:\n", +"// Mass velocity of CO = (Go-(Go-G)/(4/3))*28;\n", +"// Mass velocity of Ni(CO)4 = ((Go-G)*(1/3))*170.7;\n", +"// G_prime = 47.6*Go-19.6G; // total mass velocity [kg/square m.s]\n", +"// Substituting G leads to:\n", +"// G_prime = Go*(47.6-19.6*(4-3*Ya));// [kg/m.s]\n", +"// Re = (Dp*G')/viscosity\n", +"\n", +"// With Go = 0.002 kmol/square m.s & Ya in the range 1-0.005, the range of Re is 292-444;\n", +"// From table 3.3:\n", +"// Jd = (F/G)*(Sc^(2/3)) = (2.06/E)*Re^(-0.575);\n", +"// F = (2.06/E*(Sc)^(2/3))*(Go/(4-3*Ya))*Re^(-0.575);\n", +"\n", +"a = 6*(1-E)/Dp;\n", +"\n", +"// Result after arrangement:\n", +"Z = integrate('-((4*Go)/((4-(3*Ya))^2*a))*(3/4)*(E*(Sc^(2/3))*(4-(3*Ya))/(2.06*Go)*(1/log(4/(4-(3*Ya)))))*(((Dp/viscosity)*(Go*(47.6-(19.6/(4-(3*Ya))))))^0.575)','Ya',1,0.005);// [m]\n", +"printf('The bed depth required to reduce the CO content to 0.005 is %f m', Z);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7: Local_rate_of_condensation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 3.7\n", +"// Page: 80\n", +"\n", +"printf('Illustration 3.7 - Page: 80\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data*****//\n", +"// a = water b = air\n", +"out_dia = 0.0254;// [m]\n", +"wall_thick = 0.00165;// [m]\n", +"avg_velocity = 4.6;// [m/s]\n", +"T1 = 66;// [C]\n", +"P = 1;// [atm]\n", +"Pa1 = 0.24;// [atm]\n", +"k1 = 11400;// [W/(square m.K)]\n", +"T2 = 24;// [C]\n", +"k2 = 570;// [W/square m.K]\n", +"k_Cu = 381;// [w/square m.K]\n", +"//******//\n", +"\n", +"// For the metal tube\n", +"int_dia = out_dia-(2*wall_thick);// [m]\n", +"avg_dia = (out_dia+int_dia)/2;// [mm]\n", +"Nb = 0;\n", +"Flux_a = 1;\n", +"Ya1 = 0.24;\n", +"Yb1 = 1-Ya1;\n", +"Mav = (Ya1*18.02)+(Yb1*29);// [kg/kmol]\n", +"density = (Mav/22.41)*(273/(273+T1));// [kg/cubic m]\n", +"viscosity = 1.75*10^(-5);// [kg/m.s]\n", +"Cpa = 1880;// [J/kg.K]\n", +"Cpmix = 1145;// [J/kg.K]\n", +"Sc = 0.6;\n", +"Pr = 0.75;\n", +"G_prime = avg_velocity*density;// [kg/square m.s]\n", +"G = G_prime/Mav;// [kmol/square m.s]\n", +"Re = avg_dia*G_prime/viscosity;\n", +"// From Table 3.3:\n", +"// Jd = Std*Sc^(2/3) = (F/G)*Sc^(2/3) = 0.023*Re^(-0.17);\n", +"Jd = 0.023*Re^(-0.17);\n", +"F = (0.023*G)*(Re^(-0.17)/Sc^(2/3));\n", +"\n", +"// The heat transfer coeffecient in the absence of mass transfer will be estimated through Jd = Jh\n", +"// Jh = Sth*Pr^(2/3) = (h/Cp*G_prime)*(Pr^(2/3)) = Jd\n", +"h = Jd*Cpmix*G_prime/(Pr^(2/3));\n", +"\n", +"U = 1/((1/k1)+((wall_thick/k_Cu)*(int_dia/avg_dia))+((1/k2)*(int_dia/out_dia)));// W/square m.K\n", +"\n", +"// Using Eqn. 3.70 & 3.71 with Nb = 0\n", +"// Qt = (Na*18.02*Cpa/1-exp(-(Na*18.02*Cpa/h)))*(T1-Ti)+(Lambda_a*Na);\n", +"// Qt = 618*(Ti-T2);\n", +"// Using Eqn. 3.67, with Nb = 0, Cai/C = pai, Ca1/C = Ya1 = 0.24;\n", +"// Na = F*log(((Flux_a)-(pai))/((Flux_a)-(Ya1));\n", +"\n", +"// Solving above three Eqn. simultaneously:\n", +"Ti = 42.2;// [C]\n", +"pai = 0.0806;// [atm]\n", +"Lambda_a = 43.4*10^6;// [J/kmol]\n", +"Na = F*log(((Flux_a)-(pai))/((Flux_a)-(Ya1)));// [kmol/square m.s]\n", +"Qt1 = 618*(Ti-T2);// [W/square m]\n", +"Qt2 = ((Na*18.02*Cpa/(1-exp(-(Na*18.02*Cpa/h))))*(T1-Ti))+(Lambda_a*Na);// [W/square m]\n", +"\n", +"// since the value of Qt1 & Qt2 are relatively close\n", +"printf('The local rate of condensation of water is %e kmol/square m.s',Na);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8: Simultaneous_Heat_and_Mass_Transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 3.8\n", +"// Page: 81\n", +"printf('Illustration 3.8 - Page: 81\n\n');\n", +"printf('Illustration 3.8 (a)\n\n');\n", +"\n", +"// Solution (a)\n", +"\n", +"//***Data****//\n", +"// a = water b = air\n", +"Nb = 0;\n", +"h = 1100;// [W/square m]\n", +"//*****//\n", +"\n", +"Ma = 18.02;// [kg/kmol]\n", +"Cpa = 2090;// [J/kg.K]\n", +"T1 = 600;// [C]\n", +"Ti = 260;// [C]\n", +"// The positive dirn. is taken to be from the bulk gas to the surface.\n", +"Has = 2.684*(10^6);// enthapy of saturated steam at 1.2 std atm, rel. to the liquid at 0 C in [J/kg]\n", +"Hai = 2.994*(10^6);// enthalpy of steam at 1 std atm, 260 C in [J/kg]\n", +"\n", +"// Radiation contributions to the heat transfer from the gas to the surface are negligible. Eqn. 3.70 reduces to\n", +"Na = -((h/(Ma*Cpa))*log(1-((Cpa*(T1-Ti))/(Has-Hai))));// [kmol/square m.s]\n", +"printf('The rate of steam flow reqd. is %f kmol/square m.s\n\n',Na);\n", +"// negative sign indicates that the mass flux is into the gas\n", +"\n", +"printf('Illustration 3.8 (b)\n\n');\n", +" \n", +"// Solution (b)\n", +"\n", +"//***Data****//\n", +"// a = water b = air\n", +"h = 572;// [W/square m]\n", +"T1 = 25;// [C]\n", +"//******//\n", +"\n", +"Ti = 260;// [C]\n", +"// The positive dirn. is taken to be from the bulk gas to the surface.\n", +"Has = 1.047*10^(5);// enthapy of saturated steam at 1.2 std atm, rel. to the liquid at 0 C in [J/kg]\n", +"Hai = 2.994*(10^6);// enthalpy of steam at 1 std atm, 260 C in [J/kg]\n", +"\n", +"// Radiation contributions to the heat transfer from the gas to the surface are negligible. Eqn. 3.70 reduces to\n", +"Na = -((h/(Ma*Cpa))*log(1-((Cpa*(T1-Ti))/(Has-Hai))));// [kmol/square m.s]\n", +"printf('The rate of steam flow reqd. is %f kmol/square m.s',Na);\n", +"// negative sign indicates that the mass flux is into " + ] + } +], +"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/Mass_Transfer_Operations_by_R_E_Treybal/4-Diffusion_In_Solids.ipynb b/Mass_Transfer_Operations_by_R_E_Treybal/4-Diffusion_In_Solids.ipynb new file mode 100644 index 0000000..cf99f83 --- /dev/null +++ b/Mass_Transfer_Operations_by_R_E_Treybal/4-Diffusion_In_Solids.ipynb @@ -0,0 +1,387 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Diffusion In Solids" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: Ficks_Law_Diffusio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 4.1\n", +"// Page: 89\n", +"\n", +"printf('Illustration 4.1 - Page: 89\n\n');\n", +" \n", +"// solution\n", +"\n", +"//***Data****//\n", +"P = 2;// [atm]\n", +"a1 = 0.025;// [m]\n", +"a2 = 0.050;// [m]\n", +"solub = 0.053*P;// [cubic m H2 (STP)/(cubic m rubber)]\n", +"Ca1 = solub/22.41;// inner surface of the pipe\n", +"Ca2 = 0;// resistance to difusion of H2 away from the surface is negligible.\n", +"Da = 1.8*10^(-10);// [square m/s]\n", +"l = 1;// [m]\n", +"//********//\n", +"\n", +"z = (a2-a1)/2;// [m]\n", +"// Using Eqn. 4.4\n", +"Sav = (2*(%pi)*l*(a2-a1))/(2*log(a2/a1));// [square m]\n", +"// Using Eqn. 4.3\n", +"w = (Da*Sav*(Ca1-Ca2))/z;// [kmol H2/s for 1m length]\n", +"w = w*2.02*10^3*3600;// [g H2/m.h]\n", +"printf('The rate of loss of H2 by diffusion per m of pipe length: %e g H2/m.h',w);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: Unsteady_State_Diffusion.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 4.2\n", +"// Page: 92\n", +"\n", +"printf('Illustration 4.2 - Page: 92\n\n');\n", +"printf('Illustration 4.2 (a)\n\n');\n", +"\n", +"// solution (a)\n", +"\n", +"// Given\n", +"a = 3/2;// [cm]\n", +"thetha = 68*3600;// [s]\n", +"// Ca can e calculated in terms of g/100 cubic cm\n", +"Cao = 5;// [g/100 cubic cm]\n", +"Ca_thetha = 3;// [g/100 cubic cm]\n", +"Ca_Inf = 0;// [g/100 cubic cm]\n", +"//**********//\n", +"\n", +"E = (Ca_thetha-Ca_Inf)/(Cao-Ca_Inf);\n", +"// E = 0.6;\n", +"// From Fig. 4.2 (Pg 91): For diffusion from only one exposed surface D*thetha/(4*a^2) = 0.128\n", +"D = 0.128*4*(a^2)/thetha;// [square cm/s]\n", +"D = D*10^(-4);// [square m/s]\n", +"printf('Diffusivity of urea in gel from only one exposed durface: %e square m/s\n\n',D);\n", +"\n", +"printf('Illustration 4.2 (b)\n\n');\n", +"\n", +"// Solution (b)\n", +"\n", +"//****Data****//\n", +"// Ca can e calculated in terms of g/100 cubic cm\n", +"Cao = 5;// [g/100 cubic cm]\n", +"Ca_thetha = 1;// [g/100 cubic cm]\n", +"Ca_Inf = 0;// [g/100 cubic cm]\n", +"//*********//\n", +"\n", +"E = (Ca_thetha-Ca_Inf)/(Cao-Ca_Inf);\n", +"// E = 0.2;\n", +"// From Fig. 4.2 (Pg 91): For diffusion from only one exposed surface D*thetha/(4*a^2) = 0.568\n", +"D = 4.70*10^(-6);// From Illusration 4.2(a) [square cm/s]\n", +"thetha = 0.568*4*a^2/D;// [s]\n", +"thetha = thetha/3600;// [h]\n", +"printf('The time taken for the avg. conc. to fall to 1g/100 cubic cm is:%f h\n\n',thetha);\n", +"\n", +"printf('Illustration 4.2 (c)\n\n');\n", +"\n", +"// solution (c)\n", +"\n", +"//****Data*****//\n", +"Cao = 5;// [g/100 cubic cm]\n", +"Ca_thetha = 1;// [g/100 cubic cm]\n", +"Ca_Inf = 0;// [g/100 cubic cm]\n", +"//*******//\n", +"\n", +"E = (Ca_thetha-Ca_Inf)/(Cao-Ca_Inf);\n", +"// E = 0.2;\n", +"// From Fig. 4.2: For diffusion from two opposite exposed surface D*thetha/(a^2) = 0.568\n", +"D = 4.70*10^(-6);// From Illusration 4.2(a) [square cm/s]\n", +"thetha = 0.568*(a^2)/D;// [s]\n", +"thetha = thetha/3600;// [h]\n", +"printf('The time taken for the avg. conc. to fall to 1g/100 cubic cm is:%f h',thetha);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: Diffusion_through_Polymers.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 4.3\n", +"// Page: 94\n", +"\n", +"printf('Illustration 4.3 - Page: 94\n\n');\n", +"\n", +"// solution \n", +"\n", +"//****Data****//\n", +"z = 0.1;// [cm]\n", +"pa1 = 1;// [cmHg]\n", +"pa2 = 0;// [cmHg]\n", +"Da = 1.1*10^(-10)*10^4;// [square cm/s]\n", +"//***********//\n", +"\n", +"// Solubility coeffecient in terms of Hg\n", +"Sa = 0.90/76;// [cubic cm gas (STP)/cubic cm.cmHg]\n", +"// Using Eqn. 4.15\n", +"Va = (Da*Sa*(pa1-pa2))/z;// [cubic cm(STP)/square cm.s]\n", +"// Using Eqn. 4.16\n", +"P = Da*Sa;// [cubic cm gas (STP)/square cm.s.(cmHg/cm)]\n", +"printf('The rate of diffusion of CO is:%e cubic cm(STP)/square cm.s\n',Va);\n", +"printf('The permeability of the membrane is %e cubic cm gas (STP)/square cm.s.(cmHg/cm)',P)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4: Diffusion_in_Porous_Solids.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 4.4\n", +"// Page: 96\n", +"\n", +"printf('Illustration 4.4 - Page: 96\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"a = 0.005;// [m]\n", +"// For the KCl diffusion\n", +"Dab1 = 1.84*10^(-9);// [square m/s]\n", +"thetha = 4.75*3600;// [s]\n", +"Ca_Inf = 0;\n", +"// For K2CrO4 diffusion\n", +"Cao = 0.28;// [g/cubic cm]\n", +"Ca_Inf = 0.002;// [g/cubic cm]\n", +"Dab2 = 1.14*10^(-9);// [square m/s]\n", +"//*******//\n", +"\n", +"E = 0.1;// For 90% removal of KCl\n", +"// From Fig. 4.2 (Pg 91): Deff*thetha/a^2 = 0.18\n", +"Deff = 0.18*a^2/thetha;// [square m/s]\n", +"Dab_by_Deff = Dab1/Deff;\n", +"Ca_thetha = 0.1*0.28;// [g/cubic cm]\n", +"Es = (Ca_thetha-Ca_Inf)/(Cao-Ca_Inf);\n", +"// From Fig. 4.2 (Pg 91): Deff*thetha/a^2 = 0.30\n", +"Deff = Dab2/Dab_by_Deff;// [square m/s]\n", +"thetha = 0.3*a^2/Deff;// [s]\n", +"thetha = thetha/3600;// [h]\n", +"printf('The time reqd. is:%f h',thetha);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5: Diffusion_in_Porous_Solids.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 4.5\n", +"// Page: 98\n", +"printf('Illustration 4.5 - Page: 98\n\n');\n", +"printf('Illustration 4.5 (a)\n\n');\n", +"\n", +"// solution (a)\n", +"\n", +"//****Data****//\n", +"// a = H2 b = N2\n", +"Dab_eff = 5.3*10^(-6);// [square m/s]\n", +"Dkb_eff = 1.17*10^(-5);// [square m/s]\n", +"Dab = 7.63*10^(-5);// [square m/s]\n", +"//*******//\n", +"\n", +"R = 8314;//[Nm/kmol]\n", +"Mb = 2.02;// [kg/kmol]\n", +"T = 293;// [K]\n", +"Dtrue_by_Deff = Dab/Dab_eff;\n", +"// Since the ratio is strictly a matter of the geometry of the solid.\n", +"Dkb = Dkb_eff*Dtrue_by_Deff;// [square m/s]\n", +"// From Eqn. 4.20\n", +"d = 3*Dkb*((%pi*Mb)/(8*R*T))^0.5;// [m]\n", +"printf('The equivalent pore diameter is: %e m\n\n',d);\n", +"\n", +"printf('Illustration 4.5 (b)\n\n');\n", +"\n", +"// Solution (b)\n", +"\n", +"//****Data*****//\n", +"// a = O2 b = N2 c = H2\n", +"Ya1 = 0.8;\n", +"Ya2 = 0.2;\n", +"Pt = 10133;// [N/square m]\n", +"z = 0.002;// [m]\n", +"T = 293;// [K]\n", +"//*******//\n", +"\n", +"// From Table 2.1 (Pg 31):\n", +"Dab = 1.81*10^(-5);// [square m/s] at STP\n", +"Dkc = 1.684*10^(-4);// [square m/s] From Illustration 4.5(a)\n", +"Mc = 2.02;// [kg/kmol]\n", +"Ma = 32;// [kg/kmol]\n", +"Mb = 28.02;// [kg/kmol]\n", +"Dab = Dab*(1/0.1)*((293/273)^1.5);// [square m/s] at 0.1 atm & 20 C\n", +"DabEff = Dab/14.4;// [square m/s] From Illustration 4.5(a)\n", +"Dka = Dkc*((Mc/Ma)^0.5);// [square m/s]\n", +"DkaEff = Dka/14.4;// [square m/s]\n", +"Nb_by_Na = -(Ma/Mb)^0.5;\n", +"// Na/(Na+Nb) = 1/(1+(Nb/Na))\n", +"Na_by_NaSumNb = 1/(1+(Nb_by_Na));\n", +"DabEff_by_DkaEff = DabEff/DkaEff;\n", +"// By Eqn. 4.23\n", +"Na = (Na_by_NaSumNb)*(DabEff*Pt/(R*T*z))*log((((Na_by_NaSumNb)*(1+DabEff_by_DkaEff))-Ya2)/(((Na_by_NaSumNb)*(1+DabEff_by_DkaEff))-Ya1));// [kmol/square m.s]\n", +"Nb = Na*(Nb_by_Na);// [kmol/square m.s]\n", +"printf('Diffusion flux of O2 is %e kmol/square m.s\n',Na);\n", +"printf('Diffusion flux of N2 is %e kmol/square m.s\n',Nb);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6: Hydrodynamic_flow_of_gases.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 4.6\n", +"// Page: 100\n", +"\n", +"printf('Illustration 4.6 - Page: 100\n\n');\n", +"\n", +"// solution\n", +"\n", +"//***Data***//\n", +"// a = N2\n", +"// For N2 at 300K\n", +"viscosity1 = 1.8*10^(-5);// [kg/m.s]\n", +"Pt1 = 10133;// [N/square m.sec]\n", +"T = 300;// [K]\n", +"z = 0.0254;// [m]\n", +"T2 = 393;// [K]\n", +"//***********//\n", +"\n", +"Ma = 28.02;// [kg/kmol]\n", +"R = 8314;// [J/K.kgmol]\n", +"//From Eqn 4.22\n", +"lambda = (3.2*viscosity1/Pt1)*(R*T/(2*(%pi)*Ma))^0.5;\n", +"d = 10^(-4);// [m]\n", +"d_by_lambda = d/lambda;\n", +"// Kundsen flow will not occur\n", +"// N2 flow corresponding to 9 cubic ft/square ft.min at 300K & 1 std atm = 0.0457 cubic m/square m.min\n", +"Na1 = 0.0457*(273/T)*(1/22.41);// [kmol/square m.s]\n", +"Pt1_diff_Pt2 = 2*3386/13.6;// [N/square m]\n", +"Ptav = Pt1+(Pt1_diff_Pt2/2);// [N/square m]\n", +"// From Eqn. 4.26\n", +"k1 = Na1*R*T*z/(Ptav*(Pt1_diff_Pt2));// [m^4/N.s]\n", +"\n", +"//For N2 at 393K\n", +"viscosity2 = 2.2*10^(-5);// [kg/m.s]\n", +"k2 = (k1*viscosity1)/(viscosity2);// [m^4/N.s]\n", +"// From Eqn 4.26\n", +"Na = (k2*Ptav*Pt1_diff_Pt2)/(R*T2*z);// [kmol/square m.s]\n", +"printf('Flow rate to be expected is %e kmol/square m.s',Na);" + ] + } +], +"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/Mass_Transfer_Operations_by_R_E_Treybal/5-Interphase_Mass_Transfer.ipynb b/Mass_Transfer_Operations_by_R_E_Treybal/5-Interphase_Mass_Transfer.ipynb new file mode 100644 index 0000000..03ca1da --- /dev/null +++ b/Mass_Transfer_Operations_by_R_E_Treybal/5-Interphase_Mass_Transfer.ipynb @@ -0,0 +1,264 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Interphase Mass Transfer" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: Local_overall_mass_transfer_coeffecient.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 5.1\n", +"// Page: 114\n", +"\n", +"printf('Illustration 5.1 - Page: 114\n\n');\n", +"\n", +"// solution\n", +"\n", +"//***Data***//\n", +"// a = NH3, b = H2O\n", +"d = 2.54*10^(-2);// [m]\n", +"Yag = 0.80;\n", +"Xal = 0.05;\n", +"T = 273+26.7;// [K]\n", +"Kl = 2.87*10^(-5);// [kmol/square m.s.(kmol/cubic m)]\n", +"Sh = 40;\n", +"Da = 2.297*10^(-5);// [square m.s]\n", +"P = 1.0133*10^(5);// [N/square m]\n", +"Xbm = 1.0;\n", +"//*********//\n", +"\n", +"Ma = 18;// [kg/kmol]\n", +"// Liquid:\n", +"// Because of large conc. of ammonia in gas F's rather than k's are used.\n", +"// Molecular weight of water and ammonia are nearly same.\n", +"// The density of the solution is practically that of water.\n", +"MolarDensity1 = 1000/Ma;// [kmol/cubic m]\n", +"// Kl is determined for dilute soln. where Xbm is practically 1.0\n", +"Fl = Kl*Xbm*MolarDensity1;// [kmol/square m.s]\n", +"Ma = 18;// [kg-/kmol]\n", +"// Gas:\n", +"MolarDensity2 = (1/22.41)*(273/(273+26.7));// [kmol/cubic m]\n", +"Fg = Sh*MolarDensity2*Da/d;// [kmol/square m.s]\n", +"\n", +"// Mass Transfer Flux\n", +"// Th eqb. distribuion data for NH3 from 'The Chemical Engineers Handbook' 5th Edt. p3-68:\n", +"// Data = [Xa,pa]\n", +"// Xa = NH3 mole fraction in gas phas\n", +"// pa = NH3 partial pressure in N/square m\n", +"Data = [0 0;0.05 7171;0.10 13652;0.25 59917;0.30 93220];\n", +"// Ya_star = mole fraction of NH3 in gas phase at eqb.\n", +"Ya_star = zeros(5);\n", +"for i = 1:5\n", +" Ya_star(i) = (Data(i,2)/P);\n", +"end\n", +"// For transfer of only one component\n", +"Na_by_SummationN = 1.0;\n", +"Ya = zeros(5);\n", +"for i = 1:5\n", +" Ya(i) = 1-((1-Yag)*(1-Xal)/(1-Data(i)));\n", +"end\n", +"scf(0);\n", +"plot(Data(:,1),Ya_star,Data(:,1),Ya);\n", +"xgrid();\n", +"xlabel('Xa = mole fraction of NH3 in liquid phase');\n", +"ylabel('Ya = mole fraction of NH3 in gas phase');\n", +"legend('equilibrium line','operating line');\n", +"title('Ya Vs Xa');\n", +"\n", +"// From intersection of operating line & Eqb. line\n", +"Xai = 0.274;\n", +"Yai = 0.732;\n", +"\n", +"// From Eqn.5.20\n", +"Na = Na_by_SummationN*Fg*log((Na_by_SummationN-Yai)/(Na_by_SummationN-Yag));// [kmol NH3 absorbed/square m.s]\n", +"printf('Local mass transfer flux for ammonia is %e kmol/square m.s',Na);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: Stages_and_Mass_Transfer_Rates.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 5.2\n", +"// Page: 130\n", +"\n", +"printf('Illustration 5.2 - Page: 130\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data***//\n", +"// Eqb. data\n", +"// Data = [Wt% of moisture in the soap,Partial pressure of water in air(mm Hg)]\n", +"Data = [0 0;2.40 9.66;3.76 19.20;4.76 28.4;6.10 37.2;7.83 46.4;9.90 55.0; 12.63 63.2;15.40 71.9;19.02 79.5];\n", +"P = 760;// [mm Hg]\n", +"// Initial air\n", +"p1 = 12;// [mm Hg]\n", +"T = 273+75;// [K]\n", +"//******//\n", +"\n", +"// Y = kg water/kg dry air\n", +"// X = kg water/kg dry soap\n", +"// E = Air water phase\n", +"// R = Soap water phase\n", +"Y = zeros(10);\n", +"X = zeros(10);\n", +"for i = 1:10\n", +" Y(i) = Data(i,2)/(P-Data(i,2))*(18.02/29);\n", +" X(i) = Data(i,1)/(100-Data(i,1));\n", +"end\n", +"\n", +"printf('Illustration 5.2 (a)\n\n');\n", +"\n", +"// Soln. (a)\n", +"// First operation\n", +"Y1 = p1/(P-p1);// [kg water/kg dry soap]\n", +"// Initial Soap\n", +"S1 = 16.7/(100-16.7);// [kg water/kg dry soap]\n", +"// Final soap\n", +"S2 = 13/(100-13);// [kg water/kg dry soap]\n", +"Rs = 10*(1-0.167);// [kg dry soap]\n", +"// Using ideal gas law\n", +"Es = 10*((760-p1)/760)*(273/T)*(29/22.41);// [kg dry air]\n", +"slopeOperat = -Rs/Es;\n", +"\n", +"deff('[y] = f2(x)','y = slopeOperat*(x-S1)+Y1')\n", +"x = S1:-0.01:S2;\n", +"\n", +"// Second Operation\n", +"X1 = S2;\n", +"scf(1);\n", +"deff('[y] = f3(S)','y = slopeOperat*(S-X1)+Y1');\n", +"S = 0:0.01:S1;\n", +"plot(X,Y,x,f2,S,f3);\n", +"xlabel('kg water / kg dry soap');\n", +"ylabel('kg water / kg dry air');\n", +"legend('Equilibrium line','First Process','Second Process');\n", +"a = get('current_axes');\n", +"tight_limits = 'on';\n", +"a.data_bounds = [0 0;0.24 0.08];\n", +"xgrid();\n", +"title('Illustration 5.2(a)')\n", +"// Results for First Process\n", +"// The condition at abcissa S2 correspond to the end of first operation\n", +"printf('Conditions corresponding to First Operation \n')\n", +"printf('X = %f kg water/kg dry soap\n',S2);\n", +"printf('Y = %f kg water/kg dry air\n',f2(S2));\n", +"\n", +"// Results for Second Process\n", +"// The point at which the line meets the equilibrium line corresponds to the final value\n", +"X2 = 0.103;\n", +"Y2 = (X2/(1+X2));\n", +"printf('Final moisture content of soap is %f %%\n\n',Y2*100);\n", +"\n", +"printf('Illustration 5.2 (b)\n\n');\n", +"\n", +"// Solution (b)\n", +"\n", +"Rs = 1*(1-0.167);// [kg dry soap/h]\n", +"// Entering soap\n", +"X1 = 0.20;// [kg water/kg dry soap]\n", +"// Leaving soap\n", +"x = 0.04;\n", +"X2 = x/(1-x);// [kg water/kg dry soap]\n", +"// Entering air\n", +"Y2 = 0.00996;// [from Illustration 5.2(a), kg water/kg dry air]\n", +"// The operating line of least slope giving rise to eqb. condition will indicate least amount of air usable.\n", +"// At X1 = 0.20; the eqb. condition:\n", +"Y1 = 0.0675;// [kg water/kg dry air]\n", +"scf(2);\n", +"deff('[y] = f4(x)','y = ((Y1-Y2)/(X1-X2))*(x-X1)+Y1');\n", +"x = X2:0.01:0.24;\n", +"plot(X,Y,x,f4);\n", +"xlabel('kg water / kg dry soap');\n", +"ylabel('kg water / kg dry air');\n", +"a = get('current_axes');\n", +"tight_limits = 'on';\n", +"a.data_bounds = [0 0;0.24 0.08];\n", +"xgrid();\n", +"title('Illustration 5.2(b)')\n", +"legend('Equilibrium line','Operating Line');\n", +"// By Eqn. 5.35\n", +"Es = Rs*(X1-X2)/(Y1-Y2);// [kg dry air/h]\n", +"Esv = (Es/29)*22.41*(P/(P-p1))*(T/273);// [cubic m/kg dry soap]\n", +"printf('Minimum amount of air required is %f cubic m/kg dry soap\n\n',Esv);\n", +"\n", +"printf('Illustration 5.2 (c)\n\n');\n", +"\n", +"// solution (c)\n", +"\n", +"Esnew = 1.30*Es;// [kg dry air/h]\n", +"Y1 = Rs*((X1-X2)/Esnew)+Y2;\n", +"scf(3);\n", +"deff('[y] = f5(x)','y = ((Y1-Y2)/(X1-X2))*(x-X1)+Y1');\n", +"x = X2:0.01:0.24;\n", +"plot(X,Y,x,f5);\n", +"xlabel('kg water / kg dry soap');\n", +"ylabel('kg water / kg dry air');\n", +"a = get('current_axes');\n", +"tight_limits = 'on';\n", +"a.data_bounds = [0 0;0.24 0.08];\n", +"xgrid();\n", +"title('Illustration 5.2(c)')\n", +"legend('Equilibrium line','Operating Line');\n", +"// with final coordinates X = X1 & y = Y1\n", +"// From figure, Total number of eqb . stages = 3\n", +"N = 3;\n", +"printf('Moisture content of air leaving the drier is %f kg water/kg dry air\n',Y1);\n", +"printf('Total number of eqb. stages = %d\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/Mass_Transfer_Operations_by_R_E_Treybal/6-Equipment_for_Gas_Liquid_Operation.ipynb b/Mass_Transfer_Operations_by_R_E_Treybal/6-Equipment_for_Gas_Liquid_Operation.ipynb new file mode 100644 index 0000000..06a7f49 --- /dev/null +++ b/Mass_Transfer_Operations_by_R_E_Treybal/6-Equipment_for_Gas_Liquid_Operation.ipynb @@ -0,0 +1,721 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Equipment for Gas Liquid Operation" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1: Bubble_Columns.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 6.1\n", +"// Page: 145\n", +"\n", +"printf('Illustration 6.1 - Page: 145\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// w = Gas flow rate per orifice\n", +"w = 0.055/50;// [kg/s]\n", +"L = 8*10^(-4);// [liquid flow rate, cubic m/s]\n", +"d = 0.003;// [diameter of the orifice,m]\n", +"viscocity_gas = 1.8*10^(-5);// [kg/m.s]\n", +"//******//\n", +"\n", +"Re = 4*w/(%pi*d*viscocity_gas);\n", +"Dp = 0.0071*Re^(-0.05);// [m]\n", +"h = 3;// [height of vessel,m]\n", +"P_atm = 101.3;// [kN/square m]\n", +"Density_water = 1000;// [kg/cubic m]\n", +"g = 9.81;// [m/s^2]\n", +"Temp = 273+25;// [K]\n", +"P_orifice = P_atm+(h*Density_water*g/1000);// [kN/square m]\n", +"P_avg = P_atm+((h/2)*Density_water*g/1000);// [kN/square m]\n", +"Density_gas = (29/22.41)*(273/Temp)*(P_avg/P_atm);// [kg/cubic m]\n", +"D = 1;// [dia of vessel,m]\n", +"Area = (%pi*D^2)/4;// [square m]\n", +"Vg = 0.055/(Area*Density_gas);// [m/s]\n", +"Vl = L/Area;// [m/s]\n", +"sigma = 0.072;// [N/m]\n", +"// From fig. 6.2 (Pg 143)\n", +"abscissa = 0.0516;// [m/s]\n", +"Vg_by_Vs = 0.11;\n", +"Vs = Vg/Vg_by_Vs;// [m/s]\n", +"deff('[y] = f6(shi_g)','y = Vs-(Vg/shi_g)+(Vl/(1-shi_g))');\n", +"shi_g = fsolve(0.5,f6);\n", +"dp = ((Dp^3)*(P_orifice/P_avg))^(1/3);// [bubble diameter,m]\n", +"// From eqn. 6.9\n", +"a = 6*shi_g/dp;// [specific interfacial area,square m]\n", +"printf('The Specific Interfacial Area is %f square m/cubic m\n',a);\n", +"\n", +"// For diffsion of Cl2 in H20\n", +"Dl = 1.44*10^(-9);// [square m/s]\n", +"viscocity_water = 8.937*10^(-4);// [kg/m.s]\n", +"Reg = dp*Vs*Density_water/viscocity_water;\n", +"Scl = viscocity_water/(Density_water*Dl);\n", +"// From Eqn.6.11\n", +"Shl = 2+(0.0187*(Reg^0.779)*(Scl^0.546)*(dp*(g^(1/3))/(Dl^(2/3)))^0.116);\n", +"// For dilute soln. of Cl2 in H20\n", +"c = 1000/18.02;// [kmol/cubic m]\n", +"Fl = (c*Dl*Shl)/dp;// [kmol/square m.s]\n", +"printf('Mass Transfer coeffecient is %f kmol/square m.s\n',Fl);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2: Mechanical_Agitation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 6.2\n", +"// Page: 157\n", +"\n", +"printf('Illustration 6.2 - Page: 157\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// a = N2 b = H2O\n", +"L = 9.5*10^(-4);// [cubic m/s]\n", +"G = 0.061;// [kg/s]\n", +"Temp = 273+25;// [K]\n", +"//*****//\n", +"\n", +"printf('Construction Arrangement\n');\n", +"printf('Use 4 vertical wall baffles, 100 mm wide at 90 degree intervals.\n');\n", +"printf('Use a 305 mm dameter, a six bladed disk flat blade turbine impeller, arranged axially, 300 mm from the bottom of vessel\n');\n", +"printf('The sparger underneath the impeller will be in the form of a 240 mm dameter ring made of 12.7 mm tubing drilled in the top with 3.18 mm dia holes\n');\n", +"Di = 0.305;// [m]\n", +"Do = 0.00316;// [m]\n", +"viscocity_a = 1.8*10^(-5);// [kg/m.s]\n", +"Re_g = 35000;\n", +"Ma = 28.02;// [kg/kmol]\n", +"Mb = 18.02;// [kg/kmol]\n", +"// w = Gas flow rate per orifice\n", +"w = Re_g*%pi*Do*viscocity_a/4;// [kg/s]\n", +"N_holes = G/w;\n", +"Interval = %pi*240/round(N_holes);\n", +"printf('The number of holes is %d at approx %d mm interval around the sparger ring\n',round(N_holes),round(Interval));\n", +"\n", +"viscocity_b = 8.9*10^(-4);// [kg/m.s]\n", +"Sigma = 0.072;// [N/m]\n", +"Density_b = 1000;// [kg/cubic m]\n", +"D = 1;// [dia of vessel,m]\n", +"g = 9.81;// [m/s^2]\n", +"// From Eqn. 6.18\n", +"deff('[y] = f7(N)','y = (N*Di/(Sigma*g/Density_b)^0.25)-1.22-(1.25*D/Di)');\n", +"N_min = fsolve(2,f7);// [r/s]\n", +"N = 5;// [r/s]\n", +"Re_l = ((Di^2)*N*Density_b/viscocity_b);\n", +"// From fig 6.5 (Pg 152)\n", +"Po = 5;\n", +"P = Po*Density_b*(N^3)*(Di^5);\n", +"h = 0.7;// [m]\n", +"P_atm = 101.33;// [kN/square m]\n", +"P_gas = P_atm+(h*Density_b*g/1000);// [kN/square m]\n", +"Qg = (G/Ma)*22.41*(Temp/273)*(P_atm/P_gas);// [cubic m/s]\n", +"// From Fig.6.7 (Pg 155)\n", +"abcissa = Qg/(N*(Di^3));\n", +"// abcissa is off scale\n", +"Pg_by_P = 0.43;\n", +"Pg = 0.43*P;// [W]\n", +"Vg = Qg/(%pi*(D^2)/4);// [superficial gas velocity,m/s]\n", +"check_value = (Re_l^0.7)*((N*Di/Vg)^0.3);\n", +"vl = %pi*(D^2)/4;// [cubic m]\n", +"// Since value<30000\n", +"// From Eqn. 6.21, Eqn.6.23 & Eqn. 6.24\n", +"K = 2.25;\n", +"m = 0.4;\n", +"Vt = 0.250;// [m/s]\n", +"shi = 1;\n", +"err = 1;\n", +"while (err>10^(-3))\n", +" a = 1.44*((Pg/vl)^0.4)*((Density_b/(Sigma^3))^0.2)*((Vg/Vt)^0.5);// [square m/cubic m]\n", +" shin = (0.24*K*((viscocity_a/viscocity_b)^0.25)*((Vg/Vt)^0.5))^(1/(1-m));\n", +" Dp = K*((vl/Pg)^0.4)*((Sigma^3/Density_b)^0.2)*(shin^m)*((viscocity_a/viscocity_b)^0.25);// [m]\n", +" err = abs(shi-shin);\n", +" Vt = Vt-0.002;// [m/s]\n", +" shi = shin;\n", +"end\n", +"\n", +"// For N2 in H2\n", +"Dl = 1.9*10^(-9);// [square m/s]\n", +"Ra = 1.514*10^(6);\n", +"// By Eqn. 6.25\n", +"Shl = 2.0+(0.31*(Ra^(1/3)));\n", +"// For dilute soln.\n", +"c = 1000/Mb;// [kmol/cubic m]\n", +"Fl = Shl*c*Dl/Dp;// [kmol/square m.s]\n", +"printf('The average gas-bubble diameter is %e m\n',Dp);\n", +"printf('Gas Holdup:%f\n',shi);\n", +"printf('Interfacial area:%e square m/cubic m \n',a);\n", +"printf('Mass transfer coeffecient:%e kmol/square m.s\n',Fl);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3: Tray_Towers.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 6.3\n", +"// Page: 174\n", +"\n", +"printf('Illustration 6.3 - Page: 174\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// a = methanol b = water\n", +"G = 0.100;// [kmol/s]\n", +"L = 0.25;// [kmol/s]\n", +"Temp = 273+95;// [K]\n", +"XaG = 0.18;// [mol % in gas phase]\n", +"MaL = 0.15;// [mass % in liquid phase]\n", +"//*****//\n", +"\n", +"Ma = 32;// [kg/kmol]\n", +"Mb = 18;// [kg/kmol]\n", +"Mavg_G = XaG*Ma+((1-XaG)*Mb);// [kg/kmol]\n", +"Density_G = (Mavg_G/22.41)*(273/Temp);// [kg/cubic cm]\n", +"Q = G*22.41*(Temp/273);// [cubic cm/s]\n", +"Density_L = 961;// [kg/cubic cm]\n", +"Mavg_L = 1/((MaL/Ma)+(1-MaL)/Mb);// [kg/kmol]\n", +"q = L*Mavg_L/Density_L;\n", +"\n", +"// Perforations\n", +"printf('Perforations\n');\n", +"printf('Do = 4.5mm on an equilateral triangle pitch 12 mm between the hole centres, punched in sheet metal 2 mm thick\n');\n", +"Do = 0.0045;// [m]\n", +"pitch = 0.012;// [m]\n", +"// By Eqn.6.31\n", +"Ao_by_Aa = 0.907*(Do/pitch)^2;\n", +"printf('The ratio of Hole Area By Active Area is:%f\n',Ao_by_Aa);\n", +"printf('\n');\n", +"\n", +"// Tower Diameter\n", +"printf('Tower Diameter\n');\n", +"t = 0.50;// [tray spacing,m]\n", +"printf('Tower Spacing:%f m\n',t);\n", +"// abcissa = (L/G)*(Density_G/Density_L)^0.5 = (q/Q)*(Density_L/Density_G)^0.5\n", +"abcissa = (q/Q)*(Density_L/Density_G)^0.5;\n", +"// From Table 6.2 (Pg 169)\n", +"alpha = (0.0744*t)+0.01173;\n", +"beeta = (0.0304*t)+0.015;\n", +"if (abcissa<0.1) \n", +" abcissa = 0.1;\n", +"end\n", +"sigma = 0.040;// [N/m]\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", +"// Using 80% of flooding velocity\n", +"V = 0.8*Vf;// [m/s]\n", +"An = Q/V;// [square m]\n", +"// The tray area used by one downspout = 8.8%\n", +"At = An/(1-0.088);// [square m]\n", +"D = (4*At/%pi)^(1/2);// [m]\n", +"// Take D = 1.25 m\n", +"D = 1.25; //[m]\n", +"At = %pi*(D^2)/4;// [corrected At, square m]\n", +"W = 0.7*D;// [weir length,m]\n", +"Ad = 0.088*At;// [square m]\n", +"// For a design similar to Fig 6.14 (Pg 168)\n", +"// A 40 mm wide supporting ring, beams between downspouts and a 50 mm wide disengaging & distributing zones these areas total 0.222 square m\n", +"Aa = At-(2*Ad)-0.222;\n", +"printf('Weir Length:%f\n',W);\n", +"printf('Area for perforated sheet: %f square m\n',Aa);\n", +"printf('\n');\n", +"\n", +"// Weir crest h1 & Weir height hw\n", +"printf('Weir crest h1 & Weir height hw\n')\n", +"h1 = 0.025;// [m]\n", +"h1_by_D = h1/D;\n", +"D_by_W = D/W;\n", +"// From Eqn. 6.34\n", +"Weff_by_W = sqrt(((D_by_W)^2)-((((D_by_W)^2-1)^0.5)+(2*h1_by_D*D_by_W))^2);\n", +"// Set hw to 50 mm\n", +"hw = 0.05;// [m]\n", +"printf('Weir crest: %f m\n',h1);\n", +"printf('Weir height: %f m\n',hw);\n", +"printf('\n');\n", +"\n", +"// Dry Pressure Drop\n", +"printf('Dry Pressure Drop\n');\n", +"l = 0.002;// [m]\n", +"// From Eqn. 6.37\n", +"Co = 1.09*(Do/l)^0.25;\n", +"Ao = 0.1275*Aa;// [square m]\n", +"Vo = Q/Ao;// [m/sec]\n", +"viscocity_G = 1.25*10^(-5);// [kg/m.s]\n", +"Re = Do*Vo*Density_G/viscocity_G;\n", +"// From 'The Chemical Engineers Handbook,' 5th Edition fig 5.26\n", +"fr = 0.008;\n", +"g = 9.81;// [m/s^2]\n", +"// From Eqn. 6.36\n", +"deff('[y] = f(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,f);\n", +"printf('Dry Pressure Drop:%f m\n',hd);\n", +"printf('\n');\n", +"\n", +"// Hydraulic head hl\n", +"printf('Hydraulic head hl');\n", +"Va = Q/Aa;// [m/s]\n", +"z = (D+W)/2;// [m]\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", +"printf('Hydraulic head: %f m\n',hl);\n", +"printf('\n');\n", +"\n", +"//Residual Pressure drop hr\n", +"printf('Residual Pressure drop hr\n');\n", +"// From Eqn. 6.42\n", +"hr = 6*sigma/(Density_L*Do*g);// m\n", +"printf('Residual Pressure Drop:%e m\n',hr);\n", +"printf('\n');\n", +"\n", +"// Total Gas pressure Drop hg\n", +"printf('Total Gas pressure Drop hg\n')\n", +"// From Eqn. 6.35\n", +"hg = hd+hl+hr;// [m]\n", +"printf('Total gas pressure Drop: %f m\n',hg);\n", +"printf('\n');\n", +"\n", +"// Pressure loss at liquid entrance h2\n", +"printf('Pressure loss at liquid entrance h2\n');\n", +"// Al: Area for the liquid flow under the apron\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;\n", +"printf('Pressure loss at liquid entrance:%e m\n',h2);\n", +"printf('\n');\n", +"\n", +"// Backup in Downspout h3\n", +"printf('Backup in Downspout h3\n');\n", +"// From Eqn.6.44\n", +"h3 = hg+h2;\n", +"printf('Backup in Downspout:%f m\n',h3);\n", +"printf('\n');\n", +"\n", +"// Check on Flooding\n", +"printf('Check on Flooding\n');\n", +"if((hw+h1+h3)<(t/2))\n", +" printf('Choosen Tower spacing is satisfactory\n');\n", +"else\n", +" printf('Choosen Tower spacing is not satisfactory\n')\n", +"end\n", +"printf('\n');\n", +"\n", +"// Weeping Velocity\n", +"printf('Weeping Velocity\n');\n", +"printf('For W/D ratio %f weir is set at %f m from the center from the tower\n',W/D,0.3296*D);\n", +"Z = 2*(0.3296*D);// [m]\n", +"// From Eqn.6.46\n", +"deff('[y] = f8(Vow)','y = (Vow*viscocity_G/(sigma))-(0.0229*((viscocity_G^2/(sigma*Density_G*Do))*(Density_L/Density_G))^0.379)*((l/Do)^0.293)*(2*Aa*Do/(sqrt(3)*(pitch^3)))^(2.8/((Z/Do)^0.724))');\n", +"Vow = fsolve(0.1,f8);// [m/s]\n", +"printf('The minimum gas velocity through the holes below which excessive weeping is likely: %f m/s\n',Vow);\n", +"printf('\n');\n", +"\n", +"// Entrainment\n", +"printf('Entrainment\n');\n", +"V_by_Vf = V/Vf;\n", +"// From Fig.6.17 (Pg 173), V/Vf = 0.8 & abcissa = 0.0622\n", +"E = 0.05;\n", +"printf('Entrainment:%f\n',E);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4: Efficiency_of_sieve_tray.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 6.4\n", +"// Page: 183\n", +"\n", +"printf('Illustration 6.4 - Page: 183\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"//From Illustrtion 6.3:\n", +"G = 0.100;// [kmol/s]\n", +"Density_G = 0.679;// [kg/cubic m]\n", +"q = 5*10^(-3);// [cubic m/s]\n", +"Va = 3.827;// [m/s]\n", +"z = 1.063;// [m]\n", +"L = 0.25;// [kmol/s]\n", +"hL = 0.0106;// [m]\n", +"hW = 0.05;// [m]\n", +"Z = 0.824;// [m]\n", +"E = 0.05;\n", +"ya = 0.18;// [mole fraction methanol]\n", +"\n", +"// a:CH3OH b:H2O\n", +"Ma = 32;// [kg/kmol]\n", +"Mb = 18;// [kg/kmol]\n", +"// From Chapter 2:\n", +"ScG = 0.865;\n", +"Dl = 5.94*10^(-9);// [square m/s]\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", +"DE = ((3.93*10^(-3))+(0.0171*Va)+(3.67*q/Z)+(0.1800*hW))^2;// [square m/s]\n", +"thethaL = hL*z*Z/q;// [s]\n", +"NtL = 40000*Dl^0.5*((0.213*Va*Density_G^0.5)+0.15)*thethaL;\n", +"// For 15 mass% methanol:\n", +"xa = (15/Ma)/((15/Ma)+(85/Mb));\n", +"// From Fig 6.23 (Pg 184)\n", +"mAC = -(NtL*L)/(NtG*G);// [Slope of AC line]\n", +"meqb = 2.50;// [slope of equilibrium line]\n", +"// From Eqn. 6.52:\n", +"NtoG = 1/((1/NtG)+(meqb*G/L)*(1/NtL));\n", +"// From Eqn. 6.51:\n", +"EOG = 1-exp(-NtoG);\n", +"// From Eqn. 6.59:\n", +"Pe = Z^2/(DE*thethaL);\n", +"// From Eqn. 6.58:\n", +"eta = (Pe/2)*((1+(4*meqb*G*EOG/(L*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", +"printf('Effeciency of Sieve trays: %f',EMGE);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5: Packing.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 6.5\n", +"// Page: 200\n", +"\n", +"printf('Illustration 6.5 - Page: 200\n\n');\n", +"\n", +"// solution\n", +"\n", +"// ****Data****//\n", +"G = 0.80;// [cubic m/s]\n", +"P = 10^2;// [kN/square m]\n", +"XaG = 0.07;\n", +"Temp = 273+30;// [K]\n", +"L = 3.8;// [kg/s]\n", +"Density_L = 1235;// [kg/cubic m]\n", +"viscocity_L = 2.5*10^(-3);// [kg/m.s]\n", +"//******//\n", +"\n", +"// a = SO2 b = air\n", +"\n", +"// Solution (a) \n", +"\n", +"// Since the larger flow quantities are at the bottom for an absorber, the diameter will be choosen to accomodate the bottom condition\n", +"Mavg_G = XaG*64+((1-XaG)*29);// [kg/kmol]\n", +"G1 = G*(273/Temp)*(P/101.33)*(1/22.41);// [kmol/s]\n", +"G2 = G1*Mavg_G;// [kg/s]\n", +"Density_G = G2/G;// [kg/cubic m]\n", +"// Assuming Complete absorption of SO2\n", +"sulphur_removed = G1*XaG*64;// [kg/s]\n", +"abcissa = (L/G)*((Density_G/Density_L)^0.5);\n", +"//From Fig. 6.24, using gas pressure drop of 400 (N/square m)/m\n", +"ordinate = 0.061;\n", +"// For 25 mm ceramic Intalox Saddle:\n", +"Cf = 98;// [Table 6.3 Pg 196]\n", +"J = 1;\n", +"G_prime = (ordinate*Density_G*(Density_L-Density_G)/(Cf*viscocity_L^0.1*J))^0.5;// [kg/square m.s]\n", +"A = G2/G_prime;// [square m]\n", +"D = (4*A/%pi)^0.5;// [m]\n", +"printf('The Tower Diameter is %f m\n',D);\n", +"\n", +"// Solution (b)\n", +"\n", +"// Let\n", +"D = 1;// [m]\n", +"A = %pi*D^2/4;// [square m]\n", +"// The pressure drop for 8 m of irrigated packing\n", +"delta_p = 400*8;// [N/square m]\n", +"// For dry packing\n", +"G_prime = (G2-sulphur_removed)/A;// [kg/square m.s]\n", +"P = P-(delta_p/1000);// [kN/square m]\n", +"Density_G = (29/22.41)*(273/Temp)*(P/101.33);// [kg/cubic m]\n", +"// From Table 6.3 (Pg 196)\n", +"Cd = 241.5;\n", +"// From Eqn. 6.68\n", +"delta_p_by_z = Cd*G_prime^2/Density_G;// [N/square m for 1m of packing]\n", +"pressure_drop = delta_p+delta_p_by_z;// [N/square m]\n", +"V = 7.5;// [m/s]\n", +"head_loss = 1.5*V^2/2;// [N.m/kg]\n", +"head_loss = head_loss*Density_G;// [N/square m]\n", +"Power = (pressure_drop+head_loss)*(G2-sulphur_removed)/(Density_G*1000);// [kW]\n", +"eta = 0.6;\n", +"Power = Power/eta;// [kW]\n", +"printf('The Power for the fan motor is %f kW\n',Power);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6: Mass_Transfer_Coeffecient_for_packed_towers.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 6.6\n", +"// Page: 204\n", +"\n", +"printf('Illustration 6.6 - Page: 204\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// Gas\n", +"Mavg_G = 11;// [kg/kmol]\n", +"viscocity_G = 10^(-5);// [kg/m.s]\n", +"Pt = 107;// [kN/square m]\n", +"Dg = 1.30*10^(-5);// [square m/s]\n", +"Temp = 273+27;// [K]\n", +"G_prime = 0.716;// [kg/square m.s]\n", +"\n", +"// Liquid:\n", +"Mavg_L = 260;\n", +"viscocity_L = 2*10^(-3);// [kg/m.s]\n", +"Density_L = 840;// [kg/cubic m]\n", +"sigma = 3*10^(-2);// [N/m]\n", +"Dl = 4.71*10^(-10);// [square m/s]\n", +"//******//\n", +"\n", +"//Gas:\n", +"Density_G = (Mavg_G/22.41)*(Pt/101.33)*(273/Temp);// [kg/cubic m]\n", +"ScG = viscocity_G/(Density_G*Dg);\n", +"G = G_prime/Mavg_G;// [kmol/square m.s]\n", +"\n", +"// Liquid:\n", +"L_prime = 2.71;// [kg/square m.s]\n", +"ScL = viscocity_L/(Density_L*Dl);\n", +"\n", +"// Holdup:\n", +"// From Table 6.5 (Pg 206), L_prime = 2.71 kg/square m.s\n", +"Ds = 0.0472;// [m]\n", +"beeta = 1.508*Ds^0.376;\n", +"shiLsW = 5.014*10^(-5)/Ds^1.56;// [square m/cubic m]\n", +"shiLtW = (2.32*10^(-6))*(737.5*L_prime)^beeta/(Ds^2);// [square m/cubic m]\n", +"shiLoW = shiLtW-shiLsW;// [square m/cubic m]\n", +"H = (1404*(L_prime^0.57)*(viscocity_L^0.13)/((Density_L^0.84)*((3.24*L_prime^0.413)-1)))*(sigma/0.073)^(0.2817-0.262*log10(L_prime));\n", +"shiLo = shiLoW*H;// [square m/cubic m]\n", +"shiLs = 4.23*10^(-3)*(viscocity_L^0.04)*(sigma^0.55)/((Ds^1.56)*(Density_L^0.37));// [square m/cubic m]\n", +"shiLt = shiLo+shiLs;// [square m/cubic m]\n", +"\n", +"// Interfacial Area:\n", +"// From Table 6.4 (Pg 205)\n", +"m = 62.4;\n", +"n = (0.0240*L_prime)-0.0996;\n", +"p = -0.1355;\n", +"aAW = m*((808*G_prime/(Density_G^0.5))^n)*(L_prime^p);// [square m/cubic m]\n", +"// From Eqn. 6.73\n", +"aA = aAW*shiLo/shiLoW;// [square m/cubic m]\n", +"// From Table 6.3 (Pg 196)\n", +"e = 0.75;\n", +"// From Eqn. 6.71\n", +"eLo = e-shiLt;\n", +"// From Eqn. 6.70\n", +"deff('[y] = f9(Fg)','y = ((Fg*ScG^(2/3))/G)-1.195*((Ds*G_prime)/(viscocity_G*(1-eLo)))^(-0.36)');\n", +"Fg = fsolve(1,f9);// [kmol/square m.s]\n", +"// From Eqn. 6.72:\n", +"deff('[y] = f10(Kl)','y = (Kl*Ds/Dl)-(25.1*(Ds*L_prime/viscocity_L)^0.45)*ScL^0.5');\n", +"Kl = fsolve(1,f10);// [(kmol/square m.s).(kmol/cubic m)]\n", +"// Since the value of Kl is taken at low conc., it can be converted into Fl\n", +"c = (Density_L/Mavg_L);// [kmol/cubic m]\n", +"Fl = Kl*c;// [kmol/cubic m]\n", +"printf('The volumetric coeffecients are\n');\n", +"printf('Based on Gas Phase %f kmol/cubic m.s\n',Fg*aA);\n", +"printf('based on Liquid Phase %f kmol/cubic m.s\n',Fl*aA);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.7: Volumetric_Coeffecient_for_packed_towers.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 6.7\n", +"// Page: 207\n", +"\n", +"printf('Illustration 6.7 - Page: 207\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// Air\n", +"G_prime = 1.10;// [kg/square m.s]\n", +"viscocity_G = 1.8*10^(-5);// [kg/m.s]\n", +"ScG = 0.6;// [for air water mixture]\n", +"Temp1 = 273+20;// [K]\n", +"\n", +"// Water\n", +"L_prime = 5.5;// [kg/square m.s]\n", +"//*****//\n", +"\n", +"// Air:\n", +"Ma = 29;// [kg/kmol]\n", +"G = G_prime/Ma;// [kmol/square m.s]\n", +"Density_G = (Ma/22.41)*(273/Temp1);\n", +"Cpa = 1005;// [N.m/kg.K]\n", +"PrG = 0.74;\n", +"\n", +"// Liquid:\n", +"kth = 0.587;// [W/m.K]\n", +"Cpb = 4187;// [N.m/kg.K]\n", +"viscocity_L = 1.14*10^(-3);// [kg/m.s]\n", +"\n", +"// From Table 6.5 (Pg 206)\n", +"Ds = 0.0725;// [m]\n", +"beeta = 1.508*(Ds^0.376);\n", +"shiLtW = (2.09*10^(-6))*(737.5*L_prime)^beeta/(Ds^2);// [square m/cubic m]\n", +"shiLsW = 2.47*10^(-4)/(Ds^1.21);// [square m/cubic m]\n", +"shiLoW = shiLtW-shiLsW;// [square m/cubic m]\n", +"// From Table 6.4 (Pg 205)\n", +"m = 34.03;\n", +"n = 0;\n", +"p = 0.362;\n", +"aAW = m*(808*G_prime/Density_G^0.5)^(n)*L_prime^p;// [square m/cubic m]\n", +"// From Eqn. 6.75\n", +"aVW = 0.85*aAW*shiLtW/shiLoW;// [square m/cubic m]\n", +"// From Table 6.3\n", +"e = 0.74;\n", +"eLo = e-shiLtW;\n", +"// From Eqn. 6.70\n", +"deff('[y] = f11(Fg)','y = ((Fg*ScG^(2/3))/G)-1.195*((Ds*G_prime)/(viscocity_G*(1-eLo)))^(-0.36)');\n", +"Fg = fsolve(1,f11);// [kmol/square m.s]\n", +"// Since the liquid is pure water. It has no mass trnsfer coeffecient.\n", +"// For such process we need convective heat transfer coeffecient for both liquid & gas.\n", +"// Asuming Jd = Jh\n", +"// From Eqn. 6.70\n", +"Jh = 1.195*((Ds*G_prime)/(viscocity_G*(1-eLo)))^(-0.36);\n", +"Hg = Jh*Cpa*G_prime/(PrG^(2/3));// [W/square m.K]\n", +"PrL = Cpb*viscocity_L/kth;\n", +"// Heat transfer analog of Eqn. 6.72\n", +"Hl = 25.1*(kth/Ds)*(Ds*L_prime/viscocity_L)^0.45*PrL^0.5;// [W/square m.K]\n", +"printf('The volumetric coeffecients are\n');\n", +"printf('Based on Gas Phase %f W/cubic m.K\n',Hg*aVW);\n", +"printf('based on Liquid Phase %f W/cubic m.K\n',Hl*aVW);" + ] + } +], +"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/Mass_Transfer_Operations_by_R_E_Treybal/7-Humidification_Operation.ipynb b/Mass_Transfer_Operations_by_R_E_Treybal/7-Humidification_Operation.ipynb new file mode 100644 index 0000000..983fc29 --- /dev/null +++ b/Mass_Transfer_Operations_by_R_E_Treybal/7-Humidification_Operation.ipynb @@ -0,0 +1,994 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Humidification Operation" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10: Lewis_Relatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.10\n", +"// Page:241\n", +"\n", +"printf('Illustration 7.10 - Page:241\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"Tg = 60;// [OC]\n", +"Y_prime = 0.050;// [kg toulene/kg air]\n", +"//*****//\n", +"\n", +"// Wet Bulb temparature\n", +"Dab = 0.92*10^(-5);// [square m/s]\n", +"density_air = 1.060;// [kg/cubic cm];\n", +"viscocity_G = 1.95*10^(-5);// [kg/m.s]\n", +"Sc = viscocity_G/(density_air*Dab);\n", +"// From Eqn. 7.28\n", +"hG_by_kY = 1223*(Sc^0.567);// [J/kg.K]\n", +"// Soln. of Eqn. 7.26 by trial & error method:\n", +"// (Tg-Tw) = (Yas_prime-Y_prime)*(lambda_w/hG_by_kY)\n", +"Tw = 31.8;// [OC]\n", +"printf('Wet Bulb Temparature:%f OC\n',Tw);\n", +"\n", +"// Adiabatic Saturation Temparature\n", +"C_air = 1005;// [J/kg.K]\n", +"C_toulene = 1256;// [J/kg.K]\n", +"Cs = C_air+(C_toulene*Y_prime);// [J/kg.K]\n", +"// Soln. of Eqn. 7.21 by trial & error method:\n", +"// (Tg-Tas) = (Yas_prime-Y_prime)*(lambda_as/Cs)\n", +"Tas = 25.7;// [OC]\n", +"printf('Adiabatic Saturation Temparature: %f OC\n',Tas);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11: Adiabatic_Operations.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.11\n", +"// Page: 249\n", +"\n", +"printf('Illustration 7.11 - Page: 249\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"L_min = 2.27;// [kg/square m.s]\n", +"G_min = 2;// [kg/square m.s]\n", +"L2_prime = 15;// [kg/s]\n", +"Q = 270;// [W]\n", +"Templ2 = 45;// [OC]\n", +"Tempg1 = 30;// [OC]\n", +"Tempw1 = 24;// [OC]\n", +"Kya = 0.90;// [kg/cubic m.s]\n", +"//*******//\n", +"\n", +"H1_prime = 72;// [kJ/kg dry air]\n", +"Y1_prime = 0.0160;// [kg water/kg dry air]\n", +"Templ1 = 29;// [OC]\n", +"Cal = 4.187;// [kJ/kg]\n", +"// Equilibrium Data:\n", +"// Data = [Temp.(OC),H_star(kJ/kg)]\n", +"Data_star = [29 100;32.5 114;35 129.8;37.5 147;40 166.8;42.5 191;45 216];\n", +"// The operating line for least slope:\n", +"H2_star = 209.5;// [kJ/kg]\n", +"Data_minSlope = [Templ1 H1_prime;Templ2 H2_star];\n", +"deff('[y] = f14(Gmin)','y = ((L2_prime*Cal)/Gmin)-((H2_star-H1_prime)/(Templ2-Templ1))');\n", +"Gmin = fsolve(2,f14);// [kg/s]\n", +"Gs = 1.5*Gmin;// [kg/s]\n", +"// For the Operating Line:\n", +"y = deff('[y] = f15(H2)','y = ((H2-H1_prime)/(Templ2-Templ1))-((L2_prime*Cal)/Gs)');\n", +"H2 = fsolve(2,f15);// [kJ/kg dry air]\n", +"Data_opline = [Templ1 H1_prime;Templ2 H2];\n", +"scf(4);\n", +"plot(Data_star(:,1),Data_star(:,2),Data_minSlope(:,1),Data_minSlope(:,2),Data_opline(:,1),Data_opline(:,2));\n", +"xgrid();\n", +"legend('Equilibrium line','Minimum Flow Rate Line','Operating Line');\n", +"xlabel('Liquid Temperature, 0C');\n", +"ylabel('Enthalphy Of Air Water vapour, kJ / kg dry air');\n", +"// Tower cross section Area:\n", +"Al = L2_prime/L_min;// [square m]\n", +"Ag = Gs/G_min;// [square m]\n", +"A = min(Al,Ag);// [square m]\n", +"// Data from operating line:\n", +"// Data1 = [Temp.(OC),H_prime(kJ/kg)]\n", +"Data1 = [29 72;32.5 92;35 106.5;37.5 121;40 135.5;42.5 149.5;45 163.5];\n", +"// Driving Force:\n", +"Data2 = zeros(7,2);\n", +"// Data2 = [Temp[OC],driving Force]\n", +"for i = 1:7\n", +" Data2(i,1) = Data1(i,1);\n", +" Data2(i,2) = 10^2/(Data_star(i,2)-Data1(i,2));\n", +"end\n", +"// The data for operating line as abcissa is plotted against driving force;\n", +"Area = 3.25;\n", +"// From Eqn. 7.54\n", +"deff('[y] = f16(Z)','y = Area-(Kya*Z/G_min)');\n", +"Z = fsolve(2,f16);\n", +"printf('The height of tower is %f m\n',Z);\n", +"NtoG = 3.25;\n", +"HtoG = G_min/Kya;// [m]\n", +"\n", +"// Make up water\n", +"// Assuming the outlet air is essentially saturated:\n", +"Y2_prime = 0.0475;// [kg water/kg dry air]\n", +"E = G_min*(A)*(Y2_prime-Y1_prime);// [kg/s]\n", +"// Windage loss estimated as 0.2 percent\n", +"W = 0.002*L2_prime;// [kg/s]\n", +"ppm_blowdown = 2000;// [ppm]\n", +"ppm_makeup = 500;// [ppm]\n", +"// Since the weight fraction are proportional to the corresponding ppm values:\n", +"B = (E*ppm_makeup/(ppm_blowdown-ppm_makeup))-W;// [kg/s]\n", +"M = B+E+W;// [kg/s]\n", +"printf('The makeup water is estimated to be %f kg/s\n',M);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12: Adiabatic_Operations.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.12\n", +"// Page: 252\n", +"\n", +"printf('Illustration 7.12 - Page: 252\n\n')\n", +"// solution\n", +"\n", +"//****Data****//\n", +"Tempg1 = 32;// [OC]\n", +"Tempw1 = 28;// [OC]\n", +"//******//\n", +"\n", +"H1 = 90;// [kJ/kg]\n", +"H1_prime = 72;// [kJ/kg dry air]\n", +"H2_prime = 163.6;// [kJ/kg dry air]\n", +"deff('y = f17(H2)','y = (H2-H1)-(H2_prime-H1_prime)');\n", +"H2 = fsolve(2,f17);// [kJ/kg dry air]\n", +"// Slope of Operating Line same as Operating Line as Illustration 7.11\n", +"slopeOperat = (163.5-72)/(45-29);\n", +"deff('[y] = f18(Temp)','y = slopeOperat*(Temp-Tempg1)+H1');\n", +"Temp = 30:0.01:45;\n", +"// Equilibrium Data:\n", +"// Data = [Temp.(OC),H_star(kJ/kg)]\n", +"Data_star = [29 100;32.5 114;35 129.8;37.5 147;40 166.8;42.5 191;45 216];\n", +"scf(5);\n", +"plot(Data_star(:,1),Data_star(:,2),Temp,f18);\n", +"xgrid();\n", +"legend('Equilibrium Line','operating Line');\n", +"xlabel('Liquid Temperature, C');\n", +"ylabel('Enthalphy Of Air Water vapour, kJ/kg dry air');\n", +"// The Value for NtoG & HtoG will be same as in Illustration 7.11\n", +"NtoG = 3.25;\n", +"HtoG = 2.22;// [m]\n", +"// By hit & trial method:\n", +"Temp = 37.1;// [OC]\n", +"printf('The Temperature to which water is to be cooled is %f OC\n',Temp);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13: Recirculating_Liquid_Gas_Humididification.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.13\n", +"// Page: 254\n", +"\n", +"printf('Illustration 7.13\n\n');\n", +"\n", +"// solution\n", +"\n", +"// Given\n", +"Tempg1=65;// [OC]\n", +"Y1_prime=0.0170;// [kg water/kg dry air]\n", +"// Using adiabatic satursion line on Fig. 7.5 (Pg 232)\n", +"Tempas=32;// [OC]\n", +"Yas_prime=0.0309;// [kg water/kg dry air]\n", +"Tempg2=45;// [OC]\n", +"Z=2;// [m]\n", +"//*******//\n", +"\n", +"Y2_prime=0.0265;// [kg water/kg dry air]\n", +"deff('[y]=f19(Kya_by_Gs)','y=log((Yas_prime-Y1_prime)/(Yas_prime-Y2_prime))-(Kya_by_Gs*Z)');\n", +"Kya_by_Gs=fsolve(1,f19);// [1/m]\n", +"\n", +"// For the extended chamber:\n", +"Z=4;// [m]\n", +"deff('[y]=f20(Y2_prime)','y=log((Yas_prime-Y1_prime)/(Yas_prime-Y2_prime))-(Kya_by_Gs*Z)');\n", +"Y2_prime=fsolve(0.029,f20);//[kg water/kg dry air] \n", +"// With the same adiabatic curve:\n", +"Tempg2=34;// [OC]\n", +"printf('The Outlet Conditions are:\n');\n", +"printf('Absolute Humidity is %f kg water/kg dry air\n',Y2_prime);\n", +"printf('Dry Bulb Temperature is %f OC\n',Tempg2);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.14: Dehumidification_Of_Air_Water_Mixture.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.14\n", +"// Page: 256\n", +"\n", +"printf('Illustration 7.14 - Page: 256\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// a = N2 b = CO\n", +"// Entering gas\n", +"Y1_prime = 0;// [kg water/kg dry air]\n", +"Pt = 1;// [atm]\n", +"Tempg1 = 315;// [OC]\n", +"G_prime = 5;// [square m/s]\n", +"\n", +"// Temp of the tower:\n", +"Templ2 = 18;// [OC]\n", +"Density_L2 = 1000; //[kg/square m]\n", +"viscocity_L2 = 1.056*10^(-3);// [kg/m.s]\n", +"Tempg2 = 27;// [OC]\n", +"\n", +"Mb = 28;// [kg/kmol]\n", +"Ma = 18.02;// [kg/kmol]\n", +"Density_G1 = (Mb/22.41)*(273/(Tempg1+273));// [kg/square m]\n", +"G1 = G_prime*(Density_G1);// [kg/s]\n", +"\n", +"// Since the outlet gas is nearly saturated:\n", +"Y_prime = 0.024;// [kg water/kg dry air]\n", +"Y2_prime = 0.022;// [kg water/kg dry air, assumed]\n", +"G2 = G1*(1+Y2_prime);// [kg/s]\n", +"Mav = (1+Y2_prime)/((1/Mb)+(Y2_prime/Ma));// [kg/kmol]\n", +"Density_G2 = (Mav/22.4)*(273/(Templ2+273));// [kg/square m]\n", +"L2_by_G2 = 2;\n", +"abcissa = L2_by_G2*(Density_G2/(Density_L2-Density_G2))^(1/2);\n", +"// From Fig. 6.34:\n", +"// For a gas pressure drop of 400 N/square m/m\n", +"ordinate = 0.073;\n", +"// From Table 6.3:\n", +"Cf = 65;\n", +"J = 1;\n", +"deff('[y] = f21(G2_prime)','y = ((G2_prime^2)*Cf*(viscocity_L2^0.1)*J/(Density_G2*(Density_L2-Density_G2)))-ordinate');\n", +"// Tentative data:\n", +"G2_prime = fsolve(2,f21);// [kg/square m.s]\n", +"Area = G1/G2_prime;// [square m]\n", +"dia = sqrt(4*Area/%pi);// [m]\n", +"\n", +"// Final data:\n", +"dia = 1.50;// [m]\n", +"Area = %pi*dia^2/4;// [square m]\n", +"Gs_prime = G1/Area;// [kg/square m.s]\n", +"G2_prime = G2/Area;// [kg/square m.s]\n", +"L2_prime = L2_by_G2*G2_prime;// [kg/square m.s]\n", +"// From Eqn. 7.29:\n", +"deff('[y] = f22(L1_prime)','y = (L2_prime-L1_prime)-(Gs_prime*(Y2_prime-Y1_prime))');\n", +"L1_prime = fsolve(2,f22);\n", +"Cb = 1089;// [J/kg.K]\n", +"Ca = 1884;// [J/kg.K]\n", +"Cs1 = Cb+(Y1_prime*Ca);// [J/(kg dry air).K]\n", +"Cs2 = Cb+(Y2_prime*Ca);// [J/(kg dry air).K]\n", +"Tempo = Templ2;// [base temp.,K]\n", +"lambda = 2.46*10^6;// [J/kg]\n", +"CaL = 4187;// [J/kg K]\n", +"// From Eqn. 7.31:\n", +"deff('[y] = f23(Templ1)','y = ((L2_prime*CaL*(Templ2-Tempo))+(Gs_prime*Cs1*(Tempg1-Tempo)))-((L1_prime*CaL*(Templ1-Tempo))+(Gs_prime*(Cs2*(Tempg2-Tempo))+(Y2_prime*lambda)))');\n", +"Templ1 = fsolve(2,f23);\n", +"// At Templ1 = 49.2 OC\n", +"viscocity_L = 0.557*10^(-3);// [kg/m.s]\n", +"Density_L = 989;// [kg/square m]\n", +"K = 0.64;// [w/m.K]\n", +"Prl = CaL*viscocity_L/K;\n", +"\n", +"// For Entering Gas:\n", +"viscocity_G1 = 0.0288*10^(-3);// [kg*/m.s]\n", +"Dab = 0.8089*10^(-4);// [square m/s]\n", +"ScG = viscocity_G1/(Density_G1*Dab);\n", +"PrG = 0.74;\n", +"\n", +"// From Illustration 6.7:\n", +"a = 53.1;// [square m/square m]\n", +"Fga = 0.0736;// [kmol/square m]\n", +"Hga = 4440;// [W/square m.K]\n", +"Hla = 350500;// [W/square m.K]\n", +"// At the bottom, by several trial:\n", +"Tempi = 50.3;// [OC]\n", +"pai = 93.9/760;// [atm]\n", +"paG = 0;// [atm]\n", +"// By Eqn. 7.64:\n", +"dY_prime_by_dZ = -(Ma*Fga/Gs_prime)*log((1-(pai/Pt))/(1-(paG/Pt)));// [(kg H2O/kg dry gas)/m]\n", +"Hg_primea = -(Gs_prime*Ca*dY_prime_by_dZ)/(1-exp((Gs_prime*Ca*dY_prime_by_dZ)/(Hga)));// [W/square m.K]\n", +"dTempg_by_dZ = -(Hg_primea*(Tempg1-Tempi)/(Gs_prime*Cs1));// [OC/m]\n", +"Tempi = (Templ1)+((Gs_prime*(Cs1*dTempg_by_dZ)+((Ca*(Tempg1))-(CaL*(Templ1))+(((CaL-Ca)*(Tempo))+lambda))*dY_prime_by_dZ)/((Gs_prime*CaL*dY_prime_by_dZ)-Hla));// [OC]\n", +"// Assume:\n", +"delta_Tempg = -30;// [OC]\n", +"delta_Z = delta_Tempg/(dTempg_by_dZ);// [m]\n", +"Tempg = Tempg1+delta_Tempg;// [OC]\n", +"Y_prime = Y1_prime+(dY_prime_by_dZ)*delta_Z;// [kg H2O/kg dry gas]\n", +"paG = Y_prime/(Y_prime+(Ma/Mb));// [atm]\n", +"Cs = Cb+Ca*(Y_prime);// [J/(kg dry air).K]\n", +"// Water balance, From Eqn. 7.29:\n", +"deff('[y] = f24(L_prime)','y = (L2_prime-L_prime)-(Gs_prime*(Y_prime-Y1_prime))');\n", +"L_prime = fsolve(2,f24);// [kg/square m.s]\n", +"\n", +"deff('[y] = f25(Templ)','y = ((L_prime*CaL*(Templ-Tempo))+(Gs_prime*Cs1*(Tempg1-Tempo)))-((L1_prime*CaL*(Templ1-Tempo))+(Gs_prime*(Cs*(Tempg-Tempo))+(Y_prime*lambda)))');\n", +"Templ = fsolve(2,f25);\n", +"// This process is repeated several times until gas temp falls to Tempg2\n", +"// The value of Y2_prime was calculated to be 0.0222 which is sufficiently close to the assumed value.\n", +"// Z = sum of all delta_Z\n", +"Z = 1.54;// [m]\n", +"printf('The diameter of tower is %f m\n',dia);\n", +"printf('The packed height is %f m\n',Z);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.15: Nonadiabatic_Operation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.15\n", +"// Page: 267\n", +"\n", +"printf('Illustration 7.15 - Page: 267\n\n');\n", +"\n", +"// solution\n", +"\n", +"//***Data***//\n", +"w = 0.75;// [m]\n", +"OD = 19.05/1000;// [m]\n", +"l = 3.75;// [m]\n", +"n = 20;\n", +"t = 1.65/1000;// [m]\n", +"Ws = 2.3;// [kg/s]\n", +"Wal = 10;// [kg/s]\n", +"Wt = 4;// [kg/s]\n", +"Density = 800;// [kg/cubic m]\n", +"viscocity = 0.005;// [kg/m.s]\n", +"K = 0.1436;// [W/m.K]\n", +"Ct = 2010;// [J/kg.K]\n", +"Cal = 4187;// [J/kg.K]\n", +"Y1_prime = 0.01;// [kg H2O/kg dry air]\n", +"Y2_prime = 0.06;// [kg H2O/kg dry air]\n", +"TempT = 95;// [OC]\n", +"//*****//\n", +"\n", +"Free_area = (w-(n*OD))*l;// [square m]\n", +"Gs_min = 2.3/Free_area;// [kg/square m.s]\n", +"Yav_prime = (Y1_prime+Y2_prime)/2;// [kg H2O/kg dry air]\n", +"// From Eqn. 7.86:\n", +"ky = 0.0493*(Gs_min*(1+Yav_prime))^0.905;// [kg/square m.s.delta_Y_prime]\n", +"// From Fig. 7.5:\n", +"H1_prime = 56000;// [J/kg]\n", +"Ao = 400*%pi*OD*l;// [square m]\n", +"// Cooling water is distributed over 40 tubes & since tubes are staggered\n", +"geta = Wal/(40*2*l);// [kg/m.s]\n", +"geta_by_OD = geta/OD;// [kg/square m.s]\n", +"// Assume:\n", +"TempL = 28;// [OC]\n", +"// From Eqn. 7.84:\n", +"hL_prime = (982+(15.58*TempL))*(geta_by_OD^(1/3));// [W/square m.K]\n", +"// From Eqn. 7.85:\n", +"hL_dprime = 11360;// [W/square m.K]\n", +"// From Fig. 7.5 (Pg 232)\n", +"m = 5000;// [J/kg.K]\n", +"Ky = 1/((1/ky)+(m/hL_dprime));\n", +"ID = (OD-(2*t));// [m]\n", +"Ai = %pi*(ID^2)/4;// [square m]\n", +"Gt_prime = Wt/(n*Ai);// [kg/square m.s]\n", +"Re = ID*Gt_prime/viscocity;\n", +"Pr = Ct*viscocity/K;\n", +"// From a standard correlation:\n", +"hT = 364;// [W/square m.K]\n", +"Dav = (ID+OD)/2;// [m]\n", +"Zm = (OD-ID)/2;// [m]\n", +"Km = 112.5;// [W/m.K]\n", +"// From Eqn. 7.67:\n", +"Uo = 1/((OD/(ID*hT))+((OD/Dav)*(Zm/Km))+(1/hL_prime));// [W/square m.K]\n", +"// From Eqn. 7.75:\n", +"alpha1 = -(((Uo*Ao)/(Wt*Ct))+((Uo*Ao)/(Wal*Cal)));\n", +"alpha2 = m*Uo*Ao/(Wt*Ct);\n", +"// From Eqn. 7.76:\n", +"beeta1 = Ky*Ao/(Wal*Cal);\n", +"beeta2 = -((m*Ky*Ao/(Wal*Cal))-(Ky*Ao/Ws));\n", +"y = deff('[y] = f26(r)','y = (r^2)+((alpha1+beeta2)*r)+((alpha1*beeta2)-(alpha2*beeta1))');\n", +"r1 = fsolve(10,f26);\n", +"r2 = fsolve(0,f26);\n", +"beeta2 = 1.402;\n", +"// From Eqn. 7.83:\n", +"// N1-(M1*(r1+alpha1)/beeta1) = 0............................................(1)\n", +"// N2-(M2*(r2+alpha2)/beeta2) = 0............................................(2)\n", +"// From Eqn. 7.77:\n", +"// At the top:\n", +"x1 = 1;\n", +"// TempL2+(M1*exp(r1*x1))+(M2*exp(-(r2*x1))) = TempL.........................(3)\n", +"// From Eqn. 7.78:\n", +"// At the bottom:\n", +"x2 = 0;\n", +"// H1_star-N1-N2 = H1_prime..................................................(4)\n", +"// From Eqn. 7.80:\n", +"// ((M1/r1)*(exp(r1)-1))+((M2*r2)*(exp(r2)-1)) = (Tempt-TempL)...............(5)\n", +"// From Eqn. 7.81:\n", +"// ((N1/r1)*(exp(r1)-1))+((N2*r2)*(exp(r2)-1)) = (H1_star-H1_prime)..........(6)\n", +"// From Eqn. 7.91 & Eqn. 7.92:\n", +"// Uo*Ao*(TempT-TempL)=Ky*Ao*(H1_star-H1_prime)..............................(7)\n", +"\n", +"// Elimination of M's & N's by solving Eqn. (1) to (4) and (7) simultaneously:\n", +"// and from Fig. 7.5 (Pg 232):\n", +"TempL1=28;// [OC]\n", +"H1_star=(Uo*Ao*(TempT-TempL)/(Ky*Ao))+H1_prime;// [J/kmol]\n", +"// Solving (1) to (4) simultaneously:\n", +"a = [1 -(r1+alpha1)/beeta1 0 0;0 0 1 -(r2+alpha1)/beeta1;0 exp(r1*x1) 0 exp(r2*x1);1 0 1 0];\n", +"b = [0;0;TempT-TempL1;H1_star-H1_prime];\n", +"soln = a\b;\n", +"N1 = soln(1);\n", +"M1 = soln(2);\n", +"N2 = soln(3);\n", +"M2 = soln(4);\n", +"// By Eqn. 5\n", +"delta_Temp = ((M1/r1)*(exp(r1)-1))+((M2*r2)*(exp(r2)-1));// [OC]\n", +"Q = Uo*delta_Temp*Ao;\n", +"TempT1 = TempT-(Q/(Wt*Ct));// [OC]\n", +"H2_prime = Q/(Ws)+H1_prime;// [J/kg]\n", +"printf('Temparature to which oil was cooled: %f OC\n',TempT1);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1: Interpolation_Between_Data.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.1\n", +"// Page: 222\n", +"\n", +"printf('Illustration 7.1 - Page: 222\n\n');\n", +"\n", +"// Solution\n", +"\n", +"// ****Data****//\n", +"Temp1 = 273+26.1;// [K]\n", +"P1 = 100;// [mm Hg]\n", +"Temp2 = 273+60.6;// [K]\n", +"P2 = 400;// [mm Hg]\n", +"P = 200;// [mm Hg]\n", +"//*****//\n", +"\n", +"deff('[y] = f12(T)','y = ((1/Temp1)-(1/T))/((1/Temp1)-(1/Temp2))-((log(P1)-log(P))/(log(P1)-log(P2)))');\n", +"T = fsolve(37,f12);// [K]\n", +"printf('At %f 0C, the vapour pressure of benzene is 200 mm Hg\n',T-273);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: Reference_Substance_Plots.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.2:\n", +"// Page: 223\n", +"\n", +"printf('Illustration 7.2 - Page: 223\n\n');\n", +"printf('Illustration 7.2 (b)\n\n');\n", +"\n", +"// Solution (b)\n", +"\n", +"// At 100 OC,\n", +"PH2O = 760;// [Vapour pressure of water, mm of Hg]\n", +"// From Fig. 7.2 (Pg 224)\n", +"// At this value,\n", +"PC6H6 = 1400;// [Vapour pressure of benzene, mm of Hg]\n", +"printf('Vapour Pressure of benzene at 100 OC is %d mm of Hg\n\n', PC6H6);\n", +"\n", +"printf('Illustration 7.2 (c)\n\n');\n", +"\n", +"// Solution (c)\n", +"\n", +"// Reference: H20\n", +"// At 25 OC\n", +"m = 0.775;\n", +"Mr = 18.02;// [kg/kmol]\n", +"lambdar = 2443000;// [N/m.kg]\n", +"M = 78.05;// [kg/kmol]\n", +"// From Eqn. 7.6:\n", +"lambda = m*lambdar*Mr/M;// [N/m.kg]\n", +"printf('Latent Heat of Vaporization at 25 OC is %f kN/m.kg\n',lambda/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3: Enthalpy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.3\n", +"// Page: 226\n", +"\n", +"printf('Illustration 7.3 - Page: 226\n\n');\n", +"\n", +"// solution\n", +"\n", +"// ****Data****//\n", +"m = 10;// [kg]\n", +"Cvap = 1.256;// [kJ/kg.K]\n", +"Cliq = 1.507;// [kJ/kg.K]\n", +"Temp1 = 100;// [OC]\n", +"Temp4 = 10;// [OC]\n", +"//******//\n", +"\n", +"// Using Fig 7.2 (Pg 224):\n", +"Temp2 = 25;// [OC]\n", +"// Using the notation of Fig. 7.3:\n", +"H1_diff_H2 = Cvap*(Temp1-Temp2);// [kJ/kg]\n", +"// From Illustration 7.2:\n", +"H2_diff_H3 = 434;// [Latent Heat of Vaporisation, kJ/kg]\n", +"H3_diff_H4 = Cliq*(Temp2-Temp4);// [kJ/kg]\n", +"H1_diff_H4 = H1_diff_H2+H2_diff_H3+H3_diff_H4;// [kJ/kg]\n", +"H = m*H1_diff_H4;// [kJ]\n", +"printf('Heat evolved for 10 kg Benzene is %f kJ\n',H);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4: Vapour_Gas_Mixture.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.4\n", +"// Page: 227\n", +"\n", +"printf('Illustration 7.4 - Page: 227\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// A = benzene vapour; B = Nitrogen Gas\n", +"P = 800;// [mm Hg]\n", +"Temp = 273+60;// [K]\n", +"pA = 100;// [mm Hg]\n", +"//******//\n", +"\n", +"pB = P-pA;// [mm Hg]\n", +"MA = 78.05;// [kg/kmol]\n", +"MB = 28.08;// [kg/kmol]\n", +"\n", +"// Mole Fraction\n", +"printf('On the Basis of Mole Fraction\n');\n", +"yAm = pA/P;\n", +"yBm = pB/P;\n", +"printf('Mole Fraction of Benzene is %f\n',yAm);\n", +"printf('Mole Fraction of Nitrogen is %f\n',yBm);\n", +"printf('\n');\n", +"\n", +"// Volume Fraction\n", +"printf('On the Basis of Volume Fraction\n');\n", +"// Volume fraction is same as mole Fraction\n", +"yAv = yAm;\n", +"yBv = yBm;\n", +"printf('Volume Fraction of Benzene is %f\n',yAv);\n", +"printf('Volume Fraction of Nitrogen is %f\n',yBv);\n", +"printf('\n');\n", +"\n", +"// Absolute Humidity\n", +"printf('On the basis of Absolute humidity\n')\n", +"Y = pA/pB;// [mol benzene/mol nitrogen]\n", +"Y_prime = Y*(MA/MB);// [kg benzene/kg nitrogen]\n", +"printf('The concentration of benzene is %f kg benzene/kg nitrogen\n',Y_prime);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5: Saturated_Vapour_Gas_Mixture.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.5\n", +"// Page: 228\n", +"\n", +"printf('Illustration 7.5 - Page: 228\n\n');\n", +"\n", +"printf('Illustration 7.5 (a)\n\n');\n", +"// solution(a)\n", +"\n", +"//****Data****//\n", +"// A = benzene vapour; B = Nitrogen Gas\n", +"P = 1;// [atm]\n", +"//*****//\n", +"\n", +"MA = 78.05;// [kg/kmol]\n", +"MB = 28.02;// [kg/kmol]\n", +"// Since gas is saturated, from Fig. 7.2 (Pg 224):\n", +"pA = 275/760;// [atm]\n", +"Y = pA/(P-pA);// [kmol benzene/kmol nitrogen]\n", +"Y_prime = Y*(MA/MB);// [kg benzene/kg nitrogen]\n", +"printf('The concentration of benzene is %f kg benzene/kg nitrogen\n\n',Y_prime);\n", +"\n", +"printf('Illustration 7.5 (b)\n\n');\n", +"// solution(b)\n", +"\n", +"// A = benzene vapour; B = CO2\n", +"MA = 78.05;// [kg/kmol]\n", +"MB = 44.01;// [kg/kmol]\n", +"// Since gas is saturated, from Fig. 7.2:\n", +"pA = 275/760;// [atm]\n", +"Y = pA/(P-pA);// [kmol benzene/kmol CO2]\n", +"Y_prime = Y*(MA/MB);// [kg benzene/kg CO2]\n", +"printf('The concentration of benzene is %f kg benzene/kg CO2\n',Y_prime);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6: Air_Water_System.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.6\n", +"// Page: 234\n", +"\n", +"printf('Illustration 7.6 - Page: 234\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// A = water vapour; B = air\n", +"TempG = 55;// [OC]\n", +"P = 1.0133*10^(5);// [N/square m]\n", +"Y_prime = 0.030;// [kg water/kg dry air]\n", +"//******//\n", +"\n", +"MA = 18.02;// [kg/kmol]\n", +"MB = 28.97;// [kg/kmol]\n", +"\n", +"// Percent Humidity\n", +"// From psychrometric chart, at 55 OC\n", +"Ys_prime = 0.115;// [kg water/kg dry air]\n", +"percent_Humidity = (Y_prime/Ys_prime)*100;\n", +"printf('The sample has percent Humidity = %f %%\n',percent_Humidity);\n", +"\n", +"// Molal Absolute Humidity\n", +"Y = Y_prime*(MB/MA);// [kmol water/kmol dry air]\n", +"printf('Molal Absolute Humidity of the sample is %f kmol water/kmol dry air\n',Y);\n", +"\n", +"// Partial Pressure\n", +"pA = Y*P/(1+Y);// [N/square m]\n", +"printf('The Partial Pressure Of Water is %f N/square m\n',pA);\n", +"\n", +"// Relative Humidity\n", +"pa = 118*133.3;// [vapour pressure of water at 55 OC,N/square m]\n", +"relative_Humidity = (pA/pa)*100;\n", +"printf('The sample has relative Humidity = %f %%\n',relative_Humidity);\n", +"\n", +"// Dew Point\n", +"// From psychrometric chart,\n", +"dew_point = 31.5;// [OC]\n", +"printf('Dew point Of the Sample is %f Oc\n',dew_point);\n", +"\n", +"// Humid Volume\n", +"// At 55 OC\n", +"vB = 0.93;// [specific volume of dry air,cubic m/kg]\n", +"vsB = 1.10;// [specific volume of saturated air,cubic m/kg]\n", +"vH = vB+((vsB-vB)*(percent_Humidity/100));// [cubic m/kg]\n", +"printf('The Humid Volume of the Sample is %f cubic m/kg\n',vH);\n", +"\n", +"// Humid Heat\n", +"CB = 1005;// [J/kg.K]\n", +"CA = 1884;// [J/kg.K]\n", +"Cs = CB+(Y_prime*CA);// [J/kg]\n", +"printf('The Humid Heat is %f J/kg dry air.K\n',Cs);\n", +"\n", +"// Enthalpy\n", +"HA = 56000;// [J/kg dry air]\n", +"HsA = 352000;// [J/kg dry air]\n", +"H_prime = HA+((HsA-HA)*(percent_Humidity/100));// [J/kg dry air]\n", +"printf('The Enthalphy of the sample is %f J/kg dry air\n',H_prime);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7: Air_Water_System.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.7\n", +"// Page: 236\n", +"\n", +"printf('Illustration 7.7 - Page: 236\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// A = water vapour; B = air\n", +"V = 100;// [m^3]\n", +"Tempi = 55;// [OC]\n", +"Tempf = 110;// [OC]\n", +"//*****//\n", +"\n", +"// From Illustration 7.6\n", +"vH = 0.974;// [m^3/kg]\n", +"Cs = 1061.5;// [J/kg]\n", +"WB = V/vH;// [kg]\n", +"Q = WB*Cs*(Tempf-Tempi);// [J]\n", +"printf('Heat recquired is %e J\n',Q);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8: Adiabatic_Saturation_Curves.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.8\n", +"// Page: 237\n", +"\n", +"printf('Illustration 7.8 - Page: 237\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"Y_prime1 = 0.030;// [kg water/kg dry air]\n", +"Temp1 = 83;// [OC]\n", +"//*******//\n", +"\n", +"// From the psychrometric chart, the condition at 90 OC\n", +"Temp2 = 41.5;// [OC]\n", +"Y_prime2 = 0.0485;// [kg water/kg dry air]\n", +"printf('The Outlet Air condition are:\n');\n", +"printf('Temp. = %f OC\n',Temp2);\n", +"printf('Absolute Humidity = %f kg water/kg dry air\n',Y_prime2);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9: Lewis_Relatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 7.9\n", +"// Page:240\n", +"\n", +"printf('Illustration 7.9 - Page:240\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"Tempw = 35;// [OC]\n", +"Tempg = 65;// [OC]\n", +"//******//\n", +"\n", +"// From psychrometric chart\n", +"lambda_w = 2419300;// [J/kg]\n", +"Y_prime_w = 0.0365;// [kg H2O/kg dry air]\n", +"// From fig 7.5(a)\n", +"hG_by_kY = 950;// [J/kg]\n", +"// From Eqn. 7.26\n", +"deff('[y] = f13(Y_prime)','y = (Tempg-Tempw)-((lambda_w*(Y_prime_w-Y_prime))/hG_by_kY)');\n", +"Y_prime = fsolve(2,f13);// [kg H2O/kg dry air]\n", +"printf('Humidity of air is %f kg H2O/kg dry air\n',Y_prime);" + ] + } +], +"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/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 +} diff --git a/Mass_Transfer_Operations_by_R_E_Treybal/9-Distillation.ipynb b/Mass_Transfer_Operations_by_R_E_Treybal/9-Distillation.ipynb new file mode 100644 index 0000000..d4d6e55 --- /dev/null +++ b/Mass_Transfer_Operations_by_R_E_Treybal/9-Distillation.ipynb @@ -0,0 +1,1713 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Distillation" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.10: Optimum_Reflux_Ratio_McCabe_Thiele_Method.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 9.10\n", +"// Page: 412\n", +"\n", +"printf('Illustration 9.10 - Page: 412\n\n');\n", +"\n", +"// solution\n", +"\n", +"// a:methanol b:water\n", +"Ma = 32.04;// [kg/kmol]\n", +"Mb = 18.02;// [kg/kmol]\n", +"// Feed:\n", +"F1 = 5000;// [kg/h]\n", +"F = 216.8;// [kmol/h]\n", +"Tempo = 19.7;// [OC]\n", +"zF = 0.360;// [mole fraction methanol]\n", +"MavF = 23.1;// [kg/kmol]\n", +"Tempf = 58.3;// [OC]\n", +"// Distillate:\n", +"D1 = 2620;// [kg/h]\n", +"D = 84.4;// [kkmol/h]\n", +"xD = 0.915;// [mole fraction methanol]\n", +"// Residue:\n", +"R1 = 2380;// [kg/h]\n", +"R = 132.4;// [kmol/h]\n", +"xW = 0.00565;// [mole fraction methanol]\n", +"\n", +"// From Fig. 9.42 (Pg 413):\n", +"BtF = 76.0;// [Bubble point if the feed, OC]\n", +"DtF = 89.7;// [Dew point of the feed, OC]\n", +"// Latent heat of vaporisation at 76 OC\n", +"lambda_a = 1046.7;// [kJ/kg]\n", +"lambda_b = 2284;// [kJ/kg]\n", +"ha = 2.721;// [kJ/kg K]\n", +"hb = 4.187;// [kJ/kg K]\n", +"hF = 3.852;// [kJ/kg K]\n", +"// If heats of solution is ignaored:\n", +"// Enthalpy of the feed at the bubble point referred to the feed temp.\n", +"HF = hF*MavF*(BtF-Tempf);// [kJ/kmol]\n", +"// enthalpy of the saturated vapour at dew point referred to the liquid at feed temp.\n", +"HL = (zF*((ha*Ma*(DtF-Tempf))+(lambda_a*Ma)))+((1-zF)*((hb*Mb*(DtF-Tempf))+(lambda_b*Mb)));// [kJ/kmol]\n", +"q = HL/(HL-HF);\n", +"slope = q/(q-1);\n", +"// In fig. 9.42: xD,xW & zF are located on the 45 degree diagonal & the q line is drawn with slope = 'slope' .\n", +"// The operating line for minimum reflux ratio in this case pass through the intersection of the q line and the equilibrium curve.\n", +"ordinate = 0.57;\n", +"deff('[y] = f62(Rm)','y = ordinate-(xD/(Rm+1))');\n", +"Rm = fsolve(0,f62);// [mole reflux/mole distillate]\n", +"// from fig. 9.42 (Pg 413):\n", +"// The minimum number of theoretical trays is determied using the 45 degree diagonal as operating line.\n", +"Np = 4.9;// [including the reboiler]\n", +"R = 1.5*Rm;// [mole reflux/mole distillate]\n", +"// From Eqn. 9.49:\n", +"L = R*D;// [kmol/h]\n", +"// From Eqn. 9.115:\n", +"G = D*(R+1);// [kmol/h]\n", +"// From Eqn. 9.126:\n", +"L_bar = (q*F)+L;// [kmol/h]\n", +"// From Eqn. 9.127:\n", +"G_bar = (F*(q-1))+G;// [kmol/h]\n", +"ordinateN = xD/(R+1);\n", +"// As in Fig. 9.43:\n", +"// The y-intercept = ordinateN and enriching and exhausting operating lines are plotted.\n", +"// Number of theoretical stages are determined.\n", +"NpN = 8.8;// [including the reboiler]\n", +"printf('Number of theoretical stages is %f\n',NpN-1);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.11: Suitable_Reflux_Ratio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 9.11\n", +"// Page: 423\n", +"\n", +"printf('Illustration 9.11 - Page: 423\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// a:ethanol b:water\n", +"zF = 0.3;\n", +"xa = 0.3;// [mole fraction of ethanol]\n", +"Temp = 78.2;// [OC]\n", +"Ao = 0.0462;// [Area of perforations,square m]\n", +"t = 0.450;// [m]\n", +"//******//\n", +"\n", +"Ma = 46.05;// [kg/kmol]\n", +"Mb = 18.02;// [kg/kmol]\n", +"xb = 1-xa;// [mole fraction of water]\n", +"ma = 0.3*Ma/((0.3*Ma)+(xb*Mb));// [mass fraction of ethanol]\n", +"mb = 1-ma;// [mass fraction of water]\n", +"\n", +"\n", +"// Feed:\n", +"F1 = 910;// [kg/h]\n", +"Xa = F1*ma/Ma;// [moles of ethanol]\n", +"Xb = F1*mb/Mb;// [moles of water]\n", +"F = Xa+Xb;// [Total moles]\n", +"// Distillate:\n", +"xD = 0.80;// [mole fraction of ethanol]\n", +"// If essentially all the ethanol is removed from the residue:\n", +"D = Xa/xD;// [kmol/h]\n", +"MavD = (xD*Ma)+((1-xD)*Mb);// [kg/kmol]\n", +"D1 = D*MavD;// [kg/h]\n", +"Density_G = (MavD/22.41)*(273/(273+Temp));// [kg/cubic meter]\n", +"Density_L = 744.9;// [kg/cubic meter]\n", +"sigma = 0.021;// [N/m]\n", +"\n", +"// From Table 6.2,Pg 169:\n", +"alpha = (0.0744*t)+0.01173;\n", +"beeta = (0.0304*t)+0.015;\n", +"At = %pi*(0.760^2)/4;// [Tower cross sectional Area, square m]\n", +"WByT = 530/760;// [Table 6.1, Pg 162]\n", +"Ad = 0.0808*At;// [Downspout area,square m]\n", +"Aa = At-(2*Ad);// [Active area,square m]\n", +"// abcissa = (L/G)*(density_G/Density_L)^0.5\n", +"// Assume:\n", +"abcissa = 0.1;\n", +"// From Eqn.6.30:\n", +"Cf = (alpha*log10(1/abcissa)+beeta)*(sigma/0.020)^0.2;\n", +"// From Eqn. 6.29:\n", +"Vf = Cf*((Density_L-Density_G)/Density_G)^(1/2);// [m/s]\n", +"An = At-Ad;// [square m]\n", +"R = 3;// [Reflux Ratio]\n", +"G = D*(R+1);\n", +"G1 = (G*22.41/3600)*((273+Temp)/273);// [cubic meter/s]\n", +"V = G1/An;// [Vapour velocity,m/s]\n", +"percent = (V/Vf)*100;\n", +"// Vapour velocity is 58 percent of flooding velocity (amply safe)\n", +"L = R*D;// [kmol/h]\n", +"L1 = L*MavD;// [kg/h]\n", +"abcissa = (L1/(G1*3600*Density_G))*(Density_G/Density_L)^0.5;\n", +"// Since the value of abcissa is less than0.1, the calculaed value of Cf is correct.\n", +"// Since the feed is at the buubble point.\n", +"q = 1;\n", +"// From Eqn. 9.126:\n", +"L_bar = L+(q*F);// [kmol/h]\n", +"// From Eqn. 9.127:\n", +"G_bar = G+F*(q-1);// [kmol/h]\n", +"// The enthalpy of saturated steam,referred to 0 OC,69 kN/square m:\n", +"HGNpPlus1 = 2699;// [kN m/kg]\n", +"// This will be the enthalpy as it enters the tower if expanded adiabatically to the tower pressure\n", +"// The enthalpy of steam at 1 std. atm:\n", +"HGsat = 2676;// [kN m/kg]\n", +"lambda = 2257;// [kN m/kg]\n", +"// From Eqn. 9.140:\n", +"deff('[y] = f63(GNpPlus1_bar)','y = G_bar-(GNpPlus1_bar*(1+((HGNpPlus1-HGsat)*Mb/(lambda*Mb))))');\n", +"GNpPlus1_bar = fsolve(7,f63);\n", +"// From Eqn. 9.141:\n", +"LNp_bar = L_bar-(G_bar-GNpPlus1_bar);\n", +"\n", +"// Tray Efficiencies:\n", +"// Consider the situation:\n", +"x = 0.5;\n", +"y_star = 0.962;\n", +"Temp = 79.8;// [OC]\n", +"// This is in the enriching section.\n", +"Density_L = 791;// [kg/cubic meter]\n", +"Density_G = 1.253;// [kg/cubic meter]\n", +"// From equilibrium data:\n", +"m = 0.42;\n", +"A = L/(m*G);\n", +"// From chapter 2:\n", +"ScG = 0.930;\n", +"Dl = 2.065*10^(-9);// [square m/s]\n", +"// For L = 38.73 kmol/h\n", +"q = 4.36*10^(-4);// [cubic meter/s]\n", +"// For G = 51.64 kmol/h\n", +"Va = 1.046;// [m/s]\n", +"// From tray dimensions:\n", +"z = 0.647;// [m]\n", +"Z = 0.542;// [m]\n", +"hW = 0.06;// [m]\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.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.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;\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", +"// Entrainment is neglible:\n", +"// Similarly for other x\n", +"// Value = [x Entrainment]\n", +"Value = [0 0.48;0.1 .543;0.3 0.74;0.5 EMG;0.7 0.72];\n", +"\n", +"// Tray Calculation:\n", +"op_intercept = xD/(R+1);\n", +"// From Fig. 9.48:\n", +"// The exhausting section operating line, on this scale plot, for all practical purposes passes through the origin.\n", +"// The broken curve is located so that, at each concentration, vertical distances corresponding to lines BC and AC are in the ratio of EMG.\n", +"// This curve is used instead of equilibrium trays to locate the ideal trays.\n", +"// The feed tray is thirteenth.\n", +"x14 = 0.0150;\n", +"alpha = 8.95;\n", +"EMG = 0.48;\n", +"A_bar = L_bar/(alpha*G_bar);\n", +"// From Eqn. 8.16:\n", +"Eo = log(1+(EMG*((1/A_bar)-1)))/log(1/A_bar);\n", +"// The 6 real trays corresponds to: \n", +"NRp = 6*Eo;\n", +"xW = 0.015/((exp(NRp*log(1/A_bar))-A_bar)/(1-A_bar));// [mole fraction ethanol]\n", +"// This corresponds to ethanol loss of 0.5 kg/day.\n", +"printf('The Reflux ratio of %d will cause the ethanol loss of 0.5 kg/day\n',R);\n", +"printf('Larger reflux ratios would reduce this, but the cost of additional steam will probaby make them not worthwile.\n');\n", +"printf('Smaller values of R, with corresponding reduced steam cost and larger ethanol loss, should be considered, but care must be taken to ensure vapour velocities above the weeping velocities.');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.12: Dimension_of_Packed_Section.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 9.12\n", +"// Page: 429\n", +"\n", +"printf('Illustration 9.12 - Page: 429\n\n');\n", +"\n", +"// solution\n", +"\n", +"// a:methanol b:water\n", +"// Vapour and liquid quantities throughout the tower, as in Illustration 9.8, with the Eqn. 9.62, 9.64, 9.72, 9.74:\n", +"// Data = [x tL(OC) y tG(OC) Vapor(kmol/h) Vapor(kg/h) Liquid(kmol/h) Liquid(kg/h)]\n", +"Ma = 34.02;// [kg/kmol]\n", +"Mb = 18.02;// [kg/kmol]\n", +"Temp = 78.7;// [OC]\n", +"x = [0.915 0.600 0.370 0.370 0.200 0.100 0.02];\n", +"y = [0.915 0.762 0.656 0.656 0.360 0.178 0.032];\n", +"scf(17);\n", +"plot(x,y);\n", +"xgrid();\n", +"xlabel('mole fraction of methanol in liquid');\n", +"ylabel('mole fraction of methanol in vapour');\n", +"title('Operating Line curve');\n", +"//x = 0.370: the dividing point between stripping and enriching section\n", +"tL = [66 71 76 76 82 87 96.3];// [Bubble point, OC]\n", +"tG = [68.2 74.3 78.7 78.7 89.7 94.7 99.3];// [Dew Point, OC]\n", +"Vapor = [171.3 164.0 160.9 168.6 161.6 160.6 127.6];// [kmol/h]\n", +"Vapor1 = [5303 4684 4378 4585 3721 3296 2360];// [kg/h]\n", +"Liquid = [86.7 79.6 76.5 301 294 293 260];// [kmol/h]\n", +"Liquid1 = [2723 2104 1779 7000 6138 5690 4767];// [kg/h]\n", +"Data = zeros(7,8);\n", +"for j = 1:7\n", +" Data(j,1) = x(j);\n", +" Data(j,2) = tL(j);\n", +" Data(j,3) = y(j);\n", +" Data(j,4) = tG(j);\n", +" Data(j,5) = Vapor(j); \n", +" Data(j,6) = Vapor1(j);\n", +" Data(j,7) = Liquid(j);\n", +" Data(j,8) = Liquid1(j);\n", +"end\n", +"// The tower diameter will be set by the conditions at the top of the stripping section because of the large liquid flow at this point.\n", +"// From Illustration 9.8:\n", +"G = Data(4,6);\n", +"L = Data(4,8);\n", +"Density_G = (Data(4,6)/(22.41*Data(4,5)))*(273/(273+Temp));// [kg/cubic m]\n", +"Density_L = 905;// [kg/cubic m]\n", +"// abcissa = (L/G)*(Density_L/Density_G)^0.5\n", +"abcissa = (Data(4,8)/Data(4,6))*(Density_G/Density_L)^0.5;\n", +"// From Fig. 6.34, choose a gas pressure drop of 450 N/square m/m\n", +"ordinate = 0.0825;\n", +"// From Table 6.3 (Pg 196):\n", +"Cf = 95;\n", +"viscosity_L = 4.5*10^(-4);// [kg/m.s]\n", +"sigma = 0.029;// [N/m]\n", +"J = 1;\n", +"G_prime = (ordinate*Density_G*(Density_L-Density_G)/(Cf*viscosity_L^0.1))^0.5;// [kg/square m.s]\n", +"A = G/(3600*G_prime);// [Tower ,cross section area,square m]\n", +"L_prime = L/(A*3600);// [kg/square m.s]\n", +"// Mass transfer will be computed for the same location:\n", +"// From Table 6.4 (Pg 205):\n", +"m = 36.4;\n", +"n = (0.0498*L_prime)-0.1013;\n", +"p = 0.274;\n", +"aAW = m*((808*G_prime/Density_G^0.5)^n)*L_prime^p;// [square m/cubic m]\n", +"// From Table 6.5 (Pg 206):\n", +"dS = 0.0530;// [m]\n", +"beeta = 1.508*dS^0.376;\n", +"shi_LsW = 2.47*10^(-4)/dS^1.21;\n", +"shi_LtW = ((2.09*10^(-6))*(737.5*L_prime)^beeta)/dS^2;\n", +"shi_LOW = shi_LtW-shi_LsW; \n", +"shi_Ls = (0.0486*viscosity_L^0.02*sigma^0.99)/(dS^1.21*Density_L^0.37);\n", +"H = ((975.7*L_prime^0.57*viscosity_L^0.13)/(Density_L^0.84*((2.024*L_prime^0.430)-1)))*(sigma/0.073)^(0.1737-0.262*log10(L_prime));// [m]\n", +"shi_Lo = shi_LOW*H;\n", +"shi_Lt = shi_Lo+shi_Ls;\n", +"// From Eqn. 6.73:\n", +"aA = aAW*(shi_Lo/shi_LOW);// [square m/cubic m]\n", +"// From Table 6.3 (Pg 196):\n", +"e = 0.71;\n", +"// From Eqn. 6.71:\n", +"eLo = e-shi_Lt;\n", +"// From Chapter 2:\n", +"ScG = 1;\n", +"MavG = 0.656*Ma+(1-0.656)*Mb;// [kg/kmol]\n", +"G = G_prime/MavG;\n", +"viscosity_G = 2.96*10^(-5);// [kg/m.s]\n", +"// From Eqn. 6.70:\n", +"Fg = (1.195*G/ScG^(2/3))*((dS*G_prime/(viscosity_G*(1-eLo)))^(-0.36));// [kmol/square m s (mole fraction)]\n", +"kY_prime = Fg;// [kmol/square m s (mole fraction)]\n", +"DL = 4.80*10^(-9);// [square m/s]\n", +"ScL = viscosity_L/(Density_L*DL);\n", +"// From Eqn. 6.72:\n", +"kL = (25.1*DL/dS)*((dS*L_prime/viscosity_L)^0.45)*ScL^0.5;// [kmol/square m s (kmol/cubic m)]\n", +"// At 588.33 OC\n", +"Density_W = 53.82;// [kg/cubic m]\n", +"kx_prime = Density_W*kL;// [kmol/square m s (mole fraction)]\n", +"// Value1 = [x G a ky_prime*10^3 kx_prime]\n", +"Value1 = [0.915 0.0474 20.18 1.525 0.01055;0.6 0.0454 21.56 1.542 0.00865;0.370 0.0444 21.92 1.545 0.00776;0.370 0.0466 38 1.640 0.0143;0.2 0.0447 32.82 1.692 0.0149;0.1 0.0443 31.99 1.766 0.0146;0.02 0.0352 22.25 1.586 0.0150];\n", +"// From Fig: 9.50\n", +"// At x = 0.2:\n", +"y = 0.36;\n", +"slope = -(Value1(5,5)/(Value1(5,4)*10^(-3)));\n", +"// The operating line drawn from(x,y) with slope. The point where it cuts the eqb. line gives yi.\n", +"// K = ky_prime*a(yi-y)\n", +"// For the enriching section:\n", +"// En = [y yi 1/K Gy]\n", +"En = [0.915 0.960 634 0.0433;0.85 0.906 532.8 0.0394;0.8 0.862 481.1 0.0366;0.70 0.760 499.1 0.0314;0.656 0.702 786.9 0.0292];\n", +"// For the Stripping section:\n", +"// St = [y yi 1/K Gy]\n", +"St = [0.656 0.707 314.7 0.0306;0.50 0.639 124.6 0.0225;0.40 0.580 99.6 0.01787;0.3 0.5 89 0.0134;0.2 0.390 92.6 0.00888;0.10 0.232 154.5 0.00416;0.032 0.091 481 0.00124];\n", +"// Graphical Integration, according to Eqn.9.52::\n", +"scf(18);\n", +"plot(En(:,4),En(:,3));\n", +"xgrid();\n", +"xlabel('Gy');\n", +"ylabel('1 / (ky_prime*a*(yi-y))');\n", +"title('Graphical Integration for Enriching section');\n", +"// From Area under the curve:\n", +"Ze = 7.53;// [m]\n", +"// Graphical Integration:\n", +"scf(19);\n", +"plot(St(:,4),St(:,3));\n", +"xgrid();\n", +"xlabel('Gy');\n", +"ylabel('1 / (ky_prime*a*(yi-y))');\n", +"title('Graphical Integration for Stripping section');\n", +"// From Area under the curve:\n", +"Zs = 4.54;// [m]\n", +"// Since the equlibrium curve slope varies so greatly that the use of overall mass transfer coeffecient is not recommended:\n", +"printf('Height of Tower for enriching Section is %f m\n',Ze);\n", +"printf('Height of Tower for Stripping Section is %f m\n',Zs);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.13: Multicomponent_Systems.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 9.13:\n", +"\n", +"printf('Illustration 9.13\n\n');\n", +"\n", +"//**************************Calculation Of Minimum Reflux ratio************************//\n", +"// Page: 436\n", +"printf('Page: 436\n\n');\n", +"\n", +"//***Data***//\n", +"// C1:CH4 C2:C2H6 C3:n-C3H8 C4:n-C4H10 C5:n-C5H12 C6:n-C6H14\n", +"// zF = [zF(C1) zF(C2) zF(C3) zF(C4) zF(C5) zF(C6)]\n", +"zF = [0.03 0.07 0.15 0.33 0.30 0.12];// [mole fraction]\n", +"LF_By_F = 0.667;\n", +"Temp = 82;// [OC]\n", +"ylk = 0.98;\n", +"yhk = 0.01;\n", +"//**********//\n", +"\n", +"// Data = [m HG HL(30 OC);m HG HL(60 OC);m HG HL(90 OC);m HG HL(120 OC);]\n", +"Data1 = [16.1 12790 9770;19.3 13910 11160;21.8 15000 12790;24.0 16240 14370];// [For C1]\n", +"Data2 = [3.45 22440 16280;4.90 24300 18140;6.25 26240 19890;8.15 28140 21630];// [For C2]\n", +"Data3 = [1.10 31170 16510;2.00 33000 20590;2.90 35800 25600;4.00 39000 30900];// [For C3]\n", +"Data4 = [0.35 41200 20350;0.70 43850 25120;1.16 46500 30000;1.78 50400 35400];// [For C4]\n", +"Data5 = [0.085 50500 24200;0.26 54000 32450;0.50 57800 35600;0.84 61200 41400];// [For C5]\n", +"Data6 = [0.0300 58800 27700;0.130 63500 34200;0.239 68150 40900;0.448 72700 48150];// [For C6]\n", +"\n", +"// T = [Temparature]\n", +"T = [30;60;90;120];\n", +"\n", +"// Flash vaporisation of the Feed:\n", +"// Basis: 1 kmol feed throughout\n", +"// After Several trials, assume:\n", +"F = 1;// [kmol]\n", +"GF_By_F = 0.333;\n", +"LF_By_GF = LF_By_F/GF_By_F;\n", +"m82 = zeros(6);\n", +"y = zeros(6);\n", +"m82(1) = interpln([T';Data1(:,1)'],Temp);// [For C1]\n", +"m82(2) = interpln([T';Data2(:,1)'],Temp);// [For C2]\n", +"m82(3) = interpln([T';Data3(:,1)'],Temp);// [For C3]\n", +"m82(4) = interpln([T';Data4(:,1)'],Temp);// [For C4]\n", +"m82(5) = interpln([T';Data5(:,1)'],Temp);// [For C5]\n", +"m82(6) = interpln([T';Data6(:,1)'],Temp);// [For C6]\n", +"for i = 1:6\n", +" y(i) = zF(i)*(LF_By_GF+1)/(1+(2/m82(i)));\n", +"end\n", +"Sum = sum(y);\n", +"// Since Sum is sufficiently close to 1.0, therefore:\n", +"q = 0.67;// [LF_By_F]\n", +"// Assume:\n", +"// C3: light key\n", +"// C5: heavy key\n", +"zlkF = zF(3);// [mole fraction]\n", +"zhkF = zF(5);// [mole fraction]\n", +"ylkD = ylk*zF(3);// [kmol]\n", +"yhkD = yhk*zF(5);// [kmol]\n", +"\n", +"// Estimate average Temp to be 80 OC\n", +"m80 = zeros(6);\n", +"alpha80 = zeros(6);\n", +"m80(1) = interpln([T';Data1(:,1)'],80);// [For C1]\n", +"m80(2) = interpln([T';Data2(:,1)'],80);// [For C2]\n", +"m80(3) = interpln([T';Data3(:,1)'],80);// [For C3]\n", +"m80(4) = interpln([T';Data4(:,1)'],80);// [For C4]\n", +"m80(5) = interpln([T';Data5(:,1)'],80);// [For C5]\n", +"m80(6) = interpln([T';Data6(:,1)'],80);// [For C6]\n", +"for i = 1:6\n", +" alpha80(i) = m80(i)/m80(5);\n", +"end\n", +"// By Eqn. 9.164:\n", +"yD_By_zF1 = (((alpha80(1)-1)/(alpha80(3)-1))*(ylkD/zF(3)))+(((alpha80(3)-alpha80(1))/(alpha80(3)-1))*(yhkD/zF(5)));// [For C1]\n", +"yD_By_zF2 = (((alpha80(2)-1)/(alpha80(3)-1))*(ylkD/zF(3)))+(((alpha80(3)-alpha80(2))/(alpha80(3)-1))*(yhkD/zF(5)));// [For C2]\n", +"yD_By_zF6 = (((alpha80(6)-1)/(alpha80(3)-1))*(ylkD/zF(3)))+(((alpha80(3)-alpha80(6))/(alpha80(3)-1))*(yhkD/zF(5)));// [For C6]\n", +"// The distillate contains:\n", +"yC1 = 0.03;// [kmol C1]\n", +"yC2 = 0.07;// [kmol C2]\n", +"yC6 = 0;// [kmol C6]\n", +"// By Eqn 9.165:\n", +"deff('[y] = g1(phi)','y = (((alpha80(1)*zF(1))/(alpha80(1)-phi))+((alpha80(2)*zF(2))/(alpha80(2)-phi))+((alpha80(3)*zF(3))/(alpha80(3)-phi))+((alpha80(4)*zF(4))/(alpha80(4)-phi))+((alpha80(5)*zF(5))/(alpha80(5)-phi))+((alpha80(6)*zF(6))/(alpha80(6)-phi)))-(F*(1-q))');\n", +"// Between alphaC3 & alphaC4:\n", +"phi1 = fsolve(3,g1);\n", +"// Between alphaC4 & alphaC5:\n", +"phi2 = fsolve(1.5,g1);\n", +"// From Eqn. 9.166:\n", +"// Val = D*(Rm+1)\n", +"// (alpha80(1)*yC1/(alpha80(1)-phi1))+(alpha80(2)*yC2/(alpha80(2)-phi1))+(alpha80(3)*ylkD/(alpha80(3)-phi1))+(alpha80(4)*yD/(alpha80(4)-phi1))+(alpha80(i)*yhkD/(alpha80(5)-phi1))+(alpha80(6)*yC6/(alpha80(6)-phi1)) = Val.....................(1)\n", +"// (alpha80(1)*yC1/(alpha80(1)-phi2))+(alpha80(2)*yC2/(alpha80(2)-phi2))+(alpha80(3)*ylkD/(alpha80(3)-phi2))+(alpha80(4)*yD/(alpha80(4)-phi2))+(alpha80(i)*yhkD/(alpha80(5)-phi2))+(alpha80(6)*yC6/(alpha80(6)-phi2)) = Val ....................(2)\n", +"// Solving simultaneously:\n", +"a = [-alpha80(4)/(alpha80(4)-phi1) 1;-alpha80(4)/(alpha80(4)-phi2) 1];\n", +"b = [(alpha80(1)*yC1/(alpha80(1)-phi1))+(alpha80(2)*yC2/(alpha80(2)-phi1))+(alpha80(3)*ylkD/(alpha80(3)-phi1))+(alpha80(i)*yhkD/(alpha80(5)-phi1))+(alpha80(6)*yC6/(alpha80(6)-phi1));(alpha80(1)*yC1/(alpha80(1)-phi2))+(alpha80(2)*yC2/(alpha80(2)-phi2))+(alpha80(3)*ylkD/(alpha80(3)-phi2))+(alpha80(i)*yhkD/(alpha80(5)-phi2))+(alpha80(6)*yC6/(alpha80(6)-phi2))];\n", +"soln = a\b;\n", +"yC4 = soln(1);// [kmol C4 in the distillate]\n", +"Val = soln(2);\n", +"// For the distillate, at a dew point of 46 OC\n", +"ydD = [yC1 yC2 ylkD yC4 yhkD yC6];\n", +"D = sum(ydD);\n", +"yD = zeros(6);\n", +"m46 = zeros(6);\n", +"alpha46 = zeros(6);\n", +"m46(1) = interpln([T';Data1(:,1)'],46);// [For C1]\n", +"m46(2) = interpln([T';Data2(:,1)'],46);// [For C2]\n", +"m46(3) = interpln([T';Data3(:,1)'],46);// [For C3]\n", +"m46(4) = interpln([T';Data4(:,1)'],46);// [For C4]\n", +"m46(5) = interpln([T';Data5(:,1)'],46);// [For C5]\n", +"m46(6) = interpln([T';Data6(:,1)'],46);// [For C6]\n", +"for i = 1:6\n", +" alpha46(i) = m46(i)/m46(5);\n", +" yD(i) = ydD(i)/D;\n", +" // Ratio = yD/alpha46\n", +" Ratio1(i) = yD(i)/alpha46(i);\n", +"end\n", +"// mhk = mC5 at 46.6 OC, the assumed 46 OC is satisfactory.\n", +"\n", +"// For the residue, at a dew point of 46 OC\n", +"xwW = [zF(1)-yC1 zF(2)-yC2 zF(3)-ylkD zF(4)-yC4 zF(5)-yhkD zF(6)-yC6];\n", +"W = sum(xwW);\n", +"xW = zeros(6);\n", +"m113 = zeros(6);\n", +"alpha113 = zeros(6);\n", +"m113(1) = interpln([T';Data1(:,1)'],113);// [For C1]\n", +"m113(2) = interpln([T';Data2(:,1)'],113);// [For C2]\n", +"m113(3) = interpln([T';Data3(:,1)'],113);// [For C3]\n", +"m113(4) = interpln([T';Data4(:,1)'],113);// [For C4]\n", +"m113(5) = interpln([T';Data5(:,1)'],113);// [For C5]\n", +"m113(6) = interpln([T';Data6(:,1)'],113);// [For C6]\n", +"for i = 1:6\n", +" alpha113(i) = m113(i)/m113(5);\n", +" xW(i) = xwW(i)/W;\n", +" // Ratio = yD/alpha46\n", +" Value(i) = alpha113(i)*xW(i);\n", +"end\n", +"// mhk = mC5 at 114 OC, the assumed 113 OC is satisfactory.\n", +"Temp_Avg = (114+46.6)/2;// [OC]\n", +"// Temp_avg is very close to the assumed 80 OC\n", +"Rm = (Val/D)-1;\n", +"printf('Minimum Reflux Ratio is %f mol reflux/mol distillate\n \n',Rm);\n", +"printf('*****************Distillate Composition*********************\n');\n", +"printf('C1\t \t \t \t: %f\n',yD(1));\n", +"printf('C2\t \t \t \t: %f\n',yD(2));\n", +"printf('C3\t \t \t \t: %f\n',yD(3));\n", +"printf('C4\t \t \t \t: %f\n',yD(4));\n", +"printf('C5\t \t \t \t: %f\n',yD(5));\n", +"printf('C6\t \t \t \t: %f\n',yD(6));\n", +"printf('\n');\n", +"printf('*****************Residue Composition*********************\n');\n", +"printf('C1\t \t \t \t: %f\n',xW(1));\n", +"printf('C2\t \t \t \t: %f\n',xW(2));\n", +"printf('C3\t \t \t \t: %f\n',xW(3));\n", +"printf('C4\t \t \t \t: %f\n',xW(4));\n", +"printf('C5\t \t \t \t: %f\n',xW(5));\n", +"printf('C6\t \t \t \t: %f\n',xW(6));\n", +"printf('\n');\n", +"\n", +"//**********************Number of Theoretical stage***********************//\n", +"// Page:440\n", +"printf('Page: 440\n\n');\n", +"\n", +"for i = 1:6\n", +" alpha_av(i) = (alpha46(i)*alpha113(i))^0.5;\n", +"end\n", +"alphalk_av = alpha_av(3);\n", +"// By Eqn. 9.167:\n", +"xhkW = xwW(5);\n", +"xlkW = xwW(3);\n", +"Nm = log10((ylkD/yhkD)*(xhkW/xlkW))/log10(alphalk_av)-1;\n", +"// Ratio = yD/xW\n", +"for i = 1:6\n", +" Ratio2(i) = (alpha_av(i)^(Nm+1))*yhkD/xhkW;\n", +"end\n", +"// For C1:\n", +"// yC1D-Ratio(1)*xC1W = 0\n", +"// yC1D+xC1W = zF(1)\n", +"// Similarly for others\n", +"for i = 1:6\n", +" a = [1 -Ratio2(i);1 1];\n", +" b = [0;zF(i)];\n", +" soln = a\b;\n", +" yD2(i) = soln(1);// [kmol]\n", +" xW2(i) = soln(2);// [kmol]\n", +"end\n", +"D = sum(yD2);// [kmol]\n", +"W = sum(xW2);// [kmol]\n", +"// The distillate dew point computes to 46.6 OC and the residue bubble point computes to 113 OC, which is significantly close to the assumed.\n", +"printf('Minimum number of theoretical stage is: %f\n',Nm);\n", +"printf('\n');\n", +"\n", +"//***************Product composition at R = 0.8***********************//\n", +"// Page:441\n", +"printf('Page: 441\n\n');\n", +"\n", +"// Since C1 and C2 do not enter in the residue nor C6 in the distillate, appreciably at total reflux or minimum reflux ratio, it will be assumed that they will not enter R = 0.8. C3 and C5 distribution are fixed by specifications. Only that C4 remains to be estimated.\n", +"// R = [Infinte 0.8 0.58] [Reflux ratios For C4]\n", +"R = [%inf 0.8 0.58];\n", +"// Val = R/(R+1)\n", +"Val = R./R+1;\n", +"// ydD = [Inf 0.58] \n", +"y4D = [0.1255 0.1306];\n", +"yC4D = (((1-Val(2))/(1-Val(3)))*(y4D(2)-y4D(1)))+y4D(1);// Linear Interpolation\n", +"// For Distillate:\n", +"Sum1 = sum(Ratio1);\n", +"x0 = Ratio1./Sum1;\n", +"printf('For the reflux ratio of 0.8\n');\n", +"printf('*****************Distillate Composition*********************\n');\n", +"printf('\t\t\t Liquid reflux in equilibrium with the distillate vapour\n');\n", +"for i = 1:6\n", +" printf('C%d\t \t \t \t: %f\n',i,x0(i));\n", +"end\n", +"// For boiler:\n", +"Sum2 = sum(Value);\n", +"yNpPlus1 = Value./Sum2;\n", +"printf('*****************Distillate Composition*********************\n');\n", +"printf('\t\t\t Reboiler vapour in equilibrium with the residue\n');\n", +"for i = 1:6\n", +" printf('C%d\t \t \t \t: %f\n',i,yNpPlus1(i));\n", +"end\n", +"printf('\n');\n", +"\n", +"//**********Number Of Theoretical Trays***************//\n", +"// Page: 443\n", +"printf('Page: 443\n\n');\n", +"\n", +"R = 0.8;// [reflux ratio]\n", +"// From Eqn. 9.175\n", +"intersection = (zlkF-(ylkD/D)*(1-q)/(R+1))/(zhkF-(yhkD/D)*(1-q)/(R+1));\n", +"// Enriching Section:\n", +"y1 = zeros(5);\n", +"L = R*D;// [kmol]\n", +"G = L+D;// [kmol]\n", +"// Assume: Temp1 = 57 OC\n", +"// alpha57 = [C1 C2 C3 C4 C5]\n", +"alpha57 = [79.1 19.6 7.50 2.66 1];\n", +"// From Eqn. 9.177, n = 0:\n", +"for i = 1:5\n", +" y1(i) = (L/G)*x0(i)+((D/G)*yD(i));\n", +" Val57(i) = y1(i)/alpha57(i);\n", +"end\n", +"x1 = Val57/sum(Val57);\n", +"mC5 = sum(Val57);\n", +"Temp1 = 58.4; // [OC]\n", +"// Liquid x1's is in equilibrium with y1's.\n", +"xlk_By_xhk1 = x1(3)/x1(5);\n", +"// Tray 1 is not the feed tray.\n", +"// Assume: Temp2 = 63 OC\n", +"// alpha63 = [C1 C2 C3 C4 C5]\n", +"alpha63 = [68.9 17.85 6.95 2.53 1.00];\n", +"// From Eqn. 9.177, n = 1:\n", +"for i = 1:5\n", +" y2(i) = (L/G)*x1(i)+((D/G)*yD(i));\n", +" Val63(i) = y1(i)/alpha63(i);\n", +"end\n", +"mC5 = sum(Val63);\n", +"x2 = Val63/sum(Val63);\n", +"xlk_By_xhk2 = x2(3)/x2(5);\n", +"// The tray calculation are continued downward in this manner.\n", +"// Results for trays 5 & 6 are:\n", +"// Temp 75.4 [OC]\n", +"// x5 = [C1 C2 C3 C4 C5]\n", +"x5 = [0.00240 0.0195 0.1125 0.4800 0.3859];\n", +"xlk_By_xhk5 = x5(3)/x5(5);\n", +"// Temp6 = 79.2 OC\n", +"// x6 = [C1 C2 C3 C4 C5]\n", +"x6 = [0.00204 0.0187 0.1045 0.4247 0.4500];\n", +"xlk_By_xhk6 = x6(3)/x6(5);\n", +"// From Eqn. 9.176:\n", +"// Tray 6 is the feed tray\n", +"Np1 = 6;\n", +"\n", +"// Exhausting section:\n", +"// Assume Temp = 110 OC\n", +"L_bar = L+(q*F);// [kmol]\n", +"G_bar = L_bar-W;// [kmol]\n", +"// alpha57 = [C3 C4 C5 C6]\n", +"alpha110 = [5 2.2 1 0.501];\n", +"// From Eqn. 9.178:\n", +"xNp = zeros(4);\n", +"k = 1;\n", +"for i = 3:6\n", +" xNp(k) = ((G_bar/L_bar)*yNpPlus1(i))+((W/L_bar)*xW(i));\n", +" Val110(k) = alpha110(k)*xNp(k);\n", +" k = k+1;\n", +"end\n", +"yNp = Val110/sum(Val110);\n", +"mC5 = 1/sum(Val110);\n", +"// yNp is in Eqb. with xNp:\n", +"xlk_By_xhkNp = xNp(1)/xNp(4);\n", +"// Results for Np-7 to Np-9 trays:\n", +"// For Np-7\n", +"// Temp = 95.7 OC\n", +"// xNpMinus7 = [C3 C4 C5 C6]\n", +"xNpMinus7 = [0.0790 0.3944 0.3850 0.1366];\n", +"xlk_By_xhkNpMinus7 = xNpMinus7(1)/xNpMinus7(3);\n", +"// For Np-8\n", +"// Temp = 94.1 OC\n", +"// xNpMinus8 = [C3 C4 C5 C6]\n", +"xNpMinus8 = [0.0915 0.3897 0.3826 0.1362];\n", +"xlk_By_xhkNpMinus8 = xNpMinus8(1)/xNpMinus8(3);\n", +"// For Np-9\n", +"// Temp = 93.6 OC\n", +"// xNpMinus9 = [C3 C4 C5 C6]\n", +"xNpMinus9 = [0.1032 0.3812 0.3801 0.1355];\n", +"xlk_By_xhkNpMinus9 = xNpMinus9(1)/xNpMinus9(3);\n", +"// From Eqn. 9.176:\n", +"// Np-8 is the feed tray.\n", +"deff('[y] = g2(Np)','y = Np-8-Np1');\n", +"Np = fsolve(7,g2);\n", +"printf('Number of theoretical Trays required for R = 0.8: %d\n',Np);\n", +"printf('\n');\n", +"\n", +"//**************Composition Correction*****************//\n", +"// Page: 446\n", +"printf('Page: 446\n\n');\n", +"\n", +"// New Bubble Point:\n", +"// Temp = 86.4 OC\n", +"x6_new = x6*(1-xNpMinus8(4));\n", +"x6_new(6) = xNpMinus8(4);\n", +"// alpha86 = [C1 C2 C3 C4 C5 C6]\n", +"alpha86 = [46.5 13.5 5.87 2.39 1.00 0.467];\n", +"// From Eqn. 9.181:\n", +"xhkn = x5(5);\n", +"xhknPlus1 = x6_new(5);\n", +"xC65 = alpha86(6)*x6_new(6)*xhkn/xhknPlus1;\n", +"x5_new = x5*(1-xC65);\n", +"x5_new(6) = 1-sum(x5_new);\n", +"// Tray 5 has a bubble point of 80 OC\n", +"// Similarly , the calculations are continued upward:\n", +"// x2_new = [C1 C2 C3 C4 C5 C6]\n", +"x2_new = [0.0021 0.0214 0.1418 0.6786 0.1553 0.00262];\n", +"// y2_new = [C1 C2 C3 C4 C5 C6]\n", +"y2_new = [0.0444 0.111 0.2885 0.5099 0.0458 0.00034];\n", +"// x1_new = [C1 C2 C3 C4 C5 C6]\n", +"x1_new = [0.00226 0.0241 0.1697 0.7100 0.0932 0.00079];\n", +"// y1_new = [C1 C2 C3 C4 C5 C6]\n", +"y1_new = [0.0451 0.1209 0.3259 0.4840 0.0239 0.000090];\n", +"// x0_new = [C1 C2 C3 C4 C5 C6]\n", +"x0_new = [0.00425 0.0425 0.2495 0.6611 0.0425 0.00015];\n", +"// yD_new = [C1 C2 C3 C4 C5 C6]\n", +"yD_new = [0.0789 0.1842 0.3870 0.3420 0.0079 0.00001];\n", +"// From Eqn. 9.184:\n", +"// For C1 & C2\n", +"alphalkm = alpha86(3);\n", +"xlkmPlus1 = xNpMinus7(1);\n", +"xlkm = x6_new(3);\n", +"xC17 = x6_new(1)*alpha86(3)*xlkmPlus1/(alpha86(1)*xlkm);\n", +"xC27 = x6_new(2)*alpha86(3)*xlkmPlus1/(alpha86(2)*xlkm);\n", +"// Since xC17 = 1-xC27\n", +"// The adjusted value above constitute x7's.\n", +"// The new bubbl point is 94 OC\n", +"// The calculations are continued down in the same fashion.\n", +"// The new tray 6 has:\n", +"// xC1 = 0.000023 & xC2 = 0.00236\n", +"// It is clear that the conc. of these components are reducing so rapidly that there is no need to go an further.\n", +"printf('******Corrected Composition***********\n');\n", +"printf('Component\t \tx2\t \t \t y2\t \t \t x1\t \t \t y1\t \t \tx0\t \t \tyD\n');\n", +"for i = 1:6\n", +" printf('C%d\t \t \t%f\t \t %f\t \t %f\t \t %f\t \t%f\t \t%f\n',i,x2_new(i),y2_new(i),x1_new(i),y1_new(i),x0_new(i),yD_new(i));\n", +"end\n", +"printf('\n');\n", +"\n", +"//*************Heat Load of Condensor & Boiler & L/G ratio**********//\n", +"// Page 448\n", +"printf('Page: 448\n\n');\n", +"\n", +"// Values of x0, yD & y1 are taken from the corrected concentration.\n", +"// HD46 = [C1 C2 C3 C4 C5 C6]\n", +"HD46 = [13490 23380 32100 42330 52570 61480];// [kJ/kmol]\n", +"for i = 1:6\n", +" yDHD(i) = yD_new(i)*HD46(i);\n", +"end\n", +"HD = sum(yDHD);// [kJ]\n", +"// HL46 = [C1 C2 C3 C4 C5 C6]\n", +"HL46 = [10470 17210 18610 22790 27100 31050];// [kJ/kmol]\n", +"for i = 1:6\n", +" xHL(i) = x0_new(i)*HL46(i);\n", +"end\n", +"HL0 = sum(xHL);// [kJ]\n", +"// HG58 = [C1 C2 C3 C4 C5 C6]\n", +"HG58 = [13960 24190 37260 43500 53900 63500];// [kJ/kmol]\n", +"for i = 1:6\n", +" yHG1(i) = y1_new(i)*HG58(i);\n", +"end\n", +"HG1 = sum(yHG1);// [kJ]\n", +"// From Eqn. 9.54:\n", +"Qc = D*((R+1)*HG1-(R*HL0)-HD);// [kJ/kmol feed]\n", +"// Similarly:\n", +"HW = 39220;// [kJ]\n", +"HF = 34260;// [kJ]\n", +"// From Eqn. 9.55:\n", +"Qb = (D*HD)+(W*HW)+Qc-(F*HF);// [kJ/kmol feed]\n", +"// For tray n = 1\n", +"G1 = D*(R+1);// [kmol]\n", +"// With x1 & y2 from corrected composition;\n", +"// HG66 = [C1 C2 C3 C4 C5 C6]\n", +"HG66 = [14070 24610 33800 44100 54780 64430];// [kJ/kmol feed]\n", +"for i = 1:6\n", +" yHG2(i) = y2_new(i)*HG66(i);\n", +"end\n", +"HG2 = sum(yHG2);// [kJ]\n", +"// HL58 = [C1 C2 C3 C4 C5 C6]\n", +"HL58 = [11610 17910 20470 24900 29500 33840];// [kJ/kmol feed]\n", +"for i = 1:6\n", +" xHL1(i) = x1_new(i)*HL58(i);\n", +"end\n", +"HL1 = sum(xHL1);// [kJ]\n", +"// From Eqn. 9.185:\n", +"G2 = (Qc+D*(HD-HL1))/(HG2-HL1);// [kmol]\n", +"L2 = G2-D;// [kmol]\n", +"L2_By_G2 = L2/G2;\n", +"// Similarly, the calculations are made for other trays in enriching section.\n", +"// For tray, Np = 14:\n", +"// C1 & C2 are absent.\n", +"// HG113 = [C3 C4 C5 C6]\n", +"HG113 = [38260 49310 60240 71640];// [kJ/kmol feed]\n", +"k = 3;\n", +"for i = 1:4\n", +" yHG15(i) = yNpPlus1(k)*HG113(i);\n", +" k = k+1;\n", +"end\n", +"HG15 = sum(yHG15);\n", +"// HL107 = [C3 C4 C5 C6]\n", +"HL107 = [29310 31870 37680 43500];// [kJ/kmol feed]\n", +"for i = 1:4\n", +" xHL14(i) = xNp(i)*HL107(i);\n", +"end\n", +"HL14 = sum(xHL14);// [kJ]\n", +"// Similarly:\n", +"HL13 = 36790;// [kJ]\n", +"HG14 = 52610;// [kJ]\n", +"// From Eqn. 9.186:\n", +"G15_bar = (Qb+(W*(HL14-HW)))/(HG15-HL14);// [kmol]\n", +"L14_bar = W+G15_bar;// [kmol]\n", +"G14_bar = (Qb+(W*(HL13-HW)))/(HG14-HL13);// [kmol]\n", +"L14_By_G14 = L14_bar/G14_bar;\n", +"printf('Condensor eat Load %f kJ:\n',HL0);\n", +"printf('Reboiler eat Load %f kJ:\n',HG15);\n", +"// For other Exhausting Section Trays:\n", +"// Result = [Tray No. L_By_G Temp(OC)]\n", +"// Tray 0: Condensor\n", +"// Tray 15: Reboiler\n", +"Result = [0,0.80 46.6;1 0.432 58.4;2 0.437 66;3 0.369 70.4;4 0.305 74;5 0.310 80.3;6 1.53 86.4;7 4.05 94.1;8 3.25 96.3;9 2.88 97.7;10 2.58 99;11 2.48 100;12 2.47 102.9;13 2.42 104.6;14 2.18 107.9;15 1.73 113.5];\n", +"printf('**************L/G*************\n')\n", +"printf('Tray No. \t\t L/G\t\t\t\t Temp(OC)\n');\n", +"for i = 1:16\n", +" printf('%d\t \t \t%f\t \t \t%2.2f\n',Result(i,1),Result(i,2),Result(i,3));\n", +"end\n", +"// These values are not final.\n", +"// They scatter eratically because they are based on the temp. and conc. computed with the assumption of constant L/G\n", +"printf('\n');\n", +"\n", +"//**************Thiele Geddes Method******************//\n", +"// Page:452\n", +"printf('Page: 452\n\n');\n", +"\n", +"// Use the tray Temperature to obtain m.\n", +"// For C4:\n", +"// m = [0(Condensor) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15(Reboiler)]\n", +"m = [0.50 0.66 0.75 0.81 0.86 0.95 1.07 1.22 1.27 1.29 1.30 1.32 1.40 1.45 1.51 1.65];\n", +"for i = 1:7\n", +" A(i) = Result(i,2)/m(i);\n", +"end\n", +"for j = 1:9\n", +" i = i+1;\n", +" S(j) = 1/(Result(i,2)/m(i));\n", +"end\n", +"// f = Tray No. 6\n", +"f = 7;\n", +"// From Eqn. 9.196:\n", +"// Value1 = Gf*yf/(D*zD)\n", +"Sum = 0;\n", +"for i = 1:f-1\n", +" Val = 1;\n", +" for j = i:f-1\n", +" Val = Val*A(j);\n", +" end\n", +" Sum = Sum+Val;\n", +"end\n", +"Value1 = 1+Sum;\n", +"// From Eqn. 9.206:\n", +"// Value2 = Lf_bar*xf/(W*xW);\n", +"Sum = 0;\n", +"for i = 9:-1:1\n", +" Val = 1;\n", +" for j = i:-1:1\n", +" Val = Val*S(j);\n", +" end\n", +" Sum = Sum+Val;\n", +"end\n", +"Value2 = 1+Sum;\n", +"// From Eqn. 9.208:\n", +"// Value3 = W*xW/(D*zD)\n", +"Value3 = A(f)*Value1/Value2;\n", +"// From Eqn. 9.210:\n", +"DyD = F*zF(4)/(Value3+1);// [kmol,C4]\n", +"// From Eqn. 9.209:\n", +"WxW = (F*zF(4))-(DyD);// [kmol, C4]\n", +"// Similarly:\n", +"// For [C1; C2; C3; C4; C5; C6]\n", +"// Result2 = [Value1 Value2 Value3 DyD WxW]\n", +"Result2 = [1.0150 254*10^6 288*10^(-10) 0.03 0;1.0567 8750 298*10^(-5) 0.07 0;1.440 17.241 0.0376 0.1447 0.0053;1.5778 1.5306 1.475 0.1335 0.1965;15580 1.1595 45.7 0.00643 0.29357;1080 1.0687 7230 0.0000166 0.1198];\n", +"D = sum(Result2(:,4));// [kmol]\n", +"W = sum(Result2(:,5));// [kmol]\n", +"// In the Distillate:\n", +"DyD_C3 = Result2(3,4);// [kmol]\n", +"zFC3 = zF(3);// [kmol]\n", +"percentC3 = (DyD_C3/zFC3)*100;\n", +"DyD_C5 = Result2(5,4);// [kmol]\n", +"zFC5 = zF(5);// [kmol]\n", +"percentC5 = (DyD_C5/zFC5)*100;\n", +"// These do not quite meet the original speification.\n", +"// For Tray 2 & C4\n", +"// From Eqn. 9.195:\n", +"// Value4 = G2*y2/(D*zD)\n", +"n = 2;\n", +"Sum = 0;\n", +"for i = 1:n\n", +" Val = 1;\n", +" for j = i:n\n", +" Val = Val*A(j);\n", +" end\n", +" Sum = Sum+Val;\n", +"end\n", +"Value4 = 1+Sum;\n", +"// From The enthalpy Balnce:\n", +"G2 = 0.675;\n", +"// From Eqn. 9.211:\n", +"y2 = Value4*DyD/G2;\n", +"// Similarly:\n", +"// Value4 = [C1 C2 C3 C4 C5 C6]\n", +"Value4 = [1.0235 1.1062 1.351 2.705 10.18 46.9];\n", +"for i = 1:6\n", +" y2(i) = Result2(i,4)*Value4(i)/G2;\n", +"end\n", +"Y2 = sum(y2);\n", +"// Since Y2 is not equal to 1. THerefore the original temperature is incorrect. By adjusting y2 to unity.\n", +"// The dew point is 77 OC instead of 66 OC\n", +"// y2_adjusted = [C1 C2 C3 C4 C5 C6]\n", +"y2_adjusted = [0.0419 0.1059 0.2675 0.4939 0.0896 0.00106];\n", +"printf('*****************Composition By Thiele Geddes Method*****************\n');\n", +"printf('Component\t \t \t y2\n')\n", +"for i = 1:6\n", +" printf('C%d\t \t \t \t%f\n',i,y2_adjusted(i));\n", +"end" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1: Raoults_law.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 9.1\n", +"// Page: 349\n", +"\n", +"printf('Illustration 9.1 - Page: 349\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// a:n-heptane b:n-octane\n", +"Pt = 760; // [mm Hg]\n", +"//*****//\n", +"\n", +"Tempa = 98.4;// [boiling point of A,OC]\n", +"Tempb = 125.6;// [boiling point of B,OC]\n", +"x = zeros(6);\n", +"y_star = zeros(6);\n", +"alpha = zeros(6);\n", +"// Data = [Temp Pa (mm Hg) Pb(mm Hg)]\n", +"Data = [98.4 760 333;105 940 417;110 1050 484;115 1200 561;120 1350 650;125.6 1540 760];\n", +"for i = 1:6\n", +" x(i) = (Pt-Data(i,3))/(Data(i,2)-Data(i,3));// [mole fraction of heptane in liquid]\n", +" y_star(i) = (Data(i,2)/Pt)*x(i);\n", +" alpha(i) = Data(i,2)/Data(i,3);\n", +"end\n", +"printf('T(OC)\t\t\t Pa(mm Hg)\t\t\t Pb(mm Hg)\t\t\t x\t\t\t\t y*\t\t\t alpha\n');\n", +"for i = 1:6\n", +" printf('%f\t \t %d\t \t \t \t %d\t \t \t \t %f\t \t \t %3f\t \t %f\t \t\n',Data(i,1),Data(i,2),Data(i,3),x(i),y_star(i),alpha(i));\n", +"end" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2: Azeotropes.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 9.2\n", +"// Page: 354\n", +"\n", +"printf('Illustration 9.2 - Page: 354\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// a:water b:ethylaniline\n", +"Pt = 760; // [mm Hg]\n", +"ma1 = 50;// [g]\n", +"mb1 = 50;// [g]\n", +"//*******//\n", +"\n", +"// Data = [Temp Pa(mm Hg) Pb(mm Hg)]\n", +"Data = [38.5 51.1 1;64.4 199.7 5;80.6 363.9 10;96.0 657.6 20;99.15 737.2 22.8;113.2 1225 40];\n", +"Ma = 18.02;// [kg/kmol]\n", +"Mb = 121.1;// [kg/kmol]\n", +"\n", +"for i = 1:6\n", +" p = Data(i,2)+Data(i,3);\n", +" if p = = Pt\n", +" pa = Data(5,2);// [mm Hg]\n", +" pb = Data(i,3);// [mm Hg]\n", +" T = Data(i,1);// [OC]\n", +" end\n", +"end\n", +"ya_star = pa/Pt;\n", +"yb_star = pb/Pt;\n", +"ya1 = ma1/Ma;// [g mol water]\n", +"yb1 = mb1/Mb;// [g mol ethylalinine]\n", +"Y = ya1*(yb_star/ya_star);// [g mol ethylalinine]\n", +"printf('The original mixture contained %f g mol water and %f g mol ethylalinine\n',ya1,yb1);\n", +"printf('The mixture will continue to boil at %f OC, where the equilibrium vapour of the indicated composition,until all the water evaporated together with %f g mol ethylalinine\n',T,Y);\n", +"printf('The temparature will then rise to 204 OC, and the equilibrium vapour will be of pure ethylalinine');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3: Multicomponent_Sysems.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 9.3\n", +"// Page: 362\n", +"\n", +"printf('Illustration 9.3 - Page: 362\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// a:n-C3H8 b:n-C4H10 c:n-C5H12 d:n-C6H14\n", +"// Bubble Point Calculation\n", +"xa = 0.05;\n", +"xb = 0.30;\n", +"xc = 0.40;\n", +"xd = 0.25;\n", +"P = 350;// [kN/square m]\n", +"//******//\n", +"\n", +"// Assume:\n", +"Temp = 60;// [OC]\n", +"x = [0.05 0.30 0.40 0.25];\n", +"m = [4.70 1.70 0.62 0.25];// [At 60 OC]\n", +"// Reference: C5H12\n", +"mref = m(3);\n", +"Sum = 0;\n", +"alpha = zeros(4)\n", +"alpha_x = zeros(4);\n", +"for i = 1:4\n", +" alpha(i) = m(i)/m(3);\n", +" alpha_x(i) = alpha(i)*x(i);\n", +" Sum = Sum+alpha_x(i);\n", +"end\n", +"// From Eqn. 9.23:\n", +"SumF = Sum;\n", +"Sum = 0;\n", +"mref = 1/SumF;\n", +"// Corresponding Temparature from the nomograph:\n", +"Temp = 56.8;// [OC]\n", +"m = [4.60 1.60 0.588 0.235];// [At 56.8 OC]\n", +"for i = 1:4\n", +" alpha(i) = m(i)/m(3);\n", +" alpha_x(i) = alpha(i)*x(i);\n", +" Sum = Sum+alpha_x(i);\n", +"end\n", +"SumF = Sum;\n", +"mref = 1/SumF;\n", +"// Corresponding Temparature from the nomograph:\n", +"Temp = 56.7;// [OC]\n", +"Bt = 56.8;// [OC]\n", +"yi = zeros(4);\n", +"for i = 1:4\n", +" yi(i) = alpha_x(i)/Sum;\n", +"end\n", +"printf('The Bubble Point is %f OC\n',Bt);\n", +"printf('Bubble point vapour composition \n');\n", +"printf('\t yi\n');\n", +"printf('n-C3\t %f\n',yi(1));\n", +"printf('n-C4\t %f\n',yi(2));\n", +"printf('n-C5\t %f\n',yi(3));\n", +"printf('n-C6\t %f\n',yi(4));\n", +"\n", +"printf('\n \n \n');\n", +"\n", +"// Dew Point Calculation\n", +"// Asume:\n", +"ya = 0.05;\n", +"yb = 0.30;\n", +"yc = 0.40;\n", +"yd = 0.25;\n", +"Temp = 80;// [OC]\n", +"y = [0.05 0.30 0.40 0.25];\n", +"m = [6.30 2.50 0.96 0.43];// [At 60 OC]\n", +"// Reference: C5H12\n", +"mref = m(3);\n", +"Sum = 0;\n", +"alpha = zeros(4)\n", +"alpha_y = zeros(4);\n", +"for i = 1:4\n", +" alpha(i) = m(i)/m(3);\n", +" alpha_y(i) = y(i)/alpha(i);\n", +" Sum = Sum+alpha_y(i);\n", +"end\n", +"\n", +"// From Eqn. 9.29:\n", +"SumF = Sum;\n", +"Sum = 0;\n", +"mref = SumF;\n", +"// Corresponding Temparature from the nomograph:\n", +"Temp = 83.7;// [OC]\n", +"m = [6.60 2.70 1.08 0.47];// [At 56.8 OC]\n", +"for i = 1:4\n", +" alpha(i) = m(i)/m(3);\n", +" alpha_y(i) = y(i)/alpha(i);\n", +" Sum = Sum+alpha_y(i);\n", +"end\n", +"SumF = Sum;\n", +"mref = 1/SumF;\n", +"// Corresponding Temparature from the nomograph:\n", +"Temp = 84;// [OC]\n", +"Dt = 84;// [OC]\n", +"xi = zeros(4);\n", +"for i = 1:4\n", +" xi(i) = alpha_y(i)/Sum;\n", +"end\n", +"printf('The Dew Point is %f OC\n',Dt);\n", +"printf('Dew point liquid composition \n');\n", +"printf('\t xi\n');\n", +"printf('n-C3\t %f\n',xi(1));\n", +"printf('n-C4\t %f\n',xi(2));\n", +"printf('n-C5\t %f\n',xi(3));\n", +"printf('n-C6\t %f\n',xi(4));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4: Partial_Condensation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 9.4\n", +"// Page: 365\n", +"\n", +"printf('Illustration 9.4 - Page: 365\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// Basis:\n", +"F = 100;// [mol feed]\n", +"zF = 0.5;\n", +"D = 60;// [mol]\n", +"W = 40;// [mol]\n", +"//*******//\n", +"\n", +"// From Illustration 9.1, Equilibrium data:\n", +"Data = [1 1;0.655 0.810;0.487 0.674;0.312 0.492;0.1571 0.279;0 0];\n", +"Feed = [0 0;1 1];\n", +"// The operating line is drawn with a slope -(W/D) to cut the equilibrium line.\n", +"deff('[y] = f44(x)','y = -((W/D)*(x-zF))+zF');\n", +"x = 0.2:0.1:0.6;\n", +"scf(16);\n", +"plot(Data(:,1),Data(:,2),Feed(:,1),Feed(:,2),x,f44);\n", +"xgrid();\n", +"xlabel('Mole fraction of heptane in liquid');\n", +"ylabel('Mole fraction of heptane in vapour');\n", +"legend('Equilibrium Line','Feed Line','Operating Line');\n", +"// The point at which the operating line cuts the equilibrium line has the following composition* temparature:\n", +"yd = 0.575;// [mole fraction heptane in vapour phase]\n", +"xW = 0.387;// [mole fraction heptane in liquid phase]\n", +"Temp = 113;// [OC]\n", +"printf('mole fraction of heptane in vapour phase %f \n',yd);\n", +"printf('mole fraction of heptane in liquid phase %f\n',xW);\n", +"printf('Temparature is %d OC\n',Temp);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5: Multicomponent_Systems_Ideal_Solution.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 9.5\n", +"// Page: 366\n", +"\n", +"printf('Illustration 9.5 - Page: 366\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"Pt = 760;// [mm Hg]\n", +"zFa = 0.5;// [mol fraction benzene]\n", +"zFb = 0.25;// [mol fraction toulene]\n", +"zFc = 0.25;// [mol fraction o-xylene]\n", +"//********//\n", +"\n", +"// Basis:\n", +"F = 100;// [mol feed]\n", +"// For Summtion of Yd_star to be unity, W/D = 2.08 \n", +"// The Eqn.are \n", +"// (1): W+D = F \n", +"// (2): W-2.08D = 0\n", +"a = [1 1;1 -2.08];\n", +"b = [F;0];\n", +"soln = a\b;\n", +"W = soln(1);\n", +"D = soln(2);\n", +"Sub = ['A','B','C'];\n", +"p = [1370 550 200];// [mm Hg]\n", +"m = zeros(3);\n", +"zF = [zFa zFb zFc];// [Given]\n", +"yd_star = zeros(3);\n", +"xW = zeros(3);\n", +"for i = 1:3\n", +" m(i) = p(i)/Pt;\n", +" yd_star(i) = zF(i)*((W/D)+1)/(1+(W/(D*m(i))));\n", +" xW(i) = yd_star(i)/m(i);\n", +"end\n", +"printf('\t \t \t \t \t \t \t \t At W/D = 2.08\n\n\n');\n", +"printf('Substance \t \t p(mm Hg)\t \t m\t \t \t \t zF\t \t \t \t yd*\t\t\t\txW\n');\n", +"for i = 1:3\n", +" printf('%c\t \t \t %d\t \t \t %f\t \t \t %f\t \t \t %f \t \t \t%f\n',Sub(i),p(i),m(i),zF(i),yd_star(i),xW(i));\n", +"end" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.6: Differential_Distillation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 9.6\n", +"// Page: 370\n", +"\n", +"printf('Illustration 9.6 - Page: 370\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// Basis:\n", +"F = 100;// [mol]\n", +"xF = 0.5;\n", +"D = 0.6*100;// [mol]\n", +"//******//\n", +"\n", +"W = F-D;// [mol]\n", +"// From Illustration 9.1:\n", +"alpha = 2.16;// [average value of alpha]\n", +"// From Eqn.9.46;\n", +"deff('[y] = f45(xW)','y = log(F*xF/(W*xW))-(alpha*log(F*(1-xF)/(W*(1-xW))))');\n", +"xW = fsolve(0.5,f45);// [mole fraction heptane]\n", +"deff('[y] = f46(yD)','y = F*xF-((D*yD)+(W*xW))');\n", +"yD = fsolve(100,f46);// [mole fraction heptane]\n", +"printf('Mole Fraction of heptane in the distillate is %f \n',yD);\n", +"printf('Mole Fraction of heptane in the residue is %f \n',xW);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.7: Multicomponent_Systems_Ideal_Solution.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 9.7\n", +"// Page: 371\n", +"\n", +"printf('Illustration 9.7 - Page: 371\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"// a:benzene b:toulene c:o-xylene\n", +"// Assume:\n", +"Bt = 100;//[OC]\n", +"pa = 1370;// [mm Hg]\n", +"pb = 550;// [mm Hg]\n", +"pc = 200;// [mm Hg]\n", +"xFa = 0.5;// [mole fraction]\n", +"xFb = 0.25;// [mole fraction]\n", +"xFc = 0.25;// [mole fraction]\n", +"// Basis:\n", +"F = 100;// [mol]\n", +"D = 32.5;// [mol]\n", +"//*******//\n", +"\n", +"ref = pb;\n", +"alpha_a = pa/ref;\n", +"alpha_b = pb/ref;\n", +"alpha_c = pc/ref;\n", +"W = F-D;// [mol]\n", +"xbW = 0.3;// [mol]\n", +"xaW = 0.4;// [mol]\n", +"xcW = 0.3;// [mol]\n", +"err = 1;\n", +"while(err>(10^(-1)))\n", +" // From Eqn. 9.47:\n", +" deff('[y] = f47(xaW)','y = log(F*xFa/(W*xaW))-(alpha_a*log(F*xFb/(W*xbW)))');\n", +" xaW = fsolve(xbW,f47);\n", +" deff('[y] = f48(xcW)','y = log(F*xFc/(W*xcW))-(alpha_c*log(F*xFb/(W*xbW)))');\n", +" xcW = fsolve(xbW,f48);\n", +" xbW_n = 1-(xaW+xcW);\n", +" err = abs(xbW-xbW_n);\n", +" xbw = xbW_n;\n", +"end\n", +"// Material balance:\n", +"// for A:\n", +"deff('[y] = f49(yaD)','y = F*xFa-((D*yaD)+(W*xaW))');\n", +"yaD = fsolve(100,f49);// [mole fraction benzene]\n", +"// For B:\n", +"deff('[y] = f50(ybD)','y = F*xFb-((D*ybD)+(W*xbW))');\n", +"ybD = fsolve(100,f50);// [mole fraction toulene]\n", +"// For C:\n", +"deff('[y] = f51(ycD)','y = F*xFc-((D*ycD)+(W*xcW))');\n", +"ycD = fsolve(100,f51);// [mole fraction o-xylene]\n", +"printf('The residual compositions are:\n');\n", +"printf('Benzene:%f\n',xaW);\n", +"printf('Toulene:%f\n',xbW);\n", +"printf('o-xylene:%f\n',xcW);\n", +"printf('The composited distillate compositions are:\n');\n", +"printf('Benzene:%f\n',yaD);\n", +"printf('Toulene:%f\n',ybD);\n", +"printf('o-xylene:%f\n',ycD);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.8: Optimum_Reflux_Ratio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 9.8\n", +"// Page: 388\n", +"\n", +"printf('Illustration 9.8 - Page: 388\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data*****//\n", +"// a:methanol b:water\n", +"Xa = 0.5;// [Wt fraction]\n", +"Temp1 = 26.7;// [OC]\n", +"Temp2 = 37.8;// [OC]\n", +"F1 = 5000;// [kg/hr]\n", +"//******//\n", +"\n", +"//(a)\n", +"Ma = 32.04;// [kg/kmol]\n", +"Mb = 18.02;// [kg/kmol]\n", +"Xa = 0.5;// [Wt fraction]\n", +"Xb = 1-Xa;// [Wt fraction]\n", +"Temp1 = 26.7;// [OC]\n", +"Temp2 = 37.8;// [OC]\n", +"F1 = 5000;// [kg/hr];\n", +"// Basis: 1hr\n", +"F = (F1*Xa/Ma)+(F1*Xb/Mb);// [kmol/hr]\n", +"// For feed:\n", +"zF = (F1*Xa/Ma)/F;// [mole fracton methanol]\n", +"MavF = F1/F;// [kg/kmol]\n", +"// For distillate:\n", +"xD = (95/Ma)/((95/Ma)+(5/Mb));// [mole fraction methanol]\n", +"MavD = 100/((95/Ma)+(5/Mb));// [kg/kmol]\n", +"// For residue:\n", +"xW = (1/Ma)/((1/Ma)+(99/Mb));// [mole fraction methanol]\n", +"MavR = 100/((1/Ma)+(99/Mb));// [kg/kmol]\n", +"// (1): D+W = F [Eqn.9.75]\n", +"// (2): D*xD+W*xW = F*zF [Eqn. 9.76]\n", +"// Solvving simultaneously:\n", +"a = [1 1;xD xW];\n", +"b = [F;F*zF];\n", +"soln = a\b;\n", +"D = soln(1);// [kmol/h]\n", +"W = soln(2);// [kmol/h]\n", +"printf('Quantity of Distillate is %f kg/hr\n',D*MavD);\n", +"printf('Quantity of Residue is %f kg/hr\n',W*MavR);\n", +"printf('\n');\n", +"\n", +"// (b)\n", +"// For the vapour-liquid equilibria:\n", +"Tempo = 19.69;// [Base Temp. according to 'International Critical Tables']\n", +"BtR = 99;// [Bubble point of the residue, OC]\n", +"hR = 4179;// [J/kg K]\n", +"hF = 3852;// [J/kg K]\n", +"deff('[y] = f52(tF)','y = (F1*hF*(tF-Temp1))-((W*MavR)*hR*(BtR-Temp2))');\n", +"tF = fsolve(Temp1,f52);// [OC]\n", +"BtF = 76;// [Bubble point of feed, OC]\n", +"// For the feed:\n", +"delta_Hs = -902.5;// [kJ/kmol]\n", +"Hf = ((hF/1000)*MavF*(tF-Tempo))+delta_Hs;// [kJ/kmol]\n", +"// From Fig 9.27:\n", +"HD = 6000;// [kJ/kmol]\n", +"HLo = 3640;// [kJ/kmol]\n", +"HW = 6000;// [kJ/kmol]\n", +"printf('The enthalpy of feed is %f kJ/kmol\n',Hf);\n", +"printf('The enthalpy of the residue is %f kJ/kmol\n',HW);\n", +"printf('\n');\n", +"\n", +"// (c)\n", +"// From Fig.9.27:\n", +"// The miium reflux ratio is established by the tie line (x = 0.37 y = 0.71), which extended pass through F,the feed.\n", +"// At Dm:\n", +"Qm = 62570;// [kJ/kmol]\n", +"Hg1 = 38610;// [kJ/kmol]\n", +"// From Eqn. 9.65:\n", +"Rm = (Qm-Hg1)/(Hg1-HLo);\n", +"printf('The minimum reflux ratio is %f\n',Rm);\n", +"printf('\n');\n", +"\n", +"// (d)\n", +"// From Fig. 9.28:\n", +"Np = 4.9;\n", +"// But it include the reboiler.\n", +"Nm = Np-1;\n", +"printf('The minimum number of theoretical trys required is %f \n',Nm);\n", +"printf('\n');\n", +"\n", +"// (e)\n", +"R = 1.5*Rm;\n", +"// Eqn. 9.65:\n", +"deff('[y] = f53(Q_prime)','y = R-((Q_prime-Hg1)/(Hg1-HLo))');\n", +"Q_prime = fsolve(2,f53);// [kJ/kmol]\n", +"deff('[y] = f54(Qc)','y = Q_prime-(HD+(Qc/D))');\n", +"Qc = fsolve(2,f54);// [kJ/hr]\n", +"Qc = Qc/3600;// [kW]\n", +"printf('The Condensor heat load is %f kW\n',Qc);\n", +"// From Eqn. 9.77:\n", +"deff('[y] = f55(Q_dprime)','y = (F*Hf)-((D*Q_prime)+(W*Q_dprime))');\n", +"Q_dprime = fsolve(2,f55);\n", +"deff('[y] = f56(Qb)','y = Q_dprime-(HW-(Qb/W))');\n", +"Qb = fsolve(2,f56);// [kJ/hr]\n", +"Qb = Qb/3600;// [kW]\n", +"printf('The Reboiler heat load is %f kW\n',Qb);\n", +"printf('\n');\n", +"\n", +"// (f)\n", +"// From Fig: 9.28\n", +"Np = 9;\n", +"// But it is including the reboiler\n", +"printf('No. of theoretical trays in tower is %d\n',Np-1);\n", +"G1 = D*(R+1);// [kmol/hr]\n", +"Lo = D*R;// [kmol/hr]\n", +"// From Fig. 9.28:\n", +"// At the feed tray:\n", +"x4 = 0.415;\n", +"y5 = 0.676;\n", +"x5 = 0.318;\n", +"y6 = 0.554;\n", +"// From Eqn. 9.64:\n", +"deff('[y] = f57(L4)','y = (L4/D)-((xD-y5)/(y5-x4))');\n", +"L4 = fsolve(2,f57);// [kmol/hr]\n", +"// From Eqn. 9.62:\n", +"deff('[y] = f58(G5)','y = (L4/G5)-((xD-y5)/(xD-x4))');\n", +"G5 = fsolve(2,f58);// [kmol/hr]\n", +"// From Eqn. 9.74:\n", +"deff('[y] = f59(L5_bar)','y = (L5_bar/W)-((y6-xW)/(y6-x5))');\n", +"L5_bar = fsolve(2,f59);// [kmol/hr]\n", +"// From Eqn. 9.72:\n", +"deff('[y] = f60(G6_bar)','y = (L5_bar/G6_bar)-((y6-xW)/(x5-xW))');\n", +"G6_bar = fsolve(2,f60);// [kmol/hr]\n", +"// At the bottom:\n", +"// Material Balance:\n", +"// Eqn. 9.66:\n", +"// (1): L8_bar-GW_bar = W;\n", +"// From Fig. 9.28:\n", +"yW = 0.035;\n", +"x8 = 0.02;\n", +"// From Eqn. 9.72:\n", +"L8ByGW_bar = (yW-xW)/(x8-xW);\n", +"// (2): L8_bar-(L8ByGW_bar*Gw_bar) = 0\n", +"a = [1 -1;1 -L8ByGW_bar];\n", +"b = [W;0];\n", +"soln = a\b;\n", +"L8_bar = soln(1);// [kmol/h]\n", +"GW_bar = soln(2);// [kmol/h]\n", +"printf('The Liquid quantity inside the tower is %f kmol/hr\n',L8_bar);\n", +"printf('The vapour quantity inside the tower is %f kmol/hr\n',GW_bar);\n", +"printf('\n');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.9: Use_of_Open_Steam.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"\n", +"// Illustration 9.9\n", +"// Page: 395\n", +"\n", +"printf('Illustration 9.9 - Page: 395\n\n');\n", +"\n", +"// solution\n", +"\n", +"//****Data****//\n", +"P = 695;// [kN/square m]\n", +"//********//\n", +"\n", +"// a:methanol b:water\n", +"// From Illustration 9.8:\n", +"Ma = 32.04;// [kg/kmol]\n", +"Mb = 18.02;// [kg/kmol]\n", +"F = 216.8;// [kmol/h]\n", +"Tempo = 19.7;// [OC]\n", +"zF = 0.360;// [mole fraction methanol]\n", +"HF = 2533;// [kJ/kmol]\n", +"D = 84.4;// [kkmol/h]\n", +"zD = 0.915;// [mole fraction methanol]\n", +"HD = 3640;// [kJ/kmol]\n", +"Qc = 5990000;// [kJ/h]\n", +"// Since the bottom will essentially be pure water:\n", +"HW = 6094;// [kJ/kmol]\n", +"// From Steam tables:\n", +"Hs = 2699;// [enthalpy of saturated steam, kJ/kg]\n", +"hW = 4.2*(Tempo-0);// [enthalpy of water, kJ/kg]\n", +"HgNpPlus1 = (Hs-hW)*Mb;// [kJ/kmol]\n", +"// (1): GNpPlus1-W = D-F [From Eqn. 9.86]\n", +"// (2): (GNpPlus1*HgNpPlus1)-(W*HW) = (D*HD)+Qc-(F*HF) [From Eqn. 9.88]\n", +"a = [1 -1;HgNpPlus1 -HW];\n", +"b = [D-F;(D*HD)+Qc-(F*HF)];\n", +"soln = a\b;\n", +"GNpPlus1 = soln(1);// [kmol/h]\n", +"W = soln(2);// [kmol/h]\n", +"// From Eqn. 9.87:\n", +"deff('[y] = f61(xW)','y = (F*zF)-((D*zD)+(W*xW))');\n", +"xW = fsolve(2,f61);\n", +"// The enthalpy of the solution at its bubble point is 6048 kJ/kmol, sufficiently closed to 6094 assumed earlier.\n", +"// For delta_w:\n", +"xdelta_w = W*xW/(W-GNpPlus1);\n", +"Q_dprime = ((W*HW)-(GNpPlus1*HgNpPlus1))/(W-GNpPlus1);// [kJ/kmol]\n", +"// From Fig 9.27 ad Fig. 9.28, and for the stripping section:\n", +"Np = 9.5;\n", +"printf('Steam Rate: %f kmol/h\n',GNpPlus1);\n", +"printf('Bottom Composition: xW: %f\n',xW);\n", +"printf('Number of theoretical stages: %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 +} |