Scilab Textbook Companion for Chemical Engineering Thermodynamics by Y. V. C. Rao1 Created by Abhinav S B.Tech Chemical Engineering SASTRA University College Teacher Dr. P. R. Naren Cross-Checked by Mukul Kulkarni December 20, 2013 1Funded by a grant from the National Mission on Education through ICT, http://spoken-tutorial.org/NMEICT-Intro. ThisTextbookCompanionandScilab codes written in it can be downloaded from the ”Textbook Companion Project” section at the website http://scilab.in Book Description Title: Chemical Engineering Thermodynamics Author: Y. V. C. Rao Publisher: Universities Press Edition: 1 Year: 1997 ISBN: 81-7371-048-1 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) Forexample, Exa3.51meanssolvedexample3.51ofthisbook. Sec2.3means a scilab code whose theory is explained in Section 2.3 of the book. 2 Contents ListofScilabCodes 4 1 Introduction 11 2 Review of basic concepts 15 3 PvT relations of fluids 18 4 First law of thermodynamics and its applications 48 5 Second law of thermodynamics and its applications 94 6 Thermodynamic potentials 125 7 Thermodynamic property relations 131 8 Thermodynamic properties of real gases 139 9 Multicomponent mixtures 160 10 Stability and phase transition in thermodynamic systems 199 11 Properties of solutions 207 12 Vapor liquid Equilibrium 235 13 Dilute solution laws 265 14 Chemical reaction equilibrium 272 3 List of Scilab Codes Exa 1.1 weight of payload . . . . . . . . . . . . . . . . . . . . 11 Exa 1.2 Force due to atmospheric air . . . . . . . . . . . . . . 12 Exa 1.3 pressure drop . . . . . . . . . . . . . . . . . . . . . . . 13 Exa 2.1 work done by gas . . . . . . . . . . . . . . . . . . . . . 15 Exa 2.2 work done by gas in piston cylinder assembly . . . . . 16 Exa 3.1 Specific volume and Specific internal energy . . . . . . 18 Exa 3.2 Quality of wet steam . . . . . . . . . . . . . . . . . . . 19 Exa 3.3 Volume ratio . . . . . . . . . . . . . . . . . . . . . . . 20 Exa 3.4 Mass ratio . . . . . . . . . . . . . . . . . . . . . . . . 21 Exa 3.5 Volume using ideal gas law . . . . . . . . . . . . . . . 22 Exa 3.6 Volume using van der Waals equation . . . . . . . . . 23 Exa 3.7 Volume of liquid using van der Waals equation . . . . 25 Exa 3.8 Volume using Cardans method . . . . . . . . . . . . . 26 Exa 3.9 Volume using Redlich Kwong equation of state by im- plementing Cardans method . . . . . . . . . . . . . . . 29 Exa 3.10 Acentric factor . . . . . . . . . . . . . . . . . . . . . . 32 Exa 3.11 Volume using two paramter and three parameter com- pressibility factor correlation . . . . . . . . . . . . . . 33 Exa 3.12 Pressure developed using two paramter compressibility factor correlation . . . . . . . . . . . . . . . . . . . . . 35 Exa 3.13 Pressuredevelopedusingthreeparamtercompressibility factor correlation . . . . . . . . . . . . . . . . . . . . . 37 Exa 3.14 Volume using generalized form of the Redlich Kwong equation of state . . . . . . . . . . . . . . . . . . . . . 39 Exa 3.15 Volume using Soave Redlich Kwong equation of state . 40 Exa 3.16 Volume using Peng Robinson equation of state . . . . 43 Exa 4.1 Net work done by the system . . . . . . . . . . . . . . 48 Exa 4.3 Final temperature and final pressure . . . . . . . . . . 49 4 Exa 4.4 Energy transferred and final state masses of liquid and vapour . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Exa 4.5 Work done and energy transferred . . . . . . . . . . . 53 Exa 4.6 Work done and final temperature . . . . . . . . . . . . 56 Exa 4.7 Amount of energy . . . . . . . . . . . . . . . . . . . . 58 Exa 4.8 Isobaric molar heat capacity. . . . . . . . . . . . . . . 59 Exa 4.9 Amount of energy transferred using isobaric molar heat capacity . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Exa 4.10 Final temperature . . . . . . . . . . . . . . . . . . . . 62 Exa 4.11 Final temperature Pressure and work done in adiabatic process . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Exa 4.12 Final temperature Pressure work done and heat inter- action in polytropic process . . . . . . . . . . . . . . . 65 Exa 4.13 Final temperature and amount of gas entering the tank 66 Exa 4.14 Final state and mass of steam that entered the tank . 68 Exa 4.15 Finaltemperatureandamountofgasescapingthecylin- der . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Exa 4.16 Percentage error . . . . . . . . . . . . . . . . . . . . . 72 Exa 4.17 Exit velocity . . . . . . . . . . . . . . . . . . . . . . . 74 Exa 4.18 Quality of wet steam . . . . . . . . . . . . . . . . . . . 75 Exa 4.20 Standard enthalpy change . . . . . . . . . . . . . . . . 77 Exa 4.22 Standard enthalpy change for the reaction from stan- dard enthalpies of formation . . . . . . . . . . . . . . 78 Exa 4.23 Standard enthalpy change for the reaction from stan- dard enthalpies of formation 2 . . . . . . . . . . . . . 79 Exa 4.24 Standard enthalpy change of formation of n butane gas 81 Exa 4.25 Standard enthalpy change . . . . . . . . . . . . . . . . 83 Exa 4.26 Standard enthalpy change at 400K . . . . . . . . . . . 84 Exa 4.28 Flame temperature . . . . . . . . . . . . . . . . . . . . 87 Exa 4.29 Amount of energy transferred as heat in the boiler . . 90 Exa 5.2 Inventor and the heat engine . . . . . . . . . . . . . . 94 Exa 5.3 Minimum power required . . . . . . . . . . . . . . . . 95 Exa 5.4 Minimum work and maximum possible COP . . . . . 97 Exa 5.5 Minimum power and maximum efficiency . . . . . . . 98 Exa 5.6 Inventor and the claim . . . . . . . . . . . . . . . . . . 100 Exa 5.7 Change in the entropy of the reactor contents . . . . . 102 Exa 5.8 Entropy change . . . . . . . . . . . . . . . . . . . . . . 103 Exa 5.9 Change in entropy of water . . . . . . . . . . . . . . . 104 5 Exa 5.10 Change in entropy of steel and water . . . . . . . . . . 105 Exa 5.11 Entropy change of the gas . . . . . . . . . . . . . . . . 107 Exa 5.12 Minimum work to be done for separation . . . . . . . 108 Exa 5.13 Change in the entropy of the mixture . . . . . . . . . 110 Exa 5.14 Power output of turbine . . . . . . . . . . . . . . . . . 111 Exa 5.15 Exit velocity of steam . . . . . . . . . . . . . . . . . . 113 Exa 5.16 Rate at which entropy is generated . . . . . . . . . . . 114 Exa 5.17 Device and its feasibility . . . . . . . . . . . . . . . . . 116 Exa 5.18 Isentropic efficiency . . . . . . . . . . . . . . . . . . . 118 Exa 5.19 Power consumed by the compressor . . . . . . . . . . . 120 Exa 5.20 Power consumed by the pump . . . . . . . . . . . . . 122 Exa 5.21 Isentropic efficiency of nozzle . . . . . . . . . . . . . . 123 Exa 6.6 Work done by steam . . . . . . . . . . . . . . . . . . . 125 Exa 6.8 Power output of the turbine . . . . . . . . . . . . . . . 126 Exa 6.10 Maximum work obtained from steam . . . . . . . . . . 127 Exa 6.12 Minimum power for compression . . . . . . . . . . . . 129 Exa 7.10 Pressure at which boiler is to be operated . . . . . . . 131 Exa 7.11 The skating problem . . . . . . . . . . . . . . . . . . . 132 Exa 7.12 Enthalpy of vaporization . . . . . . . . . . . . . . . . 134 Exa 7.13 Enthalpy of vaporization using Watsons correlation . . 135 Exa 7.14 Enthalpy of vaporization using Riedels correlation . . 136 Exa 8.2 Enthalpy and entropy departure . . . . . . . . . . . . 139 Exa 8.3 Enthalpy departure using Beattie Bridgman equation of state . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Exa 8.4 Entropy departure using Beattie Bridgman equation of state . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Exa 8.5 Enthalpy and entropy departure using the generalized Redlich Kwong equation of state . . . . . . . . . . . . 144 Exa 8.6 Enthalpy and entropy departure using the SRK equa- tion of state . . . . . . . . . . . . . . . . . . . . . . . . 146 Exa 8.7 Enthalpy and entropy departure using the Peng Robin- son equation of state . . . . . . . . . . . . . . . . . . . 147 Exa 8.8 EnthalpyandentropydepartureusingtheEdmistercharts 149 Exa 8.9 Enthalpy and entropy departure using the Lee Kesler data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Exa 8.10 Enthalpy and entropy departure using the generalized virial coefficient correlation . . . . . . . . . . . . . . . 152 6 Exa 8.11 VolumeEnthalpyandEntropydepartureusingthePeng Robinson equation of state . . . . . . . . . . . . . . . 153 Exa 9.1 Partial molar volume . . . . . . . . . . . . . . . . . . . 160 Exa 9.2 Volumes to be mixed . . . . . . . . . . . . . . . . . . . 161 Exa 9.3 Fugacity and fugacity coefficient . . . . . . . . . . . . 163 Exa 9.5 Fugacity and fugacity coefficient from the Lee Kesler data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Exa 9.6 Fugacity and fugacity coefficient using the virial coeffi- cient correlation . . . . . . . . . . . . . . . . . . . . . 166 Exa 9.7 Second virial coefficient . . . . . . . . . . . . . . . . . 167 Exa 9.8 van der Waals constants . . . . . . . . . . . . . . . . . 170 Exa 9.9 Molar volume of an equimolar mixture . . . . . . . . . 171 Exa 9.10 Molar volume of an equimolar mixture using pseudo- critical properties . . . . . . . . . . . . . . . . . . . . 174 Exa 9.11 Molar volume of mixture using Prausnitz Gunn rule . 176 Exa 9.12 Molar volume of mixture using van der Waals equation of state . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Exa 9.13 Molar volume of mixture using the generalized virial coefficient correlation . . . . . . . . . . . . . . . . . . 180 Exa 9.14 Enthalpy and entropy departure . . . . . . . . . . . . 182 Exa 9.15 Enthalpy and entropy departure using the generalized compressibility factor correlation . . . . . . . . . . . . 183 Exa 9.16 Enthalpy and entropy departure using the virial coeffi- cient correlation . . . . . . . . . . . . . . . . . . . . . 185 Exa 9.17 Fugacity and fugacity coefficient using van der Waals equation of state . . . . . . . . . . . . . . . . . . . . . 187 Exa 9.18 Fugacity and fugacity coefficient using the pseudocriti- cal constants method . . . . . . . . . . . . . . . . . . 189 Exa 9.19 Fugacity and fugacity coefficient using the virial coeffi- cient correlation . . . . . . . . . . . . . . . . . . . . . 190 Exa 9.20 Fugacity coefficients of the components in a mixture us- ing Redlich Kwong Equation of state . . . . . . . . . . 192 Exa 9.21 Fugacity coefficients of the components in a mixture us- ing the Virial Equation of state . . . . . . . . . . . . . 195 Exa 9.22 Fugacity of liquid n octane . . . . . . . . . . . . . . . 197 Exa 10.2 Number of degrees of freedom . . . . . . . . . . . . . . 199 Exa 10.3 Vapour Pressure of n octane using the Peng Robinson equation of state . . . . . . . . . . . . . . . . . . . . . 200 7 Exa 11.1 Pxy and Txy diagram for a Benzene Toluene system . 207 Exa 11.2 Composition of liquid . . . . . . . . . . . . . . . . . . 211 Exa 11.3 Bubble temperature . . . . . . . . . . . . . . . . . . . 214 Exa 11.4 Dew temperature . . . . . . . . . . . . . . . . . . . . . 216 Exa 11.5 Composition of the liquid and vapor streams leaving the flash unit . . . . . . . . . . . . . . . . . . . . . . . . . 217 Exa 11.7 Activity coefficients . . . . . . . . . . . . . . . . . . . 221 Exa 11.8 van Laar constants and Activity coefficients . . . . . . 222 Exa 11.9 Activity coefficients using the Wilsons parameters . . 224 Exa 11.10 Activity coefficients using the UNIQUAC equation . . 225 Exa 11.11 Activity coefficients using the UNIFAC method . . . . 229 Exa 12.1 Margules parameters . . . . . . . . . . . . . . . . . . . 235 Exa 12.2 van Laar parameters and txy data . . . . . . . . . . . 238 Exa 12.3 Pxy data using the Margules parameters . . . . . . . . 243 Exa 12.4 Pxy data using the van Laar model . . . . . . . . . . . 246 Exa 12.5 VLE data using the van Laar model . . . . . . . . . . 249 Exa 12.6 Dew pressure and liquid composition . . . . . . . . . . 252 Exa 12.7 Bubble temperature and vapour composition . . . . . 254 Exa 12.8 Thermodynamic consistency . . . . . . . . . . . . . . 256 Exa 12.9 Temperature composition diagram . . . . . . . . . . . 259 Exa 13.1 Depression in freezing point . . . . . . . . . . . . . . . 265 Exa 13.2 Elevation in Boiling Point . . . . . . . . . . . . . . . . 266 Exa 13.3 Osmotic pressure . . . . . . . . . . . . . . . . . . . . . 268 Exa 13.4 Ideal solubility . . . . . . . . . . . . . . . . . . . . . . 269 Exa 13.5 Solubility of gas . . . . . . . . . . . . . . . . . . . . . 270 Exa 14.1 StandardGibbsfreeenergychangeandequilibriumcon- stant . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 Exa 14.2 Standard Gibbs free energy of formation . . . . . . . . 273 Exa 14.3 Equilibrium constant . . . . . . . . . . . . . . . . . . . 275 Exa 14.4 Equilibrium constant with enthalpy of reaction varying with temperature . . . . . . . . . . . . . . . . . . . . . 276 Exa 14.5 Conversion and composition of the equilibrium mixture 279 Exa 14.6 Conversion and composition of the equilibrium mixture at 5 and 100 bar Pressures . . . . . . . . . . . . . . . 283 Exa 14.7 Conversion and composition of the equilibrium mixture with inerts . . . . . . . . . . . . . . . . . . . . . . . . 287 Exa 14.8 Degree of conversion for different feed conditions . . . 291 Exa 14.9 Degree of conversion . . . . . . . . . . . . . . . . . . . 296 8 Exa 14.10 Adiabatic reaction temperature . . . . . . . . . . . . . 300 Exa 14.11 Primary reactions . . . . . . . . . . . . . . . . . . . . 305 Exa 14.13 Equilibrium composition in a simultaneous reaction . . 307 Exa 14.14 Equilibrium concentration . . . . . . . . . . . . . . . . 311 Exa 14.15 Decomposition pressure . . . . . . . . . . . . . . . . . 313 9
Description: