diff options
author | debashisdeb | 2014-06-21 00:52:25 +0530 |
---|---|---|
committer | debashisdeb | 2014-06-21 00:52:25 +0530 |
commit | 7c756fcc12d21693818e58f6936cab5b7c112868 (patch) | |
tree | 009cb02ec85f4a75ac7b64239751f15361df2bfe /Introduction_To_Chemical_Engineering/ch3.ipynb | |
parent | 83c1bfceb1b681b4bb7253b47491be2d8b2014a1 (diff) | |
download | Python-Textbook-Companions-7c756fcc12d21693818e58f6936cab5b7c112868.tar.gz Python-Textbook-Companions-7c756fcc12d21693818e58f6936cab5b7c112868.tar.bz2 Python-Textbook-Companions-7c756fcc12d21693818e58f6936cab5b7c112868.zip |
Removed Problem Statements Completely
Diffstat (limited to 'Introduction_To_Chemical_Engineering/ch3.ipynb')
-rw-r--r-- | Introduction_To_Chemical_Engineering/ch3.ipynb | 161 |
1 files changed, 131 insertions, 30 deletions
diff --git a/Introduction_To_Chemical_Engineering/ch3.ipynb b/Introduction_To_Chemical_Engineering/ch3.ipynb index 0b6043d2..ea36928b 100644 --- a/Introduction_To_Chemical_Engineering/ch3.ipynb +++ b/Introduction_To_Chemical_Engineering/ch3.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "" + "name": "", + "signature": "sha256:dbac782d2047bc932ec3aad32143307f0552c9467f7618787890ce24a03238d4" }, "nbformat": 3, "nbformat_minor": 0, @@ -27,12 +28,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", "\n", + "# Variables\n", "w_C = 0.6; #amount of carbon in coal\n", "N2_content = 40. #in m3 per 100m3 air\n", "\n", + "# Calculations\n", "air_consumed = N2_content/0.79;\n", "weight_air = air_consumed*(28.8/22.4);\n", "O2_content = air_consumed*32*(0.21/22.4); #in kg\n", @@ -47,6 +50,7 @@ "total_consumption = C_consumption1+C_consumption2;\n", "coal_consumption = total_consumption/w_C;\n", "\n", + "# Results\n", "print \"coal consumption = %f kg\"%(coal_consumption)\n" ], "language": "python", @@ -74,13 +78,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", "\n", + "# Variables\n", "NH3_required = (17./63)*1000; #NH3 required for 1 ton of nitric acid\n", "NO_consumption = 0.96;\n", "HNO3_consumption = 0.92;\n", "\n", + "# Calculations and Results\n", "NH3_consumed = NH3_required/(NO_consumption*HNO3_consumption);\n", "volume_NH3 = NH3_consumed*(22.4/17);\n", "print \"volume of ammonia consumed= %f cubic metre/h\"%(volume_NH3)\n", @@ -115,14 +121,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", "\n", + "# Variables\n", "HCl_production = 500. #required to be produced in kg\n", "NaCl_required = (117./73)*HCl_production;\n", "yield_ = 0.92;\n", "purity_NaCl= 0.96;\n", "\n", + "# Calculations and Results\n", "actual_NaCl = NaCl_required/(purity_NaCl*yield_);\n", "print \"amount of NaCl required = %f kg\"%(actual_NaCl)\n", "\n", @@ -160,15 +168,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", "\n", + "# Variables\n", "C2H2_produced = (1./64)*0.86; #in kmol\n", "volume_C2H2 = C2H2_produced*22.4*1000; #in l\n", "\n", + "# Calculations\n", + "#assuming ideal behaviour,\n", "volume = (100/101.3)*(273./(273+30));\n", "time = (volume_C2H2/volume)*(1./60);\n", "\n", + "# Results\n", "print \"time of service = %f hr\"%(time)\n", "\n" ], @@ -197,14 +209,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", "\n", + "# Variables\n", "xv = 0.88;\n", "xf = 0.46;\n", "xl = 0.32;\n", "F= 100. #in kg\n", "\n", + "# Calculations and Results\n", "L = (F*(xf-xv))/(xl-xv);\n", "V = F-L;\n", "print \"L = %f Kg V = %f Kg\"%(L,V)\n", @@ -246,13 +260,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", "\n", + "# Variables\n", "G1 = 3600. #in m3/h\n", "P = 106.6 #in kPa\n", "T = 40 #in degree C\n", "\n", + "# Calculations and Results\n", "q = G1*(P/101.3)*(273./((273+T))); #in m3/s\n", "m = q/22.4; #in kmol/h\n", "y1 = 0.02;\n", @@ -263,12 +279,16 @@ "Gs = m*(1-y1);\n", "print \"moles of benzene free gas = %f kmol drygas/h\"%(Gs)\n", "\n", + "#for 95% removal\n", "Y2 = Y1*(1-0.95);\n", "print \"final mole ratio of benzene = %f kmol benzene/kmol dry gas\"%(Y2)\n", "\n", "x2 = 0.002\n", "X2 = 0.002/(1-0.002);\n", "\n", + "#at equilibrium y* = 0.2406X\n", + "#part 1\n", + "#for oil rate to be minimum the wash oil leaving the absorber must be in equilibrium with the entering gas\n", "\n", "y1 = 0.02;\n", "x1 = y1/(0.2406);\n", @@ -276,6 +296,7 @@ "min_Ls = Gs*((Y1-Y2)/(X1-X2));\n", "print \"minimum Ls required = %f kg/h\"%(min_Ls*260)\n", "\n", + "#for 1.5 times of the minimum\n", "Ls = 1.5*min_Ls;\n", "print \"flow rate of wash oil = %f kg/h\"%(Ls*260)\n", "X1 = X2 + (Gs*((Y1-Y2)/Ls));\n", @@ -311,38 +332,46 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "from scipy.optimize import fsolve \n", "import math \n", "\n", + "# Variables\n", "xf = 0.01\n", "Xf = xf/(1-xf);\n", "Feed = 100 #feed in kg\n", "\n", + "# Calculations and Results\n", "c_nicotine = Feed*Xf; #nicotine conc in feed\n", "c_water = Feed*(1-Xf) #water conc in feed\n", "\n", + "#part 1\n", "def F1(x):\n", " return (x/150.)-0.9*((1-x)/99.);\n", "\n", + "#initial guess\n", "x = 10.;\n", "y = fsolve(F1,x)\n", "print \"amount of nicotine removed N = %f kg\"%(y)\n", + "#part 2\n", "def F2(x):\n", " return (x/50.)-0.9*((1-x)/99.);\n", "\n", + "#initial guess\n", "x = 10.;\n", "N1 = fsolve(F2,x)\n", "print \"amount of nicotine removed in stage 1, N1 = %f kg\"%(N1)\n", "def F3(x):\n", " return (x/50.)-0.9*((1-x-N1)/99.);\n", "\n", + "#initial guess\n", "x = 10.;\n", "N2 = fsolve(F3,x)\n", "print \"amount of nicotine removed in stage 2, N2 = %f kg\"%(N2)\n", "def F4(x):\n", " return (x/50.)-0.9*((1-x-N2-N1)/99.);\n", "\n", + "#initial guess\n", "x = 10.;\n", "N3 = fsolve(F4,x)\n", "\n", @@ -379,9 +408,10 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", "\n", + "# Variables\n", "vp_water = 31.06 #in kPa\n", "vp_benzene = 72.92 #in kPa\n", "\n", @@ -389,11 +419,13 @@ "x_benzene = vp_benzene/P;\n", "x_water = vp_water/P;\n", "\n", + "# Calculations\n", "initial_water = 50./18; #in kmol of water\n", "initial_benzene = 50./78 #in kmol of benzene\n", "water_evaporated = initial_benzene*(x_water/x_benzene);\n", "water_left = (initial_water - water_evaporated);\n", "\n", + "# Results\n", "print \"amount of water left in residue = %f kg\"%(water_left*18)\n" ], "language": "python", @@ -421,12 +453,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "po_D = 4.93 #in kPa\n", "po_W = 96.3 #in kPa\n", "n = 0.75 #vaporization efficiency\n", "\n", + "# Calculations and Results\n", "P = n*po_D+po_W;\n", "print \"P = %f kPa\"%(P)\n", "\n", @@ -435,6 +469,7 @@ "wt_dimethylanaline = (x_dimethylanaline*121)/(x_dimethylanaline*121+x_water*18);\n", "print \"weight of dimethylanaline in water = %f\"%(wt_dimethylanaline*100)\n", "\n", + "#part 1\n", "n = 0.8;\n", "po_D = 32 #in kPa\n", "actual_vp = n*po_D;\n", @@ -442,6 +477,7 @@ "steam_required = (p_water*18)/(actual_vp*121);\n", "print \"amount of steam required = %f kg steam/kg dimethylanaline\"%(steam_required)\n", "\n", + "#part 2\n", "x_water = p_water/100.;\n", "wt_water = x_water*18./(x_water*18+(1-x_water)*121.);\n", "print \"weight of water vapor = %f weight of dimethylanaline =%f\"%(wt_water*100,100*(1-wt_water))\n" @@ -474,18 +510,21 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "xf = 0.15;\n", "xl = (114.7)/(114.7+1000);\n", "xc = 1;\n", "\n", + "# Calculations\n", "K2Cr2O7_feed = 1000*0.15; #in kg\n", "\n", "n = 0.8;\n", "C = n*K2Cr2O7_feed;\n", "V = (K2Cr2O7_feed-120 - 880*0.103)/(-0.103);\n", "\n", + "# Results\n", "print \"amount of water evaporated = %f kg\"%(V)\n" ], "language": "python", @@ -513,12 +552,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "xc = round(106./286,3);\n", "xf = 0.25;\n", "xl = round(27.5/127.5,3);\n", "\n", + "# Calculations\n", "water_present = 100*(1-xf); #in kg\n", "V = 0.15*75; #in kg\n", "C = (100*xf - 88.7*xl)/(xc-xl);\n", @@ -526,6 +567,7 @@ "\n", "yield_ = (C/Na2CO3_feed)*100;\n", "\n", + "# Results\n", "print \"yield = %.1f %%\"%(yield_)\n" ], "language": "python", @@ -553,20 +595,23 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "r = 50. #weight of dry air passing through drier\n", "w1 = 1.60 #in kg per kg dry solid\n", "w2 = 0.1 #in kg/kg dry solid\n", "H0 = 0.016 #in kg water vapor/kg dry air\n", "H2 = 0.055 #in kg water vapor/kg dry air\n", "\n", + "# Calculations and Results\n", "y = 1 - (w1-w2)/(r*(H2-H0));\n", "print \"fraction of air recirculated = %f\"%(y)\n", "\n", "H1 = H2 - (w1-w2)/r;\n", "print \"humidity of air entering the drier = %f kg water vapor/kg kg dry air\"%(H1)\n", "\n", + "#check\n", "H11 = H2*y+H0*(1-y);\n", "if H1 == H11:\n", " print \"fraction of air recirculated = %f verified\"%(y)\n" @@ -598,12 +643,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "Hf = 0.012;\n", "Hi = 0.033;\n", "H1 = 0.0075;\n", "\n", + "# Calculations and Results\n", "water_vapor = Hf/18.; #in kmol of water vapor\n", "dry_air = 1/28.9; #in kmol\n", "total_mass = water_vapor+dry_air;\n", @@ -612,10 +659,12 @@ "weight = 60/volume;\n", "print \"weight of dry air handled per hr = %f kg\"%(weight)\n", "\n", + "#part 1\n", "inlet_watervapor = 0.033/18; #in kmol of water vapor\n", "volume_inlet = 22.4*(308./273)*(inlet_watervapor+dry_air);\n", "print \"volumetric flow rate of inlet air = %f cubic meter\"%(volume_inlet*weight)\n", "\n", + "#part 2\n", "y = (Hf - Hi)/(H1 - Hi);\n", "print \"fraction of inlet air passing through cooler = %f\"%(y)\n" ], @@ -646,18 +695,24 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", "\n", + "# Variables\n", + "#x- moles of N2 and H2 recycled; y - moles of N2 H2 purged\n", "Ar_freshfeed = 0.2;\n", + "#argon in fresh feed is equal to argon in purge \n", "\n", + "# Calculations and Results\n", "y = 0.2/0.0633; #argon in purge = 0.0633y\n", "x = (0.79*100 - y)/(1-0.79);\n", "print \"y = %f kmolx = %f kmol\"%(y,x)\n", "\n", + "#part 1\n", "fraction = y/x;\n", "print \"fration of recycle that is purged = %f\"%(fraction)\n", "\n", + "#part 2\n", "yield_ = 0.105*(100+x);\n", "print \"overall yield of ammonia = %f kmol\"%(yield_)\n" ], @@ -688,14 +743,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "H0_CH4 = -74.9 #in kJ\n", "H0_CO2 = -393.5 #in kJ\n", "H0_H2O = -241.8 #in kJ\n", "\n", + "# Calculations\n", "delta_H0 = H0_CO2+2*H0_H2O-H0_CH4;\n", "\n", + "# Results\n", "print \"change in enthalpy = %f kJ\"%(delta_H0)\n" ], "language": "python", @@ -723,16 +781,20 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "H0_glucose = -1273 #in kJ\n", "H0_ethanol = -277.6 #in kJ\n", "H0_CO2 = -393.5 #in kJ\n", "H0_H2O = -285.8 #in kJ\n", "\n", + "# Calculations and Results\n", + "#for reaction 1\n", "delta_H1 = 2*H0_ethanol+2*H0_CO2-H0_glucose;\n", "print \"enthalpy change in reaction 1 = %f KJ\"%(delta_H1)\n", "\n", + "#for reaction 2\n", "delta_H2 = 6*H0_H2O+6*H0_CO2-H0_glucose;\n", "print \"enthalpy change in reaction 2 = %f kJ\"%(delta_H2)\n", "\n", @@ -768,15 +830,18 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "delta_H2 = 11.7 #in kJ/mol\n", "m_CuSO4 = 16 #in gm\n", "m_H2O = 384 #in gm\n", "\n", + "# Calculations\n", "delta_H3 = -((m_CuSO4+m_H2O)*4.18*3.95*159.6)/(16*10**3)\n", "delta_H1 = delta_H3 - delta_H2;\n", "\n", + "# Results\n", "print \"enthalpy of formation = %f kJ/mol\"%(delta_H1)\n" ], "language": "python", @@ -804,16 +869,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "H_combustion = 1560000 #in kJ/kmol \n", "H0_CO2 = 54.56 #in kJ/kmol\n", "H0_O2 = 35.2 #in kJ/kmol\n", "H0_steam = 43.38 #in kJ/kmol\n", "H0_N2 = 33.32 #in kJ/kmol\n", "\n", + "# Calculations\n", "t = H_combustion/(2*H0_CO2+3*H0_steam+0.875*H0_O2+16.46*H0_N2);\n", "\n", + "# Results\n", "print \"theoritical temperature of combustion = %f degree C\"%(t)\n" ], "language": "python", @@ -841,13 +909,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "H_NaCl = 410.9 #in MJ/kmol\n", "H_H2SO4 = 811.3 #in MJ/kmol\n", "H_Na2SO4 = 1384 #in MJ/kmol\n", "H_HCl = 92.3 #in MJ/kmol\n", "\n", + "# Calculations and Results\n", "Q = H_Na2SO4 + 2*H_HCl -2*H_NaCl-H_H2SO4;\n", "print \"heat of reaction = %f MJ\"%(Q)\n", "\n", @@ -881,17 +951,20 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "cp_water = 146.5 #in kj/kg\n", "cp_steam = 3040 #in kJ/kg\n", "d = 0.102 #in m\n", "u = 1.5 #in m/s\n", "density = 1000 #in kg/m3\n", "\n", + "# Calculations\n", "m = (3.14/4)*d**2*u*density;\n", "Q = m*(cp_steam-cp_water);\n", "\n", + "# Results\n", "print \"rate of heat flow = %f kW\"%(Q)\n" ], "language": "python", @@ -919,8 +992,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "wt_C = 0.75 #in kg\n", "wt_H2 = 0.05 #in kg\n", "wt_O2 = 0.12 #in kg\n", @@ -928,6 +1002,7 @@ "wt_S = 0.01 #in kg\n", "wt_ash = 0.04 #in kg\n", "\n", + "# Calculations and Results\n", "O2_C = wt_C*(32./12); #in kg\n", "O2_H2 = wt_H2*(16./2); #in kg\n", "O2_S = wt_S*(32./32); #in kg\n", @@ -965,6 +1040,7 @@ "print \"N2 = %f %%\"%(x_N2*100)\n", "print \"O2 = %f %%\"%(x_O2*100)\n", "\n", + "# Note : answers are slightly different because of rounding error." ], "language": "python", "metadata": {}, @@ -996,13 +1072,16 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "C = 0.8 #in kg\n", "H2 = 0.05 #in kg\n", "S = 0.005 #in kg\n", "ash = 0.145 #in kg\n", "\n", + "# Calculations and Results\n", + "#required oxygen in kg\n", "C_O2 = C*(32./12); \n", "H2_O2 = H2*(16./2);\n", "S_O2 = S*(32./32);\n", @@ -1013,6 +1092,7 @@ "wt_airsupplied = 1.25*wt_air;\n", "print \"amount of air supplied = %f kg\"%(wt_airsupplied)\n", "\n", + "#flue gas composition\n", "m_N2 = wt_airsupplied*0.77; #in kg\n", "mole_N2 = m_N2/28.;\n", "\n", @@ -1030,6 +1110,7 @@ "\n", "m = m_N2+m_O2+m_CO2+m_H2O+m_SO2\n", "\n", + "#percent by weight\n", "w_N2 = m_N2/m;\n", "print \"percentage of N2 by weight = %f\"%(w_N2*100)\n", "\n", @@ -1047,6 +1128,7 @@ "\n", "m1 = mole_N2+mole_O2+mole_CO2+mole_H2O+mole_SO2\n", "\n", + "#percent by mole \n", "x_N2 = mole_N2/m1;\n", "print \"percentage of N2 by mole = %f\"%(x_N2*100)\n", "\n", @@ -1098,13 +1180,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "wt_H2 = 0.15;\n", "wt_C = 0.85;\n", "O2_H2 = wt_H2*(16./2);\n", "O2_C = wt_C*(32./12);\n", "\n", + "# Calculations and Results\n", "total_O2 = O2_H2+O2_C;\n", "wt_air = total_O2/0.23;\n", "air_supplied = 1.15*(wt_air);\n", @@ -1152,16 +1236,19 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "N2 = 80.5 #in m3\n", "air_supplied = N2/0.79 #in m3\n", "volume_O2 = air_supplied*0.21; #in m3\n", "O2_fluegas = 6.1 #in m3\n", "\n", + "# Calculations\n", "O2_used = volume_O2 - O2_fluegas;\n", "excess_air_supplied = (O2_fluegas/O2_used)*100;\n", "\n", + "# Results\n", "print \"percentage of excess air supplied = %f\"%(excess_air_supplied)\n" ], "language": "python", @@ -1189,12 +1276,14 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "q_NTP = 10*(200/101.3)*(273./313);\n", "m_CO2 = 44*(q_NTP/22.4);\n", "s_CO2 = 0.85 #in kJ/kg K\n", "\n", + "# Calculations\n", "Q = m_CO2*s_CO2*(40-20) #Q = ms*delta_T\n", "\n", "d0 = 0.023 #in mm\n", @@ -1209,6 +1298,7 @@ "s_water = 4.19 #in kJ/kg K\n", "t = 15+(Q/(m_water*s_water));\n", "\n", + "# Results\n", "print \"exit water temperature = %f degree C\"%(t)\n" ], "language": "python", @@ -1236,11 +1326,13 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "F = 1000 #in kg\n", "xF = 0.01 \n", "\n", + "# Calculations and Results\n", "solid_feed = F*xF;\n", "water_feed = F - solid_feed;\n", "\n", @@ -1262,6 +1354,7 @@ "tc = 108.4 #in degree C\n", "hc = 454 #in kJ/kg\n", "\n", + "#applying heat balance\n", "S = (F*hF-V*Hv-L*hL)/(hc-Hs);\n", "print \"weight of steam required = %f kg/hr\"%(S)\n", "\n", @@ -1297,8 +1390,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "hF = 171 #in kJ/kg\n", "hD = 67 #in kJ/kg\n", "hL = hD;\n", @@ -1312,6 +1406,7 @@ "xW = 0.02;\n", "xD = 0.97;\n", "\n", + "# Calculations and Results\n", "D = F*(xF-xW)/(xD-xW);\n", "W = F-D;\n", "\n", @@ -1359,19 +1454,22 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "F = 1000.; #in kg\n", "V = 0.05*F; #in kg\n", "xF = 0.48;\n", "xL = 75./(100+75);\n", "xC = 1.;\n", "\n", + "# Calculations and Results\n", "C = (F*xF-950*xL)/(1-0.429);\n", "print \"rate of crystal formation = %f kg\"%(C)\n", "\n", "L = F-C-V;\n", "\n", + "#cooling water\n", "W = (F*2.97*(85-35)+126.9*75.2-V*2414)/(4.19*11);\n", "print \"rate of cooling water = %f kg\"%(W)\n", "\n", @@ -1410,12 +1508,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", + "# Variables\n", "delta_n = 10-12.; #mole per mole napthanlene\n", "\n", + "#basis 1g\n", "moles_napthalene = (1./128);\n", "\n", + "# Calculations and Results\n", "print ('part 1')\n", "Qv = 40.28 #in kJ\n", "Qp = Qv-(delta_n*moles_napthalene*8.3144*298./1000);\n", |