summaryrefslogtreecommitdiff
path: root/Introduction_To_Chemical_Engineering
diff options
context:
space:
mode:
Diffstat (limited to 'Introduction_To_Chemical_Engineering')
-rw-r--r--Introduction_To_Chemical_Engineering/ch3.ipynb161
-rw-r--r--Introduction_To_Chemical_Engineering/ch5.ipynb93
2 files changed, 201 insertions, 53 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",
diff --git a/Introduction_To_Chemical_Engineering/ch5.ipynb b/Introduction_To_Chemical_Engineering/ch5.ipynb
index 6af51e50..24e997c2 100644
--- a/Introduction_To_Chemical_Engineering/ch5.ipynb
+++ b/Introduction_To_Chemical_Engineering/ch5.ipynb
@@ -1,6 +1,7 @@
{
"metadata": {
- "name": ""
+ "name": "",
+ "signature": "sha256:a84d51472594c75f9afdf6cd721b95cb9d112fa36b409d534c3bc68aa928266a"
},
"nbformat": 3,
"nbformat_minor": 0,
@@ -27,18 +28,21 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
+ "# Variables\n",
"A=5.*4 #in m2\n",
"T1=100.; #in K\n",
"T2=30.; #in K\n",
"\n",
+ "# Calculations\n",
"delta_T=T1-T2;\n",
"\n",
"x=0.25 #in m\n",
"k=0.70 #in W/mK\n",
"Q=k*A*(delta_T/x);\n",
"\n",
+ "# Results\n",
"print \"rate of heat loss = %f W\"%(Q)\n"
],
"language": "python",
@@ -66,12 +70,14 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
+ "# Variables\n",
"d1=0.15 #in m\n",
"d2=0.16 #in m\n",
"l=1. #in m\n",
"\n",
+ "# Calculations\n",
"A1=3.14*d1*l;\n",
"A2=3.14*d2*l\n",
"Am=(A1-A2)/math.log (A1/A2);\n",
@@ -84,6 +90,7 @@
"k=50. #in W/mK\n",
"Q=k*Am*(delta_T/x);\n",
"\n",
+ "# Results\n",
"print \"rate of heat loss per unit length = %f W/m\"%(Q)\n"
],
"language": "python",
@@ -111,13 +118,15 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
+ "# Variables\n",
"ri=0.5 #in m\n",
"ro=0.6; #in m\n",
"A1=4*3.14*ri**2;\n",
"A2=4*3.14*ro**2;\n",
"\n",
+ "# Calculations\n",
"Am=(A1*A2)**0.5;\n",
"\n",
"Ti=140.; #in K\n",
@@ -128,6 +137,7 @@
"\n",
"Q=k*Am*(delta_T/x);\n",
"\n",
+ "# Results\n",
"print \"Heat loss through sphere = %f W\"%(Q)\n"
],
"language": "python",
@@ -155,13 +165,16 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
+ "# Variables\n",
"x1=0.250; #in m\n",
"k1=0.7; #in W/mK\n",
"A1=1.; #in m2\n",
"R1=x1/(k1*A1); #in K/W\n",
"\n",
+ "# Calculations and Results\n",
+ "#for the felt layer\n",
"x2=0.020; #in m\n",
"k2=0.046; #in W/mK\n",
"A2=1.; #in m2\n",
@@ -201,8 +214,9 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
+ "# Variables\n",
"d1=0.15 #in m\n",
"d2=0.16 #in m\n",
"l=1. #in m\n",
@@ -213,6 +227,8 @@
"k1=50. #in W/mK\n",
"R1=x1/(k1*Am1);\n",
"\n",
+ "# Calculations and Results\n",
+ "#resistance by insulation\n",
"d2=0.16 #in m\n",
"d3=0.26 #in m\n",
"l=1. #in m\n",
@@ -259,8 +275,9 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
+ "# Variables\n",
"x1=0.1; #in m\n",
"x2= 0.25; #in m\n",
"k_rb=0.93; #in W/mK\n",
@@ -268,6 +285,8 @@
"k_al=203.6 #in W/mK\n",
"A=0.1 #in m2\n",
"\n",
+ "# Calculations and Results\n",
+ "#to find resistance without rivets\n",
"R=(1/A)*((x1/k_rb)+(x2/k_ib));\n",
"T1=225 #in K\n",
"T2=37 #in K\n",
@@ -275,6 +294,7 @@
"Q=delta_T/R;\n",
"print \"heat transfer rate = %f W\"%(Q)\n",
"\n",
+ "#to find resistance with rivet\n",
"d=0.03 #in m\n",
"rivet_area= (3.14/4)*d**2;\n",
"R_r=(x1+x2)/(k_al*rivet_area);\n",
@@ -314,20 +334,17 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''\n",
- "calculate the heat tranfer coefficient based on \n",
- "i) the arithmetic mean difference between the temperatures of the water and the wall of the tube\n",
- "ii) the logarithmic mean difference between the temperatures of the water and the wall of the tube.\n",
- "'''\n",
- "\n",
+ " \n",
"import math\n",
"\n",
+ "# variables\n",
"Cp = 4.178 # kJ/kg K for water\n",
"q = 1838. # rate at which heat is transfered\n",
"A = .1005 # heat transfer area\n",
"dt1 = 80. - 24 # temperature diffference at hot end\n",
"dt2 = 36.-24 # temperature difference at cold end\n",
"\n",
+ "# Calculations and Results\n",
"dtm = (56 + 12)/2.0\n",
"h = q/(A*dtm)\n",
"print \"Heat transfer coefficient, h = %.0f W/m**2 K\"%h\n",
@@ -363,9 +380,10 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
"\n",
+ "# Variables\n",
"density=984.1 #in kg/cubic meter\n",
"v=3. #in m/s\n",
"viscosity=485*10**-6; #in Pa-s\n",
@@ -373,12 +391,15 @@
"cp=4178. #in J/kg K\n",
"d=0.016 #in m\n",
"\n",
+ "# Calculations and Results\n",
"Re=(density*v*d)/viscosity;\n",
"Pr=(cp*viscosity)/k;\n",
"\n",
+ "#dittus boelter equation\n",
"h=0.023*Re**0.8*Pr**0.3*(k/d);\n",
"print \"heat transfer coefficient = %f W/sq meter K\"%(h)\n",
"\n",
+ "#Sieder Tate equation\n",
"viscosity_w=920*10**-6.\n",
"h1=0.023*Re**0.8*Pr**(1./3)*(k/d)*(viscosity/viscosity_w)**0.14;\n",
"print \"heat transfer coefficient = %f W/sq meter K\"%(h1)\n"
@@ -409,14 +430,17 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
+ "# Variables\n",
"T_sun = 5973 #in degree C\n",
"d = 1.5*10**13 #in cm\n",
"R = 7.1*10**10; #in cm\n",
"\n",
+ "# Calculations\n",
"T_earth = ((R/(2*d))**0.5)*T_sun;\n",
"\n",
+ "# Results\n",
"print \"Temperature of earth = %f C\"%(T_earth-273) \n"
],
"language": "python",
@@ -444,14 +468,17 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
+ "# Variables\n",
"R=7*10**10; #in cm\n",
"Ts=6000; #in K\n",
"\n",
+ "# Calculations\n",
"l=1.5*10**13; #in m\n",
"To=((R**2/(4*l**2))**0.25)*Ts;\n",
"\n",
+ "# Results\n",
"print \"temperature of earth = %f K\"%(To)\n"
],
"language": "python",
@@ -479,14 +506,17 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
+ "# Variables\n",
"R=6.92*10**5 #in km\n",
"l=14.97*10**7 #in km\n",
"Ts=6200; #in K\n",
"\n",
+ "# Calculations\n",
"To=(R**2/l**2)**0.25*Ts;\n",
"\n",
+ "# Results\n",
"print \"Equilibrium temperature = %f K\"%(To)\n"
],
"language": "python",
@@ -514,15 +544,18 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
+ "# Variables\n",
"view_factor=0.5;\n",
"R=6.92*10**5 #in km\n",
"l=14.97*10**7 #in km\n",
"Ts=6200; #in K\n",
"\n",
+ "# Calculations\n",
"To=(view_factor*(R**2/l**2))**0.25*Ts;\n",
"\n",
+ "# Results\n",
"print \"Equilibrium temperature = %f K\"%(To)\n",
"\n",
"\n"
@@ -552,8 +585,9 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
+ "# Variables\n",
"view_factor=0.25;\n",
"R=7.1*10**10 #in cm\n",
"l=1.5*10**13 #in cm\n",
@@ -561,10 +595,12 @@
"alpha=0.2;\n",
"epsilon=0.1;\n",
"\n",
+ "# Calculations\n",
"ratio=alpha/epsilon;\n",
"To=(ratio*view_factor*(R**2/l**2))**0.25*Ts;\n",
"\n",
"\n",
+ "# Results\n",
"print \"Equilibrium temperature = %f K\"%(To)\n"
],
"language": "python",
@@ -592,15 +628,18 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
+ "# Variables\n",
"R=7*10**10; #in cm\n",
"l=1.5*10**13; #in cm\n",
"sigma=5.3*10**-5; #in erd/s(cm2)(K)4\n",
"T=6000; #in K\n",
"\n",
+ "# Calculations\n",
"S=(R/l)**2*(sigma)*(T**4)*60;\n",
"\n",
+ "# Results\n",
"print \"solar constant = %f J/sq cm min\"%(S/10**7)\n"
],
"language": "python",
@@ -628,12 +667,14 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
+ "# Variables\n",
"F = 5000. #in kg/hr\n",
"xF = 0.01\n",
"xL = 0.02;\n",
"\n",
+ "# Calculations and Results\n",
"L = F*xF/xL;\n",
"V = F-L;\n",
"print \"L = %f Kg/hr V = %f kg/hr\"%(L,V)\n",
@@ -682,15 +723,18 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
"from numpy import *\n",
+ "# Variables\n",
"b1 = 6000*125.79+3187.56*2691.5-3187.56*461.30; #data from previous problem\n",
"b2 = 6000;\n",
"A = array([[419.04, 2676.1],[1, 1]])\n",
"\n",
+ "# Calculations and Results\n",
"b = array([[b1],[b2]]);\n",
"x = linalg.solve(A,b)\n",
+ "#x = x*b\n",
"L = x[0];\n",
"V = x[1];\n",
"\n",
@@ -727,11 +771,13 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
+ "# Variables\n",
"Hv=2635.3 #kJ/kg\n",
"hL=313.93 #in kJ/kg\n",
"\n",
+ "# Calculations and Results\n",
"S=(2500*313.93+2500*2635.3-5000*125.79)/(2691.5-461.30);\n",
"print \"steam flow rate = %f kg steam/hr\"%(S)\n",
"\n",
@@ -744,6 +790,7 @@
"print \"Area = %f sq meter\"%(A)\n",
"print \"in this case a condensor and vaccum pump should be used\"\n",
"\n",
+ "# Note : there is mistake in calculation in Book. Please calculate manually."
],
"language": "python",
"metadata": {},