Scilab Textbook Companion for Stoichiometry And Process Calculations by K. V. Narayanan And B. Lakshmikutty1 Created by Jimit Dilip Patel FOURTH YEAR Chemical Engineering Visvesvaraya National Institute Of Technology College Teacher Dr. Sachin Mandavagane Cross-Checked by
August 10, 2013
1
Funded by a grant from the National Mission on Education through ICT, http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilab codes written in it can be downloaded from the ”Textbook Companion Project” section at the website http://scilab.in
Book Description Title: Stoichiometry And Process Calculations Author: K. V. Narayanan And B. Lakshmikutty Publisher: Prentice Hall Of India, New Delhi Edition: 1 Year: 2006 ISBN: 81-203-2992-9
1
Book Description Title: Stoichiometry And Process Calculations Author: K. V. Narayanan And B. Lakshmikutty Publisher: Prentice Hall Of India, New Delhi Edition: 1 Year: 2006 ISBN: 81-203-2992-9
1
Scilab numbering policy used in this document and the relation to the above book. Exa Example (Solved example) Eqn Equation (Particular equation of the above book) AP Appendix to Example(Scilab Code that is an Appednix to a particular
Example of the above book) For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means a scilab code whose theory is explained in Section 2.3 of the book.
2
Contents List of Scilab Codes
4
2 Units and Dimensions
11
3 Fundamental concepts of stoichiometry
16
4 Ideal Gases and Gas Mixtures
28
5 Properties of Real Gases
40
6 Vapour Pressure
47
7 Solutions and Phase Behaviour
53
8 Humidity and Humidity chart
68
9 Material Balance in Unit Operations
83
10 Material Balance with Chemical Reaction
101
11 Energy Balance Thermophysics
126
12 Energy Balance Thermochemistry
152
3
List of Scilab Codes Exa 2.1 Exa 2.2 Exa 2.3 Exa 2.4 Exa 2.5 Exa 2.6 Exa 2.7 Exa 2.8 Exa 2.9 Exa 3.1 Exa 3.2 Exa 3.3 Exa 3.4 Exa 3.5 Exa 3.6 Exa 3.7 Exa 3.8 Exa 3.9 Exa 3.10 Exa 3.11 Exa 3.12 Exa 3.13 Exa 3.14 Exa 3.15 Exa 3.16 Exa 3.17 Exa 3.18 Exa 3.19
Mass flow rate . . . . . . . . . . . . . . . . Poundal to Newton . . . . . . . . . . . . . Conversion of N per m2 . . . . . . . . . . . Thermal conductivity . . . . . . . . . . . . Mass and FPS system . . . . . . . . . . . . Kinetic energy calculation . . . . . . . . . . Force and pressure for piston cylinder . . . units conversion . . . . . . . . . . . . . . . units conversion . . . . . . . . . . . . . . . pounds per minute to kmol per hour . . . . Number of molecules . . . . . . . . . . . . . Moles of sodium sulphate . . . . . . . . . . Pyrites and oxygen moles . . . . . . . . . . Volume of oxygen . . . . . . . . . . . . . . Reaction of iron and steel . . . . . . . . . . Equivalent weight . . . . . . . . . . . . . . Specific gravity calculation . . . . . . . . . Specific gravity of mixture . . . . . . . . . . Baume scale . . . . . . . . . . . . . . . . . Density using API scale . . . . . . . . . . . Drying Ammonium sulphate . . . . . . . . Percentage of water removed . . . . . . . . Amount and percentage water removed . . NaCl solution . . . . . . . . . . . . . . . . . Molal absolute humidity . . . . . . . . . . . K2CO3 solution . . . . . . . . . . . . . . . Molarity and Molality of Alcohol solution . CO to phosgene . . . . . . . . . . . . . . . 4
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
11 11 12 12 13 13 13 14 15 16 16 17 17 18 18 19 19 19 20 20 21 21 22 22 23 23 24 25
Exa 3.20 Exa 3.21 Exa 4.1 Exa 4.2 Exa 4.3 Exa 4.4 Exa 4.5 Exa 4.6 Exa 4.7 Exa 4.8 Exa 4.9 Exa 4.10 Exa 4.11 Exa 4.12 Exa 4.13 Exa 4.14 Exa 5.1 Exa 5.2 Exa 5.3 Exa 5.4 Exa 5.5 Exa 5.6 Exa 5.7 Exa 5.8 Exa 5.9 Exa 6.1 Exa 6.2 Exa 6.3 Exa 6.4 Exa 6.5 Exa 6.6 Exa 7.1 Exa 7.2 Exa 7.3
Extent of reaction . . . . . . . . . . . . . . . . . . . . ethylene to ethanol . . . . . . . . . . . . . . . . . . . . gas constant R . . . . . . . . . . . . . . . . . . . . . . Molar volume of air . . . . . . . . . . . . . . . . . . . Ideal gas equation . . . . . . . . . . . . . . . . . . . . Maximum allowable temperature of tyre . . . . . . . . Pressure calculation . . . . . . . . . . . . . . . . . . . weight composition and density calculation . . . . . . calculations for natural gas . . . . . . . . . . . . . . . Volume of gas from absorption columnn . . . . . . . . dehumidification . . . . . . . . . . . . . . . . . . . . . Absorption column for H2S . . . . . . . . . . . . . . . Reaction stoichiometry for preparation of ammonia . . Reaction stoichiometry for preparation of producer gas Reaction stoichiometry for preparation of Chlorine from HCl . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reaction stoichiometry for dissociation of Carbon Dioxide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Van der waals equation . . . . . . . . . . . . . . . . . Van der waals equation for CO2 gas . . . . . . . . . . Redlich Kwong equation for gaseous ammonia . . . . . Molar Volume calculation for gaseous ammonia . . . . virial equation of state . . . . . . . . . . . . . . . . . . Lyderson method for n butane . . . . . . . . . . . . . Pitzer correlation for n butane . . . . . . . . . . . . . Molar volume by different methods . . . . . . . . . . . Van der waals equation and Kays method . . . . . . . Quality of steam . . . . . . . . . . . . . . . . . . . . . Calculation of vapour pressure . . . . . . . . . . . . . Clausius Clapeyron equation for acetone . . . . . . . . Antoine equation for n heptane . . . . . . . . . . . . . Cox chart . . . . . . . . . . . . . . . . . . . . . . . . . Duhring line . . . . . . . . . . . . . . . . . . . . . . . composition calculation of Liquid and vapour at equilibrium . . . . . . . . . . . . . . . . . . . . . . . . . . Composition and total pressure calculation . . . . . . Mole fraction calculation for particular component in liquid vapour mixture . . . . . . . . . . . . . . . . . . 5
25 26 28 28 29 29 30 30 31 32 33 33 34 35 37 38 40 40 41 41 42 42 43 43 45 47 47 48 49 49 51 53 53 54
Exa 7.4 Exa 7.5.a Exa 7.5.b Exa 7.6 Exa 7.7 Exa 7.8 Exa 7.9 Exa 7.10 Exa 7.11 Exa 7.12 Exa 7.13 Exa 7.14 Exa 7.15 Exa 8.1 Exa 8.2 Exa 8.3 Exa 8.4 Exa 8.5 Exa 8.6 Exa 8.7 Exa 8.8 Exa 8.9 Exa 8.10 Exa 8.11 Exa 8.12 Exa 8.14 Exa 8.15 Exa 8.16 Exa 8.17 Exa 8.18 Exa 8.19 Exa 9.1 Exa 9.2 Exa 9.3 Exa 9.4 Exa 9.5 Exa 9.6
Flash vapourization of benzene toluene mixture . . . . Boiling point diagram . . . . . . . . . . . . . . . . . . Equilibrium Diagram . . . . . . . . . . . . . . . . . . Bubble point temperature and vapour composition . . Dew point temperature pressure and concentration . . Partial pressure of acetaldehyde . . . . . . . . . . . . . Raults law application . . . . . . . . . . . . . . . . . . Dew point temperature and pressure . . . . . . . . . . bubble point and dew point . . . . . . . . . . . . . . . component calculations . . . . . . . . . . . . . . . . . equilibrium temperature and composition . . . . . . . Temperature composition diagram . . . . . . . . . . . Boiling point calculation . . . . . . . . . . . . . . . . . Nitrogen and ammonia gas mixture . . . . . . . . . . . Benzene vapour air mixture . . . . . . . . . . . . . . . Evaporation of acetone using dry air . . . . . . . . . . Humidity for acetone vapour and nitrogen gas mixture Percent saturation and relative saturation . . . . . . . Analysis of Moist air . . . . . . . . . . . . . . . . . . . Heating value calculation for a fuel gas . . . . . . . . . Analysis of nitrogen benzene mixture . . . . . . . . . . Drying . . . . . . . . . . . . . . . . . . . . . . . . . . Saturation lines for hexane . . . . . . . . . . . . . . . Psychometric chart application . . . . . . . . . . . . . Humid heat calculation for a sample of air . . . . . . . wet bulb temperature and dry bulb temperature . . . Humidity calculation . . . . . . . . . . . . . . . . . . . SAturation curve and adiabatic cooling line . . . . . . Adiabatic drier . . . . . . . . . . . . . . . . . . . . . . Psychometric chart application . . . . . . . . . . . . . Psychometric chart application and given wet bulb and dry bulb temperature . . . . . . . . . . . . . . . . . . Combustion of coal . . . . . . . . . . . . . . . . . . . . Drying of wood . . . . . . . . . . . . . . . . . . . . . . Effluent discharge . . . . . . . . . . . . . . . . . . . . benzene requirement calculation . . . . . . . . . . . . Fortification of waste acid . . . . . . . . . . . . . . . . Triple effect evaporator . . . . . . . . . . . . . . . . . 6
55 56 56 58 58 59 59 61 62 63 65 65 67 68 69 69 70 71 71 72 73 74 76 76 77 78 78 79 80 81 82 83 83 84 84 85 86
Exa 9.7 Exa 9.8 Exa 9.9 Exa 9.10 Exa 9.11 Exa 9.12 Exa 9.13 Exa 9.14 Exa 9.15 Exa 9.16 Exa 9.17 Exa 9.18 Exa 9.19 Exa 9.20 Exa 9.21 Exa 9.22 Exa 10.1 Exa 10.2 Exa 10.3 Exa 10.4 Exa 10.5 Exa 10.6 Exa 10.7 Exa 10.8 Exa 10.9 Exa 10.10 Exa 10.11 Exa 10.12 Exa 10.13 Exa 10.14 Exa 10.15 Exa 10.16 Exa 10.17 Exa 10.18 Exa 10.19 Exa 10.20 Exa 10.21 Exa 10.22
Crystallization operation . . . . . . . . . . . . Evaporation of Na2CO3 . . . . . . . . . . . . . Crystallization . . . . . . . . . . . . . . . . . . Extraction . . . . . . . . . . . . . . . . . . . . Leaching operation . . . . . . . . . . . . . . . . Dryer and oven . . . . . . . . . . . . . . . . . . Adiabatic drier . . . . . . . . . . . . . . . . . . Extraction of isopropyl alcohol . . . . . . . . . Absorption of acetone . . . . . . . . . . . . . . Absorption of SO3 . . . . . . . . . . . . . . . . Continuous distillation column . . . . . . . . . Distillation operation for methanol solution . . Bypass operation . . . . . . . . . . . . . . . . . Recycle operation centrifuge plus filter . . . . . Recycle operation granulator and drier . . . . . Blowdown operation . . . . . . . . . . . . . . . Combustion of propane . . . . . . . . . . . . . Combustion of hydrogen free coke . . . . . . . Combustion of fuel oil . . . . . . . . . . . . . . Combustion of producer gas . . . . . . . . . . . Combustion of coal . . . . . . . . . . . . . . . . Stoichiometric analysis of combustion of coal . Orsat analysis . . . . . . . . . . . . . . . . . . Burning of pyrites . . . . . . . . . . . . . . . . Production of sulphuric acid . . . . . . . . . . Burning of limestone mixed with coke . . . . . treating limestone with aqueous H2SO4 . . . . Production of TSP . . . . . . . . . . . . . . . . Production of sodium phosphate . . . . . . . . Production of pig iron . . . . . . . . . . . . . . Production of nitric acid . . . . . . . . . . . . . Material balance in nitric acid production . . . Electrolysis of brine . . . . . . . . . . . . . . . Preparation of Formaldehyde . . . . . . . . . . Recycle operation reactor and separator . . . . Conversion of sugar to glucose and fructose . . Purging operation . . . . . . . . . . . . . . . . Purging operation for production of methanol . 7
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
86 87 88 89 89 90 91 92 93 94 95 95 96 97 98 99 101 102 103 105 105 106 109 109 111 112 113 115 115 116 117 118 119 121 122 122 123 124
Exa 11.1 Exa 11.2 Exa 11.3 Exa 11.4 Exa 11.5 Exa 11.6 Exa 11.7 Exa 11.8 Exa 11.9 Exa 11.10 Exa 11.11 Exa 11.12 Exa 11.13 Exa 11.14 Exa 11.15 Exa 11.16 Exa 11.17 Exa 11.18 Exa 11.19 Exa 11.20 Exa 11.21 Exa 11.22 Exa 11.23 Exa 11.24 Exa 11.25 Exa 11.26 Exa 11.27 Exa 11.28 Exa 11.29 Exa 11.30 Exa 11.31 Exa 11.32 Exa 11.33 Exa 11.34
Power calculation . . . . . . . . . . . . . . . . . . . . Kinetic energy calculation . . . . . . . . . . . . . . . . Work done calculation for a gas confined in a cylinder Power requirement of the pump . . . . . . . . . . . . . Specific enthalpy of the fluid in the tank . . . . . . . . internal energy and enthalpy change calculation . . . . change in internal energy . . . . . . . . . . . . . . . . reaction of iron with HCl . . . . . . . . . . . . . . . . Thermic fluid . . . . . . . . . . . . . . . . . . . . . . . Heat capacity . . . . . . . . . . . . . . . . . . . . . . . Enthalpy change when chlorine gas is heated . . . . . Molal heat capacity . . . . . . . . . . . . . . . . . . . Enthalpy change of a gas . . . . . . . . . . . . . . . . Combustion of solid waste . . . . . . . . . . . . . . . . Heat capacity calculation for Na2SO4 10H2O . . . . . Heat of vaporization calculation . . . . . . . . . . . . Heat requirement . . . . . . . . . . . . . . . . . . . . . Equilibrium temperature of mixture . . . . . . . . . . Estimation of mean heat of vaporisation . . . . . . . . Heat of vaporization of methyl chloride . . . . . . . . Watson equation . . . . . . . . . . . . . . . . . . . . . Kistyakowsky equation . . . . . . . . . . . . . . . . . . Quality of steam . . . . . . . . . . . . . . . . . . . . . Heat calculation . . . . . . . . . . . . . . . . . . . . . Enthalpy balance for evaporation process . . . . . . . Mean heat capacity of ethanol water solution . . . . . Evaporation of NaOH solution . . . . . . . . . . . . . Heat transfer to air . . . . . . . . . . . . . . . . . . . change in internal energy . . . . . . . . . . . . . . . . Heat liberation in oxidation of iron fillings . . . . . . . Saturated steam and saturated water . . . . . . . . . . constant volume and constant pressure process . . . . series of operations . . . . . . . . . . . . . . . . . . . . change in internal energy and enthalpy and heat supplied and work done . . . . . . . . . . . . . . . . . . . Exa 11.35 Heat removed in condenser . . . . . . . . . . . . . . . Exa 11.36 Throttling process . . . . . . . . . . . . . . . . . . . . Exa 11.37 water pumping and energy balances . . . . . . . . . . 8
126 126 127 127 128 128 128 129 129 130 130 132 133 133 134 134 135 136 137 137 137 138 138 139 140 141 142 142 143 143 143 144 145 146 147 148 148
Exa 11.38 Exa 11.39 Exa 12.1 Exa 12.2 Exa 12.3 Exa 12.4 Exa 12.5 Exa 12.6 Exa 12.7 Exa 12.8 Exa 12.9 Exa 12.10 Exa 12.11 Exa 12.12 Exa 12.13 Exa 12.14 Exa 12.15 Exa 12.16 Exa 12.17 Exa 12.18 Exa 12.19 Exa 12.20
Energy balance on rotary drier . . . . . . . . . . . . . Energy balance on the fractionator . . . . . . . . . . . Heat liberated calculation . . . . . . . . . . . . . . . . Heat of formation of methane . . . . . . . . . . . . . . Net heating value of coal . . . . . . . . . . . . . . . . Heat of reaction for esterification of ethyl alcohol . . . Vapour phase hydration of ethylene to ethanol . . . . Standard heat of formation of acetylene . . . . . . . . Standard heat of roasting of iron pyrites . . . . . . . . Standard heat of formation of liquid methanol . . . . . Gross heating value and Net heating value calculation Standard heat of reaction calculation . . . . . . . . . . Constant pressure heat of combustion . . . . . . . . . Heat of reaction for ammonia synthesis . . . . . . . . Standard heat of reaction of methanol synthesis . . . . Combustion of CO . . . . . . . . . . . . . . . . . . . . Heat added or removed calculation . . . . . . . . . . . CO2 O2 and N2 passed through a bed of C . . . . . . Partial oxidation of natural gas . . . . . . . . . . . . . Maximum allowable conversion calculation . . . . . . . Theoretical flame temperature calculation . . . . . . . Temperature of products on burning of hydrogen gas .
9
149 150 152 153 153 154 154 155 155 156 157 157 158 158 159 160 161 162 163 164 165 166
List of Figures 6.1 Cox chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Duhring line . . . . . . . . . . . . . . . . . . . . . . . . . . .
50 51
7.1 Boiling point diagram . . . . . . . . . . . . . . . . . . . . . . 7.2 Equilibrium Diagram . . . . . . . . . . . . . . . . . . . . . . 7.3 Temperature composition diagram . . . . . . . . . . . . . . .
55 57 66
8.1 Saturation lines for hexane . . . . . . . . . . . . . . . . . . . 8.2 SAturation curve and adiabatic cooling line . . . . . . . . .
75 79
11.1 Enthalpy change when chlorine gas is heated . . . . . . . . .
131
10
Chapter 2 Units and Dimensions
Scilab code Exa 2.1 Mass flow rate
1 2 3 4 5 6 7 8 9 10
clc () funcprot (0) V 1 = 15; // ft ˆ3/ min f t = 0 .3 04 8; //m min = 60; / / s e c s V = V1 * ft ^ 3/ min ; disp ( ”mˆ3/ s ” ,V , ” V o l um et ri c f l o w r a t e = ” ) D = 10 00 ; //kg/mˆ3 M = V * D; disp ( ” k g / s ” ,M , ” mass f l o w r a t e = ” )
Scilab code Exa 2.2 Poundal to Newton
1 2 3 4 5 6
clc () funcprot (0) f t = 0 .3 04 8; //m l b = 0 .4 53 6; / / k g P = ft * lb ; disp ( ”N” ,P , ” 1 p ou n d a l i s 1 f t ∗ l b / s ˆ 2 = ” )
11
Scilab code Exa 2.3 Conversion of N per m2
1 2 3 4 5 6 7 8 9 10 11 12
clc () funcprot (0) k g f = 9 . 80 6 65 ; //N cm = 10 ^ -2; //m P = k gf / cm ^ 2; disp ( ”N/mˆ2” ,P , ” 1 k g f / cm ˆ2 = ” ) l b f = 3 2. 1 74 ; // lb ∗ f t // s ˆ 2 l b = 0 . 45 3 59 2 4; / / k g f t = 0 .3 04 8; //m i n = 0 .0 25 4; //m P 1 = l bf * l b * ft / i n ^2 ; disp ( ”N/mˆ2” , P 1 , ” 1 l b f / i n ˆ2 = ” )
Scilab code Exa 2.4 Thermal conductivity
1 2 3 4 5 6 7 8 9 10 11 12 13 14
clc () Q 1 = 1 00 00 ; / / k J / h r k J = 1 00 0; // J h r = 3 60 0; // s Q = Q1 * kJ / hr ; / / J / s disp ( ” J / s ” ,Q , ”Q = ” ) x = 0.1; //m A = 1 //mˆ2 T = 800; //K k = x *Q /( A *T ) ; disp ( ”W/ (m∗K) ” ,k , ” t h er ma l c o n d u c t i v i t y = ” ) J = 1 /4 .1 86 8; / / c a l k 1 = k * J * hr / 1 0 00 ; disp ( ” k c a l / ( h ∗m∗C) ” , k 1 , ” t h er ma l c o n d u c t i v i t y = ” )
12
Scilab code Exa 2.5 Mass and FPS system
1 2 3 4 5 6 7 8
clc () F = 3 0 0 ; / /N a = 9 . 81 8 1 ; //m/sˆ2 m = F / a ;/ / k g ma s s i n kg = ” ) disp ( ” k g ” , m , ” ma l b = 4 . 53 5 3 5 92 9 2 4 /1 /1 0 ; / / k g m 1 = m /l /lb ; disp ( ” l b ” , m 1 , ” ma m a s s i n p ou o u nd nd s = ” )
Scilab code Exa 2.6 Kinetic energy calculation
1 2 3 4 5 6 7 8 9
clc () z = 1 5 ; / /m P E = 2 00 0 0 0; 0; / / J g = 9 .8 . 8 06 0 6 7; 7 ; //m/sˆ2 m = P E / (z ( z * g) g) ; disp ( ” k g ” , m , ” m a s s = ” ) v = 5 0 ; //m/s K E = 1 /2 / 2 * m *( * ( v ^ 2) 2 ) / 1 0 00 00 ; n e rg rg y = ” ) disp ( ” k J ” , K E , ” k i n e t i c e ne
Scilab code Exa 2.7 Force and pressure for piston cylinder
1 2 3 4
clc () g = 9 . 81 8 1 ; //m/sˆ2 m = 1 0 0 * 0 .4 . 4 5 3 6; 6; / / k g P = 1 01 0 1 32 3 2 5; 5 ; //N/mˆ2
13
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
D 1 = 4; / / i n c h D = D 1 * 2 . 5 4 * 1 0 ^ -2 - 2 ; / /m A = 3 .1 . 1 41 4 1 5 * ( D ^2 ^2 ) /4 / 4 ; //mˆ2 F 1 = P * A ; / /N F 2 = m * g ; / /N F = F1 + F2 ; ott a l f o r c e a c ti t i n g o n t h e g as as = ” ) disp ( ”N” , F , ” T o P 1 = F / A ; //N/mˆ2 P 2 = P 1 / 10 1 0 0 00 00 0 ; / / b a r P 3 = P 1 / ( 6. 6 . 89 8 9 47 4 7 57 5 7 * 1 0^ 0 ^ 3) 3 ) ;/ / p s i disp ( ”N/mˆ2” , P 1 , ” P r e s s u r e i n N/mˆ 2 = ” ) es s ur e i n ba r = ” ) disp ( ” b a r ” , P 2 , ” P r es disp ( ” p s i ” , P 3 , ” P r es es s ur e i n p s i = ”) d = 0 . 4 ; / /m W = F * d; Wo r k d o n e = ” ) disp ( ” J ” , W , ” Wo PE = m * g * d ; C h a n g e i n p o t e n t i a l e ne n e rg rg y = ”) disp ( ” J ” , P E , ” Ch
Scilab code Exa 2.8 units conversion
1 clc () 2 // /k kG = ( 6 . 7 ∗ 1 0 ˆ − 4 ) ∗ ( ( G ∗ ( d s + d t ) / d s ) ˆ 0 . 8 ) / 3 4 5 6 7 8 9 10
( ( ds d s ˆ 0 . 4 ) ∗ ( dG dG ˆ 0 . 2 ) ) //kG − l b m o l / ( h f t ˆ 2 a t m ) , G − l b / ( f t ˆ 2 h ) , d s , dG , dt − f e e t //kG1 − k m ol ol / (m ( mˆ 2 h a tm tm ) , G1 − k g / ( mˆ mˆ 2 h ) , d s1 s 1 , dG1 , dt1 − m G = 0 .2 . 2 04 0 4 8; 8 ; //G1 ∗ l b / ( f t ˆ 2 h ) d = 3 .2 . 2 80 8 0 8; 8; / / d 1 ∗ f t
ds dt dG kG
= = = =
d; d; d; kG1 ( l b m o l / ( h f t ˆ 2 a t m ) = 4 . 8 8 5 ∗ kmol 4 .8 . 8 85 8 5 ; / / kG
/ (m ( mˆ 2 h a tm tm ) ) 14
11 C = ( 6 . 7 * 1 0 ^ -4 - 4 ) * ( ( G * d / d s ) ^0 ^ 0 . 8 ) / ( ( ds d s ^0 ^0.4) * ( d G ^ 0 .2 .2 ) ) * k G ; 12 disp ( C , ” Co Co− −e f f i c i e n t = ” ) 13 / / t h i s i s t h e c on o n st s t an a n t f o r t h e e q ua u a ti t i on on 14 / / t h e e q u a t i on o n t h us u s b e c o me me s , 15 / / kG1 = C ∗ ( ( G1 ∗ ( d s1 s 1 + d t1 t 1 ) / d s1 s 1 ) ˆ 0 . 8 ) / ( ( d s1 s1
ˆ 0 . 4 ) ∗ ) ∗ ( dG d G1 ˆ 0 . 2 ) )
Scilab code Exa 2.9 units conversion
1 clc () 2 // /C Cp = 7 . 1 3 + 0 . 5 7 7 ∗ (10ˆ − 3 ) ∗ t + 0 . 0 2 4 8 ∗ (10ˆ − 6 )
∗ t ˆ2 3 //Cp − B t u / l b −m o l F , t − F 4 //Cp1 − kJ kJ / km km o l K , t 1 − K 5 6 7 8 9
a = 7 . 13 13 ; b = 0 . 57 5 7 7 * 1 0 ^ - 3; 3; c = 0 .0 . 0 24 2 4 8 * 1 0^ 0^ - 6; 6;
// t = 1 . 8 ∗ t1 − 4 5 9 . 6 7 Cp 1 ( B t u / l b −m o l F = 4 . 1 8 6 8 ∗ ( k J / k m o l C p = 4 .1 . 1 86 8 6 8; 8 ; / / Cp K) ) 10 / / s u b s t i t u t i n g t h e a bo bo ve ve , we g et et , 11 / / C p 1 = 2 8 . 7 6 3 + 4 . 7 6 3 ∗ (10ˆ − 3 ) ∗ t 1 + 0 . 3 3 6 6 ∗ (10ˆ − 6 ) ∗ t ˆ 2 12 13 14 15 16 17 18
a 1 = 2 8. 8 . 76 7 6 3; 3; b 1 = 4 .7 . 7 63 6 3 * ( 1 0^ 0^ - 3) 3) ; c 1 = 0 .3 . 3 36 3 6 6 * ( 10 1 0 ^ -6 -6 ) ; disp ( a 1 , ” a 1 = ” ) disp ( b 1 , ” b 1 = ” ) disp ( c 1 , ” c 1 = ” )
/ / t h i s a r e t he h e c o e f f i c e n t s f o r t he he f o l l o w i n g equati on ; 19 / / C p 1 = a 1 + b 1 ∗ t 1 + c 1 ∗ ( t1 ) ˆ2
15
Chapter 3 Fundamental concepts of stoichiometry
Scilab code Exa 3.1 pounds per minute to kmol per hour
1 2 3 4 5
clc () m = 1 00 0 * 0 .4 53 6; / / k g / m i n M = 3 0. 24 ; //gm/mol m1 = m * 60 / M ; disp ( ” k m o l / h r ” , m 1 , ” m ol ar f o l w r a t e = ” )
Scilab code Exa 3.2 Number of molecules
1 2 3 4 5 6 7 8
clc () M K = 3 9. 1; M C = 1 2. 0; M O = 16; MK2 CO3 = MK * 2 + MC + MO * 3; m = 691; N = m / M K2CO3 ; A = 6. 02 3 * 1 0^ 23 ;
16
9 m ol ec ul es = N * A ; 10 disp ( ” m o l e c u l e s ” ,molecules , ” T ot al no . ”)
o f m o le cu l es =
Scilab code Exa 3.3 Moles of sodium sulphate
1 2 3 4 5 6
7 8 9
clc () N a = 23; //gm/mol M Na = 1 00 ; / / k g N = MNa * 1000 / Na ; // g−atoms N Na2S O4 = N / 2; disp ( ” k m o l ” ,NNa2SO 4 , ” ( a ) m ol es o f s odium s u l ph a t e = ”) M N a2 S O4 = 1 4 2. 0 6; m = N Na 2S O4 * M Na 2S O4 / 1 00 0; disp ( ” k g ” ,m , ” ( b ) k i l og r a m s o f s odium s u l p h a te = ” )
Scilab code Exa 3.4 Pyrites and oxygen moles
1 2 3 4 5 6 7 8 9 10 11 12
13
clc () M Fe = 5 5. 85 ; M O = 16; M S = 32; MFeS2 = MFe + MS * 2; MFe 2O3 = MFe * 2 + MO * 3; MSO3 = MS + MO * 3; m 1S O3 = 1 00 ; / / k g N 1 = m 1S O3 / ( MSO 3) ;//kmol NFeS2 = N1 / 2; m Fe S2 = N Fe S2 * M Fe S2 ; disp ( ” k g ” , m F e S 2 , ” mass o f p y r i t e s t o o b t a i n 1 00 kg o f SO3 =” ) m 2 SO 3 = 5 0; / / k g
17
14 15 16 17
N 2 = m 2S O3 / ( MSO 3) ;//kmol NO2 = N2 * 15/8; mO2 = NO2 * MO * 2; disp ( ” k g ” , m O 2 , ” m as s o f Oxygen co ns um ed t o p r o du c e 5 0 k g o f SO3 =” )
Scilab code Exa 3.5 Volume of oxygen
1 2 3 4 5 6 7 8
clc () M K C lO 3 = 1 22 .5 5 m K C lO 3 = 1 00 ; / / k g N KC lO 3 = m KC lO 3 / M KC lO 3 ; NO2 = 3 * NKC lO3 / 2; V 1 = 2 2. 41 43 ; //mˆ3 / kmol ; V = V1 * NO2 ; disp ( ”mˆ3” ,V , ” v ol um e o f o xy ge n p r od u ce d = ” )
Scilab code Exa 3.6 Reaction of iron and steel
1 2 3 4 5 6 7 8 9 10 11 12
clc () m H2 = 1 00 ; / / k g N H 2 = m H2 / 2 . 01 6 ; NFe = 3 * NH2 / 4; mFe = NFe * 5 5. 85 ; disp ( ” k g ” , m F e , ” ( a ) mass o f i r o n r e qu i r e d = ” ) NH2O = NH2 ; mH 2O = N H2O * 18; disp ( ” k g ” , m H 2 O , ” mass o f s te am r e q u i r e d =” ) V 1 = 2 2. 41 43 ; //mˆ3 / kmol ; V = V1 * NH2 ; disp ( ”mˆ3” ,V , ” Volume o f h y dr o ge n = ” )
18
Scilab code Exa 3.7 Equivalent weight
1 2 3 4
clc () M Ca C O3 = 1 00 . 08 ; G E = MCa CO3 / 2; disp ( ” g ” , G E , ” Gram e q u i v a l e n t wt .
o f CaCO3 =” )
Scilab code Exa 3.8 Specific gravity calculation
1 2 3 4 5 6 7 8
clc () m 1 = 1; // kg ( m ass i n a i r ) m 2 = 0. 9; // k g ( m ass i n w at er ) m 3 = 0 .8 2; // kg ( m ass i n l i q u i d ) L 1 = m2 - m 1; // kg ( l o s s o f mass i n w at er ) L 2 = m3 - m 1; // kg ( l o s s o f mass i n l i q u i d ) sp .g = L2 / L1 ; disp ( s p . g , ” s p e c i f i c g r a v i t y o f l i q u i d = ” )
Scilab code Exa 3.9 Specific gravity of mixture
1 2 3 4 5 6 7 8 9
clc () m 1 = 10; / / k g m 2 = 5; / / k g s p . g1 = 1 .1 7; s p . g2 = 0 .8 3; D w a te r = 1 00 0; //kg/mˆ3 D A = D wa te r * sp . g1 ; D B = D wa te r * sp . g2 ; V 1 = m1 / DA ;
19
10 11 12 13 14
V 2 = m2 / DB ; V = V1 + V2 ; Dmix = ( m1 + m2 )/ V ; sp . g3 = Dm ix / D wa te r; disp ( s p . g 3 , ” s p e c i f i c g r a v i t y
o f m i x tu r e =” )
Scilab code Exa 3.10 Baume scale
1 2 3 4 5
clc () T w = 10 0; //Tw s p .g = Tw / 200 + 1; B e = 14 5 - 1 45 / sp .g ; disp ( ”Be” , B e , ” s p e c i f i c
g r a v i t y on beume s c a l e =” )
Scilab code Exa 3.11 Density using API scale
1 clc () 2 A P I1 = 3 0; //API 3 s p. g1 = 1 41 .5 /( 13 1. 5 + A PI 1 );// ( s i n c e , API = 1 4 1 . 5 /
sp . g −1 3 1 . 5 ) 4 D w a te r = 9 99 ; / / k g / m ˆ 3 ; 5 6 7 8 9
D oi l1 = sp . g1 * D wa te r ; V 1 = 25 0; //mˆ3 m 1 = V1 * Doil1 ; A P I2 = 1 5; //API s p. g2 = 1 41 .5 /( 13 1. 5 + A PI 2 );// ( s i n c e , API = 1 4 1 . 5 /
sp . g −1 3 1 . 5 ) 10 D w a te r = 9 99 ; / / k g / m ˆ 3 ; 11 12 13 14 15
D oi l2 = sp . g2 * D wa te r ; V 2 = 1 00 0; //mˆ3 m 2 = V2 * Doil2 ; Dm ix = ( m1 + m2 ) /( V1 + V2 ); disp ( ”kg/mˆ3” , D m i x , ” d e n s i t y o f t he m ix tu re =” )
20
Scilab code Exa 3.12 Drying Ammonium sulphate
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23
clc () m 1 = 25 0; / / k g m wa te r1 = 5 0; / / k g m dr ys ol id 1 = m1 - m wa te r1 ; wf e1 = m wa te r1 / m1 ; w r1 = m wa te r1 / m dr ys ol id 1 ; w tp er ce nt w1 = m wa te r1 * 1 00 / m1 ; w tp er ce nt d1 = m wa te r1 * 1 00 / m dr ys ol id 1 ; a = 90; //% m wa te r2 = m wa te r1 * (1 - a /1 00 ); m 2 = m dr ys ol id 1 + m wa te r2 ; wf e2 = m wa te r2 / m2 ; w r2 = m wa te r2 / m dr ys ol id 1 ; w tp er ce nt w2 = m wa te r2 * 1 00 / m2 ; w tp er ce nt d2 = m wa te r2 * 1 00 / m dr ys ol id 1 ; disp ( w f e 1 , ” ( a ) w ei gh t f r a c t i o n o f w a te r a t e n tr a nc e = ”) disp ( w f e 2 , ” w e i g h t f r a c t i o n o f w a t e r a t e x i t = ” ) disp ( w r 1 , ” ( b ) w ei gh t r a t i o o f w at er a t e n tr a nc e = ” ) disp ( w r 2 , ” w e i g h t r a t i o o f w a t e r a t e x i t = ” ) disp (wtpercentw1 , ” ( c ) w e ig h t p e r c e n t o f m o i s t ur e on wet b a s i s a t e n t ra n c e = ” ) disp (wtpercentw2 , ” w e ig h t p e r ce n t o f m o is t ur e on w et b as is at e xi t = ”) disp (wtpercentd1 , ” ( d ) w ei gh t p e r ce n t o f m o is t ur e on d r y b a s i s a t e n t ra n c e = ” ) disp (wtpercentd2 , ” w ei gh t p e rc e n t o f m o i s t u r e on d ry b as is at e xi t = ”)
Scilab code Exa 3.13 Percentage of water removed
21
1 2 3 4 5 6 7 8 9
clc () m d ry s ol i d = 1 00 ; / / k g p e r c en t in = 2 5; m wa te ri n = m dr ys ol id * p er ce nt in / 1 00 ; p e rc e nt o ut = 2 .5 ; m w a t er o ut = m d ry s ol i d * p e rc e nt o ut / 1 00 ; m r e m ov e d = m w at e ri n - m w at e ro u t ; p e r c en t re m ov e d = m r em o ve d * 10 0 / m w at e ri n ; disp (perce ntremoved , ” p e r c e n t a g e o f w at er rem oved = ” )
Scilab code Exa 3.14 Amount and percentage water removed
1 2 3 4 5 6 7 8 9 10 11 12
clc () m = 1;//kg p e r ce n t1 = 2 0; //% m wa te ri n = m * p er ce nt 1 / 1 00 ; m dr ys ol id = m - m wa te ri n ; p e r c en t 2 = 2 .4 4; //% m ou t = m dr ys ol id / (1 - p er ce nt 2 / 10 0) ; m w a t er o ut = m ou t - m d ry s ol i d ; m r e m ov e d = m w at e ri n - m w at e ro u t ; p er ce nt re mo ve d = m re mo ve d * 1 00 / m wa te ri n ; disp ( ” k g ” ,mre moved , ” w e i gh t o f w at er rem oved = ” ) disp ( ”%” ,percentrem oved , ” p e r c e n t a g e o f w a te r r em ov ed = ”)
Scilab code Exa 3.15 NaCl solution
1 2 3 4
clc () m w a te r = 1 00 ; / / k g m Na Cl = 3 5. 8; / / k g m so lu = m wa te r + m Na Cl ;
22
5 6 7 8 9 10 11 12 13 14 15 16 17 18
mfr = m Na Cl / ms ol u ; mpr = mfr * 100; M N a Cl = 5 8 .4 5; / / k g / k m o l N Na Cl = m Na Cl / M Na Cl ; M H 2O = 1 8; / / k g / k m o l N H 2O = m wa te r / M H2 O ; Mfr = N Na Cl / ( NN aC l + N H2 O) ; Mpr = Mfr * 100; N = NN aC l * 10 00 / m wa te r ; disp ( m f r , ” ( a ) m ass f r a c t i o n o f NaCl =” ) disp ( m p r , ” m as s p e r c e n t o f NaCl= ” ) disp ( M f r , ” ( b ) mole f r a c t i o n o f NaCl =” ) disp ( M p r , ” mo le p e r ce n t o f NaCl = ” ) disp (N , ” kmol NaCl p er 1 00 0 kg o f w at er =” )
Scilab code Exa 3.16 Molal absolute humidity
1 2 3 4 5 6 7 8 9 10
clc () Y = 0 .0 15 ; / / kg w at er v ap ou r / kg d ry a i r M a ir = 2 9; / / k g / k m o l M wa t er = 1 8. 0 16 ; / / k g / k m o l N wa te r = Y / M wa te r ;//kmol Nair = 1 / Mair ; //kmol Mpr = N wa te r *1 00 / ( N wa te r + Na ir ) ; M r = N wa te r / N ai r; disp ( M p r , ” ( a ) mole p e r ce n t o f w at er v ap ou r = ” ) disp ( ” k mo l w a te r / k mol d ry a i r ” , M r , ” ( b ) m ol al a b s o l u t e h u mi di ty =” )
Scilab code Exa 3.17 K2CO3 solution
1 clc () 2 m so lu = 1 00 ; // g
23
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
M K2 C O3 = 1 38 . 20 ; / / g / m o l p e r ce n t1 = 5 0; //% m K2 CO 3 = p er ce nt 1 * m so lu / 1 00 ; N K2 CO 3 = m K2 CO 3 / M K2 CO 3 ; m wa te r = m so lu - m K2 CO 3 ; N wa te r = m wa te r / 1 8. 06 ; Mpr = N K2 CO 3 * 10 0 / ( N K2 CO 3 + N wa te r ); sp . gr = 1. 53 ; V so lu = m so lu / s p . gr ; //mL V wa te r = m wa te r / 1; //mL V pr = V wa te r * 1 00 / V so lu ; M ol al it y = N K2 CO 3 / ( m wa te r * 1 0^ - 3) ; M ol ar it y = N K2 CO 3 / ( V so lu * 1 0^ - 3) ; E q . wt = M K2 CO 3 / 2; N o = m K2 C O3 / E q . wt ; N = No / ( Vsolu * 10^ -3) ; disp ( ”%” , M p r , ” ( a ) Mole p rc en t o f s a l t = ” ) disp ( ”%” , V p r , ” ( b ) Volume p e r c e n t o f w at er = ” ) disp ( ” m o l / k g ” ,Mola lity , ” ( c ) M o l a l i t y = ” ) disp ( ”mol/L” ,Mol arity , ” ( d ) M o l a r it y = ” ) disp ( ”N” ,N , ” ( e ) N o r m a l i t y ” )
Scilab code Exa 3.18 Molarity and Molality of Alcohol solution
1 2 3 4 5 6 7 8 9 10 11
clc () m so lu = 1 00 ; / / k g p e r ce n t1 = 6 0; //% D w a te r = 9 98 ; //kg/mˆ3 D al co = 7 98 ; //kg/mˆ3 D so lu = 8 95 ; //kg/mˆ3 V so lu = m so lu / D s ol u ; m al co = m so lu * p er ce nt 1 / 1 00 ; V al co = m al co / D al co ; V pr = V al co * 100 / V so lu ; M a l co = 4 6. 0 48 ; / / k g / k m o l
24
N = m al co / M a lc o ; M o l ar i ty = N / ( V so lu ) ; m wa te r = m so lu - m al co ; M o l al it y = N * 1 00 0 / m wa te r ; disp ( ”%” , V p r , ” ( a ) Volume p e r ce n t o f e t h a no l i n s o l u t i o n = ”) 17 disp ( ”mol/L” ,Mol arity , ” ( b ) M o l a r it y = ” ) 18 disp ( ” mol / ( kg o f w at er ) ” ,Mol ality , ” ( c ) M o l a l i t y = ” ) 12 13 14 15 16
Scilab code Exa 3.19 CO to phosgene
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
clc ()
//CO + CL2 = COCl2 N p = 12; / / m o l e s N Cl2 = 3; / / m o l e s N CO = 8; / / m o l e s N 1C l2 = NC l2 + Np ; N1CO = NCO + Np ; p r. ex = ( N 1C O - N 1C l2 ) * 1 00 / N1 Cl 2 ; p r. co = ( N1 Cl 2 - N Cl 2 ) * 1 00 / N 1C l2 ; T = Np + NCl2 + NCO ; T1 = N1Cl2 + N1CO ; N = T / T1 ; disp ( ”%” , p r . e x , ” ( a ) p e r ce n t e x c e s s o f CO = ” ) disp ( ”%” , p r . c o , ” ( b ) p e r ce n t c o n v e rs i o n = ” ) disp (N , ” ( c ) Mo l es o f t o t a l p r o d u ct s p er mole o f t o t a l re a c ta nt s = ”)
Scilab code Exa 3.20 Extent of reaction
1 clc () 2 N n2 = 2; / / m o l e s 3 N h2 = 7; / / m o l e s
25
4 5 6 7 8 9 10 11 12
N nh3 = 1; / / m o l e n0 = Nn2 + Nh2 + Nnh3 ; v = 2 - 1- 3;
//YN2 = (2 − E) /( 10 − 2∗E) / / Y h 2 = ( 7 −3∗E) /( 10 − 2∗E) / / Y n h 3 = ( 1 + 2 ∗E) /(1 0 − 2∗E) disp ( ” mole f r a c t i o n o f N2 = ( 2 − E) /( 10 − 2∗E) ” ) disp ( ” mole f r a c t i o n o f H2 = (7 −3∗E) /( 10 − 2∗E) ” ) disp ( ” mole f r a c t i o n o f NH3 = ( 1 + 2 ∗E) /(1 0 − 2∗E) ” )
Scilab code Exa 3.21 ethylene to ethanol
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
clc () m so lu = 1 00 ; // g M K2 C O3 = 1 38 . 20 ; / / g / m o l p e r ce n t1 = 5 0; //% m K2 CO 3 = p er ce nt 1 * m so lu / 1 00 ; N K2 CO 3 = m K2 CO 3 / M K2 CO 3 ; m wa te r = m so lu - m K2 CO 3 ; N wa te r = m wa te r / 1 8. 06 ; Mpr = N K2 CO 3 * 10 0 / ( N K2 CO 3 + N wa te r ); sp . gr = 1. 53 ; V so lu = m so lu / s p . gr ; //mL V wa te r = m wa te r / 1; //mL V pr = V wa te r * 1 00 / V so lu ; M ol al it y = N K2 CO 3 / ( m wa te r * 1 0^ - 3) ; M ol ar it y = N K2 CO 3 / ( V so lu * 1 0^ - 3) ; E q . wt = M K2 CO 3 / 2; N o = m K2 C O3 / E q . wt ; N = No / ( Vsolu * 10^ -3) ; disp ( ”%” , M p r , ” ( a ) Mole p rc en t o f s a l t = ” ) disp ( ”%” , V p r , ” ( b ) Volume p e r c e n t o f w at er = ” ) disp ( ” m o l / k g ” ,Mola lity , ” ( c ) M o l a l i t y = ” ) disp ( ”mol/L” ,Mol arity , ” ( d ) M o l a r it y = ” ) disp ( ”N” ,N , ” ( e ) N o r m a l i t y ” )
26
27
Chapter 4 Ideal Gases and Gas Mixtures
Scilab code Exa 4.1 gas constant R
1 2 3 4 5 6 7 8 9 10 11 12
clc () P 1 = 76 0; //mmHg T 1 = 2 73 .1 5; //K V1 = 2 2. 41 43 * 10 ^ -3; //mˆ3/mol R1 = P1 * V1 / T1 ; disp ( ”mˆ3 mmHg / ( molK) ” , R 1 , ” Gas c o n s t a n t R =” ) P 2 = 1 01 32 5; //N/mˆ2 T 2 = 2 73 .1 5; //K V2 = 2 2. 41 43 * 10 ^ -3; //mˆ3/mol R2 = P2 * V2 / T2 ; //J/molK R 3 = R2 / 4.1 84; // c a l /molK disp ( ” ca l /molK” , R 3 , ” Gas c o n s t a n t R i n MKS s y s t e m =” )
Scilab code Exa 4.2 Molar volume of air
1 clc () 2 T = 350; //K 3 P = 1;//bar
28
4 V1 = 2 2. 41 43 * 10 ^ -3; //mˆ3 ( s u f f i x 1 r e p r e s e n t s a t
STD) 5 6 7 8
P 1 = 1 .0 13 25 ; / / b a r T 1 = 2 73 .1 5; //K V = P1 * V1 * T /( T1 * P ) ; disp ( ”mˆ3/mol” ,V , ” M o l a r v o lu m e =” )
Scilab code Exa 4.3 Ideal gas equation
1 2 3 4 5 6 7 8 9 10 11 12
clc () P = 10; / / b a r T = 300; //K V = 150; //L P 1 = 1 .0 13 25 ; // b ar ( \ s u f f i x 1 r e p r e s e n t s a t STD) T 1 = 2 73 .1 5; //K V2 = T1 * P * V /( T * P1 ) ;//mˆ3 V 1 = 2 2. 41 43 ; //mˆ3/mol N = V2 / V1 ; //mol M O2 = 32; m = N * MO2 / 1000; disp ( ” k g ” ,m , ” Mass o f o xy g en i n t he c y l i n d e r = ” )
Scilab code Exa 4.4 Maximum allowable temperature of tyre
1 2 3 4 5 6
clc () P = 195; //kPa T = 273; //K P 1 = 25 0; //kPa T1 = P1 * T / P ; disp ( ”K” , T 1 , ” Maximum t e m p e r a t u r e t o w h ic h t y r e may be h ea te d = ” )
29
Scilab code Exa 4.5 Pressure calculation
1 2 3 4 5 6 7 8
clc () V = 250; //L T = 300; //K V 1 = 1 00 0; //L P 1 = 10 0; //kPa T 1 = 31 0; //K P = T * P1 * V1 /( T1 * V ) ; disp ( ”kPa” ,P , ” O r i g i n a l p r e s s u re i n t he c y l i n d e r = ” )
Scilab code Exa 4.6 weight composition and density calculation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
clc () V p er 1 = 7 0; / /% ( 1 = HCl ) V p er 2 = 2 0; / /% ( 2 = C l2 ) V p er 3 = 1 0; / /% ( 3 = CCl4 ) M 1 = 3 6. 45 ; M 2 = 7 0. 90 ; M 3 = 1 53 .8 ; m 1 = Vper1 * M1 ; m 2 = Vper2 * M2 ; m 3 = Vper3 * M3 ; m pe r1 = m1 * 1 00 /( m1 + m2 + m3 ); m pe r2 = m2 * 1 00 /( m1 + m2 + m3 ); m pe r3 = m3 * 1 00 /( m1 + m2 + m3 ); disp ( m p e r 1 , ” ( a ) w ei gh t p e r ce n t o f HCl= ” ) disp ( m p e r 2 , ” w e ig ht p e r ce n t o f Cl2= ” ) disp ( m p e r 3 , ” w e i g ht p e r c e n t o f CCl4= ” ) m = ( m1 + m2 + m3 )/( Vper1 + Vper2 + Vper3 ); disp ( ” k g ” ,m , ” ( b ) a v e ra g e m o l e c u l a r w e ig h t = ” ) v = 2 2. 41 43 ; //mˆ3/kmol
30
20 V to ta l = v * ( Vp er 1 + V per 2 + V pe r3 ) ; 21 D = ( m1 + m2 + m3 )/ Vtotal ; 22 disp ( ”kg/mˆ3” ,D , ” ( c ) D e ns i t y a t s t a nd a r d c o n d i i o n s = ”)
Scilab code Exa 4.7 calculations for natural gas
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
clc () p e r1 = 9 3; / /% ( 1 = m et ha ne ) p er 2 = 4 .5 ; / /% ( 2 = e t h a n e ) pe r3 = 100 - ( pe r1 + p er 2) ;/ /% ( 3 = N2 ) ; T = 300; //K p = 400; //kPa P 3 = p * per3 / 100; v = 10; //mˆ3 V 2 = per2 * v / 100; M 1 = 1 6. 03 2; M 2 = 3 0. 04 8; M 3 = 28; N 1 = pe r1 ; N 2 = pe r2 ; N 3 = pe r3 ; m 1 = M1 * N1 ; m 2 = M2 * N2 ; m 3 = M3 * N3 ; m = m1 + m2 + m3 ; Vs tp = 100 * 2 2. 41 43 * 1 0^ - 3; //m3 at STP D = m /(1000 * Vstp ); P s tp = 1 0 1. 3 25 ; //kPa T 1 = 2 73 .1 5; //K V = T * Pstp * Vstp / ( T1 * p ) ; D1 = m /(100 0 * V ); Ma vg = m /1 00 ; mper1 = m1 * 100 / ( m1 + m2 + m3 ); mper2 = m2 * 100 / ( m1 + m2 + m3 );
31
29 mper3 = m3 * 100 / ( m1 + m2 + m3 ); 30 disp ( ”kPa” , P 3 , ” ( a ) P a r t i a l p r e s s u r e o f n i t r o g e n = ” ) 31 disp ( ”mˆ3” , V 2 , ” ( b ) p ure −c om po ne nt v ol um e o f e t h a ne = ”) 32 disp ( ”kg/mˆ3” ,D , ” ( c ) D en s it y a t s t an d ar d c o n d i t i o n s = ”) 33 disp ( ”kg/mˆ3” , D 1 , ” ( d ) D en si ty a t g iv en c o n d i t i o n = ” ) 34 disp ( M a v g , ” ( e ) A ve ra ge m o l e c u l a r w ei g h t = ” ) 35 disp ( ”%” , m p e r 1 , ” ( f ) w e ig h t p e r c e n t o f Methane = ” ) 36 disp ( ”%” , m p e r 2 , ” w e ig ht p e r ce n t o f Ethane = ” ) 37 disp ( ”%” , m p e r 3 , ” w ei gh t p e r c en t o f N it ro g e n = ” )
Scilab code Exa 4.8 Volume of gas from absorption columnn
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
clc () p e r1 = 2 0; / /% ( 1 = a mmo ni a ) V s tp = 2 2 .4 1 43 ; //mˆ3/kmol P s tp = 1 0 1. 3 25 ; //kPa T s tp = 2 7 3. 15 ; //K V 1 = 10 0; //mˆ3 P 1 = 12 0; //kPa T 1 = 30 0; //K P 2 = 10 0; //kPa T 2 = 28 0; //K p e r2 = 9 0; / /% ( a b s o r b e d ) N = V1 * P1 * Tstp / ( Vstp * Pstp * T1 );//kmol Nair = (1 - per1 / 100) * N ; N 1 = pe r1 * N /1 00 ; Nabs = per2 * N1 / 100; N2 = N1 - Nabs ; / / l e a v i n g N to ta l = N ai r + N2 ; V st p1 = N to ta l * V st p ;//mˆ3 V2 = Vstp1 * Pstp * T2 / ( Tstp * P2 ); disp ( ”mˆ3” , V 2 , ” Volume o f g as l e a v i n g = ” )
32
Scilab code Exa 4.9 dehumidification
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
18
clc () V = 100; //mˆ3 P t o ta l = 1 00 ; //kPa P w at er = 4; //kPa P ai r = P to ta l - P wa te r ; T = 300; //K T 1 = 27 5; //K V s tp = 2 2 .4 1 43 ; //mˆ3/kmol T s tp = 2 7 3. 15 ; //K P s tp = 1 0 1. 3 25 ; //kPa P w a te r 1 = 1 .8 ; //kPa P ai r1 = P to ta l - P wa te r1 ; V1 = V * Pair * T1 / ( T * Pair1 ); Nwa ter = V * P water * Tstp / ( Vstp * Pstp * T ); N wa te r1 = V1 * P wa te r1 * Ts tp / ( Vs tp * P stp * T1 ) ; m = ( Nw at er - N wa te r1 ) * 1 8. 02 ; disp ( ”mˆ3” , V 1 , ” ( a ) vo lume o f a i r a f t e r d e h u m id i f i ca t i o n = ” ) disp ( ” k g ” ,m , ” ( b ) Mass o f w at er v ap ou r rem ov ed = ” )
Scilab code Exa 4.10 Absorption column for H2S
1 2 3 4 5 6 7
clc () V = 100; //mˆ3 P = 600; //kPa T = 310; //K p e r1 = 2 0; //% ( H2S e n t e r i n g ) p er2 = 2; //% ( H2S l e a v i n g ) P s tp = 1 0 1. 3 25 ; //kPa
33
8 9 10 11 12 13 14 15 16
T s tp = 2 7 3. 15 ; //K V s tp = 2 2 .4 14 ; //mˆ3/kmol Vstp1 = V * P * Tstp / ( T * Pstp ) N = Vstp1 / Vstp ; N 1 = N * per1 / 100; N 2 = N - N 1 ; // ( 2 = i n e r t s ) N le avi ng = N2 / ( 1 - per2 / 100) ; N 1l ea vi ng = p er 2 * N le av in g / 1 00 ; m ab so rb ed = ( N1 - N 1l ea vi ng ) * 3 4. 08 ;// ( m o l ec u l ar
wt . = 3 4 . 0 8 ) 17 m g i ve n = 1 00 ; / / k g / h 18 V ac tu al = m gi ve n * V / m ab so rb ed ; 19 N ac tu al = N le av in g * V ac tu al / V ;// a c t u a l m ol es
leaving 20 21 22 23 24 25
26 27
V st pl = N ac tu al * V st p ;/ / vo lu me l e a v i n g a t STP P 2 = 50 0; //kPa T 2 = 29 0; //K V2 = Vstpl * Pstp * T2 / ( P2 * Tstp ); P re co ve ry = ( N1 - N 1l ea vi ng ) * 10 0 / N1 ; disp ( ”mˆ3/h” ,Vactu al , ” ( a ) Volume o f g as e n t e r i n g p er hour”) disp ( ”mˆ3/h” , V 2 , ” ( b ) Volume o f g as l e a v i n g p er h ou r ” ) disp ( ”%” ,Pre covery , ” ( c ) P e r c e n t a g e r e c o v e r y o f H2S ” )
Scilab code Exa 4.11 Reaction stoichiometry for preparation of ammonia
1 2 3 4
clc ()
//N2 + 3H2 = 2NH3 V 1 = 10 0; / /mˆ 3 ( 1 = N2 ) V2 = V1 * 3; // ( A cc or di ng t o Av ag ad ro s p r i n c i p l e , e qu al v o l u m e s o f a l l g a se s u n d e r s i m i l a r c o n d i t i o n c o n t a i n s same no . o f m ol es ) 5 disp ( ”mˆ3” , V 2 , ” ( a ) V olume o f h yd ro ge n r e q u i r e d a t same c o n d i t i o n = ” ) 6 P 1 = 20; / / b a r 34
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
T 1 = 35 0; //K P 2 = 5; / / b a r T 2 = 29 0; //K V3 = 3 * V1 * P1 * T2 / ( P2 * T1 ) ; disp ( ”mˆ3” , V 3 , ” ( b ) Volume r e q u i r e d a t 50 b ar and 2 90K = ”) m = 10 00 ; / / k g ( ammonia ) N = m / 1 7.03; //kmol N1 = N /2; // ( n i t r o g e n ) N2 = N * 3 / 2; / / ( h y d r o g e n ) P 3 = 50; / / b a r T 3 = 60 0; //K P s tp = 1 . 01 3 25 ; / / b a r T s tp = 2 7 3. 15 ; //K V s tp = 2 2 .4 14 ; //mˆ3/kmol V 1s tp = N1 * Vs tp ; V4 = V1stp * Pstp * T3 / ( P3 * Tstp );// ( n i t r o g e n
23 24 25 26 27
a t 5 0 b ar and 6 00K) V5 = V4 * 2 ; / / ( ammonia a t 5 0 b a r and 6 00K) V6 = V4 * 3 ; // ( h yd ro ge n a t 50 b ar and 6 00K) disp ( ”mˆ3” , V 4 , ” ( c ) Volume o f n i t r o g e n a t 5 0 b ar and 600K” ) disp ( ”mˆ3” , V 6 , ” Volume o f h yd ro ge n a t 50 b ar and 600K” ) Volume o f a mmonia a t 50 b ar a nd disp ( ”mˆ3” , V 5 , ” 600K” )
Scilab code Exa 4.12 Reaction stoichiometry for preparation of producer
gas 1 2 3 4 5
clc () N = 100; / / kmol p r o du c er g a s P 1 = 25; / /% ( C ar bo n m on o xi d e ) P 2 = 4; / /% ( Ca rb on D i o x i d e ) P 3 = 3; / /% ( O xy ge n )
35
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
P 4 = 68; //% ( N i tr o ge n ) N 1 = N * P1 /100; N 2 = N * P2 /100; N 3 = N * P3 /100; N 4 = N * P4 /100; N C = N1 + N2 ; m = NC * 12; Ngas = N / m ; // m ol es o f g as f o r 1 k g o f Carbon V s tp = 2 2 .4 1 43 ; //mˆ3/kmol V st p1 = Vs tp * Ng as ; P = 1;//bar T = 290; // k P s tp = 1 . 01 3 25 ; / / b a r T s tp = 2 7 3. 15 ; //K V = T * Vstp1 * Pstp / ( Tstp * P ) ; disp ( ”mˆ3” ,V , ” ( a ) Volume o f g as a t 1 b ar and 29 0 K p e r kg Ca rb on = ” )
//CO + 1/2 ∗ O2 = CO2
N req ui re d = N 1 /2 - N 3; / / ( o xy ge n r e q u i r e d ) N s u p pl i ed = N r eq u ir e d * 1 .2 ; P O1 = 21; //% ( Oxygen p e r c e n t i n a i r ) N ai r = N su pp li ed * 1 00 / PO 1; V 1 = 10 0; //mˆ3; Vair = V1 * Nair / N ; disp ( ”mˆ3” , V a i r , ” ( b ) Volume o f a i r r e q u ir e d = ” ) NCO2 = N2 + N1 ; N O2 = N su pp li ed - N re qu ir ed ; NN2 = N4 + ( Vair * (1 - PO1 / 100) ); N to ta l = N CO 2 + NO2 + NN2 ; PC O2 = NC O2 * 100 / N to ta l; PO2 = NO2 * 100 / N total ; PN2 = NN2 * 100 / N total ; disp ( ”%” , P C O 2 , ” P e r c en t c o m p o s it i o n o f Carbon D i o xi d e = ”) 38 disp ( ”%” , P O 2 , ” P e r c en t c o m p o s it i o n o f Oxygen = ” ) 39 disp ( ”%” , P N 2 , ” P e r ce nt c o mp o s it i o n o f N i tr o ge n = ” )
36
Scilab code Exa 4.13 Reaction stoichiometry for preparation of Chlorine
from HCl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
clc ()
//4HCl + O2 = 2Cl2 + 2H2O n = 1 ; // mol ( B a si s 1 mol o f HCl )
NO2 = n / 4; N O2 su pp = 1. 5 * NO2 ; Na ir = N O2 su pp * 100 / 2 1; V = 100; //mˆ3 Vair = V * Nair / n ; disp ( ”mˆ3” , V a i r , ” ( a ) Volume o f a i r a dm it te d = ” ) P 1 = 80; / /% ( HCl c o n v e r t e d ) Ncon = n * P1 /100; N 2 = N co n /4 ; // o xy gen r e q u i r e d NH2O = Ncon / 2; NCl2 = Ncon / 2; nHCl = n - Ncon ; nO2 = N O2 su pp - N2 ; N ni tr o = N ai r - N O2 su pp ; N to ta l = n HC l + nO2 + NH 2O + N Cl2 + N ni tr o ; V 1 = V * Ntotal ; P 1 = 1; / / b a r T 1 = 29 0; //K P 2 = 1. 2; / / b a r T 2 = 40 0; //K V2 = V1 * P1 * T2 / ( P2 * T1 ) ; disp ( ”mˆ3” , V 2 , ” ( b ) Volume o f g as l e a v i n g = ” ) VCl2 = NCl2 * V ; P s tp = 1 . 01 3 25 ; / / b a r T st p = 2 73 ; //K V s tp = 2 2 .4 1 43 ; //mˆ3/kmol Vstp1 = Tstp * P1 * VCl2 / ( T1 * Pstp ); N st p = V st p1 / V s tp ;
37
32 33 34 35 36 37 38 39
40 41 42
m = Nstp * 70.90; disp ( ” k g ” ,m , ” ( c ) K i l o gr a m s o f C h l o r i n e p r od u ce d = ” ) N to ta ld ry = nH Cl + nO2 + NC l2 + N ni tr o;// d ry b a s i s p 1 = n HC l * 10 0/ N t o t al d ry ; p 2 = n O2 * 1 00 / N t ot a ld r y ; p 3 = N Cl 2 * 10 0/ N t o t al d ry ; p 4 = N ni t ro * 1 0 0/ N t o t al d ry ; disp ( ”%” , p 1 , ” ( d ) P er ce n t c o m po s i ti o n o f HCl i n e x i t stream = ”) disp ( ”%” , p 2 , ” P er ce nt c om p o s i ti on o f Oxygen i n e x i t s tr e am = ” ) P er c e n t c o mp os it io n o f C h l o r in e i n disp ( ”%” , p 3 , ” e x i t s tr e am = ” ) P er c e n t co mp os it io n o f n i t r o g e n i n disp ( ”%” , p 4 , ” e x i t s tr e am = ” )
Scilab code Exa 4.14 Reaction stoichiometry for dissociation of Carbon
Dioxide 1 2 3 4 5 6 7 8 9
clc ()
// CO2 = CO + 1/2 ∗ O2 P 1 = 1; / / b a r T 1 = 3 50 0; //K P 2 = 1; / / b a r T 2 = 30 0; //K V 2 = 25; //L V1 = V2 * P2 * T1 / ( P1 * T2 ) ; disp ( ”L” , V 1 , ” ( a ) F i n al volume o f g as i f no d i s s o c i a t i o n o cc ur ed = ” ) P s tp = 1 . 01 3 25 ; / / b a r T st p = 2 73 ; //K V s tp = 2 2 .4 1 43 ; //mˆ3 N2 = V2 * P2 * Tstp / ( Vstp * Pstp * T2 );
10 11 12 13 14 / / l e t x b e t h e f r a c t i o n
d i ss o ci a te d , then a f t e r
dissociation , 38
15 16 17 18 19 20 21 22
/ / C O 2 = ( 1 − x ) m ol , CO = xm ol , O2 = ( 0 . 5 ∗ x ) m ol // t o t a l m ol es = 1 − x + x + o . 5 ∗ x = 1 + 0 . 5 ∗ x V = 350; //L N 1 = V * P1 * Tstp / ( Vstp * Pstp * T1 );
// 1 + 0 . 5 ∗ x = N1 , t h e r e f o r e x = ( N1 - 1) / 0.5 ; p = x *1 00 ; disp ( ”%” ,p , ” ( b ) C O 2 c o n v e r t e d = ” )
39
Chapter 5 Properties of Real Gases
Scilab code Exa 5.1 Van der waals equation
1 2 3 4 5 6 7
8 9 10 11
clc () V = 0.6; //mˆ3; T = 473; //K N = 1 * 10 ^ 3; //mol R = 8 .3 14 ; //Pa ∗ mˆ3/molK P = N * R * T / ( V * 10^5) ; disp ( ” b a r ” ,P , ” ( a ) P r e s s u r e c a l c u l a t e d u s i n g i d e a l g as e q ua t i on = ” ) a = 0 .4 23 3; //N ∗ mˆ 4 / m ol ˆ 2 b = 3.73 * 10^ -5; //mˆ3/mol P 1 = ( R * T /( V / N - b ) - a /( V / N ) ^2 ) / 1 0^ 5; disp ( ” b a r ” , P 1 , ” ( a ) P r es s u r e c a l c u l a t e d u s in g van d er w aa ls e q ua t i on = ” )
Scilab code Exa 5.2 Van der waals equation for CO2 gas
1 clc () 2 P = 10 ^7 ; / / P a ;
40
3 4 5 6
T = 500; //K R = 8 .3 14 ; //Pa ∗ L / m o l K V = N * R * T / ( P * 1000) ; disp ( ”mˆ3” ,V , ” ( a ) V olume o f CO2 c a l c u l a t e d i d e a l g as e qu a t i o n = ” )
using
Scilab code Exa 5.3 Redlich Kwong equation for gaseous ammonia
1 2 3 4 5 6 7 8 9 10
clc () V = 0.6 * 10^ -3; //mˆ3 T = 473; //K T c = 4 05 .5 ; //K Pc = 112.8 * 10 ^ 5 //Pa R = 8 .3 14 ; a = 0.4278 * ( R^2) * ( Tc ^ 2.5) / Pc ; b = 0.0867 * R * Tc / Pc ; P 1 = ( R *T /( V - b ) - a / (( T ^ 0. 5) * V *( V + b ) )) / 10 ^5 ; disp ( ” b a r ” , P 1 , ” P r e s su r e d e ve l op e d by g as = ” )
Scilab code Exa 5.4 Molar Volume calculation for gaseous ammonia
1 2 3 4 5 6 7 8 9 10
clc () P = 10 ^6 ; //Pa T = 373; //K T c = 4 05 .5 ; //K Pc = 112.8 * 10 ^ 5 //Pa R = 8 .3 14 ; a = 0.4278 * ( R^2) * ( Tc ^ 2.5) / Pc ; b = 0.0867 * R * Tc / Pc ;
/ / P 1 = ( R∗T/(V − b ) − a / ( ( T ˆ 0 . 5 ) ∗V∗ ( V + b ) ) ) / 1 0 ˆ 5 ; / / 1 0 ˆ 6 = ( ( 8 . 3 1 4 ∗ 3 7 3 ) / ( V−2.59∗1 0ˆ −5 ) ) − 8 . 6 8 / ( ( 3 7 3 ˆ 0 . 5 ) ∗ V∗ (V+2.59∗10 ˆ −5) 11 // s o l v i n g t h i s we g et , 41
12 V = 3.0 * 10^ -3; //mˆ3/mol 13 disp ( ”mˆ3/mol” ,V , ” m ol ar vo lume o f g as = ” )
Scilab code Exa 5.5 virial equation of state
1 2 3 4 5 6
7 8
9 10 11
clc () B = -2.19 * 10^ - 4; //mˆ3/mol C = -1.73 * 10^ - 8; //mˆ6/molˆ2 P = 10; / / b a r T = 500; //K
/ / v i r i a l e q u a t i o n i s g i v e n a s , Z = PV/RT = 1 + B/V + C/Vˆ2 //V = (RT/P) ∗ (1 + B/V + C/Vˆ2) // now b y a ss um in g d i f f e r e n t v a l u e s f o r V on RHS and c h ec k in g f o r c o r r es p o n d i ng V o n LHS , we h ave t o a ss um e s uc h v a l u e o f V on RHS by w hi ch we g e t t h e same v a l u e f o r LHS V / / by t r i a l and e r r o r we g e t , V = 3.92 * 10^ -3; //mˆ3 disp ( ”mˆ3” ,V , ” M ol ar v ol um e o f m et h an o l = ” )
Scilab code Exa 5.6 Lyderson method for n butane
1 2 3 4 5 6 7 8 9 10
clc () T = 510; //K P = 26 .6 ; / / b a r T c = 4 25 .2 ; //K P c = 38; / / b a r Z c = 0 .2 74 ; R = 8 .3 14 ; P r = P / Pc ; T r = T / Tc ; disp ( P r , ” P r = ” )
42
11 12 13 14 15 16 17
disp ( T r , ” T r = ” )
/ /From f i g . 5 . 4 and 5 . 5 from t he t e x t book Z = 0 .8 65 ; D = 0. 15 ; Z1 = Z + D * ( Zc - 0.27) ; V = R * T * Z1 / ( P * 10^5) ; disp ( ”mˆ3/mol” ,V , ” M ol ar vo lum e o f n−b u t a n e = ” )
Scilab code Exa 5.7 Pitzer correlation for n butane
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
clc () T = 510; //K P = 26 .6 ; / / b a r T c = 4 25 .2 ; //K P c = 38; / / b a r w = 0 .1 93 ; R = 8 .3 14 ; P r = P / Pc ; T r = T / Tc ; disp ( P r , ” P r = ” ) disp ( T r , ” T r = ” )
/ /From f i g . 5 . 6 and 5 . 7 from t he t e x t book Z 0 = 0 .8 55 ; Z 1 = 0 .0 42 ; Z = Z0 + w * Z1 ; disp (Z , ”Z = ” ) V = R * T * Z / ( P * 10^5) ; disp ( ”mˆ3/mol” ,V , ” M ol ar vo lum e o f n−b u t a n e = ” )
Scilab code Exa 5.8 Molar volume by different methods
1 clc () 2 P = 60 00 ; //kPa
43
T = 325; //K x n2 = 0 .4 ; x e t ha n e = 0 .6 ; a n 2 = 0 .1 3 65 ; / /N mˆ 4 / m ol ˆ 2 bn2 = 3 .8 6 * 1 0^ - 5; //mˆ3/mol a e th a ne = 0 .5 5 7; / /N mˆ 4 / m ol ˆ 2 b et ha ne = 6 .5 1 * 1 0^ - 5; //mˆ3/mol P cn 2 = 3 39 4; //kPa T c n2 = 1 26 .2 ; //K P c e t ha n e = 4 88 0; //kPa T c et ha n e = 3 05 .4 ; //K R = 8 .3 14 ; V = R * T / ( P *1000) ; disp ( ”mˆ3/mol” ,V , ” ( a ) Mo la r v ol ume by i d e a l g a s equation =”) 17 a = ( xn 2 * ( a n2 ^ 0 .5 ) + x et ha ne * ( a et ha ne ^ 0 .5 ) ) ^2 ; 18 b = ( x n2 * b n2 + x e th a ne * b e t ha ne ) ; 19 // s u b s t i t u t i n g t he a b o v e v a l ue s i n van d er w aa ls 3 4 5 6 7 8 9 10 11 12 13 14 15 16
e qu at io n , and s o l v i n g , we g e t 20 V 1 = 3 .6 80 * 1 0^ - 4; //mˆ3/mol 21 disp ( ”mˆ3/mol” , V 1 , ” ( b ) M ol ar v ol um e by v an d e r w a a l s equation =”) 22 23 24 25 26 27 28 29 30 31
P ri n2 = P / Pc n2 ; T ri n2 = T / Tc n2 ; P r ie t ha n e = P / P c et h an e ; T r ie t ha n e = T / T c et h an e ;
/ / u s in g c o m p r e s s i b i l t y c ha rt , Z n2 = 1; Z e t ha n e = 0 .4 2; Z = xn2 * Zn2 + xet hane * Zet hane ; V2 = Z * R * T / P ; disp ( ”mˆ3/mol” , V 2 , ” ( c ) M o la r v o lu m e b a s e d o n c o m p r e s s i b i l t y f a c t o r =” ) P ri 1 n2 = x n2 * P / P cn 2 ; T r i 1n 2 = T / T cn 2 ; P r i 1 e t ha n e = x e th a n e * P / P c e th a n e ; T r i1 e th a ne = T / T c et ha n e ;
32 33 34 35 36 / / u s in g c o m p r e s s i b i l t y c ha rt ,
44
37 38 39 40 41 42 43 44 45 46
Z n21 = 1; Z e t h an e 1 = 0 .7 6; Z 1 = xn 2 * Z n2 1 + x et ha ne * V3 = Z1 * R * T / P ; disp ( ”mˆ3/mol” , V 3 , ” ( c ) M ol a r law =”) T c = xn 2 * T cn 2 + x et ha ne * P c = xn 2 * P cn 2 + x et ha ne * Z c = 0 .8 3; V4 = Zc * R * T / P ; disp ( ”mˆ3/mol” , V 4 , ” ( d ) M ol a r )
Z et ha ne 1 ;
v ol um e b a s e d o n d a l t o n s T ce th an e ; P ce th an e ;
v ol um e by k a y s m et ho d =”
Scilab code Exa 5.9 Van der waals equation and Kays method
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
17 18 19
clc () P 1 = 40; //% ( n i t r o g e n ) P 2 = 60; //% ( e th an e ) T = 325; //K V = 4.5 * 10^ -4; //mˆ3/mol a 1 = 0 .1 36 5; //N∗mˆ4/molˆ2 b 1 = 3.86 * 10 ^ -5; //mˆ3/mol a 2 = 0 .5 57 ; //N∗mˆ4/molˆ2 b 2 = 6.51 * 10 ^ -5; //mˆ3/mol P c 1 = 3 39 4; //kPa T c1 = 1 26 .1 ; //K P c 2 = 4 88 0; //kPa T c2 = 3 05 .4 ; //K R = 8 .3 14 ; Pid eal = R * T / ( V * 1000) ;//kPa disp ( ”kPa” , P i d e a l , ” ( a ) P r es s u r e o f Gas by t he i d e a l g as e q u a ti o n = ” ) y 1 = P 1 /1 00 ; y 2 = P 2 /1 00 ; a = ( y1 * ( a1 ^ (1 /2 ) ) + y2 * ( a2 ^ (1 /2 ) )) ^2;
45
20 b = y1 * b1 + y2 * b2 ; 21 Pv = (( R * T / ( V - b ) ) - a / ( V ^2) ) /1000; 22 disp ( ”kPa” , P v , ” ( b ) P r e s s u r e o f Gas by Van d e r w a al s e q ua t i on = ” ) 23 Tc = y1 * Tc1 + y2 * Tc2 ; 24 Pc = y1 * Pc1 + y2 * Pc2 ; 25 Vc = R * Tc / Pc ; / / P s e ud o c r i t i c a l i d e a l v o lu m e 26 V r = V / Vc ; // P seu do r e du c ed i d e a l v ol um e 27 T r = T / Tc ; / / P se ud o r e d u ce d t e m p e ra t u r e 28 // From f i g 5 . 3 , we g e t Pr = 1 . 2 29 P r = 1. 2; 30 P k = Pr * Pc ; 31 disp ( ”kPa” , P k , ” ( b ) P r e s s u r e o f Gas by t h e Kays method = ”)
46
Chapter 6 Vapour Pressure
Scilab code Exa 6.1 Quality of steam
1 2 3 4 5 6 7 8 9 10 11 12 13
clc () P = 500; //kPa S V = 0 .2 81 3; //mˆ3/kg V s a t ur a te d l = 1 .0 93 * 1 0^ - 3 ;//mˆ3/kg V s a t u r at e d v = 0 . 3 74 7 ; //mˆ3/kg
/ / l e t t h e f r a c t i o n o f v a p o u r be y //(1−y ) ∗ V s a tu r a t ed l + y ∗ V s a t u r a t e d v = S V / / t he n we g et , (1 −y ) ∗ ( 1 . 0 9 3 ∗ 1 0 ˆ − 3 ) + y ∗ ( 0 . 3 7 4 7 ) = 0.2813 y = ( S V - V s at u ra t ed l ) / ( V sa t ur a te d v - V s at u ra t ed l ) ; P1 = y * 100; P 2 = 100 - P1 ; disp ( ”%” , P 1 , ” P e r c e n ta g e o f Vapour = ” ) disp ( ”%” , P 2 , ” P e rc en ta g e o f L i q ui d = ” )
Scilab code Exa 6.2 Calculation of vapour pressure
1 clc ()
47
2 3 4 5 6 7 8 9
T 1 = 36 3; //K T 2 = 37 3; //K P 2s = 1 01 .3 ; //kPa J = 2275 * 18; / / k J / k m o l R = 8 .3 14 ; //kJ/kmolK
/ / l n ( P 2s / P 1s ) = J ∗ ( 1 / T 1 − 1/ T2 ) / R P 1s = P2s /exp ( J * (1/ T1 - 1/ T2 ) / R ); disp ( ”kPa” , P 1 s , ” Vapour p r e s s u r e o f w at er a t 36 3 K = ”)
Scilab code Exa 6.3 Clausius Clapeyron equation for acetone
1 2 3 4 5 6 7 8 9 10 11 12
clc () P 1s = 1 94 .9 ; //kPa P 2 s = 8 .5 2; //kPa T 1 = 35 3; //K T 2 = 27 3; //K T 3 = 30 0; //K P a ir = 1 01 .3 ; //kPa
/ / l o g ( P 2s / P1s ) = J ∗ ( 1 / T 1 − 1/ T2 ) / R // l e t J / R = L L = log ( P 2 s / P1 s ) /( 1/ T 1 - 1 / T2 ) ; P3s = P1s * exp ( L * (1/ T1 - 1/ T3 )) ; P to ta l = P3s + Pa ir ; // a t s a t u r a t i o n v a po u r p r e s s u r e
= p a r t i a l p re ss ur e 13 disp ( ”kPa” , P t o t a l , ” ( a ) F i na l p r e s s u r e o f t he m ix tu re = ”) 14 M P = P3s * 100 / Ptota l; 15 / / mole p e r ce n t = mo le s o f a c et o n e ∗ 10 0 / t o t a l
moles 16 //= P a r t i a l p r e s s u r e o f a c e t o n e ∗ 10 0 / t o t a l Pressure 17 disp ( ”%” , M P , ” ( b ) Mole p e r ce n t o f a ce to n e i n t h e f i n a l m i xt u re = ” )
48
Scilab code Exa 6.4 Antoine equation for n heptane
1 2 3 4 5 6 7 8 9 10 11
clc () A = 1 3. 85 87 ; B = 2 91 1. 32 ; C = 5 6. 56 ; T 1 = 32 5; //K
/ / P r e s s u r e a t n or ma l c o n d i t i o n = 1 0 1 . 3 kPa P 2 = 1 01 .3 ; //kPa / / A n t oi n e e q u a t i on − l n P = A − B / (T − C)
lnP = A - ( B / ( T - C )) ; P1 = exp ( l n P ) ; disp ( ”kPa” , P 1 , ” ( a ) V apour p r e s s u r e o f n−h ep ta n e a t 325K = ”) 12 T2 = B /( A - log ( P 2 ) ) + C ; 13 disp ( ”K” , T 2 , ” ( b ) Normal b o i l i n g p o in t o f n−h e p t a n e = ”)
Scilab code Exa 6.5 Cox chart
1 2 3 4 5 6
7 8 9
clc () T = [ 27 3 293 3 13 323 333 35 3 3 73 ]; P s = [ 0. 61 2 .3 3 7 .3 7 1 2. 34 1 9. 90 4 7. 35 1 01 .3 ]; plot2d ( ’ l l ’ , T , P s , r e c t = [ 2 5 0 , 0 . 1 , 3 8 0 , 1 9 5 ] ) ; P = get ( ” h d l ” ) ; xtitle ( ’ C o n st r u ct i o n o f c ox c h a rt ’ , ’ T e m p e ra t u r e , K ’ , ’ P r e s s u r e , kPa ’ ) ; T 1 = [2 73 35 3] P s1 = [ 8. 52 1 94 .9 ] plot2d ( ’ l l ’ , T 1 , P s 1 ) ;
49
Figure 6.1: Cox chart
50
Figure 6.2: Duhring line
Scilab code Exa 6.6 Duhring line
1 2 3 4 5 6 7 8 9 10 11 12 13
clc () P s w a te r 1 = 6 .0 8; //kPa T 1 = 31 3; //K
//lnPs = 16.26205 − 3799.887/(T − 46.854) T b 1 = 3 7 9 9. 8 8 7 / (1 6 . 2 6 20 5 - log ( P s wa t er 1 ) ) + 4 6. 8 54 ; disp ( ”K” , T b 1 , ” b o i l i n g p o in t o f w at er a t 6 . 0 8 kPa va po ur p r e s s u r e = ” ) P s wa te r 2 = 3 9. 33 ; //kPa T 2 = 35 3; //K T b 2 = 3 7 9 9. 8 8 7 / (1 6 . 2 6 20 5 - log ( P s wa t er 2 ) ) + 4 6. 8 54 ; disp ( ”K” , T b 2 , ” b o i l i n g p o in t o f w at er a t 3 9 .3 3 kPa va po ur p r e s s u r e = ” ) T b = [ Tb1 Tb 2 ]; T = [ T1 T2 ]; plot ( T , T b ) ;
51
14 xtitle ( ’ E qu a l p r e s s u r e r e f e r e n c e p l o t f o r s u l p h u r i c a c i d ’ , ’ B o i l i n g p o in t o f s o l u ti o n , K ’ , ’ B o i l i n g p o i nt o f wa ter , K ’ ) ; 15 T 3 = 33 3; //K 16 // c o r r es p o n d i ng t o T3 on x a x is , on y we g e t 17 Tb3 = 3 29 ; //K 18 P s w a te r 3 = exp ( 1 6. 2 62 0 5 - 3 7 99 . 88 7 /( T b 3 - 4 6 .8 5 4) ) ; 19 disp ( ”kPa” ,Psw ater3 , ” Vapour p r e s s u r e o f s o l u t i o n a t 333K” )
52
Chapter 7 Solutions and Phase Behaviour
Scilab code Exa 7.1 composition calculation of Liquid and vapour at equi-
librium 1 2 3 4 5 6 7 8 9 10 11 12
clc () P a s = 7 1. 2; //kPa P b s = 4 8. 9; //kPa P = 65; //kPa
//P=(Pas−P b s ) ∗ x a+Pbs , x a=m ol e f r a c t i o n o f n−h e p t a n e , l i q . c o n di t i o n , t h e r e f o r e xa = ( P - Pbs ) /( Pas - Pbs );
// ya = Pa / P , Vapour c o n d i t i o n
ya = Pas * xa / P ; P 1 = xa * 100; P 2 = ya * 100; disp ( ”%” , P 1 , ” P er ce nt ag e o f h e p a tn e i n l i q u i d = ” ) disp ( ”%” , P 2 , ” P e r ce n ta g e o f h ep at ne i n v ap ou r = ” )
Scilab code Exa 7.2 Composition and total pressure calculation
1 clc ()
53
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
P 1 = 10 0; // kPa ( Vapour p r e s s u r e o f l i q A ) P 2 = 60; // kPa ( Vapour p r e s s u r e o f l i q B ) T = 320; //K
/ / P a = x a ∗ P 1 = 1 0 0 ∗ xa / / P a = x b ∗ P 2 = 6 0 ∗ xb / / P = x a ∗ P1 + ( 1 − xa ) ∗ P2 // = 1 00 xa + ( 1 − xa ) ∗ 60 / / = 6 0 + 4 0 ∗ xa / / ya = Pa / P / / 0 . 5 = 1 00∗ xa / ( 60 + 40 ∗ xa ) x a = 60 * 0.5 / (100 - 20) ; Per1 = xa * 100; disp ( ”%” , P e r 1 , ” ( a ) P er ce nt ag e o f A i n l i q u i d = ” ) Ptotal = 60 + 40 * xa; disp ( ”kPa” , P t o t a l , ” ( b ) T ot al p r e s s u r e o f t he v a po u r = ”)
Scilab code Exa 7.3 Mole fraction calculation for particular component in
liquid vapour mixture 1 2 3 4 5 6 7 8 9 10 11 12
clc () x a = 0 .2 5; x b = 0 .3 0; xc = 1 - xa - xb ; P t o ta l = 2 00 ; //kPa P cs = 50; // kPa ( V apour p r e s s u r e o f c ) P c = xc * Pcs ; // ( p a r t i a l p r e s s u r e o f c ) yc = Pc / Pto tal ; y b = 0. 5; ya = 1 - yb - yc ; per1 = ya * 100; disp ( ”%” , p e r 1 , ” P e r ce n ta g e o f A i n v ap ou r = ” )
54
Figure 7.1: Boiling point diagram Scilab code Exa 7.4 Flash vapourization of benzene toluene mixture
1 2 3 4 5 6 7 8 9 10 11
clc () P = 1 01 .3 ; //kPa P bs = 5 4. 21 ; //kPa P a s = 1 36 . 09 ; //kPa x f = 0 .6 5; xw = ( P - Pbs ) /( Pas - Pbs ); yd = xw * Pas / P ;
/ / f = ( x f − xw ) / ( yd − xw ) f = ( x f - x w ) / ( yd - x w ) ; per1 = f * 100; disp ( ”%” , p e r 1 , ” mo le p e r c e n t o f t h e f e e d t ha t i s v a p ou r i se d = ” )
55
Scilab code Exa 7.5.a Boiling point diagram
1 2 3 4 5 6 7 8 9 10 11 12 13 14
clc () T = [ 37 1. 4 378 38 3 388 3 93 3 98 .6 ] P as = [ 10 1. 3 1 25 .3 1 40 1 60 1 79 .9 2 05 .3 ] P b s = [ 44 .4 5 5. 6 6 4. 5 7 4. 8 8 6. 6 1 01 .3 ] P t o ta l = 1 01 .3 ; //kPa for i = 1:6 x (i ) = ( P to ta l - Pb s (i ) )/( P as ( i) - Pb s (i ) ); end for i = 1:6 y (i ) = x (i ) * Pas ( i) / Pt ot al ; end plot ( x , T , ’−o ’ ) ; plot ( y , T , ’−x ’ ) ; xtitle ( ’ B o i l i n g p o i n t d ia gr am ’ , ’ Mole f r a c t i o n x o r y ’ , ’ Temperature K’ )
Scilab code Exa 7.5.b Equilibrium Diagram
1 2 3 4 5 6 7 8 9 10 11 12 13
clc () T = [ 37 1. 4 378 38 3 388 3 93 3 98 .6 ] P as = [ 10 1. 3 1 25 .3 1 40 1 60 1 79 .9 2 05 .3 ] P b s = [ 44 .4 5 5. 6 6 4. 5 7 4. 8 8 6. 6 1 01 .3 ] P t o ta l = 1 01 .3 ; //kPa for i = 1:6 x (i ) = ( P to ta l - Pb s (i ) )/( P as ( i) - Pb s (i ) ); end for i = 1:6 y (i ) = x (i ) * Pas ( i) / Pt ot al ; end w = x; plot ( x , w ) ;
56
Figure 7.2: Equilibrium Diagram
57
14 plot ( x , y , ’−o ’ ) ; 15 xtitle ( ’ E q u i l i b r i u m c u r v e ’ , ’ x , mole f r a c t i o n l i q u i d ’ , ’ y , mole f r a c t i o n i n v a po u r ’ ) ;
in
Scilab code Exa 7.6 Bubble point temperature and vapour composition
1 2 3 4 5 6 7 8 9 10 11 12
clc () P s = 10 0; //kPa A 1 = 1 3. 85 87 ; // ( 1 = n−h e p t a n e ) A 2 = 1 3. 82 16 ; // ( 2 = n−hexane ) B 1 = 2 91 1. 32 ; B 2 = 2 69 7. 55 ; C 1 = 5 6. 51 ; C 2 = 4 8. 78 ;
/ / l n Ps = A − B / ( T − C) T 1 = B1 / ( -log ( Ps ) + A1 ) + C1 ; T 2 = B2 / ( -log ( Ps ) + A2 ) + C2 ; x 2 = 0 .2 5;
Scilab code Exa 7.7 Dew point temperature pressure and concentration
1 2 3 4 5 6 7 8
clc ()
//lnPas = 14.5463 − 2940.46/(T − 35.93) / / l n P b s = 1 4 . 2 7 2 4 − 2 94 5 .4 7 / (T − 4 9 . 1 5 ) / / x a = ( P − P bs ) / ( P a s − P b s ) / / Y a = P a s ∗ (P − Pbs) /(P ∗ ( P a s − Pbs ) ) Y a = 0. 4; P = 65; //kPa
// v a r i o u s t em p er at u re v a lu e a r e assumed and t r i e d t i l l LHS = RHS , we g e t 9 T = 3 34 .1 5; //K 10 P as = exp ( 1 4. 5 46 3 - 2 9 40 . 46 / ( T - 3 5. 93 ) ) ; 11 P bs = exp ( 14 .2 72 4 - 2 94 5. 47 / ( T - 4 9. 15 ) );
58
12 xa = ( P - Pbs ) /( Pas - Pbs ); 13 disp ( ”K” ,T , ” ( a ) The Dew p o i n t t e mp e ra t u re a t 65 kPa = ”) 14 disp ( x a , ” C o nc e nt ra ti on o f t h e f i r s t d ro p o f l i q u i d = ”) 15 T 1 = 32 7; //K 16 P a s1 = exp ( 1 4. 5 46 3 - 2 9 40 . 46 / ( T1 - 3 5 .9 3) ) ; 17 P b s1 = exp ( 14 .2 72 4 - 2 94 5. 47 / ( T1 - 4 9. 15 ) ); 18 xa1 = Ya * P bs 1 / ( Pa s1 - Ya *( P as 1 - Pb s1 ) ); 19 P 1 = xa1 * Pas1 / Ya ; 20 disp ( ”kPa” , P 1 , ” ( b ) The dew p o i n t p r e s s u r e a t 32 7 K = ”) 21 disp ( x a 1 , ” C o n c e n t r a t i o n a t 32 7K = ” )
Scilab code Exa 7.8 Partial pressure of acetaldehyde
1 2 3 4 5 6 7 8 9 10 11 12
clc () M W = 4 4. 03 2; M wa t er = 1 8. 0 16 ; x = 2 ; //% P a = 4 1. 4; //kPa M fr = ( x / MW ) / ( x/ M W + ( 10 0 - x ) / Mw at er ) ;
/ / h en ry ’ s l aw g i v e s Pa = Ha ∗ xa H a = Pa / Mfr ; M o l al i ty = 0 .1 ; M fr 1 = M ol al it y / ( 10 00 / M wa te r + M ol al it y ) ; Pa1 = Ha * Mfr1 ; disp ( ”kPa” , P a 1 , ” P a r t i a l P r es s ur e = ” )
Scilab code Exa 7.9 Raults law application
1 clc () 2 // 1 − p e n ta n e , 2 − h e xa ne , 3 − h e p t a n e
59
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
x1 = x2 = x3 = A1 = A2 = A3 = B1 = B2 = B3 = C1 = C2 = C3 =
// As r a o u l t s l aw i s a p p l i c a b l e , Ki = y i / x i = P is /P / / y i = x i ∗ P i s / P / / l n P = A− B / ( T−C) // Assuming , P = 400; //kPa T = 3 69 .7 5; //K
26 27 28 29 30 31 32 33 34 35 36
0. 6; 0 .2 5; 0 .1 5; 1 3. 81 83 ; 1 3. 82 16 ; 1 3. 85 87 ; 2 47 7. 07 ; 2 69 7. 55 ; 2 91 1. 32 ; 3 9. 94 ; 4 8. 78 ; 5 6. 51 ;
P a s1 = exp ( A 1 - B 1 / ( T - C 1 ) ) ; P a s2 = exp ( A 2 - B 2 / ( T - C 2 ) ) ; P a s3 = exp ( A 3 - B 3 / ( T - C 3 ) ) ; Y i = ( x1 * P as 1 + x2 * P as 2 + x3 * P as 3 )/ P; disp ( ”K” ,T , ” ( a ) b ub bl e p o i nt t em p er a tu re o f t he mixture = ”) y 1 = x1 * Pa s1 / P ; y 2 = x2 * Pa s2 / P ; y 3 = x3 * Pa s3 / P ; disp ( ”%” , y 1 * 1 0 0 , ” ( b ) c o mp o s it i o n o f n−p en ta n e i n vapour = ”) disp ( ”%” , y 2 * 1 0 0 , ” c o m po s it i o n o f n−h ex an e i n v ap ou r = ”) disp ( ”%” , y 3 * 1 0 0 , ” c o m po s it i o n o f n−h ep ta n e i n v ap ou r = ”) T 1 = 30 0; //K P s1 = exp ( A1 - B1 / ( T1 - C1 )) ; P s2 = exp ( A2 - B2 / ( T1 - C2 )) ; P s3 = exp ( A3 - B3 / ( T1 - C3 )) ; P1 = x1 * Ps1 + x2 * Ps2 + x3 * Ps3 ;
60
37 disp ( ”kPa” , P 1 , ” ( c ) B ub bl e p o i n t
p r e s s u r e =” )
Scilab code Exa 7.10 Dew point temperature and pressure
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
clc ()
// 1 − p e n ta n e , 2 − h e xa ne , 3 − h e p t a n e y 1 = 0. 6; y 2 = 0 .2 5; y 3 = 0 .1 5; A 1 = 1 3. 81 83 ; A 2 = 1 3. 82 16 ; A 3 = 1 3. 85 87 ; B 1 = 2 47 7. 07 ; B 2 = 2 69 7. 55 ; B 3 = 2 91 1. 32 ; C 1 = 3 9. 94 ; C 2 = 4 8. 78 ; C 3 = 5 6. 51 ; P = 400; //kPa T = 300; //K
// As r a o u l t s l aw i s a p p l i c a b l e , Ki = y i / x i = P is /P / / x i = y i ∗P / P i s / / l n P = A− B / ( T−C) // Assuming , T 1 = 3 85 .9 4; //K
P a s1 = exp ( A1 - B1 / ( T1 - C1 )) ; P a s2 = exp ( A2 - B2 / ( T1 - C2 )) ; P a s3 = exp ( A3 - B3 / ( T1 - C3 )) ; disp ( ”K” ,T , ” ( a ) Dew p o i n t t e mp e r at u r e o f t h e m i xt u re = ”) P s1 = exp ( A 1 - B 1 / ( T - C 1 ) ) ; P s2 = exp ( A 2 - B 2 / ( T - C 2 ) ) ; P s3 = exp ( A 3 - B 3 / ( T - C 3 ) ) ; P 1 = 1 /( y 1/ P s1 + y 2/ Ps 2 + y3 / Ps 3 ); disp ( ”kPa” , P 1 , ” ( b ) Dew p o i nt p r e s s u r e = ” )
61
Scilab code Exa 7.11 bubble point and dew point
1 2 3 4 5 6 7
clc ()
// 1 − m e t ha n ol , 2 − e t h an o l , 3 − p r o p a n o l x 1 = 0 .4 5; x 2 = 0. 3; x3 = 1 - ( x1 + x2 ) ; P = 1 01 .3 ; //kPa
/ / by d ra wi ng t he t em p er a tu re v s v ap ou r p r e s s u r e g ra p h and i n t e r p o l a t i o n , a ss um in g , 8 T = 3 44 .6 ; //K 9 10 11 12 13 14 15 16
17 18 19 20 21 22 23 24 25 26 27 28
P s1 = 1 37 .3 ; P s 2 = 7 6. 2; P s 3 = 6 5. 4; y1 = x1 * Ps1 / P ; y2 = x2 * Ps2 / P ; y3 = x3 * Ps3 / P ; disp ( ”K” ,T , ” ( a ) B ub bl e p o i n t t e m pe r a tu r e = ” ) disp ( ”%” , y 1 * 1 0 0 , ” C o m po s it io n o f m et ha no l i n v ap ou r = ”) disp ( ”%” , y 2 * 1 0 0 , ” C o mp os it io n o f e t h a no l i n v ap ou r = ”) disp ( ”%” , y 3 * 1 0 0 , ” C o mp os it io n o f p r op a no l i n v ap ou r = ”)
// a ga i n , f o r x i = 1 T 1 = 3 47 .5 ; //K P 1 = 1 53 .2 8; P 2 = 8 5. 25 ; P 3 = 7 3. 31 ; xa = x1 * P / P1 ; xb = x2 * P / P2 ; xc = x3 * P / P3 ; disp ( ”K” , T 1 , ” ( b ) Dew p o i n t t e m pe r a tu r e = ” ) disp ( ”%” , x a * 1 0 0 , ” C o mp os it io n o f m et ha no l i n l i q u i d =
62
”) 29 disp ( ”%” , x b * 1 0 0 , ” C om po si ti on o f e t ha n ol i n l i q u i d = ”) 30 disp ( ”%” , x c * 1 0 0 , ” C om po si ti on o f p ro pa no l i n l i q u i d = ”)
Scilab code Exa 7.12 component calculations
1 2 3 4 5 6
clc () x p = 0 .2 5; x nb = 0 .4 ; x n p = 0 .3 5; P = 1 44 7. 14 ; //kPa
// a s su mi ng t e mp e ra t ur e s 3 5 5 .4 K a nd 3 6 6 . 5 K , c o r r e s p o n d i n g Ki v a l u e s a r e f ou nd f ro m nomograph and t o t a l Ki v a l u e a r e 0 . 92 8 and 1 . 07 5 r es p , t hu s b u bb le p o i n t t e m pe r a tu r e l i e s b etw een , u s i n g i n t e r p o l a t i o n b ub bl e p o in t t em pe ra tu re i s f o un d t o be , 7 T b = 36 1; //K 8 disp ( ”K” , T b , ” ( a ) The b uu bl e p o i n t t em p er a tu r e = ” ) 9 / / At 3 6 1 , K i p = 2 .1 2; K in b = 0 .8 5; K in p = 0 .3 7; xp1 = Kip * xp ; xn b1 = Ki nb * xnb ; xn p1 = Ki np * xnp ; disp ( x p 1 , ” c o n c e n t r a t i o n o f p ro pa ne a t b ub bl e p o i nt = ”) 17 disp ( x n b 1 , ” c o n c e n t r a t i o n o f n−b ut an e a t b ub bl e p o i nt = ”) 18 disp ( x n p 1 , ” c o n c e n t r a t i o n o f n−p en t an e a t b u bb l e p o in t = ” ) 19 // At d ew p o in t Yi / Ki = 1 , a t 3 7 7. 6K t h i s i s 1 . 1 5 98 10 11 12 13 14 15 16
63
and a t 3 8 8 . 8K i t i s 0 . 9 6 77 , by i n t e r p o l a t i o n dew p o i n t i s f o u n d t o be 20 T d = 38 7; //K 21 22 23 24 25 26 27 28 29
30
K ip 1 = 2 .8 5; K in b1 = 1 .2 5; K in p1 = 0 .5 9; y p1 = xp / K ip 1 ; y n b1 = x nb / K i nb 1 ; y n p1 = x np / K i np 1 ; disp ( ”K” , T d , ” ( b ) The dew p o i n t t e m pe r a tu r e = ” ) disp ( y p 1 , ” c o n c e n t r a t i o n o f p ro pa ne a t dew p o i nt = ” ) disp ( y n b 1 , ” c o n c e n t r a t i o n o f n−b ut an e a t dew p o i nt = ”) disp ( y n p 1 , ” c o n c e n t r a t i o n o f n−p en t an e a t dew p o i n t = ”)
31 / / su mm at io n z i / ( 1 + L/ VKi )= 0 . 4 5 , u s i n g
t r i a l and
e r r or , we f i n d 32 T = 3 74 .6 ; //K 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
L = 0. 55 ; V = 0. 45 ; K ip 2 = 2 .5 ; K in b2 = 1 .0 8; K in p2 = 0 .4 8; t = ( x p /( 1+ L / ( V * Ki p2 ) ) ) +( x n b / (1 + L /( V * K in b2 ) ) ) + ( x np /(1+L/(V*Kinp2))); y p 2 = ( x p / ( 1+ L / ( V * K i p 2 ) ) ) /t ; y n b 2 = ( x n b / ( 1+ L / ( V * K i n b2 ) ) ) / t ; y n p 2 = ( x n p / ( 1+ L / ( V * K i n p2 ) ) ) / t ; xp2 = ( xp - V * yp2 )/ L ; xnb2 = ( xnb - V * ynb2 )/ L; xnp2 = ( xnp - V * ynp2 )/ L; disp ( ”K” ,T , ” ( c ) T em pe ra tu re o f t h e m i x tu r e = ” ) disp ( y p 2 , ” v ap ou r p ha se c o n c e n t r a t i o n o f p ro pa ne = ” ) disp ( y n b 2 , ” v a p ou r p ha se c o n c e n t r a t i o n o f n−b u t a n e = ”) disp ( y n p 2 , ” v a p ou r p ha se c o n c e n t r a t i o n o f n−p e n t a n e = ”) disp ( x p 2 , ” l i q u i d p ha se c o n c e n t r a t i o n o f p ro pa ne = ” )
64
50 disp ( x n b 2 , ” l i q u i d ”) 51 disp ( x n p 2 , ” l i q u i d ”)
p ha se c o n c e n t r a t i o n o f n−b u t a n e = p ha se c o n c e n t r a t i o n o f n−p e n t a n e =
Scilab code Exa 7.13 equilibrium temperature and composition
1 2 3 4 5 6 7 8 9 10 11 12 13
clc () P = 9 3. 30 ; //kPa T 1 = 35 3; //K T 2 = 37 3; //K P w at e r1 = 4 7. 9 8; //kPa P w at e r2 = 1 01 . 3; //kPa P li q1 = 2 .6 7; //kPa P li q2 = 5 .3 3; //kPa T = T1 + ( T2 - T1 ) *( P - ( P wa te r1 + P li q1 ) )/( P wa te r2 + P li q2 - ( P wa te r1 + P li q1 ) ) ; disp ( ”K” ,T , ” ( a ) The e q u i l i b r i u m t em p er a tu re = ” ) P w a te r = 8 8. 50 ; y = Pwater * 100 / P; disp ( ”%” ,y , ” ( b ) Water v ap ou r i n v ap ou r m i xt u re = ” )
Scilab code Exa 7.14 Temperature composition diagram
1 clc () 2 / / t h e t h r e e p ha s e t e m pe r a tu r e i s
f i r s t f i n d o ut , whi ch comes t o be 3 42K, t he c o r r es p o n d i ng Ps1 = 7 1 . 1 8 , Ps2 = 3 0 . 1 2
3 T = [ 34 2 343 3 48 353 363 3 73 ]; 4 P s2 = [ 30 .1 2 3 1. 06 3 7. 99 4 7. 32 7 0. 11 1 01 .3 ]; 5 P s 1 = [ 71 .1 8 7 2. 91 8 5. 31 1 00 .5 1 35 .4 2 1 7 9. 1 4] ;
65
Figure 7.3: Temperature composition diagram
66
6 7 8 9 10 11 12 13 14 15
P = 1 01 .3 ; //kPa for i = 1:4 y1 ( i) = 1 - ( Ps1 ( i) )/ P; end for i = 1:6 y2 ( i) = 1 - ( Ps2 ( i) )/ P; end plot2d ( y 2 , T ) ; plot2d ( 1 - y1 , T , r e c t = [ 0 , 3 20 , 1 , 3 80 ] ) ; xtitle ( ’ Temperat ure − c o m p o s i t o n d i a gr a m ’ , ’ x , y ( mole f r a c t i o n o f b en ze ne ) ’ , ’ Temperat ure ’ )
Scilab code Exa 7.15 Boiling point calculation
1 2 3 4 5 6 7 8 9 10
clc () T = 3 79 .2 ; //K P = 1 01 .3 ; //kPa P s = 70; //kPa M ol al it y = 5; P ws = exp ( 1 6. 2 62 0 5 - 3 7 99 . 88 7 /( T - 4 6 .8 5 4) ) ; k = P / Pws ; Pws1 = Ps / k ; T 1 = 3 79 9. 88 7 / ( 16 .2 62 05 - log ( P ws 1 )) + 4 6. 85 4; disp ( ”K” , T 1 , ” B o i l i n g p o i n t o f t he s o l u t i o n = ” )
67
Chapter 8 Humidity and Humidity chart
Scilab code Exa 8.1 Nitrogen and ammonia gas mixture
1 2 3 4 5
clc () T = 2 8 0 ; / /K P = 1 0 5 ; //kPa kP a ( V p a o u r p r e s s u r e o f a c et e t o ne ne ) P as as = 1 3. 3 . 25 2 5 ; / / kP P a = P a s ; / / ( A s g a s i s s at a t ur u r at a t ed e d , p a r t i a l p r e s s u re re
= va v a po po u r p r e s s u r e ) 6 Mfr = Pa / P ;/ / ( Mole f r a c t i o n ) 7 Mpr = Mfr * 100; 8 disp ( ”%” ”%” , M p r , ” ( a ) Th T h e m ol o l e p e rc r c e nt n t o f a c e to t o n e i n t he he mixture = ”) 9 M a = 5 8. e i g ht h t o f a c e t o ne ne ) 8 . 04 0 4 8; 8 ; / / ( m o l e c u l a r w ei 10 M n = 2 8 ; / / ( m o l ec e c u l ar a r w ei e i gh gh t o f n i t r o g e n ) 11 N = 1 ; / / m o l e 12 N a = M f r * N ; 13 N n = N - N a ; 14 m a = N a * M a ; 15 m n = N n * M n ; 16 m t o ta ta l = m a + m n ; 17 m ap a p er e r = m a * 10 10 0 / m to t o ta ta l ; 18 m np n p er e r = m n * 10 1 0 0/ 0 / m to t o ta ta l ; 19 disp ( ”%” ”%” , m a p e r , ” ( b ) W ei e i g h t p e r ce c e n t o f a c et et o n e = ” )
68
20 21 22 23 24 25 26
”%” , m n p e r , ” We W e i g h t p e r ce ce n t o f n i t r o g e n = ” ) disp ( ”%” V st s t p = 2 2. 2 . 4; 4 ; //mˆ3/kmol P s tp t p = 1 01 0 1 .3 . 3 ; //kPa T s tp t p = 2 7 3. 3 . 15 1 5 ; / /K V = Vstp * Pstp * T / ( Tstp * P ) ; C = m a /V /V ; a p o ur ur = ” ) disp ( ”kg/mˆ3” , C , ” ( c ) C o n c e n t r a t i o n o f v ap
Scilab code Exa 8.2 Benzene vapour air mixture
1 2 3 4 5 6 7 8
clc () P = 1 01 0 1 .3 . 3 ; //kPa P e r1 r 1 = 1 0; 0; / /% e n ze z e ne ne ) P a = P * P e r 1 / 1 0 0 ; / / ( a − b en P s = Pa ;/ / ( s a t u r a t i o n )
//lnPs = 13.8858 − 2788.51/(T − 52.36) T = 2 7 88 8 8 . 5 1 / ( 1 3 . 88 8 8 5 8 - l o g ( Ps P s ) ) + 5 2. 2 . 36 36 ; e m pe p e ra r a tu t u re r e a t w h i ch c h s a t u r a t i o n o c c u rs rs = disp ( ”K” , T , ” T em ”)
Scilab code Exa 8.3 Evaporation of acetone using dry air
1 2 3 4 5
clc () P d ry r y a ir i r = 1 01 0 1 . 3; 3 ; //kPa P a ce c e to t o n e = 1 6. 6 . 82 8 2 ; //kPa N ra r a ti t i o = P ac a c et e t on o n e / ( P dr d r ya y a ir i r - P ac a c et e t on on e ) ; a c et e t on on e = m ra r a ti t i o = N ra r a ti t i o * 5 8. 8 . 04 0 4 8 / 2 9 ; / / ( M ac
5 8 . 0 4 8 , Mair = 29 ) 6 m ac k g ( g iv i v en en ) a c et e t on o n e = 5 ; / / kg 7 m d r ya y a i r = m ac a c e to t o n e / m ra r a ti ti o ; 8 disp ( ” k g ” ,mdryai r , ” Mi Minimum a i r
69
r e q u i r e d = ”)
Scilab code Exa 8.4 Humidity for acetone vapour and nitrogen gas mix-
ture 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
clc () kP a ( p a r t i a l p r e s s u r e o f a c e t o n e ) P a = 1 5 ; / / kP P t o ta t a l = 1 01 0 1 .3 . 3 ; //kPa M fr f r = P a / P to t o ta ta l ; disp ( M f r , ” ( a ) Mo M o l e f r a c t i o n o f a ce c e to to n e = ” ) M a ce c e to t o n e = 5 8. 8 . 0 48 48 ; M n i t ro r o g en e n = 2 8; 8; m a fr fr = M f r * M ac a c et e t on o n e / ( M f r * M ac a c et e t on o n e + ( 1 - Mf Mf r ) * M n i tr t r o g en en ) ; W e i g h t f r a c t i o n o f a c e to to n e = ” ) disp ( m a f r , ” ( b ) We Y = Mfr / ( 1 - Mfr ); o l es e s o f a c et e t o n e / m ol o l es es o f n i t r o g e n ” ,Y , ” ( c ) disp ( ” m ol M ol o l al a l h um u m i di d i ty ty = ” ) Y 1 = Y * M ac a c et e t on o n e / M ni n i tr t r og o g en en ; k g a c e t o ne ne / k g n i t r o g e n ” ,Y1,” ( d ) A b s o l u t e disp ( ” kg humidity = ”) k P a ( v ap a p ou ou r p r e s s u r e ) P as as = 2 6. 6 . 36 3 6 ; / / kP Y s = P a s / ( P to t o t a l - P a s ); ) ;/ / s a t u r a t i o n h um u m i di d i ty ty o l es e s o f a c et e t o n e / m ol o l es es o f n i t r o g e n ” , Y s , ” ( e ) disp ( ” m ol S a t u r a t i o n h um u m i di d i ty ty = ”) Y 1 s = Y s * M ac a c et e t on o n e / M ni n i tr t r og o g en en ; disp ( ” kg k g a c e t o ne ne / k g n i t r o g e n ” ,Y1s, ” ( f ) Abs olu te s a t u r a t i o n h um u m id i d it it y = ”) V = 1 0 0 ; //mˆ3 V s t p = 2 2 .4 . 4 1 4 3; 3 ; //mˆ3/kmol P s tp t p = 1 01 0 1 .3 . 3 ; //kPa T s tp t p = 2 7 3. 3 . 15 1 5 ; / /K T = 2 9 5 ; / /K N = V * P t o t a l * T s t p / ( Vs Vs t p * P s t p * T ) ; N ac a c et e t on o n e = N * M f r; r; m a c et e t o ne n e = N a ce c e t on o n e * M a ce c e to to n e ;
70
27 disp ( ” k g ” ,mac etone , ” ( g ) Mass o f a c et o ne i n 10 0mˆ3 o f the t o t al gas = ”)
Scilab code Exa 8.5 Percent saturation and relative saturation
1 2 3 4 5 6 7 8 9
clc () ; P a = 15; // kPa ( P a r t i a l p r e s s u r e ) P as = 2 6. 36 ; // kPa ( Vapour p r e s s u r e ) RS = Pa * 100 / Pas ; Y = 0 .1 73 8; Y s = 0 .3 51 7; PS = Y * 100 / Ys ; disp ( ”%” , R S , ” R e l a t i v e h um id i ty = ” ) disp ( ”%” , P S , ” P e r c en t h u mi di ty = ” )
Scilab code Exa 8.6 Analysis of Moist air
1 2 3 4 5 6 7 8 9 10 11 12 13
14 15
clc () m wa t er = 0 .0 1 09 ; / / k g V = 1 ; //mˆ3 T = 300; //K P = 1 01 .3 ; //kPa V s t p = 2 2 .4 1 4 3; //mˆ3/kmol P s tp = 1 01 .3 ; //kPa T s tp = 2 7 3. 15 ; //K N = V * P * Tstp / ( Vstp * Pstp * T ) ; N wa te r = m wa te r / 1 8. 01 6; Nfr = Nwater / N ; Pwa ter = Nfr * P ; disp ( ”kPa” , P w a t e r , ” ( a ) P a r t i a l p r e s s u r e o f w a te r vapour = ”) Ps = exp ( 1 6. 2 62 0 5 - 3 7 99 . 88 7 /( T - 4 6 .8 54 ) ) ; R S = Pwa ter * 100 / Ps ;
71
16 disp ( ”%” , R S , ” ( b ) R e l a t i v e s a t u r a t i o n = ” ) 17 Y1 = P wa te r *18 / (( P - P wa te r )* 29 ); 18 disp ( ” kg w at er / kg dr y a i r ” , Y 1 , ” ( c ) A b s o l u t e humidity = ”) 19 Y1s = Ps *18 / (( P - Ps ) *29) ; 20 P S 1 = Y 1 * 1 0 0 / Y 1 s ; 21 disp ( ”%” , P S 1 , ” ( d ) P er ce nt s a t u r a t i o n = ” ) 22 P S = 10; //% 23 Y 1S = Y1 * 100/ PS ; 24 / / Y 1 S = P a s / ( P − Pas ) ∗ 1 8 / 29 25 Pas1 = 29 * P * Y1S / (18 + 29* Y1s ); 26 T 1 = 3 79 9. 88 7 / ( 16 .2 62 05 -log ( P as 1 ) ) + 4 6 .8 54 ; 27 disp ( ”K” , T 1 , ” ( e ) T e mp e ra t ur e a t w hi ch 1 0% s a t u r a t i o n o c cu r s = ” )
Scilab code Exa 8.7 Heating value calculation for a fuel gas
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
clc () T = 300; //K P = 100; //kPa S = 25 00 0 //kJ/mˆ3 T 1 = 2 95 ; //K P 1 = 10 5; //kPa R S = 50; //% P s = 3. 5; //kPa P s1 = 2 .6 ; //kPa V s tp = 2 2 .4 1 43 ; //mˆ3/kmol P s tp = 1 01 .3 ; //kPa T s tp = 2 7 3. 15 ; //K V = 1 ; //mˆ3 N = V * P * Tstp /( Vstp * Pstp * T ) ; Nfuel = N * (P - Ps)/P; Smol = S / Nfuel ; / / k J / k m o l N 1 = V * P1 * Tstp /( Vstp * Pstp * T1 ); P wa te r = Ps1 * RS / 10 0;
72
19 N fu el 1 = N1 * ( P1 - P wa te r ) /P1 ; 20 S 1 = Sm ol * N fu el 1 ; 21 disp ( ”kJ/mˆ3” , S 1 , ” H e at in g v a lu e o f g as a t 29 5K and 105kPa = ”)
Scilab code Exa 8.8 Analysis of nitrogen benzene mixture
1 2 3 4 5 6 7 8
clc () T = 300; //K T 1 = 33 5; //K P = 150; //kPa
/ / l n P s = 1 3 . 8 8 5 8 − 2 7 88 .5 1 / ( T − 5 2 . 3 6 ) Ps = exp ( 13 .8 85 8 - 2 78 8. 51 / ( T - 5 2. 36 )) ; P s1 = exp ( 13 .8 85 8 - 2 78 8. 51 / ( T1 - 5 2. 36 )) ; P a = Ps ; // ( V apour p r e s s u r e a t dew p o in t i s e qu a l t o
th e p a r t i a l p r es s ur e o f th e vapour ) 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Y = Pa / ( P - Pa ) ; Y s = Ps1 / ( P - Ps1 ); PS = Y * 100 / Ys ; disp ( ”%” , P S , ” ( a ) P er ce n t s a t u r a t i o n = ” ) M a = 7 8. 04 8; M b = 28; Q = Y * Ma / Mb ; disp ( ” kg b en ze ne / k g n i t r o g e n ” ,Q , ” ( b ) Q u an t i ty o f b en ze ne p er k il g r a m o f n i t r o g e n = ” ) V = 1 ; //mˆ3 ( b a s i s ) V s tp = 2 2 .4 1 43 ; //mˆ3/kmol P s tp = 1 01 .3 ; //kPa T s tp = 2 7 3. 15 ; //K N = V * P * Tstp /( Vstp * Pstp * T1 ); y = Y / ( 1 + Y ); N be nze ne = N * y ; C = Nb en zen e * Ma ; disp ( ”kg/mˆ3” ,C , ” ( c ) K i lo g ra m o f b e nz e ne p e r mˆ 3 o f n i t ro g e n = ”)
73
26 27 28 29 30 31 32 33 34
P 1 = 10 0; //kPa P b en ze ne = y * P1 ; T1 = 2 788. 51 / ( 13 .88 58 - log ( P b e nz e ne ) ) + 5 2 .3 6; disp ( ”K” , T 1 , ” ( d ) D e w p o i n t = ” ) P e r1 = 6 0; //% Y 2 = Y * (1 - P er 1 /1 00) ;
/ /Y2 = Pa / ( P − Pa ) P = Pa / Y2 + Pa ; disp ( ”kPa” ,P , ” ( e ) P r e s s u r e r e q u i r e d = ” )
Scilab code Exa 8.9 Drying
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
clc () T = 300; //K T 1 = 28 5; //K P w a te r = 3 .5 6; //kPa P w a te r 1 = 1 .4 ; //kPa V = 1 ; //mˆ3 ( B a s is ) V s tp = 2 2 .4 1 43 ; //mˆ3/kmol N = V / Vstp ; P s tp = 1 01 .3 ; //kPa Y = P wa te r / ( Ps tp - P wa te r ); Y1 = P wa te r1 / ( Pst p - P wa te r1 ) ; N r em ov ed = Y - Y1 ; N drya ir = N * 1 / (1 + Y ) ; m re mo ve d = N dr ya ir * N re mo ve d * 1 8. 01 6; disp ( ” k g ” ,mre moved , ” ( a ) amount o f w a te r r em ov ed = ” ) N re ma in in g = N dr ya ir * Y1 ; V1 = ( N dr ya ir + N re ma in in g ) * Vs tp ; disp ( ”mˆ3” , V 1 , ” ( b ) Volume o f g as a t s t p a f t e r d ry i n g = ”)
74
Figure 8.1: Saturation lines for hexane
75
Scilab code Exa 8.10 Saturation lines for hexane
1 2 3 4 5 6 7 8 9 10 11 12 13
clc () P = 100; //kPa T = [ 27 3 280 2 90 300 310 32 0 330 3 40 ]; for i = 1: 8 Ps ( i) = exp ( 1 3 .8 2 1 6 - 2 6 9 7. 5 5 /( T ( i ) - 4 8. 7 8) ) ; end disp ( ( P s ) ) for j = 1:8 Ys ( j) = Ps (j ) * 86 .1 1 / (( P - Ps (j )) *2 8) ; end disp ( Y s ) plot ( T , Y s , r e c t = [ 2 7 3 , 0 , 3 3 3 , 1 0 ] ) ; xtitle ( ’ 1 00% s a t u r a t i o n l i n e f o r n i tr o g e n −h e x a n e s y s t e m ’ , ’ T e m p e ra t u r e , K ’ , ’ H um id it y , k g h e xa n e / k g nitro g en ’ );
Scilab code Exa 8.11 Psychometric chart application
1 2 3 4 5
clc () T d = 32 8; //K ( d r y b ul b ) P = 1 01 .3 ; //kPa P S = 10; //%
/ / r e f e r i n g t o t he p s yc h om e tr i c c ha rt , c o r r es p o n d i ng t o 32 8 K and 10% s a t u r a t i o n 6 Y 1 = 0 .0 12 ; // kg w at er / kg d r y a i r 7 disp ( ” kg w at er / kg dr y a i r ” , Y 1 , ” ( a ) A b s o lu t e humidity = ”) 8 //Y1 = Pa ∗ 18 / ( P − Pa ) ∗ 29 9 Pa = Y1 * P * 29 /( 18 + Y1 * 29 ) ;
76
10 disp ( ”kPa” , P a , ” ( b ) P a r t i a l P r e ss u r e o f w at er v ap ou r = ”) 11 // u s i ng p s yc h om e tr i c c ha rt , s a t u r a t i o n h um id it y a t
32 8 K i s g i v en a s 12 Y 1s = 0 .1 15 ; // kg w at er / kg d ry a i r 13 disp ( ” kg w at er / kg dr y a i r ” , Y 1 s , ” ( c ) T he a b s o l u t e h u mi d i ty a t 3 28K = ” ) 14 / / a t s a t u r a t i o n p a r t i a l p r e s s u r e = va p o u r p r e s s u r e 15 Pas = Y1s * P * 29 /( 18 + Y1s * 29 ) ; 16 disp ( ”kPa” , P a s , ” ( d ) Vapour P r e s s u r e o f w at er v ap ou r = ”) 17 RS = Pa * 100 / Pas ; 18 disp ( ”%” , R S , ” ( e ) P er ce nt r e l a t i v e s a t u r a t i o n = ” ) 19 / / u s i n g p s y c ho m e t ri c c h ar t , mo vi ng h o r i z o n t a l l y
k e ep i ng h um id it y c o n st a n t t o 1 00% s a t u r a t i o n , we g e t dew p o i nt as , 20 T = 290; //K 21 disp ( ”K” ,T , ” ( f ) Dew p o i n t = ” )
Scilab code Exa 8.12 Humid heat calculation for a sample of air
1 2 3 4 5 6 7 8 9 10 11 12 13 14
clc () C a = 1 .8 84 ; //kJ/kgK C b = 1 .0 05 ; //kJ/kgK Y 1 = 0 .0 12 ;
/ / C s = C b + Y 1 ∗ Ca
Cs = Cb + Y1 * Ca ; disp ( ”kJ/kgK” , C s , ” Humid h e at o f t h e s am pl e = ” ) P = 1 01 .3 ; //kPa V = 100; //mˆ3 R = 8 .3 14 ; T = 328; //K T 1 = 37 3; //K N = P * V / ( R * T ); P a = 1 .9 21 ; //kPa
77
15 16 17 18
N drya ir = N * ( P - Pa )/ P; m dr ya ir = N dr ya ir * 2 9; Ht = m drya ir * Cs * ( T1 - T ); disp ( ” k J ” , H t , ” Heat t o be s u p p li e d = ” )
Scilab code Exa 8.14 wet bulb temperature and dry bulb temperature
1 2 3 4 5 6 7 8 9 10
clc () P = 1 01 .3 ; //kPa M W = 58; T 1 = 2 80 .8 ; //K P s = 5; //kPa p r = 2; // kJ /kgK ( P s yc h om e tr i c r a t i o H va p = 3 60 ; / / k J / k g T w = T1 ; Yw1 = Ps * MW / (( P - Ps ) * 29) ;
// Tw = Tg − Hvap ∗ ( Yw1 − Y1 ) / ( hG / kY ) , w he re hG/kY i s t he p s yc h me t ri c r a t i o p r
11 Y 1 = 0; 12 Tg = Tw + Hvap * ( Yw1 - Y1 ) / pr ; 13 disp ( ”K” , T g , ” The a i r t e m pe r a tu r e = ” )
Scilab code Exa 8.15 Humidity calculation
1 2 3 4 5 6 7 8 9
)
clc () T d = 3 53 .2 ; //K T w = 30 8; //K H v ap = 2 4 18 .5 ; / / k J / k g p r = 0 .9 50 ; / / k J / k g P s = 5 .6 2; //kPa P = 1 01 .3 ; //kPa Yw1 = ( Ps * 18) / (( P - Ps ) * 29) ; Y1 = Yw1 - pr * ( Td - Tw ) / Hvap ;
78
Figure 8.2: SAturation curve and adiabatic cooling line 10 disp ( ” kg w at er / k g d ry a i r ” , Y 1 , ” H u m i d i t y = ” ) 11 / / hu mi di ty ca n a l s o be d i r e c t l y o b ta i ne d fro m
p s yc h om e tr i c c ha rt , whi ch we g e t t o be 0 . 0 18 kg w at er / kg d ry a i r
Scilab code Exa 8.16 SAturation curve and adiabatic cooling line
1 2 3 4
clc () P = 1 01 .3 ; //kPa T = [ 28 3 293 3 03 3 13] ; for i = 1 : 4
79
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Ps ( i) = exp ( 1 3 .8 8 5 8 - 2 7 8 8. 5 1 /( T ( i ) - 5 2. 3 6) ) ; end for j = 1: 4 Ys ( j) = Ps (j ) * 78 .0 48 / ( (P - Ps (j )) *29 ); end disp ( P s ) disp ( Y s ) plot ( T , Ys , r e ct = [ 2 70 , 0 , 3 23 , 0 . 9 ]) ;
/ / T a s = T g − L ∗ ( Y 1 a s − Y1 ) / Cs / / C s = C b + Y 1 ∗C a = 1 . 0 0 5 + Y 1 ∗ 1 . 2 , L = 4 35 .4 ; //kJ/kgK // f o r d i f f e r e n t v a l u e o f Tg and Y1 t r i ed , we h ave the f o ll o wi n g s et o f v al ue s T g = [ 28 3 2 90 .4 3 00 3 10 .1 3 20 .8 ]; Y 1 = [ 0. 17 01 15 0 0 .1 5 0 .1 25 0 .1 0 .0 75 ]; plot ( T g , Y 1 ) ; xtitle ( ’ S a t u r a ti o n c ur ve and a d i a b a t i c c o o l i n g l i n e ’ , ’ T e m p er a t u r e , K ’ , ’Y, kg b en ze ne / kg d ry a i r ’ ) ;
Scilab code Exa 8.17 Adiabatic drier
1 2 3 4 5 6 7 8 9
clc () T in = 3 80 .7 ; //K P in = 1 01 .3 ; //kPa T de w = 2 98 ; //K m r e m ov e d = 2 .2 5; / / k g V = 100; //mˆ3
// u s i ng h um id it y c ha rt , h um id it y o f a i r a t d ry b ul b t e mp e r at u r e o f 3 8 0 . 7K and dew p o i n t = 2 98K i s , Y = 0. 02 ; // kg w a te r / kg d ry a i r disp ( ” kg w at er / kg d ry a i r ” ,Y , ” ( a ) H um id it y o f a i r e nt er in g the d r i er = ” ) T s tp = 2 7 3. 15 ; //K V s tp = 2 2 .4 1 43 ; //mˆ3/kmol
10 11 12 N = V * Tstp / ( Vstp * Tin ) ;
80
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
M Y = Y * 29 / 18; / / m o l a l h u m i d i ty N drya ir = N / ( 1 + MY ) ; m d r ya i r = N d ry a ir * 29 ; m w a te ri n = m dr ya ir * Y ; m w at e ro u t = m w at e ri n + m r em o ve d ; Y ou t = m wa te ro ut / m dr ya ir ;
/ / p e rc e n t h um id it y i s c a l c u l a t e d u s in g t he c ha rt , and i s P Y = 55; //% disp ( ” kg w at er / kg d ry a i r ” , Y o u t , ” ( b ) e x i t a i r humidity = ”) disp ( ”%” , P Y , ” P e r c en t h u mi di ty = ” ) / / f ro m t h e h u mi di ty c h a r t T w et = 3 13 .2 ; //K T d = 3 22 .2 ; //K disp ( ”K” , T w e t , ” ( c ) e x i t a i r wet b ul b t em p er a tu r e = ” ) disp ( ”K” , T d , ” ( c ) e x i t a i r dr y b ul b t em pe ra t ur e = ” ) MYout = Yout * 29 / 18; Nout = Nd ryai r * ( 1 + MYout ) / 1; V1 = Nout * Vstp * Td / Tstp ; disp ( ”mˆ3” , V 1 , ” ( d ) Volume o f e x i t a i r = ” )
Scilab code Exa 8.18 Psychometric chart application
1 2 3 4 5 6 7 8 9 10 11
clc () P = 1 01 .3 ; //kPa T d = 30 3; //K T w = 28 8; //K
/ / u s i n g p s y c h o m e t r i c c h a rt , Y 1 = 0 .0 04 5; // kg w at er / kg d ry a i r P Y = 18; //% T h ea t ed = 3 56 . 7; //K C b = 1 .0 05 ; C a = 1 .8 84 ; Cs = Cb + Y1 * Ca ;
81
12 Q = 1 * Cs * ( Th eate d - Td ); 13 disp ( ” kg w at er / kg d ry a i r ” , Y 1 , ” ( a ) H um id it y o f t h e i n i t i a l a i r = ”) 14 disp ( ”%” , P Y , ” ( b ) P e r c e n t h u m id i ty = ” ) 15 disp ( ”K” ,Theated , ” ( c ) T em pe ra tu re t o wh ic h t h e a i r i s heated = ”) 16 disp ( ” k J ” ,Q , ” ( d ) Heat t o be s u p p p l i e d = ” )
Scilab code Exa 8.19 Psychometric chart application and given wet bulb
and dry bulb temperature 1 2 3 4 5 6 7
clc () T w = 31 3; //K T d = 33 3; //K
/ / U si ng t h p s y c ho m e t ri c c h ar t , Y = 0. 04 ; // kg w at er / kg d ry a i r P S = 2 6. 5; //% V S = 1 .1 8; //mˆ 3/ kg d ry a i r ( vo lume o f s a t u r a t ed a i r ) 8 V D = 0 .9 4; //mˆ 3/ kg d r y a i r ( vo lume o f d r y a i r ) 9 VH = VD + PS * ( VS - VD ) /100; 10 H S = 47 0; // J / kg d ry a i r ( e nt ha lp y o f s a tu r a t ed
a ir ) 11 H D = 60; // J / kg d r y a i r ( e n th a lp y o f d r y a i r ) 12 H = HD + PS * ( HS - HD ) /100; 13 disp ( ” kg w at er / kg d ry a i r ” ,Y , ” ( a ) A b s o l u t e H u mi d it y o f the a i r = ”) 14 disp ( ”%” , P S , ” ( b ) P e r c e n t h u m id i ty = ” ) 15 disp ( ”mˆ 3 / kg d r y a i r ” , V H , ” ( c ) H umid v o l u m e = ” ) 16 disp ( ” kJ / kg d ry a i r ” ,H , ” ( d ) E nt ha lp y o f wet a i r = ” )
82
Chapter 9 Material Balance in Unit Operations
Scilab code Exa 9.1 Combustion of coal
1 2 3 4 5 6 7 8 9 10 11 12
clc () P C1 = 85; //% ( P er ce nt c ar bo n i n c o a l ) P A1 = 15; //% ( P er ce nt a s h i n c o a l ) P A2 = 80; //% ( P er ce nt a sh i n c i n d e r ) P C2 = 20; //% ( P er ce nt c ar bo n i n c i n d e r ) m = 100; // kg ( w ei gh t o f c o a l ) mash = PA1 * m / 100; w = mash * 100 / PA2 ;// w ei gh t o f c i n d e r m ca rb on = w - m as h; Plost = mcar bon * 100 / ( m - mash ) ; disp ( ” k g ” ,w , ” w ei gh t o f c i n d er fo rm e d = ” ) disp ( ”%” , P l o s t , ” P er c e n t f u e l l o s t = ” )
Scilab code Exa 9.2 Drying of wood
1 clc ()
83
2 3 4 5 6 7 8
m = 1 ; // kg ( mass o f c o m pl e t el y d ry wood ) P 1 = 40; //% ( p e r ce n t a ge m o is t ur e i n wet wood ) P 2 = 5; //% ( P er c en t ag e m o is t ur e i n d ry wood ) m wa ter in = P1 * m / ( 100 - P1 ) ; mw at er ou t = P2 * m / ( 100 - P2 ) ; m e va p or a te d = m w at e ri n - m w at e ro u t ; disp ( ” k g ” ,mevaporated , ” mass o f w at er e va p or a te d p er kg o f d ry wood = ” )
Scilab code Exa 9.3 Effluent discharge
1 2 3 4 5 6 7 8 9
clc () F 1 = 6 *1 00 0; / / L / s BOD1 = 3 * 10^ -5; / / g / L BOD2 = 5 * 10^ -3; / / g / L V = 16 * 10^3; //mˆ3/day v = V * 10^3 / (24 * 3600) ;/ / L / s
/ / L et BOD o f t h e e f f l u e n t b e BODeff , BOD eff = ( BOD2 * ( F1 + v ) - BOD1 * F1 ) / ( v ) ; disp ( ” g / L ” , B O D e f f , ”BOD o f t he e f f l u e n t o f t he p l an t = ”)
Scilab code Exa 9.4 benzene requirement calculation
1 2 3 4 5 6 7 8 9
clc () D = 100; / / kg o f o v er h ea d p r od u ct x fa = 0 .9 56 ; x dw = 0 .0 74 ; x db = 0 .7 41 ; x da = 0 .1 85 ;
// w a te r b a l an c e g i v e s F = D * xdw / (1 - xfa ) ; W = F * xfa - xda * D ;
84
10 11 12 13
W 1 = 10 0; B = xdb * D; Bused = B * W1 / W ; disp ( ” k g ” , B u s e d , ” Q ua nt it y o f b en ze ne r e q u i r e d = ” )
Scilab code Exa 9.5 Fortification of waste acid
1 clc () 2 / / l e t , W − w as te a ci d , S − S u l f u r i c
a c id , N − n i t r i c
a c i d , M − mi xed a c i d 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
x s h 2s o 4 = 0 .9 5; x sh 2o = 0 .5 ; x w h 2s o 4 = 0 .3 ; x w h no 3 = 0 .3 6; x wh 2o = 0 .3 4; x m h 2s o 4 = 0 .4 ; x m h no 3 = 0 .4 5; x mh 2o = 0 .1 5; x n h no 3 = 0 .8 ; x nh 2o = 0 .2 ; M = 10 00 ; / / k g
// t o t a l m a t e r i a l b al an ce , W + S + N = 1 0 00 ; / / H2SO4 b a l a n c e , x w h 2s o 4 ∗ W + x s h 2 s o 4 ∗ S = x m h 2 s o 4 ∗M //HNO3 ba la nce , xwhno3 ∗ W + x n h no 3 ∗ N = xmhno3 ∗M / /H2O b a l a n c e , x wh 2o ∗W+xn h2o ∗N + x s h2 o ∗S = xmh2o ∗M // s o l v i n g t he a bo ve e q u a ti o n s s i m u lt a n eo u s ly , we g et , W = 7 0. 22 ; / / k g S = 3 98 .8 8; / / k g N = 5 30 .9 ; / / k g disp ( ” k g ” ,W , ” Waste a c i d = ” ) disp ( ” k g ” ,S , ” C o n c e n t r a t e d H2SO4 = ” ) disp ( ” k g ” ,N , ” C o n c e n t r a t e d HNO3 = ” )
85
Scilab code Exa 9.6 Triple effect evaporator
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
clc () F = 10 00 ; / / k g P s o lu t e1 = 2 0; //% P s o lu t e2 = 8 0; //%
// t a k in g s o l u t e b a l an c e L3 = F * P so lu te 1 / P so lu te 2 ;
// t a ki n g t o t a l m a t e r i a l b a la n ce V = ( F - L3 ) / 3;
// f o r f i r s t
e f f e c t , t o t a l b a la n ce g i v e s ,
L1 = F - V ;
// s o l u t e b a l an c e g i v es , P so lu te 3 = F * P so lu te 1 / L1 ;
/ / For s ec on d e f f e c t , t o t a l b a l a nc e g i ve s , L 2 = L1 - V ;
// s o l u t e b a l nc e g i v es ,
18 19 20
P so lu te 4 = L1 * P so lu te 3 / L2 ; disp ( ”%” ,Psol ute3 , ” s o l u t e e n t e r i n g s ec o nd e f f e c t = ” ) disp ( ” k g ” , L 1 , ” Weight e n t e r i n g s ec on d e f f e c t ” ) disp ( ”%” ,Psol ute4 , ” s o l u t e e n t e r i n g t h i r d e f f e c t = ” ) disp ( ” k g ” , L 2 , ” Weight e n t e r i n g t h i r d e f f e c t ” )
Scilab code Exa 9.7 Crystallization operation
1 2 3 4 5
clc () F = 100; / / k g x f = 0 .2 5; x 2 = 7 /1 07 ; P 1 = 10; //%
86
6 W3 = P1 * F * (1 - xf ) /100; // (W3 − we ig h t o f w at er
evaporated ) // l e t W1 and W2 be w ei gh t o f c r y s t a l and w ei gh t o f mother l i q u o r r em ai ni ng a f t e r c r y s t a l l i z a t i o n res p . , //F = W1 + W2 + W3 / / 1 0 0 = W1 + W2 + 7 . 5 // s o l u t e b a la n ce g i ve s , F∗ x f = W1∗ x1 + W2∗ x2 / / 1 0 0 ∗ 0 . 2 5 = W1∗1+W2 ∗ 0 . 0 6 5 4
7
8 9 10 11 12 W 2 = ( F - W3 - F *xf ) /(1 - x2 ); 13 W1 = F - W3 - W2 ; 14 disp ( ” k g ” , W 1 , , , ” y e i l d o f t h e c r y s t a l s = ” )
Scilab code Exa 9.8 Evaporation of Na2CO3
1 2 3 4 5 6 7
clc () F = 100; / / k g x f = 0 .1 5; P 1 = 80; / /% ( C ar bo na te r e c o v e r e d ) M 1 = 10 6; / / ( M o l e c u l a r w e i g h t o f Na2CO3 ) M 2 = 28 6; / / ( M o l e c u l a r w e i g h t o f Na2CO3 . 1 0 H2O ) x 1 = M1 / M2 ;/ / ( W eight f r a c t i o n o f Na2CO3 i n
cryst als ) 8 Mr ec ove re d = P1 * F * xf / 100; 9 W cr ys ta l = M re co ve re d / x 1; 10 disp ( ” k g ” ,Wcr ystal , ” ( a ) q u an t it y o f c r y s t a l s f o rm ed = ”) 11 / /Na2CO3 b a l a n c e g i v e s , F∗ x f = W c r y s t a l ∗ x1 + W2∗ x2 12 / /W2 w ei gh t o f mother l i q u o r r em a in i ng a f t e r
crystallization 13 / / l e t M = W2 ∗ x2 , t h e r e f o r e 14 15 16 17
M = F * xf - Mr eco ve red ; x 2 = 0 .0 9; W 2 = M /x2 ; W3 = F - W cry sta l - W2 ;/ / w ei g ht o f w at er e v a po r a te d
87
18 disp ( ” k g ” , W 3 , ” ( b ) Weig ht o f w at er e v a po r a te d = ” )
Scilab code Exa 9.9 Crystallization
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
clc () m = 100; / / kg ( o f 60% s o l u t i o n )
//w − w a t e r added t o t h e o r i g i n a l s o l u t i o n //w1 − wt . o f Na2S2O3 . 5 H2O c r y s t a l l i z e d //w2 − wt . o f m other l i q u o r o b ta i ne d //w3 − s o l u t i o n c a r r i e d away by t he c r y s t a l s x f = 0. 6; M n a 2s 2 o3 = 1 58 ; M n a2 s 2o 3 5h 2 o = 2 48 ; m cr ys ta ls = m * xf * M na 2s 2o 35 h2 o / M na 2s 2o 3 ;
// f r e e w a te r a v a i l a b l e = m + w − 1 − m c r y s t a l s / / c o n c e n t r a t i o n o f i m p u ri t y = 1 / (w+ 4. 8 23 ) / / t o t a l b a la n ce , 1 00 − 1 + w = w 1 + w 2 + w 3 //w1 + w2 + w3 − w = 9 9 / / Na2S2O3 b a l a n c e , 6 0 = ( w1 + w2 ∗ 1 . 5 / 2 . 5 + w3 ∗ 1 . 5 / 2 . 5 ) ∗ 1 5 8 / 2 4 8 / /w1 + 0 . 6 ∗ w 2 + 0 . 6 ∗ w3 = 9 4 . 1 7 7 / / ea ch gram c r y s t a l s c a rr y 0 . 0 5 kg s o l u t i o n , / /w3 = 0 . 0 5 ∗ w1 //impurity % = 0.1 / / i m p u r i t y = w3 / ( 2 . 5 ∗ (w+4.82 3) ) / / s o l v i n g a bo ve e q u a ti o n s , we g e t w = 1 4. 57 7; / / k g w 1 = 6 5. 08 ; / / k g w 2 = 4 5. 25 ; / / k g
16 17 18 19 20 21 22 23 24 25 w3 = 0.05 * w1 ; 26 disp ( ” k g ” ,w , ” ( a ) amount o f w at er added = ” ) 27 disp ( ” k g ” , w 1 , ” ( b ) a mo un t o f Na2S2O3 . 5 H2O c r y s t a l s added = ”) 28 m1 = w1 * M na 2s 2o3 / M na2 s2o 35 h2 o + w3 * 1.5 * M n a2 s 2o 3 / ( 2. 5 * M n a2 s 2o 3 5h 2 o ) ;
88
29 P = m 1 * 10 0/ ( m * xf ) ; 30 disp ( ”%” ,P , ” ( c ) P e r c e n t a g e
r e c o v e r y o f Na2S2O3 = ” )
Scilab code Exa 9.10 Extraction
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
clc () m = 100; / / k g P i n1 = 4 0; //% ( t a nn i n ) P in2 = 5; //% ( m o is t ur e ) P i n3 = 2 3; //% ( s o l u b l e non t a n ni n m a t e r i a l ) Pin4 = 100 - Pin1 - Pin2 - Pin3 ;//% ( i n s o l u b l e
l i gn i n ) / / s i n c e , l i g n i n i s i n s o l u b l e , a l l o f i t w i l l be p r e s e n t i n t he r e s i d u e P ou t1 = 3; //% P o ut 2 = 5 0; //% P ou t3 = 1; //% P ou t4 = 1 00 - P ou t1 - P ou t2 - P ou t3 ;
// l e t W be t he mass o f r e s id u e , t he n we g e t W = Pin4 * m / Pout4 ; P tann in = W * Pout1 * 100 / ( m * Pin1 ); disp ( ”%” ,Ptannin , ” P er ce nt o f o r i g i n a l t an ni n unextracted = ”)
Scilab code Exa 9.11 Leaching operation
1 2 3 4 5 6 7
clc () F = 100; / / k g
//F − f e e d , R − o v e r f l o w , U − u n d e r fl o w , S − s o l v e n t //F + S = U + R ( T ot al b a la n ce ) P o il 1 = 4 9; / /% ( 1 − f e ed ) P pu lp 1 = 4 0; //% P sa lt s1 = 3; //% 89
8 9 10 11 12 13 14 15 16 17
P wa te r = 100 - P oi l1 - P pu lp 1 - P sa lt s1 ; P h e xa n e2 = 2 5; //%(2 − u n d e r f l o w ) P s a lt s 2 = 2 .5 ; //% P o il 2 = 1 5; //% P w a te r 2 = 7 .5 ; //% P pu lp 2 = 100 - P he xa ne 2 - P oil 2 - P wa te r2 - P sa lt s2 ; P o il 3 = 2 5; / /% ( 3 − e x t r a c t )
/ / t a ki n g p ul p ( i n e r t ) b a la n ce U = Ppulp1 * F / Ppul p2 ;
// o i l b a la n c e g i ve s , F ∗ P o i l 1 = U ∗ P o i l 2 + R ∗ P oi l 3 , fro m t h e s e , we g e t
18 R = ( F * Poil1 - U * Poil2 )/ Poil3 ; 19 S = U + R - F ; 20 disp ( ” k g ” ,S , ” ( a ) The a mount o f s o l v e n t u se d f o r extraction = ”) 21 P r ec o ve r ed = 9 5; //% 22 m he xa ne 2 = P he xa ne 2 * U / 1 00 ; 23 m r e c ov e re d = m h ex a ne 2 * P r ec o ve r ed / 1 00 ; 24 P = m re c ov er ed * 100 / S ; 25 disp ( ”%” ,P , ” ( b ) P er ce nt o f h ex an e u se d t h at i s r e c o ve r e d from t he u n de r fl o w = ” ) 26 Poil = Poil3 * R * 100 / ( F * Poil1 ) ; 27 disp ( ”%” , P o i l , ” ( c ) P er ce nt r e c o ve r y o f o i l = ” )
Scilab code Exa 9.12 Dryer and oven
1 clc () 2 / /F = f e e d ( w et s o l i d ) , V1 = w a te r e v a p o r a t e d ( d r i e r ) ,
V2 = w a te r e v a p o r a t e d ( o ve n ) , S1 = Dry s o l i d ( d r i e r ) , S2 = Dry s o l i d ( o ve n ) 3 F = 10 00 ; / / k g 4 x f = 0. 8; 5 x 1 = 0 .1 5; 6 x 2 = 0 .0 2;
90
7 // m oi s t ur e f r e e
s o l i d b al a n ce f o r d r i e r , F ∗ ( 1 − x f ) = S1 ∗ ( 1 − x1 )
8 9 10 11 12 13 14 15 16 17 18 19 20
S1 = F * ( 1 - xf ) /(1 - x1 ) ;
// t o t a l b al a n ce f o r d r i e r , F = S1 + V1 V 1 = F - S1;
/ / F or o ve n , S 1 ∗ ( 1 − x1 ) = S 2 ∗ ( 1 −x2 ) S2 = S1 * ( 1 - x1 ) /(1 - x2 ) ;
/ / A ls o , S1 = S 2 + V2 V 2 = S1 - S 2; disp ( ” k g ” , S 1 , ” ( a ) Weight o f = ”) Weight o f disp ( ” k g ” , S 2 , ” = ”) P 1 = V1 *100/ ( F * xf ); P 2 = V2 *100/ ( F * xf ); disp ( ”%” , P 1 , ” ( b ) P e rc en t ag e in d r ie r = ”) P er ce nt ag e disp ( ”%” , P 2 , ” i n o ven = ” )
p ro du ct l e a v i n g t he d r i e r p r od uc t l e a v i n g t h e o ven
o f o r i g i n a l w at er removed o f o r i g i n a l w a t e r removed
Scilab code Exa 9.13 Adiabatic drier
1 2 3 4 5 6
clc ()
// S s = s o l i d f lo w r at e , P w a te r in = 2 5; //% P w a te r ou t = 5 ; //% X 1 = P wa t er i n / (1 00 - P w at e ri n ) ;// kg w at er / kg d ry a i r X 2 = P w at e ro u t / (1 00 - P w at e ro u t ) ;/ / kg w a te r / k g d ry
air 7 / / f or m h u mi d i ty c h a rt , 8 Y 2 = 0 .0 15 ; // kg w at er / kg d ry a i r 9 Y 1 = 0 .0 35 ; // kg w at er / kg d ry a i r 10 m = 1 ; // kg o f d r y a i r 11 / / S s ∗ X 1 + Y 2 = S s ∗ X2 + Y1 12 Ss = ( Y1 - Y2 ) / ( X1 - X2 ) ;
91
13 14 15 16 17 18 19 20 21 22 23 24
25 26 27
T = 8 7. 5 + 2 73 .1 5; //K P = 1 01 .3 ; //kPa T s tp = 2 7 3. 15 ; //K P s tp = 1 01 .3 ; //kPa V s tp = 2 2 .4 1 43 ; //mˆ3/mol V = 100; //mˆ3 N = V * P * Tstp / ( Vstp * Pstp * T ) ; Nr2 = Y2 * 29 / 18; // kmol o f w at er / kmol o f d ry a i r N drya ir = N * 1 / (1 + Nr2 ); m dr ya ir = N dr ya ir * 2 9; m ev ap or at ed = m dr ya ir * ( Y1 - Y2 ) ; disp ( ” k g ” ,mevaporated , ” ( a ) t o t a l m o i st u re e va p or a te d p er 1 0 0mˆ3 o f a i r e n t e r i n g = ” ) Ss1 = m dr ya ir * Ss ; m pr odu ct = Ss1 * ( 1 + X2 ) ; disp ( ” k g ” ,mpr oduct , ” ( b ) mass o f f i n i s h e d p ro du ct p er 10 0mˆ3 o f a i r e n t e r i n g = ” )
Scilab code Exa 9.14 Extraction of isopropyl alcohol
1 2 3 4 5 6 7 8 9 10 11 12 13 14
clc ()
//F = f e ed , E = e x t r a ct , S = s o l ve n t , R = R a f f i n a t e x w a te r F = 0 .7 ; //Feed x a lc o ho l F = 0 .3 ; x w a te r R = 0 .7 1; // r a f f i n a t e x a lc o ho l R = 0 .2 81 ; x e t hy R = 0 .0 09 ; x w at e rE = 0 .0 0 8; / / E x t r a c t x a lc o ho l E = 0 .0 52 ; x e t hy E = 0 .9 4;
/ / T o t a l b a l a nc e , R + E = F + S F = 100; / / k g //R + E = 10 0 + S (1) / / I s o p r o p y l b a la n ce , x a l co h o l R ∗ R + x a l c o ho l E ∗E = xalcoholF ∗ F 92
15 / / 0 . 2 8 1 ∗R + 0 . 0 5 2 ∗ E = 30 (2) 16 / / E t hy l en e t e t r a c h l o r i d e b a la n ce , xethyR ∗ R +
xethyE ∗ E = S 17 / / 0 . 0 0 9 ∗R + 0 . 9 4∗ E = S (3) 18 // S o l v i n g e q ua t i on 1 , 2 and 3 s i m u lt a n eo u s ly , we g et , 19 20 21 22 23 24 25 26 27
S = 45 .1 ; E = 4 7. 04 ; R = 9 8. 06 ; disp ( ” k g ” ,S , ” ( a ) Amount o f s o l v e n t u se d = ” ) disp ( ” k g ” ,E , ” ( b ) Amount o f e x t r a c t = ” ) Amount o f r a f f i n a t e = ” ) disp ( ” k g ” ,R , ” m ex tr ac te d = E * x al co ho lE ; P1 = m ex tr ac te d * 1 00 / ( F * x al co ho lF ) ; disp ( ”%” , P 1 , ” ( c ) P er ce n t o f i s o p r o p y l a l c o h o l e x t ra c t ed = ” )
Scilab code Exa 9.15 Absorption of acetone
1 clc () 2 G 1 = 10 0; //kmol 3 / /G1 and G2 b e t he m ol ar f l o w r a t e o f t he g as a t t he
i n l e t and t he e x i t o f t he a b so r be r r e s p . , y1 and y2 mo le f r a c t i o n a t e n tr a nc e and e x i t r e sp . , 4 y 1 = 0 .2 5; //% 5 y 2 = 0 .0 5; //% 6 // a i r b a l an c e g i ve s , G1 ∗ ( 1−y1 ) = G2 ∗ ( 1−y2 ) 7 G2 = G1 * ( 1 - y1 ) / (1 - y2 ) ; 8 m al ea vi ng = G2 * y2 ; 9 m ae nt er in g = G1 * y1 ; 10 P ab so rb ed = ( m ae nt er in g - m al ea vi ng ) * 1 00 / ( m a en te r in g ) ; 11 disp ( ”%” ,Pab sorbed , ” P e r ce n ta g e o f a c et o ne a bs o rb ed = ”)
93
Scilab code Exa 9.16 Absorption of SO3
1 2 3 4 5 6 7 8 9
clc () F = 50 00 ; / / k g / h P 1 = 50; //% (H2O4 in ) M H2 S O4 = 9 8. 0 16 ; P 1 ga s = 6 5; // ( n i t r o g e n i n g as e n t e r i n g ) P 2 ga s = 3 5; / / ( SO3 ) M N2 = 28; M S O3 = 8 0; Ma vg = ( MN2 * P 1g as + M SO 3 * P 2g as ) /1 00 ;/ / a v g
m o le c u l ar wt . o f e n t e r i n g g as 10 G = 45 00 ; / / k g / h 11 12 13 14 15
Ng = G / Mavg ; NN2 = Ng * P1gas / 100; NSO3 = Ng - NN2 ; P 2 = 75; //% (H2O4 ou t )
16 17 18 19 20 21 22 23
24
/ /W b e t h e m ass o f 7 5% H2SO4 , x a nd y b e t h e m o le s o f SO3 and w at er v ap ou r l e a v i n g r e s p . , P wa te r = 2 5; //kPa P t o ta l = 1 01 .3 ; //kPa // P water / P t o ta l = y / ( NN2 + x + y ) / /we g et , y = 0 . 3 2 7 6 5 ∗ x + 2 . 7 4 4 (1) / / T o t a l b a l a n c e F ee d + G = W + ( NN2 ∗ 2 8 + x ∗ 80 + y ∗ 18.016) / / we g e t , W + 8 0∗ x + 1 8 . 0 1 6 ∗ y = 7 7 2 7 . 3 2 (2) / / fr om 1 and 2 , 8 4 . 9 1 7 4∗ x + W = 7 3 5 2 . 6 8 (3) / /SO3 b a l a n c e , S o3 e n e t e r i n w i t h 5 0% H2SO4 + SO3 i n f e e d g a s = SO l e a v i n g w i th 7 5%H2SO4 + SO3 l e a v i n g in e xi t gas / / 5 0 0 0 ∗ 0 . 5 ∗ 8 0 / 9 8 . 0 1 6 + 3 4 . 0 9∗ 8 0 = 8 0∗ x + 0 . 75 ∗W ∗ 80/98.016 (4) // fro m 3 and 4 ,
25 26 x = 9. 74 ;
94
27 N a bs or be d = N SO 3 - x ; 28 P ab so rb ed = N ab so rb ed * 1 00 / N SO 3 ; 29 disp ( ”%” ,Pab sorbed , ” P e r c e n ta g e o f SO3 a b so r be d = ” )
Scilab code Exa 9.17 Continuous distillation column
1 clc () 2 F = 200; / / k m o l / h 3 //F , D and W be t he f l o w r a t e s o f t he f ee d , t he
d i s t i l l a t e and r e s i d u e r e s p . , x f , xd and xw b e t h e m ole f r a c t i o n o f e th a n o l i n t h e f ee , d i s t i l l a t e a nd t h e r e s i d u e r e s p . 4 5 6 7 8 9 10 11 12 13 14 15 16
x f = 0 .1 0; x d = 0 .8 9; x w = 0 .0 03 ;
// t o t a l b a l an c e g i v es , F = D + W //D + W = 20 0 (1) // A l co h ol b a l an c e g i v es , F∗ x f = D∗ x d + W∗xw / / 0 . 8 9 ∗D+0.003∗W = 20 (2) // s o l v i n g 1 and 2 D = 2 1. 87 ; / / k m o l / h W = 1 78 .1 3; / / k m o l / h N a w as t ed = W * xw ; m m a ke u p = N aw a st e d * 4 6* 24 ; disp ( ” k g ” ,mmakeu p , ” The make u p a l c o h o l day = ”)
r e q u i r e d p er
Scilab code Exa 9.18 Distillation operation for methanol solution
1 clc () 2 F = 100; / / k g 3 //F , D and W be t he f l o w r a t e s o f t he f ee d , t he
d i s t i l l a t e a nd b ot to m p r o d u c t r e s p . , x f , xd a nd 95
xw b e t he mol e f r a c t i o n o f m e t h a no l i n t he f ee , d i s t i l l a t e a nd t h e b o tt o m p r o d u c t r e s p . 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
x f = 0 .2 0; x d = 0 .9 7; x w = 0 .0 2;
/ / u s i n g , F = D + W and F∗ x f + D∗ x d + W∗xw , we g e t D = 1 8. 95 ; / / k g / h W = 8 1. 05 ; / / k g / h R = 3.5;
/ /R = L / D // f o r d i s t i l l a t e = 1kg D 1 = 1; / / k g L = R *D1 ;
/ / Ta ki ng b a l a n c e a ro un d t h e c o nd e ns e r ,
21
G = L + D1 ; mc on d en se d = G * D / F ; disp ( ” k g ” ,D , ” ( a )Amount of d i s t i l l a t e = ” ) Amount o f Bottom P ro du ct = ” ) disp ( ” k g ” ,W , ” disp ( ” k g ” ,G , ” ( b ) Amount o f v ap ou r c o nd e ns e d p e r kg o f d i s t i l l a t e = ”) disp ( ” k g ” ,mcondensed , ” ( c ) A mount o f v a p o u r c o n d e n s e d p e r kg o f f ee d = ” )
Scilab code Exa 9.19 Bypass operation
1 2 3 4 5 6
clc () m dr ya ir = 1; / / k g P w a te r 1 = 1 .4 ; // kPa ( P a r t i a l p r e s s u r e a t 28 5K ) P w a te r 2 = 1 0. 6; // kPa ( P a r t i a l p r e s s u r e a t 3 20K ) P = 1 01 .3 ; // ( T o t a l ) Ys1 = P wa te r2 * 18 / (( P - P wa te r2 ) *2 9) ;// (
s a t u r a t i o n h um id it y a t 3 20K ) 7 Ys2 = P wa te r1 * 18 / (( P - P wa te r1 ) *2 9) ;// (
s a t u r a t i o n h um id it y a t 2 85K ) 8 Y s = 0 .0 3; // kg w at er / kg d ry a i r . ( f i n a l h um id it y ) 96
9 / / h u m id i t y o f a i r
l e a v i n g d e h u m i d i f i e r i s Ys2 a nd h um id it y o f b yp as se d a i r i s Ys1 . t h e s e 2 s tr ea ms co mb ine t o g i v e h um id it y o f 0 . 0 3 kg w at er / kg d ry ai r . 10 // t h e r e f o r e , t a k i ng b a la n c e we g et , 1 ∗ Y s 2 + x ∗ Ys 1 = ( 1 + x ) ∗Ys 11 x = (1* Y s2 - 1* Ys ) /( Ys - Ys 1) ; 12 disp ( ” kg d ry a i r ” ,x , ” ( a ) Mass o f d r y a i r b yp as se d p er kg o f d r y a i r s e n t t h r o ug h t he d e h u m i d i f i e r = ” ) 13 m co nd en se d = Y s1 - Y s2 ; 14 m we ta ir = m dr ya ir + Y s1 ; 15 N w et a ir = m d ry a ir / 2 9 + Y s1 / 1 8 .0 16 ; 16 V s tp = 2 2 .4 1 43 ; //mˆ3/kmol 17 V st p1 = N we ta ir * V st p ; 18 T = 320; //K 19 P = 1 01 .3 ; //kPa 20 T s tp = 2 7 3. 15 ; //K 21 P s tp = 1 0 1. 3 25 ; //kPa 22 V = Vstp1 * Pstp * T / ( P * Tstp ); 23 V g i ve n = 1 00 ; //mˆ3 24 m co nd en se d1 = m co nd en se d * V gi ve n / V ; 25 disp ( ” k g ” ,mcondensed1 , ” ( b ) mass o f w at er v ap ou r
c on de ns ed i n t he d e h u m i d i f i e r p er 1 00mˆ3 o f a i r s e n t t h r o ug h i t = ” ) 26 27 28 29 30 31 32
m f in al = m dr ya ir + x ; m fi na la ir = m fi na l * V gi ve n / V ; N = m fi na la ir / 29; Y sn = Ys * 2 9/ 18 ; // k mol w at er / kmol d ry a i r Nto tal = N * ( Ysn + 1) ; Vfi nal = Ntotal * Vstp * Pstp * T / ( Tstp * P ) ; disp ( ”mˆ3” , V f i n a l , ” ( c ) Volume o f f i n a l a i r o b ta i n ed
p er 1 0 0 c u bi c m et re s f a i r p as se d t hr ou gh d e h u mi d i fi e r = ” )
Scilab code Exa 9.20 Recycle operation centrifuge plus filter
97
1 2 3 4 5 6 7
clc () F = 100; / / k g / h x f = 0. 2; x p = 0 .9 3; x r = 0 .5 /1 .5 ; x x = 0 .6 5;
//R − r e c y c l e s trea m , P − Pr od uc t s t re am , W − w a t e r s e p a r e t e d and r em ov ed 8 / / c om po ne nt A b a l a n c e , F ∗ x f = P ∗ xp , t h at i s , P = F * xf / xp ;
9 10 11 12 13
/ / T o t a l b a l a nc e , F = P + W, t h e r e f o r e W = F - P;
// x be t he f l o w r a t e o f s t r e a e n t e r i n g t he f i l t e r // t o t a l b al an ce , x = P + R (1) 14 / / c om po nen t A b a l a n c e , 0 . 6 5 ∗ x = 0 . 5 ∗R / 1 . 5 + 0 . 9 3 P (2) 15 / / S o l v i n g 1 and 2 , we g et , 16 R = ( xx * P - xp * P ) /( xr - xx ); 17 disp ( ” k g / h ” ,R , ” Flow r a t e o f t he r e c y c l e s tr ea m = ” )
Scilab code Exa 9.21 Recycle operation granulator and drier
1 2 3 4 5 6 7 8 9
clc () F = 10 00 ; / / k g / h x f w at e r = 0 .7 ; x p w at e r = 0 .2 ; x r w at e r = 0 .2 0; x s w at e r = 0 .5 ; y 1 = 0 .0 02 5; y 2 = 0 .0 5;
//R − r e c y c l e , S − st re am e n t e r i n g g r a nu l a to r , P − P r o d u c t , G1 − a i r e n t e r i n g t h e d r ie r , G2 − a i r l e a v i n g t he d r i er , 10 // t a ki n o v e r a l l , m o is tu r e f r e e b al an ce , F ∗ x f = P ∗ 98
xp 11 P = F * ( 1 - xfw ate r ) /(1 - xp wate r ) ; 12 // t a ki n g m a t e r i a l b a la n ce a t p o in t wh ere r e c y c l e
s t r e a j o i n s t h e f e ed , 13 // F = R + S 14 / / w at er b a la n ce , F∗ x f w a t er = R∗ x r wa t er + S ∗ x s w a t e r , s o l v i n g t h i s we g e t , 15 16 17 18
R = ( - F * xf wa t er + F * x sw at e r ) /( x r w at e r - x s wa te r ) ; S = F + R; m le avi ng = P + R ;// s o l i d l e a v i n g t h e d r i e r
/ / dr y a i r e n t e r i n g w i l l t h e re be i n a i r l ea vi n g , therefore 19 //G1 ∗ ( 1 − y1 ) = G2 ∗ ( 1 − y2 ) 20 / / w a te r b a l an ce o ve r t he d r i e r g i v es , S ∗ xswater+G1∗ y1=G2∗ y2+(P+R) ∗ x p w a t e r 21 / / from a b o v e 2 e q ua t i o n s , we g et 22 G 1 = ( ( m le a vi n g * x pw a te r - S * x s wa t er ) / ( y1 - y 2 *( 1 - y1 ) /(1-y2))); 23 disp ( ” k g / h ” ,R , ” ( a ) Amount o f s o l i d r e c y c l e d = ” ) 24 m drya ir = G1 * (1 - y1 ); 25 disp ( ” k g / h ” ,mdryai r , ” ( b ) c i r c u l a t i o n r a t e o f a i r i n t h e d r i e r on dr y b a s i s = ” )
Scilab code Exa 9.22 Blowdown operation
1 2 3 4 5
clc () xf = 500 * 10^ -6; x p = 50 * 10^ -6; x b = 16 00 * 10^ - 6;
//F − Feed w at er r a t e , B − b lo w down r a t e , S − h i g h p r e s s u r e s team , P − p r o c e s s s tr ea m r a t e 6 // t o t a l b al an ce , F = P + B 7 // S o l i d b al an ce , F ∗ x f + P ∗ x p = B ∗ xb 8 // e l i m i n a t i n g P , we g et , F ∗ x f + ( F − B) ∗ xp = B ∗ xb 99
9 / / l e t F/B b e X 10 X = ( x b + x p ) / ( x f + x p ) ; 11 disp (X , ” t he r a t i o o f f e ed w at er t o t he blowdown water = ”)
100
Chapter 10 Material Balance with Chemical Reaction
Scilab code Exa 10.1 Combustion of propane
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
clc () m ai r = 5 00 ; / / k g m C O2 = 5 5; / / k g m CO = 15; / / k g
//C3H8 + 5O2 = 3CO2 + 4H20 M C O2 = 4 4; M CO = 28; NC O2 = m CO2 / M CO2 ; NCO = mCO / MCO ; M a ir = 2 9; Na ir = m air / M air ;
/ / c a r bo n b a l a n c e g i v e s , F = ( NC O2 + NCO ) /3; M C 3 H8 = 4 4. 0 64 ; mC3H8 = MC3H8 * F ; disp ( ” k g ” , m C 3 H 8 , ” ( a ) m ass o f p ro pa ne b ur nt = ” )
/ / on e mole o f p ro pa ne r e q ur e s 5 m ol es o f o x yg en f o r combustion
18 NO2 = F * 5;
101
19 20 21 22 23 24
N ai rt = N O2 * 100 /2 1; // t h e o r e t i c a l a i r r e q u i r e d P ex ce ss = ( Nai r - N ai rt ) * 100 / N ai rt ; disp ( ”%” ,Pexcess , ” ( b ) The p e rc e n t e x c es s a i r = ” )
//C3H8 + 7/2 ∗ O2 = 3CO + 4H2O NH2O = F * 4;
/ / T a ki ng o xy ge n b a l a nc e , u nb ur ne d o xy ge n i s calculated , 25 / /O2 s u p p l i e d = O2 p r e s e n t i n f or m o f CO2 , CO and H2O + unburned O2 26 27 28 29 30 31 32 33 34 35 36 37 38
N un bur nt = Nair * 21 / 100 - NCO2 - NCO /2 - NH2O /2; NN2 = Nair * 79 / 100; N to ta l = N CO 2 + NCO + NH 2O + NN2 + N un bu rn t ; PC O2 = NC O2 * 100 / N to ta l; P C O = N CO * 10 0/ N to ta l ; P H2 O = N H2 O * 10 0/ N to ta l ; P N 2 = N N2 * 10 0/ N to ta l ; P O 2 = N un bu rn t * 10 0 / N to ta l ; disp ( ”%” , P C O 2 , ” ( c ) P e r c e nt c o m p o s i t i o n o f CO2 = ” ) disp ( ”%” , P C O , ” P e r c en t c o m p o s it i o n o f CO = ” ) disp ( ”%” , P H 2 O , ” P e r c en t c o m p o s it i o n o f H2O = ” ) disp ( ”%” , P N 2 , ” P e r ce nt c o mp o s it i o n o f N2 = ” ) disp ( ”%” , P O 2 , ” P e r ce nt c o mp o s it i o n o f O2 = ” )
Scilab code Exa 10.2 Combustion of hydrogen free coke
1 2 3 4 5 6 7 8 9
clc () N fl ue = 1 00 ; //kmol N C O2 = 1 4. 84 ; N C O = 1 .6 5; N O 2 = 5 .1 6; N N2 = 7 8. 35 ; P CF = 85; //PERCENT CARBON IN FEED P IF = 15; //PERCENT INERT IN FEED
//F − amount o f c o k e c h ar g ed , W − mass o f c ok e l e f t , W = 0.05F 102
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
NCf lue = NCO2 + NCO ; M C = 12; mC = MC * NCf lue ;
// c a rb on b a l an c e g i v es , F ∗ PCF / 1 0 0 = W ∗ PCF + mC F = mC / ( PCF / 100 - 0.05* PCF / 100) ;
// l e t A kmol a i r s u pp l i ed , t a k in g N2 b al an ce , N a ir = N N2 * 1 00 /7 9; N O2 su pp li ed = N ai r - N N2 ; N th eo re ti ca l = F * PCF / (1 00 * MC ); P ex ce ss = ( N O2 su pp li ed - N th eo re ti ca l ) * 100 / ( N t h eo r e t ic a l ) ; disp ( ”%” ,Pexcess , ” ( a ) P er ce nt a g e e x c e s s a i r = ” ) ma ir = Na ir * 29; m = mair / F ; // a i r s u p p li e d p er kg o f c o ke c ha rg ed disp ( ” k g ” ,m , ” ( b ) a i r s u p p li e d p er kg o f c o ke c ha rg ed = ”) P = 100; //kPa T = 500; //K V = Nf lu e * 22 .4 14 3* 10 1. 32 5 * T / ( F * P * 2 73 .1 5) ; disp ( ”mˆ3” ,V , ” ( c ) volume o f f l u e g as p er kg o f c ok e = ”) W = 0. 05 * F; mCr = W * PC F /1 00 ; // c ar bo n i n r e f u s e mir = F * (1 - PCF / 10 0) ; // i n e r t i n r e f u s e mr = mCr + mir ; C = mCr * 100 / mr ; I = mir *100/ mr ; disp ( ”%” ,C , ” ( d ) C a r b o n = ” ) disp ( ”%” ,I , ” I n e r t = ” )
Scilab code Exa 10.3 Combustion of fuel oil
1 clc () 2 N fl ue = 1 00 ; //kmol 3 N CO2 = 9;
103
4 5 6 7 8 9 10 11 12 13
N CO = 2; N O2 = 3; N N2 = 86; NCf lue = NCO2 + NCO ; M C = 12; mC = MC * NCf lue ;
// l e t A kmol a i r s u pp l i ed , t a k in g N2 b al an ce , N a ir = N N2 * 1 00 /7 9; N O2 su pp li ed = N ai r - N N2 ;
/ / i f CO i n t he f l u e g as was t o be c o mp l et e l y c o n v er t e d t o CO2 , t he n , t h e m ol es o f o xy ge n p r e s e n t i n t he f l u e g as would be 3−1 =2kmol
14 N oe xc es s = N O2 - N CO / 2; 15 P ex ce ss = N oe xc es s * 100 / ( N O2 su pp li ed - N oe xc es s ); 16 disp ( ”%” ,Pexcess , ” ( a ) P er ce nt a g e e x c e s s a i r = ” ) 17 N wa te rO = N O2 su pp li ed - N CO 2 - N CO / 2 - N O2 ; 18 N H 2 = N wa t er O * 2; 19 mH2 = NH2 * 2; 20 x CF = 0.7 21 R = mC / mH2 ; 22 disp (R , ” ( b ) R at io o f c ar bo n t o h yd ro ge n i n t he f u e l = ”) 23 // l e t x be t he amount o f m o i s t u r e i n t he f ee d , n i t
i s g i ve n t h at 70% i s ca rb on , t h e r e f o r e , 24 // 0 . 7 = 3 .3 2 / ( 1 + 3 . 3 2 + x ) 25 26 27 28 29
30 31 32 33 34
x = R / xCF - 1 - R ; mH = x * 2.016 / 18 .01 6; m Ht ot al = mH + mH2 ; R to ta l = mC / m Ht ot al ; disp ( R t o t a l , ” ( c ) R at io o f c ar bo n t o t o t a l h yd ro ge n i n t h e f u e l = ”) n to tal = R + 1 + x ; P H 2 = 1 *1 00 / n t ot a l ; PH2O = x * 100 / ntot al ; disp ( ”%” , P H 2 , ” ( d ) p e r c e n t a g e o f c o m b u s ti b l e h yd ro ge n in the f u el = ”) disp ( ”%” , P H 2 O , ” p e r c e n t a g e o f m oi s t ur e i n t h e f u e l =
104
”) 35 n H2 Ot ot al = ( P H2 O + P H2 * 1 8. 01 6 / 2 .0 16 ) / 10 0; 36 disp ( ” k g ” ,nH2Ototal , ” ( e ) The mass o f m o i s t ur e i n t h e f l u e g a s p e r kg o f f u e l b u rn ed = ” )
Scilab code Exa 10.4 Combustion of producer gas
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
clc () N fl ue = 1 00 ; / / k m o l e s N CO 2 = 9 .0 5; N C O = 1 .3 4; N O 2 = 9 .9 8; N N2 = 7 9. 63 ; P CO 2F = 9 .2 ; / /% ( F ee d ) P CO F = 2 1. 3; //% P H 2F = 1 8; //% P CH 4F = 2 .5 ; //% P N 2F = 4 9; //%
/ / T ak in g c a rb o n b a l a nc e , F = ( NC O2 + NCO ) / ( ( P CO 2F + PC OF + P CH 4F ) /1 00 );
/ / N i t ro g e n b a l a n c e g i v e s ,
Na ir = ( NN2 - F * PN2 F /( 10 0) ) * 10 0 / 79; R = N ai r/ F; disp (R , ” ( a ) m o l a r R a ti o o f a i r t o f u e l = ” ) O exce ss = NO2 - NCO / 2; P e xc e ss = O e xc e ss * 10 0/ ( N ai r * 2 1/ 10 0 - O e xc es s ) ; disp ( ”%” ,Pexcess , ” ( b ) P er ce nt e x ce s s o f a i r = ” ) NN2F = F * PN2F / 100; P N2 F = N N2 F * 10 0/ N N2 ; disp ( ”%” , P N 2 F , ” ( c ) P er ce nt o f n i t r o g e n i n t he f l u e g as t ha t came fro m f u e l = ” )
Scilab code Exa 10.5 Combustion of coal
105
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
clc () N fl ue = 1 00 ; / / k m o l e N CO 2 = 1 6. 4; N CO = 0 .4 ; N O2 = 2 .3 ; N N 2 = 8 0. 9; P C F = 8 0. 5; / /% ( Feed ) P O = 5. 0; //% P HF = 4 .6 ; //% P N = 1. 1; //% P as h = 8 .8 ; //%
/ / T a ki n g C ar bo n b a l a n c e ,
W = ( NCO2 + NCO ) *12 / ( PCF / 100) ; mC O2 = N CO2 * 44; m CO = NCO * 32; m O2 = NO2 * 28; mN2 = NN2 * 2 8. 01 4; mto tal = mCO2 + mCO + mO2 + mN2 ; M d r yf lu e = m to ta l * 1 00 / W ; disp ( ” k g ” ,Mdr yflue , ” ( a ) The w ei gh t o f d ry g a s eo u s p ro du ct s f o r m e d p e r 10 0 kg o f c o a l f i r e d = ” )
21 / / t a k i n g n i t r o g e n b a la n ce , 22 x = ( mN 2 - W * PN / 10 0) / 2 8. 01 4; 23 N oxyg en = x * 21 / 79; 24 N re qu ir ed = W * ( P CF / 12 + P HF / ( 2* 2. 01 6) - PO / 32 ) /100; 25 P e xc e ss = ( N o xy ge n - N r eq u ir e d ) * 10 0/ N r e q ui r ed ; 26 disp ( ”%” ,Pexcess , ” ( b ) P er ce nt e x ce s s a i r s u p p l i e d f o r combustion = ”)
Scilab code Exa 10.6 Stoichiometric analysis of combustion of coal
1 clc () 2 m co al = 1 00 ; / / k g 3 m C = 63; / / k g
106
4 5 6 7 8 9 10
m H = 12; / / k g m O = 16; / / k g mash =9; / / k g m f ix C = 3 9; / / k g m H 2O = 1 0; / / k g m Cv ol at il e = mC - m fi xC ; m HH 2O = m H2 O * 2 .0 1 6/ 1 8. 0 16 ; // ( mass o f h yd ro ge n i n
moistu re ) 11 12 13 14 15 16 17 18
19 20 21 22 23 24 25 26 27 28
m Hv ol at il e = mH - m HH 2O ; m OH 2O = mH 2O - m HH 2O ; m Ov ol at il e = mO - m OH 2O ; m t vo l at i le = m C vo l at i le + m H vo l at i le + m O vo l at i le ; P C = m Cv ol at il e * 1 00 / m tv ol at il e ; P H = m Hv ol at il e * 1 00 / m tv ol at il e ; P O = m Ov ol at il e * 1 00 / m tv ol at il e ; disp ( ”%” , P C , ” ( a ) p e rc e nt c ar bo n i n v o l a t i l e m at te r = ”) p er ce nt h y d r o g e n i n v o l a t i l e m a t t e r disp ( ”%” , P H , ” = ”) p e rc e nt o xyg e n i n v o l a t i l e m a t t e r = disp ( ”%” , P O , ” ”) P C f lu e = 1 0. 8; //% P v f lu e = 9 .0 ; //% P a s h fl u e = 8 0. 2; //%
// t a k in g a sh b al an ce , Wis t he w ei gh t o f t he r e f u s e , W = m as h m vf lu e = m Cf lu e = C tf lu e =
* 10 0 / P as hf lu e ; P vf lu e * W / 10 0; W * P Cf lu e / 10 0; m Cf lu e + m vf lu e * PC / 10 0;/ / t o t a l
c a rb on
in f l ue 29 30 31 32 33 34 35 36
H tf lu e = m vf lu e * PH / 1 00 ; O tf lu e = m vf lu e * PO / 1 00 ; P C f lu e = C tf lu e * 10 0/ W ; P H f lu e = H tf lu e * 10 0/ W ; P O f lu e = O tf lu e * 10 0/ W ; disp ( ”%” , P C f l u e , ” ( b ) p e r ce n t Carbon i n r e f u s e = ” ) disp ( ”%” , P H f l u e , ” p er ce nt H ydrogen i n r e f u s e = ” ) p er ce nt Oxygen i n r e f u s e = ” ) disp ( ”%” , P O f l u e , ”
107
37 38 39 40 41 42 43 44 45 46 47 48 49
p e r c e n t Ash i n r e f u s e = ” ) disp ( ”%” ,Pash flue , ” C oa lb ur nt = m co al - W ; N Cb ur nt = ( mC - C tf lu e ) /1 2; N H b ur n t = ( m H - H tf lu e ) / 2 .0 1 6; N Ob ur nt = ( mO - O tf lu e ) /3 2; P C O2 = 8 0; / / P e r ce n t ag e o f c ar b on b ur nt NC O2 = PC O2 * N Cb ur nt / 1 00; NCO = ( 1 - PC O2 / 10 0 ) * NC bu rn t ; V ai r = 1 00 0; //mˆ3 N ai r = V ai r / 2 2. 41 43 ; NN2 = Nair * 79 / 100; NO2 = Nair * 21 / 100; O co mp ou nd s = N CO 2 + N CO / 2 + N Hb ur nt / 2;//Oxygen
p r e s e n t i n CO2 , CO a n d H2O 50 / / Oxygen b a l a n c e g i v e s f r e e o xy ge n a s , 51 52 53 54 55 56 57 58 59 60 61 62 63 64
65 66 67 68
O fr ee = N O2 + mO / 32 - O tf lu e /3 2 - O co mp ou nd s ; Nto tal = NN2 + Ofree + NCO2 + NCO ;// d ry b a s i s P C O 21 = N CO 2 * 10 0/ N t o ta l ; P CO 1 = N CO * 1 00 / N to ta l ; P O2 1 = O fr ee * 1 00 / N to ta l ; P N2 1 = N N2 * 1 00 / N to ta l ; disp ( ”%” , P C O 2 1 , ” ( c ) p e r c e n t CO2 i n f l u e = ” ) disp ( ”%” , P C O 1 , ” p e r c e n t CO i n f l u e = ” ) disp ( ”%” , P O 2 1 , ” p e r c e n t O2 in f l u e = ” ) p e r c e n t N2 i n f l u e = ” ) disp ( ”%” , P N 2 1 , ” N Or eq ui re d = mC / 12 + mH / ( 2. 01 6* 2) - mO / 32 ; O ex ce ss = N O2 - N Or eq ui re d ; P ex ce ss = O ex ce ss * 1 00 / N Or eq ui re d ; disp ( ”%” ,Pexcess , ” ( d ) P er ce nt e x c es s a i r s u p p li e d = ” ) N H 2O fl u e = N Hb u rn t ; m H2 O = N H2 Of lu e * 1 8. 01 6; m = m H2 O * 1 00 / Nt ot al ; disp ( ” g w at er v ap ou r / 1 00 kmol d ry f l u e g as ” ,m , ” ( e )
mass o f w a te r v a po u r p er 10 0 m ol es o f d ry f l u e g as = ” )
108
Scilab code Exa 10.7 Orsat analysis
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
clc () P ex ce ss = 2 0; //% P SO3 = 5; //% ( P er ce nt o f s u l ph u r b ur nt t o SO3 )
//S + O2 = SO2 N = 1 ; / / km ol s u l p h u r O r e qu i re d = N ; //kmol
O su pp li ed = O re qu ir ed * ( 1 + P ex ce ss / 1 00 ) ; N s up p li e d = O s up p li e d * 7 9/ 21 ; N SO 2 = (1 - P S O3 / 1 0 0) * N ; NS O3 = PS O3 * N / 10 0; O co ns um ed = N SO 2 + 3 /2 * P SO 3 / 10 0; O r em a in i ng = O s up p li e d - O c on s um e d ; N to ta l = N SO 2 + N SO 3 + O re ma in in g + N su pp li ed ; PS O2 = NS O2 * 100 / N to ta l; PS O3 = NS O3 * 100 / N to ta l; P O 2 = O re ma in in g * 1 00 / N to ta l ; PN2 = N su pp li ed * 1 00 / N to ta l ; disp ( ”%” , P S O 2 , ” P e rc en t SO2 i n b ur ne r g as = ” ) disp ( ”%” , P S O 3 , ” P e rc en t SO3 i n b ur ne r g as = ” ) disp ( ”%” , P O 2 , ” P e r ce nt O2 i n b ur ne r g as = ” ) disp ( ”%” , P N 2 , ” P e r ce nt N2 i n b ur ne r g as = ” )
Scilab code Exa 10.8 Burning of pyrites
1 2 3 4 5 6
clc () N b u rn e r = 1 00 ; //kmol N SO 2b = 9 .5 ; //kmol N O2b = 7; //kmol NN2 = N bu rn er - N SO 2b - N O2b ; N Os up pl ie d = N N2 * 21 / 79; / / Oxy gen s u p p l i e d
109
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
//4FeS2 + 11O2 = 2Fe2O3 + 8SO2 //4FeS2 + 15O2 = 2Fe2O3 + 8SO3 N Otot al = NO2b + NSO2b + NSO2b * 3 / 8; N O un a cc o un t ed = N O su p pl i ed - N O to ta l ; N SO 31 = N Ou na cc ou nt ed * 8 / 15 ; N St ot al = N SO 2b + N SO 31 ; m S = N St ot al * 3 2. 06 4; P bu rn t = 5 0; //% ( p e rc e n t ag e o f p y r i t e s b ur nt ) m Fe S2 = mS * 10 0/ P bu rn t ; disp ( ” k g ” , m F e S 2 , ” ( a ) T ot al p y r i t e s b ur n t = ” ) N Fe S2 = N St ot al / 2; M Fe S2 = 1 19 . 97 5; m Fe S2 1 = M Fe S2 * N Fe S2 ; m ga ng ue = m Fe S2 - m Fe S2 1 ; N Fe 2O 3 = N Fe S2 * P bu rn t / 1 00 ; M Fe 2 O3 = 1 5 9. 6 94 ; m Fe 2O 3 = M Fe 2O 3 * N Fe 2O 3 ; P SO 3c = 2 .5 ; //% ( p e r ce n t ag e s u l ph u r a s SO3 i n
c i nd er ) 25 m c = 10 0; // kg ( b a s i s ) 26 27 28 29 30 31 32 33 34 35 36 37 38
N SO 3 = P SO 3c / 3 2. 06 4; m SO 3 = N SO 3 * 8 0. 06 4; m re ma in in g = mc - m SO 3 ;/ / ( Fe2O3 + g a ng ue )
/ /x b e t h e w e ig ht o f t h e c i n d e r x = ( m F e2 O3 + m g an gu e ) * 1 00 / m r em a in i ng ; disp ( ” k g ” ,x , ” ( b ) w ei gh t o f c i n d e r p ro du ce d = ” ) Slost = x * NSO3 / 100; P S l os t = S lo st * 10 0/ N St o ta l ; disp ( ”%” , P S l o s t , ” ( c ) P er ce nt o f t o t a l S l o s t i n t he cinder = ”) mSO3c = mSO3 * x / 100; N SO 3b = N SO 31 - S lo st ; P = NSO3b * 100 / NSto tal ; disp ( ”%” ,P , ” ( d ) P er ce nt ag e o f S c ha rg ed t ha t i s p r e s e n t a s SO3 i n t he b ur ne r g as = ” )
110
Scilab code Exa 10.9 Production of sulphuric acid
1 clc () 2 N cg as = 1 00 ; // kmol ( b a s i s − SO3 f r e e
c o n ve r t er g as
) 3 N SO 2 = 4 .5 ; //kmol 4 N O2 = 7 .5 ; //kmol 5 N N 2 = 8 8. 0; //kmol 6 N Os up pl ie d = N N2 * 2 1/ 7 9; 7 N Oc on ve rt er = N O2 + N SO 2 ; 8 N O co n su m ed = N O su p pl i ed - N O co n ve r te r ;//(Oxygen
c on su me d f o r SO3 ) 9 10 11 12 13 14 15 16 17
N SO 3c = N Oc on su me d / 1 .5 ; N St ot al = N SO 3c + N SO 2 ; N bg as = 1 00 ; // kmol ( b a s i s − SO3 f r e e b ur ne r g as ) N S O2 1 = 1 5; //% N O21 = 5; //% N N 21 = 8 0; //% N Ob ur ne r = N O2 1 + N SO 21 ; N Os up pl ie d1 = N N21 * 21 / 79; N O co n su m ed 1 = N O su p pl i ed 1 - N O bu r ne r ;//(Oxygen
c on su me d f o r SO3 ) 18 19 20 21 22 23 24 25 26 27 28
N SO 3b = N Oc on su me d1 / 1 .5 ; N St ot al 1 = N SO 3b + N SO 21 ; m S = 10 0; // kg ( b a s i s − su l p hu r c ha rg ed ) P bu rn ed = 9 5; //% m bu rn ed = mS * P bu rn ed / 10 0; N bu rn ed = m bu rn ed / 3 2. 06 4;
// l e t x be t he SO3 f r e e b ur ne r g as pr od uce d , t he n s u l ph u r b a l an c e g i v es , x = N bu rn ed * NSO2b = NSO21 NO2b = NO21 * NN2b = NN21 *
Nb ga s / N St ot al 1 ; * x / 100; x / 100; x / 100;
111
29 30 31 32 33 34 35 36 37 38 39 40 41 42
N to ta lb = N SO 2b + NO 2b + NN 2b ; NSO 3b1 = NSO3b * x / 100;
// l e t y be t he no . o f c o n v e r t er g as p ro du ce d
y = N bu rn ed * Nc ga s / N St ot al ; NSO2c = NSO2 * y / 100; NO2c = NO2 * y / 100; NN2c = NN2 * y / 100; N to ta lc = N SO 2c + NO 2c + NN 2c ; NSO 3c1 = NSO3c * y / 100; N airs ec = ( NN2c - NN2b ) * 100 / 79; P = 100; //kPa T = 300; //K V = Nai rse c * 22.414 * 101.3 * T / ( P * 2 73. 15) ; disp ( ”mˆ3/h” ,V , ” ( a ) The v olume o f s e co n da r y a i r a t 1 0 0 kPa a nd 3 0 0K = ” ) N S ab s or b ed = 9 5; //% m SO 3a bs = N Sa bs or be d * N SO 3c 1 * 8 0. 06 4 / 1 00 ;
43 44 45 / / l e t z b e t h e amount o f 9 8% H2SO4 ,
the ref ore
, 1 00%
H2SO4 p r o d u c e d = z + mS O3a bs 46 / / t a k i n g SO3 b a l a n c e 47 z = ( m SO 3a bs - m SO 3a bs * 8 0. 06 4 / 9 8. 08 ) / ( 8 0. 06 4 / 9 8. 08 - 0 .9 8 * 8 0. 06 4/ 98 .0 8) ; 48 disp ( ” k g ” ,z , ” ( b ) 9 8% H2SO4 r e q u i r e d p e r h ou r = ” ) 49 w = z + mSO3 abs ; 50 disp ( ” k g ” ,w , ” ( c ) 1 0 0% H2SO4 p r o d u c e d p e r h o u r = ” )
Scilab code Exa 10.10 Burning of limestone mixed with coke
1 2 3 4 5 6 7
clc () m li me = m co ke = P C a CO 3 l P M g CO 3 l N Ca CO 3l N Mg CO 3l
5; / / k g 1; / / k g = 8 4. 5; //% = 1 1. 5; //% = P Ca CO 3l * m li me / ( 10 0. 09 *1 00 ) ; = P Mg CO 3l * m li me / ( 84 .3 12 *1 00 ) ;
112
8 m In er ts l = m li me * ( 100 - P Ca CO 3l - P Mg CO 3l ) / 100; 9 P Cc = 76; //% 10 P a sh c = 2 1; //% 11 P wa te rc = 3; //% 12 NCc = m c ok e * PC c / (1 00 *1 2) ; 13 N wa te rc = m co ke * P wa te rc / ( 10 0 * 1 8. 01 6 ) ; 14 ma sh = P ash c * m co ke / 1 00 ; 15 //CaCO3 + C + O2 = CaO + 2CO2 16 //MgCO3 + C + O2 = MgO + 2CO2 17 P C aC O 3c o nv = 9 5; / / ( P e rc e nt c a l c i n a t i o n o f CaCO3 ) 18 P M gC O 3c o nv = 9 0; / / ( P e r c en t c a l c i n a t i o n o f MgCO3 ) 19 N Ca O = P Ca CO 3c on v * N Ca CO 3l / 1 00 ; 20 m C aO = N Ca O * 5 6. 08 ; 21 N Mg O = P Mg CO 3c on v * N Mg CO 3l / 1 00 ; 22 m Mg O = N Mg O * 4 0. 31 2; 23 m Ca C O3 = ( N C aC O 3l * ( 1 - P Ca C O3 c on v / 1 00 ) * 1 00 . 09 ) ; 24 m Mg C O3 = ( N M gC O 3l * ( 1 - P Mg C O3 c on v / 1 00 ) * 8 4. 3 12 ) ; 25 m to ta l = m Ca O + m Mg O + m Ca CO 3 + m Mg CO 3 + m In er ts l + mash ; 26 PC aO = mC aO * 100 / m to ta l; 27 disp ( ”%” , P C a O , ” The w e ig h t p e r c e n t o f CaO i n t h e p ro du ct l e a v i n g t h e k i l n = ” )
Scilab code Exa 10.11 treating limestone with aqueous H2SO4
1 2 3 4 5 6 7 8 9
clc () R = 100; // kg ( b a s i s − r e s i d u e ) M Ca S O4 = 1 3 6. 1 44 ; M Mg S O4 = 1 2 0. 3 76 ; m Ca SO 4r = 9; / / k g m Mg SO 4r = 5; / / k g m H 2 SO 4 r = 1 .2 ; / / k g m i n er t r = 0 .5 ; / / k g m CO 2r = 0 .2 ; / / k g
113
10 11 12 13 14 15 16 17 18 19 20 21
m H 2O = 8 4. 10 ; / / k g N Ca SO 4 = m Ca SO 4r / M Ca SO 4 ; N Mg SO 4 = m Mg SO 4r / M Mg SO 4 ;
//CaCO3 + H2SO4 = CaSO4 + H2O + CO2 // MgSO4 + H2SO4 = MgSO4 + H2O + CO2
22 23 24 25 26 27 28 29 30 31 32 33 34
m Ca CO 3 = N Ca SO 4 * 1 00 .0 8; m Mg CO 3 = N Mg SO 4 * 8 4. 31 2; m to ta ll im e = m in er tr + m Ca CO 3 + m Mg CO 3 ; P Ca CO 3 = m Ca CO 3 * 1 00 / m to ta ll im e ; P Mg C O3 = m Mg CO 3 * 10 0/ m t ot a ll i me ; P i ne r ts = m i ne r tr * 10 0/ m t ot a ll i me ; disp ( ”%” , P C a C O 3 , ” ( a ) P e r ce n t ag e o f CaCO3 i n l i m e s t o n e = ”) P er ce nt ag e o f MgCO3 in l i m es t o n e disp ( ”%” , P M g C O 3 , ” = ”) Pe rcen t a g e of i n er t s i n disp ( ”%” ,Pinerts , ” li mes tone = ”) N H2 SO 4 = N Ca SO 4 + N Mg SO 4 ; m H2 SO 4 = N H2 SO 4 * 9 8. 08 ; P ex ce ss = m H2 SO 4r * 10 0 / ( m H2 SO 4 ); disp ( ”%” ,Pexcess , ” ( b ) The p e rc e n t ag e e x c es s o f a c id used = ”) m ac id t = m H2 SO 4 + m H2 SO 4r ; P ac id ic = 1 2; //% m wa te ri n = m ac id t * ( 10 0 - P ac id ic ) / P ac id ic ; m w at e rr = ( N C aS O4 + N Mg S O4 ) * 1 8 .0 1 6; m w a te r t = m wa t er i n + m wa t er r ; m v a po r iz e d = m wa t er t - m H2 O ; m = m v ap o ri z ed * 1 00 / m t ot a ll i me ;// w a t er v a p o r i z e d
p er 1 0 0 kg o f l i m es t o ne 35 disp ( ” k g ” ,m , ” ( c ) t h e mass o f w at er v a p o r i z e d p e r 1 00 kg o f l i me s to n e = ” ) 36 m C O 2p r = ( N C aS O4 + N Mg SO 4 ) * 44 ; 37 m CO 2r el = m CO 2p r - m CO 2r ; 38 m1 = m CO 2r el * 10 0 / m to ta ll im e ;/ /CO2 p e r 1 0 0 kg o f
limestone 39 disp ( ” k g ” , m 1 , ” ( d ) t h e mass o f CO2 p e r 1 00 k g o f li mes tone = ”) 114
Scilab code Exa 10.12 Production of TSP
1 2 3 4 5 6 7
clc () m ac id = 1 00 0; // kg ( b a s i s − d i l u t e p ho s p h o r i c a c i d ) M p ha c id = 9 7 .9 9 8; P = 1. 25 ; //% ( d i l u t e % ) m ph ac id = m ac id * P / 10 0; N ph ac id = m ph ac id / M ph ac id ;
/ /1 mole o f p h o sp h o ri c a c i d − 1 mole o f t r i s od i u m phosphate
N T SP = N p ha ci d ; M T SP = 3 8 0. 1 66 ; mT SP = NT SP * M TSP ; disp ( ” k g ” , m T S P , ” ( a ) Maximum w e i g h t o f TSP o b t a i n e d = ”) 12 N CO 2 = N TS P ; 13 P w a te r = 6 .2 7 //kPa 14 // s i n c e g as i s s a t u r a t ed w it h w at er vapour , v ap ou r 8 9 10 11
p r es s ur e = p a r t i a l p r es s u re 15 16 17 18 19 20
Nwa ter = NCO2 * Pwater / ( 100 - P water ) ; N to ta l = N wa te r + N CO 2 ; P = 100; //kPa T = 310; //K V = Ntotal * 101.3 * T *2 2.4 143 / ( P * 27 3.15 ) ; disp ( ”mˆ3” ,V , ” ( b ) Vo lume o f CO2 = ” )
Scilab code Exa 10.13 Production of sodium phosphate
1 clc () 2 m TS Pd = 1 00 0; // kg ( b a s i s − 20% d i l u t e TSP ) 3 P = 20; //%
115
4 5 6 7 8 9 10 11 12 13
mTSP = mTSPd * P / 100; N TS P = m TS P / 1 63 .9 74 ; m so da as hd = N TS P * 1 06 ; m ph ac id d = N TS P * 9 7. 99 8; m Na OH d = N TS P * 4 0. 00 8; P ph ac id = 8 5; //% ( 85% s o l u t i o n p h o sp h o ri c a c i d ) P N aO H = 5 0; / /% ( 5 0% s o l u t i o n NaOH )
14 15 16 17 18 19
// l e t x be t he w a te r i n s od a ash , / / t a k i n g w a te r b a l a n ce , x = ( mTSPd - mTSP ) - mNaOHd * PNaOH /(100 - PNaOH ) mp hac idd * (100 - Pph acid ) / P phac id ; m so da as h = m so da as hd + x ; C = m so da as hd * 10 0 / m so da as h ; disp ( ”%” ,C , ” ( a ) C on c e n t ra t i o n o f s od a a sh s o l u t i o n = ”) m ph ac id = m ph ac id d * 1 00 / P ph ac id ; R = m so da as h / m ph ac id ; disp (R , ” ( b ) W eight r a t i o i n whi ch s od a a sh and c om me rc ia l p h o sp h o ri c a c i d a r e mixed = ” )
Scilab code Exa 10.14 Production of pig iron
1 clc () 2 m = 10 00 ; // kg ( b a s i s − pi g i r o n p ro du ce d ) 3 // l e t x be t he i r o n o re c ha rg ed and y be t he amount
4 5 6 7 8 9 10 11
o f f l u x added and z be t he w ei gh t o f s l a g produced P F ep g = 9 5; / /% ( Fe% i n p r od u ct ) P Cpg = 4; //% P Si pg = 1; //% P F ec h = 8 5; / /% ( Fe% i n f e e d ) m co ke = 1 00 0; / / k g P Cc ok e = 9 0; //% P Si co ke = 1 0; //% P Si sl ag = 6 0; //% 116
12 13 14 15 16 17 18 19
P Si fl ux = 5; //% P C a CO 3 fx = 9 0; //% P Mg CO 3f x = 5; //% P CM sl ag = 4 0; //%
// i r o n b a la n ce g i v es , x = PF ep g * m * 15 9. 69 4 / ( P Fe ch * 1 11 .6 94 ) ;
// s i li co n balance gives , // x ∗ ( 1 0 0 − PFech) ∗ 2 8 . 0 8 6 / ( 1 0 0 ∗ 6 0 . 0 8 6 ) + m c o k e ∗ P s i c o k e ∗ 2 8 . 0 8 6 / ( 1 0 0 ∗ 6 0 . 0 8 6 ) + y∗ P S i f l u x ∗ 2 8 . 0 8 6 / ( 1 0 0 ∗ 6 0 . 0 8 6 ) = 1 0 + z ∗ P s i s l a g ∗ 2 8 . 0 8 6 / ( 1 0 0∗6 0. 08 6 ) 20 / / t a k i n g ( CaO + MgO) b a l a n c e 21 // y ∗ ( ( PCaCO3fx) ∗ 5 6 . 8 8 / ( 1 0 0∗ 100.88)+(PMgCO3fx ∗ 4 0 . 3 1 2 / ( 1 0 0 ∗ 8 4 . 3 1 2 ) )=z ∗PCMslag/100 22 // s o l v i n g a bo ve 2 e q ua t i on s , we g et 23 y = 4 03 .3 1; 24 disp ( ” k g ” ,y , ” t he amount o f f l u x r e q u i r e d t o p ro du ce 1 0 0 0 kg o f p ig i r o n = ” )
Scilab code Exa 10.15 Production of nitric acid
1 2 3 4 5 6 7 8
clc () N = 100; / / mo l ( b a s i s − s c r u b b e r ) N NO s = 2 .4 ; / / m o l N N 2s = 9 2; //mol N O2 s = 5 .6 ; / / m o l P N Os = 2 0; / /% ( P e r ce n t a ge NO l e a v i n g s c r u b b e r ) N NO re ac = NN Os * 100 / P NO s;
/ / l e t x mol o f n i t r o g e be p ro du c ed i n t he r e a c t io n , t he n t he amount o f N2 p r e s e nt i n t he a i r = NN2s − x mo l − ( 1 ) 9 // 4NH3 + 5O2 = 4NO + 6H2O 10 //4NH3 + 3O2 = 2N2 + 6H2O 11 / / 4 m o l e s o f NO − 5 m ol es o f O2 , 2 m ol es o f N2 − 3 m o le s o f O2 117
12 / / T o t a l o xy ge n u s ed up , O = NNOreac ∗ 5 / 4 + x ∗3 / 2 13 / / t o t a l o x yg e n s u p p l i e d , N O to t al= (O) + NO2s 14 / / N i t ro g e n a s s o c i a t e d w it h O2 s u p p l i e d NN2 = N Ot ot al
∗7 9 / 2 1 − ( 2 ) 15 / / c o mp a ri n g 1 and 2 , 16 x = 2 .1 83 5; 17 / / 12 m o le s NO r e q u i r e s 1 2 m o l es ammonia , 1 m ol e N2
r e q u i r e s 2 m ol e a mmonia 18 19 20 21 22 23 24
N am mo ni a = x *2 + N NO re ac ; Oreq = N amm on ia * 5 / 4; O su pp = N NO re ac * 5 /4 + x *3 /2 + NO 2s ; P ex ce ss = ( O su pp - O re q ) *1 00 / O re q ; disp ( ”%” ,Pexcess , ” ( a ) P e r ce n t a ge e x c e s s o xy ge n = ” ) fr = x * 2 / Nam mo nia ; disp ( f r , ” F r a ct i o n o f ammonia t a k in g p a rt i n s i d e r e a ct i o n = ”)
Scilab code Exa 10.16 Material balance in nitric acid production
1 2 3 4 5 6 7 8
clc () m = 100; // kg ( b a s i s sodi um n i t r a t e N N a NO 3 = m / 85 ;
r e a c t ed )
// 2NaNO3 + H2SO4 = 2HNO3 + Na2SO4 m h 2 so 4 = N Na NO 3 * 9 8 .0 8 /2 ; m h n o 3 = N N a NO 3 * 6 3 . 0 08 ; m na 2s o4 = N Na NO 3 * 1 42 .0 64 / 2; P hn o3 = 2; //%( p e rc e nt n i t r i c a c id r em ai ni ng i n t he
cak e ) 9 m hn o3 ca ke = m hn o3 * P hn o3 / 1 00 ; 10 P h2 so 4 = 3 5; //% 11 P w a te r = 1 .5 ; //% 12 m to ta l = ( m na 2s o4 + m hn o3 ca ke ) * 1 00 /( 10 0 - P h2 so 4 Pwater); 13 m wa te r = P wa te r * m to ta l / 1 00 ; 14 m h2 so 4c = P h2 so 4 * m to ta l / 1 00 ;
118
15 P n a2 s o4 = m n a2 s o4 * 10 0/ m t o ta l ; 16 P hn o3 c = m hn o3 ca ke * 1 00 / m to ta l ; 17 disp ( ” k g ” ,mna2so 4 , ” ( a ) Mass o f Na2SO4 i n t h e c ak e = ” ) 18 disp ( ” k g ” , m h n o 3 , ” Mass o f HNO3 i n t h e c a ke = ” ) 19 disp ( ” k g ” , m w a t e r , ” Mass o f w at er i n t he c a ke = ” ) 20 disp ( ” k g ” ,mh2so4 c , ” Mass o f H2SO4 i n t h e c ak e = ” ) 21 disp ( ”%” ,Pna2so4 , ” P e r c e n ta g e o f Na2SO4 i n t h e c a ke = ”) 22 disp ( ”%” , P h n o 3 c , ” P e r c e n ta g e o f HNO3 i n t h e c a ke = ” ) 23 disp ( ”%” , P w a t e r , ” P e rc en ta g e o f w at er i n t he c a ke = ” ) 24 disp ( ”%” , P h 2 s o 4 , ” P e r c e n ta g e o f H2SO4 i n t h e c ak e = ” ) 25 m h 2 s o4 r eq = m h2 so 4 + m h2 s o4 c ; 26 P = 95; //% ( 9 5% d i l u t e s u l p h u r i c a c i d ) 27 w = m h2 so 4r eq * 100 / P ; 28 disp ( m h 2 s o 4 ) 29 disp ( ” k g ” ,w , ” ( b ) W eight o f 95% s u l p h u r i c a c i d r e q u ir e d = ” ) 30 m ni tr ic = m hn o3 - m hn o3 ca ke ; 31 disp ( ” k g ” ,mnitri c , ” ( c ) w ei gh t o f n i t r i c a c i d p ro du ct o b ta i n ed = ” ) 32 m w a t e rd = w * (1 - P / 1 0 0 ) - m w a te r ; 33 disp ( ” k g ” ,mwater d , ” ( d ) t he w at er va po ur t ha t i s d i s t i l l e d f ro m t h e n i t r e c a ke = ” )
Scilab code Exa 10.17 Electrolysis of brine
1 2 3 4 5 6
clc () m = 50; // kg ( b a s i s − mass o f b r i ne c ha rg ed )
/ / l e t x be t he amount o f NaCl i n t he b r i n e P el ec t = 5 0; //% ( e l e c t r o l y z e d ) // 2NaCl + 2H2O = 2NaOH + Cl2 + H2 / / amount o f NaCl r e a c t e d =x ∗ P e l e c t / ( 1 0 0 ∗ 5 8. 4 5) kmol=x 119
e c t / 1 0 0 kg kg ( 1 ) ∗ P e l ec 7 / / am a m o u n t o f w at a t er er r e a c t e d = x ∗ P e l e c t ∗ 1 8 . 0 1 6 / ( 1 0 0 ∗ 5 8. 8 . 4 5 ) kg kg ( 2 ) 8 / / G as a s es e s p ro r o du d u ce c e d , C l2 l 2 = x ∗ P e l e c t / ( 10 10 0 ∗ 5 8 . 4 5 ∗ 2 ) km k m o l = x ∗ P e l e c t ∗ 7 1/ 1 / ( 1 00 0 0 ∗ 5 8 . 4 5 ∗ 2 ) kg kg ( 3 ) 9 / / H 2 = x ∗ P e l e c t / ( 10 1 0 0 ∗ 5 8 . 4 5 ∗ 2 ) km kmol = x ∗ P e l e c t ∗ 2 . 0 16 1 6 / ( 10 1 0 0 ∗ 5 8 . 4 5 ∗ 2 ) kg kg ( 4 ) 10 N w a te m o l w at a t er e r v ap a p ou o u r / mo mo l o f g a s t e r = 0 .0 . 0 3; 3 ; / / mo 11 / / w a t e r v ap a p o ur u r p r e s e n t = N wa w a te te r ∗ 2 ∗ ( C l 2 + H2 ) k mo mo l =
Nwater ∗ 2 ∗ ( C l 2 + H2 ) ∗ ) ∗ 1 8 . 01 01 6 kg ( 5 ) 12 //NaoH = x ∗ P e l e c t ∗ 4 0 . 00 0 0 8 / ( 10 1 0 0 ∗ 5 8 .4 . 4 5 ) kg kg ( 6 ) 13 / / w at a t er e r = wa w a te t e r i n b r i n e − w at a t er er r e a c t e d − w a t e r present in gas ( 7 ) 14 // //= = (m − P e l e c t / 1 0 0 ) − w a te t e r r e a c te te d ( 2 ) − water p r e s e n t i n t he h e g as as ( 5 ) 15 / / T ot o t al a l w ei e i g ht h t o f s o l u t i o n = Na Na C l ( 1 ) + NaOH ( 6 ) + Wa Wa t e r ( 7 ) 16 / / s i n c e NaOH i s 1 0 p e r ce c e n t o f t he h e t o t a l w ei e i gh g h t , we have NaOH = 0 .1 ∗ t o t a l w ei e i gh g h t , f r o m t h e s e we g et et , 17 18 19 20 21
x = 0 . 1 * 5 0 / ( 0 . 1 * 0 . 3 1 6 5 + 0 . 34 34 2 2 ) ; N a OH OH = x * P el e l ec e c t * 4 0. 0 . 00 0 0 8/ 8 / ( 10 10 0 * 5 8. 8 . 45 45 ) ; NaCl = x * Pelect / 100; w at a t er e r = 3 4. 4 . 5 03 0 3 2; 2; / / k g c e n t ag ag e i n s o l u t i o n l e a v i n g P e va v a p = 5 0; 0 ; / / NaOh p e r ce
evaporator 22 / / t a k i n g NaOH b a l a n c e 23 m ev e v ap a p = N a OH O H * 1 0 0 / P ev e v ap ap ; 24 disp ( ” k g ” , m e v a p , ” ( a ) a mo m o un un t o f 5 0% 0% NaOH s o l u t i o n produced = ”) e c t * 7 1 / ( 1 0 0 * 5 8 . 4 5 * 2 ) ;/ / k g 25 C l 2 = x * P e l ec 26 H 2 = x * P e l e c t * 2 . 01 0 1 6 / ( 1 0 0 * 5 8 . 4 5 * 2 ) ;/ / k g
120
r o du d u ce ce d = ” ) disp ( ” k g ” , C l 2 , ” ( b ) C h l o r i n e p ro disp ( ” k g ” , H 2 , ” H y d r o g e n p ro r o du d u ce ce d = ” ) P le l e av a v = 1 .5 . 5 ; / /% N a C l l e a v i n g t h e e v a p o r a t o r N a C ll l l ea e a v = m ev e v ap a p * P le l e av a v / 1 00 00 ; m cr c r ys y s ta t a l = N aC a C l - N aC a C ll l l ea ea v ; disp ( ” k g / h ” ,mcry stal , ” ( c ) Am Amo un t o f N a C l c r y s t a l l i z e d = ”) w a te t e rl r l ea e a v = m ev e v ap a p - N aO a O H - N aC a C ll l l ea ea v ; 33 m wa 34 M w at a t e re r e v ap a p = w at a t er e r - m w at a t e rl r l e av av ; 35 disp ( ” k g ” ,Mwaterevap , ” ( d ) W e i gh gh t o f w at a t er e r e v a po p o r a te te d = ”) 27 28 29 30 31 32
Scilab code Exa 10.18 Preparation of Formaldehyde
1 2 3 4 5 6 7 8 9 10 11
clc () mo l ( m = 1 0 0 ; / / mo
b a si s r e ac to r e e x it gas ) / /CH /CH33OH + O2 = HC HCOOH + H2 H2O O //CH //C H3OH + O2 / 2 = HC HCHO + H2O H2O N n2 n2 = 6 4. 4 . 49 4 9 ; //mol N o2 o2 = 1 3. 3 . 88 8 8 ; //mol N h2 h 2 o = 5 .3 . 3 1; 1 ; //mol N c h 3o 3 o h = 1 1. 1 . 02 0 2 ; //mol N hc h c ho h o = 4 .0 . 0 8; 8; / / m o l N h c oo o o h = 1 .2 . 2 2; 2 ; //mol / / x b e t he h e m ol o l es e s o f m et e t ha h a no n o l r e ac a c t ed e d , t a k i ng ng C b a l a n ce c e , we g e t ,
12 x = N ch c h 3o 3 o h + N hc h c ho h o + N hc h c oo oo h ; 13 P c o n v = N h c h o * 1 0 0 / x ; 14 disp ( ”%” ”%” , P c o n v , ” ( a ) P eerr ce c e nt n t c o n v e rs rs i o n o f formaldehyde = ”) 15 N a i r = N n 2 * 1 0 0 / 7 9 ; 16 R = N a i r / x ; 17 disp ( R , ” ( b ) R a ti ti o o f a i r t o m e t h a n o l i n t h e f e e d = ” )
121
Scilab code Exa 10.19 Recycle operation reactor and separator
1 clc () 2 N A = 1 0 0; m o l ( b a s i − 10 1 0 0 m o l A i n t he he f r e s h f e e d 0; / / mo
) 3 4 5 6 7 8 9 10 11 12 13
P c on o n v = 9 5; 5 ; / /% N Ap A p ro r o = N A * ( 1 00 0 0 - P co c o nv n v ) /1 / 1 00 00 ;
//A = 2B + C
14 15 16 17
NB = NA * P c o n v * 2 / 10 0; N C = N A * P co c o nv n v / 10 1 0 0; 0; P Ae A e nt n t = 0 .5 . 5 ; / /% N Ae A e nt n t = N Ap A p ro r o * 1 0 0 / P Ae A e nt nt ; P Br B r ec e c = 1 ; / /% N B e n t = N B * 1 0 0 / ( 1 0 0 - P B r e c ); ); m = ( NA N A e n t - N A p r o + N A ); ); c on o n v = ( ( NA N A en e n t - N Ap A p ro r o + N A) A ) - N Ae A e nt n t ) * 10 1 0 0/ 0 / ( N Ae A e nt nt N Ap A p ro r o + N A) A) ; disp ( ”%” ”%” , c o n v , ” ( a ) s i n g l e p a s s c o nv n v e r i on on = ” ) N re r e cy c y cl c l ed e d = ( NA N A en e n t - N Ap A p ro r o ) + ( NB N B en e n t - N B ); ); R = N r ec e c y cl c l e d / NA NA ; disp ( R , ” ( b ) r e c y c l e r a t i o = ” )
Scilab code Exa 10.20 Conversion of sugar to glucose and fructose
1 clc () 2 m = 1 0 0 ; / / kg kg ( b a s i s − s u c r o s e s o l u t i o n a s f r e s h
f ee ee d ) 3 / /R − r e c y c l e r e a c t o r e xi xi t , f r a c t i o n o f s u c r o s e and y o f i n v e r s i o n s ug u g ar ar i n t h e c o m b i n e d s tr t r ea ea m f r a c t i o n 0.04 122
l e t x be t h e w e i g h t b e t h e w e i gh gh t f r a c t o n r e c y c l e stream , f o r o f G lu l u co c o se se + f r u c t o s e =
4 / / z b e t he w e i g h t f r a c t i o n
o f s uc ro se i n the co mb ined s tr ea m e n t e r i n g t he r e a c t o r P sf ee d = 2 5; //% p e r c en t s u c r o s e i n f r e s h f e e d // s u c r o s e b a l an c e g i v es , 25 + R∗ x = ( 1 0 0 + R ) ∗ z (A ) // G lu co se + f r u c t o s e b al an ce , R ∗ y = ( 10 0 + R ) (B) ∗0.04 S u cr o se c on = 7 1. 7; / /% s u c r o s e c on su me d / / s u c r o s e b a l a n c e a ro un d t h e r e a c t o r , ( 1 00 +R) z = 0 . 7 1 7∗(100 +R) z+(100+R) x (C) / /From (C) , x = 0 . 2 8 3 ∗ z
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
(D ) // Amount c o n ve r te d t o G lu co se + f r u c t o s e = 0 . 7 1 7 ( 10 0 + R ) ∗ z // = 0 . 7 1 7 ( 1 00 + R ) ∗ z ∗ 3 6 0. 1 92 / 3 4 2. 1 76 kg // G lu co se and f r u c t o s e b a l an c e a ro und t he r e a c to r , //(100+R) ∗ 0 . 0 4 + 0 . 7 1 7 ( 1 0 0 + R ) ∗ z ∗ 3 6 0 . 1 9 2 / 3 4 2 . 1 7 6 = (100+R) ∗ y (E) // S o l v i n g (E) , y = 0 . 0 4 + 0 . 7 54 8 ∗ z (F) / / S o l v i n g , (A) , ( B) , (C) and ( F) x = 0. 06 ; y = 0.2; z = 0 .2 12 ; R = 25; disp ( ” k g ” ,R , ” ( a ) R ec y cl e f l o w = ” ) disp ( ”%” , y * 1 0 0 , ” ( b ) Combined c o n c e n t r a t i o n o f G l uc o se and F r u c t o s e i n t he r e c y c l e s tr ea m = ” )
Scilab code Exa 10.21 Purging operation
1 2 3 4
clc () N = 1 ; // mol ( b a s i s − co mb in ed f e e d )
//F − m o l e s o f f r e s h f e e d P i n er t = 0 .5 ; //% 123
5 6 7 8 9 10 11 12
P c on v = 6 0; //% P 1i ne rt = 2; //% NA1 = N * ( 1 - P 1ine rt / 100 ) ; NA2 = NA1 * ( 1 - Pconv / 100 ) ; NB2 = NA1 - NA2 ; N 1i ne rt = N * P 1i ne rt / 1 00 ; N 2 in e rt = N 1 in e rt ;
// L et R b e t he m ol es r e c y c l e d and P b e t he m ol es purged 13 //W = R + P 14 W = NA2 + N 2ine rt ; // (A ) 15 P Wi ne rt = N 2i ne rt * 1 00 / ( N A2 + N 2i ne rt ) ; 16 / / co mpo nen t A b a l a nc e , A f r e s h f e e d = A p ur ge s tr ea m 17 18 19 20 21 22 23 24 25 26 27 28 29
+ A r e c y c l e s tr ea m //F ∗ 0 . 9 = P ∗ 0 . 9 5 1 5 + 0 . 5 8 8 (B) / / i n e r t b al a n ce a t t h e p o i n t where f r e s h f e e d i s mixed w it h t h e r e c y c l e , //F ∗ 0 . 0 05 + R∗ 0 . 0 4 8 5 = 1∗ 0 . 0 2 (C) / / S o l v i n g (A) , ( B ) a nd ( C) F = 0 .6 55 2; / / m o l P = 0 .0 67 1; / / m o l R = 0 .3 44 8; / / m o l disp ( ” m o l ” ,R , ” ( a ) m ol es o f r e c y c l e s tr e am = ” ) disp ( ” m o l ” ,P , ” ( b ) m ol es o f p ur ge s tr ea m = ” ) N Ac on v = NA1 - NA 2; NAf = F * (1 - Pin ert / 100) ; C on v = N Ac on v * 10 0/ N Af ; disp ( ”%” , C o n v , ” ( c ) O v e r a l l c o n v e r s i o n = ” )
Scilab code Exa 10.22 Purging operation for production of methanol
1 clc ()
124
2 3 4 5 6 7 8 9 10 11 12 13 14
N = 100; // m ol es ( B a si s − F re s h f e ed ) P c on v = 2 0; //% x c o = 0 .3 3; x h2 = 0 .6 65 ; x c h4 = 0 .0 05 ;
//R − r e c y c l e s trea m , P − p ur g e s t re a m // x − mole f r a c t i o n o f CO i n r e c y c l e s t r e a m , x ch 4r = 0 .0 3;
/ /CO = x , H2 = 1 − x c h 4 r − CO = 0.97 − x ; / / metha ne b a l a n c e o v er t h e e n t i r e s ys te m , P = xch4 * N / xch4r ;
// t a ki n g c ar on b al an ce , 3 3 . 5 = M + P ( 0 . 0 3 + x ) / / Hyd ro ge n b a la n ce , 6 6 . 5 + 2 ∗ 0 . 5 = 2M + P ( 2 ∗ 0 . 03 + 0.97 − x) 15 // s u b s t i t u t i n g P , M + 1 6 . 6 7 x = 3 3 . 0 and 2M − 1 6 . 6 7 x = 50.33 16 17 18 19 20 21 22 23 24 25 26
M = (3 3. 0 + 5 0. 33 ) /3; x = (( xco + xch4 )* N - M ) / P - xch4r ;
/ / m e t h an o l b a l a n c e , ( x co ∗N+Rx) ∗ P o n c v / 1 0 0 = M
R = ( M *10 0 / P co nv - ( xco * N) )/ x; disp ( ” m o l ” ,R , ” ( a ) m ol es o f r e c y c l e s tr e am = ” ) disp ( ” m o l ” ,P , ” ( b ) m ol es o f p ur ge s tr ea m = ” ) H2 = 1 - xch4r - x ; disp ( ”%” , x c h 4 r * 1 0 0 , ” ( c ) CH4 i n p u r g e s t r e a m = ” ) disp ( ”%” , x * 1 0 0 , ”CO i n p u rg e s t re a m = ” ) disp ( ”%” , H 2 * 1 0 0 , ” h y dr og en i n p u rg e s tr ea m = ” ) disp ( ” m o l ” ,M , ” ( d ) M et h an o l p r o d uc e d = ” )
125
Chapter 11 Energy Balance Thermophysics
Scilab code Exa 11.1 Power calculation
1 2 3 4 5 6 7 8 9 10
clc () m = 75; / / k g g = 9.81 //mˆ2 / s d = 10; //m t = 2 .5 *6 0; // s f = m*g ; w = f * d; P = w / t; disp ( ”Nm” ,w , ” The w or k d o ne = ” ) disp ( ”W” ,P , ” Power r e q u i r e d = ” )
Scilab code Exa 11.2 Kinetic energy calculation
1 2 3 4 5
clc () P E = 1 . 5* 1 0^ 3 ; // J m = 10; / / k g g = 9. 81 ; //m/sˆ2 v = 50; //m/s
126
6 7 8 9 10
//PE = mgz z = PE / ( m * g) ; KE = m * ( v^2) / 2; disp ( ”m” ,z , ” H e ig ht o f t he body fro m t he g ro un d = ” ) disp ( ” k J ” , K E / 1 0 0 0 , ” K i n e t i c e ne rg y o f t he body = ” )
Scilab code Exa 11.3 Work done calculation for a gas confined in a cylin-
der 1 2 3 4 5 6 7 8 9 10 11 12 13
clc () d = 100 / 10 00 ; //m m = 50; / / k g P = 1 . 01 3 25 * 10 ^ 5; //Pa A = %pi * ( d^2) /4; Fatm = P * A ; Fwt = m * g ; F to ta l = F at m + Fwt ; P = Ftotal / A ; disp ( ” b a r ” , P / 1 0 ^ 5 , ” ( a ) P r es s u r e o f t he g as = ” ) z = 5 00 /1 00 0; //m w = Ftotal * z ; disp ( ” J ” ,w , ” ( b ) Work d on e by t h e g a s = ” )
Scilab code Exa 11.4 Power requirement of the pump
1 2 3 4 5 6 7 8
clc () S gr = 0 .8 79 ; F = 5 ; //mˆ3/h D = Sgr * 1000; m = F * D /3600; / / k g / s P = 35 00 ; //kPa W = P * m * 1000/ D ; disp ( ”W” ,W , ” Power r e q u i r e m e n t f o r
127
t h e pump = ” )
Scilab code Exa 11.5 Specific enthalpy of the fluid in the tank
1 2 3 4 5 6 7 8 9
clc () d = 3 ; //m m = 1 25 00 ; / / k g P = 70 00 ; //kPa U = 5 .3 *1 0^ 6; / / k J V ta nk = 4* % pi * (( d /2 ) ^3 ) / 3; Vliq = Vtank / 2; H = U + P * Vliq ; disp ( ” k J / k g ” , H / m , ” S p e c i f i c e n th a lp y o f t h e f l u i d i n t he t an k = ” )
Scilab code Exa 11.6 internal energy and enthalpy change calculation
1 2 3 4 5 6 7 8 9 10
clc () P = 1 01 .3 ; //kPa SVl = 1 .0 4 * 1 0^ - 3; //mˆ3/kmol S Vg = 1 .6 75 ; //mˆ3/kmol Q = 10 30 ; / / k J W = P * 10^3 * ( SVg - SVl ) /1000; U = Q - W; H = U + P * 10^3 * ( SVg - S Vl ) /1000; disp ( ” k J / k m o l ” ,U , ” Change i n i n t e r n a l e ne rg y = ” ) disp ( ” k J / k m o l ” ,H , ” Change i n e n t ha l p y = ” )
Scilab code Exa 11.7 change in internal energy
1 clc ()
128
2 // work i s do ne on t he s yst em , h en ce , W i s n e g a t i v e 3 W = - 2 * 745 .7; / / J / s 4 // h ea t i s t r a n s f e r r e s t o t he s ur ro un di ng , h enc e ,
h ea t t r a n s f e r r e d i s n eg at iv e , 5 Q = - 30 00 ; / / k J / h 6 U = Q * 10 00 /3 60 0 - W ; 7 disp ( ” J / s ” ,U , ” Change i n i n t e r n a l
e ne rg y = ” )
Scilab code Exa 11.8 reaction of iron with HCl
1 2 3 4 5 6
clc ()
/ / Fe ( s ) + 2 HCl ( a q ) = F eC l2 ( a q ) + H2 ( g ) MFe m = Nfe N h2
= 5 5. 8 47 ; 1;//kg = m * 1 0^ 3/ M Fe ; = Nfe ; // ( s i n c e 1 mole o f Fe p ro d u ce s 1 mole o f
H2 ) 7 T = 300; //K 8 R = 8 .3 14 ; 9 // t he c ha ng e i n volume i s
e q ua l t o t he volume o c c u p i e d by h y dr o ge n p r od u ce d
10 PV = Nh2 * R * T ; 11 W = PV ; 12 disp ( ” k J ” ,W , ” Work d o n e = ” )
Scilab code Exa 11.9 Thermic fluid
1 2 3 4 5 6
clc ()
/ /Cp = 1 .4 3 6 + 2 . 18∗1 0 ˆ −3 ∗T ; m = 1 00 0/ 36 00 ; / / k g / s T 1 = 38 0; //K T 2 = 55 0; //K x = i n t e g r a t e ( ’ 1 . 4 3 6 + 2 .1 8∗1 0 ˆ −3∗T ’ , ’ T ’ , T 1 , T 2 ) ; 129
7 Q = m*x ; 8 disp ( ”kW” ,Q , ” Heat l oa d on t he h e at e r = ” )
Scilab code Exa 11.10 Heat capacity
1 clc () 2 / /Cp = 2 6 . 5 4 + 4 2. 4 54∗1 0 ˆ − 3 ∗ T − 1 4 . 2 9 8 ∗ 10 ˆ−6 ∗ T
ˆ2; T 1 = 30 0; //K T 2 = 1 00 0; //K m = 1;//kg N = m / 4 4 ; //kmol x = i n t e g r a t e ( ’ 2 6 . 5 4 + 4 2. 4 54∗ 1 0 ˆ −3 ∗ T − 1 4 . 2 9 8 ∗ 10 ˆ−6 ∗ Tˆ2 ’ , ’ T ’ , T 1 , T 2 ) ; 8 Q = N*x ; 9 disp ( ” k J ” ,Q , ” ( a ) H eat r e q u i r e d = ” ) 10 // f o r t em pe ra tu re i n t d eg r e e c e l s i u s 11 / /Cp = 2 6 . 5 4 + 4 2. 4 54∗1 0 ˆ − 3 ∗ ( t + 2 7 3 . 1 5 ) − 1 4 . 2 9 8 3 4 5 6 7
12 13 14 15
∗ 10 ˆ−6 ∗ ( t + 2 7 3 . 1 5 ) ˆ 2 / /Cp = 3 7 . 0 6 8 + 3 4 . 6 4 3 ∗ 10 ˆ −3∗ t − 1 4 . 2 9 8 ∗ 10 ˆ−6 ∗ t ˆ 2 ( k J / kmol C ) / /Cp = 8 . 8 5 4 + 8 .2 74∗ 1 0 ˆ −3∗ t −3.415∗10ˆ −6∗ t ˆ 2 ( K ca l /kmolC) // For d e g r ee F e hr e ne i t s c a le , r e p l a c e t by ( t 1 − 3 2 ) / 1 8 , we g e t / /Cp = 8 . 7 0 5 8 + 4 . 6 6 4 2 ∗ 10 ˆ−3 ∗ t 1 − 1 . 0 5 4 0 ∗ 10 ˆ−6 ∗ t 1 ˆ 2 ( Btu / l b m ol F )
Scilab code Exa 11.11 Enthalpy change when chlorine gas is heated
1 clc ()
130
Figure 11.1: Enthalpy change when chlorine gas is heated
131
2 T = [ 27 3 373 4 73 573 673 77 3 873 973 10 73 11 73 1273]; 3 Cp = [ 33 .6 3 5. 1 36 3 6.6 37 37 .3 37 .5 37 .6 37 .7 37 .8 37.9]; 4 plot2d ( T , C p , r e c t = [ 2 7 3 , 3 3 , 1 2 7 3 , 3 8 ] ) 5 xtitle ( ” T v s C p ” , ” T e m p e r a t u r e K ” , ” H ea t C a p a ci t y , k J /kmolK” ) 6 / / a t c o n s t a n t P r e ss u r e , H = i n t e g r a t i o n ( Cp , T , T1 , T2 ) 7 / / Area u nd er t he c ur ve fo rm t he g ra ph , i s o b t ai n ed
a s A re a = 3 6 82 8 8 H = 3 68 28 ; / / k J / k m o l 9 disp ( ” k J / k m o l ” ,H , ” E n t ha l py c h an g e = ” )
Scilab code Exa 11.12 Molal heat capacity
1 clc () 2 / /Cp = 2 6 . 5 8 6 + 7 . 5 8 2 ∗ 10 ˆ−3 ∗ T − 1 . 1 2 ∗ 10 ˆ−6 ∗
Tˆ 2 3 T 1 = 50 0; //K 4 T 2 = 1 00 0; //K 5 x = i n t e g r a t e ( ’ 2 6 . 5 8 6 + 7 . 5 8 2 ∗ 10 ˆ−3 ∗ T − 1 . 1 2 ∗ 10 ˆ−6 ∗ Tˆ2 ’ , ’ T ’ , T 1 , T 2 ) ; 6 Cpm = 1 * x / ( T2 - T 1 ) ; 7 disp ( ”kJ/kmolK” , C p m , ” ( a ) Mean m ol al h ea t c a p a c i t y = ” ) 8 V = 500; //mˆ3; 9 N = V / 22 .41 43; 10 Q = N * Cpm * ( T2 - T 1 ) ; 11 disp ( ” k J / h ” ,Q , ” ( b ) Heat t o be s u p p l i e d = ” ) 12 T 3 = 1 50 0; //K 13 Q 1 = Cpm * ( T3 - T1 ); 14 y = i n t e g r a t e ( ’ 2 6 . 5 8 6 + 7 . 5 8 2 ∗ 10 ˆ−3 ∗ T − 1 . 1 2 ∗ 10 ˆ−6 ∗ Tˆ2 ’ , ’ T ’ , T 1 , T 3 ) ; 15 Q2 = y ; 16 disp ( Q 2 )
132
17 Per ror = ( Q2 - Q1 ) * 100 / Q2 ; 18 disp ( ”%” , P e r r o r , ” ( c ) P e r c e nt e r r o r = ” )
Scilab code Exa 11.13 Enthalpy change of a gas
1 2 3 4 5 6 7 8
clc () T 1 = 1 50 0; //K T r = 27 3; //K T 2 = 40 0; //K C p m1 = 5 0; / / k J / k m o l C p m2 = 3 5; / / k J / m o l H = Cpm1 * ( T1 - Tr ) - Cpm2 * ( T2 - Tr ) ; disp ( ” k J / k m o l ” ,H , ” E n t ha l py c h an g e = ” )
Scilab code Exa 11.14 Combustion of solid waste
1 2 3 4 5 6 7 8 9 10 11 12 13 14
clc ()
//CO, 2 6 . 5 8 6 + 7 .5 82∗1 0 ˆ −3 ∗T − 1 . 1 2∗1 0 ˆ −6∗Tˆ 2 / / CO2 , 2 6 . 5 4 0 + 4 2 . 45 4∗1 0 ˆ −3 ∗T − 1 4 . 2 9 8∗1 0 ˆ −6 ∗Tˆ 2 / / O2 , 2 5 . 7 4 + 1 2. 9 87∗ 1 0 ˆ − 3∗T − 3 . 8 6 4∗1 0 ˆ −6 ∗Tˆ 2 / /N2 , 2 7 . 0 3 + 5 . 81 5∗1 0 ˆ −3∗T − 0 . 2 8 9∗1 0 ˆ −6∗Tˆ 2 / / Cpmix = s um ma ti o n ( y i ∗ C pi ) = s um ma ti on ( y i ∗ a i + y i ∗ b i ∗T + y i ∗ c i ∗T ˆ 2 )
x co 2 = 0 .0 9; x c o = 0 .0 2; x o 2 = 0 .0 7; x n 2 = 0 .8 2; T 1 = 60 0; //K T 2 = 37 5; //K s um ai = x co * 2 6. 58 6 + xc o2 * 2 6. 54 0 + xo2 * 2 5. 74 + xn2*27.03; s um bi = x co * 7 .5 82 *1 0^ - 3 + x co 2 * 2 .4 54 * 10 ^ - 3 + x o2 * 1 2 .9 8 7* 1 0 ^ - 3 + x n2 * 5 . 8 1 5* 1 0 ^ - 3 ;
133
15 s um u m ci c i = - ( x co c o * 1 .1 . 1 2* 2 * 10 1 0 ^ - 6 + x co c o 2 * 1 4. 4 . 2 98 9 8 * 10 1 0 ^ - 6 + x o2 o2 *3.864*10^-6+xn2*0.289*10^-6); 16 H = i n t e g r a t e ( ’ sum ai+sumb ai+sumb i ∗T+sumci ∗Tˆ2 ’ , ’ T ’ , T 1 , T 2 ) ; 17 disp ( ” k J / k m o l ” , H , ” E n t ha h a l py p y c h an an g e = ” )
Scilab code Exa 11.15 Heat capacity calculation for Na2SO4 10H2O
1 2 3 4 5 6 7 8 9
clc () g−atomK H na na = 2 6. 6 . 04 0 4 ; / / J / g− H s = 2 2. 2 . 6; 6 ; / / J / g− g−atomK H o = 1 6. 6 . 8; 8 ; / / J / g− g−atomK g−atomK H h = 9 . 6; 6; / / J / g− H na n a 2s 2 s o4 o 4 10 1 0 h2 h 2 o = 2 * Hn H n a + H s + 1 4* 4* Ho H o + 2 0 * Hh Hh ; H e xp x p = 5 92 9 2 .2 . 2 ; //J/molK D e vi v i a ti t i o n = ( H ex e x p - H n a2 a 2 s o4 o 4 1 0h 0 h 2 o ) * 10 1 0 0/ 0 / H e xp xp ; ”%” ,Dev iation , ” D e v i a ti t i o n i n h ea ea t c a p a c i t y = ” ) disp ( ”%”
Scilab code Exa 11.16 Heat of vaporization calculation
1 2 3 4 5 6 7 8 9 10 11
clc () P 1 = 7 5 ; //kPa T 1 = 5 7 3; 3; / /K T va v a p = 3 65 6 5 ; / /K T b a si s i s = 2 73 7 3 ; / /K
/ / S in i n ce c e , t he h e b o i l i n g p o in i n t o f w a te t e r a t 7 5 kP kP a i s 3 7 5 K , t he h e v aap p ou o u r a t 5 73 7 3 K i s s u p er e r h ea e a t ed ed ; H 1 = 3 07 0 7 5; 5; / / k J / k g C li l i q = 4 .2 . 2 ; //kJ/kgK C va v a p = 1 .9 . 9 7; 7; / / k J / k g / K m = 1;//kg / / l e t a s s um u m e c o n v e r ti t i n g l i q . w at a t er e r i n t o s u p er e r h ea e a t ed ed s tr t r e am a m o c cu c u r s i n 3 s t e ps ps , 134
12 / / s t e p 1 − wa w a te te r i s
h ea e a te t e d f r o m 2 73 73K t o 3 6 5 K a t c o n st s t a n t p r e ss s s u r e , e n th t h a lp l p y c ha h a ng ng e i s t h hee h ea ea t r e q u i r e d t o c ha h a ng n g e t h e t em e m p er e r a tu t u re re ,
*Cliq * ( Tvap - Tbasis ) ; 13 H c 1 = m *C 14 / / s t e p 2 − t he h e l i q i s v ap a p u r iz i z ed e d a t c on o n s t a n t p r e s s u re re
a n d c o n s t a n t t em e m p er e r a tu t u re r e , e n t ha h a l p y c ha h a ng ng e i s e q u a l t o t he h e h ea e a t o f v a p o u r i s a t i o n , s ay a y H c2 15 / / s t e p 3 − th t h e s a t ur u r a t ed e d v a po p o u r a t 3 6 5K i s h ea e a te te d t o 5 7 3K 3K a t c o n st s t a n t p r e ss s s u r e , t he h e e n th t h a lp l p y c ha h a ng ng e i s t he h e h ea e a t r e q u i r e d t o r a i s e t he h e t em e m pe p e ra r a tu t u re re 16 17 18 19
H c3 c3 = m * Cv C v ap a p * ( T1 T1 - T va v a p ); );
/ / t o t a l e n t ha h a l p y = 3 07 0 7 5 = H c1 c1 + Hc H c 2 + Hc H c3 , t h e r e f o r e Hc2 = H1 - Hc1 - Hc3 ; Hee a t o f v a p o u ri ri s a t i on = ”) disp ( ” k J / k g ” , H c 2 , ” H
Scilab code Exa 11.17 Heat requirement
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
clc () T 1 = 2 5 0; 0; / /K T = 2 73 7 3 .1 . 1 5; 5 ; / /K T 2 = 4 0 0; 0; / /K C i ce c e = 2 .0 . 0 37 3 7 ; //kJ/kgK T 3 = 3 73 7 3 .1 . 1 5; 5 ; / /K C l iq i q = 7 5 .7 . 7 26 2 6 ; //kJ/kmolK
/ /C / Cp = 3 0 . 4 7 5 + 9 .6 . 6 5 2∗ 2∗ 1 0 ˆ − 3 ∗ T + 1 . 1 8 9∗ 9 ∗ 1 0 ˆ − 6 ∗ Tˆ 2 H f u si s i o n = 6 01 0 1 2; 2; / / k J / k m o l H v ap a p = 4 06 0 6 08 08 ; / / k J / k m o l / / 1 − H e a t f o r r a i s i n g t he h e t em e m pe p e ra r a tu t u re r e o f i c e , H1 H 1 = C i c e * ( T - T 1 ); );
/ / 2 − L a t e n t h e a t o f f u s i o n o f i ce c e , Hf H f = H fu f u si s i on o n / 1 8. 8 . 01 0 1 6; 6; / / k J / / 3 − S e n s i b l e h ea e a t o f r a i s i n g t h e t em e m pe p e ra r a tu t u re re o f w a t e r , H2
16 H 2 = C l i q * ( T 3 - T )/ ) / 1 8. 8 . 01 01 6 ; 17 / / 4 − La L a te t e nt n t h ea e a t o f v a p o r i z a t i o n o f w a t e r , Hv
135
18 H v = H v ap ap / 1 8. 8 . 01 0 1 6; 6; 19 / / 5 − S e n s i b l e h ea ea t o f r a i s i n g
t h e t em e m pe p e ra r a tu t u re re o f
w a t e r v ap ap ou o u , H3 e ( ’ 3 0 . 4 7 5 + 9 .6 20 H 3 = ( i n t e g r a t e( . 6 5 2∗ 2∗ 1 0 ˆ − 3 ∗ T + 1 . 1 8 9∗ 9 ∗ 1 0 ˆ − 6 ∗ Tˆ2 ’ , ’ T ’ , T 3 , T 2 ) ) / 1 8 . 0 1 6 ; 21 Q = H 1 + H 2 + H 3 + H f + H v ; 22 disp ( ” k J ” , Q , ” He Hea t r e q u i r e d = ” )
Scilab code Exa 11.18 Equilibrium temperature of mixture
1 2 3 4 5 6 7 8
9 10 11 12
13 14 15
clc ()
/ /C /Cp = 0 . 1 6 + 4 . 7 8 ∗ (10ˆ − 3 ) ∗ T ( o r g a n i c l i q u i d ) / /C /Cp = 0 . 7 9 3 5 + 1 . 2 9 8 ∗ (10ˆ − 4 ) ∗ T ( CCL4 ) T b = 3 49 4 9 .9 . 9 ; / /K H v = 1 9 5; 5; / / k J / k g C p = 0 .4 . 4 69 6 9 3; 3 ; //kJ/kgK / / L e t T be b e t he h e f i n a l t em e m pe p e ra r a tu t u re re / / i n t e g r a t i o n ( T − 6 5 0 ) ( 0 . 1 6 + 4 . 7 8 ∗ (10ˆ − 3 ) ∗ T) dt = i n t e g r a t i o n ( 29 2 9 5 − T) T ) ( 0 . 7 9 3 5 + 1 . 2 9 8 ∗ (10ˆ − 4 ) ∗ T) dt / / t he h e a bo b o ve v e e q ua u a t i on o n y i e l d s , 2 .4 . 4 54 5 4 9∗ 9 ∗ ( 1 0 ˆ − ˆ − 3 ) ∗T ˆ 2 + 0 . 9 5 3 5 ∗ T − 1 3 53 5 3 . 51 5 1 = 0 , f r o m t h i s we g e t T = 5 73 7 3 .3 . 3 ; / /K / / s i n c e t h i s t em e m pe p e ra r a tu t u re re i s a b o v e b o i l i n g p o i n t o f CCl4 , / / h ea e a t b a la l a n ce c e i s , i n t e g r a t i o n ( T − 6 5 0) 0) ( 0 . 1 6 + 4 . 7 8 95 − 3 4 9 . 9 ) ∗ (10ˆ − 3 ) ∗ T ) d t = i n t e g r a t i o n ( 2 95 ( 0 . 79 7 9 3 5 + 1 . 29 2 9 8 ∗ (10ˆ − 4 ) ∗ T ) d t + Hv + i n t e g r a t i o n ( 3 4 9 . 9 − T ) ∗ 0 . 4 6 9 3 ∗ dT / / s o l v i n g a bo b o ve v e e q ua u a t i on o n , we g et et , T 1 = 5 40 4 0 .1 . 1 ; / /K disp ( ”K” , T 1 , ” e q u i l i b r i u m t em e m p er e r at a t u re r e o f t he h e m ix i x tu t u re re = ”)
136
Scilab code Exa 11.19 Estimation of mean heat of vaporisation
1 2 3 4 5 6 7 8 9 10
clc () T 1 = 36 3; //K T 2 = 37 3; //K P 1s = 7 0. 11 ; //kPa P 2s = 1 01 .3 ; //kPa R = 8 .3 14 ; //kJ/kmolK
// l n ( P 2s / P1s ) = Hv / R ∗ (1/T1 − 1/T2) ; H v = ( log ( P 2s / P 1s ) * R ) /( 1/ T 1 - 1 / T2 ) ; Hv1 = Hv / (18) ; disp ( ” k J / k g ” , H v 1 , ”Mean h ea t o f v a p o r i z a t i o n = ” )
Scilab code Exa 11.20 Heat of vaporization of methyl chloride
1 2 3 4 5 6
clc () T = 273.15 - 30; //K
/ / l n P s = 1 4 . 2 4 1 0 − 2 1 3 7 . 72 / (T− 2 6 . 7 2 ) / / d l n P s / dT = Hv / RT2 Hv = 2 137. 72 * R * T ^2 / ( T - 26.72 ) ^2; disp ( ” k J / k m o l ” , H v , ” Heat o f v a p o r i z a t i o n = ” )
Scilab code Exa 11.21 Watson equation
1 2 3 4 5
clc () H v 1 = 2 25 6; / / k J / k g T 1 = 37 3; //K T 2 = 47 3; //K T c = 64 7; //K
137
6 7 8 9 10
Tr1 = T1 / Tc ; Tr2 = T2 / Tc ;
/ / Hv2 / Hv1 = ( (1 − T r 2 ) / ( 1− T r1 ) ) ˆ 0 . 3 8 H v 2 = H v1 * ( ( (1 - T r 2 ) /( 1 - T r 1 ) ) ^ 0 . 38 ) ; disp ( ” k J / k g ” , H v 2 , ” L at en t h ea t o f v a p o r i za t i o n o f w at er a t 4 73K = ” )
Scilab code Exa 11.22 Kistyakowsky equation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
clc ()
/ / C p = a + b ∗T T 1 = 2 93 .1 5; //K C p 1 = 1 31 . 05 ; //J/molK T 2 = 32 3; //K C p 2 = 1 38 . 04 ; //J/molK / / a + 2 9 3∗ b = 1 3 1 . 0 5 / / a + 3 2 3∗ b = 1 3 8 . 0 4 b = ( Cp1 - Cp2 )/( T1 - T2 ); a = Cp1 - b * T1 ;
/ /Cp = 6 2 . 7 8 1 + 0 . 2 3 3∗T / / Hvb / Tb = 3 6 . 6 3 + 8 . 3 1 l nTb T b = 2 73 .1 5 + 8 0. 1; //K
Hvb = ( 36 .6 3 + 8 .3 1*log ( Tb ) ) * Tb ; m = 100; / / k g H = m *(10^ 3) * (i n t e g r a t e( ’ 6 2 . 7 8 1 + 0 . 2 3 3∗T ’ , ’ T ’ , T 1 , T b ) ) / 7 8 .0 4 8 + m * ( 1 0 ^ 3) * H v b / 7 8 . 0 48 ; 17 disp ( ” J ” ,H , ” Heat r e q u i r e d = ” )
Scilab code Exa 11.23 Quality of steam
1 clc () 2 P = 10; //kPa 3 T 1 = 3 23 .1 5; //K
138
4 5 6 7 8 9 10 11 12 13 14 15 16 17
T 2 = 3 73 .1 5; //K T = 3 58 .1 5; //K H 1 = 2 59 2. 6; / / k J / k g H 2 = 2 68 7. 5; / / k J / k g
//H by i n t e r p o l a t i o n , H = H1 + (( H2 - H1 )/( T2 - T1 )) *( T - T1 ); H l = 6 97 .0 61 ; / / k J / k g H g = 2 76 2; / / k J / k g
/ / H = x ∗ Hl + ( 1 − x ) ∗ Hg x = ( H - Hg )/( Hl - Hg ) ; P m o is = x * 1 00 ; Pst eam = ( 1 - x ) *100; disp ( ”%” , P m o i s , ” P e r ce n ta g e o f m o is t ur e = ” ) disp ( ”%” , P s t e a m , ” P e r ce n ta g e o f d ry s a t u r a t ed s tea m = ”)
Scilab code Exa 11.24 Heat calculation
1 2 3 4 5 6 7 8 9 10 11 12 13 14
clc () P = 35 00 ; //kPa T = 6 73 .1 5; //K S V = 0 .0 84 53 ; //mˆ3/kg V c on d en s ed = 1 /2 ; m = 100; / / k g V = m * SV / ( m /2) ;
//m∗ ( Vl+Vg) ∗ V c o nd e n se d = m ∗ SV // But Vl i s n e g l i g i b l e , V g = m * SV / ( m * V co nde ns ed );
/ / u s i n g s te am t a b l e T 1 = 4 59 .5 ; //K P 1 = 1 15 8; //kPa // i n t e r n a l e ne rg y o f s u p er h ea t ed s team from stea m table 15 I = 2 92 8. 4; / / k J / k g 16 U1 = m * I ;
139
17 18 19 20 21
U l = 79 0; / / k J / k g U g = 2 58 5. 9; / / k J / k g U 2 = m * V c on d en s ed * U l + m * (1 - V c o n de n se d ) * Ug ; Q = U2 - U 1 ; disp ( ” k J ” ,Q , ” The amount o f h e a t r em ov ed f r o mt h e system = ”)
Scilab code Exa 11.25 Enthalpy balance for evaporation process
1 2 3 4 5
clc () m = 10 00 ; // kg /h ( b a s i s mass o f 10% NaOH s o l u t i o n P f ee d = 1 0; //% P p ro = 5 0; / / ( P e r c e n t a g e NaOH i n p r o d u c t )
6 7 8 9
P = Pfeed * m / Ppro ;
)
/ / T ak in g NaOH b a l a nc e , P b e i n g t h e w e i g ht o f t h e product //W be t he w ei gh t o f w at er e v a p o ri z e d W = m - P;
/ / s t e p 1 − c o o l i n g 1 00 0 kg /h o f 10% s o l u t i o n fro m 3 05K t o 2 98K 10 T 1 = 30 5; //K 11 T 2 = 29 8; //K 12 C li q = 3 .6 7; //kJ/kgK 13 14 15 16 17 18 19 20 21 22 23 24
H 1 = m *Cliq * ( T2 - T1 );
/ / s t e p 2 − s e p a r a t i o n i n t o p ur e c om po ne nt s H s o l ut i o n = - 4 2. 85 ; / / k J / m o l H 2 = - Pf ee d * m * 10 00 * H so lu ti on / ( 40 *1 00 ) ;
/ / s t e p 3 − W kg w at er i s c o n ve r te d t o w at er v ap ou r H v ap = 2 4 42 .5 ; / / k J / k g H3 = W * Hvap ;
/ / s t e p 4 − w at er v ap ou r a t 2 98K i s h ea te d t o 3 7 3 .1 5K C v ap = 1 .8 84 ; //kJ/kgK T 3 = 3 73 .1 5; //K H4 = W * Cvap * ( T3 - T2 ) ;
/ / s t e p 5 − fo r m a t i o n o f 2 00 k g o f 50% NaOH s o l u t i o n a t 140
298K 25 26 27 28 29 30 31 32
H s o lu = - 25 .8 9; / / k J / m o l H5 = P fe ed * m * 10 00 * H so lu / ( 40 *1 00 ) ;
/ / s t e p 6 − He at in g t he s o l u t i o n fro m 2 98K t o 38 0K C so lu = 3 .3 4; / / k J / k g T 4 = 38 0; //K H 6 = P * Csolu * ( T4 - T2 ); Hto tal = H1 + H2 + H3 + H4 + H5 + H6 ; disp ( ” k J ” , H t o t a l , ” The e n t h a l p y c h a ng e a c co m pa n yi n g t he c om pl et e p r o c es s = ” )
Scilab code Exa 11.26 Mean heat capacity of ethanol water solution
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
clc () N w a te r = 0 .8 ; / / m o l e s N e t ha n ol = 0 .2 ; / / m o l e s T = 323; //K C wa t er = 4 . 18 * 10 ^ 3; //J/kgK C e t h an o l = 2 . 5 8* 1 0 ^ 3; //J/kgK H m i x in g 1 = - 75 8; / / J/ mol ( a t 2 98K ) H m i x in g 2 = - 41 5; / / J/ mol ( a t 3 23K ) T 1 = 29 8; //K T 2 = 52 3; //K
/ / s t e p 1 − 0 .8 mol o f w a t e r i s c o o l ed fro m 32 3 K to 298K H1 = Nwa ter * 18 * Cwater * ( T1 - T ) / 1000;
/ / s t e p 2 − 0 . 2 mol e t h an o l c o o l ed fro m 3 23K t o 2 98K H2 = Net han ol * 46 * Ce tha no l * ( T1 - T ) /100 0;
/ / s t e p 3 − 0 . 8 mol w a te r and 0 . 2 mol e t h a n o l a r e m ix ed t o g e t h e r ,
16 H 3 = H mi xi ng 1 ; 17 // s t ep 4 s o l u t i o n
i s h ea te d t o 3 23K, H4 = Cpm ∗ (T −
T1 ) 18 / / H m i xi n g2 = H1 + H2 + H3 + H4 19 H4 = Hmi xin g2 - H1 - H2 - H3 ;
141
20 Cpm = H4 / ( T - T 1 ) ; 21 disp ( ”J/molK” , C p m , ” The mean h ea t c a p a c i t y o f a 20 p e r c e n t s o l u t i o n = ”)
Scilab code Exa 11.27 Evaporation of NaOH solution
1 clc () 2 F = 10 00 ; / / k g / h 3 H 1 = 1 16 .3 ; // kJ / kg ( e nt ha l p y o f f e ed 4 5 6 7 8 9
s o l u t i o n − 10%
NaOH , 3 0 5 K ) H 2 = 5 60 .5 7; // kJ / kg ( e nt ha l p y o f t h i c k l i q u o r − 50% NaOH , 3 8 0 K ) H s t ea m = 2 67 6; // kJ / kg ( 1 atm , 3 7 3 .1 5K ) // by d oi ng m a t e r i a l b a la n ce s , P = 200; / / k g / h m va p = 8 00 ; / / k g / h / / E n th al py b a l a n c e g i v e s , F∗H1 + Q = mvap∗ Hsteam + P ∗H2
10 Q = ( m va p * Hs te am + P * H2 ) -F * H1 ; 11 disp ( ” k J / h ” ,Q , ” Heat t o be s u p p l i e d = ” )
Scilab code Exa 11.28 Heat transfer to air
1 2 3 4
clc () U 2 = 0 . 35 * 10 ^ 3; / / k J U 1 = 0 . 25 * 10 ^ 3; / / k J
/ / s i n c e t he t a n k i s r i g i d t he volume d oe s n ot c h a ng e d u r i ng h e a ti n g , Under c o n s t a n t volume , t h e c h a n g e i n t he i n t e r n a l e ne rg y i s e qu al t o t h e h ea t s u p p l i e d
5 Q = U2 - U 1 ; 6 disp ( ” k J ” ,Q , ” Heat t r a n s f e r r e d t o t h e a i r = ” )
142
Scilab code Exa 11.29 change in internal energy
1 clc () 2 W = - 2. 25 *7 45 . 7; / /W ( work d on e on t h e s ys te m and 1
h p = 7 4 5 . 7W) 3 Q = - 34 00 ; // kJ /h ( Heat t r a n s f e r r e d t o t he s u rr o un d i ng ) 4 U = Q * 10 00 /3 60 0 - W ; 5 disp ( ” J / s ” ,U , ” R is e i n t h e I n t e r n a l e n e r g y o f t h e system = ”)
Scilab code Exa 11.30 Heat liberation in oxidation of iron fillings
1 2 3 4 5 6 7 8 9 10 11 12 13 14
clc ()
//2Fe + 3/2O2 = Fe2O3 H l i b e ra t e d = 8 3 1. 0 8 ; / / k J Q = - H l ib e ra t ed * 1 0 00 ; disp ( ” J ” ,Q , ” Q = ” )
/ / P( V) = ( n ) RT //W = P(V) = (n )RT n = -1.5; R = 8 .3 14 ; T = 298; //K W = (n) * R * T; disp ( ” J ” ,W , ”W = ” ) U = Q - W; disp ( ” J ” ,U , ” U = ” )
Scilab code Exa 11.31 Saturated steam and saturated water
143
1 2 3 4 5 6 7 8 9 10 11 12
clc () V ga s = 0 .0 9; //mˆ3 V li q = 0 .0 1; //mˆ3 S Vl iq = 1 . 06 1* 10 ^ - 3 ; //mˆ3/kg S V v ap = 0 .8 8 57 ; //mˆ3/kg mv ap = Vg as / SV va p ; ml iq = Vl iq / SV li q ; U l = 5 04 .5 ; / / k J / k g U g = 2 52 9. 5; / / k J / k g U 1 = Ul * mliq + Ug * mvap ; S Vt ot al = ( V ga s + V li q ) /( m va p + m li q );
// u s i ng s team t a b l e , t h e s e v a lu e o f s p e c i f i c volume c o rr e sp o n d s t o p r e s s u r e o f 1 4 8. 6 b ar and i n t e r n a l e n er g y o f 2 4 6 4 . 6 kJ / kg 13 U = 24 64 ; / / k J / k g 14 15 16 17
U to ta l = U * ( mv ap + m li q) ;
/ / U t o t a l − U 1 = Q − W, b u t W = o , h e n c e , Q = Utotal - U1 ; disp ( ” k J ” ,Q , ” Hea t t o b e a dded = ” )
Scilab code Exa 11.32 constant volume and constant pressure process
1 2 3 4 5 6 7 8 9 10 11 12 13
clc () m = 10; / / k g ( a i r ) N = m / 29; //kmol P 1 = 10 0; //kPa T 1 = 30 0; //K R = 8 .3 14 ; V1 = N * R * T1 / P1 ; V 2 = V1 ; T 2 = 60 0; //K C v = 2 0. 78 5; //kJ/kmolK C p = 2 9. 09 9; //kJ/kmolK U = N * Cv * ( T2 - T1 ) ; Q = U;
144
14 W = Q - U ; 15 H = U + N * R * ( T2 - T 1 ) ; 16 disp ( ” k J ” ,U , ” ( a ) C hange i n i n t e r n a l e ne rg y a t c o n s t a n t vo lu me = ” ) 17 disp ( ” k J ” ,Q , ” h ea t s u p p l i e d a t c o ns t an t volume = ” ) 18 disp ( ” k J ” ,W , ” Work d on e a t c o n s t a n t v ol um e = ” ) 19 disp ( ” k J ” ,H , ” Change i n E nt ha lp y a t c o n s t a n t v ol um e = ”) 20 P 2 = P1 ; 21 H2 = N * Cp * ( T2 - T 1 ) ; 22 Q 2 = H2 ; 23 U2 = H2 - N * R * ( T2 - T1 ) ; 24 W 2 = Q2 - U 2; 25 disp ( ” k J ” , U 2 , ” ( b ) Change i n i n t e r n a l e ne rg y a t c o n st a n t P r e ss u r e = ” ) 26 disp ( ” k J ” , Q 2 , ” h ea t s u p p l i e d a t c o ns t an t P r es s u r e = ” ) 27 disp ( ” k J ” , W 2 , ”Work d on e a t c o n s t a n t P r e s s u r e = ” ) 28 disp ( ” k J ” , H 2 , ” Change i n E nt ha lp y a t c o n s t a n t Pressure = ”)
Scilab code Exa 11.33 series of operations
1 2 3 4 5 6 7 8
clc () C p = 2 9. 3; / / k J / k m o l R = 8 .3 14 ; C v = Cp - R ; T 1 = 30 0; //K P 1 = 1; / / b a r P 2 = 2; / / b a r
/ / s t e p 1 − Volume r e ma i ns c o ns t a nt , t h e r e f o r e t h e work d on e i s z e ro and h ea t s u p p l i e d i s Cv , A ls o T2/T1 = P2/P1
9 T2 = P2 * T1 / P1 ; 10 Q1 = Cv * ( T2 - T 1 ) ;
145
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
W 1 = 0; disp ( ” k J ” , W 1 , ” Work d on e a t c o n s t a n t v ol um e = ” ) disp ( ” k J ” , Q 1 , ” Heat s u p p l i e d a t c o n st a n t volume = ” )
/ / s t e p 2 − Pr o c es s i s a b d i a b a t i c Q 2 = 0; r = 1.4; T3 = T2 * (( P1 / P2 )^((r - 1)/r)); W2 = Cv * ( T2 - T 3 ) ; disp ( T 3 ) disp ( ” k J ” , W 2 , ”Work d one i n a d i a b a t i c p r o c e s s = ” ) disp ( ” k J ” , Q 2 , ” Heat s u p p l i e d i n a d i a b a t i c p r o c e s s = ” )
// ste p3 − p ro ce ss i s i s o b a r i c Q3 = Cp * ( T1 - T3 ); U3 = Cv * ( T1 - T3 ); W 3 = Q3 - U 3; disp ( ” k J ” , W 3 , ”Work done a t c o n st a n t p r e s s u r e = ” ) disp ( ” k J ” , Q 3 , ” Heat s u p p l i e d a t c o ns t an t p r e s s u r e = ” )
Scilab code Exa 11.34 change in internal energy and enthalpy and heat
supplied and work done 1 2 3 4 5 6 7 8 9 10 11 12
clc () P 1 = 5; / / b a r P 2 = 4; / / b a r T 1 = 60 0; //K V = 0.1; //mˆ3 T 2 = 40 0; //K T = 298; //K C p = 30; //J/molK
/ / s t e p 1 − i s o t h e rm a l c o n d i t i o n U 1 = 0; H 1 = 0; P = 1;//bar
146
13 14 15 16
17 18 19 20 21 22 23 24 25 26
27 28 29
R = 8 .3 14 ; W 1 = R *T1 *log ( P 1 / P 2 ) ; Q 1 = W1 ; disp ( ” k J / k m o l ” , U 1 , ” ( a ) C hange i n t he i n t e r n a l e ne rg y i n i s o t h er m a l c o n d i t i o n = ” ) disp ( ” k J / k m o l ” , H 1 , ” Change i n t he e n th a lp y e ne rg y i n i s o t h e r m a l c o n d i t i o n = ”) disp ( ” k J / k m o l ” , W 1 , ”Work done i n i s o t h e r m a l c o n d i t i o n = ”) disp ( ” k J / k m o l ” , Q 1 , ” Heat s u p p l i e d i n i s o t h e r m a l c o n d i t i o n = ”) N = P * (1 .01 325 * 10^5) * V / ( R * T ) ; C v = Cp - R ; U 2 = Cv * ( T2 - T ) * N; H 2 = Cp * ( T2 - T ) * N; W 2 = 0; Q 2 = U2 + W2 ; disp ( ” k J / k m o l ” , U 2 , ” ( b ) Change i n t he i n t e r n a l e ne rg y a t c o n st a n t vo lume c o n d i t i o n = ” ) disp ( ” k J / k m o l ” , H 2 , ” Change i n t he e n th a lp y e ne rg y a t c o n st a n t volume c o n d i t i o n = ” ) disp ( ” k J / k m o l ” , W 2 , ” Work d on e a t c o n s t a n t v ol um e c o n d i t i o n = ”) disp ( ” k J / k m o l ” , Q 2 , ” Heat s u p p l i e d a t c o n st a n t volume c o n d i t i o n = ”)
Scilab code Exa 11.35 Heat removed in condenser
1 2 3 4 5 6 7
clc () m = 1;//kg u 2 = 0. 5; //m/s u 1 = 60; //m/s H = - 30 00 ; / / k J / k g
//KE = (u ˆ2 ) /2 KE = (( u2 ^ 2) - ( u1 ^2 )) / 20 00 ;
147
8 9 10 11 12 13 14 15
g = 9. 81 ; //m/sˆ2 Z 1 = 7. 5; //m Z 2 = 2; //m
//PE = g ∗ ( Z ) PE = g * ( Z2 - Z1 ) /1000; W = 800; / / k J / k g Q = H + PE + KE + W ; disp ( ” k J / k g ” ,Q , ” Heat removed from t he f l u i d = ” )
Scilab code Exa 11.36 Throttling process
1 2 3 4 5 6 7 8 9 10
clc () P E = 0; W = 0; Q = 0;
/ / (H) + ( u ˆ 2 ) / 2 = 0 / / a c co r d i n g t o t he r e a l t i o n u1 ∗ v 1 = u 2 ∗ v2 // ( u ˆ2 ) /2 i s n e g l i g i b l e , c h a n g e i n e nt ha lp y i s 0 T 1 = 62 3; //K P 1 = 6 00 0; //kPa H 1 = 3 04 5. 8; // kJ / kg ( E nt ha lp y o f t he s team u s i ng stea m t a b l e ) 11 P 2 = 1 00 0; //kPa 12 T 2 = 57 0; //K ( v a lu e o f t em pe ra t ur e c o r r es p o n d i ng t o t he e nt ha l p y and p r e s s u r e u s in g t he stea m t a b l e ) 13 disp ( ”K” , T 2 , ” T em pe ra tu re o f s u p e r he a t e d s tea m = ” )
Scilab code Exa 11.37 water pumping and energy balances
1 clc () 2 g = 9. 81 ; //m/sˆ2 3 z = 55;
148
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
PE = g * z ; K E = 0; T 2 = 28 8; //K f = 1 .5 *1 0^ - 2 ; //mˆ3/min D = 10 00 ; //kg/mˆ3 m = f * D; Q su pp = 5 00 ; //kJ/min Q lo st = 4 00 ; //kJ/min Qnet = ( Qsupp - Qlost ) * D / m ; W = 2 *7 45 .7 ; //W Ws = -W * 0.6 / ( m/60) ; H = Qnet - Ws - PE - KE ; C p = 4 20 0; T 1 = H / Cp ; T = T1 + T2 ; disp ( ”K” ,T , ” The t em p er a tu re o f e x i t w at er = ” )
Scilab code Exa 11.38 Energy balance on rotary drier
1 clc () 2 m = 10 00 ; / / kg / h ( d r i e d p r o d u ct ) 3 / / S be t he amount o f d r y s o l i d i n t he p ro du ct
stream 4 5 6 7 8 9 10 11 12 13 14 15
P m o i st u re 1 = 4 ; //% P m oi s tu r e2 = 0 .2 ; //% S = m *(1 - P /1000) ; X 1 = P m oi s tu r e1 / ( 1 00 - P m oi s tu r e1 ) ; X 2 = P m oi s tu r e2 / ( 1 00 - P m oi s tu r e2 ) ;
/ / l e t G be t h e w e i gh t o f dr y a i r i n t h e a i r s tr e a m Y 1 = 0 .0 1; // kg w at er / kg d ry s o l i d
C p = 1 .5 07 ; C w = 4. 2; T 1 = 29 8; //K T = 273; //K T 2 = 33 3; //K
149
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
T g1 T g2 Hs1 Hs2
= = = =
3 63 ; //K 3 05 ; //K ( Cp + X1 * Cw ) * ( T1 - T ) ; ( Cp + X2 * Cw ) * ( T2 - T ) ;
/ / H g = C s ( T g − T o ) + Y∗L // Cs = 1 . 0 0 5 + 1 . 8 84 ∗Y L = 2 50 2. 3; // kJ / kg d ry a i r Hg1 = (1.005 + 1.884 * Y1 )*( Tg1 - T ) + Y1 * L ; Q = - 40 00 0; / / k J / h
// C a l c u l a t i n g f o r T2 , Hg2 = 3 2 . 1 6 + 2 5 62 . 5 9∗Y // c ha ng e i n e n th a lp y = Q //H1 = S ∗ Hs1 + G ∗ H G 1 = 3 7 8 1 4 . 2 2 + 1 1 7 . 1 7 G / /H2 = 1 0 0 7 2 8 . 1 4 + G∗ ( 3 2 . 1 6 + 2 5 6 1 . 5 9 ∗Y) // c ha ng e i n e n th a lp y = Q / / 6 2 9 1 3 . 9 2 + G ∗( − 8 5. 01 + 2 5 6 1 . 5 9∗Y ) + 4 0 0 0 0 = 0 / / 1 0 2 9 1 3 . 9 2 + G ∗( − 8 5. 01 + 2 5 6 1 . 5 9∗Y ) = 0 (1) / / m o i s t u r e b a l a nc e , S∗X 1 + G∗Y 1 = S ∗X 2 + G∗Y2 //G∗ (Y− 0 . 0 1 ) = 3 9 . 6 2 (2) // s o l v i n g s i mu l ta n eo u s l y ( 1 ) and ( 2 ) , G dr y = 3 44 3; / / k g / h
34 35 36 G = Gdry *(1 + Y1 ); 37 disp ( ” k g / h ” ,G , ” A ir r e qu i re m en t = ” )
Scilab code Exa 11.39 Energy balance on the fractionator
1 clc () 2 m = 10 00 ; // kg /h ( f e e d s o l u t i o n ) 3 //F − mass o f f e e d d i s t i l l e d , W − mass o f t h e bo tto m
p r o d uc t , D − mass o f t h e d i s t i l l a t e , x f , xd and xw − we i gh t f r a c t i o n o f a ct on e i n f e ed , d i s t i l l a t e a nd r e s i d u e r e s p . 4 / / t o t a l b a la n ce , F = D + W 5 / / A c et o ne b a l a n ce , F∗ x f = D∗ x d + w∗xw 150
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
F = 10 00 ; x f = 0 .1 0; x d = 0. 9; x w = 0 .0 1;
// s u b s t i t u t i n g i n a bo ve e q ua t io n s , D W R L
= = = =
F * ( xf - xw ) / ( xd - xw ) ; F - D; 8; R * D;
/ / m a t e r i a l b a l a n c e a ro un d t h e c o nd e ns e r , G v ap ou r r e a c h in g t he c o nd e ns e r
G = L + D; T d = 33 2; //K T 2 = 30 0; //K T w = 37 0; //K T f = 34 0; //K L a ce t on e 1 = 6 20 ; / / k J / k g L w a te r 1 = 2 50 0; / / k J / k g Ld = xd * La ce to ne 1 + (1 - xd ) * Lwat er1 ; C p ac e to n e = 2 .2 ; //kJ/kgK C p w at e r = 4 .2 ; //kJ/kgK C p = xd * C pa ce to ne + (1 - xd ) * Cp wa te r ; H = Ld + Cp * ( Td - T 2 ) ; Cpc = 4 .2 ; / / k J / k g T c = 30; //K ( c ha ng e i n t em pe ra t ur e a l l o w a b l e f o r
c o o l i n g w a te r ) 30 m = G * H / ( Cpc * Tc ) ; 31 disp ( ” k g / h ” ,m , ” ( a ) The c i r c u l a t i o n r a t e o f c o o l i n g water = ”) 32 Qc = G * H ; 33 H d = 0; 34 H w = ( xw * C pa ce to ne + (1 - xw ) * Cp wa te r ) *( T w - T2 ) ; 35 H f = ( xf * C pa ce to ne + (1 - xf ) * Cp wa te r ) *( T f - T2 ) ; 36 Qb = D * Hd + W * Hw + Qc - F * H f ; 37 H c o n d e ns a t i on = 2 7 30 ; / / k J / k g 38 m s t e am = Q b / H c o n de n s a ti o n ; 39 disp ( ” k g / h ” , m s t e a m , ” ( b ) Amount o f s te am s u p p l i e d = ” )
151
Chapter 12 Energy Balance Thermochemistry
Scilab code Exa 12.1 Heat liberated calculation
1 clc () 2 N = 100; / / mo l g a s m i x tu r e b ur ne d 3 / /CO( g ) + 1 / 2 O2 ( g ) = CO2 −
− 28 2. 91 kJ/mol 4 / /H2 ( g ) + 1 / 2 O2 ( g ) = H2O − − 24 1. 83 kJ/mol 5 H r1 = - 2 82 .9 1; / / k J / m o l 6 H r2 = - 2 41 .8 3; / / k J / m o l 7 8 9 10 11
H r1 = H r2 =
N c o1 = 2 0; N h 21 = 3 0; N n 21 = 5 0; H t o ta l = N co 1 * H r1 + N h2 1 * Hr 2 ; disp ( ” k J ” , - H t o t a l , ” t he amount o f h ea t l i b e r a t e d on
t he c om pl et e c om bu st io n o f 10 0 mol o f t he g as mixture = ”) 12 13 14 15
N co re ac = N co 1 * 0 .9 ; N h2 re ac = N h2 1 * 0 .8 ; H t ot a l1 = N c or e ac * H r 1 + N h 2r ea c * H r2 ; disp ( ” k J ” ,-Ht otal1 , ” t he amount o f h ea t l i b e r a t e d
152
if
o n ly 90% o f CO and 80% o f H2 r e a c t o f 1 00 mol o f t he g as m ix tu re = ” )
Scilab code Exa 12.2 Heat of formation of methane
1 2 3 4 5 6
clc ()
//C( s ) + 2H2 ( g ) = CH4 ( g ) Hf = ? H c = - 39 3. 51 ; / / k J / m o l H h 2 = - 28 5. 84 ; / / k J / m o l Hc h4 = - 8 90 .4 ; / / k J / m o l / / h ea t o f r e a c t i o n ca n be c a l c u l a t e d fro m t he h ea t o f c o mb us ti on d at a u s in g f o l l o w i n g e qu at io n , t he h e a t o f r e a c t i o n i s t h e sum o f t h e h e a t o f c o m b us t i o n o f a l l t he r e a c t a n t s i n t he d e s i r e d r e a c t i o n minus t he sum o f t he h ea t o f c om bu st io n o f a l l t h e p ro d u ct s o f t he d e s i r e d r e a c t i o n . Here t he r e a c t a n t s a r e o ne mo le o f Carbon and two m ol es h yd ro gen , and t he p ro du ct i s on e mole o f methane , t h e r e h ea t o f r e a c t i o n i s
7 Hf = 1 * Hc + 2 * Hh2 - 1 * Hch4 ; 8 disp ( ” k J ” , H f , ” Heat o f f o rm a ti o n o f methane = ” )
Scilab code Exa 12.3 Net heating value of coal
1 2 3 4 5 6 7 8 9
clc () m = 1 ; // kg o f c o a l b urn ed x c = 0. 7; x h2 = 0 .0 55 ; x n2 = 0 .0 15 ; x s = 0 .0 3; x o = 0 .1 3; x as h = 0 .0 7; H va p = 2 37 0; / / k J / k g
153
10 11 12 13 14 15 16
C = 2 90 00 ; / / k J / k g Nh2 = xh2 * m / 2.016; N wa te r = N h2 ; // ( amount o f w at er f orm ed ) m wa te r = N wa te r * 1 8. 01 6; H r eq = m wa te r * H va p ; Hnet = C - Hreq ; disp ( ” k J / k g ” , H n e t , ” Net h e a t i n g v al ue o f c o a l = ” )
Scilab code Exa 12.4 Heat of reaction for esterification of ethyl alcohol
1 clc () 2 //C2H5OH( l ) + CH3COOH( l ) = C2H5COOCH3( l ) + H2O( l ) H
= ? 3 4 5 6
H c 2 h 5o h = - 1 36 6 .9 1 ; / / k J / m o l H c h 3 co o h = - 8 71 . 69 ; / / k J / m o l H c 2 h 5 c oo c h 3 = - 2 27 4 .4 8 ;/ / k J / m o l
// t o c a l c u l a t e h ea t o f r e a c t i o n fro m t he h ea t o f c om b us ti on d at a , 7 / / H r e a c = H r e a c − Hprod 8 H re ac = H c2 h5 oh + H ch 3c oo h - H c2 h5 co oc h3 ; 9 disp ( ” k J ” , H r e a c , ” Heat o f r e a c t i o n f o r t h e
e s t e r i f i c a t i o n o f e t h y l a l c o h o l w i th a c e t i c a c i d = ”)
Scilab code Exa 12.5 Vapour phase hydration of ethylene to ethanol
1 clc () 2 //C2H4( g ) + H2O( g ) = C2H5OH( g ) 3 / / 2CO2 ( g ) + 3 H2O ( l ) = C2H5OH ( l ) + 3 O2 ( g )
1 3 6 6 . 9 1 kJ
(A)
4 H c2 h4 = - 14 10 .9 9; / / k J / m o l 5 H v ap = 4 4. 04 ; / / k J / m o l 6 H c 2h 5 oh = 4 2. 3 7; / / k J / m o l
154
H =
7 / / C2H4 ( g ) + 3H2O ( l ) = C2H5OH ( l ) + 3 O2 ( g ) 8 9 10 11 12 13 14 15 16
−1 4 1 0. 9 9 k J ( B) //H2O( l ) = H2O( g ) 4 4 . 0 4 kJ (C) //C2H5OH( l ) = C2H5OH( g ) 4 2 . 3 7 kJ (D) / /A + B + D − C g i v e s t he r e qu i r e d r e a c t i o n H a = 1 36 6. 91 ; / / k J H b = - 14 10 .9 9; / / k J H c = 4 4. 04 ; / / k J H d = 4 2. 37 ; / / k J
H = H = H =
Hreac = Ha + Hb + Hd - Hc ; disp ( ” k J ” , H r e a c , ” The s ta nd ar d h ea t o f r e a c t i o n = ” )
Scilab code Exa 12.6 Standard heat of formation of acetylene
1 clc () 2 / / C2H5 ( g ) + 5 / 2 O2 ( g ) = 2 CO2 ( g ) + H2O ( l ) 3 4 5 6 7 8 9 10
H1 = −129 9.6 kJ (A) / /C ( s ) + O2 ( g ) = CO2 ( g ) H2 = −393 .51 kJ (B) / / H2 ( g ) + 1 / 2 O2 ( g ) = H2O ( l ) H3 = −285 .84 kJ (C) / / 2 C( s ) + H 2 ( g ) = C 2H2 ( g ) H = ? H 1 = - 12 99 .6 ; / / k J H 2 = - 39 3. 51 ; / / k J H 3 = - 28 5. 84 ; / / k J
Hreac = 2 * H2 + H3 - H1 ; disp ( ” k J ” , H r e a c , ” Heat o f f o r m a t i o n o f a c e t y l e n e = ” )
Scilab code Exa 12.7 Standard heat of roasting of iron pyrites
155
1 2 3 4 5 6
7 8 9 10 11 12 13 14 15 16 17
clc () m = 100; // kg o f p y r i t e s x f e s2 i n = 0 .8 ; x g an g ue i n = 0 .2 ; x f e s 2o u t = 0 .0 5;
c ha rg ed
// l e t x be t he FeS2 i n t he f ee d , then , Fe2O3 = ( 8 0 − x ) ∗ 1 5 9 . 69 / ( 1 1 9 .9 8∗ 2 ) and g a n g u e = 2 0 , t o t a l = 7 3 .2 4 + 0 . 3 3 4 5 , be FeS2 i s o nl y 5 % i n t he p r o d uc t , h e n c e x = 0 .0 5 * 7 3. 24 / (1 - 0 .0 5* 0. 33 45 ) ; m f e s 2r e ac t ed = m * x f es 2 in - x ;
//4FeS2 + 11O2 = 2Fe2O3 + 8SO2 H fe s2 = - 17 8. 02 ; / / k J / m o l H fe 2 o3 = - 82 2. 71 ; / / k J / m o l H s o2 = - 29 6. 9; / / k J / m o l Hreac = 2 * Hfe2o 3 + 8 * Hso2 - 4 * Hfes2 ; N = m f es 2 re a ct e d * 10 00 / 1 1 9. 98 ; H = Hreac * N / 4; H 1 = H /m ; // ( h ea t o f r e a c t i o n p er kg o f c o a l b ur n t ) disp ( ” k J ” , H 1 , ” Heat o f r e a c t i o n p e r 1 k g o f c o a l burned = ”)
Scilab code Exa 12.8 Standard heat of formation of liquid methanol
1 clc () 2 //CH3OH( l ) + 3 /2 O2 ( g ) = CO2 ( g ) + 2H2O( l )
−7 2 6 . 5 5 k J 3 4 5 6 7
H 1 = - 72 6. 55 ; / / k J H c o2 = - 39 3. 51 ; / / k J / m o l H h 2o = - 28 5. 84 ; / / k J / m o l Hch 3oh = Hco2 + 2 * Hh2o - H1 ; disp ( ” k J ” , H c h 3 o h , ” Heat o f f or ma t i on o f l i q u i d methanol = ”)
156
H =
Scilab code Exa 12.9 Gross heating value and Net heating value calcula-
tion 1 2 3 4 5 6 7 8 9 10 11 12 13 14
clc () N = 100; // mol f u e l g as N co = 21; N h 2 = 1 5. 6; N co 2 = 9 .0 ; N ch4 = 2; N c2 h4 = 0 .4 ; N n2 = 52; H c o = 2 82 . 99 ; // kJ / mol ( h ea t o f c om bu st io n ) H h 2 = 2 85 . 84 ; // kJ / mol ( h ea t o f c om bu st io n ) H c h4 = 8 90 .4 ; // kJ / mol ( h ea t o f c om bu st io n ) H c2 h4 = 1 41 0 .9 9; // kJ / mol ( h ea t o f c om bu st io n ) H v ap = 4 4. 04 ; / / k J / m o l H = Nco * Hco + Nh2 * Hh2 + Nch4 * Hch4 + Nc2h4 * Hc2h4 ;
//kJ 15 V = N * 2 2. 41 43 /1 00 0; 16 H1 = H / V ; //kJ/mˆ3 17 / / on c om bu st io n , 1 mol h yd ro ge n g i v e s 1 mol o f w at er
, 1 mol o f methane g i v e s 2 mol o f w at er and 1 mol o f e t h y le n e g i v e s 2 m o l e s o f w a t e r 18 19 20 21
Nwa ter = Nh2 + 2 * Nch4 + 2 * Nc2h4 ; H va p1 = H va p * N wa te r ; Hn et = H1 - H vap 1 ; disp ( ” k J ” , H n e t , ” Net h e a t i n g v al ue o f t he f u e l = ” )
Scilab code Exa 12.10 Standard heat of reaction calculation
1 clc () 2 / / C5H12 ( g ) + 8 O2 ( g ) = 5CO2 ( g ) + 6 H20 ( l )
157
3 4 5 6 7 8 9 10
H fc o2 = - 39 3. 51 ; / / k J H fh 2o = - 2 41 .8 26 ; / / k J H f c5 h 12 = - 14 6. 4; / / k J H v ap = 4 3 .9 67 ; / / k J / m o l H 1 = 6* H fh 2o + 5* H fc o2 - H fc 5h 12 ; H2 = 6 * ( -Hvap ); Hreac = H1 + H2 ; disp ( ” k J ” , H r e a c , ” S ta nd ar d h ea t o f r e a c t i o n = ” )
Scilab code Exa 12.11 Constant pressure heat of combustion
1 2 3 4 5 6 7 8
9 10 11 12 13 14
clc () m = 1 ; // kg o f o i l b ur n ed m c = 0. 9; / / k g m h2 = 0 .1 ; / / k g Mc = mc / 12; //kmol
/ /C ( s ) + O2 ( g ) = CO2 ( g ) Nh2 = mh2 / 2 .0 16 ; //kmol / / c h an ge i n t h e no . o f g a s e o us c om po ne nt s a cc om pa ny in g t h e c om bu s ti on o f 1 m ol e o f h yd ro ge n i n l i q u i d s t a t e i s −1/2 mol , t h e r e f o r e f o r Nh2 mol R = 8 .3 14 ; T = 298; //K x = Nh2 * R * T / ( -2) ; Q v = - 43 00 0; / / k J / k g Q p = Qv + x ; disp ( ” k J / k g ” , Q p , ” t he c o n s t a n t p r e s s u r e h ea t o f combustion = ”)
Scilab code Exa 12.12 Heat of reaction for ammonia synthesis
1 clc ()
158
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
// 1 − N2 , 2 − H2 , 3 − NH3
a1 a2 a3 b1 b2 b3 c1 c2 c3 H1 T1
= = = = = = = = = = =
2 7. 31 ; 2 9. 09 ; 2 5. 48 ; 5 . 23 35 * 10 ^ - 3 ; - 8. 37 4* 10 ^ - 4; 3 6. 89 * 1 0^ - 3; - 4. 18 68 * 1 0^ - 9; 2 . 01 39 * 10 ^ - 6 ; - 6. 30 5* 10 ^ - 6; - 46 19 1; // J 29 8; //K
// 1/ 2 N2 + 3 /2 H2 = NH3 H = −4 6 . 1 9 1 k J / / H t = H + a ∗T + b ∗Tˆ 2 / 2+ c ∗T ˆ 3 / 3 //at 298, a = a3 - a 1 / 2 - 3 * a 2 / 2; b = b3 - b 1 / 2 - 3 * b 2 / 2; c = c3 - c 1 / 2 - 3 * c 2 / 2; H = H1 -a * T1 - b * ( T1 ^2) / 2 - c * ( T1 ^3) / 3; T 2 = 70 0; //K H2 = H + a * T2 + b * ( T2 ^2) / 2 + c * ( T2 ^3) / 3; disp ( H ) ; disp ( ” k J ” , H 2 , ” Heat o f r e a c t i o n a t 70 0K = ” )
Scilab code Exa 12.13 Standard heat of reaction of methanol synthesis
1 2 3 4 5
clc ()
//CO( g ) + 2H2( g ) = CH3OH(g ) T 1 = 29 8; //K T 2 = 1 07 3; //K / / Cp ( CH3OH ) = 1 8 . 3 8 2 + 1 0 1 . 5 6 4 ∗ 10 ˆ−3 ∗ T − 2 8 . 6 8 3 ∗ 10 ˆ−6 ∗ Tˆ 2 6 / /Cp (CO) = 2 8 . 0 6 8 + 4 . 6 3 1 ∗ 10 ˆ−3 ∗ T − 2 . 5 7 7 3 ∗ 1 0 ˆ 4 ∗ Tˆ−2 7 / /Cp (H2 ) = 2 7 . 0 1 2 + 3 . 5 0 9 ∗ 10 ˆ−3 ∗ T + 6 . 9 00 6 ∗ 159
1 0 ˆ 4 ∗ Tˆ−2 8 // for reactants , 9 H1 = i n t e g r a t e ( ’ 2 8 . 0 6 8 + 4 . 6 3 1 ∗ 10 ˆ−3 ∗ T − 2 . 5 7 7 3 ∗ 1 0 ˆ 4 ∗ Tˆ−2 ’ , ’ T ’ , T 2 , T 1 ) + 2 * i n t e g r a t e ( ’ 2 7 . 0 1 2 + 3 . 5 0 9 ∗ 10 ˆ−3 ∗ T + 6 . 9 00 6 ∗ 1 0 ˆ 4 ∗ Tˆ−2 ’ , ’ T ’ , T2,T1); 10 / / f o r p r o d uc t , 11 H2 = i n t e g r a t e ( ’ 1 8 . 3 8 2 + 1 0 1 . 5 6 4 ∗ 10 ˆ−3 ∗ T − 2 8 . 6 8 3 ∗ 10 ˆ−6 ∗ Tˆ2 ’ , ’ T ’ , T 1 , T 2 ) ; 12 / / H 2 9 8 = H p r o d u c t s − H r e a c t a n t s ; 13 //CO + 2H2 = CH3OH Ha1 = −2 3 8 . 6 4 k J 14 H a 1 = - 23 8. 64 ; / / k J 15 / /CH3OH( l ) = CH3OH( g ) Hvap = 3 7 . 9 8 kJ 16 H v ap = 3 7. 98 ; / / k J 17 / /CO( g ) + 2H2 ( g ) = CH3OH ( g ) Ha2 = −2 0 0 . 6 6 k J 18 Ha2 = Ha1 + Hvap ; / / k J 19 H c o = - 11 0. 6; / / k J / m o l 20 H2 98 = Ha2 - ( Hco ) ; 21 H to ta l = H1 / 10 00 + H 29 8 + H2 / 1 00 0; 22 disp ( ” k J / m o l ” , H t o t a l , ” The h ea t o f r e a c t i o n a t 7 7 3K = ”)
Scilab code Exa 12.14 Combustion of CO
1 2 3 4 5 6
clc () N co = 1; / / m o l C O r e a c t e d
//CO + 1/2 O2 = CO2 No2 = Nco / 2; P e x ce s s = 1 00 ; Nos upp = No2 * ( 1 + Pex cess / 100 ) ;/ / o x y g e n
supplied 7 8 9 10
Nn2 = Nosupp * 79 / 21; N c o2 = N co ; N or em ai n = N os up p - N o2 ; T 1 = 29 8; //K
160
11 12 13 14 15 16 17 18
T 2 = 40 0; //K H r 1 = - 28 2. 99 ; / / k J T 3 = 60 0; //K S Hc o = 2 9. 1; //J/molK S Ho 2 = 2 9. 7; //J/molK S H n2 = 2 9. 10 ; //J/molK S H c o2 = 4 1 .4 5; //J/molK H 1 = ( Nosupp * SHo2 + Nn2 * SHn2 + Nco * SHco ) * ( T1 - T2 ); // e nt ha l p y o f c o o l i n g o f r e a c t a n t s from
29 8 t o 4 0 0 K 19 H2 = ( Nco2 * SHco2 + Nn2 * SHn2 + N ore ma in * SHo2 ) * ( T3 - T1 ) ; // e n th a lp y o f h e a t in g t he p r od u ct s
f ro m 2 9 8K t o 6 0 0K 20 H = H1 / 10 00 + Hr1 + H2 / 10 00 ; 21 disp ( ” k J ” ,H , ” Hea t c ha ng e a t 6 00K = ” )
Scilab code Exa 12.15 Heat added or removed calculation
1 clc () 2 //CO( g ) + H2O( g ) = CO2 ( g ) + H2 ( g )
−41.190 3 T 1 = 29 8; //K 4 P c on v = 7 5; //% 5 T 2 = 80 0; //K 6 7 8 9 10 11 12 13 14 15 16
H 2 98 = - 41 .1 90 ; / / k J H co = 3 0. 35 ; //J/molK H c o2 = 4 5. 64 ; //J/molK H wa te r = 3 6; //J/molK H h 2 = 2 9. 3; //J/molK N co = 1; / / m o l N h2o = 1; //mol N c o fi na l = N co * ( 1 - P co nv / 1 00 ) ; N w at e rf = N co f in a l ; N co 2f in al = N co - N co fi na l ; N h 2f in a l = N c o2 f in a l ;
161
H298 =
17 H2 = ( N co 2f in al * H co 2 + N h2 fi na l * Hh2 + N co fi na l * H co + N wa te rf * H wa te r ) * ( T2 - T1 ); 18 Hr1 = H 29 8 * ( Nco - N co fi na l ); 19 Hr2 = Hr1 * 1000 + H2 ; 20 m h2 = N h2 fi na l * 2 .0 16 * 1 0^ - 3;/ / k g 21 // t h e r f o r e f o r 1 00 0 k H2 , 22 H r = Hr2 * 1000 / ( mh2 * 1000) ;/ / k J 23 disp ( ” k J ” , H r , ” Amount o f h e at c ha ng e f o r 1 00 0 kg o f h y dr o ge n p r od u ce d = ” )
Scilab code Exa 12.16 CO2 O2 and N2 passed through a bed of C
1 clc () 2 //CO2( g ) + C( s ) = 2CO( g ) 3 4 5 6 7 8 9 10
11
12 13 14 15 16
H1298 = 1 70
kJ/mol //O2 ( g ) + 2C( s ) = 2CO( g ) H2298 = −2 2 1 . 2 k J / m o l T 2 = 1 29 8; //K T 1 = 29 8; //K H c = 0 .0 2; //kJ/molK H o = 0 .0 3; //kJ/molK H c o = 0 .0 3; //kJ/molK H co 2 = 0 .0 5; //kJ/molK // l e t t he f l u e g as c o nt a in x mol CO2 p e r mole o f o xy ge n , p r o d u ct c o n t a i n s 2 (1 +x ) mol CO . N i t r o g e n i n r e a c t a n t and p ro du ct r em ai n t he same / / e n t ha l p y o f c o o l i n g xmol CO2 , 1 mol O2 and 2 + xmol c ar bo n from 1 29 8 t o 29 8K i s g i ve n as , H1 = ( Hco2 ∗ x + H o ∗ 1 + H c ∗ ( 2 + x ) ) ∗ ( 2 9 8 − 1 2 9 8 ) / / H 1 = ( −70 x − 7 0 ) k J / / e n t ha l p y o f h e a t i n g t h e p ro du ct , H2 = 2 ∗ ( 1 + x ) ∗ Hco ∗ ( 1 2 9 8 − 2 9 8 ) / /H2 = 6 0 + 6 0 x kJ //Hr = 170x − 221.2 / / H t o t a l = 0 = H1 + H2 + Hr 162
17 x = (221.2 + 70 - 60) /(170 + 60 - 70) ; 18 disp ( ” m o l ” ,x , ” m ol es o f CO2 p r e s e nt p er mol o f o xyg en i n f e ed s tr ea m = ” )
Scilab code Exa 12.17 Partial oxidation of natural gas
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
clc () N = 100; // mol f l u e
g as
/ / C a rb on b a l a n c e , / / x i s t h e f e e d o f methane , w i s w a te r i n f l u e ga , y i s t he o xy g en s u p p li e d x c o2 = 0 .0 19 ; x c h 2o = 0 . 11 7; x o2 = 0 .0 38 ; x c h4 = 0 .8 26 ; xc = xco2 + xch2o + xch4 ; N c = xc * N ; N c h4 i = Nc ;
/ / H y d ro g en b a l a n c e , x h2 = x ch 2o + x ch 4 *2 ; w = 2 * (Nch4i) - xh2*N;
/ / o x yg en b a l a n c e
No 2s = ( xco 2 + x ch 2o /2 + xo 2) *N + w /2 ; y = No2s ; T 1 = 29 8; //K T 2 = 57 3; //K T 3 = 67 3; //K
/ / o x yg en c o o l e d f ro m 5 73K and m et ha ne f ro m 6 73 t o 298K 22 H o5 73 = 3 0. 5; //J/molK 23 H c h 46 7 3 = 4 5. 9; //J/molK 24 H1 = y * Ho573 * ( T1 - T2 ) + Nch4i * H ch46 73 * ( T1 T3); 25 //CH4 + O2 = CH2O + H2O Hr1 = −2 8 2 . 9 2 6 k J 26 //CH4 + 2O2 = CO2 + 2H2O Hr2 = −8 0 2 . 3 7 2 k J
163
H r 1 = - 28 2. 92 6; / / k J H r 2 = - 80 2. 37 2; / / k J H 2 = x ch 2o * N *H r1 + x co 2 *N * Hr 2 ; T 4 = 87 3; //K H o = 31 .9 H ch 4 = 5 1. 4; H co 2 = 4 6. 3; H ch 2o = 4 7. 1; H h2 o = 3 6. 3; H 3 = (( xco2 * Hco2 + xo2 * Ho + xch4 * Hch4 + Hch2o * x ch2 o )* N + w * Hh 2o ) *( T4 - T1 ); 37 H to ta l = H1 / 10 00 + H 2 + H3 / 1 00 0; 38 N ch 2o = x ch 2o * N ; 39 m c h 2o = N ch 2o * 3 0 .0 1 6/ 1 00 0 ;/ / k g 40 / / f o r 1 00 0 kg o f f o rm a ld e hy d e p ro du ce d , 41 H = Htotal * 1000 / mch2o ; 42 disp ( ” k J ” ,H , ” The a mount o f h e a t t o b e r em ov ed p e r 1 00 0 kg o f f o rm a ld e hy d e p ro du ce d = ” ) 27 28 29 30 31 32 33 34 35 36
Scilab code Exa 12.18 Maximum allowable conversion calculation
1 clc () 2 N n2 = 1; // kmol / s ( b a s i s − fe e d
o f N2
3 4 5 6 7 8 9 10 11 12
c o n i s t i n g o f 1 k mol
and 3 kmol o f H2 ) N h2 = 3; / / k m o l / s // l e t x be t h e f r a c t i o n c on ve rt ed T 1 = 70 0; //K H r1 = - 94 .2 ; / / k J / m o l // h ea t l i b e r a t e d = Hr1 ∗ x / / P ro du ct c o n s i s t s o f 2 x k mol NH3 , (1−x ) km ol N2 , and 3( 1 −x ) k mo l H y dr o ge n T 2 = 80 0; //K H n 2 = 0 .0 3; //kJ/molK H h 2 = 0 .0 2 89 ; //kJ/molK H n h3 = 0 . 04 92 ; //kJ/molK 164
13 //H2 = (1 −x ) ∗ 0 . 0 3 ∗ 1 0 ˆ 3 ∗ 1 0 0 + 3∗(1 −x )
∗ 0 . 0 2 8 9∗ 1 0 0 0 ∗ 1 00 + 2∗ x ∗ 0 . 0 4 9 2∗ 1 0 0 0 ∗ 1 0 0 14 / /H2 = 1 1 . 6 7 ∗ 1 0 0 0 − 1 . 8 3 ∗ 1 0 ˆ 3 ∗ x kJ 15 // r e a c t i o n i s a d i a b a ti c , h en ce , H1 = H2 16 // s o l v i n g t h i s we g et , 17 x = 0 .1 21 5; 18 C on vm ax = x * 1 00 ; 19 disp ( ”%” ,Convmax , ” The maximum c o n v e r s i o n n i t r o g e n s ho ul d be ” )
fo r
Scilab code Exa 12.19 Theoretical flame temperature calculation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
clc () N co = 1; //mol CO
// CO + 1/2 O2 = CO2 O 2r = 1; / / m o l N 2 r = 3 .7 6; / / m o l C Or = 1; / / m o l O 2p = 0 .5 ; //mol N 2 p = 3 .7 6; / / m o l C O2p = 1; //mol H co = 2 9. 23 ; //J/molK H o2 = 3 4. 83 ; //J/molK H n2 = 3 3. 03 ; //J/molK H c o2 = 5 3. 59 ; //J/molK H co m b1 = - 28 2. 99 ; / / k J / m o l T 1 = 29 8; //K T 2 = 37 3; //K H1 = ( O2r * Ho2 + N2r * Hn2 + COr * Hco ) * ( T1 - T2 ) ;
18 / / Fo r p r o d u ct a t temp T , H2 = ( O2p ∗ Ho2 + N2p ∗ Hn2
+ CO2p ∗ Hco2) ∗ (T − T1 ) 19 / / For a d i a b a t i c c o n di t i on , −(H1 + Hcomb1) = H2 20 T = -( H1 + Hcomb1 * 1000) / ( O2p * Ho2 + N2p * Hn2 + CO 2p * Hc o2 ) + T1 ;
165