PK��IO@$�HHCBasic Principles And Calculations In Chemical Engineering/ch1.ipynb{ "metadata": { "name": "", "signature": "sha256:24494f10d2186cdcb9bb7efdf5bb782c5e073da13a9c9e6466d2071310209ca3" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 1 : Introduction" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 1.1 page no : 6\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "#variables\n", "m_total=100.0; #lbm\n", " \n", "m_sand=0.7*m_total; #lbm\n", "m_water=0.3*m_total; #lbm\n", "rho_sand=165.0; #lbm/ft^3\n", "rho_water=62.3; #lbm/ft^3\n", "\n", "#calculation\n", "#rho=mass/volume\n", "rho_mud=m_total/((m_sand/rho_sand)+(m_water/rho_water));\n", "\n", "#result\n", "print \"The density of mud=\" ,rho_mud, \"lbm/ft^3\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The density of mud= 110.401675438 lbm/ft^3\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 1.2 page no : 8\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "D1=25.15 #mm\n", "D2=27.62 #mm\n", "dr=0.5*(D2-D1) #mm\n", "f=10. #rpm\n", "\n", "# calculations\n", "Vo=math.pi*D1*f/60. #mm/s\n", "#Let D denote d/dr\n", "DV=Vo/dr #s^-1\n", "tow=0.005 #Nm\n", "L=92.37 #mm\n", "s=2*tow/D1**2/(math.pi)/L*(10**6) #N/m^2\n", "\n", "# result\n", "print \"The stress at the surface of the inner cylinder is %f N/m^2\"%s " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The stress at the surface of the inner cylinder is 0.054481 N/m^2\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 1.3 page no : 15\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variablees\n", "l=0.10; #m (length of sliding part)\n", "f=0.00589; #N (pull due to 0.6 gm of mass)\n", "\n", "#calculation\n", "f_onefilm=f/2; #N\n", "#surface tension=(force for one film)/(length)\n", "sigma=f_onefilm/l;\n", "\n", "# result\n", "print \"The surface tension of fluid is\",sigma,\"N/m\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The surface tension of fluid is 0.02945 N/m\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 1.4 page no : 20\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# variables\n", "V=327. #miles/hr\n", "#1 mile = 5280 ft\n", "#1 hour = 3600 sec\n", "\n", "# calculation\n", "V1=V*5280/3600.0#ft/s\n", "\n", "# result\n", "print \"327 miles/hr = %f ft/s\"%V1" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "327 miles/hr = 479.600000 ft/s\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 1.5 page no : 21\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# variables\n", "t=2.6 #hr\n", "#1 hr = 3600 s\n", "\n", "# calculations\n", "t1=2.6*3600 #s\n", "\n", "# result\n", "print \"2.6 hours = %f seconds\"%t1" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "2.6 hours = 9360.000000 seconds\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 1.6 page no : 24\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#\n", "# variables\n", "m=10. #lbm\n", "F=3.5 #lbf\n", "#1 lbf.s^2 = 32.2 lbm.ft\n", "#1 min = 60 sec\n", "\n", "# calculations\n", "a=F*32.2*60**2/m #ft/min^2\n", "\n", "# result\n", "print \"The acceleration provided is %f ft/min^2\" % a" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The acceleration provided is 40572.000000 ft/min^2\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 1.7 page no : 24\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "I=50000. #Ampere or Coulumbs/sec\n", "#1 hr = 3600 sec\n", "I1=50000*3600. #C/hr\n", "\n", "#calculation\n", "#96500 C = 1 gm.eq\n", "#1 mole of aluminium = 3 gm.eq\n", "#1 mole of aluminium = 27 gm\n", "m=I1*(1.0/96500)*(27/3.0)/1000.0 #Kg/hr\n", "\n", "#result\n", "print \"the wt of metallic aluminium deposited in an electrolytic cell is %f Kg/hr\"%m" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the wt of metallic aluminium deposited in an electrolytic cell is 16.787565 Kg/hr\n" ] } ], "prompt_number": 9 } ], "metadata": {} } ] }PK��IBZ9�OOCBasic Principles And Calculations In Chemical Engineering/ch2.ipynb{ "metadata": { "name": "", "signature": "sha256:ef26cf09debc2accb827957d575ac9576db35c1e13d184b4161dad1098add2f0" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 2 : Fluid statics" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.1 page no : 40\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# variables\n", "g=32.2; #ft/s^2\n", "rho_water=62.3; #lbm/ft^3\n", "\n", "# calculation\n", "#specific weoight=(density)*(acceleration due to gravity)\n", "specific_wt=rho_water*g; #lbm.ft/ft^3.s^2\n", "\n", "#1 lbf=32.2 lbm.ft/s^2\n", "specific_wt=specific_wt/32.2; #lbf/ft^3\n", "\n", "# result\n", "print \"Specific weight of water is\" ,specific_wt , \"lbf/ft^3\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Specific weight of water is 62.3 lbf/ft^3\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.2 page no : 40\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# variables\n", "d=304.9; #m\n", "rho_water=1024.; #Kg/m^3\n", "g=9.81; #m/s^2\n", "p_atm=101.3; #KPa\n", "\n", "# calculation\n", "#gauge pressure=(desity)*(acc. due to gravity)*(depth)\n", "p_depth=p_atm+rho_water*g*d/1000.0; #KPa\n", "\n", "# result\n", "print \"pressure at the depth is\" , (p_depth) , \"KPa\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "pressure at the depth is 3164.154656 KPa\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.3 page no : 41\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "rho_oil=55.; #lbm/ft^3\n", "g=32.2; #ft/s^2\n", "d=60.; #ft (depth of oil cylinder)\n", "\n", "# calculation and result\n", "gauge_pressure=rho_oil*g*d/32.2; #lbf/ft^2\n", "print \"Gauge pressure is\",\n", "print gauge_pressure,\n", "print \"lbf/ft^2\"\n", "\n", "#1 ft=12 in\n", "gauge_pressure=gauge_pressure/144.0; #lbf/in^2\n", "print \"Gauge pressure is\",\n", "print gauge_pressure,\n", "print \"lbf/in^2\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Gauge pressure is 3300.0 lbf/ft^2\n", "Gauge pressure is 22.9166666667 lbf/in^2\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.4 page no : 42\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# varirbles\n", "#calc of density of air at a certain height\n", "p_atm=14.7; #psia\n", "T=289.; #K\n", "\n", "#P2=P1*exp^(-(acc. due to gravity)*(mass of air)*(height)/(universal gas const.)/(temp.))\n", "g=9.81; #m/s^2\n", "R=8314; #N.m^2/Kmol/K\n", "\n", "#for height of 1000 ft=304.8m\n", "h=304.8; #m\n", "p_1000=14.7*math.exp(-g*29*h/R/289);\n", "print \"pressure at 1000ft is\",\n", "print p_1000,\n", "print \"psia\"\n", "\n", "#for height of 10000 ft=3048m\n", "h=3048.; #m\n", "p_10000=p_atm*math.exp(-g*29.*h/R/289.);\n", "print \"pressure at 10000ft is\",\n", "print p_10000,\n", "print \"psia\"\n", "\n", "#for height of 100000 ft=30480m\n", "h=30480.; #m\n", "p_100000=14.7*math.exp(-g*29.*h/R/289.);\n", "print \"pressure at 100000ft is\",\n", "print p_100000,\n", "print \"psia\"," ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "pressure at 1000ft is 14.1789512072 psia\n", "pressure at 10000ft is 10.2467246829 psia\n", "pressure at 100000ft is 0.398102276652 psia\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.5 page no : 42\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# variables\n", "p_atm=14.7; #psia\n", "g=9.81; #m/s^2\n", "\n", "#P2=P1*[1-(acc. due to gravity)*(mass of air)*(height)/(univ. gas const.)/(temp.)]\n", "T=289.; #K\n", "R=8314. #N.m^2/Kmol/K\n", "\n", "\n", "# calculation and result\n", "#for height of 1000ft=304.8m\n", "h=304.8 #m\n", "p_1000=p_atm*(1-g*29*h/R/T)\n", "print \"pressure at 1000ft is\",\n", "print p_1000,\n", "print \"psia\"\n", "\n", "#for height of 10000ft=3048m\n", "h=3048. #m\n", "p_10000=p_atm*(1-g*29*h/R/T)\n", "print \"pressure at 10000ft is\",\n", "print p_10000,\n", "print \"psia\"\n", "\n", "#for height of 100000ft=30480m\n", "h=30480. #m\n", "p_100000=p_atm*(1-g*29*h/R/T)\n", "print \"pressure at 100000ft is\",\n", "print p_100000,\n", "print \"psia\"\n", "\n", "#NOTE that the pressure comes out to be negative at 100000ft justifying that density of air changes with altitude" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "pressure at 1000ft is 14.1694926079 psia\n", "pressure at 10000ft is 9.39492607874 psia\n", "pressure at 100000ft is -38.3507392126 psia\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.6 page no : 45\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "#calc atm pressure on a storage tank roof\n", "p_atm=14.7; #psia\n", "\n", "#diameter of roof is 120ft\n", "d_roof=120.; #ft\n", "\n", "# calculation\n", "#force=(pressure)*(area)\n", "f_roof=p_atm*(math.pi)*d_roof**2/4.*144; #lbf ;144 because 1ft=12inch\n", "\n", "# result\n", "print \"Force exerted by atmosphere on the roof is\",\n", "print f_roof,\n", "print \"lbf\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Force exerted by atmosphere on the roof is 23940443.9848 lbf\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.7 page no : 45\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "#calc atm pressure on a storage tank roof\n", "p_atm=14.7; #psia\n", "\n", "#diameter of roof is 120ft\n", "d_roof=120.; #ft\n", "#force=(atm. pressure + gauge pressure)*(area)\n", "#gauge pressure=(desity)*(acc. due to gravity)*(depth)\n", "rho_water=62.3 #lbm/ft^3\n", "g=32.2; #ft/s^2\n", "\n", "# calculation\n", "#depth of water on roof=8 inch=o.667 ft\n", "h=0.667; #ft\n", "gauge_pressure=rho_water*g*h/32.2*(math.pi)*d_roof**2/4.; #lbf\n", "\n", "# result\n", "print gauge_pressure" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "469965.799032\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.8 page no : 46\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "#lock gate has water on one side and air on the other at atm. pressure\n", "w=20.; #m (width of the lock gate)\n", "h=10.; #m (height of the lock gate)\n", "p_atm=1.; #atm\n", "rho_water=1000.; #Kg/m^3\n", "g=9.81 #m/s^2\n", "\n", "# calculation\n", "#for a small strip of dx height at the depth of x on the lock gate\n", "#net pressure on strip = (p_atm+(rho_water)*g*x) - p_atm\n", "#thus, net pressure on strip = (rho_water)*g*x\n", "#force on strip = (rho_water*g*x)*w.dx = (rho_water)*g*w*(x.dx)\n", "#force on lock gate = integration of force on strip fromm h=0 to h=10\n", "#integration(x.dx) = x^2/2\n", "#for h=0 to h=10; integration (x.dx) = h^2/2\n", "force_lockgate=(rho_water)*g*w*h**2/2;\n", "\n", "# result\n", "print \"The net force on the lock gate is\",force_lockgate/10**6,\"MN\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The net force on the lock gate is 9.81 MN\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "example 2.9 page no : 49\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "sigma_tensile=20000. #lbf/in^2 (tensile stress is normally 1/4 rupture stress)\n", "\n", "#max pressure is observed at the bottom of the storage\n", "p_max=22.9; #lbf/in^2\n", "\n", "#diameter of storaeg tank = 120ft =1440in\n", "d=1440.; #in\n", "\n", "# calculation\n", "t=(p_max)*d/sigma_tensile/2; #in\n", "\n", "# result\n", "print \"Thichness of the storage tank is\",\n", "print t,\n", "print \"in\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Thichness of the storage tank is 0.8244 in\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.10 page no : 50\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "p_working=250.0; #lbf/in^2\n", "\n", "#diameter of the cylinder = 10ft = 120in\n", "d=120.0; #in\n", "sigma_tensile=20000.; #lbf/in^2\n", "\n", "# calculation\n", "t=p_working*d/sigma_tensile/2; #in\n", "\n", "# result\n", "print \"Thichness of the storage tank is\",\n", "print t,\n", "print \"in\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Thichness of the storage tank is 0.75 in\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.11 page no : 53\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "p_atm=1.; #atm\n", "T=293.; #K\n", "d=3.; #m (diameter of the balloon)\n", "\n", "# calculation\n", "#buoyant force=(density of air)*g*(volume of balloon)\n", "#weight of balloon = (density of helium)*g*(volume of balloon)\n", "#density for gases = PM/RT\n", "#payload of balloon = buoyant force - weight\n", "V_balloon=(math.pi)*d**3/6.; #m^3\n", "R=8.2*10**(-2); #m^3.atm/mol/K\n", "M_air=29.; #Kg/Kmol\n", "M_he=4.; #Kg/Kmol\n", "g=9.81; #m/s^2\n", "payload=(V_balloon)*g*p_atm*(M_air-M_he)/R/T; #N\n", "\n", "# result\n", "print \"Payload of the balloon is\",\n", "print payload,\n", "print \"N\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Payload of the balloon is 144.307841185 N\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.12 page no : 54\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "#calc fraction of block in water\n", "SG_wood=0.96; #Specific gravity\n", "SG_gasoline=0.72;\n", "\n", "# calculation\n", "#Let r be the ratio - V_water/V_wood\n", "r=(SG_wood-SG_gasoline)/(1-SG_gasoline);\n", "\n", "# result\n", "print \"Fraction of wood in water\",\n", "print r" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Fraction of wood in water 0.857142857143\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.13 page no : 54\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# variables\n", "#height of water above pt.C = 2.5ft\n", "rho_water=62.3; #lbm/ft^3;\n", "h1=2.5; #ft\n", "rho_gas=0.1; #lbm/ft^3\n", "h2=0.5; #ft (height of gas)\n", "g=32.2; #ft/s^2\n", "\n", "# calculation\n", "gauge_pressure=((rho_water)*g*h1+(rho_gas)*g*h2)/144/32.2 #lbf/in^2\n", "\n", "# result\n", "print \"Gauge pressure is\",\n", "print gauge_pressure,\n", "print \"lbf/in^2\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Gauge pressure is 1.08194444444 lbf/in^2\n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.14 page no : 56\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "rho_water=62.3; #lbm/ft^3\n", "SG_oil=1.1;\n", "rho_oil=SG_oil*(rho_water);\n", "g=32.2; #ft/s^2\n", "h1_1=1.; #ft\n", "h1_2=2.; #ft\n", "h2_1=2.; #ft\n", "h2_2=1.; #ft\n", "\n", "# calculation\n", "p_diff=((rho_water)*g*(h1_1-h1_2)+(rho_oil)*g*(h2_1-h2_2))/32.2/144.0; #lbf/in^2\n", "\n", "# result\n", "print \"The pressure difference is\",\n", "print p_diff,\n", "print \"lbf/in^2\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The pressure difference is 0.0432638888889 lbf/in^2\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.15 page no : 57\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "k=10000.; #N/m (spring constant)\n", "x=0.025; #m (displacement in spring)\n", "A=0.01; #m^2 (area of piston)\n", "\n", "# calculation\n", "gauge_pressure=k*x/A/1000.; #KPa\n", "\n", "# result\n", "print \"The gauge pressure is\",\n", "print gauge_pressure,\n", "print \"KPa\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The gauge pressure is 25.0 KPa\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.16 page no : 60\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# variables\n", "g=32.2; #ft/s^2\n", "h=20.; #ft (height of fireplace)\n", "rho_air=0.075; #lbm/ft^3\n", "T_air=293.0; #K (surrounding temperature)\n", "T_fluegas=422.0; #K\n", "\n", "# calculation\n", "p_diff=g*h*(rho_air)*(1-(T_air/T_fluegas))/32.2/144; #lbf/in^2\n", "\n", "# result\n", "print \"The pressure difference is\",\n", "print p_diff,\n", "print \"lbf/in^2\"," ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The pressure difference is 0.00318424170616 lbf/in^2\n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.17 page no : 64\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "rho_water=1000. #Kg/m^3\n", "g=9.81; #m/s^2\n", "h=5.; #m (depth of water)\n", "\n", "# calculation and result\n", "#for elevator not accelerated\n", "p_gauge=(rho_water)*g*h/1000.0; #KPa\n", "print \"THe gauge pressure is\",\n", "print p_gauge,\n", "print \"KPa\"\n", "\n", "#for elevator accelerated at 5m/s^2 in upward direction\n", "a=5.; #m/s^2\n", "p_gauge=(rho_water)*(g+a)*h/1000.0; #KPa\n", "print \"THe gauge pressure is\",\n", "print p_gauge,\n", "print \"KPa\"\n", "\n", "#for elevator accelerated at 5m/s^2 in downward direction\n", "a=5.; #m/s^2\n", "p_gauge=(rho_water)*(g-a)*h/1000.0; #KPa\n", "print \"THe gauge pressure is\",\n", "print p_gauge,\n", "print \"KPa\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "THe gauge pressure is 49.05 KPa\n", "THe gauge pressure is 74.05 KPa\n", "THe gauge pressure is 24.05 KPa\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "example 2.18 page no : 65\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "#angle free surface makes with the horizontal in an accelerated body\n", "a=1.; #ft/s^2\n", "g=32.2; #ft/s^2\n", "\n", "# calculation\n", "theta=math.atan(a/g); #radians\n", "theta=theta*180./math.pi; #degrees\n", "\n", "# result\n", "print \"The angle made by free surface with the horizontal is\",\n", "print theta,\n", "print \"degrees\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The angle made by free surface with the horizontal is 1.77880031567 degrees\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.19 page no : 66\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "# variables\n", "f=78/60.0; #rps\n", "r=0.15; #m\n", "g=9.81; #m/s^2\n", "\n", "# calculation\n", "#omega=2*(%pi)*f\n", "z=((2*(math.pi)*f)**2)*r**2/2/g; #m\n", "\n", "# result\n", "print \"The liquid in the cylinder rises to a height of\",\n", "print z,\n", "print \"m\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The liquid in the cylinder rises to a height of 0.0765120708158 m\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.20 page no : 67\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "#Let difference between heights at bottom and top be d\n", "d=20.; #in\n", "r_a=14.; #in\n", "f=1000/60.; #rps\n", "g=32.2; #ft/s^2\n", "\n", "# calculation\n", "r_b=((r_a)**2-2*(d)*g*12/(2*(math.pi)*f)**2)**0.5; #in\n", "\n", "# result\n", "print \"The thickness of water strip at bottom of industrial centrifuge\",\n", "print r_b,\n", "print \"in\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The thickness of water strip at bottom of industrial centrifuge 13.9495728181 in\n" ] } ], "prompt_number": 20 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I� -�8#8#CBasic Principles And Calculations In Chemical Engineering/ch3.ipynb{ "metadata": { "name": "", "signature": "sha256:445dec12235c400efa979dcf04faa2911a77ac6433ec8e786b9205e0e8fdeeb4" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 3 : The balance equation and mass balance" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 3.4 page no : 88\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "V=15.; #gal volume of gasoline\n", "t=2.; #min\n", "rho_water=62.3; #lbm/ft^3\n", "sg=0.72; #specific gravity\n", "\n", "# calculation and Result\n", "q=(15/2.0)*(0.1336/60) #ft^3/s vol. flow rate\n", "print \"volumetric flow rate is %f ft^3/s\"%q\n", "m=q*sg*rho_water #lbm/s\n", "print \"Mass flow rate is %f lbm/s\"%m\n", "d=1.; #in diameter of pipe\n", "a=((math.pi)*d**2/4.0)/144.0; #ft^2 area of pipe\n", "v_avg=q/a #ft/s\n", "print \"The average velocity is %f ft/s\"%v_avg" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "volumetric flow rate is 0.016700 ft^3/s\n", "Mass flow rate is 0.749095 lbm/s\n", "The average velocity is 3.061886 ft/s\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 3.5 page no : 90\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "d1=2.; #ft diameter of pipe at position 1\n", "a1=(math.pi)/4*d1**2; #ft^2\n", "v1=50.; #ft/s vel of gas at position 1\n", "rho1=2.58; #lbm/ft^3 density of gas at position 1\n", "d2=3.; #ft diameter of pipe at position 2\n", "\n", "# calculation\n", "a2=(math.pi)/4*d2**2;\n", "rho2=1.54; #lbm/ft^3 density at position 2\n", "v2=(rho1/rho2)*(a1/a2)*v1 #ft/s\n", "\n", "# result\n", "print \"Velocity is %f ft/s\"%v2\n", "m=rho1*v1*a1 #lbm/s mass flow rate\n", "print \"The mass flow rate is %f lbm/s\"%m" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Velocity is 37.229437 ft/s\n", "The mass flow rate is 405.265452 lbm/s\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 3.6 page no : 91\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "d1=0.25; #m diameter of pipe at position 1\n", "v1=2.; #m/s velocity\n", "rho=998.2; #kg/m^3 density of water\n", "a1=(math.pi)/4*d1**2; #m^2\n", "d2=0.125 #m diameter of pipe at position 2\n", "\n", "# calculation\n", "a2=(math.pi)/4*d2**2; #m^2\n", "m=rho*a1*v1 #kg/s mass flow rate\n", "\n", "# result\n", "print \"Mass flow rate is %f kg/s\"%m\n", "q=m/rho #m^3/s volumetric flow rate\n", "print \"The volumetric flow rate is %f m^3/s\"%q\n", "v2=(a1/a2)*v1 #m/s velocity\n", "print \"Velocity of water is %f m/s\"%v2" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Mass flow rate is 97.998056 kg/s\n", "The volumetric flow rate is 0.098175 m^3/s\n", "Velocity of water is 8.000000 m/s\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 3.7 page no : 92\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "p_initial=1.; #atm pressure initially\n", "p_final=0.0001; #atm pressure finally\n", "V=10.; #ft^3 volume of system\n", "q=1.; #ft^3/min vol. flow rate\n", "\n", "# calculation\n", "t=(V/q)*math.log(p_initial/p_final) #min\n", "\n", "# result\n", "print \"The time required is %f min\"%t" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The time required is 92.103404 min\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 3.8 page no : 93\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "m_in=0.0001; #lbm/min\n", "q_out=1.; #ft^3/min\n", "rho_sys=m_in/q_out #lbm/ft^3\n", "rho_air=0.075; #lbm/ft^3\n", "p_initial=1.; #atm\n", "\n", "# calculation\n", "p_steady=p_initial*(rho_sys/rho_air) #atm\n", "\n", "# result\n", "print \"The steady state pressure is %f atm\"%p_steady" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The steady state pressure is 0.001333 atm\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 3.9 page no : 94\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "d=3.; #m diameter of tank\n", "a=(math.pi)*d**2/4; #m^2\n", "d_in=0.1; #m inner diameter of inflow pipe\n", "d_out=0.2; #m\n", "v_in=2.0; #m/s\n", "v_out=1.0; #m/s\n", "\n", "# calculation\n", "q_in=((math.pi)*d_in**2/4.0)*v_in; #m^3/s\n", "q_out=((math.pi)*d_out**2/4.0)*v_out; #m^3/s\n", "\n", "#let D represent d/dt\n", "DV=q_in-q_out; #m^3/s\n", "\n", "# result\n", "if DV>1:\n", " print \"The water level in tank is rising\"\n", "elif DV<1:\n", " print \"The water level in tank is falling\"\n", "else:\n", " print \"No accumulation\"\n", "#let h be the height of water in tank\n", "Dh=DV/a #m/s \n", "print \"The rate of level of water is rising or falling in a cylindrical tank is %f m/s\"%Dh" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The water level in tank is falling\n", "The rate of level of water is rising or falling in a cylindrical tank is -0.002222 m/s\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 3.11 page no : 97\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "q=5/8.0; #kg/hr mass evaporation rate of benzene\n", "c=1.3*10**(-6); #kg/m^3 concentration of benzene\n", "\n", "# calculation\n", "Q=q/c/3600.0 #m^3/s\n", "\n", "# result\n", "print \"The flow rate of ventilation air supply is %f m^3/s\"%Q" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The flow rate of ventilation air supply is 133.547009 m^3/s\n" ] } ], "prompt_number": 8 } ], "metadata": {} } ] }PK��I�!栦 � CBasic Principles And Calculations In Chemical Engineering/ch4.ipynb{ "metadata": { "name": "", "signature": "sha256:16617b0214df1f3fa0b6950901fd2bc173679187633649259f00cd5dd8aa8d5e" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 4 : Temperature" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "\n", "Example 4.1 Page no. 92\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variable\n", "#(a)\n", "Temp_c=100. ; #[degree Celsius]\n", "\n", "# Calculation and Result\n", "Temp_k=Temp_c+273 ; #[K]\n", "print '(a) Temperature in kelvin is %.2f K'%Temp_k\n", "\n", "#(b)\n", "Temp_f=(100*(1.8/1)) +32 ; #[degree Fahrenheit]\n", "print ' (b) Temperature in degree Fahrenheit is %.2f '%Temp_f\n", "\n", "#(c)\n", "Temp_r= Temp_f + 460 ; #[degree Rankine ]\n", "print ' (c) Temperature in degree Rankine is %.2f '%Temp_r" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) Temperature in kelvin is 373.00 K\n", " (b) Temperature in degree Fahrenheit is 212.00 \n", " (c) Temperature in degree Rankine is 672.00 \n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.2 Page no. 93\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "c = 139.1 + (1.56*10**-1)*(-460-32)/1.8 ;\n", "d = (1.56*10**-1)/1.8;\n", "\n", "# Calculation\n", "#Now convert c +dTR to (Btu/lb mol*degree R) to get answer of form a + bTR,where\n", "a = c*(454/(1055*1.8)) ;\n", "b = d*(454/(1055*1.8)) ;\n", "\n", "# Result\n", "print 'The required answer is %.2f + (%.2e)T Btu/(lb mol*degree R) , where T is in degree R . '%(a,b)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The required answer is 23.06 + (2.07e-02)T Btu/(lb mol*degree R) , where T is in degree R . " ] } ], "prompt_number": 2 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I�T�Z��CBasic Principles And Calculations In Chemical Engineering/ch5.ipynb{ "metadata": { "name": "", "signature": "sha256:17452ca2e9b7dcffa8d444e8e6e3bb3b7f47f9f947558729a784ae56a1f45de2" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Chapter 5 : Pressure" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 5.1 Page no.109\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "P = 60 ; #[Gpa]\n", "\n", "# Calculation and Results\n", "#(a)\n", "p_atm = (P*(10**6))/101.3 ; #[atm]\n", "print '(a) Pressure in atmospheres is %.2e atm'%p_atm\n", "\n", "#(b)\n", "p_s = (P*(10**6)*14.696)/101.3 ; #[psia]\n", "print ' (b) Pressure in psia is %.2e psia'%p_s\n", "\n", "# (c)\n", "p_in = (P*(10**6)*29.92)/101.3 ; #[inches of Hg]\n", "print ' (c) Pressure in inches of Hg is %.2e in. Hg'%p_in\n", "\n", "# (d)\n", "p_mm = (P*(10**6)*760)/101.3 ; #[mm of Hg]\n", "print ' (d) Pressure in mm of Hg is %.2e mm Hg'%p_mm" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) Pressure in atmospheres is 5.92e+05 atm\n", " (b) Pressure in psia is 8.70e+06 psia\n", " (c) Pressure in inches of Hg is 1.77e+07 in. Hg\n", " (d) Pressure in mm of Hg is 4.50e+08 mm Hg" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 5.2 Page no. 110\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variable\n", "b_rd = 28.0 ; #[in. Hg]\n", "p_rd = 51.0 ; #[psia]\n", "\n", "# calculation\n", "p_atm = b_rd*14.7/29.92 ; # [psia]\n", "p_tnk = p_atm+p_rd ; #[psia]\n", "\n", "# Result\n", "print ' Pressure in tank in psia is %.1f psia'%p_tnk" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Pressure in tank in psia is 64.8 psia\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 5.3 Page no. 111\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "b_rd = 100.0 ; #[kPa]\n", "gp = 64.5*101.3/76.0 ; #[kPa]\n", "\n", "# Calculations\n", "p_tnk = b_rd-gp ; #[kPa]\n", "\n", "# Results\n", "print ' Absolute Pressure in tank in is %.1f kPa'%p_tnk\n", "print ' Since absolute pressure in tank(%.1f kPa) is less than 20 kPa , the \\\n", " mice probably will not survive. '%p_tnk" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Absolute Pressure in tank in is 14.0 kPa\n", " Since absolute pressure in tank(14.0 kPa) is less than 20 kPa , the mice probably will not survive. \n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 5.4 Page no. 115\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "df = 1.10*10**3 ; #[kg/m**3]\n", "d = 1.0*10**3 ; #[kg/m**3]\n", "g = 9.8 ; #[m/s**2]\n", "h = 22.0 ; #[mm]\n", "\n", "# Calculation\n", "dP = (df-d)*g*(h*10**(-3)) ; #[Pa]\n", "\n", "# Result\n", "print 'Pressure difference across the orifice plate is %.1f Pa.'%dP" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Pressure difference across the orifice plate is 21.6 Pa.\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 5.5 Page no. 117\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "p_atm=730.0*29.92/760.0 ; #[in. Hg]\n", "gp= (4.0*29.92)/(2.54*12*33.91) ; #[in. Hg]\n", "\n", "# Calculation\n", "p_air=p_atm-gp ; #[in. Hg]\n", "\n", "# Result\n", "print ' Pressure of the air is %.1f in. Hg.'%p_air" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Pressure of the air is 28.6 in. Hg.\n" ] } ], "prompt_number": 4 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I��5��CBasic Principles And Calculations In Chemical Engineering/ch6.ipynb{ "metadata": { "name": "", "signature": "sha256:829300ed441b0056de124b3c59bbb1f7034cd4f5704a4d95b4ff6c77357fd0c5" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 6 : Introduction to Material Balances" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 6.1 Page no. 142\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "from numpy import matrix\n", "\n", "# Variables\n", "# Given\n", "P_O = 89 ; # Premium octane -[octane/gal]\n", "S_O = 93 ; # Supereme octane - [octane/gal]\n", "R_O = 87 ; # Regular octane - [octane/gal]\n", "CP = 1.269 ; # Cost of premium octane -[$/gal]\n", "SP = 1.349 ; # Cost of supereme octane -[$/gal]\n", "RP = 1.149 ; # Cost of regular octane -[$/gal]\n", "\n", "# Let x and y fraction of regular octane and supreme octane is blended respectively,therefore: x + y = 1 ...(a)\n", "# and 89 = 87x + 93y ...(b)\n", "# Solve equations (a) and (b) simultaneously\n", "# Calculation\n", "a = matrix([[1,1],[87,93]]) ; # Matrix of coefficients of unknown\n", "b = matrix([[1.0],[89.0]]) ; # Matrix of constant\n", "a = a.I\n", "c = a * b\n", "cost = c*RP + c*SP ; # Cost after blending - [$/gal]\n", "sv = CP - cost ; # Save on blending - [$/gal]\n", "\n", "# Result\n", "# Check whether there is loss or save\n", "if (sv<0):\n", " print 'We will not save money by blending.'\n", "else:\n", " print 'We will save money by blending, and save is %.3f $/gal.'%sv" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "We will save money by blending, and save is 0.053$/gal.\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 6.2 Page no. 147\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "fd= 1000.0 ; #feed rate-[L/hr]\n", "cfd= 500.0; #Weight of cells per litre- [mg/L]\n", "dn= 1.0 ; #Density of feed-[g/cm**3]\n", "wp= 50.0 ; # Weight percent of cells in product stream\n", "\n", "# Calculation and Result\n", "Pg=(fd*cfd*dn)/(1000*wp*.01) ; # Mass balance for cells \n", "print ' Product flow(P) per hour is %.1f g'%Pg\n", "Dg= (fd*dn*1000) - Pg*(wp*.01) ; # Mass balance for the fluid\n", "print ' Discharge flow per hour is %.3e g'%Dg" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Product flow(P) per hour is 1000.0 g\n", " Discharge flow per hour is 9.995e+05 g\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 6.3 Page no. 154\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "dn = 0.80 ; #Density of motor oil-[g/cm**3]\n", "\n", "# Calculation and Result\n", "in_ms = (10000*(0.1337)*62.4*dn) ; # Initial mass of motor oil in the tank -[lb]\n", "print ' Initial mass of motor oil in the tank is %.1f lb'%in_ms\n", "\n", "m_fr = .0015 ; #Mass fractional loss\n", "print ' Mass fractional loss is %.4f '%m_fr\n", "\n", "Dsg = m_fr*in_ms ; # Mass balance for the fluid\n", "print ' Discharge of motor oil on flushing flow for 10000 gal motor oil is %.1f lb'%Dsg" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Initial mass of motor oil in the tank is 66743.0 lb\n", " Mass fractional loss is 0.0015 \n", " Discharge of motor oil on flushing flow for 10000 gal motor oil is 100.1 lb\n" ] } ], "prompt_number": 4 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I*u�]��CBasic Principles And Calculations In Chemical Engineering/ch7.ipynb{ "metadata": { "name": "", "signature": "sha256:702f6d54433444391f54642fccdef71d5ded6c19433d61198181ed7204437113" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 7 : A General Strategy for Solving Material Balance Problems" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 7.1 Page no.169\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "v_ts = 105.0 ; # velocity of train wrt station-[cm/s]\n", "v_mt = 30.0 ; # velocity of man wrt train-[cm/s]\n", "v_hm = 2.0 ; # velocity of hot dough wrt man-[cm/s]\n", "v_am = 1.0 ; # velocity of ant wrt man- [cm/s]\n", "# By careful reading of problem you can see that ant is moving away from man's mouth at 1 cm/s , so ant's velocity wrt station \n", "#is say v_as\n", "\n", "# Calculation\n", "v_as = v_ts + v_mt + v_am;\n", "\n", "# Results\n", "print ' The ant is moving towards station at the rate of %.1f cm/s.'%v_as" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " The ant is moving towards station at the rate of 136.0 cm/s.\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 7.4 Page no. 180\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "n_un= 7 ; # Number of unknowns in the given problem- 3 values of xi and 4 values Fi\n", "n_ie = 5 ; # Number of independent equations\n", "\n", "# Calculations\n", "d_o_f = n_un-n_ie ; # No. of degree of freedom\n", "\n", "# Results\n", "print 'Number of degree of freedom for the given system is %i .'%d_o_f" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Number of degree of freedom for the given system is 2 .\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 7.5 Page no. 182\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "n_un=8 ; # Number of unknowns in the given problem- 8 values of mole fractions\n", "n_ie =6 ; # Number of independent equations- six elemental balances \n", "\n", "# Calculation\n", "d_o_f= n_un-n_ie ;# Number of degree of freedom\n", "\n", "# Results\n", "print 'Number of degree of freedom for the given system is %i .'%d_o_f\n", "#Note: Experiments show that the change in CH1.8O.5N.16S.0045P.0055 and the change in C(alpha)H(beta)O(gamma) prove to be \n", "#related by amount of biomass present and the maintenance coefficient(the moles of substrate per mole of biomass per second) \n", "#so the respective quantities cannot be chosen independently.Consequently with this extra constraint,only one degree of freedom \n", "#remains to be specified, the basis" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Number of degree of freedom for the given system is 2 .\n" ] } ], "prompt_number": 3 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��Im�+� = =CBasic Principles And Calculations In Chemical Engineering/ch8.ipynb{ "metadata": { "name": "", "signature": "sha256:db3a394cd915f3675da3a1ec91e93913eb152d495576bd0a47778fe0952f79fb" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 8 : Solving Material Balance Problems for Single Units without Reaction" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 8.1 Page no. 197\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "# Basis : 1 min\n", "d_w = 1.0 ; # Density of aqueous solution-[g/cubic metre]\n", "d_sol = 0.6 ; # Density of organic solvent-[g/cubic metre]\n", "n_un = 8 ; # Number of unknowns in the given problem\n", "n_ie = 8 ; # Number of independent equations\n", "\n", "# Calculation and Results\n", "d_o_f = n_un-n_ie ; # Number of degree of freedom\n", "print 'Number of degree of freedom for the given system is %i .'%d_o_f\n", "\n", "# Material balance of Strep.\n", "x = (200*10+10*0-200*0.2)/10; #[g]\n", "print 'Strep per litre of solvent is %.1f g .'%x\n", "\n", "cnc = x/(1000*d_sol) ; #[g Strep/g of S]\n", "print 'Strep per gram of solvent is %.4f g Strep/g of S .'%cnc\n", "\n", "m_fr = cnc/(1+cnc) ; #Mass fraction\n", "print 'Mass fraction of Strep is %.3f g .'%m_fr" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Number of degree of freedom for the given system is 0 .\n", "Strep per litre of solvent is 196.0 g .\n", "Strep per gram of solvent is 0.3267 g Strep/g of S .\n", "Mass fraction of Strep is 0.246 g .\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 8.2 Page no. 199\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "F_O2 = 0.21 ; # fraction of O2 in feed(F) \n", "F_N2 = 0.79 ; # fraction of N2 in feed(F) \n", "P_O2 = 0.25 ; # fraction of O2 in product(P)\n", "P_N2 = 0.75 ; # fraction of N2 in product(P)\n", "F = 100 ; # Feed - [g mol]\n", "w = 0.80 ; # Fraction of waste\n", "W = w*F ; # Waste -[g mol]\n", "\n", "# Calculation\n", "# By analysis for degree of freedom , DOF comes to be zero \n", "P = F - W ; # By overall balance - [g mol]\n", "W_O2 = (F_O2*F - P*P_O2)/100 # Fraction of O2 in waste stream by O2 balance \n", "W_N2 = (W - W_O2*100)/100 ; #Fraction of N2 in waste stream\n", " \n", "# Results \n", "print 'Composition of Waste Stream' \n", "print ' Component Fraction in waste stream' \n", "print ' O2 %.2f'%W_O2 \n", "print ' N2 %.2f'%W_N2 " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Composition of Waste Stream\n", " Component Fraction in waste stream\n", " O2 0.16\n", " N2 0.64\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 8.3 Page no. 202\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "# Basis : 1 hr so F = 1000 kg\n", "F = 1000 ; # feed rate-[kg/hr]\n", "P = F/10.0 ; # product mass flow rate -[kg/hr]\n", "\n", "n_un = 9 ; # Number of unknowns in the given problem\n", "n_ie = 9 ; # Number of independent equations\n", "\n", "# Calculation and Result\n", "d_o_f = n_un-n_ie ; # Number of degree of freedom\n", "print 'Number of degree of freedom for the given system is %i .'%d_o_f\n", "\n", "# Overall mass balance: F = P+B\n", "B = F-P ; # bottom mass flow rate -[kg/hr]\n", "print ' Bottom mass flow rate - %.1f kg '%B\n", "\n", "# Composition of bottoms by material balances\n", "m_EtOH = 0.1*F-0.6*P ; # By EtOH balance-[kg]\n", "m_H2O = 0.9*F - 0.4*P ; # By H2O balance-[kg]\n", "total = m_EtOH+m_H2O ; #[kg]\n", "f_EtOH = m_EtOH/total ; # Mass fraction of EtOH\n", "f_H2O = m_H2O/total ; # Mass fraction of H2O\n", "\n", "print ' Mass of EtOH in bottom - %.1f kg '%m_EtOH\n", "print ' Mass of H2O in bottom - %.1f kg '%m_H2O\n", "print ' Mass fraction of EtOH in bottom - %.3f '%f_EtOH\n", "print ' Mass fraction of H2O in bottom - %.3f '%f_H2O" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Number of degree of freedom for the given system is 0 .\n", " Bottom mass flow rate - 900.0 kg \n", " Mass of EtOH in bottom - 40.0 kg \n", " Mass of H2O in bottom - 860.0 kg \n", " Mass fraction of EtOH in bottom - 0.044 \n", " Mass fraction of H2O in bottom - 0.956 \n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 8.4 Page no. 205\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "from numpy import matrix\n", "\n", "# Variables\n", "# Given\n", "A = 200 ; # Mass of added solution [kg] \n", "P_H2SO4 = .1863 ; #Fraction of H2SO4 in P(Final solution)\n", "P_H2O = .8137 ; #Fraction of H2O in P(Final solution)\n", "A_H2SO4 = .777 ; #Fraction of H2SO4 in A(Added solution)\n", "A_H2O = .223 ; #Fraction of H2O in A(Added solution)\n", "F_H2SO4 = .1243 ; #Fraction of H2SO4 in F(Original solution)\n", "F_H2O = .8757 ; #Fraction of H2O in F(Original solution)\n", "\n", "# Calculations\n", "# P - F = A - By overall balance\n", "a = matrix([[P_H2O,-F_H2O],[1,-1]]) ; # Matrix of coefficient\n", "b = matrix([[A*A_H2O],[A]]) ; # Matrix of contants\n", "a = a.I\n", "x = a*b ; # Matrix of solutions- P = x(1) and F = x(2)\n", "\n", "#Results\n", "print ' Original solution taken- %.0i kg'%x\n", "print ' Final solution or kilograms of battery acid formed- %.0i kg'%x" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Original solution taken- 1905 kg\n", " Final solution or kilograms of battery acid formed- 2105 kg\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 8.5 Page no. 207\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "from numpy import matrix\n", "\n", "# Variables\n", "# Given\n", "W = 100.0 ; # Water removed - [kg]\n", "A_H2O = 0.80 ; # Fraction of water in A(intial fish cake)\n", "A_BDC = 0.20 ; # Fraction of BDC(bone dry cake) in B(final dry fish cake)\n", "B_H2O = 0.40 ; # Fraction of water in A(intial fish cake)\n", "B_BDC = 0.60 ; # Fraction of BDC(bone dry cake) in B(final dry fish cake)\n", "\n", "# Calculations\n", "a = matrix([[A_H2O, -B_H2O],[1, -1]]) ; # Matrix of coefficient\n", "b = matrix([[W],[W]]) ; # Matrix of contants\n", "a = a.I\n", "x = a * b; # Matrix of solutions- A = x(1) and B = x(2)\n", "\n", "# Results\n", "print 'Weight of the fish cake originally put into dryer -%.0i kg'%x" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Weight of the fish cake originally put into dryer -150 kg\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 8.6 Page no. 209\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "# Composition of initial solution at 30 degree C\n", "s_30 = 38.8 ; # solublity of Na2CO3 at 30 degree C, by using the table for solublity of Na2CO3-[g Na2CO3/100 g H2O]\n", "If_Na2CO3 = s_30/(s_30+100) ; # Initial mass fraction of Na2CO3\n", "If_H2O = 1-If_Na2CO3 ; # Initial mass fraction of H2O\n", "\n", "# Composition of crystals\n", "# Basis : 1g mol Na2CO3.10H2O\n", "n_mol_Na2CO3 = 1 ; # Number of moles of Na2CO3\n", "n_mol_H2O = 10. ; # Number of moles of H2O\n", "mwt_Na2CO3 = 106. ; # mol. wt of Na2CO3\n", "mwt_H2O = 18. ; # mol. wt of H2O\n", "\n", "# Calculation and Results\n", "m_Na2CO3 = mwt_Na2CO3*n_mol_Na2CO3 ; # Mass of Na2CO3\n", "m_H2O = mwt_H2O*n_mol_H2O ; # Mass of H2O\n", "Cf_Na2CO3 = m_Na2CO3/(m_Na2CO3+m_H2O) ; # mass fraction of Na2CO3 \n", "Cf_H2O = 1-Cf_Na2CO3 ; # mass fraction of H2O\n", "\n", "n_un = 9. ; # Number of unknowns in the given problem\n", "n_ie = 9. ; # Number of independent equations\n", "d_o_f = n_un-n_ie ; # Number of degree of freedom\n", "\n", "print 'Number of degree of freedom for the given system is %i .'%d_o_f\n", "\n", "# Final composition of tank\n", "#Basis :I = 10000 kg\n", "# Material balance reduces to Accumulation = final -initial = in-out(but in = 0)\n", "I = 10000. ; #initial amount of saturated solution-[kg]\n", "amt_C = 3000. ; # Amount of crystals formed-[kg]\n", "Fm_Na2CO3 = I*If_Na2CO3-amt_C*Cf_Na2CO3 ; # Mass balance of Na2CO3\n", "Fm_H2O = I*If_H2O-amt_C*Cf_H2O ; # Mass balance of H2O\n", "\n", "#To find temperature,T\n", "s_T = (Fm_Na2CO3/Fm_H2O)*100 ; # Solublity of Na2CO3 at temperature T\n", "s_20 = 21.5 ; #Solublity of Na2CO3 at temperature 20 degree C ,from given table-[g Na2CO3/100 g H2O]\n", "\n", "# Find T by interpolation\n", "T = 30-((s_30-s_T)/(s_30-s_20))*(30-20) ; # Temperature -[degree C]\n", "print ' Temperature to which solution has to be cooled to get 3000 kg crystals is %.0f degree C .'%T" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Number of degree of freedom for the given system is 0 .\n", " Temperature to which solution has to be cooled to get 3000 kg crystals is 26 degree C .\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 8.7 Page no. 213\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "# Write given data\n", "B_in = 1.1 ; # Flow rate in of blood -[L/min]\n", "B_out = 1.2; # Flow rate out of blood -[L/min]\n", "S_in = 1.7; # Flow rate in of solution -[L/min]\n", "\n", "# Composition of input blood\n", "B_in_CR = 2.72 ; #[g/L]\n", "B_in_UR = 1.16 ; #[g/L]\n", "B_in_U = 18 ; #[g/L]\n", "B_in_P = 0.77 ; #[g/L]\n", "B_in_K = 5.77 ; #[g/L]\n", "B_in_Na = 13.0 ; #[g/L]\n", "B_in_water = 1100 ; #[mL/min]\n", "\n", "# Composition of output blood\n", "B_out_CR = 0.120 ; #[g/L]\n", "B_out_UR = 0.060; #[g/L]\n", "B_out_U = 1.51 ; #[g/L]\n", "B_out_P = 0.040 ; #[g/L]\n", "B_out_K = 0.120 ; #[g/L]\n", "B_out_Na = 3.21 ; #[g/L]\n", "B_out_water = 1200. ; #[mL/min]\n", "\n", "# Calculation and Result\n", "n_un = 7. ; # Number of unknowns in the given problem\n", "n_ie = 7. ; # Number of independent equations\n", "d_o_f = n_un-n_ie ; # Number of degree of freedom\n", "print 'Number of degree of freedom for the given system is %i .'%d_o_f\n", "\n", "# Water balance in grams, assuming 1 ml is equivalent to 1 g\n", "S_in_water = 1700. ; #[ml/min]\n", "S_out_water = B_in_water+ S_in_water - B_out_water;\n", "S_out = S_out_water/1000. ; #[L/min]\n", "print ' Flow rate of water in output solution is %.2f L/min.'%S_out\n", "\n", "# The component balance in grams for CR,UR,U,P,K and Na are\n", "S_out_CR = (B_in*B_in_CR - B_out*B_out_CR)/S_out;\n", "S_out_UR = (B_in*B_in_UR - B_out*B_out_UR)/S_out;\n", "S_out_U = (B_in*B_in_U - B_out*B_out_U)/S_out;\n", "S_out_P = (B_in*B_in_P - B_out*B_out_P)/S_out;\n", "S_out_K = (B_in*B_in_K - B_out*B_out_K)/S_out;\n", "S_out_Na = (B_in*B_in_Na - B_out*B_out_Na)/S_out;\n", "print ' Component Concentration(g/L) in output Dialysis solution '\n", "print ' UR %.2f '%S_out_UR\n", "print ' CR %.2f '%S_out_CR\n", "print ' U %.2f '%S_out_U\n", "print ' P %.2f '%S_out_P\n", "print ' K %.2f '%S_out_K\n", "print ' Na %.2f '%S_out_Na" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Number of degree of freedom for the given system is 0 .\n", " Flow rate of water in output solution is 1.60 L/min.\n", " Component Concentration(g/L) in output Dialysis solution \n", " UR 0.75 \n", " CR 1.78 \n", " U 11.24 \n", " P 0.50 \n", " K 3.88 \n", " Na 6.53 \n" ] } ], "prompt_number": 8 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I��̊�C�CCBasic Principles And Calculations In Chemical Engineering/ch9.ipynb{ "metadata": { "name": "", "signature": "sha256:fa0721f1d96e3929565a094cfe21c7d86b4e801aa71b0940b32ef9174b4285dc" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 9 : The Chemical Reaction Equation and Stoichiometry" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 9.1 Page no. 228\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# variables\n", "# Given \n", "#Main eqn. C6H12O6 + aO2 ---> bCO2 + cH2O\n", "# By carbon balance\n", "b = 6 ;\n", "\n", "#By hydrogen balance\n", "c = 6;\n", "\n", "# calculation\n", "#Balancing oxygen in reaction\n", "a = (c*1+b*2-6)/2.0;\n", "\n", "#result\n", "print 'Value of a is %i'%a\n", "print 'Value of b is %i'%b\n", "print 'Value of c is %i'%c" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Value of a is 6\n", "Value of b is 6\n", "Value of c is 6\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 9.2 Page no. 229\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "m_CO2 = 44.0 ; #molecular wt-[g]\n", "m_C7H16 = 100.1 ; #molecular wt-[g]\n", "p_con = 50. ; # percentage conversion of CO2 to dry ice\n", "amt_di = 500. ; # amount of dry ice to be produce per hour-[kg]\n", "\n", "# Calculation\n", "# By using the given equation \n", "amt_C7H16 = (amt_di*m_C7H16)/((p_con/100.)*m_CO2*7) ;# [kg]\n", "\n", "# Result\n", "print 'Amount of heptane required per hour to produce 500kg dry ice per hour is %.1f kg.'%amt_C7H16" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Amount of heptane required per hour to produce 500kg dry ice per hour is 325.0 kg.\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 9.3 Page no. 230\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "m_CaCO3 = 100.1 ; #molecular wt-[g]\n", "m_MgCO3 = 84.32 ; #molecular wt-[g]\n", "m_CaO = 56.08 ; #molecular wt-[g]\n", "m_MgO = 40.32 ; #molecular wt-[g]\n", "m_CO2 = 44.0 ; #molecular wt-[g]\n", "\n", "# Limestone analysis\n", "p_CaCO3 = 92.89 ; # percentage of CaCO3\n", "p_MgCO3 = 5.41 ; # percentage of MgCO3 \n", "inrt = 1.7 ; #percentage of inert\n", "\n", "# Calculation and Results\n", "#(a)\n", "amt_CaO = (((p_CaCO3/100)*m_CaO)/m_CaCO3)*2000 ; #Pounds of CaO produced from 1 ton(2000lb) of limestone\n", "print ' Amount of CaO produced from 1 ton(2000lb) of limestone is %.0f lb.'%amt_CaO\n", "\n", "#(b)\n", "mol_CaCO3 = (p_CaCO3/100)/m_CaCO3 ; # lb mol of CaCO3\n", "mol_MgCO3 = (p_MgCO3/100)/m_MgCO3 ; # lb mol of MgCO3\n", "total_mol = mol_CaCO3+mol_MgCO3;\n", "amt_CO2 = total_mol*m_CO2 ; # Amount of CO2 recovered per pound of limestone-[lb]\n", "print ' Amount of CO2 recovered per pound of limestone is %.3f lb.'%amt_CO2\n", "\n", "#(c)\n", "amt_CaO = m_CaO*mol_CaCO3 ; # since lb mol of CaO = CaCO3\n", "amt_MgO = m_MgO*mol_MgCO3 ; # since lb mol of MgO = MgCO3\n", "total_lime = amt_CaO+amt_MgO+(inrt)/100 ; # total amount of lime per pound limestone\n", "amt_lmst = 2000/total_lime ; # Amount of limestone required to make 1 ton(2000lb) of lime \n", "print ' Amount of limestone required to make 1 ton(2000lb) of lime %.1f lb.'%amt_lmst" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Amount of CaO produced from 1 ton(2000lb) of limestone is 1041 lb.\n", " Amount of CO2 recovered per pound of limestone is 0.437 lb.\n", " Amount of limestone required to make 1 ton(2000lb) of lime 3550.7 lb.\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 9.4 Page no. 235\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "f_NH3 = 5. ; # NH3 in feed-[g]\n", "f_N2 = 100. ; # N2 in feed-[g]\n", "f_H2 = 50. ; # H2 in feed-[g]\n", "p_NH3 = 90. # NH3 in product-[g]\n", "m_NH3 = 17. ; # Molecular wt. of NH3-[g]\n", "m_N2 = 28. ; # Molecular wt. of N2-[g]\n", "m_H2 = 2. ; # Molecular wt. of H2-[g]\n", "\n", "# Calculations \n", "# Extent of reaction can be calculated by using eqn. 9.3 \n", "# For NH3\n", "ni = p_NH3/m_NH3 ; #[g mol NH3]\n", "nio = f_NH3/m_NH3 ; #[g mol NH3]\n", "vi = 2 ; # coefficint of NH3\n", "ex_r = (ni-nio)/vi # Extent of reaction - moles reacting\n", "\n", "#Determine H2 and N2 in product of reaction by Eqn. 9.4\n", "# For N2\n", "nio_N2 = f_N2/m_N2 ; #[g mol N2]\n", "vi_N2 = -1 ; # coefficint of N2\n", "ni_N2 = nio_N2 + vi_N2*ex_r ; #N2 in product of reaction-[g moles ]\n", "m_N2 = ni_N2*m_N2 ; # mass of N2 in product of reaction-[g]\n", "\n", "# Results\n", "print ' N2 in product of reaction is %.2f g moles '%ni_N2\n", "print ' Mass of N2 in product of reaction is %.2f g '%m_N2\n", "# For H2\n", "nio_H2 = f_H2/m_H2 ; #[g mol H2]\n", "vi_H2 = -3 ; # coefficint of H2\n", "ni_H2 = nio_H2 + vi_H2*ex_r ; #H2 in product of reaction-[g moles ]\n", "m_H2 = ni_H2*m_H2 ; # mass of H2 in product of reaction-[g]\n", "print ' H2 in product of reaction is %.2f g moles '%ni_H2\n", "print ' Mass of H2 in product of reaction is %.2f g '%m_H2\n", "\n", "# ARP\n", "m_SO2 = 64. ; # Molecular wt.of SO2-[g]\n", "mol_SO2 = 2. ; # moles of SO2\n", "ARP = (1./m_NH3)/(mol_SO2/m_SO2);\n", "print ' ARP is %.2f '%ARP" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " N2 in product of reaction is 1.07 g moles \n", " Mass of N2 in product of reaction is 30.00 g \n", " H2 in product of reaction is 17.50 g moles \n", " Mass of H2 in product of reaction is 35.00 g \n", " ARP is 1.88 \n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 9.5 Page no. 238\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "f_N2 = 10. ; # N2 in feed-[g]\n", "f_H2 = 10. ; # H2 in feed-[g]\n", "m_NH3 = 17.02 # Molecular wt. of NH3-[g]\n", "m_N2 = 28. ; # Molecular wt. of N2-[g]\n", "m_H2 = 2. ; # Molecular wt. of H2-[g]\n", "\n", "# Calculations\n", "# Extent of reaction can be calculated by using eqn. 9.3 \n", "# Based on N2\n", "nio_N2 = f_N2/m_N2 #[g mol N2]\n", "vi_N2 = -1 ; # coefficint of N2\n", "ex_N2 = -(nio_N2)/vi_N2 ; # Max. extent of reaction based on N2\n", "\n", "# Based on H2\n", "nio_H2 = f_H2/m_H2 ; #[g mol H2]\n", "vi_H2 = -3 ; # coefficint of H2\n", "ex_H2 = -(nio_H2)/vi_H2 # Max. extent of reaction based on H2\n", "\n", "#(a)\n", "vi_NH3 = 2 ; # coefficint of NH3\n", "mx_NH3 = ex_N2*vi_NH3*m_NH3 ; # Max. amount of NH3 that can be produced\n", "\n", "# Results\n", "print ' (a) Max. amount of NH3 that can be produced is %.1f g'%mx_NH3\n", "\n", "#(b) and (c)\n", "if (ex_H2 > ex_N2 ):\n", " print ' (b) N2 is limiting reactant '\n", " print ' (c) H2 is excess reactant '\n", " ex_r = ex_N2\n", "else:\n", " print ' (b) H2 is limiting reactant '\n", " print ' (c) N2 is excess reactant '\n", " ex_r = ex_H2 ;" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " (a) Max. amount of NH3 that can be produced is 12.2 g\n", " (b) N2 is limiting reactant \n", " (c) H2 is excess reactant \n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 9.6 Page no. 242\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# variables\n", "#(a)\n", "mol_bms = 0.59 ; # Biomass produced per g mol of glucose-[g mol biomass/ g mol glucose]\n", "mw_bms = 23.74 ; # molecular wt. of biomass -[g]\n", "mw_gls = 180.0 ; # molecular wt. of glucose -[g]\n", "\n", "# calculations and Results\n", "ms_bms = (mol_bms*mw_bms)/mw_gls ; # Biomass produced per gram of glucose-[g biomass/ g glucose]\n", "print '(a) Biomass produced per gram of glucose is %.4f g biomass/ g glucose.'%ms_bms\n", "\n", "#(b)\n", "mol_etol = 1.3 ; #Ethanol produced per g mol of glucose-[g mol ethanol/ g mol glucose]\n", "mw_etol = 46.0 ; # molecular wt. of ethanol -[g]\n", "ms_etol = (mol_etol*mw_etol)/mw_gls ; # Ethanol produced per gram of glucose-[g ethanol/ g glucose]\n", "print ' (b) Ethanol produced per gram of glucose is %.3f g ethanol/ g glucose.'%ms_etol" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) Biomass produced per gram of glucose is 0.0778 g biomass/ g glucose.\n", " (b) Ethanol produced per gram of glucose is 0.332 g ethanol/ g glucose.\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 9.7 Page no. 243\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "# By using reaction (a)\n", "H2_a = 3-0.50 # H2 produced in reaction (a)\n", "\n", "# Calculations\n", "C_a = (2./3)*H2_a ; # Nanotubes(the C) produced by reaction (a)\n", "sel = C_a/0.50 ; # Selectivity of C reletive to C2H4-[g mol C/ g mol C2H4]\n", "\n", "# Results\n", "print 'Selectivity of C reletive to C2H4 is %.2f g mol C/ g mol C2H4.'%sel" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Selectivity of C reletive to C2H4 is 3.33 g mol C/ g mol C2H4.\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 9.8 Page no. 244\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "m_C3H6 = 42.08 # molecular wt. of propene-[g]\n", "m_C3H5Cl = 76.53 ; # molecular wt. of C3H5Cl-[g]\n", "m_C3H6Cl2 = 112.99 ; # molecular wt. of C3H6Cl2-[g]\n", "\n", "# Product analysis\n", "pml_Cl2 = 141.0 ; # [g mol]\n", "pml_C3H6 = 651.0 ; #[g mol]\n", "pml_C3H5Cl = 4.6 ; # [g mol]\n", "pml_C3H6Cl2 = 24.5 ; # [g mol]\n", "pml_HCL = 4.6 ; #[g mol]\n", "\n", "# Calculation & Results\n", "#(a)\n", "a_Cl = pml_C3H5Cl; # Chlorine reacted by eqn.(a)\n", "b_Cl = pml_C3H6Cl2 ; # Chlorine reacted by eqn.(b)\n", "fed_Cl = pml_Cl2+a_Cl+b_Cl ; # Total chlorine fed to reactor-[g mol]\n", "\n", "#by analysing reaction (a) and (b)\n", "a_C3H6 = a_Cl+b_Cl ; # C3H6 reacted by reaction (a)\n", "fed_C3H6 = pml_C3H6+a_C3H6 ; #Total C3H6 fed to reactor-[g mol]\n", "\n", "\n", "print '(a) Total chlorine fed to reactor is %.2f g mol '%fed_Cl\n", "print ' Total C3H6 fed to reactor is %.2f g mol '%fed_C3H6\n", "\n", "#(b) and (c)\n", "# Extent of reaction can be calculated by using eqn. 9.3 \n", "# Based on C3H6\n", "nio_C3H6 = fed_C3H6 ; #[g mol C3H6]\n", "vi_C3H6 = -1 ; # coefficint of C3H6\n", "ex_C3H6 = -(nio_C3H6)/vi_C3H6 ; # Max. extent of reaction based on C3H6\n", "\n", "# Based on Cl2\n", "nio_Cl2 = fed_Cl; #[g mol Cl2]\n", "vi_Cl2 = -1 ; # coefficint of Cl2\n", "ex_Cl2 = -(nio_Cl2)/vi_Cl2 ;# Max. extent of reaction based on Cl2\n", "\n", "if (ex_Cl2 > ex_C3H6 ):\n", " print ' (b) C3H6 is limiting reactant '\n", " print ' (c)Cl2 is excess reactant '\n", " ex_r = ex_C3H6;\n", "else:\n", " print ' (b) Cl2 is limiting reactant '\n", " print ' (c) C3H6 is excess reactant '\n", " ex_r = ex_Cl2;\n", "\n", "#(d)\n", "fr_cn = pml_C3H5Cl/fed_C3H6 ; #Fractional conversion of C3H6 to C3H5Cl\n", "print ' (d) Fractional conversion of C3H6 to C3H5Cl is %.2e '%fr_cn\n", "\n", "#(e)\n", "sel = pml_C3H5Cl/pml_C3H6Cl2 ; # Selectivity of C3H5Cl relative to C3H6Cl2\n", "print ' (e) Selectivity of C3H5Cl relative to C3H6Cl2 is %.2f g mol C3H5Cl/g mol C3H6Cl2 '%sel\n", "\n", "#(f)\n", "yld = (m_C3H5Cl*pml_C3H5Cl)/(m_C3H6*fed_C3H6) # Yield of C3H5Cl per g C3H6 fed to reactor\n", "print ' (f) Yield of C3H5Cl per g C3H6 fed to reactor is %.3f g C3H5Cl/g C3H6 '%yld\n", "\n", "#(g)\n", "vi_C3H5Cl = 1 ; # coefficint of C3H5Cl\n", "vi_C3H6Cl2 = 1 ; # coefficint of C3H6Cl2\n", "ex_a = (pml_C3H5Cl-0)/vi_C3H5Cl ; # Extent of reaction a as C3H5Cl is produced only in reaction a\n", "ex_b = (pml_C3H6Cl2-0)/vi_C3H6Cl2 ; # Extent of reaction b as C3H6Cl2 is produced only in reaction b\n", "print ' (g) Extent of reaction a as C3H5Cl is produced only in reaction a is %.1f '%ex_a\n", "print ' Extent of reaction b as C3H6Cl2 is produced only in reaction b %.1f '%ex_b\n", "\n", "#(h)\n", "in_Cl = fed_Cl*2 ; #Entering Cl -[g mol]\n", "out_Cl = pml_HCL ; # Exiting Cl in HCl-[g mol]\n", "ef_w = out_Cl/in_Cl ; # Mole efficiency of waste\n", "ef_pr = 1-ef_w ; # Mole efficiency of product\n", "print ' (h) Mole efficiency of product is %.3f '%ef_pr" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) Total chlorine fed to reactor is 170.10 g mol \n", " Total C3H6 fed to reactor is 680.10 g mol \n", " (b) Cl2 is limiting reactant \n", " (c) C3H6 is excess reactant \n", " (d) Fractional conversion of C3H6 to C3H5Cl is 6.76e-03 \n", " (e) Selectivity of C3H5Cl relative to C3H6Cl2 is 0.19 g mol C3H5Cl/g mol C3H6Cl2 \n", " (f) Yield of C3H5Cl per g C3H6 fed to reactor is 0.012 g C3H5Cl/g C3H6 \n", " (g) Extent of reaction a as C3H5Cl is produced only in reaction a is 4.6 \n", " Extent of reaction b as C3H6Cl2 is produced only in reaction b 24.5 \n", " (h) Mole efficiency of product is 0.986 \n" ] } ], "prompt_number": 8 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I��8z8zDBasic Principles And Calculations In Chemical Engineering/ch10.ipynb{ "metadata": { "name": "", "signature": "sha256:9f0f51ee792551db4a5ae3ded00fa549611bdd66fece52d68af61c7a164f38e5" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 10 : Material Balances for Processes Involving Reaction" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 10.1 Page no. 264\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "F = 100 # feed to the reactor-[g mol]\n", "CH4 = 0.4*F # [g mol]\n", "Cl2 = 0.5*F ; # [g mol]\n", "N2= 0.1*F ; #[g mol]\n", "\n", "nio_CH4 = CH4 #[g mol CH4]\n", "vi_CH4 = -1 # coefficint of CH4\n", "\n", "\n", "# Calculation and Result\n", "ex_CH4 = -(nio_CH4)/vi_CH4 # Max. extent of reaction based on CH4\n", "\n", "nio_Cl2 = Cl2 ; #[g mol Cl2]\n", "vi_Cl2 = -1 ; # coefficint of Cl2\n", "ex_Cl2 = -(nio_Cl2)/vi_Cl2 ; # Max. extent of reaction based on Cl2\n", "\n", "if (ex_Cl2 > ex_CH4 ):\n", " print ' CH4 is limiting reactant '\n", "else:\n", " print ' (b) Cl2 is limiting reactant '\n", "\n", "cn_CH4 = 67/100.0 ; # percentage conversion of CH4\n", "ex_r = (-cn_CH4)*CH4/vi_CH4 ; # extent of reaction\n", "\n", "print ' extent of reaction is %.1f g moles reacting '%ex_r\n", "\n", "n_un = 11 ; # Number of unknowns in the given problem\n", "n_ie = 11 ; # Number of independent equations\n", "d_o_f = n_un-n_ie ; # Number of degree of freedom\n", "print ' Number of degree of freedom for the given system is %i '%d_o_f\n", "\n", "vi_CH3Cl = 1;\n", "vi_HCl = 1;\n", "vi_N2 = 0;\n", "p_CH4 = CH4+(vi_CH4*ex_r); # [g mol]\n", "p_Cl2 = Cl2+(vi_Cl2*ex_r); # [g mol]\n", "p_CH3Cl = 0+(vi_CH3Cl*ex_r); # [g mol]\n", "p_HCl = 0+(vi_HCl*ex_r); # [g mol]\n", "p_N2 = N2+(vi_N2*ex_r); # [g mol]\n", "\n", "print 'Composition of product stream in %% g mol of products'\n", "print 'Product Percentage g mol'\n", "print 'CH4 %.1f%% g mol'%p_CH4\n", "print 'Cl2 %.1f%% g mol'%p_Cl2\n", "print 'CH3Cl %.1f%% g mol'%p_CH3Cl\n", "print 'HCl %.1f%% g mol'%p_HCl\n", "print 'N2 %.1f%% g mol'%p_N2" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " CH4 is limiting reactant \n", " extent of reaction is 26.8 g moles reacting \n", " Number of degree of freedom for the given system is 0 \n", "Composition of product stream in %% g mol of products\n", "Product Percentage g mol\n", "CH4 13.2% g mol\n", "Cl2 23.2% g mol\n", "CH3Cl 26.8% g mol\n", "HCl 26.8% g mol\n", "N2 10.0% g mol\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 10.2 Page no. 266\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables \n", "S = 5000. ; # Sulphur [lb]\n", "CH4 = 80. ; # [%]\n", "H2S = 20.; # [%]\n", "\n", "n_un = 11. ;\n", "n_ie = 11. ;\n", "\n", "# Calculation and Result\n", "d_o_f = n_un-n_ie ;\n", "print 'Number of degree of freedom for the given system is %i '%d_o_f\n", "\n", "m_S = 32.0 #molecular wt. of S -[lb]\n", "mol_S = S/32.0;\n", "nio_S = 0 #[g mol S]\n", "ni_S = mol_S ; #[g mol S]\n", "vi_S = 3. # coefficint of S -from given reaction\n", "ex_r = (ni_S-nio_S)/vi_S ; # Extent of reaction based on S\n", "print ' Extent of reaction is %.1f g moles reacting '%ex_r\n", "\n", "vi_H2O = 2. ; # coefficint of H2O\n", "vi_H2S = -2. ; # coefficint of H2S\n", "vi_SO2 = -1. ; #coefficint of SO2\n", "vi_CH4 = 0 ; #coefficint of CH4\n", "P_H2O = 0+(vi_H2O*ex_r); # [lb mol]\n", "P_H2S = P_H2O/10 ; #[lb mol]\n", "P_SO2 = 3.*P_H2S ; #[lb mol]\n", "\n", "F = (P_H2S-vi_H2S*ex_r)/(H2S/100) ; # total feed-[lb mol]\n", "F_SO2 = P_SO2-(vi_SO2*ex_r); # feed rate of SO2- [lb mol]\n", "F_CH4 = (CH4/100.)*F+vi_CH4*ex_r ; #feed rate of CH4- [lb mol]\n", "F_H2S = ((H2S/100.)*F) ; # feed rate of H2S-[lb mol]\n", "\n", "f_cn = -(vi_H2S*ex_r)/((H2S/100.)*F) # Fractional conversion of limiting reagent\n", "\n", "print '(1)Feed rate of H2S- %.1f lb mol'%F_H2S\n", "print '(2)Feed rate of SO2- %.1f lb mol'%F_SO2\n", "print '(3)Fractional conversion of limiting reagent- %.2f '%f_cn" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Number of degree of freedom for the given system is 0 \n", " Extent of reaction is 52.1 g moles reacting \n", "(1)Feed rate of H2S- 114.6 lb mol\n", "(2)Feed rate of SO2- 83.3 lb mol\n", "(3)Fractional conversion of limiting reagent- 0.91 \n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 10.3 Page no. 270\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables \n", "F = 1 #CH3OH -[gmol]\n", "f_cn = 90. #[%]\n", "vi_CH3OH = -1. #coefficint of CH3OH\n", "\n", "# Calculation and Result\n", "ex_r1 = (-90./100)/vi_CH3OH # Extent of reaction based on CH3OH \n", "print ' Extent of reaction 1 is %.2f g moles reacting '%ex_r1\n", "\n", "yld = 75. #[%]\n", "ex_r2 = ex_r1-(F*(yld/100.0));\n", "print ' Extent of reaction 2 is %.2f g moles reacting '%ex_r2\n", "\n", "f_O2 = 0.21 # mol. fraction of O2\n", "f_N2 = 0.79 # mol. fraction of N2\n", "n_O2 = 2*((1/2.0)*F) # entering oxygen -[g mol]\n", "air = n_O2/f_O2 # Amount of air entering\n", "n_N2 = air-n_O2 # entering nitrogen -[g mol]\n", "\n", "n_un = 11. # Number of unknowns in the given problem\n", "n_ie = 11. # Number of independent equations\n", "d_o_f = n_un-n_ie # Number of degree of freedom\n", "print ' Number of degree of freedom for the given system is %i '%d_o_f\n", "\n", "v1_CH3OH = -1 #coefficint of CH3OH\n", "v1_O2 = -1./2 #coefficint of O2\n", "v1_CH2O = 1 ; #coefficint of CH2O\n", "v1_H2O = 1 ; #coefficint of H2O\n", "v1_CO = 0 ; #coefficient of CO\n", "\n", "#Reaction 2\n", "v2_O2 = -1./2 #coefficint of O2\n", "v2_CH2O = -1 #coefficint of CH2O\n", "v2_H2O = 1 ; #coefficint of H2O\n", "v2_CO = 1 ; #coefficient of CO\n", "P = F+air +(v1_CH3OH+v1_O2+v1_CH2O+v1_H2O)*ex_r1 +(v2_O2+v2_CH2O+v2_H2O+v2_CO)*ex_r2 ;# Product -[g mol]\n", "\n", "no_CH3OH = F+(v1_CH3OH*ex_r1)+0 ; # [g mol]\n", "no_O2 = n_O2+(v1_O2*ex_r1)+v2_O2*ex_r2 ; # [g mol]\n", "no_CH2O = 0 + v1_CH2O*ex_r1 +v2_CH2O*ex_r2 ; #[g mol]\n", "no_CO = 0+v1_CO*ex_r1 +v2_CO*ex_r2 ; #[g mol]\n", "no_H2O = 0+v1_H2O*ex_r1+v2_H2O*ex_r2 ; # [g mol]\n", "no_N2 = n_N2-0-0 ; # [g mol]\n", "\n", "\n", "y_CH3OH = (no_CH3OH/P )*100 ; # mole %\n", "y_O2 = (no_O2/P)*100 ; # mole %\n", "y_CH2O = (no_CH2O/P)*100 ; # mole %\n", "y_CO = (no_CO/P)*100 ; # mole %\n", "y_H2O = (no_H2O/P)*100 ; # mole % \n", "y_N2 = (no_N2/P )*100; # mole %\n", "\n", "print 'Composition of product'\n", "print 'Component mole percent'\n", "print ' CH3OH %.1f %%'%y_CH3OH\n", "print ' O2 %.1f %%'%y_O2\n", "print ' CH2O %.1f %%'%y_CH2O\n", "print ' CO %.1f %%'%y_CO\n", "print ' H2O %.1f %%'%y_H2O\n", "print ' N2 %.1f %%'%y_N2" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Extent of reaction 1 is 0.90 g moles reacting \n", " Extent of reaction 2 is 0.15 g moles reacting \n", " Number of degree of freedom for the given system is 0 \n", "Composition of product\n", "Component mole percent\n", " CH3OH 1.6 %\n", " O2 7.6 %\n", " CH2O 11.9 %\n", " CO 2.4 %\n", " H2O 16.7 %\n", " N2 59.8 %\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 10.4 Page no. 273\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "from numpy import matrix\n", "\n", "# Variables \n", "F = 4000. ; #[kg]\n", "m_H2O = 18.02 ; # molecular masss of water\n", "m_C6H12O6 = 180.1 ; # molecular mass of glucose\n", "m_CO2 = 44. ; #molecular mass of CO2\n", "m_C2H3CO2H = 72.03 ; # molecular mass of C2H3CO2H\n", "m_C2H5OH = 46.05 ; # molecular mass of ethanol\n", "\n", "p_H2O = 88. ; # [%]\n", "p_C6H12O6 = 12.; # [%] \n", "\n", "# Calculation & Result\n", "ni_H2O = (F*p_H2O/100.)/m_H2O ; # initial moles of water\n", "ni_C6H12O6 = (F*(p_C6H12O6/100.))/m_C6H12O6 ; # initial moles of glucose\n", "\n", "n_un = 9. \n", "n_ie = 9. \n", "d_o_f = n_un-n_ie\n", "print 'Number of degree of freedom for the given system is %i '%d_o_f\n", "\n", "ur_C6H12O6 = 90. ; #[kg]\n", "pr_CO2 = 120. ; #[kg]\n", "nf_C6H12O6 = ur_C6H12O6/m_C6H12O6 ; # [kmoles]\n", "nf_CO2 = pr_CO2/m_CO2 ; # [kmoles]\n", "\n", "\n", "a = matrix([[-1,-1],[2,0]]); # matrix formed by coefficients of unknowns \n", "b = matrix([[(nf_C6H12O6-ni_C6H12O6)],[nf_CO2]]); #matrix formed by constant\n", "x = a**(-1)*b; #matrix formed by solution\n", " \n", "print ' Extent of reaction 1 is %.3f kg moles reacting '%x\n", "print ' Extent of reaction 2 is %.3f kg moles reacting '%x\n", "\n", "nf_H2O = ni_H2O+0*x +2*x; \n", "nf_C2H5OH = 0+2*x+0*x;\n", "nf_C2H3CO2H = 0+0*x+2*x\n", "total_wt = m_H2O*nf_H2O + m_C6H12O6*nf_C6H12O6 + m_CO2*nf_CO2 + \\\n", "m_C2H3CO2H*nf_C2H3CO2H + m_C2H5OH*nf_C2H5OH;\n", "mp_C2H5OH = (m_C2H5OH*nf_C2H5OH*100)/total_wt \n", "mp_C2H3CO2H = (m_C2H3CO2H*nf_C2H3CO2H*100)/total_wt\n", "\n", "print ' Mass percent of ethanol in broth at end of fermentation process is %.1f %%'%mp_C2H5OH\n", "print ' Mass percent of propenoic acid in broth at end of fermentation process is %.1f %%'%mp_C2H3CO2H" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Number of degree of freedom for the given system is 0 \n", " Extent of reaction 1 is 1.364 kg moles reacting \n", " Extent of reaction 2 is 0.802 kg moles reacting \n", " Mass percent of ethanol in broth at end of fermentation process is 3.1 %\n", " Mass percent of propenoic acid in broth at end of fermentation process is 2.9 %\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 10.5 Page no. 279\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "from numpy import matrix\n", "\n", "# Variables \n", "\n", "print '(a)Solution of Example 10.1 using element balance'\n", "F = 100 # feed to the reactor-[g mol]\n", "\n", "CH4 = 0.4*F ; # [g mol]\n", "Cl2 = 0.5*F ; # [g mol]\n", "N2 = 0.1*F #[g mol]\n", "\n", "n_un = 10 # Number of unknowns in the given problem(excluding extent of reaction)\n", "n_ie = 10 ; # Number of independent equations\n", "d_o_f = n_un-n_ie # Number of degree of freedom\n", "print ' Number of degree of freedom for the given system is %i '%d_o_f\n", "\n", "nio_CH4 = CH4 ; #[g mol CH4]\n", "vi_CH4 = -1; # coefficint of CH4\n", "\n", "# Calculation and Result\n", "ex_CH4 = -(nio_CH4)/vi_CH4 ; # Max. extent of reaction based on CH4\n", "\n", "\n", "nio_Cl2 = Cl2 #[g mol Cl2]\n", "vi_Cl2 = -1 # coefficint of Cl2\n", "ex_Cl2 = -(nio_Cl2)/vi_Cl2 # Max. extent of reaction based on Cl2\n", "\n", "if (ex_Cl2 > ex_CH4 ): \n", " print ' CH4 is limiting reactant '\n", "else:\n", " print ' (b) Cl2 is limiting reactant '\n", "\n", "cn_CH4 = 67.0/100 # percentage conversion of CH4(limiting reagent)\n", "no_CH4 = CH4-(cn_CH4*CH4) ; #CH4 in product -[g mol]\n", "\n", "no_N2 = N2 #N2 in product -[g mol]\n", "\n", "C = CH4 ; #moles of CH4 = moles of C (by molecular formula)\n", "H = 4*CH4 ; # moles of H = 4*moles of CH4 (by molecular formula)\n", "Cl = 2*Cl2 ; # moles of Cl = 2* moles of Cl2 (by molecular formula)\n", "\n", "a = matrix([[0,0,1],[0,1,3],[2,1,1]]) # matrix formed by coefficients of unknowns \n", "b = matrix([[C-no_CH4*1],[H-4*no_CH4],[Cl]]) ; #matrix formed by constant\n", "x = a**(-1)*b ; # matrix of solution\n", "\n", "print 'Composition of product stream in %% g mol of products'\n", "print 'Product Percentage g mol'\n", "print 'CH4 %.1f%% g mol'%no_CH4\n", "print 'Cl2 %.1f%% g mol'%x\n", "print 'CH3Cl %.1f%% g mol'%x\n", "print 'HCl %.1f%% g mol'%x\n", "print 'N2 %.1f%% g mol'%no_N2\n", "\n", "#(b)Solution of Example 10.3 using element balance\n", "print '______________________________________________________________________________'\n", "print '(b)Solution of Example 10.3 using element balance'\n", "\n", "F = 1 #CH3OH -[gmol]\n", "yld = 75 #[%]\n", "cnv = 90 ; #conversion of methanol-[%]\n", "\n", "f_O2 = 0.21 ; # mol. fraction of O2\n", "f_N2 = 0.79 ; # mol. fraction of N2\n", "n_O2 = 2*((1/2.0)*F) # entering oxygen -[g mol]\n", "air = n_O2/f_O2 ; # Amount of air entering\n", "n_N2 = air-n_O2 # entering nitrogen -[g mol]\n", "\n", "n_un = 9 # Number of unknowns in the given problem(excluding extent of reactions)\n", "n_ie = 9 ; # Number of independent equations\n", "d_o_f = n_un-n_ie # Number of degree of freedom\n", "\n", "print ' Number of degree of freedom for the given system is %i '%d_o_f\n", "\n", "no_N2 = n_N2 # inert ,terefore input = output\n", "C = 1*F #moles of C = moles of CH3OH (by molecular formula)\n", "H = 4*F ; #moles of H = 4*moles of CH3OH (by molecular formula)\n", "O = 1*F +2*n_O2; # moles of O = 1*moles of CH3OH + O in air\n", "no_CH2O = yld/100.0 #[g mol]\n", "no_CH3OH = F-((cnv/100.0)*F) # [g mol]\n", "\n", "a = matrix([[0,0,1],[0,2,0],[2,1,1]]) # matrix formed by coefficients of unknowns \n", "b = matrix([[(C-(no_CH3OH*1+no_CH2O*1))],[(H-(4*no_CH3OH+2*no_CH2O))],[(O-(no_CH3OH*1+no_CH2O*1))]]);\n", "a = a.I\n", "x = a * b ; # matrix of solution\n", "\n", "P = no_CH2O+no_CH3OH+no_N2+x+x+x;\n", "\n", "# Composition of product\n", "y_CH3OH = (no_CH3OH/P )*100; # mole %\n", "y_O2 = ((x)/P)*100; # mole %\n", "y_CH2O = (no_CH2O/P)*100 ; # mole %\n", "y_CO = (x/P)*100 ; # mole %\n", "y_H2O = (x/P)*100 ; # mole % \n", "y_N2 = (no_N2/P )*100; # mole %\n", "\n", "\n", "print 'Composition of product'\n", "print 'Component mole percent'\n", "print ' CH3OH %.1f %%'%y_CH3OH\n", "print ' O2 %.1f %%'%y_O2\n", "print ' CH2O %.1f %%'%y_CH2O\n", "print ' CO %.1f %%'%y_CO\n", "print ' H2O %.1f %%'%y_H2O\n", "print ' N2 %.1f %%'%y_N2\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a)Solution of Example 10.1 using element balance\n", " Number of degree of freedom for the given system is 0 \n", " CH4 is limiting reactant \n", "Composition of product stream in %% g mol of products\n", "Product Percentage g mol\n", "CH4 13.2% g mol\n", "Cl2 23.2% g mol\n", "CH3Cl 26.8% g mol\n", "HCl 26.8% g mol\n", "N2 10.0% g mol\n", "______________________________________________________________________________\n", "(b)Solution of Example 10.3 using element balance\n", " Number of degree of freedom for the given system is 0 \n", "Composition of product\n", "Component mole percent\n", " CH3OH 1.6 %\n", " O2 7.6 %\n", " CH2O 11.9 %\n", " CO 2.4 %\n", " H2O 16.7 %\n", " N2 59.8 %\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 10.6 Page no. 281\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "from numpy import matrix\n", "\n", "# Variables \n", "P=100. ; #Product from the reactor-[g mol]\n", "C3H8 = 0.195*P ; # [g mol]\n", "C4H10 = 0.594*P ; # [g mol]\n", "C5H12 = 0.211*P; # [g mol]\n", "\n", "n_un = 3 ; # Number of unknowns in the given problem(excluding extent of reaction)\n", "n_ie = 3 ; # Number of independent equations\n", "\n", "# Calculation and Result\n", "d_o_f = n_un-n_ie ; # Number of degree of freedom\n", "print 'Number of degree of freedom for the given system is %i '%d_o_f\n", "\n", "C = C3H8*3+C4H10*4+C5H12*5 # moles of C on product side\n", "H = C3H8*8+C4H10*10+C5H12*12 ; # moles of H on product side\n", "\n", "a = matrix([[8,0],[18,2]]) # matrix formed by coefficients of unknowns \n", "b = matrix([[C],[H]]) ; #matrix formed by constant\n", "a = a.I\n", "x = a*b ; # matrix of solution\n", "\n", "R = x/x ; # Ratio of H2 consumed to C8H18 reacted = G/F\n", "print ' Molar ratio of H2 consumed to C8H18 reacted is %.3f '%R" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Number of degree of freedom for the given system is 0 \n", " Molar ratio of H2 consumed to C8H18 reacted is 0.992 \n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 10.7 Page no. 286\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables \n", "C3H8 = 20 #C3H8 burned in a test-[kg]\n", "m_C3H8 = 44.09 # mol. wt . of 1 kmol C3H8\n", "cf_O2 = 5 # coefficient of O2 in given reaction\n", "air = 400 # Air given -[kg]\n", "m_air = 29.0 # molecular wt. of 1kmol air-[kg]\n", "O2p = 21 # percentage of O2 in air-[%]\n", "p_CO2 = 44 # CO2 produced -[kg]\n", "p_CO = 12 # CO produced -[kg]\n", "\n", "# Calculation \n", "O2 = (air*O2p/100.0)/(m_air) # amount of entering O2-[k mol]\n", "rqO2 = (C3H8*cf_O2)/(m_C3H8) # Required O2 for given reaction\n", "ex_air = ((O2-rqO2)*100.0)/rqO2 ; # Excess air percent-[%]\n", "\n", "# Result\n", "print 'Excess air percent is %.0f %%.'%ex_air" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Excess air percent is 28 %.\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 10.8 Page no. 287\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "F = 16. # feed of CH4 -[kg]\n", "CH4p = 100. #[%]\n", "m_CH4 = 16. ; # mass of kmol of CH4-[kg]\n", "mol_CH4 = (F*CH4p/100)/m_CH4 #k moles of CH4 in feed-[kmol]\n", "air = 300. ; # Air given -[kg]\n", "m_air = 29. # molecular wt. of 1kmol air-[kg]\n", "mol_air = air/m_air ; # kmoles of air-[kmol]\n", "O2p = 21. # percentage of O2 in air-[%]\n", "O2 = (mol_air*O2p/100) # amount of entering O2-[k mol]\n", "N2 = mol_air-O2 ; # amount of entering N2-[k mol]\n", "\n", "n_un = 8. # Number of unknowns in the given problem(excluding extent of reactions)\n", "n_ie = 8. # Number of independent equations\n", "d_o_f = n_un-n_ie # Number of degree of freedom\n", "print 'Number of degree of freedom for the given system is %i '%d_o_f\n", "\n", "# Product composition analysis using element balance of C,H,O and N\n", "p_N2 = N2 # inert \n", "C_in = 1*mol_CH4 ; # kmoles of carbon in input-[kmol]\n", "H_in = 4*mol_CH4 # kmoles of hydrogen in input-[kmol]\n", "O_in = 2*O2 ; # kmoles of oxygen in input-[kmol]\n", "p_CO2 = C_in/1 ; #kmoles of CO2 in product obtained by carbon balance-[kmol]\n", "p_H2O = H_in/2 ; #kmoles of H2O in product obtained by hydrogen balance-[kmol]\n", "p_O2 = (O_in-(2*p_CO2+p_H2O))/2 #kmoles of O2 in product obtained by oxygen balance-[kmol]\n", "p_CH4 = 0 # Complete reaction occurs\n", "P = p_CH4 + p_N2+ p_CO2 + p_H2O + p_O2;\n", "\n", "y_N2 = p_N2*100/P ; #[mol %]\n", "y_CO2 = p_CO2*100/P ; #[mol %]\n", "y_H2O = p_H2O*100/P ; #[mol %]\n", "y_O2 = p_O2*100/P ; #[mol %]\n", "y_CH4 = p_CH4*100/P ; #[mol %]\n", "\n", "# Results\n", "print 'Composition of product'\n", "print 'Component mole percent'\n", "print ' CH4 %.1f %%'%y_CH4\n", "print ' O2 %.1f %%'%y_O2\n", "print ' CO2 %.1f %%'%y_CO2\n", "print ' H2O %.1f %%'%y_H2O\n", "print ' N2 %.1f %%'%y_N2" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Number of degree of freedom for the given system is 0 \n", "Composition of product\n", "Component mole percent\n", " CH4 0.0 %\n", " O2 1.5 %\n", " CO2 8.8 %\n", " H2O 17.6 %\n", " N2 72.0 %\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 10.9 Page no. 290\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "F = 100. # feed of coal -[lb]\n", "C = 83.05 #[%]\n", "H = 4.45 #[%]\n", "O = 3.36 ; # [%]\n", "N = 1.08 # [%]\n", "S = 0.70 #[%]\n", "ash = 7.36 #[%]\n", "H2O = 3.9 ; #[%]\n", "w_C = 12. ; # mol. wt. of C\n", "w_H = 1.008; #mol. wt. of H\n", "w_O = 16. ; # mol. wt. of O\n", "w_N = 14. ; # mol. wt. of N\n", "w_S = 32. ; #mol. wt. of S\n", "\n", "CO2 = 15.4 #[%]\n", "CO = 0.0 #[%]\n", "O2 = 4.0 ; # [%]\n", "N2 = 80.6 #[%]\n", "ash_R = 86 #[%]\n", "odr = 14 #[%]\n", "\n", "H2O_air = .0048 # [lb H2O/lb dry air]\n", "m_air = 29. # mol. wt. of air\n", "mf_O2 = 0.21 # mole fraction of O2 in air\n", "mf_N2 = 0.79 #mole fraction of N2 in air\n", "m_H2O = 18. # mol. wt. of H2O\n", "\n", "#Calculations\n", "H_cl = (H2O*2)/m_H2O ; # lb mol of H in coal moisture\n", "O_cl = H_cl/2. ; # lb mol of O in coal moisture\n", "\n", "H_air = (H2O_air*m_air )/m_H2O # lb mol of H per lb mol air\n", "O_air = H_air/2. # lb mol of O per lb mol air \n", "\n", "# Ash balance to get refuse(R)\n", "R = ash/(ash_R/100.) # Refuse-[lb]\n", "\n", "pub_cl = 14. # percentage of unburned coal in refuse-[%]\n", "ub_cl = (14/100.)*R # amount of unburned coal in refuse\n", "C_p = (C/(100-ash))*ub_cl # C in unburned coal-[lb]\n", "H_p = (H/(100-ash))*ub_cl ; # H in unburned coal-[lb]\n", "O_p = (O/(100-ash))*ub_cl ; # O in unburned coal-[lb]\n", "N_p = (N/(100-ash))*ub_cl ; # N in unburned coal-[lb]\n", "S_p = (S/(100-ash))*ub_cl ; # S in unburned coal-[lb]\n", "mol_C = C_p/w_C; # lb mol of C\n", "mol_H = H_p/w_H ; # lb mol of H\n", "mol_N = N_p/w_N ; # lb mol of N\n", "mol_O = O_p/w_O ; # lb mol of O\n", "mol_S = S_p/w_S ; # lb mol of S \n", "\n", "\n", "n_un = 4. # Number of unknowns in the given problem(excluding extent of reactions)\n", "n_ie = 4. # Number of independent equations\n", "d_o_f = n_un-n_ie # Number of degree of freedom\n", "print 'Number of degree of freedom for the given system is %i '%d_o_f\n", "\n", "#Using element balance of C+S, N& H\n", "P = (C/w_C + S/w_S - (mol_C+mol_S ))/.154 # mol of stack gas-[lb mol]\n", "A = (2*P*.806 +2*mol_N-N/w_N)/(2*mf_N2) # mol of air -[lb mol]\n", "W = (H/w_H +H_cl+H_air*A-mol_H)/2 # moles of exit water-[lb mol]\n", "print ' Moles of stack gas(P) - %.1f lb mol'%P\n", "print ' Moles of air (A) - %.1f lb mol '%A\n", "print ' Moles of exit water(W) - %.1f lb mol '%W\n", "\n", "C_req = (C/w_C)/1\n", "H_req = (H/w_H)/4 \n", "N_req = 0 # inert\n", "O_req = (O/w_O)/2 \n", "S_req = (S/w_S)/1 \n", "total_O2_req = C_req+H_req+N_req+O_req +S_req \n", "O2_in = A*mf_O2 # O2 entering in air\n", "ex_air = 100*((O2_in-total_O2_req)/total_O2_req)\n", "\n", "# Results\n", "print ' Excess air is %.1f %%.'%ex_air" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Number of degree of freedom for the given system is 0 \n", " Moles of stack gas(P) - 44.5 lb mol\n", " Moles of air (A) - 45.4 lb mol \n", " Moles of exit water(W) - 2.6 lb mol \n", " Excess air is 16.8 %.\n" ] } ], "prompt_number": 19 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I�8K3�D�DDBasic Principles And Calculations In Chemical Engineering/ch11.ipynb{ "metadata": { "name": "", "signature": "sha256:03c09e4ffd933027d277b1c64cc2c94bd3c72b7cbc229c1b8170ffd14e813958" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 11 : Material Balance Problems involving Multiple Units" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 11.1 Page no. 311\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables \n", "\n", "w_A1 = 1 #concentration of A in 1\n", "w_B2 = 1 # concentration of B in 2\n", "w_A3 = 0.8 # concentration of A in 3\n", "w_B3 = 0.2 # concentration of B in 3\n", "w_C4 = 1 # concentration of C in 4\n", "w_A5 = 0.571 #concentration of A in 5\n", "w_B5 = 0.143 #concentration of B in 5\n", "w_C5 = 0.286 #concentration of C in 5\n", "w_D6 = 1 # concentration of D in 6\n", "w_A7 = 0.714 # concentration of A in 7\n", "w_B7 = 0.286 # concentration of B in 7\n", "w_B8 = 0.333 #concentration of B in 8\n", "w_C8 = .667 #concentration of C in 8\n", "\n", "us1 = 2 # Species involved in unit 1\n", "us2 = 3 ; # Species involved in unit 2\n", "us3 = 4 ; # Species involved in unit 3\n", "\n", "# Caculations \n", "total_sp = us1+us2+us3 # Total species in system\n", "\n", "# Results\n", "print 'Number of possible equations are 9, they are as follows- '\n", "print ' Subsystem 1'\n", "print ' A: F1*w_A1+F2*0 = F3*w_A3 (a)'\n", "print ' B:F1*0 + F2*w_B2 = F3*w_B3 (b)'\n", "print ' Subsystem 2'\n", "print ' A: F3*w_A3+F4*0 = F5*w_A5 (c)'\n", "print ' B:F3*w_B3 + F4*0 = F5*w_B5 (d)'\n", "print ' C: F3*0+F4*w_C4 = F5*w_C5 (e)'\n", "print ' Subsystem 3'\n", "print ' A: F5*w_A5+F6*0 = F7*w_A7+F8*0 (f)'\n", "print ' B:F5*w_B5 + F6*0 = F7*0+F8*w_B8 (g)'\n", "print ' C: F5*w_C5+F6*0 = F7*0+F8*w_C8 (h)'\n", "print ' D:F5*w_C5+F6*0 = F7*0+F8*w_C8 (i)'\n", "print ' The above equations do not form a unique set'\n", "\n", "# By inspection we can see that only 7 equations are independent \n", "#Independent Equations are: \n", "# Subsystem 1\n", "#A: F1*w_A1+F2*0 = F3*w_A3 (a)\n", "#B:F1*0 + F2*w_B2 = F3*w_B3 (b)\n", "#Subsystem 2\n", "#A: F3*w_A3+F4*0 = F5*w_A5 (c)\n", "# C: F3*0+F4*w_C4 = F5*w_C5 (e)\n", "# Subsystem 3\n", "#A: F5*w_A5+F6*0 = F7*w_A7+F8*0 (f)\n", "#B:F5*w_B5 + F6*0 = F7*0+F8*w_B8 (g)\n", "#D:F5*w_C5+F6*0 = F7*0+F8*w_C8 (i)\n", "\n", "print ' Number of independent equations are 7 '" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Number of possible equations are 9, they are as follows- \n", " Subsystem 1\n", " A: F1*w_A1+F2*0 = F3*w_A3 (a)\n", " B:F1*0 + F2*w_B2 = F3*w_B3 (b)\n", " Subsystem 2\n", " A: F3*w_A3+F4*0 = F5*w_A5 (c)\n", " B:F3*w_B3 + F4*0 = F5*w_B5 (d)\n", " C: F3*0+F4*w_C4 = F5*w_C5 (e)\n", " Subsystem 3\n", " A: F5*w_A5+F6*0 = F7*w_A7+F8*0 (f)\n", " B:F5*w_B5 + F6*0 = F7*0+F8*w_B8 (g)\n", " C: F5*w_C5+F6*0 = F7*0+F8*w_C8 (h)\n", " D:F5*w_C5+F6*0 = F7*0+F8*w_C8 (i)\n", " The above equations do not form a unique set\n", " Number of independent equations are 7 \n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 11.2 Page no.315\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "from numpy import matrix\n", "\n", "# Variables \n", "\n", "G = 1400 #[kg]\n", "n_un = 16 # Number of unknowns in the given problem(excluding extent of reactions)\n", "n_ie = 16 ; # Number of independent equations\n", "d_o_f = n_un-n_ie # Number of degree of freedom\n", "\n", "print 'For unit 1 number of degree of freedom for the given system is %i .'%d_o_f\n", "\n", "o1_air = 0.995 ; # Mass fraction of air at out of unit 1 in A\n", "i1_air = 0.95 ; # Mass fraction air at in of unit 1 in G\n", "i1_wtr = 0.02; # Mass fraction water at in of unit 1 in G\n", "F1_wtr = 0.81 ; # Mass fraction of water at out of unit 1 in F\n", "o1_wtr = 0.005 ; # Mass fraction of water at out of unit 1 in A\n", "o2_wtr = 0.96 ; # Mass fraction of water at out of unit 2 in B\n", "o3_wtr = 0.01; # Mass fraction of water at out of unit 3 in D\n", "i1_act = 0.03 ; # Mass fraction of acetone at in of unit 1 in G\n", "F1_act = 0.19 ; # Mass fraction of acetone at out of unit 1 in F\n", "o3_act = 0.99 ; # Mass fraction of acetone at out of unit 3 in D\n", "o2_act = 0.04 ; # Mass fraction of acetone at out of unit 2 in B\n", "\n", "# Calculations \n", "A = G*i1_air/o1_air ; #air-[kg]\n", "F = G*i1_act/F1_act ; #[kg]\n", "W = (F*F1_wtr+A*o1_wtr-G*i1_wtr)/1 #Pure water in -[kg]\n", "\n", "n_un = 9 ; # Number of unknowns in the given problem(excluding extent of reactions)\n", "n_ie = 9 ; # Number of independent equations\n", "d_o_f = n_un-n_ie \n", "\n", "print ' For unit 2 and 3 number of degree of freedom for the given system is %i .'%d_o_f\n", "\n", "a = matrix([[o3_act, o2_act],[o3_wtr, o2_wtr]]);\n", "b = matrix([[F*F1_act],[F*F1_wtr]])\n", "a = a.I\n", "x = a*b \n", "\n", "# Results\n", "print ' W-Pure water in to unit 1 - %.2f kg/hr'%W\n", "print ' A-Air out of unit 1 - %.2f kg/hr'%A\n", "print ' F-out of unit 1 - %.2f kg/hr'%F\n", "print ' B-out of unit 2 - %.2f kg/hr'%x\n", "print ' D-out of unit 3 - %.2f kg/hr'%x" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "For unit 1 number of degree of freedom for the given system is 0 .\n", " For unit 2 and 3 number of degree of freedom for the given system is 0 .\n", " W-Pure water in to unit 1 - 157.74 kg/hr\n", " A-Air out of unit 1 - 1336.68 kg/hr\n", " F-out of unit 1 - 221.05 kg/hr\n", " B-out of unit 2 - 186.15 kg/hr\n", " D-out of unit 3 - 34.90 kg/hr\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 11.3 Page no. 318\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "from numpy import matrix\n", "\n", "# Variables \n", "P = 6205. #[lb mol/hr]\n", "amt_F = 560. ; #[bbl]\n", "C_F = 0.50 ; # [mol fraction]\n", "H2_F = 0.47 ; #[mol fraction]\n", "S_F = 0.03 ; #[mol fraction]\n", "\n", "CH4_G = 0.96 ; #[mol fraction]\n", "C2H2_G = 0.02 ; #[mol fraction]\n", "CO2_G = 0.02 ; #[mol fraction]\n", "\n", "O2_A = 0.21 ; #[mol fraction]\n", "N2_A = 0.79 ; #[mol fraction]\n", "\n", "# Analysis of air into Oil furnace(A1)\n", "O2_A1 = 0.20 ; #[mol fraction]\n", "N2_A1 = 0.76 ; #[mol fraction]\n", "CO2_A1 = 0.04 ; #[mol fraction]\n", "\n", "#Stack gas(P) analysis\n", "N2_P = .8493 ; #[mol fraction]\n", "O2_P = .0413 ; #[mol fraction]\n", "SO2_P = .0010 ; # [mol fraction]\n", "CO2_P = .1084 ; #[mol fraction]\n", "\n", "# Degree of freedom analysis \n", "n_un = 5; \n", "n_ie = 5 ;\n", "d_o_f = n_un-n_ie; # Number of degree of freedom\n", "print 'Number of degree of freedom for the given system is %i .'%d_o_f\n", "\n", "\n", "# Calculations & Results\n", "F = P* SO2_P/S_F ; # [lb mol/hr]\n", "a = matrix([[2*CH4_G+C2H2_G, -1, 0, 0],[0, 0, N2_A, N2_A1],[CO2_G ,-.5, O2_A, O2_A1+CO2_A1], \n", " [CH4_G+2*C2H2_G+CO2_G,0,0,CO2_A1]]);# matrix of coefficients\n", "b = matrix([[-F*H2_F],[P*N2_P],[P*(O2_P+CO2_P+SO2_P)],[(P*CO2_P-F*C_F)]]); # matrix of constants\n", "a = a.I\n", "x = a*b \n", "G = x\n", "m_F = 7.91\n", "Fc = (F*m_F)/(7.578*42) # Fuel gas consumed -[bbl/hr]\n", "time = amt_F/Fc ; # Time for which available fuel gas lasts-[hr]\n", "\n", " \n", "print '(1) Fuel gas consumed(F) is %.2f bbl/hr .'%Fc\n", "print '(2) Time for which available fuel gas lasts is %.0f hr .'%time\n", "\n", "# For increase in arsenic and mercury level\n", "F_oil = Fc*42; #[gal/hr]\n", "Em_ars2 = (3.96 *10**(-4))/1000.0 ; # [lb/gal]\n", "Em_Hg2 = (5.92 *10**(-4))/1000.0 ; # [lb/gal]\n", "ars_F = F_oil*Em_ars2 \n", "Hg_F = F_oil*Em_Hg2 \n", "G_gas = G*359 #[ft**3/hr]\n", "Em_ars1 = (2.30 *10**(-4))/10**6 ; # [lb/ft**3]\n", "Em_Hg1 = (1.34 *10**(-4))/10**6 ; # [lb/ft**3]\n", "ars_G = G_gas*Em_ars1;\n", "Hg_G = G_gas*Em_Hg1 ;\n", "in_ars = ((ars_F-ars_G)/ars_G)*100 #[% increase in Arsenic emission]\n", "in_Hg = ((Hg_F-Hg_G)/Hg_G)*100 #[% increase in Mercury emission]\n", "\n", "print '(3) Increase in Arsenic emission is %.1f %% .'%in_ars\n", "print '(4) Increase in Mercury emission is %.1f %% .'%in_Hg" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Number of degree of freedom for the given system is 0 .\n", "(1) Fuel gas consumed(F) is 5.14 bbl/hr .\n", "(2) Time for which available fuel gas lasts is 109 hr .\n", "(3) Increase in Arsenic emission is 107.4 % .\n", "(4) Increase in Mercury emission is 432.3 % .\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 11.4 Page no. 322\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "from numpy import matrix\n", "\n", "# Variables \n", "M = 1000. ; #[lb]\n", "F_s = 16/100. # Fraction of sugar in F\n", "F_w = 25/100. # Fraction of water in F\n", "F_p = 59/100. # Fraction of pulp in F\n", "D_p = 80/100. # Fraction of pulp in D\n", "E_s = 13/100. # Fraction of sugar in E\n", "E_p = 14/100. # Fraction of pulp in E\n", "G_p = 95/100. # Fraction of pulp in G\n", "H_s = 15/100. # Fraction of sugar in H\n", "K_s = 40/100. # Fraction of sugar in K\n", "\n", "# Calculations \n", "K_w = 1 - K_s\n", "K = M/K_s;\n", "L = K_w*K;\n", "\n", "# For evaporator equations are \n", "H_w = 1- H_s\n", "H = K_s*K/H_s\n", "J = H - K; \n", "\n", "# For screen equations are \n", "E_w = 1 - (E_p + E_s) \n", "\n", "a1 = matrix([[1,-1],[E_p,-G_p]])\n", "b1 = matrix([[H,],[0,]]) \n", "a1 = a1.I\n", "x1 = a1*b1\n", "E = x1 \n", "G = x1 \n", "G_s = (E_s*E - H_s *H )/G\n", "G_w = 1 -(G_s + G_p) \n", "\n", "a2 = matrix([[1,-1],[F_p,-D_p]]) # Matrix of coefficients of unknown\n", "\n", "F = 7818.93 \n", "D = 1152.2634 \n", "\n", "D_s = (F_s*F - E_s*E )/D # By sugar balance\n", "D_w = 1 -(D_s + D_p) # summation of wt. fraction is 1\n", "\n", "S_rec = M/(F*F_s) ; # Fraction of sugar recovered \n", "\n", "\n", "# Results\n", "print 'Flow streams and their respective compositions.'\n", "print ' M = %.0f lb '%M\n", "print ' Sugar: %.2f '%1\n", "\n", "print ' L = %.0f lb '%L\n", "print ' Water: %.2f'%1\n", "\n", "print ' K = %.0f lb '%K\n", "print ' Sugar: %.2f'%K_s\n", "print ' Water: %.2f'%K_w\n", "\n", "print ' J = %.0f lb '%J\n", "print ' Water: %.2f '%1\n", "\n", "print ' H = %.0f lb '%H\n", "print ' Sugar: %.2f'%H_s\n", "print ' Water: %.2f'%H_w\n", "\n", "print ' G = %.0f lb '%G\n", "print ' Sugar: %.3f'%G_s\n", "print ' Water: %.3f'%G_w\n", "print ' Pulp : %.2f'%G_p\n", "\n", "print ' E = %.0f lb '%E\n", "print ' Sugar: %.2f'%E_s\n", "print ' Water: %.2f'%E_w\n", "print ' Pulp : %.2f'%E_p\n", "\n", "print ' D = %.0f lb '%D\n", "print ' Sugar: %.3f'%D_s\n", "print ' Water: %.3f'%D_w\n", "print ' Pulp : %.2f'%D_p\n", "\n", "print ' F = %.0f lb '%F\n", "print ' Sugar: %.2f'%F_s\n", "print ' Water: %.2f'%F_w\n", "print ' Pulp : %.2f'%F_p" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Flow streams and their respective compositions.\n", " M = 1000 lb \n", " Sugar: 1.00 \n", " L = 1500 lb \n", " Water: 1.00\n", " K = 2500 lb \n", " Sugar: 0.40\n", " Water: 0.60\n", " J = 4167 lb \n", " Water: 1.00 \n", " H = 6667 lb \n", " Sugar: 0.15\n", " Water: 0.85\n", " G = 1152 lb \n", " Sugar: 0.014\n", " Water: 0.036\n", " Pulp : 0.95\n", " E = 7819 lb \n", " Sugar: 0.13\n", " Water: 0.73\n", " Pulp : 0.14\n", " D = 1152 lb \n", " Sugar: 0.204\n", " Water: -0.004\n", " Pulp : 0.80\n", " F = 7819 lb \n", " Sugar: 0.16\n", " Water: 0.25\n", " Pulp : 0.59\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 11.5 Page no.324\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables \n", "F = 15. #[L/hr]\n", "cs_in = 10. #Nutrient conc. input vessel - [g nutrient/L substrate]\n", "V1 = 100. ; # [L]\n", "V2 = 50. ; #[L]\n", "Yxs = 0.2 ; # [cells/g]\n", "umax = 0.4 ; #[hr** - 1]\n", "Ks = 2. ; #[g/L] - Monod constant\n", "\n", "# Calculations\n", "u1 = F/V1 #[hr** - 1] #[hr** - 1]\n", "cs_out = (Ks * u1/umax)/(1 - (u1/umax)) \n", "\n", "x_out = Yxs * (cs_in - cs_out) #[g cells / L substrate]\n", "\n", "u2 = F/V2;\n", "cs_out1 = (Ks * u2/umax)/(1 - (u2/umax)) #Nutrient conc. output vessel - [g nutrient/L substrate]\n", "x_out1 = Yxs * (cs_in - cs_out1) #[g cells / L substrate]\n", "\n", "x_out2 = 1.73 # From eqn. (e),(f) and (g) - [g cells / L substrate]\n", "\n", "# Results\n", "print 'g cells/L from option 1 is %.2f.'%x_out\n", "print 'g cells/L from option 2 is %.2f.'%x_out2\n", "print 'By comparing option 1 and option 2 the respective answers are essentially the same.'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "g cells/L from option 1 is 1.76.\n", "g cells/L from option 2 is 1.73.\n", "By comparing option 1 and option 2 the respective answers are essentially the same.\n" ] } ], "prompt_number": 13 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I;(!]3]3DBasic Principles And Calculations In Chemical Engineering/ch12.ipynb{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 12 : Recycle Bypass Purge and the Industrial Application of Material Balance" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 12.1 Page No.349\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from numpy import matrix\n", "\t\t\t\n", "# Variables \n", "F = 10000. ;\t\t\t#[lb/hr]\n", "\t\t\t\n", "NaOH_F = 40./100 ;\t \t\t#[wt. fraction]\n", "NaOH_P1 = 95./100 ;\t \t\t#[wt. fraction of NaOH filter cake]\n", "NaOH_P2 = (0.05 * 45)/100 ;\t\t\t#[wt. fraction of NaOH in NaOH soln.]\n", "H2O_P2 = (0.05 * 55)/100 ;\t\t\t#[wt. fraction of H2O in NaOH soln.]\n", "NaOH_R = 45./100;\t\t\t#[wt. fraction]\n", "NaOH_G = 50./100;\t\t\t#[wt. fraction]\n", "\t\t\t\n", "P = (NaOH_F * F)/(NaOH_P1 + NaOH_P2) ;\t\t\t#[lb/hr]\n", "\t\t\t\n", "W = F-P ;\t\t\t# [lb/hr]\n", "\n", "# Calculations & Results\t\n", "a = matrix([[NaOH_G,-NaOH_R],[1,-1]]) \t\t\t# matrix formed of coefficients of unknown\n", "b = matrix([[F*NaOH_F],[P]]);\t\t\t# matrix formed by constant\n", "a = a.I\n", "x = a*b ;\t\t\t# matrix of solutions . x(1) = G, x(2) = R\n", "G = x ;\t\t\t# [lb/hr]\n", "R = x ;\t\t\t# [lb/hr]\n", " \n", "print '(a) Flow rate of water removed by evaporator is %.1f lb/hr'%W\n", "print 'The recycle rate of the process is %.1f lb/hr'%R\n", "\n", "\t\t\t\n", "NaOH_H = 45./100 ;\t\t\t#[wt fraction]\n", "H2O_H = 55./100 ;\t\t\t#[wt fraction]\n", "\n", "a1 = matrix([[NaOH_G,-NaOH_H],[NaOH_G,-H2O_H]]) ;\t\t\t# matrix formed of coefficients of unknown\n", "b1 = matrix([[((NaOH_P1+NaOH_P2)* P)],[(H2O_P2) * P]]);\t\t\t# matrix formed by constant\n", "x1 = a1**-1\n", "x1 = x1*b1 ;\t\t\t# matrix of solutions nw_G = x1(1);H = x1(2)\n", "nw_G1 = x1 ;\t\t\t# [lb/hr]\n", "H = x1;\t\t\t# [lb/hr]\n", "\n", "nw_F = (NaOH_H * H + (NaOH_P1 + NaOH_P2) * P)/NaOH_F ;\t\t\t#[lb/hr]\n", "print ' (b) Total feed rate when filterate is not recycled is %.1f lb/hr'%nw_F\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) Flow rate of water removed by evaporator is 5886.9 lb/hr\n", "The recycle rate of the process is 38868.9 lb/hr\n", " (b) Total feed rate when filterate is not recycled is 53727.5 lb/hr\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 12.2 Page No.357\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "F_Bz = 100. ;\t\t\t# Fresh benzene feed / basis - [mol]\n", "con_Bz = .95 ;\t\t\t# Fraction of conversion of benzene\n", "sp_con = .20 ;\t\t\t# Fraction of single pass conversion\n", "ex_H2 = .20 ;\t\t\t# Fraction of exces H2 used in fresh feed\n", "R_Bz = 22.74 ;\t\t\t# Benzene in Recycle stream - [mol %]\n", "R_H2 = 78.26 ;\t\t\t# H2 in Recycle stream - [mol %]\n", "TLV_Bz = 0.5 ;\t\t\t# TLV value of benzene -[ppm]\n", "TLV_C6H12 = 300. ;\t\t\t# TLV value of cyclohexane -[ppm]\n", "TLV_H2 = 1000. ;\t\t\t# TLV value of H2 -[ppm]\n", "\n", "# Calculations\n", "F_H2 = F_Bz*3*(1+ex_H2) ;\t\t\t# H2 in Feed - [mol]\n", "F = F_Bz + F_H2 ;\t\t\t# Total feed - [mol] \n", "\n", "ex_r = con_Bz*F_Bz/(-(-1)) ;\t\t\t# Extent of reaction\n", "\n", "P_Bz = F_Bz -1*(ex_r) ;\t\t\t# Benzene in P ,by benzene balance - [mol]\n", "P_H2 = F_H2 + -3*(ex_r) ;\t\t\t# H2 in P ,by H2 balance - [mol]\n", "P_C6H12 = 0 + 1*(ex_r) ;\t\t\t# Cyclohexane in P ,by cyclohexane balance - [mol]\n", "P = P_Bz + P_H2 + P_C6H12 ;\t\t\t# Total Product - [ mol]\n", "\n", "R = ((-(-ex_r))/(sp_con) - F_Bz)/(R_Bz/100.) ;\t\t\t# Recycle stream - [mol]\n", "R_by_F = R/F ;\t\t\t# Ratio of R to F \n", "\n", "TLV = (P_Bz/P)*(1/TLV_Bz) + (P_H2/P)*(1./TLV_H2) + (P_C6H12/P)*(1/TLV_C6H12) ;\t\t\t# TLV (environmental index) \n", "\n", "# Results\n", "print 'Ratio of R to F is %.2f .'%R_by_F\n", "print ' TLV (environmental index) is %.3f .'%TLV\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Ratio of R to F is 3.58 .\n", " TLV (environmental index) is 0.059 .\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 12.3 Page No.359\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "RR = 8.33 ;\t\t\t# Recycle ratio\n", "F = 100. ;\t\t\t# Overall feed/basis - [lb]\n", "F_g = 0.40 ;\t\t\t# Fraction of glucose in overall feed \n", "F_w = 0.60 ;\t\t\t# Fraction of water in overall feed \n", "F_dash_f = 0.04 ; \t\t\t# Fraction of fructose in feed to reactor\n", "P = F \t\t\t# By overall balance -[lb]\n", "R = P/RR ;\t\t\t# Recycle stream - [lb]\n", "P_w = (F_w * F)/ P ;\t\t\t# Fraction of water in product(P), by overall water balance\n", "R_w = P_w ;\t\t\t#Fraction of water in recycle (R), since both R and P has same composition\n", "\n", "# Calculations\t\t\n", "F_dash = F +R ;\t\t\t# Feed to reactor ,by total balance -[lb]\n", "R_f = (F_dash*F_dash_f)/R ;\t\t\t# Fraction of fructose in recycle stream \n", "R_g = 1 - (R_f + R_w) ;\t\t\t# Fraction of glucose in recycle stream\n", "F_dash_g = (F*F_g + R*R_g)/F_dash ;\t\t\t# Fraction of glucose i feed to reactor\n", "\n", "f_con = ((F_dash*F_dash_g) - (R + P)*R_g)/(F_dash*F_dash_g) ;\t\t\t# Fraction of conversion of glucose in reactor\n", "\n", "# Results\n", "print 'Fraction of conversion of glucose in reactor is %.2f .'%f_con\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Fraction of conversion of glucose in reactor is 0.93 .\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 12.4 Page No.362\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "F = 100. ;\t\t\t# Overall feed/basis - [kg]\n", "F_com = 0.10 ;\t\t\t# Mass fraction of component in fresh feed \n", "F_w = 0.90 ;\t\t\t# Mass fraction of water in fresh feed \n", "P_w = 0.10 ;\t\t\t# Mass fraction of water in product\n", "P_com = 0.90 ;\t\t\t#Mass fraction of component in product\n", "F_dash_com = 0.03 ;\t\t\t#Mass fraction of component in feed to reactor\n", "W_w = 1. ;\t\t\t# Mass fraction of water in W(waste)\n", "C_con = .40 ;\t\t\t# Fraction of conversion of component in reactor\n", "\n", "# Calculations\n", "P = F_com*F/P_com ;\t\t\t#By component balance- Product - [kg]\n", "W = F - P ;\t\t\t# By overall balance - waste(W)- [kg]\n", "\n", "Rw = (F*F_com - F*F_com*C_con)/C_con ;\t\t\t# Mass of component in recycle(R) - [kg]\n", "F_dash = ( F*F_com + Rw )/F_dash_com ;\t\t\t# By component balance - feed to reactor(F') -[kg]\n", "R = F_dash - F ;\t\t\t # Recycle(R) - By total balance -[kg]\n", "w = Rw/R ;\t\t\t # Mass fraction of component in recycle(R) \n", "\n", "# Results\n", "print 'Recycle(R) stream- %.0f kg '%R\n", "print ' Mass fraction of component in recycle(R)- %.4f .'%w\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Recycle(R) stream- 733 kg \n", " Mass fraction of component in recycle(R)- 0.0205 .\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 12.5 Page No.367\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "F = 100. \t\t\t# Overall feed/basis - [kg]\n", "F_n_C5H12 = 0.80 ;\t\t\t# Fraction of n_C5H12 in overall feed \n", "F_i_C5H12 = 0.20 ;\t\t\t# Fraction of i_C5H12in overall feed \n", "S_i_C5H12 = 1. ;\t\t\t# Fraction of i_C5H12 in isopentane stream\n", "P_n_C5H12 = .90 ;\t\t\t# Fraction of n_C5H12 in overall product\n", "P_i_C5H12 = .10 ;\t\t\t# Fraction of i_C5H12 in overall product\n", "\n", "# Calculations\n", "P = (F*F_n_C5H12)/P_n_C5H12 ;\t\t\t#Product Material Balance of n_C5H12 -[kg]\n", "S = F - P ;\t\t\t# Isopentane stream (S) from overall material balance - [kg]\n", "\n", "from numpy import matrix\n", "a = matrix([[1,-1],[F_n_C5H12,-1]]) ;\t\t\t# Matrix of coefficients of unknown \n", "b = matrix([[S],]) ;\t\t\t# Matrix of constants\n", "a = a.I\n", "x = a*b \t\t\t# Matrix of solutions, x(1) = x , x(2) = y\n", "\n", "xf = x/F ;\t \t\t# Fraction of butane-free gas going to isopentane tower \n", "\n", "# Results\n", "print 'Fraction of butane-free gas going to isopentane tower is %.3f .'%xf\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Fraction of butane-free gas going to isopentane tower is 0.556 .\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 12.6 Page No.369\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "F = 100. ;\t\t\t# Overall feed/basis - [mole]\n", "F_H2 = 0.673 ;\t\t\t# Mole fraction of H2 in overall feed \n", "F_CO = 0.325 ;\t\t\t# Mole fraction of i_C5H12in overall feed \n", "F_CH4 = .002 ;\t\t\t# Mole fraction of CH4 in overall feed \n", "E_CH3OH = 1. ;\t\t\t# Mole fraction of CH3OH in Exit(E)\n", "\t\n", "z = .032 ;\n", "CO_con = .18 ;\t\t\t# Fraction of conversion of CO in reactor\n", "\n", "# Calculations\n", "#By using eqn.(c) and (d)\n", "P = F_CH4*F/z ;\t\t\t# Purge stream - [mole]\n", "\n", "# Using eqn.(a) , (b) and (c)\n", "x_plus_y = 1 - z ;\t\t\t# x + y \n", "E = (F_H2*F + F_CO*F + 3*F_CH4*F - P*(x_plus_y + 3*z ))/3 ;\t\t\t# Exit stream - [mole]\n", "\n", "# By using eqn. (d)\n", "y = ( F_CO*F - E )/P ;\t\t\t# Mole fraction of CO \n", "\n", "# By using eqn. (a)\n", "x = 1 - z - y ;\t\t\t# Mole fraction of H2 \n", "\n", "# Lastly by using eqn.(e)\n", "R = ( F_CO*F - P*y - F_CO*F*CO_con )/(y*CO_con) ;\t\t\t# Recycle steam - [mole]\n", "\n", "# Results\n", "print 'Moles of recycle(R) per mole of feed(F) - %.4f '%(R/F)\n", "print ' Moles of CH3OH(E) per mole of feed(F) - %.4f '%(E/F)\n", "print ' Moles of Purge(P) per mole of feed(F) - %.4f '%(P/F);\n", "print ' Composition of Purge '\n", "print ' Component Mole fraction '\n", "print ' H2 %.3f '%x\n", "print ' CO %.3f '%y\n", "print ' CH4 %.3f '%z\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Moles of recycle(R) per mole of feed(F) - 7.0556 \n", " Moles of CH3OH(E) per mole of feed(F) - 0.3125 \n", " Moles of Purge(P) per mole of feed(F) - 0.0625 \n", " Composition of Purge \n", " Component Mole fraction \n", " H2 0.768 \n", " CO 0.200 \n", " CH4 0.032 \n" ] } ], "prompt_number": 6 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I54�s7s7DBasic Principles And Calculations In Chemical Engineering/ch13.ipynb{ "metadata": { "name": "", "signature": "sha256:86277517338e3080962ec366bf78a36ead36dc032944d5f67a8c58022c6af85a" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 13 : Ideal Gases" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 13.1 Page No. 404\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "m_CO2 = 40. ;\t\t\t# Mass of CO2-[kg]\n", "mol_wt_CO2 = 44. ;\t\t\t# Molecular mass of 1kmol CO2 -[kg]\n", "mol_V = 22.42 ;\t\t\t# Molar of ideal gas at standard condition-[cubic metre/kg mol]\n", "\n", "# Calculations\n", "V_CO2 = (m_CO2 * mol_V)/(mol_wt_CO2);\t\t\t# volume of CO2-[cubic metre]\n", "\n", "# Results\n", "print 'Volume occupied by 40 kg CO2 at standard condition is %.1f cubic metre.'%V_CO2\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Volume occupied by 40 kg CO2 at standard condition is 20.4 cubic metre.\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 13.2 Page No. 405\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "p =1. ;\t\t\t# Pressure -[atm]\n", "V = 22415. ;\t\t\t# Molar valume -[cubic centimetre/g mol]\n", "T = 273.15 ;\t\t\t# Temperature-[K]\n", "\n", "# Calculations\n", "R = (p*V/T);\t\t\t# Universal gas constant-[(cubic centimetre.atm)/(K.g mol)]\n", "\n", "# Results\n", "print 'Universal gas constant is %.2f (cubic centimetre*atm)/(K*g mol). '%R\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Universal gas constant is 82.06 (cubic centimetre*atm)/(K*g mol). \n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 13.3 Page No.406\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "m_CO2 = 88. ;\t\t\t# Mass of CO2-[lb]\n", "mol_wt_CO2 = 44. ;\t\t# Molecular mass of 1 lb mol CO2 -[lb]\n", "mol_V = 359. ; \t\t\t# Molar volume-[cubic feet]\n", "\n", "# State 1-standard condition\n", "P1 = 33.91 ; \t\t\t# Pressure -[ft of water]\n", "T1 = 273. ;\t\t\t# Temperature-[K]\n", "\n", "# State 2\n", "P2 = 32.2 ;\t\t\t# Pressure -[ft of water]\n", "Tc = 15. ;\t\t\t # Temperature-[degree C]\n", "T2 = Tc+273 ;\t\t\t# Temperature-[K]\n", "\n", "# Calculations\n", "V1 = (m_CO2 * mol_V) / (mol_wt_CO2);\n", "V2 = (V1 * T2 * P1) / (T1 * P2);\n", "\n", "# Results\n", "print 'The volume occupied 88 lb of CO2 at given condition is %.0f cubic feet.'%V2\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The volume occupied 88 lb of CO2 at given condition is 798 cubic feet.\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 13.4 Page No. 408\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "mol_wt_N2 = 28. ;\t# Molecular mass of 1 kg mol N2 -[kg]\n", "mol_V = 22.42 ;\t\t# Molar of ideal gas at standard condition-[cubic metre/kg mol]\n", "Tc = 27. ;\t\t\t# Temperature-[degree C]\n", "T = Tc + 273. ;\t\t#Temperature-[K]\n", "P = 100. ;\t\t\t#Pressure-[kPa]\n", "\t\t\t\n", "Ps = 101.3 ;\t\t# Pressure -[kPa]\n", "Ts = 273. ;\t\t\t#Temperature-[K]\n", "\n", "# Calculations\n", "V = (T * Ps * mol_V)/(Ts * P) ;\t\t\t# Volume occupied by N2-[cubic metre]\n", "D_N2 = mol_wt_N2/V ;\t\t\t # Density of N2 at given condition-[kg/cubic metre]\n", "\n", "# Results\n", "print ' Density of N2 at given condition is %.3f kg/cubic metre.'%D_N2\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Density of N2 at given condition is 1.122 kg/cubic metre.\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 13.5 Page No. 409 \n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "mol_wt_N2 = 28. ;\t\t\t# Molecular mass of 1 lb mol N2 -[lb]\n", "mol_wt_air = 29. ;\t\t\t# Molecular mass of 1 lb mol air -[lb]\n", "mol_V = 359. ;\t\t\t # Molar volume of ideal gas-[cubic feet]\n", "\t\n", "Tf = 80. ;\t\t\t# Temperature-[degree F]\n", "T = Tf + 460. ;\t\t#Temperature-[degree Rankine]\n", "P = 745. ;\t\t\t#Pressure-[mm of Hg]\n", "\n", "Ps = 760. ;\t\t\t# Pressure -[mm of Hg]\n", "Ts = 492. ;\t\t\t#Temperature-[degree Rankine]\n", "\n", "# Calculations\n", "D_air = (Ts * P * mol_wt_air)/(T * Ps * mol_V) ;\t\t# Density of air at given condition-[lb/cubic feet]\n", "D_N2 = (Ts * P * mol_wt_N2)/(T * Ps * mol_V) ;\t\t\t# Density of N2 at given condition-[lb/cubic feet]\n", "sg_N2 = D_N2/D_air ;\t\t\t # Specific gravity of N2 compared to air at given condition \n", "\n", "# Results\n", "print ' Specific gravity of N2 compared to air at given condition is %.3f .'%sg_N2\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Specific gravity of N2 compared to air at given condition is 0.966 .\n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 13.6 Page No. 414\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "F_gas = 1. ;\t\t\t # Flue gas [kg mol]\n", "mf_CO2 = 14./100 ;\t\t\t# [mol fraction]\n", "mf_O2 = 6./100 ;\t\t\t# [mol fraction]\n", "mf_N2 = 80./100 ;\t\t\t# [mol fraction]\n", "P = 765. ;\t\t\t #Pressure-[mm of Hg]\n", "T = 400. ;\t\t\t # Temperature-[degree F]\n", "\n", "# Calculations\n", "p_CO2 = P * mf_CO2 ;\t\t# Partial pressure of CO2-[mm of Hg]\n", "p_O2 = P * mf_O2 ;\t\t\t# Partial pressure of O2-[mm of Hg]\n", "p_N2 = P * mf_N2 ;\t\t\t# Partial pressure of N2-[mm of Hg]\n", "\n", "# Results\n", "print ' Component pi(Partial pressure-[mm of Hg]) '\n", "print ' CO2 %.1f mm of Hg '%p_CO2\n", "print ' O2 %.1f mm of Hg '%p_O2\n", "print ' N2 %.1f mm of Hg '%p_N2\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Component pi(Partial pressure-[mm of Hg]) \n", " CO2 107.1 mm of Hg \n", " O2 45.9 mm of Hg \n", " N2 612.0 mm of Hg \n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 13.7 Page no. 416\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "G = 100. ;\t\t\t# Basis: Pyrolysis Gas-[lb mol] \n", "ub_CO = 10./100 ;\t# fraction of CO left unburnt\n", "ex_air = 40./100 ;\t# fraction of excess air\n", "m_vol = 359. ;\t\t# molar volume of gas at std. cond.-[cubic feet]\n", "Ts = 492. ;\t\t\t# Standard temperature -[degree Rankine]\n", "Ps = 29.92 ;\t\t#Standard pressure -[in. Hg]\n", "\n", "# Calculations\n", "# Analysis of entering gas of entering gas\n", "Tf1 = 90. ;\t\t\t# Temperature of gas-[degree F]\n", "T_gas = Tf1 + 460. ;\t#Temperature of gas-[degree Rankine]\n", "P_gas = 35. ;\t\t\t#Pressure-[in. Hg]\n", "CO2 = 6.4/100 ;\t\t\t# mol fraction of CO2\n", "O2 = 0.1/100 ;\t\t\t# mol fraction of O2\n", "CO = 39./100 ;\t\t\t# mol fraction of CO\n", "H2 = 51.8/100 ;\t\t\t# mol fraction of H2\n", "CH4 = 0.6/100 ;\t\t\t# mol fraction of CH4\n", "N2 = 2.1/100 ;\t\t\t# mol fraction of N2\n", "\n", "# Analysis of entering air\n", "Tf2 = 70. ;\t\t\t # Temperature of air -[degree F]\n", "T_air = Tf2 + 460. ;\t#Temperature of air-[degree Rankine]\n", "P_air = 29.4 ;\t\t\t#Pressure of air [in. Hg]\n", "f_N2 = 79./100 ;\t\t\t# mol fraction of N2\n", "f_O2 = 21./100 ;\t\t\t# mol fraction of O2\n", "\n", "\n", "O2r_O2 = O2 * G ;\t\t\t# O2 required by O2-[lb mol]\n", "O2r_CO = CO * G/2 ;\t\t\t# O2 required by CO-[lb mol]\n", "O2r_H2 = H2 * G/2 ;\t\t\t# O2 required by H2-[lb mol]\n", "O2r_CH4 = G * CH4 * 2 ;\t\t\t# O2 required by CH4-[lb mol]\n", "O2r_total = O2r_O2 + O2r_CO + O2r_H2 + O2r_CH4 ;\t\t\t# Total O2 required-[lb mol]\n", "ex_O2 = ex_air * O2r_total ;\t\t\t# Excess O2-[lb mol]\n", "total_O2 = ex_O2 + O2r_total ;\t\t\t# Total amt of O2 in air-[lb mol]\n", "total_N2 = total_O2 * (f_N2/f_O2);\t\t\t# Total amt of in air-[lb mol]\n", "air = total_O2 + total_N2 ;\t\t\t# Total air entering -[lb mol]\n", "\n", "# Product analysis\n", "P_CO = ub_CO * CO * G ;\t\t\t#Unburnt CO in P-[lb mol]\n", "P_N2 = N2 * G + total_N2 ;\t\t\t# N2 in P-[lb mol]\n", "P_CO2 = (CO2 + CO + CH4) * G - 1 * P_CO;\t\t\t#CO2 in P-[lb mol]\n", "P_H2O = (H2 + 2 * CH4) * G ;\t\t\t# H2 in P-[lb mol]\n", "P_O2 = (CO2 + O2 + 0.5 * CO) * G + total_O2 -P_CO2-0.5 * (P_H2O + P_CO);\t\t\t# O2 in P-[lb mol]\n", "P = P_CO + P_N2 + P_CO2 + P_H2O + P_O2 ;\t\t\t# Product-[lb mol]\n", "Tf3 = 400 ;\t\t\t# Temperature of product-[degree F]\n", "T_prod = Tf3 + 460 ;\t\t\t#Temperature of product-[degree Rankine]\n", "P_prod = 35 ;\t\t\t# Pressure of product -[in.Hg]\n", "V_gas = (G * m_vol * T_gas * Ps)/(Ts * P_gas);\n", "V_air = (air * m_vol * T_air * Ps)/(Ts * P_air);\n", "V_prod = (P * m_vol * T_prod * Ps)/(Ts * P_prod);\n", "air_ft3 = V_air/V_gas ;\t\t\t#Air supplied per ft**3 of gas entered-[cubic feet]\n", "P_ft3 = V_prod/V_gas ;\t\t\t#Product gas produced per ft**3 of gas entered-[cubic feet]\n", "\n", "# Results\n", "print ' Air supplied per ft**3 of gas entered %.2f cubic feet. '%air_ft3\n", "print ' Product gas produced per ft**3 of gas entered %.2f cubic feet.'%P_ft3\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Air supplied per ft**3 of gas entered 3.57 cubic feet. \n", " Product gas produced per ft**3 of gas entered 5.75 cubic feet.\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 13.8 Page No. 419\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "T1c = 15. ;\t\t\t # Temperature of F & P -[degree C] \n", "T1 = 273. + T1c ;S\t# Temperature of F & P -[K] \n", "P1 = 105. ;\t\t\t# Pressure of F & P -[kPa]\n", "\n", "# Calculations\n", "# F analysis\n", "F_CO2 = 1.2/100 ;\t\t\t# Volume fraction \n", "F_odr = 98.8/100 ;\t\t\t# Volume fraction \n", "\n", "# P analysis\n", "P_CO2 = 3.4/100 ;\t\t\t# Volume fraction \n", "P_odr = 96.6/100 ;\t\t\t# Volume fraction \n", " \n", "Tc_CO2 = 7. ;\t\t\t#Temperature CO2 -[degree C] \n", "T_CO2 = 273. + Tc_CO2 ;\t\t\t# Temperature CO2 -[K]\n", "P_CO2 = 131. ;\t\t\t# Pressure of CO2 -[kPa]\n", "CO2 = 0.0917 ;\t\t\t# Volume flow rate of CO2-[cubic metre/min]\n", "# Convert given volume flow rate of CO2 at temperature of F & P\n", "nw_CO2 = (CO2 * T1 * P_CO2)/(T_CO2 * P1) ;\t\t\t# volume flow rate of CO2 at temperature of F & P-[cubic metre]\n", "\n", "from numpy import matrix\n", "a = matrix([[F_odr,-P_odr],[1, -1]]);\t\t\t# Matrix formed by coefficients of unknown\n", "b = matrix([,[-nw_CO2]]) ;\t\t\t# Matrix formed by constants\n", "a = a.I\n", "x = a*b ;\t\t\t# matrix of solution, x(1) = F;x(2) = P\n", "F = x ;\t\t\t#Volume flow rate of entering gas-[cubic metre/min]\n", "P = x ;\t\t\t#Volume flow rate of product [cubic metre/min]\n", "\n", "# Results\n", "print 'Volume flow rate of entering gas is %.2f cubic metre/min'%F\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Volume flow rate of entering gas is 5.17 cubic metre/min\n" ] } ], "prompt_number": 16 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I�qA" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Temperature Estimated vapour pressure of chlorobenzene from cox chart\n", " 245 degree C 150 psia\n", " 359 degree C 700 psia\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 16.4 Page no. 495\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "OP_Et = 400. ;\t\t\t#OSHA PEL of ethyl acetate -[ppm by volume]\n", "OP_Mek = 200. ;\t\t\t#OSHA PEL of Methyl ethyl ketone [ppm by volume]\n", "OP_Nba = 1.3 ;\t\t\t#OSHA PEL of n-butyl acetate [ppm by volume]\n", "vp_Et = 96.9 ;\t\t\t# Vapour pressure of ethyl acetate obtained from CD-[mm of Hg]\n", "vp_Mek = 94.8 ;\t\t\t# Vapour pressure of Methyl ethyl ketone obtained from CD-[mm of Hg]\n", "vp_Nba = 20. ;\t\t\t# Vapour pressure of n-butyl acetate obtained from Perry-[mm of Hg]\n", "\n", "# Calculations\n", "Chz_Et = vp_Et/OP_Et ;\t\t\t# Combined hazard criterion of ethyl acetate\n", "Chz_Mek = vp_Mek/OP_Mek ;\t\t\t# Combined hazard criterion of Methyl ethyl ketone \n", "Chz_Nba = vp_Nba/OP_Nba ;\t\t\t# Combined hazard criterion of n-butyl acetate\n", "\n", "# Results\n", "print 'Combined hazard criterion of solvents in increasing order are :'\n", "print 'Ethyl acetate : %.2f'%Chz_Et\n", "print 'Methyl ethyl ketone : %.2f'%Chz_Mek\n", "print 'n-butyl acetate : %.2f'%Chz_Nba\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Combined hazard criterion of solvents in increasing order are :\n", "Ethyl acetate : 0.24\n", "Methyl ethyl ketone : 0.47\n", "n-butyl acetate : 15.38\n" ] } ], "prompt_number": 5 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��Io��� , ,DBasic Principles And Calculations In Chemical Engineering/ch17.ipynb{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 17 : Two Phase Gas Liquid Systems Saturation Condensation and Vaporization" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 17.1 Page no. 511\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "F = 1. ;\t\t\t#H2C2O4- [mol]\n", "ex_O2 = 248. ;\t\t#Excess air- [%]\n", "f_C = 65/100. ;\t\t# Fraction of Carbon which convert to CO2\n", "P = 101.3 ;\t\t\t# Atmospheric pressure-[kPa]\n", "\n", "# Calculations\n", "O2_req = F*0.5 ;\t\t\t# O2 required by the above reaction-[mol]\n", "O2_in = (1. + ex_O2*F/100)*0.5 ;\t\t\t# Mol. of O2 entering\n", "\n", "# Use Elemental balance moles of species in output \n", "n_CO2 = f_C*2 ;\t\t\t# [mol]\n", "n_H2O = (2*F)/2. ;\t\t# From 2H balance-[mol]\n", "n_N2 = ((O2_in*0.79)/(0.21)) ;\t\t\t# From 2N balance-[mol]\n", "n_CO = 2-n_CO2 ;\t\t\t # From C balance-[mol]\n", "n_O2 = ((4 + O2_in*2)-(n_H2O + n_CO + 2*n_CO2))/2 ;\t\t\t# From O2 balance-[mol]\n", "total_mol = n_CO2 + n_H2O + n_N2 + n_CO + n_O2 ;\t\t\t# Total moles in output stream-[mol]\n", "y_H2O = n_H2O/total_mol ;\t# Mole fraction of H2O\n", "pp_H2O = y_H2O*P ;\t\t\t# Partial pressure of H2O-[kPa]\n", "\n", "\n", "# Results\n", "print 'Partial pressure of H2O %.2f kPa.'%pp_H2O\n", "print 'Use partial pressure of H2O to get dew point temperature T from steam table: T = 316.5 K'\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Partial pressure of H2O 9.10 kPa.\n", "Use partial pressure of H2O to get dew point temperature T from steam table: T = 316.5 K\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 17.2 Page no. 517\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "gas = 1. ;\t\t\t# Entering gas-[g mol]\n", "T = 26. ;\t\t\t# Temperature (for isothermal process)-[degree C]\n", "vp = 99.7 ;\t\t\t# vapour pressure of benzene at 26 C-[mm of Hg]\n", "\n", "# Analysis of entering gas \n", "f_C6H6 = 0.018 ;\t\t\t# Mol fraction of benzene\n", "f_air = 0.982 ;\t\t\t# Mol fraction of air\n", "mol_C6H6 = 0.018*gas ;\t\t# Moles of benzene-[g mol]\n", "mol_air = 0.982*gas ;\t\t# Moles of air-[g mol]\n", "\n", "# Calculations\n", "# Analysis of exit gas\n", "C6H6_rec = 95./100 ;\t\t\t# Fraction of benzene recovered\n", "C6H6_out = 1-C6H6_rec ;\t\t#Fraction of benzene in exit stream\n", "C6H6_out = mol_C6H6*C6H6_out ;\t#Moles of benzene in exit stream-[g mol]\n", "air_out = mol_air ;\t\t\t #Moles of air in exit stream-[g mol]\n", "total_mol = C6H6_out+air_out ;\t# Total moles in exit stream\n", "y_C6H6_out = C6H6_out/total_mol ;\t\t\t# Mole fraction of benzene in exit\n", "P = vp/y_C6H6_out ;\t\t\t # Pressure total of exit\n", "\n", "# Results\n", "print ' Pressure total at exit of compressor %.2e mm of Hg.'%P\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Pressure total at exit of compressor 1.09e+05 mm of Hg.\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 17.3 Page no. 519\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "ex_air = .4 ;\t\t\t# Fraction of excess air required\n", "w_C = 12. ;\t\t\t # Mol. wt. of C-[g]\n", "mol_C = 71./w_C ;\t\t#[kg mol]\n", "w_H2 = 2.016 ;\t\t\t# Mol. wt. of H2 - [g] \n", "mol_H2 = 5.6/w_H2;\n", "air_O2 = 0.21;\t\t\t# Fraction of O2 in air\n", "air_N2 = 0.79;\t\t\t# Fraction of N2 in air\n", "\n", "# Calculations\n", "CO2_1 = 1. ;\t\t\t# By Eqn. (a) CO2 produced -[kg mol]\n", "H2O_1 = 2. ;\t\t\t# By Eqn. (a) H2O produced -[kg mol]\n", "Req_O2_1 = 2. ;\t\t\t# By Eqn. (a) -[kg mol]\n", "ex_O2_1 = Req_O2_1*ex_air ;\t\t\t# Excess O2 required -[kg mol]\n", "O2_1 = Req_O2_1 + ex_O2_1 ;\t\t\t # Total O2 required - [kg mol]\n", "N2_1 = O2_1*(air_N2/air_O2) ;\t\t\t#Total N2 required - [kg mol]\n", "Total_1 = CO2_1 + H2O_1 + N2_1 + ex_O2_1 ;\t\t\t# Total gas produced- [kg mol]\n", "\n", "CO2_2 = 1 ;\t\t\t# By Eqn. (a) CO2 produced -[kg mol]\n", "H2O_2 = mol_H2/mol_C ;\t\t\t# By Eqn. (a) H2O produced -[kg mol]\n", "Req_O2_2 = 1 + (mol_H2/mol_C)*(1./2) ;\t\t\t# By Eqn. (b) and (c) -[kg mol]\n", "ex_O2_2 = Req_O2_2*ex_air ;\t\t\t# Excess O2 required -[kg mol]\n", "O2_2 = Req_O2_2 + ex_O2_2; \t\t\t# Total O2 required - [kg mol]\n", "N2_2 = O2_2*(air_N2/air_O2); \t\t\t#Total N2 required - [kg mol]\n", "Total_2 = CO2_2 + H2O_2 + N2_2 + ex_O2_2 ;\t\t\t# Total gas produced- [kg mol]\n", "\n", "P = 100. ;\t\t\t# Total pressure -[kPa]\n", "p1 = P*(H2O_1/Total_1) ;\t\t\t# Partial pressure of water vapour in natural gas - [kPa]\n", "Eq_T1 = 52.5 ;\t\t\t# Equivalent temperature -[degree C]\n", "p2 = P*(H2O_2/Total_2) ;\t\t\t# Partial pressure of water vapour in coal - [kPa]\n", "Eq_T2 = 35 ;\t\t\t# Equivalent temperature -[degree C]\n", "\n", "# Results\n", "print ' Natural gas Coal'\n", "print ' ---------------------- --------------------'\n", "print 'Partial pressure: %.1f kPa %.1f kPa'%(p1,p2 )\n", "print 'Equivalent temperature: %.1f C %.1f C'%(Eq_T1,Eq_T2 );\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Natural gas Coal\n", " ---------------------- --------------------\n", "Partial pressure: 14.0 kPa 5.5 kPa\n", "Equivalent temperature: 52.5 C 35.0 C\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 17.4 Page no. 522\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "F = 30. ;\t\t\t# Volume of initial gas-[m**3]\n", "P_F = 98.6 ;\t\t\t# Pressure of gas-[kPa]\n", "T_F = 273.+100 ;\t\t\t# Temperature of gas-[K]\n", "P_p = 109. ;\t\t\t#[kPa]\n", "T_p = 14.+273 ;\t\t\t# Temperature of gas-[K]\n", "R = 8.314 ;\t\t\t# [(kPa*m**3)/(k mol*K)] \n", "# Additional condition\n", "vpW_30 = 4.24 ;\t\t\t#Vapour pressure-[kPa]\n", "vpW_14 = 1.60 ;\t\t\t#Vapour pressure-[kPa]\n", "n_F = (P_F*F)/(R*T_F) ;\t\t\t# Number of moles in F\n", "\n", "# Calculations\n", "# Material balance to calculate P & W\n", "P = (n_F*((P_F-vpW_30)/P_F))/((P_p-vpW_14)/P_p) ;\t\t\t# P from mat. bal. of air -[kg mol]\n", "W = (n_F*(vpW_30/P_F))- P*(vpW_14/P_p); \t\t\t# W from mat. bal. of water -[kg mol]\n", "iW = n_F*(vpW_30/P_F) ;\t\t\t# Initial amount of water -[kg mol]\n", "fr_con = W/iW ;\t\t\t#Fraction of water condenseed \n", "\n", "# Results\n", "print ' Fraction of water condenseed %.3f.'%fr_con\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Fraction of water condenseed 0.668.\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 17.5 Page no. 527\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "P = 100. ;\t\t\t# Pressure of air-[kPa]\n", "T = 20. + 273 ;\t\t\t# Temperature of air-[K]\n", "R = 8.314 ;\t\t\t# [(kPa*m**3)/(k mol*K)] \n", "EOH = 6 ;\t\t\t# Amount of ethyl alcohol to evaporate-[kg]\n", "mw_EOH = 46.07 ;\t\t\t# Mol.wt. of 1 k mol ethyl alcohol-[kg]\n", "\t\t\t\n", "# Calculations\n", "# Additional data needed\n", "vp_EOH = 5.93 ;\t\t\t# Partial pressure of alcohol at 20 C-[kPa]\n", "vp_air = P-vp_EOH ;\t\t\t# Partial pressure of air at 20 C-[kPa]\n", "n_EOH = EOH/mw_EOH ;\t\t\t#Moles of ethyl alcohol -[kg mol]\n", "n_air = (n_EOH*vp_air)/vp_EOH ;\t\t\t# Moles of air -[kg mol]\n", "V_air = n_air*R*T/P ;\t\t\t# Volume of air required\n", "\n", "# Results\n", "print ' Volume of air required to evaporate 6 kg of ethyl alcohol is %.1f cubic metre . '%V_air\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Volume of air required to evaporate 6 kg of ethyl alcohol is 50.3 cubic metre . \n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 17.6 Page no. 529\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Variables\n", "P = 760. ;\t\t\t# Pressure -[ mm of Hg]\n", "vp = 40. ;\t\t\t# vapour pressure of n-heptane-[mm of Hg]\n", "\n", "# Calculations\n", "K = 10**((math.log10(vp/P)-0.16)/1.25) ;\n", "x = 0.5 ;\t\t\t# mole fraction after t_half\n", "x0 = 1. ;\t\t\t# initial mole fraction \n", "t_half = (math.log(x/x0))/(-K);\t\t\t# Time required to reduce the concentration to one-half-[min]\n", "\n", "# Results\n", "print 'Time required to reduce the concentration to one-half is %.1f min. '%t_half\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Time required to reduce the concentration to one-half is 9.8 min. \n" ] } ], "prompt_number": 12 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I��b!)!)DBasic Principles And Calculations In Chemical Engineering/ch18.ipynb{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 18 : Two Phase Gas Liquid Systems Partial Saturation and Humidity" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 18.1 Page no.539\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "V = 1. ;\t\t\t# Volume of water vapour-[cubic metre]\n", "rel_h = 43. ;\t\t\t# relative humidity -[%]\n", "vp_H2O = 1.61 ;\t\t\t# vapour pressure of water at 94 F-[in. of Hg]\n", "P_H2O = vp_H2O*(rel_h/100) ;\t\t\t# Pressure of water vapour in air-[in. of Hg]\n", "P = 29.92 ;\t\t\t# [in of Hg]\n", "T = 94+460. ;\t\t\t# Temperature -[Rankine]\n", "Ts = 492. ;\t\t\t#Temperature std. -[Rankine]\n", "mw_H2O = 18. ;\t\t\t# molecular mass of water -[lb]\n", "\n", "# Calculations\n", "H2O = (5280**3*Ts*P_H2O*mw_H2O)/(T*P*359) ;\t\t\t#mass of H2O-[lb]\n", "# The dew point is temperature at which water vapour in air first condense ,i.e at realative humidity 100 %, therefore\n", "psat_H2O = P_H2O ;\t\t\t# Saturation pressure of H2O -[in. of Hg]\n", "\n", "# Results\n", "print 'Saturation pressure of H2O %.3f in. of Hg'%psat_H2O\n", "print 'Use saturation pressure of H2O to get dew point temperature T from steam table: T is about 68-69 F.'\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Saturation pressure of H2O 0.692 in. of Hg\n", "Use saturation pressure of H2O to get dew point temperature T from steam table: T is about 68-69 F.\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 18.2 Page no. 541\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "# Data from steam table\n", "psat_H2O = 31.8 ;\t\t\t# Saturation pressure -[mm of Hg]\n", "\n", "#(c)\n", "H = .0055 ;\t\t\t# Humidity\n", "mw_H2O = 18. ;\t\t\t# Molecular wt. of water-[lb]\n", "mw_air = 29. ;\t\t\t# Molecular wt. of air -[lb]\n", "P = 750. ;\t\t\t# Pressure total -[mm of Hg]\n", "\n", "# Calculations\n", "p_H2O = ((H*mw_air*P)/mw_H2O)/(1+(H*mw_air/mw_H2O)) ;\t\t\t# Partial pressure of water vapour in air-[mm of Hg]\n", "#(a)\n", "rel_H = (p_H2O/psat_H2O)*100 ;\t\t\t# relative humidity -[%]\n", "#(b)\n", "mol_H = (p_H2O)/(P-p_H2O) ;\t\t\t# Molal humidity\n", "\n", "# Results\n", "print '(a)Relative humidity is %.0f%% .'%rel_H\n", "print '(b)Molal humidity is %.1e '%mol_H\n", "print '(c)Partial pressure of water vapour in air is %.1f mm of Hg.'%p_H2O\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a)Relative humidity is 21% .\n", "(b)Molal humidity is 8.9e-03 \n", "(c)Partial pressure of water vapour in air is 6.6 mm of Hg.\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 18.3 Page No. 544\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "V_BDA = 1000. ;\t\t\t# Volume of bone dry air(BDA) at 20 C & 108.0 kPa\n", "mol_V = 22.4 ;\t\t\t# Molar volume of gas at standard condition-[m**3]\n", "T = 20+273. ;\t\t\t# Temperature of BDA-[K]\n", "P = 108.0 ;\t\t\t#Pressure of BDA-[kPa]\n", "Ts = 273. ;\t\t\t# Standard temperature-[K]\n", "Ps = 101.3 ;\t\t\t#Standard pressure-[kPa]\n", "W = 0.93 ;\t\t\t# [kg]\n", "mw_W = 18. ;\t\t\t# mol. wt. of 1kmol water -[kg]\n", "\n", "# Calculations\n", "mol_W = W/mw_W ;\t\t\t# amount of water vapour(W)-[kg mol]\n", "mol_BDA = (V_BDA*Ts*P)/(T*Ps*mol_V) ;\t\t\t# amount of BDA-[kg mol]\n", "p_H2O = (mol_W/(mol_W+mol_BDA))*P ;\t\t\t# Partial pressure of H2O-[kPa]\n", "\n", "# Get vapour pressure for water at 15 C , namely 1.70 kPa\n", "psat_H2O = 1.70 ;\t\t\t#vapour pressure for water at 15 C-[kPa]\n", "rel_H = (p_H2O/psat_H2O) ;\t\t\t#Fractional relative humidity-[]\n", "\n", "# Results\n", "print '(a)Fractional relative humidity of original air was %.3f .'%rel_H\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a)Fractional relative humidity of original air was 0.074 .\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 18.4 Page no.545\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "F = 1000. ;\t\t\t# Volume of entering moist air at 22 C & 101.0 kPa\n", "mol_V = 22.4 ;\t\t\t# Molar volume of gas at standard condition-[m**3]\n", "T_in = 22.+273 ;\t\t\t# Temperature of entering moist air-[K]\n", "P_in = 101.0 ;\t\t\t#Pressure of entering moist air -[kPa]\n", "dp_in = 11.+273 ;\t\t\t# Dew point of entering air-[K]\n", "Ts = 273. ;\t\t\t# Standard temperature-[K]\n", "Ps = 101.3 ;\t\t\t#Standard pressure-[kPa]\n", "T_out = 58.+273 ;\t\t\t# Temperature of exiting moist air-[K]\n", "P_out = 98. ;\t\t\t#Pressure of exiting moist air -[kPa]\n", "\n", "# Additional vapour pressure data\n", "psat_in = 1.31 ;\t\t\t#Vapour pressure of entering moist air -[kPa]\n", "psat_out = 18.14 ;\t\t\t# Vapour pressure of exiting moist air -[kPa]\n", "pBDA_in = P_in-psat_in ;\t\t\t# Pressure of entering dry air - [kPa]\n", "pBDA_out = P_out - psat_out ;\t\t\t# Pressure of exiting dry air - [kPa]\n", "\n", "# Calculations\n", "mol_F = (F*P_in*Ts)/(Ps*T_in*mol_V) ;\t\t\t# Moles of moist air entering-[kg mol]\n", "mol_P = (mol_F*(pBDA_in/P_in))/(pBDA_out/P_out); \t\t\t#BDA balance- [kg mol]\n", "mol_W = mol_P-mol_F ;\t\t\t# Total balance -[kg mol]\n", "mw_BDA = 29. ;\t\t\t# Mol. wt. of dry air\n", "mw_H2O = 18. ;\t\t\t# Mol. wt. of water vapour\n", "m_BDA = (mol_F*pBDA_in/P_in)*mw_BDA ;\t\t\t# Mass of dry air entering-[kg]\n", "m_H2O = (mol_F*psat_in/P_in)*mw_H2O ;\t\t\t# Mass of water vapour entering-[kg]\n", "wa_in = m_BDA+m_H2O ;\t\t\t#Total wet air entering -[kg]\n", "H2O_ad = mol_W*mw_H2O/wa_in ;\t\t\t#Water added to each kg of wet air entering the process-[kg]\n", "\n", "# Results\n", "print 'Water added to each kg of wet air entering the process is %.3f kg.'%H2O_ad\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Water added to each kg of wet air entering the process is 0.132 kg.\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 18.5 Page No.547\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "# Given data\n", "#Basis: F = 29.76 lb mol\n", "F = 29.76 ;\t\t\t# amount of entering moist air -[lb mol]\n", "F_rh = 90/100. ;\t\t\t# Relative humidity\n", "T_in = 100 + 460. ;\t\t\t# Temperature of entering moist air-[Rankine]\n", "P_in = 29.76 ;\t\t\t#Pressure of entering moist air -[in. of Hg]\n", "psat_in = 1.93 ;\t\t\t# Saturation pressure from steam table-[in. of Hg]\n", "T_out = 120 + 460. ;\t\t\t# Temperature of exiting dry air-[Rankine]\n", "P_out = 131.7 ;\t\t\t#Pressure of exiting dry air -[in. of Hg]\n", "psat_out = 3.45 ;\t\t\t# Saturation pressure from steam table-[in. of Hg]\n", "mol_V = 22.4 ;\t\t\t# Molar volume of gas at standard condition-[m**3]\n", "mw_H2O = 18.02 ;\t\t\t# Mol. wt. of water -[lb]\n", "mw_air = 29. ;\t\t\t# Mol. wt. of air -[lb]\n", "p_H2O_in = F_rh*psat_in ;\t\t\t# Partial pressure of water vapour at inlet--[in. of Hg]\n", "p_air_in = P_in-p_H2O_in ;\t\t\t# Partial pressure of air at inlet--[in. of Hg]\n", "\n", "# Calculations\n", "# Assume condensation takes place , therefore output gas P is saturated,\n", "P_rh = 1;\t\t\t# Relative humidity of output gas\n", "p_H2O_out = P_rh*psat_out ;\t\t\t# Partial pressure of water vapour at outlet--[in. of Hg]\n", "p_air_out = P_out-p_H2O_out ;\t\t\t# Partial pressure of air at outlet--[in. of Hg]\n", "\n", "# Get W and P from balance of air and water\n", "P = (p_air_in*F/P_in)/(p_air_out/P_out) ;\t\t\t# From air balance-[ lb mol]\n", "W = (p_H2O_in*F/P_in)-(P*p_H2O_out/P_out);\t\t\t# From water balance -[lb mol]\n", "W_ton = (W*mw_H2O*2000)/(p_air_in*mw_air) ;\t\t\t# Moles of water condenses per ton dry air-[lb mol]\n", "W_m = mw_H2O*W_ton ;\t\t\t# Mass of water condenses per ton dry air-[lb]\n", "\n", "# Results\n", "# Since W is positive our assumption(condensation takes place ) is right .\n", "print '(a) Yes water condense out during compression ,since W(%.3f lb mol) is positive our assumption(condensation takes place ) \\nis right .'%W\n", "print '(b) Amount of water condenses per ton dry air is %.1f lb mol i.e %.0f lb water.'%(W_ton,W_m)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) Yes water condense out during compression ,since W(0.983 lb mol) is positive our assumption(condensation takes place ) \n", "is right .\n", "(b) Amount of water condenses per ton dry air is 43.6 lb mol i.e 786 lb water.\n" ] } ], "prompt_number": 1 } ], "metadata": {} } ] }PK��I~Q�TK+K+DBasic Principles And Calculations In Chemical Engineering/ch19.ipynb{ "metadata": { "name": "", "signature": "sha256:c896c859a24a6b70446a5e83cded412ac42718005bc7d2e546816e8274c18e21" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 19 : The Phase Rule and Vapor Liquid Equilibria" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 19.1 Page No. 563\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "N1 = 1.;\n", "P1 = 1. ;\t\t\t# Number of phases present\n", "C1 = 1. ;\t\t\t#Number of components present\n", "F1 = 2.-P1+C1 ;\t\t\t#Number of degree of freedom\n", "print ' (a) Number of degree of freedom of pure benzene is %i.\\n Therefore %i additional \\\n", "intensive variables must be specified to fix to fix the system.'%(F1,F1)\n", "\n", "\t\t\t# (b)\n", "N2 = 1.;\n", "P2 = 2. ;\t\t\t# Number of phases present\n", "C2 = 1. ;\t\t\t#Number of components present\n", "F2 = 2.-P2+C2 ;\t\t\t#Number of degree of freedom\n", "print '(b) Number of degree of freedom of a mixture of ice and water only is %i.\\\n", " \\nTherefore %i additional intensive variables must be specified to fix the system. '%(F2,F2)\n", "\n", "\t\t\t# (c)\n", "N3 = 2.;\n", "P3 = 2. ;\t\t\t# Number of phases present\n", "C3 = 2. ;\t\t\t#Number of components present\n", "F3 = 2.-P3+C3 ;\t\t\t#Number of degree of freedom\n", "print '(c) Number of degree of freedom of a mixture of liquid benzene,benzene vapour and\\\n", " helium gas is %i. \\nTherefore %i additional intensive variables must be specified to fix the system. '%(F3,F3)\n", "\n", "\t\t\t# (d)\n", "N4 = 2.;\n", "P4 = 2. ;\t\t\t# Number of phases present\n", "C4 = 2. ;\t\t\t#Number of components present\n", "F4 = 2.-P4+C4 ;\t\t\t#Number of degree of freedom\n", "print '(d) Number of degree of freedom of a mixture of salt and water designed to achieve\\\n", " a specific vapour pressure is %i. \\nTherefore %i additional intensive variables must be\\\n", " specified to fix the system. '%(F4,F4)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " (a) Number of degree of freedom of pure benzene is 2.\n", " Therefore 2 additional intensive variables must be specified to fix to fix the system.\n", "(b) Number of degree of freedom of a mixture of ice and water only is 1. \n", "Therefore 1 additional intensive variables must be specified to fix the system. \n", "(c) Number of degree of freedom of a mixture of liquid benzene,benzene vapour and helium gas is 2. \n", "Therefore 2 additional intensive variables must be specified to fix the system. \n", "(d) Number of degree of freedom of a mixture of salt and water designed to achieve a specific vapour pressure is 2. \n", "Therefore 2 additional intensive variables must be specified to fix the system. \n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 19.2 Page No.564\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "N1 = 5.;\n", "P1 = 1.; \t\t\t# Number of phases present,here 1 gas \n", "C1 = 3. ;\t\t\t#Number of independent components present,here 3 because 3 elements(C,O and H)\n", "F1 = 2-P1+C1 ;\t\t\t#Number of degree of freedom\n", "print ' (a) Number of degree of gas composed of CO,CO2,H2,H2O and CH4 is %i. \\n \\\n", "Therefore %i additional intensive variables must be specified to fix the system. '%(F1,F1)\n", "\n", "# (b)\n", "N2 = 4.;\n", "P2 = 4. ;\t\t\t# Number of phases present,here 3 different solid phases and 1 gas phase\n", "C2 = 3. ;\t\t\t#Number of components present, here 3 because 3 elements(Zn,O and C) ,you can also use method explained \n", " #in Appendix L1\n", "F2 = 2.-P2+C2 ;\t\t#Number of degree of freedom\n", "print '(b) Number of degree of freedom of a mixture of ZnO(s), C(s) ,CO(g) and Zn(s) is %i. \\n \\\n", "Therefore %i additional intensive variables must be specified to fix the system. '%(F2,F2)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " (a) Number of degree of gas composed of CO,CO2,H2,H2O and CH4 is 4. \n", " Therefore 4 additional intensive variables must be specified to fix the system. \n", "(b) Number of degree of freedom of a mixture of ZnO(s), C(s) ,CO(g) and Zn(s) is 1. \n", " Therefore 1 additional intensive variables must be specified to fix the system. \n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 19.3 Page No :576" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "from scipy.optimize import fsolve\n", "import math\n", "\n", "# Variables\n", "P_atm = 1. ;\t\t\t#[atm]\n", "P = 760. ;\t\t\t#[mm of Hg]\n", "x_1 = 4./100 ;\t\t\t# Mole fraction of hexane in liquid phase\n", "# Constant A,B and C for Antoine eqn. of n_hexane \n", "A1 = 15.8366;\n", "B1 = 2697.55 ;\n", "C1 = -48.784;\n", "# Constant A,B and C for Antoine eqn. of n_octane\n", "A2 = 15.9798;\n", "B2 = 3127.60 ;\n", "C2 = -63.633;\n", "\n", "# Calculations\n", "# Solve for bubble point temperature by eqn. obtained by using Antoine equation\n", "def f(T):\n", " return math.exp(A1-(B1/(C1+T)))*x_1 + math.exp(A2-(B2/(C2+T)))*(1-x_1) - P\n", "T = fsolve(f,390) ;\t\t\t# Bubble point temperature \n", "\n", "print 'Bubble point temperature is %.1f K'%T\n", "\n", "# Composition of first vapour\n", "# Get vapour pressure of hexane and octane from Perry, it is\n", "vp_1 = 3114. ;\t\t\t# vapour pressure of hexane-[mm of Hg]\n", "vp_2 = 661. ;\t\t\t# vapour pressure of octane-[mm of Hg]\n", "y_1 = vp_1*x_1/P ;\t\t\t# Mole fraction of hexane in vapour phase\n", "y_2 = 1- y_1 ;\t\t\t#Mole fraction of octane in vapour phase\n", "\n", "# Results\n", "print ' Composition of first vapour. '\n", "print 'Component Mole fraction. '\n", "print 'n_hexane %.3f'%y_1\n", "print ' n_octane %.3f'%y_2\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Bubble point temperature is 393.6 K\n", " Composition of first vapour. \n", "Component Mole fraction. \n", "n_hexane 0.164\n", " n_octane 0.836\n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 19.4 Page no. 577" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "# Basis : 100 g solution\n", "F = 100. ;\t\t\t# Amount of solution-[g]\n", "P_atm = 1. ;\t\t\t#[atm]\n", "P = 760. ;\t\t\t# Total pressure -[mm of Hg]\n", "wf_hex = 68.6/100 ;\t\t\t#Weight fraction of hexane in mixture\n", "wf_tol = 31.4/100 ;\t\t\t#Weight fraction of toluene in mixture\n", "mw_hex = 86.17 ;\t\t\t# Mol.wt. of hexane-[g]\n", "mw_tol = 92.13 ;\t\t\t# Mol.wt. of toluene-[g]\n", "\n", "# Calculations\n", "mol_hex = wf_hex *F/mw_hex ;\t\t\t# moles of hexane-[g mol]\n", "mol_tol = wf_tol*F/mw_tol ;\t\t\t # moles of toluene-[g mol]\n", "mol_total = mol_hex + mol_tol ;\t\t\t# Total moles in mixture-[g mol]\n", "molf_hex = mol_hex/mol_total ;\t\t\t# Mole fraction of hexane \n", "molf_tol = mol_tol/mol_total ;\t\t\t# Mole fraction of toluene \n", "# Get vapour pressure of hexane and toluene at 80 deg. C from Perry, it is\n", "vp_hex = 1020. ;\t\t\t# vapour pressure of hexane-[mm of Hg]\n", "vp_tol = 290. ;\t\t\t# vapour pressure of toluene-[mm of Hg]\n", "K_hex = vp_hex/P ;\t\t\t# K-value of hexane\n", "K_tol = vp_tol/P ;\t\t\t# K-value of toluene\n", "rec_K_hex = 1/K_hex ;\t\t\t# Reciprocal of K-value of hexane\n", "rec_K_tol = 1/K_tol ;\t\t\t# Reciprocal of K-value of toluene\n", "\n", "# Let L/F = x, then use eqn. 19.11 to find x(L/F) \n", "def g(x):\n", " return (molf_hex)/(1-x*(1-rec_K_hex)) + (molf_tol)/(1-x*(1-rec_K_tol))-1\n", "\n", "x = fsolve(g,1) ;\t\t\t# L/F value\n", "\n", "# Results\n", "print ' Fraction of liquid(L/F) that will remain at equilibrium after vaporization is %.3f. '%x\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Fraction of liquid(L/F) that will remain at equilibrium after vaporization is 0.744. \n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 19.5 Page no. 578\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "Vo = 3.0 ;\t\t\t# Initial volume of the solution containing the culture and virus-[L]\n", "Vp = 0.1 ;\t\t\t# Volume of the polymer solution added to the vessel -[L]\n", "Kpc = 100. ;\t\t\t# Partition coefficient for virus(cp/cc) between two phases\n", "\n", "# Calculations\n", "Vc = Vo ;\t\t\t# At equilibrium -[L]\n", "cp_by_co = Vo/(Vp+(Vo/Kpc)) ;\t\t\t\n", "Fr_rec = cp_by_co*(Vp/Vo) ;\t\t\n", "\n", "# Results\n", "print ' Fraction of the initial virus in the culture phase that is recovered in the polymer phase is %.2f . '%Fr_rec\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Fraction of the initial virus in the culture phase that is recovered in the polymer phase is 0.77 . \n" ] } ], "prompt_number": 15 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I��%��q�qDBasic Principles And Calculations In Chemical Engineering/ch20.ipynb{ "metadata": { "name": "", "signature": "sha256:160cdac5d7f0b7135dad8dda86f1147a9289b5d9942c1ebb05ca32b461c42f4f" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 20 : Liquid and Gases in Equilibrium with Solids" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 20.1 Page no. 594\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "%matplotlib inline\n", "\n", "from matplotlib import pyplot as plt\n", "\n", "# Variables\n", "p_CO2 = [0,25,50,100,200,400,760] ;\t\t\t# Values of partial pressure of CO2 - [mm Hg]\n", "y = [0,6.69*10**-2,9.24*10**-2,0.108,0.114,0.127,0.137] ;\t\t\t# adsorption of CO2 -[g adorbed / g seives]\n", "\n", "# Results\n", "plt.plot(p_CO2,y);\n", "plt.title('Figure E20.1 The Freundlich and Langmuir iotherms coincide for the adsorption of CO2 on 5A molecular seives');\n", "plt.show()\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Populating the interactive namespace from numpy and matplotlib\n" ] }, { "metadata": {}, "output_type": "display_data", "png": "iVBORw0KGgoAAAANSUhEUgAAAqcAAAEICAYAAABiR12iAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlclPX+Pv5rFAxlR5BtQFRQlhQ1XNBStMU0RZMyqEyL\nU2ZZadavbBNaNCsry05H+5RmFnrOyaNkSGZGWoqcFPUkmmiiLGKKIqDAMMPr98d8uWXYsdGZe7ye\njwcPnbm319xz3++55l7eoxERARERERGRFehg6QKIiIiIiOownBIRERGR1WA4JSIiIiKrwXBKRERE\nRFaD4ZSIiIiIrAbDKRERERFZjcsOp87OzsjLyzNjKdeWDh064I8//rB0GVfM9OnT8fLLLwMAMjIy\nEBAQoAy7/vrrsW3btlbnYal1lJeXhw4dOqC2tvaqL/tqOHHiBJydndGeXuTa+p41JSkpCVOnTr2s\nadXAHG3hwoUL8fDDDzc7PCgoCD/88MNlzfvjjz+Gt7c3XFxccO7cucsts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jiy++gMFgwGeffdbs\nGwUYby54+OGHMXv2bCUcFRYWYvPmzZdV38yZM3Ho0CGkpqbiuuuuMxl255134rfffsO6detQVVWF\n5ORk9O/fH717925yXgaDAVVVVdDr9TAYDKiurjbb3cP1Q8yjjz6KBQsWICcnB4DxaG79C4sv16OP\nPooXXnhBCV+nT59GamoqAKB3796oqqpCWloaampq8Prrr6O6urpN842OjoadnR0++OAD1NTUYN26\ndfjvf//bpmn/9re/4eWXX8aRI0cgIti/fz/Onj3b5LgthbyKigo4OzujS5cuOHToED7++OMWl1t/\nfU+ZMgUffPABCgsLce7cObz55put1q3T6VBVVaX86fV6VFRUoHPnznB1dcXZs2dNLlhv7TXExcXh\nm2++wc6dO6HT6ZCUlPSXjtD3798fa9asgV6vx6+//oqvv/66xYarPctKSEjA66+/jjNnzuDMmTN4\n9dVXlQvmvb29UVJSYvJlsqV5Dx48GM7OznjrrbdQWVkJg8GA3377Tbnrtrlp6z/f0vx//fVX7Nq1\nCzU1NejSpQscHBya/GD19fXF2LFj8dhjj6G0tBQ1NTVKv64JCQlYsWIF9u3bh+rqarzwwgsYOnRo\nk0fYW6rljjvuwMmTJ7FkyRJUV1ejvLwcWVlZjcaLi4vDxo0b8csvv0Cn0+GVV14x+RBqaT9uzbhx\n43D48GGkpKRAr9dj7dq1OHToEMaPH9+m1wAY3+OW2vCG2lNvS/tQ9+7dERUVhfnz56OmpgY///yz\n8gEKGG/q/N///geDwQBnZ2fY29ujY8eO0Gq1GDZsGObNm4fq6mrs378fn332Ge6///4W6969ezf+\n85//QK/X4/3334eDg4MS1lpaBwEBAZe1vKa09n619l699dZbWLlyJd555x0lsO3btw8JCQkAjEeb\ntVot7r77bhw/fhw1NTX47rvv8NRTTyE5OVk5i9jS52hDCQkJeO+995CXl4eKigq88MILiI+PR4cO\nzceN5l5H3VlbEUFWVhY++OADTJw4EYDxZq7Q0FAcPnwY+/btU25m1mq1ypG9v+Luu+/Gt99+i61b\nt6KmpgaLFy+Gg4MDhg0b1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Nt2zbZs2ePSTh99tlnZdGiRSIi8uabb8pzzz0nIiIH\nDv1jr2cAAAUVSURBVByQyMhI0el0cuzYMenVq5cYDIYrXuPJkyclOztbRETKy8uld+/ekpOTY3V1\niohcuHBBRERqampkyJAhsn37dqusU0Rk8eLFcu+998qECRNExPredxGRoKAgKSkpMXnOGut84IEH\n5NNPPxUR43tfWlpqlXWKiBgMBvHx8ZETJ05YXY3Hjh2THj16SFVVlYiITJkyRVauXGl1dRK1FcMp\nqcKOHTtkzJgxyuOFCxfKwoULLViR8QOhfjjt06ePFBcXi4gxGPbp00dEjEco6h/pHTNmjOzcufPq\nFisiEydOlO+//96q67xw4YJERUXJb7/9ZpV15ufny8033yxbt25VjpxaY51BQUFy5swZk+esrc7S\n0lLp0aNHo+etrc463333ndx4441WWWNJSYn07t1bzp49KzU1NTJ+/HjZvHmz1dVJ1Fa8IYpUoS19\nqFraqVOn4O3tDQDw9vbGqVOnAABFRUUmPQ9Yova8vDxkZ2djyJAhVllnbW0t+vfvD29vb4waNQoR\nERFWWeecOXPw9ttvo0OHS02nNdap0Whwyy23ICoqCp988olV1nns2DF4eXnhwQcfxMCBA/Hwww/j\nwoULVldnnTVr1iAhIQGA9a1LDw8PzJ07F4GBgfDz84ObmxtuvfVWq6uTqK0YTkkV1NK3aR2NRtNi\nzVfz9VRUVCAuLg5LliyBs7Nzozqsoc4OHTpg7969KCgowLZt2/Djjz82qsPSdW7cuBHdunXDgAED\nmu3SzBrqBIBffvkF2dnZ2LRpEz766CNs3769UR2WrlOv12PPnj147LHHsGfPHjg6OuLNN99sVIel\n6wQAnU6Hb775BnfffXeTNVi6xqNHj+L9999HXl4eioqKUFFRgdWrVzeqw9J1ErUVwympQlv6ULU0\nb29vFBcXAwBOnjyJbt26AWi6b1d/f/+rUlNNTQ3i4uIwdepUTJo0yWrrrOPq6oo77rgDu3fvtro6\nd+zYgdTUVPTo0QMJCQnYunUrpk6danV1AoCvry8AwMvLC3feeSeysrKsrk6tVgutVotBgwYBAO66\n6y7s2bMHPj4+VlUnAGzatAk33HADvLy8AFjfPvTrr79i2LBh6Nq1K+zs7DB58mTs3LnTKtclUVsw\nnJIqqKEf1NjYWHz++ecAgM8//1wJg7GxsVizZg10Oh2OHTuG3NxcDB48+IrXIyJITExEeHg4Zs+e\nbbV1njlzBqWlpQCAyspKfP/99xgwYIDV1blgwQLk5+fj2LFjWLNmDUaPHo0vvvjC6uq8ePEiysvL\nAQAXLlzA5s2b0bdvX6ur08fHBwEBATh8+DAAYMuWLYiIiMCECROsqk4ASElJUU7p19ViTTWGhoYi\nMzMTlZWVEBFs2bIF4eHhVrkuidrEwte8ErVZWlqa9O7dW3r16iULFiywaC3x8fHi6+sr9vb2otVq\n5bPPPpOSkhK5+eabm+y25Y033pBevXpJnz59JD09/arUuH37dtFoNBIZGal0hbNp0yarq3P//v0y\nYMAAiYyMlL59+8pbb70lImJ1ddaXkZGh3K1vbXX+8ccfEhkZKZGRkRIREaHsK9ZWp4jI3r17JSoq\nSvr16yd33nmnlJaWWl2dFRUV0rVrVykrK1Oes7YaRUQWLVqkdCX1wAMPiE6ns8o6idpCI8LfgyQi\nIiIi68DT+kRERERkNRhOiYiIiMhqMJwSERERkdVgOCUiIiIiq8FwSkRERERWg+GUiIiIiKzG/w8p\nc1U4iFUHtQAAAABJRU5ErkJggg==\n", "text": [ "" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 20.2 page no. 596\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "G = 1000.0 ;\t\t\t# Volume of solution - [L]\n", "S_ad = 1.56 ;\t\t\t# amount of Steptomycin adsorbed per gram resin-[g strep./g resin]\n", "cn_S = 6. ;\t\t\t# Concentration of streptomycin solution-[g/L]\n", "\n", "# Calculations\n", "# Assume equilibrium occurs so that total(max) amount of streptomycin is adsorbed \n", "max_S = cn_S*G ;\t\t\t# Maximum streptomycin adsorbed-[g]\n", "#Use streptomycin balance to get amount of resin required \n", "R = max_S/S_ad ;\t\t\t#Amount of resin required to adsorb required amount of streptomycin\n", "\n", "# Results\n", "print 'Amount of resin required to adsorb required amount of streptomycin is %.0f g . '%R\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Amount of resin required to adsorb required amount of streptomycin is 3846 g . \n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 20.3 page no. 596\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "G = 1000. ;\t\t\t# Volume of solution - [L]\n", "x = [19.2,17.2,12.6,8.6,3.4,1.4] ;\t\t\t# concentration of solute- [g/L] \n", "ac = [0,0.01,0.04,0.08,0.20,0.40] ;\t\t\t# Activated charcoal added-[g/1000g sol] \n", "# Assume all concentration can be treated as g solute/1000 g sol.\n", "\n", "# Calculations\n", "y2 = (x-x)/ac ;\t\t\t# -[ g solute/g carbon]\n", "y3 = (x-x)/ac ;\t\t\t# -[ g solute/g carbon]\n", "y4 = (x-x)/ac ;\t\t\t# -[ g solute/g carbon]\n", "y5 = (x-x)/ac ;\t\t\t# -[ g solute/g carbon]\n", "y6 = (x-x)/ac ;\t\t\t# -[ g solute/g carbon]\n", "\n", "# Use polymath to get Freundlich isotherm to bo y= 37.919*x**(0.583)\n", "y = 37.919*x**(0.583) ;\t\t\t#From Freundlich isotherm\n", "A_by_G = (x-x)/y ;\t\t\t#Minimum mss of activated carbon required- [g carbon/1000 g sol.]\n", "\n", "# Results\n", "print 'Minimum mass of activated carbon required is %.2f g carbon/1000 g sol. '%A_by_G\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Minimum mass of activated carbon required is 0.39 g carbon/1000 g sol. \n" ] } ], "prompt_number": 3 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I��y.��DBasic Principles And Calculations In Chemical Engineering/ch21.ipynb{ "metadata": { "name": "", "signature": "sha256:63761cd2f20f542c8cf7d5599bfa09993cda87c6763136710915fa76185904f1" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 21 : Energy Terminology Concepts and Units" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 21.1 Page no : 616" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "from scipy.integrate import quad\n", "\n", "# Variables\n", "V1 = 0.1 ;\t\t\t# Volume of gas initially -[cubic metres]\n", "V2 = 0.2 ;\t\t\t# Volume of gas finally -[cubic metres]\n", "T1 = 300 ;\t\t\t# Temperature of gas initially -[K]\n", "P1 = 200 ;\t\t\t# Pressure of gas finally -[kPa]\n", "R = 8.314 ;\t\t\t# Universal gas constant \n", "n = (P1*V1)/(T1*R) ;\t\t\t# Moles of gas taken-[kg mol]\n", "#You are asked to calculate work by eqn. 21.1 , but you do not know the F(force) exerted by gas , so write F = P.A, multiply divide A and eqn 21.1 reduces to W= integate(P.dv)\n", "\n", "# Calculations and Results\n", "# Isobaric process see fig E21.1b to see the path followed\n", "def f(V):\n", " return -(P1)\n", "W= quad(f,V1,V2) ;\t\t\t# Work done by gas on piston -[kJ]\n", "print ' (a)Work done by gas on piston for isobaric process is %.0f kJ . ',W\n", "\n", "def f1(V):\n", " return -(T1*R*n/V)\n", "W= quad(f1,V1,V2) ;\t\t\t# Work done by gas on piston -[kJ]\n", "print '(b)Work done by gas on piston for isothermal process is %.2f kJ . ',W\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " (a)Work done by gas on piston for isobaric process is %.0f kJ . -20.0\n", "(b)Work done by gas on piston for isothermal process is %.2f kJ . -13.8629436112\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 21.2 page no. 624\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "id_ = 3. ;\t\t\t# Internal diameter of tube-[cm]\n", "Vf = 0.001 ;\t\t\t# Volume flow rate of water in tube-[cubic meter/s]\n", "rho = 1000. ;\t\t\t# Assumed density of water-[kg/cubic meter] \n", "\n", "# Calculations\n", "rad = id_/2. ;\t\t\t# Radius of tube -[ cm]\n", "a = 3.14*rad**2 ;\t\t\t# Area of flow of tube -[squqre centimeter]\n", "v = Vf*(100)**2/a ;\t\t\t# Velocity of water in tube - [m/s]\n", "KE = v**2/2. ;\t\t\t# Specific(mass=1kg) kinetic energy of water in tube -[J/kg]\n", "\n", "# Results\n", "print 'Specific kinetic energy of water in tube is %.2f J/kg . '%KE\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Specific kinetic energy of water in tube is 1.00 J/kg . \n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 21.3 page no. 626\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "# Let water level in first reservoir be the reference plane\n", "h = 40. ;\t\t\t# Difference of water-[ft]\n", "g = 32.2 ;\t\t\t# acceleration due to gravity-[ft/square second]\n", "\n", "# Calculations\n", "PE=g*h/(32.2*778.2) ;\t\t\t#\t\t\t# Specific(mass=1kg) potential energy of water -[Btu/lbm]\n", "\n", "# Results\n", "print 'Specific potential energy of water is %.4f Btu/lbm . '%PE\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Specific potential energy of water is 0.0514 Btu/lbm . \n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 21.4 page no : 629" ] }, { "cell_type": "code", "collapsed": true, "input": [ "\n", "\n", "# Variables\n", "#Constant volume process \n", "mol_air = 10. ;\t\t\t# Moles of air-[kg mol]\n", "T1 = 60.+273 ;\t\t\t# Initial temperature of air-[K]\n", "T2 = 30.+273 ;\t\t\t# final temperature of air-[K]\n", "# Additional data needed\n", "Cv = 2.1*10.**4 ; \t\t\t# Specific heat capacity of air at constant volume-[J/(kg mol*C)]\n", "\n", "# Calculations\n", "def f(T):\n", " return mol_air*Cv\n", "del_U = quad(f,T1,T2) ;\t\t\t#Change in internal energy-[J]\n", "\n", "# Results\n", "print 'Change in internal energy is %.1e J . '%del_U\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Change in internal energy is -6.3e+06 J . \n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 21.7 page no : 633" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "#Constant pressure process \n", "mol_air = 10. ;\t\t\t# Moles of air-[kg mol]\n", "T1 = 60+273 ;\t\t\t# Initial temperature of air-[K]\n", "T2 = 30+273 ;\t\t\t# final temperature of air-[K]\n", "\n", "# Calculations\n", "# Additional data needed\n", "Cp = 2.9*10**4 ;\t\t\t# Specific heat capacity of air at constant pressure-[J/(kg mol*C)]\n", "# Use eqn. 21.11 for del_H\n", "def f(T):\n", " return mol_air*Cp\n", "\n", "del_H = quad(f,T1,T2) ;\t\t\t#Change in enthalpy-[J]\n", "print 'Change in enthalpy is %.1e J . '%del_H\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Change in enthalpy is -8.7e+06 J . \n" ] } ], "prompt_number": 5 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I���|(|(DBasic Principles And Calculations In Chemical Engineering/ch22.ipynb{ "metadata": { "name": "", "signature": "sha256:378027dede13493be733241ad48420c91ebbcd1218fa032fc3c46fa099a45a58" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 22 : Introduction to Energy Balances for Process without Reaction" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 22.1 page no. 651\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "#Assume that properties of water can be used to substitute properties of solution\n", "# Given\n", "V = 1.673 ;\t\t\t# Volume of closed vessel-[cubic metre]\n", "m = 1. ;\t\t\t# mass of saturated liquid vaporized-[kg]\n", "Pi = 1. ;\t\t\t# Initial pressure -[atm]\n", "Ti = 10. ;\t\t\t# Initial temperature -[degree C]\n", "Pf = 1. ;\t\t\t# final pressure -[atm]\n", "Tf = 100. ;\t\t\t# final temperature -[degree C]\n", "\n", "# Use steam table to obtain additional information at given condition\n", "Ui = 35. ;\t\t\t# Initial enthalpy-[kJ/kg]\n", "Uf = 2506.0 ;\t\t\t# Final enthalpy -[kJ/kg]\n", "\n", "# Calculations\n", "# Use eqn. 22.2 after modifiying it using given conditions(W = 0,del_KE = 0 and del_PE = 0 )\n", "Q = m*(Uf - Ui) ;\t\t\t# Heat transferred to the vessel - [kJ]\n", "\n", "# Results\n", "print 'Heat transferred to the vessel is %.1f kJ . '%Q\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Heat transferred to the vessel is 2471.0 kJ . \n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 22.2 page no. 652\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "# Given\n", "T1 = 80. ;\t\t\t# Initial temperature -[degree F]\n", "T1 = 40. ;\t\t\t# final temperature -[degree F]\n", "\n", "# Additional data obtained from steam table at given temperatures and corresponding vapour pressures\n", "p1 = 0.5067 ;\t\t\t# Initial saturation pressure-[psia]\n", "p2 = 0.1217 ;\t\t\t# Final saturation pressure-[psia]\n", "V1 = 0.01607 ;\t\t\t# Initial specific volume - [cubic feet/lb]\n", "V2 = 0.01602 ;\t\t\t# Final specific volume - [cubic feet/lb]\n", "H1 = 48.02 ;\t\t\t#Initial specific enthalpy -[Btu/lb]\n", "H2 = 8.05 ;\t\t\t# Final specific enthalpy -[Btu/lb]\n", "\n", "# Calculations\n", "del_P = p2 - p1 ;\t\t\t# Change in pressure -[psia]\n", "del_V = V2 - V1 ;\t\t\t# Change in specific volume -[cubic feet/lb]\n", "del_H = H2 - H1 ;\t\t\t# Change in specific enthalpy -[Btu/lb]\n", "del_pV = p2*144*V2/778. - p1*144*V1/778. ;\t\t\t# Change in pv-[Btu]\n", "del_U = del_H - del_pV ;\t\t\t# Change in specific internal energy - [Btu/lb]\n", "del_E = del_U ;\t\t\t# Change in specific total energy(since KE=0,PE=0 and W=0) -[Btu/lb]\n", "\n", "# Results\n", "print 'Change in pressure is %.3f psia . '%del_P\n", "print 'Change in specific volume is %.5f cubic feet/lb (negligible value) . '%del_V\n", "print 'Change in specific enthalpy is %.2f Btu/lb . '%del_H\n", "print 'Change in specific internal energy is %.2f Btu/lb . '%del_U\n", "print 'Change in specific total energy is %.2f Btu/lb . '%del_E\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Change in pressure is -0.385 psia . \n", "Change in specific volume is -0.00005 cubic feet/lb (negligible value) . \n", "Change in specific enthalpy is -39.97 Btu/lb . \n", "Change in specific internal energy is -39.97 Btu/lb . \n", "Change in specific total energy is -39.97 Btu/lb . \n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 22.3 page no. 662\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "#Lets take tank to be system\n", "# Given\n", "T = 600. ; \t\t\t# Temperature of steam -[K]\n", "P = 1000. ;\t\t\t# Pressure of steam -[kPa]\n", "\n", "# Calculations\n", "# Additional data for steam obtained from CD database at T and P\n", "U = 2837.73 ;\t\t\t# Specific internal energy-[kJ/kg]\n", "H = 3109.44 ;\t\t\t# Specific enthalpy -[kJ/kg]\n", "V = 0.271 ;\t\t\t# Specific volume -[cubic metre/kg]\n", "# By the reduced equation \n", "Ut2 = H ;\t\t\t# Internal energy at final temperature-[kJ/kg]\n", "\n", "# Results\n", "print 'The specific internal energy at final temperature is %.2f kJ/kg. Now use two properties\\\n", "of the steam (P = %i kPa and Ut2 = %.2f kJ/kg) to find final temperature (T) from steam table. \\\n", "From steam table we get T = 764 K.'%(Ut2,P,Ut2)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The specific internal energy at final temperature is 3109.44 kJ/kg. Now use two propertiesof the steam (P = 1000 kPa and Ut2 = 3109.44 kJ/kg) to find final temperature (T) from steam table. From steam table we get T = 764 K.\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 22.4 page no. 669\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "# Take milk plus water in tank to be system\n", "# Given\n", "T1_water = 70. ;\t\t\t# Temperature of entering water -[degree C]\n", "T2_water = 35. ;\t\t\t# Temperature of exiting water -[degree C]\n", "T1_milk = 15. ;\t\t\t#Temperature of entering milk -[degree C]\n", "T2_milk = 25. ;\t\t\t#Temperature of exiting milk -[degree C]\n", "\n", "# Get additional data from steam table for water and milk,assuming milk to have same properties as that of water.\n", "H_15 = 62.01 ;\t\t\t#Change in specific internal energy-[kJ/kg]\n", "H_25 = 103.86 ;\t\t\t#Change in specific internal energy-[kJ/kg]\n", "H_35 = 146.69 ;\t\t\t#Change in specific internal energy-[kJ/kg]\n", "H_70 = 293.10 ;\t\t\t#Change in specific internal energy-[kJ/kg]\n", "\n", "# Assumptions to simplify Equation 22.8 are:\n", "print 'Assumptions to simplify Equation 22.8 are:'\n", "print '1. Change in KE and PE of system = 0.'\n", "print '2. Q = 0 ,because of way we picked the system,it is is well insulated.'\n", "print '3. W = 0,work done by or on the system.'\n", "\n", "# Calculations\n", "#Basis m_milk = 1 kg/min , to directly get the answer .\n", "m_milk = 1 ;\t\t\t# Mass flow rate of milk-[kg/min]\n", "# By applying above assumtions eqn. 22.8 reduces to del_H = 0 .Using it get m_water-\n", "m_water = (m_milk*(H_15 - H_25))/(H_35 - H_70) ; \t\t\t# Mass flow rate of water-[kg/min]\n", "m_ratio = m_water/m_milk ;\t\t\t# Mass flow rate of water per kg/min of milk-[kg/min]\n", "\n", "# Results\n", "print 'Mass flow rate of water per kg/min of milk is %.2f (kg water/min )/(kg milk/min).'%m_ratio\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Assumptions to simplify Equation 22.8 are:\n", "1. Change in KE and PE of system = 0.\n", "2. Q = 0 ,because of way we picked the system,it is is well insulated.\n", "3. W = 0,work done by or on the system.\n", "Mass flow rate of water per kg/min of milk is 0.29 (kg water/min )/(kg milk/min).\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 22.5 page no. 670\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "# Take pipe between initial and final level of water\n", "# Given\n", "h_in = -20. ;\t\t\t# Depth of water below ground-[ft]\n", "h_out = 5. ;\t\t\t# Height of water level above ground-[ft]\n", "h = h_out - h_in ;\t\t\t# Total height to which water is pumped-[ft]\n", "V = 0.50 ;\t\t\t# Volume flow rate of water - [cubic feet/s]\n", "ef = 100.; \t\t\t# Efficiency of pump - [%] \n", "g = 32.2; \t\t\t# Acceleration due to gravity -[ft/square second] \n", "gc = 32.2 ;\t\t\t#[(ft*lbm)/(second square*lbf)]\n", "\n", "M = V * 62.4 ;\t\t\t# mass flow rate - [lbm/s]\n", "PE_in = 0 ;\t\t\t# Treating initial water level to be reference level\n", "\n", "# Calculations\n", "PE_out = (M*g*h*1.055)/(gc*778.2) ;\t\t\t# PE of discharged water -[lbm*(square feet/square second)]\n", "W = PE_out - PE_in ;\t\t\t#Work done on system = power delivered by pump, (since we are using mass flow rate and pump efficiency is 100 % , so W = Power) -[kW]\n", "\n", "# Results\n", "print 'The electric power required by the pump is %.2f kW. '%W\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The electric power required by the pump is 1.06 kW. \n" ] } ], "prompt_number": 5 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��Ij�wl-h-hDBasic Principles And Calculations In Chemical Engineering/ch23.ipynb{ "metadata": { "name": "", "signature": "sha256:85497d817768e6e1d81546cc4adcb855eed2a97589497e4f8a3f22d0bc4a6c3d" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "\n", "Chapter 23 : Calculation of Enthalpy Changes" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 23.1 Page no. 686\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "%matplotlib inline\n", "from matplotlib.pyplot import *\n", "\n", "# Variables\n", "# Given\n", "x_Tl = [90,92,97,100] ;\t\t\t# Temperature of saturated liquid- [degree C]\n", "x_Tg = [100,102,107,110] ;\t\t\t# Temperature of saturated vapour- [degree C]\n", "y_Hl = [376.9,385.3,406.3,418.6] ;\t\t\t# Enthalpy change of saturated liquid -[kJ/kg]\n", "y_Hg = [2256.44,2251.2,2237.9,2229.86] ;\t\t\t# Enthalpy change of saturated vapour -[kJ/kg]\n", "\n", "# Results\n", "plot(x_Tl,y_Hl,x_Tg,y_Hg);\n", "show()\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Populating the interactive namespace from numpy and matplotlib\n" ] }, { "metadata": {}, "output_type": "display_data", "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAD9CAYAAABazssqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFTxJREFUeJzt3V9MW+fBx/HfCbjKXiVRclFMZkdyF0yJgwN0lZOLZXOV\nQBOkMapMqGRrSEOmCTQtVaOp20U7mLRCL7aJpkPqBZ1QJhUytU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mV5Fvu3PTQ0pJKSEgWDQX300UeZGuKG\nt5p9M2MRKCgo0CuvvKKysjIdPXpUxcXFysrKmjWPZVl8bmAZFtqW9fX1Ghoa0uXLl7Vz506dPXs2\n00PdsJbaF9lPV+b+7fnlL39Zw8PDGhwc1C9/+UsdP35ck5OTGR7ho2OpfTOj/4voqVOn9Ne//lWX\nLl3Sjh07lJ+fL6fTqdHRUUlSIpFQTk5OJoe4Ydy/Lbdv364nn3xSjz/+ePIf2+nTpzllsUIL7YsP\nfuYlFovJ5XJlZIwbyULb87HHHkue7njqqae0e/duRaPRjI1zI1vNvpnRCPzzn/+UJH3++ed6//33\ndfz4cVVUVKi9vV2S1N7ersrKykwOccO4f1t2dXXp+PHjSiQSyfu7urpmXV2ApS20L1ZUVKijo0PT\n09MaGhpSNBpVIBDI5FA3hIW2540bNzQzMyNJ+sc//qFoNKqvfOUrGRvnRnP/z/1WtW8+pB9oL8vB\ngwdtn89nFxUV2X/84x9t27btf//73/ahQ4dsr9drl5aW2v/5z38yOcQNY75t+cILL9h+v9/et2+f\n/a1vfcseHR3N8CjXr+eff97euXOn7XA4bLfbbb/zzjuL7os///nP7d27d9tPPvmkHQqFMjjy9Wkl\n2/O9996z9+7daxcXF9tPPfWU/fvf/z7Do19fHtyWbW1tdldXl+12u+3NmzfbTqfTPnLkSHL+le6b\nlm1z+QgAmIrfLAYABiMCAGAwIgAABiMCAGAwIgAABiMCAGCw/wMDiUOF/Sr3yAAAAABJRU5ErkJg\ngg==\n", "text": [ "" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 23.2 page no. 687\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# Variables\n", "# Basis : 1 g mol\n", "R = 8.314 * 10**-3 ;\t\t\t# Ideal gas constant -[kJ/(g mol * K)]\n", "Hv = 30.20 ;\t\t\t# Experimental value of heat of vaporization of acetone -[kJ/g] \n", "\n", "# additional needed data for acetone from Appendix D\n", "T = 329.2 ;\t\t\t# Normal boiling point of acetone - [K]\n", "Tc = 508.0 ;\t\t\t# Critical temperature of acetone - [K]\n", "Pc = 47.0 ;\t\t\t# Critical presure of acetone -[atm]\n", "\n", "# Calculations and Results\n", "Tbc = T/Tc ;\t\t\t# variable required in etimation equations\n", "lnPc = math.log(Pc) ;\t\t\t# variable required in etimation equations\n", "\n", "B = 2940.46 ;\n", "C = -35.93 ;\n", "\n", "del_Hv1 = (R*B*T**2)/((C+T)**2) ;\t\t\t#Heat of vapourization -[kJ/g]\n", "d1 = (abs(Hv - del_Hv1)*100)/Hv ;\t\t\t# differece of experimental and calculated value -[%]\n", "print '(a) Heat of vapourization of acetone is %.2f kJ/g mol. And differece of experimental and calculated value is %.1f %% . '%(del_Hv1,d1);\n", "\n", "del_Hv2 = R*T*((3.978*Tbc - 3.938 +1.555*lnPc)/(1.07 - Tbc)) ;\t\t\t#Heat of vapourization -[kJ/g]\n", "d2 = (abs(Hv - del_Hv2)*100)/Hv ;\t\t\t# differece of experimental and calculated value -[%]\n", "print ' (b) Heat of vapourization of acetone is %.2f kJ/g mol. And differece of experimental and calculated value is %.1f %% . '%(del_Hv2,d2);\n", "\n", "\n", "del_Hv3 = 1.093*R*Tc*((Tbc*(lnPc-1))/(0.93-Tbc)) ;\t\t\t#Heat of vapourization -[kJ/g]\n", "d3 = (abs(Hv - del_Hv3)*100)/Hv ;\t\t\t# differece of experimental and calculated value -[%]\n", "print ' (c) Heat of vapourization of acetone is %.2f kJ/g mol. And differece of experimental and calculated value is %.1f %% . '%(del_Hv3,d3);\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) Heat of vapourization of acetone is 30.80 kJ/g mol. And differece of experimental and calculated value is 2.0 % . \n", " (b) Heat of vapourization of acetone is 30.01 kJ/g mol. And differece of experimental and calculated value is 0.6 % . \n", " (c) Heat of vapourization of acetone is 30.24 kJ/g mol. And differece of experimental and calculated value is 0.1 % . \n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "\n", "Example 23.3 Page no. 693\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "c = 2.675*10**4 #*.4536)/(1055*1.8) ;\n", "d = 42.27#*.4536)/(1055*1.8) ;\n", "e = 1.425*10**-2#*.4536)/(1055*1.8) ;\n", "# Calculations\n", "#Now convert Tk (Temperature in K) to TF (temperature in F) to get answer of form x + yT - zT**2,where\n", "x = c + d*460/1.8 - e*((460/1.8)**2) ;\n", "y = d/1.8;\n", "z = e/(1.8*1.8) ;\n", "\n", "# Results\n", "print 'The required answer is %.2e + (%.2e)T - (%.3e) T**2 Btu/(lb mol*F) , where T is in degree F . '%(x,y,z)\n", "\n", "print \"Note answer in textbook seems wrong by order of 10^-3\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The required answer is 3.66e+04 + (2.35e+01)T - (4.398e-03) T**2 Btu/(lb mol*F) , where T is in degree F . \n", "Note answer in textbook seems wrong by order of 10^-3\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 23.4 page no. 694\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "# Take all 18 experimenta data in an array Cp\n", "Cpi = [39.87,39.85,39.90,45.16,45.23,45.17,50.72,51.03,50.90,56.85,56.80,57.02,63.01,63.09,63.14,69.52,69.68,69.63] ;\t\t\t# Array of Cpi(Heat capacity) values\n", "# Take corresponding temperatures in array T\n", "Ti = [300,300,300,400,400,400,500,500,500,600,600,600,700,700,700,800,800,800] ;\t\t\t# array of Ti\n", "Ti_sqr = [300**2,300**2,300**2,400**2,400**2,400**2,500**2,500**2,500**2,600**2,600**2,600**2,700**2,700**2,700**2,800**2,800**2,800**2] ;\t\t\t# array of Ti**2\n", "Ti_cub = [300**3,300**3,300**3,400**3,400**3,400**3,500**3,500**3,500**3,600**3,600**3,600**3,700**3,700**3,700**3,800**3,800**3,800**3];\t\t\t# array of Ti**3\n", "Ti_qd = [300**4,300**4,300**4,400**4,400**4,400**4,500**4,500**4,500**4,600**4,600**4,600**4,700**4,700**4,700**4,800**4,800**4,800**4];\t\t\t# array of Ti**4\n", "Cpi_Ti = [39.87*300,39.85*300,39.90*300,45.16*400,45.23*400,45.17*400,50.72*500,51.03*500,50.90*500,56.85*600,56.80*600,57.02*600,63.01*700,63.09*700,63.14*700,69.52*800,69.68*800,69.63*800] ;\t\t\t# Array of Cpi(Heat capacity)*Ti values\n", "Cpi_Ti_sqr = [39.87*300**2,39.85*300**2,39.90*300**2,45.16*400**2,45.23*400**2,45.17*400**2,50.72*500**2,51.03*500**2,50.90*500**2,56.85*600**2,56.80*600**2,57.02*600**2,63.01*700**2,63.09*700**2,63.14*700**2,69.52*800**2,69.68*800**2,69.63*800**2] ;\t\t\t# Array of Cpi(Heat capacity)*Ti**2 values\n", "\n", "n = 18. ;\t\t\t# Number of data\n", "# Calculations\n", "\n", "from numpy import matrix\n", "# Solve equations (a),(b) & (c) simultaneously using matrix\n", "a = matrix([[n,sum(Ti),sum(Ti_sqr)],[sum(Ti),sum(Ti_sqr),sum(Ti_cub)],[sum(Ti_sqr),sum(Ti_cub),sum(Ti_qd)]]) ;\t\t\t# Matrix of coefficients of unknown\n", "b = matrix([[sum(Cpi)],[sum(Cpi_Ti)],[sum(Cpi_Ti_sqr)]]) ;\t\t\t# Matrix of constants\n", "x = (a)**-1 * b ;\t\t\t# Matrix of solutions a = x(1), b = x(2) , c = x(3) \n", "\n", "# Results\n", "print 'The solution is Cp = %.2f + %.3e T + %.2e T**2 .Therefore coefficients are as follows :'%(x,x,x)\n", "print ' a = %.2f. b = %.3e . c = %.2e .'%(x,x,x)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The solution is Cp = 25.44 + 4.371e-02 T + 1.44e-05 T**2 .Therefore coefficients are as follows :\n", " a = 25.44. b = 4.371e-02 . c = 1.44e-05 .\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 23.5 page no : 695" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "from scipy.integrate import quad\n", "# Variables\n", "# Basis : 1 g mol of gas\n", "#Given\n", "T1 = 550. ;\t\t\t# Initial temperature - [degree F]\n", "T2 = 200. ;\t\t\t# Final temperature - [degree F]\n", "CO2 = 9.2/100 ;\t\t\t# Mole fraction \n", "CO = 1.5/100 ;\t\t\t# Mole fraction \n", "O2 = 7.3/100 ;\t\t\t# Mole fraction \n", "N2 = 82.0/100 ;\t\t\t#Mole fraction \n", "\n", "# Calculations\n", "# Additional data needed :\n", "a_N2 = 6.895;\t\t\t# constant\n", "b_N2 = 0.7624*10**-3;\t\t\t# coefficient of T\n", "c_N2 = -0.7009*10**-7;\t\t\t# coefficient of square T\n", "a_O2 = 7.104 ;\t\t\t# constant\n", "b_O2 = (0.7851*10**-3);\t\t\t# coefficient of T\n", "c_O2 = (-0.5528*10**-7); \t\t\t# coefficient of square T\n", "a_CO2 = 8.448;\t\t\t# constant\n", "b_CO2 = 5.757*10**-3;\t\t\t# coefficient of T\n", "c_CO2 = -21.59*10**-7;\t\t\t# coefficient of square T\n", "d_CO2 = 3.059*10**-10;\t\t\t# coefficient of cubic T\n", "a_CO = 6.865 ;\t\t\t# constant\n", "b_CO = 0.8024*10**-3;\t\t\t# coefficient of T\n", "c_CO = -0.7367*10**-7; \t\t\t# coefficient of square T\n", "\n", "# New coefficients after multiplying mole fraction of each component\n", "a1_N2 = 6.895*N2 ;\t\t\t# constant\n", "b1_N2 = N2*0.7624*10**-3; \t\t\t# coefficient of T\n", "c1_N2 = (-0.7009*10**-7)*N2; \t\t\t# coefficient of square T \n", "a1_O2 = 7.104*O2 ;\t\t\t# constant\n", "b1_O2 = (0.7851*10**-3)*O2;\t\t\t# coefficient of T\n", "c1_O2 = (-0.5528*10**-7)*O2; \t\t\t# coefficient of square T\n", "a1_CO2 = 8.448*CO2;\t\t\t# constant\n", "b1_CO2 = (5.757*10**-3)*CO2;\t\t\t# coefficient of T\n", "c1_CO2 = (-21.59*10**-7)*CO2; \t\t\t# coefficient of square T\n", "d1_CO2 = (3.059*10**-10)*CO2; \t\t\t# coefficient of cubic T\n", "a1_CO = 6.865*CO;\t\t\t# constant\n", "b1_CO = (0.8024*10**-3)*CO;\t\t\t# coefficient of T\n", "c1_CO = (-0.7367*10**-7)*CO; \t\t\t# coefficient of square T\n", "\n", "# Get net coefficients of T , square T and cubic T by adding them\n", "a_net = a1_N2+a1_CO2+a1_CO+a1_O2; \t\t\t#Net constant\n", "b_net = b1_N2+b1_CO2+b1_CO+b1_O2; \t\t\t#Net coefficient of T\n", "c_net = c1_N2+c1_CO2+c1_CO+c1_O2 ;\t\t\t#Net coefficient of square T\n", "d_net = d1_CO2;\t\t\t#Net coefficient of cubic T\n", "\n", "def f(T):\n", " return (a_net )+( b_net*T) + (c_net*(T**2)) + (d_net*(T**3))\n", " \n", "del_H = quad(f,T1,T2) \t\t\t# Change in enthalpy of gas over given range-[Btu/lb mol gas]\n", "\n", "# Results\n", "print ' Change in enthalpy of gas over given range is %.0f Btu/lb mol gas . '%del_H\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Change in enthalpy of gas over given range is -2616 Btu/lb mol gas . \n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 23.6 page no. 700 \n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "\n", "# Solution \n", "#Given\n", "N2 = 1. ;\t\t\t# Moles of N2 - [kg mol]\n", "P = 100. ;\t\t\t# Pressure of gas - [kPa] \n", "T1 = 18. ;\t\t\t# Initial temperature - [degree C]\n", "T2 = 1100. ;\t\t\t# Final temperature - [degree C]\n", "\n", "# Calculations\n", "# In the book it is mentioned to use tables in Appendix D6 to calculate enthalpy change, we get \n", "H_T1 = 0.524;\t\t\t# Initial enthalpy -[kJ/kg mol]\n", "H_T2 = 34.715 ;\t\t\t# Final enthalpy - [kJ/kg mol]\n", "del_H = H_T2 - H_T1 ;\t\t\t# Change in enthalpy - [kJ/kg]\n", "\n", "# Results\n", "print ' Change in enthalpy of N2 over given range is %.3f kJ/kg mol N2 . '%del_H\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Change in enthalpy of N2 over given range is 34.191 kJ/kg mol N2 . \n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 23.7 page no. 701\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "#Given\n", "T1 = 640. ;\t\t\t# Initial temperature -[degree F]\n", "T2 = 480. ;\t\t\t# Final temperature -[degree F]\n", "P1 = 92. ;\t\t\t# Initial pressure -[psia]\n", "P2 = 52. ;\t\t\t# Final pressure - [psia]\n", "\n", "\n", "#From steam table\n", "#At 90 psia\n", "H1_600 = 1328.7 ;\t\t\t#H at 90 psia and 600 F-[Btu/lb]\n", "H1_700 = 1378.1 ;\t\t\t#H at 90 psia and 700 F-[Btu/lb]\n", "H2_600 = 1328.4 ;\t\t\t#H at 95 psia and 600 F-[Btu/lb]\n", "H2_700 = 1377.8 ;\t\t\t#H at 95 psia and 700 F-[Btu/lb]\n", "\n", "# Calculations\n", "H3_600 = H1_600+ ((H2_600-H1_600)/(95.-90))*(92-90);\t\t\t#H at 92 psia and 600 F-[Btu/lb]\n", "H3_700 = H1_700+ ((H2_700-H1_700)/(95.-90))*(92-90);\t\t\t#H at 92 psia and 700 F-[Btu/lb]\n", "H3_640 = H3_600+((H3_700-H3_600)/(700.-600))*(640-600);\t\t\t#H at 92 psia and 640 F-[Btu/lb]\n", "\n", "H1_450 = 1258.7 ;\t\t\t#H at 50 psia and 450 F-[Btu/lb]\n", "H1_500 = 1282.6 ;\t\t\t#H at 50 psia and 500 F-[Btu/lb]\n", "H2_450 = 1258.2 ;\t\t\t#H at 55 psia and 450 F-[Btu/lb]\n", "H2_500 = 1282.2 ;\t\t\t#H at 55 psia and 500 F-[Btu/lb]\n", "H3_450 = H1_450+ ((H2_450-H1_450)/(55.-50))*(52-50) ;\t\t\t#H at 52 psia and 450 F-[Btu/lb]\n", "H3_500 = H1_500+ ((H2_500-H1_500)/(55.-50))*(52-50);\t\t\t#H at 52 psia and 500 F-[Btu/lb]\n", "H3_480 = H3_450+((H3_500-H3_450)/(500.-450))*(480-450);\t\t\t# H at 52 psia and 480 F-[Btu/lb]\n", "del_H = H3_480 - H3_640;\t\t\t# Change in enthalpy - [Btu/lb]\n", "\n", "# Results\n", "print 'Change in enthalpy is %.1f Btu/lb .'%del_H\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Change in enthalpy is -75.5 Btu/lb .\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 23.8 page no. 702\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "\n", "# Solution \n", "\n", "# Variables\n", "W = 4. ;\t\t\t# Mass of water -[kg]\n", "Ti= 27.+273 ;\t\t\t# Initial temperature -[K]\n", "Pi = 200. ;\t\t\t# Initial pressure -[kPa]\n", "Pf = Pi ;\t\t\t# Final pressure -[kPa]\n", "V1 = 0.001004 ;\t\t\t# Specific volume at Ti -[cubic metre/kg]\n", "V2 = 1000. * V1 ;\t\t\t#Specific volume at final temperature(Tf) from given condition in problem - [cubic metre/kg]\n", "va = 0.9024 ;\t\t\t# Specific volume -[cubic metre/kg]\n", "Ta = 400. ;\t\t\t# [K]\n", "vb = 1.025 ;\t\t\t# Specific volume -[cubic metre/kg]\n", "Tb = 450. ;\t\t\t#[K]\n", "vf = V2 ;\t\t\t# Final specific volume -[cubic metre/kg]\n", " \n", "# Calculations\n", "m=(Tb - Ta)/(vb - va);\t\t\t# slope \n", "Tf=Ta + m*(vf - va) ;\t\t\t# Final temperature - [K]\n", "\n", "# Results\n", "print ' Final temperature is %.0f K.'%Tf\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Final temperature is 441 K.\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 23.9 page no. 704\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Solution \n", "\n", "# Variables\n", "mv = 1. ;\t\t\t# Mass of saturated vapour - [lb]\n", "P1 = 2. ;\t\t\t# Initial pressure -[atm]\n", "P2 = 20. ;\t\t\t# Final pressure -[atm]\n", "H_2 = 179. ;\t\t\t# Specific enthalpy at 2 atm - [Btu/lb]\n", "H_20 = 233. ;\t\t\t# Specific enthalpy at 20 atm - [Btu/lb]\n", "V_2 = 3.00 ;\t\t\t# Specific volume at 2 atm - [cubic feet/lb]\n", "V_20 = 0.30 ;\t\t\t# Specific volume at 20 atm - [cubic feet/lb]\n", "T_2 = 72. ;\t\t\t# Temperature at 2 atm -[degree F]\n", "T_20 = 239. ;\t\t\t# Temperature at 20 atm -[degree F]\n", "\n", "# Calculations\n", "del_H = H_20 - H_2 ;\t\t\t# Change in specific enthalpy -[Btu/lb] \n", "del_V = V_20 - V_2 ;\t\t\t# Change in specific volume -[cubic feet/lb] \n", "del_T = T_20 - T_2 ;\t\t\t# Change in temperature -[degree F]\n", "\n", "# Results\n", "print '(a) Change in specific enthalpy is %.0f Btu/lb.'%del_H\n", "print ' (b) Change in specific volume is %.2f cubic feet/lb.'%del_V\n", "print ' (c) Change in temperature is %.1f degree F.'%del_T\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) Change in specific enthalpy is 54 Btu/lb.\n", " (b) Change in specific volume is -2.70 cubic feet/lb.\n", " (c) Change in temperature is 167.0 degree F.\n" ] } ], "prompt_number": 9 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 9 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }PK��I�<��T�TDBasic Principles And Calculations In Chemical Engineering/ch24.ipynb{ "metadata": { "name": "", "signature": "sha256:81bdcd8b52f99578fa3372035df0b4461d5784b0d3f676ae0e588533ba351cbf" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 24 : Applications of Energy Balances in the Absence of Chemical Reactions" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 24.1 page no. 720\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "print 'Assumptions to be made in eqn. 24.1 in following segments are:'\n", "#(a)- 1 to 5\n", "print '(a)- 1 to 5.'\n", "print ' 1. Change in potential energy(del_PE) = 0(no change in level) .'\n", "print ' 2. Probably change in kinetic energy(del_KE)=0 .'\n", "print ' 3. Change in energy = 0 (process appears to be steady).'\n", "print ' Result : Q + W = del_H.'\n", "\n", "#(b) 4 to 5\n", "print '(b) 4 to 5.'\n", "print ' 1. Q = W = 0 '\n", "print ' 2. Probably change in kinetic energy(del_KE)=0.'\n", "print ' 3. Change in energy = 0 (process appears to be steady).'\n", "print ' Result : del_H = -del_PE . '\n", "\n", "#(c) 3 to 4\n", "print '(c) 3 to 4.'\n", "print ' 1. Q = W = 0 '\n", "print ' 2. Probably change in kinetic energy(del_KE)=0.'\n", "print ' 3. Change in energy = 0 (process appears to be steady).'\n", "print ' Result : del_H = -del_PE . '\n", "\n", "#(d) 3 to 5\n", "print '(d) 3 to 5.'\n", "print ' 1. Q = W = 0 '\n", "print ' 2. Probably change in kinetic energy(del_KE)=0.'\n", "print ' 3. Change in energy = 0 (process appears to be steady).'\n", "print ' 4. Change in potential energy(del_PE) = 0(no change in level) .'\n", "print ' Result : del_H = 0 . '\n", "\n", "#(e)- 1 to 3\n", "print '(e) 1 to 3.'\n", "print ' 1. Change in potential energy(del_PE) = 0(no change in level) .'\n", "print ' 2. Probably change in kinetic energy(del_KE)=0 .'\n", "print ' 3. Change in energy = 0 (process appears to be steady).'\n", "print ' Result : Q + W = del_H.'\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Assumptions to be made in eqn. 24.1 in following segments are:\n", "(a)- 1 to 5.\n", " 1. Change in potential energy(del_PE) = 0(no change in level) .\n", " 2. Probably change in kinetic energy(del_KE)=0 .\n", " 3. Change in energy = 0 (process appears to be steady).\n", " Result : Q + W = del_H.\n", "(b) 4 to 5.\n", " 1. Q = W = 0 \n", " 2. Probably change in kinetic energy(del_KE)=0.\n", " 3. Change in energy = 0 (process appears to be steady).\n", " Result : del_H = -del_PE . \n", "(c) 3 to 4.\n", " 1. Q = W = 0 \n", " 2. Probably change in kinetic energy(del_KE)=0.\n", " 3. Change in energy = 0 (process appears to be steady).\n", " Result : del_H = -del_PE . \n", "(d) 3 to 5.\n", " 1. Q = W = 0 \n", " 2. Probably change in kinetic energy(del_KE)=0.\n", " 3. Change in energy = 0 (process appears to be steady).\n", " 4. Change in potential energy(del_PE) = 0(no change in level) .\n", " Result : del_H = 0 . \n", "(e) 1 to 3.\n", " 1. Change in potential energy(del_PE) = 0(no change in level) .\n", " 2. Probably change in kinetic energy(del_KE)=0 .\n", " 3. Change in energy = 0 (process appears to be steady).\n", " Result : Q + W = del_H.\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 24.3 page no. 728\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "# Given\n", "m_CO2 = 10. ;\t\t\t# mass of CO2 - [lb]\n", "Ti_CO2 = 80. ;\t\t\t# Initial temperature of CO2 - [degree F]\n", "Vi = 4.0 ;\t\t\t# Initial volume of CO2-[cubic feet]\n", "f_CO2 = 40./100 ;\t\t\t# Fraction of CO2 that convert to liquid finally \n", "s_Vi = Vi /m_CO2 ;\t\t\t# Initial specific volume of CO2 - [cubic feet/lb]\n", "s_Vf = s_Vi ;\t\t\t# Constant volume -[cubic feet/lb]\n", "Pi = 300. ;\t\t\t# Intial pressure - [psia]\n", "del_Hi = 160. ;\t\t\t# Intial change in specific enthalpy - [Btu/lb]\n", "# Now again use chart to get fnal condition fixed by constant volume line and quality 0.6 , according to book it is \n", "del_Hf = 81. ;\t\t\t# Final change in specific enthalpy - [Btu/lb]\n", "Pf = 140. ;\t\t\t#Final pressure - [psia]\n", "\n", "# Calculations\n", "Q = ((del_Hf - del_Hi) - (Pf * s_Vf * 144/778.2 - Pi * s_Vi * 144/778.2))*m_CO2 ;\t\t\t# Heat removed from the extinguisher -[Btu]\n", "\n", "# Results\n", "print ' Heat removed from the extinguisher is %i Btu .'%Q\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Heat removed from the extinguisher is -671 Btu .\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 24.4 page no. 730" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "from scipy.optimize import fsolve\n", "\n", "# Pick the system as gas plus heater \n", "# Given\n", "Pi = 1.5 ;\t\t\t# Intial pressure - [Pa]\n", "Vi = 2*10**-3 ;\t\t\t# Initial volume of gas - [cubic metre]\n", "Ti = 300 ;\t\t\t# Initial temperature - [K]\n", "W = 480 ;\t\t\t# Work done by heater on system\n", "t = 5 ;\t\t\t# Time for which current is supplied -[ min]\n", "m_ht = 12 ;\t\t\t# Mass of the heater - [g]\n", "C_ht = 0.35 ;\t\t\t# Heat capacity of heater - [ J/gK]\n", "R = 8.314 ;\t\t\t# Ideal gas constant - [(Pa*cubic metre)/(g mol* K)]\n", "\n", "# It is assumed that heat transfer across system boundary for this short time is negligible , therefore Q = 0\n", "# Using the above assumption the equation reduces to del_U = W, therefore \n", "del_U = W ;\t\t\t# Change in nternal energy - [J]\n", "\n", "# Calculations\n", "# Gas is assumed to be ideal, therefore get n by using pv = nRT\n", "n = (Pi*Vi)/(R*Ti) ;\t\t\t# Number of moles of argon gas -[g mol]\n", "Cp = (5./2)* R ;\t\t\t# Specific heat capacity of argon gas at constant pressure - [ J/gK]\n", "Cv = Cp - R ;\t\t\t# Specific heat capacity of argon gas at constant volume - [ J/gK]\n", "\n", "def f(Tf):\n", " return m_ht*C_ht*(Tf - Ti) + n*Cv*(Tf - Ti) - del_U\n", " \n", "Tf=fsolve(f,400) ;\t\t\t# Final temperature -[K] \n", "\n", "# Results\n", "print ' Final temperature of gas is %.0f K .'%Tf\n", " \n", "Pf = (Tf/Ti)*Pi ;\t\t\t# Final pressure - [Pa]\n", "print ' Final pressure in chamber is %.2f Pa .'%Pf\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Final temperature of gas is 414 K .\n", " Final pressure in chamber is 2.07 Pa .\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 24.5 page no. 732\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "# Pick the system as shown in above figure of book\n", "# Given\n", "m_water = 10. ;\t\t\t# Mass of water - [lb]\n", "T_water = 35. ;\t\t\t# Temperature of water - [degree F]\n", "m_ice = 4. ;\t\t\t# Mass of ice - [lb]\n", "T_ice = 32. ;\t\t\t# Temperature of ice - [degree F]\n", "m_stm = 6. ;\t\t\t# Initial mass of steam -[lb]\n", "T_stm = 250. ;\t\t\t# Temperature of stm - [degree F]\n", "p = 20. ;\t\t\t# Pressure of system -[psia]\n", "\n", "m_total = m_water + m_ice + m_stm ;\t\t\t# Mass of H2O in three phases initially -[lb]\n", "\n", "U_ice = -143.6 ;\t\t\t# Specific internal energy of ice -[Btu/lb]\n", "U_water = 3.025 ;\t\t\t# Specific internal energy of water -[Btu/lb]\n", "U_stm = 1092.25 ;\t\t\t# Specific internal energy of steam -[Btu/lb]\n", "V_water = 0.0162 ;\t\t\t# Specific volume of water -[cubic feet/lb]\n", "V_stm = 20.80 ;\t\t\t# Specific volume of steam -[cubic feet/lb]\n", "V_total = m_stm*V_stm ;\t\t\t#Total volume of container ignoring volume of water and ice as they are neglgible\n", "\n", "# Calculations\n", "V_sys = V_total/m_total ;\t\t\t# Specific volume of system -[cubic feet/lb]\n", "U_sys =(m_water*U_water + m_ice*U_ice + m_stm*U_stm)/m_total ;\t\t\t# Final specific internal energy of system -[Btu/lb]\n", "\n", "T1 = 190 ;\t\t\t# assumed temperature\n", "U1 = [157.17,1071.83] ;\t\t\t#specific internal energy of liquid and vapour respetively -[Btu/lb]\n", "V1 = [0.0165,41.01] ;\t\t\t# Specific volume of liquid and vapour respetively -[cubic feet/lb]\n", "x1 = V_sys/V1 ;\t\t\t# Quality of vapour\n", "U1_sys = (1-x1)*U1 + x1*U1 \t\t\t# Specific internal energy of system at T1-[Btu/lb] \n", "\n", "T2 = 200. ;\t\t\t# assumed temperature\n", "U2 = [168.11, 1073.96];\t\t\t# specific internal energy of liquid and vapour respetively -[Btu/lb]\n", "V2 = [0.017, 33.601] ;\t\t\t# Specific volume of liquid and vapour respetively -[cubic feet/lb]\n", "x2 = V_sys/V2 ; \t\t\t# Quality of vapour\n", "U2_sys = (1-x2)*U2 + x2*U2 ;\t\t\t# Specific internal energy of system at T2-[Btu/lb] \n", "\n", "# Results\n", "# Check whether assumption is right\n", "if (U_sys > U1_sys ):\n", " if ( U_sys CO2 \n", "R1_O2_in = (1.0/2)*air ;\t\t\t# O2 entering reactor 1-[g mol]\n", "R1_N2_in = R1_O2_in*(79./21) ;\t\t\t# N2 entering reactor 1-[g mol]\n", "\n", "# Calculations\n", "#Output of reactor 1\n", "R1_CO_out = R1_CO_in*(1 - air) ;\t\t\t# [g mol]\n", "R1_CO2_out = 1*( air) ;\t\t\t# [g mol]\n", "R1_N2_out = R1_N2_in ;\t\t\t#[g mol]\n", "\n", "del_Hi_out = [ -109.054,-393.250,0.,-296.855,-395.263,0.] ; \t\t\t# Heat of formation - [kJ/g mol] \n", "del_Hf_out = [35.332,35.178,22.540,20.845,34.302,16.313] ;\t\t\t#Change in enthalpy during temperature change -[kJ/g mol]\n", "del_H_out =del_Hi_out + del_Hf_out ;\t\t\t#[-371.825,15.043,160.781,-449.650,-581.35]\t\t\t# Change in enthalpy final - [kJ/g mol]\n", "\n", "del_Hi_in = [ -109.054,-393.250,0.,-296.855,0.] ;\t\t\t# \t\t\t# Heat of formation - [kJ/g mol] \n", "del_Hf_in = [17.177,17.753,11.981,0.,0.] ;\t\t\t#Change in enthalpy during temperature change -[kJ/g mol]\n", "del_H_in = del_Hi_in+ del_Hf_in ;\t\t\t# Change in enthalpy final - [kJ/g mol]\n", "\n", "from numpy import matrix\n", "# Solve eqn. (a), (b) and (c) to get F ,P , ex \n", "a = matrix([[(R2_fSO3_out),0,-1],\n", " [(R2_fSO2_out),-(R2_fSO2_in),1],\n", " [- 285.50, -(del_H_in*R2_fSO2_in), 0]]) ;\t\t\t# Matrix of coefficients\n", "\n", "b = matrix([,,[- 33.459781 ]]) ;\t\t\t# Matrix of constants\n", "#a = a.I\n", "#x = a*b ;\t\t\t# Matrix of solutions, P = x(1), F = x(2) ,ex = x(3)\n", "\n", "from numpy import *\n", "x = linalg.solve(a,b)\n", "\n", "F = x ;\t\t\t#exit stream of reactor 2 - [lb mol]\n", "R2_SO2_in = R2_fSO2_in*F ;\t\t\t# Moles of SO2 required per lb mol of CO - [lb mol]\n", "\n", "CO = (R1_CO_in*SO2_in)/R2_SO2_in ;\t\t\t#Mole of CO burned in reactor 1 - [lb mol] \n", "\n", "# Results\n", "print 'Mole of CO burned in reactor 1 is %.0f lb mol.'%CO\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Mole of CO burned in reactor 1 is 2259 lb mol.\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 26.5 page no. 819\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ " \n", "\n", "# Variables\n", "CA = 10000. ;\t\t\t# Produced citric acid - [kg]\n", "f_glucose = .30 ;\t\t\t# Fraction of glucose in solution \n", "con_glucose = .60 ;\t\t\t# Fraction of glucose consumed\n", "w_glucose = 180.16 ;\t\t\t# Mol. wt. of d,alpha glucose -[g]\n", "H_glucose = -1266 ;\t\t\t# Specific enthalpy change of glucose - [kJ/g mol]\n", "w_CA = 192.12; \t\t\t# Mol. wt. of citric acid -[g]\n", "H_CA = -1544.8 ;\t\t\t# Specific enthalpy change of citric acid - [kJ/g mol]\n", "w_BM = 28.6 ;\t\t\t# Mol. wt. of biomass -[g]\n", "H_BM = -91.4 ;\t\t\t# Specific enthalpy change of biomass - [kJ/g mol]\n", "H_CO2 = -393.51 ;\t\t\t# Specific enthalpy change of CO2 - [kJ/g mol]\n", "\n", "# Calculations\n", "mol_CA = CA/w_CA ;\t\t\t# Mole of citric acid produced - [kg mol]\n", "g_soln = (mol_CA*(3/2.22)*w_glucose*1)/(con_glucose*f_glucose) ;\t\t\t#Mass of 30 % glucose solution introduced -[kg]\n", "i_glucose = g_soln* f_glucose / w_glucose ;\t\t\t# Initial moles of glucose - [kg mol]\n", "f_glucose = (1 - con_glucose)*i_glucose ;\t\t\t# Final moles of glucose - [kg mol]\n", "f_CA = mol_CA ;\t\t\t# Final moles of citric acid - [kg mol]\n", "f_BM = f_CA*(5.35/2.22) ;\t\t\t# Using the reaction (a)- Final moles of biomass - [kg mol]\n", "i_O2 = i_glucose*(7.8/3) ;\t\t\t# Using the reaction (a)- Initial moles of O2 - [kg mol]\n", "f_CO2 = i_glucose*(4.5/3)*con_glucose ;\t\t\t# Using the reaction (a) - Final moles of CO2 - [kg mol]\n", "\n", "power = 100 ;\t\t\t# Power of aerator -[hp]\n", "time = 220 ;\t\t\t# Time taken for reaction - [ hr ]\n", "W = (power*745.7*time*3600)/1000 ;\t\t\t# Work done by aerator - [kJ]\n", "\n", "Hi_glucose = i_glucose*H_glucose*1000 ;\t\t\t# Enthalpy change of glucose input - [kJ]\n", "Hi_O2 = i_O2*0*1000 ;\t\t\t# Enthalpy change of O2 input - [kJ]\n", "H_in = Hi_glucose + Hi_O2 ;\t\t\t# Enthalpy change of input - [kJ]\n", "\n", "Hf_glucose = f_glucose*H_glucose*1000 ;\t\t\t# Enthalpy change of glucose output - [kJ]\n", "Hf_BM = f_BM * H_BM*1000 ;\t\t\t#Enthalpy change of biomass output - [kJ]\n", "Hf_CA = f_CA *H_CA*1000 ;\t\t\t#Enthalpy change of citric acid output - [kJ]\n", "Hf_CO2 = f_CO2 *H_CO2*1000 ;\t\t\t#Enthalpy change of CO2 output - [kJ]\n", "H_out = Hf_glucose + Hf_BM +Hf_CA + Hf_CO2 ;\t\t\t# Enthalpy change of output - [kJ]\n", "del_H = H_out - H_in ;\t\t\t# Total enthalpy change in process - [kJ]\n", "Q = del_H - W ;\t\t\t# Heat removed - [kJ]\n", "\n", "# Results\n", "print 'Heat exchange from the fermentor during production of 10,000 kg citric acid is %.2e kJ(minus sign indicates heat is removed).'%Q\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Heat exchange from the fermentor during production of 10,000 kg citric acid is -1.03e+08 kJ(minus sign indicates heat is removed).\n" ] } ], "prompt_number": 4 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 4 } ], "metadata": {} } ] }PK��I���u)u)DBasic Principles And Calculations In Chemical Engineering/ch27.ipynb{ "metadata": { "name": "", "signature": "sha256:21747075c112c6cd9e1a0a4f001fec6264fd627d603e23ce68da0341f7d86ac0" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 27 : Ideal Processes Efficiency and the Mechanical Energy Balance" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 27.1 page no. 838\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "V_w = 1. ;\t\t\t# Volume of given water -[L]\n", "P_atm = 100. ;\t\t\t# Atmospheric pressure - [kPa]\n", "\n", "#W = -p*del_V\n", "V_H2O = 0.001043 ;\t\t\t# Specific volume of water from steam table according to book- [cubic metre] \n", "V_vap = 1.694 ;\t\t\t# Specific volume of vapour from steam table according to book- [cubic metre] \n", "V1 = 0 ;\t\t\t# Initial volume of H2O in bag-[cubic metre]\n", "\n", "# Calculations\n", "V2 = (V_w*V_vap)/(1000*V_H2O) ;\t\t\t# Final volume of water vapour -[cubic metre] \n", "W = -P_atm*(V2 -V1)* 1000 ;\t\t\t# Work done by saturated liquid water -[J]\n", " \n", "# Results \n", "print ' Work done by saturated liquid water is %.3e J.'%W\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Work done by saturated liquid water is -1.624e+05 J.\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 27.2 page no. 840\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "m_N2 = 1. ;\t\t\t# Moles of N2 taken -[kg mol]\n", "p = 1000.;\t\t\t# Pressure of cylinder-[kPa]\n", "T = 20. + 273. ;\t\t\t# Temperature of cylinder -[K]\n", "a_pis = 6. ;\t\t\t# Area of piston - [square centimetre]\n", "m_pis = 2. ;\t\t\t# Mass of pston - [kg]\n", "R = 8.31 ;\t\t\t# Ideal gas constant - [(kPa*cubic metre)/(K * kgmol)]\n", "\n", "# Calculations\n", "V = (R*T)/p ;\t\t\t# Specific volue of gas at initial stage -[cubic metre/kg mol]\n", "V1 = V * m_N2 ;\t\t\t# Initial volume of gas - [cubic metre]\n", "V2 = 2.*V1 ;\t\t\t# Final volume of gas according to given condition -[cubic metre]\n", "\n", "# Assumed surrounding pressure constant = 1 atm\n", "p_atm = 101.3 ;\t\t\t# Atmospheric pressure-[kPa]\n", "del_Vsys = V2 -V1 ;\t\t\t# Change in volume of system -[cubic metre]\n", "del_Vsurr = - del_Vsys ;\t\t\t# Change in volume of surrounding -[cubic metre]\n", "W_surr = -p_atm*del_Vsurr ;\t\t\t# Work done by surrounding - [kJ]\n", "W_sys = -W_surr ;\t\t\t# Work done by system - [kJ]\n", "\n", "# Results\n", "print ' Work done by gas(actually gas + piston system) is %.0f kJ.'%W_sys\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Work done by gas(actually gas + piston system) is -247 kJ.\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 27.3 page no. 845\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "p_plant = 20. ;\t\t\t# Power generated by plant-[MW]\n", "h = 25. ;\t\t\t# Height of water level - [m]\n", "V = 100. ;\t\t\t# Flow rate of water -[cubic metre/s]\n", "d_water = 1000. ;\t\t\t# Density of water - [ 1000 kg / cubic metre]\n", "g = 9.807 ;\t\t\t# Acceleration due to gravity-[m/square second]\n", "\n", "# Calculations\n", "M_flow = V*d_water ;\t\t\t# Mass flow rate of water -[kg/s]\n", "del_PE = M_flow*g*h ;\t\t\t# Potential energy change of water per second -[W]\n", "eff = (p_plant*10**6) /(del_PE) ;\t\t\t# Efficiency of plant \n", "\n", "# Results\n", "print ' Efficiency of plant is %.2f .'%eff\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Efficiency of plant is 0.82 .\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 27.4 page no. 845\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "LHV = 36654. ;\t\t\t# LHV value of fuel - [kJ/ cubic metre]\n", "Q1 = 16. ;\t\t\t#- [kJ/ cubic metre]\n", "Q2 = 0 ;\t\t\t#- [kJ/ cubic metre]\n", "Q3 = 2432. ;\t\t\t#- [kJ/ cubic metre]\n", "Q4 = 32114. ;\t\t\t#- [kJ/ cubic metre]\n", "Q41 = 6988. ;\t\t\t#- [kJ/ cubic metre]\n", "Q8 = 1948. ;\t\t\t#- [kJ/ cubic metre]\n", "Q9 = 2643. ;\t\t\t#- [kJ/ cubic metre]\n", "Q81 = 2352. - Q8 ;\t\t\t# - [kJ/ cubic metre]\n", "Q567 = 9092. ;\t\t\t# Sum of Q5, Q6 and Q7- [kJ/ cubic metre]\n", "\n", "# Calculations and Results\n", "#(a)\n", "G_ef = (LHV+ Q1 +Q2 + Q3 - Q9)/(LHV) ;\t\t\t# Gross efficiency\n", "print '(a) Gross efficiency is %.3f .'%G_ef\n", "\n", "#(b)\n", "T_ef = (Q567+Q8)/(LHV+ Q1 +Q2 + Q3) ;\t\t\t#Thermal efficiency \n", "print ' (b) Thermal efficiency is %.3f .'%T_ef\n", "\n", "#(c)\n", "C_ef = Q4/(Q4 + Q41) ;\t\t\t# Combustion efficiency\n", "print ' (c) Combustion efficiency is %.3f .'%C_ef\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) Gross efficiency is 0.995 .\n", " (b) Thermal efficiency is 0.282 .\n", " (c) Combustion efficiency is 0.821 .\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 27.5 page no. 850" ] }, { "cell_type": "code", "collapsed": true, "input": [ "\n", "from scipy.integrate import quad\n", "\n", "# Variables\n", "V1 = 5. ;\t\t\t# Volume of gas initially - [cubic feet]\n", "P1 = 1. ;\t\t\t# Initial pressure - [atm]\n", "P2 = 10. ;\t\t\t# Final pressure - [atm]\n", "T1 = 100. + 460 ;\t\t\t# initial temperature - [degree Rankine]\n", "R = 0.7302 ;\t\t\t# Ideal gas constant -[(cubic feet*atm)/(lb mol)*(R)]\n", "\t\t\t#Equation of state pV**1.4 = constant\n", "\n", "\n", "# Calculations and Results\n", "V2 = V1*(P1/P2)**(1/1.4) ;\t\t\t# Final volume - [cubic feet] \n", "\n", "def f(V):\n", " return -(P1)*(V1/V)**(1.4)\n", " \n", "W1_rev = quad(f,V1,V2) ;\t\t\t# Reversible work done in compresion in a horizontal cylinder with piston -[cubic feet *atm]\n", "W1 = W1_rev *1.987/.7302 ;\t\t\t# Conversion to Btu -[Btu]\n", "print '(a)Reversible work done in compression in a horizontal cylinder with piston is %.1f Btu . '%W1\n", "\n", "#(b)\n", "n1 = (P1*V1)/(R*T1) ;\t\t\t# Number of moles of gas\n", "\n", "def f1(P):\n", " return (V1)*(P1/P)**(1/1.4)\n", "W2_rev = quad(f1,P1,P2)\t\t# Reversible work done in compresion in a rotary compressor -[cubic feet *atm]\n", "W2 = W2_rev *1.987/.7302 ;\t\t\t# Conversion to Btu -[Btu]\n", "\n", "print '(b)Reversible work done in a rotary compressor is %.1f Btu . '%W2\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a)Reversible work done in compression in a horizontal cylinder with piston is 31.7 Btu . \n", "(b)Reversible work done in a rotary compressor is 44.3 Btu . \n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 27.6 page no. 853" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "from scipy.integrate import quad\n", "# Variables\n", "m_water = 1. ;\t\t\t# Mass flow rate of water -[lb/min]\n", "P1 = 100. ;\t\t\t# Initial pressure - [psia]\n", "P2 = 1000. ;\t\t\t# Final pressure - [psia]\n", "T1 = 80. + 460 ;\t\t\t# initial temperature - [degree Rankine]\n", "T2 = 100. + 460 ;\t\t\t# final temperature - [degree Rankine]\n", "h = 10. ;\t\t\t# Difference in water level between entry and exit of stream-[ft]\n", "g = 32.2 ;\t\t\t# Accleration due to gravity - [ft/ square second]\n", "gc = 32.2 ;\t\t\t#[(ft*lbm)/(lbf*square second)]\n", "\n", "v1 = .01607 ;\t\t\t# specific volume of liquid water at 80 degree F -[cubic feet/lbm]\n", "v2 = .01613 ;\t\t\t# specific volume of liquid water at 100 degree F -[cubic feet/lbm] \n", "v= 0.0161 ;\t\t\t# -[cubic feet/lbm]\n", "\n", "# Calculations\n", "del_PE = (h*g)/(gc*778) ;\t\t\t# Change in potential energy - [Btu/lbm]\n", "\n", "def f(P):\n", " return (v)*(12**2/778.)\n", " \n", "PV_work = quad(f,P1,P2)\t\t\t# PV work done -[Btu/lbm]\n", "#From eqn. (A)\n", "W = PV_work + del_PE ;\t\t\t# Work per minute required to pump 1 lb water per minute - [Btu/lbm]\n", "\n", "# Results\n", "print ' Work per minute required to pump 1 lb water per minute is %.2f Btu/lbm . '%W\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Work per minute required to pump 1 lb water per minute is 2.69 Btu/lbm . \n" ] } ], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 2 } ], "metadata": {} } ] }PK��I>Z�8�"�"DBasic Principles And Calculations In Chemical Engineering/ch28.ipynb{ "metadata": { "name": "", "signature": "sha256:ac2f423a0dd7909a3558159c9b6408459426072d293b0494654db2eec3dde604" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 28 : Heats of Solution and Mixing" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 28.1 page no. 869\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "Ref_T = 77. ;\t\t\t#Reference temperature-[degree F]\n", "\n", "#(a)\n", "mol_NH3 = 1. ;\t\t\t# Moles of NH3 - [lb mol]\n", "mw_NH3 = 17. ;\t\t\t#Molecular t. of NH3 -[lb]\n", "mw_H2O = 18. ;\t\t\t#Molecular t. of H2O -[lb]\n", "\n", "# Calculations and Results\n", "f1_NH3 = 3./100 ;\t\t\t# Fraction of NH3 in solution \n", "m_H2O = (mw_NH3/f1_NH3) - mw_NH3 ;\t\t\t# Mass of water in solution -[lb]\n", "mol_H2O = m_H2O/mw_H2O ;\t\t\t# Moles of H2O in solution -[lb mol]\n", "\n", "print '(a) Moles of H2O in solution is %.1f lb mol . '%mol_H2O\n", "print ' As we can see that moles of water is 30 lb mol(approx), hence we will see H_soln from table corresponding to 30 lb mol water . '\n", "H_soln = -14800. ;\t\t\t# From table given in question in book -[Btu/lb mol NH3]\n", "print ' The amount of cooling needed is, %.0f Btu heat removed. '%(abs(H_soln))\n", "\n", "#(b)\n", "V = 100. ;\t\t\t# Volume of solution produced -[gal]\n", "f2_NH3 = 32./100 ;\t\t\t# Fraction of NH3 in solution \n", "sg_NH3 = .889 ;\t\t\t# Specific gravity of NH3 \n", "sg_H2O = 1.003 ;\t\t\t# Specific gravity of H2O\n", "d_soln = sg_NH3*62.4*sg_H2O*100/7.48 ;\t\t\t# Density of solution - [lb / 100 gal]\n", "NH3 = d_soln*f2_NH3/mw_NH3 ;\t\t\t# Mass of NH3 - [ lb mol/ 100 gal]\n", "m1_H2O = (mw_NH3/f2_NH3) - mw_NH3 ;\t\t\t# Mass of water in solution -[lb]\n", "mol1_H2O = m1_H2O/mw_H2O ;\t\t\t# Moles of H2O in solution -[lb mol]\n", "\n", "print ' (b) Moles of H2O in solution is %.1f lb mol . '%mol1_H2O\n", "print ' As we can see that moles of water is 2 lb mol , hence we will see H_soln from table corresponding to 2 lb mol water . '\n", "H_soln = -13700 ;\t\t\t# From table given in question in book -[Btu/lb mol NH3]\n", "total_H = abs(NH3*H_soln) ;\t\t\t# Total heat removed from solution -[Btu]\n", "print ' The amount of cooling needed is, %.0f Btu heat removed. '%total_H\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) Moles of H2O in solution is 30.5 lb mol . \n", " As we can see that moles of water is 30 lb mol(approx), hence we will see H_soln from table corresponding to 30 lb mol water . \n", " The amount of cooling needed is, 14800 Btu heat removed. \n", " (b) Moles of H2O in solution is 2.0 lb mol . \n", " As we can see that moles of water is 2 lb mol , hence we will see H_soln from table corresponding to 2 lb mol water . \n", " The amount of cooling needed is, 191826 Btu heat removed. \n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 28.2 page no. 872" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "from scipy.integrate import quad\n", "# Variables\n", "p = 100. ;\t\t\t# Mass of product - [kg]\n", "f_HCl = 25./100 ;\t\t\t#Fraction of HCl in product \n", "HCl = f_HCl*p ;\t\t\t# Mass of HCl in product - [kg]\n", "H2O = (1.-f_HCl)*p ;\t\t\t# Mass of H2O in product -[kg]\n", "mw_HCl = 36.37 ;\t\t\t# Molecular weight of HCl -[kg]\n", "mw_H2O = 18.02 ;\t\t\t# Molecular weight of H2O -[kg]\n", "\n", "# Calculations\n", "mol_HCl = HCl /mw_HCl ;\t\t\t# Moles of HCl - [kg mol]\n", "mol_H2O = H2O /mw_H2O; \t\t\t# Moles of H2O - [kg mol]\n", "total_mol = mol_HCl + mol_H2O ;\t\t\t# Total no. of moles -[kg mol]\n", "mf_HCl = mol_HCl / total_mol ;\t\t\t# mole fraction of HCl \n", "mf_H2O = mol_H2O / total_mol ; \t\t\t# mole fraction of H2O\n", "mr = mol_H2O/mol_HCl ;\t\t\t# Mole ratio of H2O to HCl \n", "MW = mf_HCl*mw_HCl + mf_H2O*mw_H2O ;\t\t\t# Molecular t. of solution-[kg]\n", "Ref_T = 25. ;\t\t\t#Reference temperature-[degree C]\n", "\n", "mol1_HCl = total_mol ;\t\t\t# Moles of HCl \t\t\t# Moles of HCl output -[g mol]\n", "Hf1_HCl = -157753. ;\t\t\t# Heat of formation of HCl output-[J/ g mol HCl ]\n", "Hf_HCl = -92311. ;\t\t\t# Heat of formation of HCl input-[J/ g mol HCl ]\n", "Hf_H2O = 0 ;\t\t\t# Heat of formation of H2O input-[J/ g mol HCl ]\n", "H1_HCl = 556. ;\t\t\t# Change in enthalpy during temperature change from 25 C to 35 C of HCl - [J/g mol] \n", "\n", "def f(T):\n", " return (29.13 - 0.134*.01*T)\n", "\n", "H_HCl = quad(f,298,393)\t# Change in enthalpy during temperature change from 25 C to 120 C of HCl - [J/g mol] \n", "\n", "H_H2O = 0 ;\t\t\t# Change in enthalpy during temperature change from 25 C to 25 C of H2O - [J/g mol] \n", "\n", "H_in = (Hf_HCl + H_HCl)*mol_HCl + (Hf_H2O + H_H2O)*mol_H2O ;\t\t\t# Enthalpy change of input -[J]\n", "H_out = Hf1_HCl*mol_HCl +H1_HCl*mol1_HCl ;\t\t\t# Enthalpy change of output -[J]\n", "\n", "del_H = H_out - H_in ;\t\t\t# Net enthalpy change n process - [J]\n", "Q = del_H; \t\t\t# By energy balance - [J]\n", "\n", "# Results\n", "print 'The amount of heat removed from the absorber by cooling water is, %.0f J. '%Q\n", "print 'It Seems answer is wrong in book'\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The amount of heat removed from the absorber by cooling water is, -44159 J. \n", "It Seems answer is wrong in book\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 28.3 page no. 875\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "soln1 = 600. ; \t\t\t# Mass flow rate of entering solution 1 -[lb/hr]\n", "c1_NaOH = 10./100 ;\t\t\t# Fraction of NaOH in entering solution 1\n", "T1 = 200. ;\t\t\t# Temperature at entry \n", "soln2 = 400. ;\t\t\t# Mass flow rate of another solution 2 entering -[lb/hr]\n", "c2_NaOH = 50./100 ;\t\t\t# Fraction of NaOH in another entering solution 2\n", "\n", "# Calculations\n", "F = soln1 + soln2; \t\t\t# Mass flow rate of final solution - [lb/hr]\n", "F_NaOH = c1_NaOH * soln1 + c2_NaOH * soln2 ;\t\t\t# Mass of NaOH in final solution-[lb]\n", "F_H2O = F - F_NaOH ;\t\t\t# Mass of H2O in final solution-[lb]\n", "H_soln1 = 152. ;\t\t\t# Specific enthalpy change for solution 1-[Btu/lb]\n", "H_soln2 = 290. ;\t\t\t# Specific enthalpy change for solution 2-[Btu/lb]\n", "H_F = (soln1*H_soln1 + soln2*H_soln2)/F ;\t\t\t# Specific enthalpy change for final solution -[Btu/lb]\n", "\n", "# Results\n", "print ' (a) The final temperature of the exit solution from figure E28.3 using the obtained condition of final solution is 232 degree F '\n", "\n", "cF = F_NaOH*100/F; \t\t\t# Concentration of final solution -[wt % NaOH ]\n", "print ' (b) The concentration of final solution is %.0f wt.%% NaOH . '%cF\n", "\n", "x = (F*H_F - F*175)/(1158.0 - 175) ;\t\t\t# H2O evaporated per hour -[lb]\n", "print ' (c) H2O evaporated per hour is %.1f lb . '%x\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " (a) The final temperature of the exit solution from figure E28.3 using the obtained condition of final solution is 232 degree F \n", " (b) The concentration of final solution is 26 wt.% NaOH . \n", " (c) H2O evaporated per hour is 32.8 lb . \n" ] } ], "prompt_number": 3 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 3 } ], "metadata": {} } ] }PK��If揕_*_*DBasic Principles And Calculations In Chemical Engineering/ch29.ipynb{ "metadata": { "name": "", "signature": "sha256:b5b2fcf9bb3d537cea245cafaa4a19d4d1dc42af6ab432d7e1ef22a8e48ae245" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 29 : Humidity Charts and their Uses" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 29.1 page no. 895\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "DBT = 90. ;\t\t\t# Dry bulb temperature - [degree F]\n", "WBT = 70. ;\t\t\t# Wet bulb temperature - [degree F]\n", "\n", "#Get point A using DBT & WBT. Following information is obtained from humidity chart, fig. E29.1\n", "# Results\n", "print '(a) The Dew point is located at point B or about 60 degree F, using constant humidity line.'\n", "print ' (b) By interpolation between 40%% and 30%% RH , you can find point A is at 37%% relative humidity .'\n", "print ' (c) You can read humidity from the righthand ordinate as 0.0112 lb H2O/lb dry air .'\n", "print ' (d) By interpolation again between 14.0 cubic feet/lb and 14.5 cubic feet/lb lines , you can find humid volume to be 14.1 cubic feet/lb dry air.'\n", "print ' (e) The enthalpy value of saturated air with WBT 70 degree F is 34.1 Btu/lb dry air .'\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) The Dew point is located at point B or about 60 degree F, using constant humidity line.\n", " (b) By interpolation between 40%% and 30%% RH , you can find point A is at 37%% relative humidity .\n", " (c) You can read humidity from the righthand ordinate as 0.0112 lb H2O/lb dry air .\n", " (d) By interpolation again between 14.0 cubic feet/lb and 14.5 cubic feet/lb lines , you can find humid volume to be 14.1 cubic feet/lb dry air.\n", " (e) The enthalpy value of saturated air with WBT 70 degree F is 34.1 Btu/lb dry air .\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 29.2 page no. 897\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "DBT1 = 38 ;\t\t\t# Initial dry bulb temperature - [degree C]\n", "DBT2 = 86 ;\t\t\t# Final dry bulb temperature - [degree C]\n", "RH1 = 49 ;\t\t\t# Relative humidity - [%]\n", "\n", "#A is initial and B is final point , see fig. E29.2 . Dew point is obtained graphically and it is 24.8 degree C,therefore\n", "print 'The Dew point is unchanged in the process because humidity is unchanged, and it is located at 24.8 degree C.'\n", "\n", "# Calculations\n", "# Additional data is obtained from humidity chart , according to book data is as follows\n", "A_Hsat = 90.0 ;\t\t\t# Enthalpy of saturation at point A- [kJ/kg]\n", "A_dH = -0.5 ;\t\t\t#Enthalpy deviation-[kJ/kg]\n", "A_Hact = A_Hsat + A_dH ;\t\t\t# Actual enthalpy at point A -[kJ/kg]\n", "B_Hsat = 143.3 ;\t\t\t# Enthalpy of saturation at point B- [kJ/kg]\n", "B_dH = -3.3 ;\t\t\t#Enthalpy deviation -[kJ/kg]\n", "B_Hact = B_Hsat + B_dH ;\t\t\t# Actual enthalpy at point B -[kJ/kg]\n", "\n", "\t\t\t# Energy balance reduces to Q = del_H \n", "del_H = B_Hact - A_Hact ;\t\t\t# Total change in enthalpy - [kJ/kg]\n", "v = 0.91 ;\t\t\t# Specific volume of moist air at point A -[cubic metre / kg]\n", "Q = del_H/v ;\t\t\t# Heat added per cubic metre of inital moist air -[kJ]\n", "\n", "# Results\n", "print ' Heat added per cubic metre of inital moist air is %.1f kJ.'%Q\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The Dew point is unchanged in the process because humidity is unchanged, and it is located at 24.8 degree C.\n", " Heat added per cubic metre of inital moist air is 55.5 kJ.\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 29.3 page no. 898\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "DBT1 = 40 ;\t\t\t# Initial dry bulb temperature - [degree C]\n", "DBT2 = 27 ;\t\t\t# Final dry bulb temperature - [degree C]\n", "\n", "# Process is assumed to be adiabatic, therefore wet bulb temperature is constant\n", "WBT1 = 22 ;\t\t\t# Initial wet bulb temperature - [degree C]\n", "WBT2 = WBT1 ;\t\t\t# Final wet bulb temperature - [degree C]\n", "\n", "# Calculations\n", "#A is initial and B is final point , see fig. E29.3b . Humidity is obtained from humidity chart, according to book the respective humidities are as follows\n", "H_B = 0.0145 ;\t\t\t# Humidity at point B -[kg H2O/kg dry air]\n", "H_A = 0.0093 ;\t\t\t# Humidity at point A -[kg H2O/kg dry air]\n", "Diff = H_B - H_A ;\t\t\t# Moisture added in kg per kilogram of dry air going through humidifier -[kg H2O/kg dry air] \n", "\n", "# Results\n", "print 'Moisture added per kilogram of dry air going through humidifier is %.4f kg H2O.'%Diff\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Moisture added per kilogram of dry air going through humidifier is 0.0052 kg H2O.\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 29.4 page no. 900\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "c_bl = 8.30 * 10**6 ;\t\t\t# Capacity of blower - [cubic feet/hr]\n", "DBT_A = 80 ;\t\t\t# Initial dry bulb temperature of moist air - [degree F]\n", "DBT_B = 95 ;\t\t\t# Final dry bulb temperature of exit air - [degree F]\n", "WBT_A = 65 ;\t\t\t# Initial wet bulb temperature of moist air - [degree F]\n", "WBT_B = 90 ;\t\t\t# Final wet bulb temperature of exit air - [degree F]\n", "T1_H2O = 120 ;\t\t\t# Initial temperature of water - [degree F]\n", "T2_H2O = 90 ;\t\t\t# Final temperature of water - [degree F]\n", "\n", "#A is initial and B is final point , see fig. E29.4 . Humidity is obtained from humidity chart, according to book the respective humidities are as follows\n", "H_A = 0.0098; \t\t\t# Humidity of air at A - [lb H2O / lb dry air]\n", "H1_A = 69 ;\t\t\t# Humidity of air at A - [grains H2O / lb dry air]\n", "\n", "# Calculations\n", "delH_A = 30.05 - 0.12; \t\t\t# Enthalpy of entering air -[Btu/lb dry air]\n", "v_A = 13.82 ;\t\t\t# Specific volume of entering air -[cubic feet/lb dry air]\n", "H_B = 0.0297;\t\t\t# Humidity of air at B - [lb H2O / lb dry air]\n", "H1_B = 208 ;\t\t\t# Humidity of air at B - [grains H2O / lb dry air]\n", "delH_B = 55.93 - 0.10 ;\t\t\t# Enthalpy of exit air -[Btu/lb dry air]\n", "v_B = 14.65 ;\t\t\t# Specific volume of exit air -[cubic feet/lb dry air]\n", "Eq_A = c_bl /v_A ;\t\t\t# Entering dry air equivalent of capacity of blower -[lb dry air]\n", "\n", "# Reference temperature for water stream is 32 degree F \n", "del_H1_H2O = 1*(T1_H2O - 32) ;\t\t\t#Enthalpy of entering water -[Btu/lb H2O]\n", "del_H2_H2O = 1*(T2_H2O - 32) ;\t\t\t#Enthalpy of exit water -[Btu/lb H2O]\n", "tr_H2O = H_B - H_A ;\t\t\t# Transfer of water to air -[lb H2O / lb dry air] \n", "\n", "# Energy balance around the entire process yields W -\n", "W = (delH_B - del_H2_H2O*tr_H2O - delH_A)/(del_H1_H2O - del_H2_H2O) ;\t\t\t# Water entering tower - [lb H2O/lb dry air]\n", "W1 = W - tr_H2O ;\t\t\t# Water leaving tower -[lb H2O/lb dry air]\n", "Total_W1 = W1* Eq_A ;\t\t\t# Total water leaving tower -[lb/hr]\n", "\n", "# Results\n", "print 'Amount of water cooled per hour is %.2e lb/hr .'%Total_W1\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Amount of water cooled per hour is 4.83e+05 lb/hr .\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 29.5 page no. 902\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "W = 100 ;\t\t\t# Amount of entering water -[lb/hr]\n", "H1 = .020 ;\t\t\t# Humidity of entering air -[lb H2O / lb dry air]\n", "T1 = 155 ;\t\t\t#Temperature of entering air -[degree F]\n", "DTB = 110 ;\t\t\t# Dry bulb temperature of exit air -[degree F]\n", "WTB = 100 ;\t\t\t# Wet bulb temperature of exit air -[degree F]\n", "\n", "# Additional data is obtained from humidity chart, it is as follows\n", "H2 = .0405 ;\t\t\t#Humidity of exit air -[lb H2O / lb dry air]\n", "\n", "# Calculations\n", "del_H = H2 - H1 ;\t\t\t# Change in humidity betwween two states -[lb H2O / lb dry air]\n", "air_in = (W*1.02)/(del_H * 1) ;\t\t\t# Amount of wet air entering -[lb]\n", "\n", "mol_air = 29. ;\t\t\t# Molecular wt. of air -[lb]\n", "Ref_T = 32 + 460. ;\t\t\t# Reference temperature - [ degree R]\n", "gi_T = 90 + 460.; \t\t\t# Given temperature on which calculation is based - [degree R] \n", "air = (air_in *359*gi_T)/( mol_air*Ref_T) ;\t\t\t# Air consumption of dryer at 90 degree F and 1 atm -[cubic feet]\n", "\n", "# Results\n", "print 'Air consumption of dryer at 90 degree F and 1 atm is %.2e cubic feet .'%air\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Air consumption of dryer at 90 degree F and 1 atm is 6.89e+04 cubic feet .\n" ] } ], "prompt_number": 5 }, { "cell_type": "code", "collapsed": true, "input": [], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 5 } ], "metadata": {} } ] }PK��IO@\$�HHC��Basic Principles And Calculations In Chemical Engineering/ch1.ipynbPK��IBZ9�OOC���Basic Principles And Calculations In Chemical Engineering/ch2.ipynbPK��I�-�8#8#C��Y|Basic Principles And Calculations In Chemical Engineering/ch3.ipynbPK��I�!栦 � C���Basic Principles And Calculations In Chemical Engineering/ch4.ipynbPK��I�T�Z��C����Basic Principles And Calculations In Chemical Engineering/ch5.ipynbPK��I��5��C����Basic Principles And Calculations In Chemical Engineering/ch6.ipynbPK��I*u�]��C����Basic Principles And Calculations In Chemical Engineering/ch7.ipynbPK��Im�+� = =C���Basic Principles And Calculations In Chemical Engineering/ch8.ipynbPK��I��̊�C�CC��z!Basic Principles And Calculations In Chemical Engineering/ch9.ipynbPK��I��8z8zD��_eBasic Principles And Calculations In Chemical Engineering/ch10.ipynbPK��I�8K3�D�DD����Basic Principles And Calculations In Chemical Engineering/ch11.ipynbPK��I;(!]3]3D��%Basic Principles And Calculations In Chemical Engineering/ch12.ipynbPK��I54�s7s7D���XBasic Principles And Calculations In Chemical Engineering/ch13.ipynbPK��I�qA�Basic Principles And Calculations In Chemical Engineering/ch21.ipynbPK��I���|(|(D��` Basic Principles And Calculations In Chemical Engineering/ch22.ipynbPK��Ij�wl-h-hD��>5Basic Principles And Calculations In Chemical Engineering/ch23.ipynbPK��I�<��T�TD��͝Basic Principles And Calculations In Chemical Engineering/ch24.ipynbPK��I*m���W�WD����Basic Principles And Calculations In Chemical Engineering/ch25.ipynbPK��I��m&9&9D��0KBasic Principles And Calculations In Chemical Engineering/ch26.ipynbPK��I���u)u)D����Basic Principles And Calculations In Chemical Engineering/ch27.ipynbPK��I>Z�8�"�"D����Basic Principles And Calculations In Chemical Engineering/ch28.ipynbPK��If揕_*_*D����Basic Principles And Calculations In Chemical Engineering/ch29.ipynbPK� X�