SECOND EDITION PROCESS ENGINEERING and DESIGN USING VISUAL BASIC® ARUN DATTA © 2010 Taylor & Francis Group, LLC SECOND EDITION PROCESS ENGINEERING and DESIGN USING VISUAL BASIC® © 2010 Taylor & Francis Group, LLC SECOND EDITION PROCESS ENGINEERING and DESIGN USING VISUAL BASIC® ARUN DATTA Boca Raton London New York CRC Press is an imprint of the Taylor & Francis Group, an informa business © 2010 Taylor & Francis Group, LLC CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2014 by Taylor & Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, an Informa business No claim to original U.S. Government works Version Date: 20130715 International Standard Book Number-13: 978-1-4398-6281-0 (eBook - PDF) This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copyright. com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com To my late mother Smt. Narayani Datta © 2010 Taylor & Francis Group, LLC Contents Preface...............................................................................................................xxv Acknowledgments....................................................................................... xxvii Author..............................................................................................................xxix Chapter 1 Basic mathematics........................................................................ 1 Introduction......................................................................................................... 1 Physical constants............................................................................................... 1 SI prefixes........................................................................................................ 1 Mensuration......................................................................................................... 1 Triangles.......................................................................................................... 1 Rectangles........................................................................................................ 2 Parallelogram (opposite sides parallel)....................................................... 2 Rhombus (equilateral parallelogram)......................................................... 3 Trapezoid (four sides, two parallel)............................................................. 3 Quadrilateral (four sided)............................................................................. 4 Regular polygon of n sides............................................................................ 4 Circle................................................................................................................ 4 Ellipse............................................................................................................... 6 Parabola........................................................................................................... 6 Prism................................................................................................................ 6 Pyramid........................................................................................................... 7 Right circular cylinder................................................................................... 7 Sphere............................................................................................................... 7 Right circular cone......................................................................................... 8 Dished end...................................................................................................... 8 Irregular shape............................................................................................... 8 Trapezoidal rule.............................................................................................. 8 Simpson’s rule................................................................................................. 8 Irregular volume............................................................................................ 9 Algebra................................................................................................................. 9 Factoring.......................................................................................................... 9 Arithmetic progression................................................................................. 9 Geometric progression................................................................................ 10 © 2010 Taylor & Francis Group, LLC vii viii Contents Infinite series (in GP)................................................................................... 10 Best-fit straight line (least squares method)............................................. 10 Binomial equation........................................................................................ 11 Polynomial equation.................................................................................... 11 Maxima/minima.......................................................................................... 12 Cubic equation.............................................................................................. 13 General procedure.............................................................................. 13 Matrix............................................................................................................. 16 Addition and multiplication of matrices......................................... 16 Addition of matrices........................................................................... 16 Multiplication of matrices................................................................. 16 Matrix properties involving addition.............................................. 17 Matrix properties involving multiplication.................................... 17 Matrix properties involving addition and multiplication...................................................................................... 18 Transpose............................................................................................. 18 Symmetric matrix............................................................................... 18 Diagonal matrix.................................................................................. 19 Determinants................................................................................................ 19 Properties of determinants............................................................... 19 Cofactor................................................................................................ 21 Determinant and inverses................................................................. 21 Adjoint.................................................................................................. 21 Cramer’s rule................................................................................................. 22 Trigonometry..................................................................................................... 24 Functions of circular trigonometry........................................................... 24 Periodic functions........................................................................................ 25 Magic identity............................................................................................... 25 Addition formulas........................................................................................ 25 Double angle and half angle formulas...................................................... 26 Product and sum formulas......................................................................... 27 Relations between angles and sides of triangles..................................... 28 Law of sines................................................................................................... 28 Law of tangents............................................................................................ 28 Law of cosines............................................................................................... 28 Other relations.............................................................................................. 29 Inverse trigonometric functions................................................................. 29 Hyperbolic functions................................................................................... 30 Other hyperbolic functions......................................................................... 31 Inverse hyperbolic functions...................................................................... 31 Analytical geometry......................................................................................... 32 Straight line................................................................................................... 32 Straight line through two points...................................................... 32 © 2010 Taylor & Francis Group, LLC Contents ix Three points on one line.................................................................... 32 Circle.............................................................................................................. 33 Tangent................................................................................................. 33 Normal................................................................................................. 33 Four points on a circle........................................................................ 34 Circle through three points............................................................... 34 Conic section................................................................................................. 35 Focus..................................................................................................... 35 Eccentricity.......................................................................................... 35 Directrix............................................................................................... 35 Partial derivatives............................................................................... 35 Parabola................................................................................................ 36 Tangent line with a given slope, m................................................... 38 Ellipse................................................................................................... 38 Hyperbola............................................................................................ 40 Calculus.............................................................................................................. 42 Differential calculus..................................................................................... 42 Understanding the derivatives................................................................... 43 Standard derivatives.................................................................................... 44 Integral calculus........................................................................................... 45 Volume of horizontal dished end..................................................... 45 Volume of vertical dished end.......................................................... 47 Standard integrals........................................................................................ 48 Differential equations....................................................................................... 49 First-order differential equations............................................................... 49 Separation of variables....................................................................... 50 Second-order differential equations.......................................................... 50 Bessel function.................................................................................... 51 Partial differential equations.......................................................................... 52 Laplace transform........................................................................................ 59 Standard Laplace transforms..................................................................... 60 Fourier half-range expansions.................................................................... 61 Fourier half-range cosine series................................................................. 61 Fourier half-range sine series..................................................................... 61 Numerical analysis........................................................................................... 63 Solving linear equations (Newton’s method)........................................... 63 Newton’s method in two variables............................................................ 64 Numerical methods in linear algebra....................................................... 66 Gauss elimination............................................................................... 66 Cholesky method................................................................................ 67 Numerical integration................................................................................. 69 Trapezoidal rule.................................................................................. 69 Simpson’s rule..................................................................................... 70 © 2010 Taylor & Francis Group, LLC x Contents Double integration using Simpson’s rule................................................. 72 Numerical solution of first-order differential equations........................ 73 Euler’s method.................................................................................... 73 Improved Euler’s method........................................................................... 73 Runge–Kutta method......................................................................... 74 Second-order differential equations.......................................................... 76 Runge–Kutta–Nystrom method....................................................... 76 Partial differential equations...................................................................... 77 Heat conduction problem.................................................................. 78 Numerical solution....................................................................................... 79 Alternating direction implicit method............................................ 81 Unit conversions................................................................................................ 86 Programming.................................................................................................... 86 General notes for all programs.................................................................. 86 Vessel.............................................................................................................. 86 Program limitations..................................................................................... 94 Horizontal..................................................................................................... 95 Data entry...................................................................................................... 95 Inclined................................................................................................ 97 Vertical................................................................................................. 99 Conversion................................................................................................... 100 Program limitations................................................................................... 101 Procedure........................................................................................... 101 References........................................................................................................ 102 Chapter 2 Thermodynamics..................................................................... 103 Introduction..................................................................................................... 103 Heat, work, and energy.................................................................................. 103 Force............................................................................................................. 103 Kinetic and potential energy.................................................................... 104 First law of thermodynamics........................................................................ 104 Phase rule......................................................................................................... 105 Reversible process........................................................................................... 105 Heat content or enthalpy................................................................................ 106 Heat capacity at constant volume and constant pressure ........................ 106 Isothermal process.......................................................................................... 107 Adiabatic process............................................................................................ 107 Equation of state.............................................................................................. 108 Boyle’s law and Charles’s law................................................................... 108 Equation of state for real gas.....................................................................110 Comparison between PR and SRK EOSs.................................................110 Acentric factor..............................................................................................110 Vapor pressure of pure components....................................................... 112 Vapor pressure of water.............................................................................115 © 2010 Taylor & Francis Group, LLC Contents xi Vapor pressure calculation using EOSs...................................................116 Second law of thermodynamics.....................................................................118 Carnot’s cycle...............................................................................................119 Entropy........................................................................................................ 120 Sensible heat................................................................................................ 121 Thermodynamic properties........................................................................... 122 Isobaric specific heat of hydrocarbon ideal gases................................. 122 Isobaric specific heat of hydrocarbon real gases................................... 124 Isobaric specific heat of hydrocarbon gas mixtures.............................. 126 Joule–Thomson coefficient........................................................................ 128 Isobaric specific heat of ideal liquids....................................................... 131 Isobaric specific heat of real liquids........................................................ 131 Enthalpy of gases....................................................................................... 132 Enthalpy of gas mixtures.......................................................................... 134 Entropy of ideal gases................................................................................ 137 Entropy of real gases................................................................................. 138 Fugacity correction..................................................................................... 139 Entropy of hydrocarbon gas mixtures.................................................... 140 Viscosities of ideal liquids..........................................................................141 Viscosity of water....................................................................................... 142 Viscosity of ideal hydrocarbon vapors.................................................... 142 Liquid viscosity of defined mixtures at low pressure.......................... 142 Vapor viscosity of defined mixtures at low pressure........................... 143 Thermal conductivity of pure hydrocarbon liquids at low pressure....................................................................................................145 Thermal conductivity of pure hydrocarbon vapors at low pressure....................................................................................................147 Flash calculation.............................................................................................. 148 Vapor–liquid equilibrium......................................................................... 148 Programming.................................................................................................. 150 Calculation of JT effect due to drop in pressure.................................... 150 Nomenclature.................................................................................................. 151 Greek characters......................................................................................... 152 References........................................................................................................ 152 Chapter 3 Fluid mechanics....................................................................... 153 Introduction..................................................................................................... 153 Bernoulli’s theorem......................................................................................... 153 Velocity heads............................................................................................. 155 Flow measurements........................................................................................ 156 Orifice/Venturi meter................................................................................ 156 Thermal expansion factor (Fa)................................................................... 158 Coefficient of discharge (CD)..................................................................... 158 Orifice meter...................................................................................... 158 © 2010 Taylor & Francis Group, LLC xii Contents Venturi meter.............................................................................................. 159 Expansion factor (Y)................................................................................... 159 Orifices............................................................................................... 160 Nozzles and Venturi......................................................................... 160 Nonrecoverable pressure drop................................................................. 160 Orifices............................................................................................... 160 Venturi with 15° divergent angle................................................... 160 Venturi with 7° divergent angle..................................................... 160 Critical flow..................................................................................................161 Thickness of flow element..........................................................................162 Thickness of restriction orifice..................................................................162 Area meter: Rotameters............................................................................. 165 Flow through an open channel................................................................ 165 V notch......................................................................................................... 166 Rectangular notch...................................................................................... 166 Frictional pressure drop..................................................................................167 Darcy equation............................................................................................167 Flow in open channel................................................................................ 168 Estimation of friction factor...................................................................... 168 Friction factor: Laminar flow.......................................................... 168 Friction factor: Turbulent flow........................................................ 169 Two-K method................................................................................................. 169 K for reducer/expander............................................................................. 171 Reducer............................................................................................... 171 Expander............................................................................................ 171 Pipe entrance............................................................................................... 172 Pipe exit....................................................................................................... 172 Split flow...................................................................................................... 172 Split 1,3............................................................................................... 172 Split 1,2............................................................................................... 172 Split 3,1............................................................................................... 172 Split 1,2,3............................................................................................ 173 Split 1,3,2............................................................................................ 173 Split 3,1,2............................................................................................. 173 Hydraulics: General guidelines.....................................................................174 Roughness of pipe wall..............................................................................174 Control valve CV.........................................................................................174 Line sizing criteria for liquid lines.......................................................... 175 Line sizing for gravity flow lines..............................................................176 Downpipe sizing.........................................................................................176 Line sizing criteria for vapor lines........................................................... 177 Relief valve inlet line sizing...................................................................... 178 Relief valve outlet line sizing................................................................... 178 Line sizing criteria for two-phase flow................................................... 178 © 2010 Taylor & Francis Group, LLC Contents xiii Hydraulics: Compressible fluids................................................................... 179 Adiabatic flow in a pipe............................................................................ 179 Isothermal flow in a pipe.......................................................................... 181 Heat loss........................................................................................................... 182 Types of cross-country buried pipelines................................................ 183 Yellow jacket............................................................................................... 183 Coating thickness............................................................................. 183 Fusion-bonded epoxy coating.................................................................. 183 Rate of heat transfer................................................................................... 184 Film resistance (Rfilm)........................................................................ 184 Resistance of pipe (Rpipe)................................................................... 186 Resistance of coatings (Rcoating)......................................................... 186 Resistance of environment (Renv).................................................... 187 Viscosity of water....................................................................................... 189 Thermal conductivity of water................................................................. 190 Viscosity of air............................................................................................ 190 Thermal conductivity of air...................................................................... 190 Choked flow................................................................................................ 190 Limiting differential pressure.................................................................. 191 Limiting expansion factor (Y)................................................................... 191 Hydraulics: Two-phase flow.......................................................................... 193 Beggs and Brill correlations...................................................................... 195 Step 1: Estimation of flow regime................................................... 195 Step 2: Estimation of horizontal holdup........................................ 195 Step 3: Estimation of uphill holdup............................................... 196 Step 4: Estimation of downhill holdup.......................................... 197 Step 5: Estimation of friction factor................................................ 197 Step 6: Estimation of pressure drop............................................... 197 Mukherjee and Brill correlations............................................................. 198 Step 1: Estimation of flow regime................................................... 198 Step 2: Estimation of holdup........................................................... 199 Step 3: Estimation of hydrostatic head.......................................... 200 Step 4: Estimation of acceleration head......................................... 200 Step 5: Estimation of friction factor................................................ 201 Step 6: Estimation of frictional pressure drop.............................. 201 CO2 corrosion.............................................................................................. 203 CO2 corrosion mechanism........................................................................ 203 NACE requirements................................................................................... 204 Rate of corrosion......................................................................................... 204 NORSOK model................................................................................ 204 Corrosion 93 model.................................................................................... 210 Corrosion 95 model.....................................................................................211 Programming.................................................................................................. 213 Program for flow elements........................................................................ 213 © 2010 Taylor & Francis Group, LLC xiv Contents General overview.............................................................................. 213 Project details.....................................................................................214 Calculation form................................................................................214 Program limitations and notes................................................................. 215 Program for hydraulic calculations......................................................... 219 General overview.............................................................................. 219 Project details.................................................................................... 220 Program limitations and notes................................................................. 221 Form incompressible fluid............................................................... 221 Form compressible fluid.................................................................. 224 Pressure drop comparison.............................................................. 227 Form for two-phase flow................................................................. 227 Program for corrosion calculations......................................................... 230 General............................................................................................... 231 NORSOK model................................................................................ 232 Calculation of pH: NORSOK model.............................................. 232 Calculation of shear stress: NORSOK model............................... 233 Corrosion 93/95 model..................................................................... 233 Nomenclature.................................................................................................. 236 Greek characters......................................................................................... 239 References........................................................................................................ 240 Chapter 4 Heat transfer............................................................................. 243 Introduction..................................................................................................... 243 Conductive heat transfer................................................................................ 243 Heat conduction through a composite wall................................................ 244 Heat conduction through multiple cylindrical walls................................ 245 Heat conduction through the wall of a sphere........................................... 247 Multidimensional steady-state heat conduction......................................... 248 Rectangular coordinates........................................................................... 248 Cylindrical coordinates............................................................................. 248 Spherical coordinates................................................................................. 248 Conduction shape factors.......................................................................... 248 One-dimensional unsteady heat conduction.............................................. 250 Rectangular coordinates........................................................................... 250 Cylindrical coordinates............................................................................. 250 Spherical coordinates................................................................................. 251 Thermal conductivity of various materials/components......................... 256 Thermal conductivities of hydrocarbon liquids......................................... 256 Thermal conductivity of water (0–100°C)............................................... 264 Convective heat transfer................................................................................ 264 Free or natural convection........................................................................ 264 Free convection outside pipes and immersed body.................... 264 Free convection to air....................................................................... 265 © 2010 Taylor & Francis Group, LLC Contents xv Heat-transfer coefficient for immersed bodies...................................... 266 Gas quenching.................................................................................. 266 Forced convection....................................................................................... 269 Forced convection inside the tube........................................................... 269 Forced convection outside the tube......................................................... 276 Shell-side cross flow area................................................................. 276 Estimation of pressure drop.......................................................................... 280 Shell-side pressure drop............................................................................ 280 Estimation of friction factor............................................................ 281 Tube-side pressure drop............................................................................ 281 Log mean temperature difference................................................................ 283 Overall heat-transfer coefficient.................................................................... 284 Fouling resistance...................................................................................... 285 Extended surface........................................................................................ 285 Fin efficiency..................................................................................... 285 Longitudinal fins.............................................................................. 290 Impact of heat-transfer coefficient on fin efficiency.................... 291 Circular fins....................................................................................... 291 Rectangular fins................................................................................ 292 Film coefficient for finned tube................................................................ 292 Radiation heat transfer................................................................................... 293 Emissivity and absorptivity..................................................................... 293 Blackbody radiation................................................................................... 294 Emissivity of commonly used materials................................................ 294 Radiation shape factor............................................................................... 294 Parallel, equal rectangle................................................................... 294 Parallel, equal, coaxial disks........................................................... 296 Perpendicular rectangles with a common edge........................... 297 Finite, coaxial cylinders................................................................... 297 Parallel, coaxial disks....................................................................... 298 Radiation shield for large surface area................................................... 299 Double-pipe heat exchanger.......................................................................... 303 Heat exchanger nomenclature.................................................................. 307 Standard tube pattern................................................................................ 308 Tube dimensions........................................................................................ 308 Minimum unsupported tube span...........................................................310 Heat exchanger specification......................................................................... 315 Batch heating and cooling............................................................................. 315 Batch cooling, internal coil........................................................................318 Batch heating, internal coil........................................................................318 Batch cooling, counterflow external heat exchanger.............................318 Batch heating, counterflow external heat exchanger............................ 319 Batch cooling, 1−2 multipass external heat exchanger.......................... 319 Batch heating, 1–2 multipass external heat exchanger......................... 320 © 2010 Taylor & Francis Group, LLC xvi Contents Heat transfer in agitated vessels................................................................... 320 Viscosity correction.................................................................................... 321 Film coefficient inside the coil.................................................................. 322 Minimum metal temperature during depressuring operation................ 325 Programming.................................................................................................. 329 Program for double pipe heat exchanger................................................ 329 Program limitations and notes................................................................. 329 Checking Example 4.10 (double-pipe exchanger)........................ 329 Checking Example 4.11 (double-pipe finned exchanger)............ 329 Checking Example 4.13 (batch heating)........................................ 332 Checking Example 4.14 (batch cooling)......................................... 332 Nomenclature.................................................................................................. 334 Subscripts.................................................................................................... 335 Greek............................................................................................................ 335 References........................................................................................................ 336 Chapter 5 Distillation................................................................................ 337 Introduction..................................................................................................... 337 Relative volatility............................................................................................ 337 Vapor–liquid equilibrium.............................................................................. 338 Raoult’s law: Ideal solutions.......................................................................... 339 Material balance for two-component systems............................................ 340 Operating lines........................................................................................... 341 Reflux ratio.................................................................................................. 342 Minimum reflux ratio................................................................................ 342 Feed plate..................................................................................................... 343 McCabe–Thiele method................................................................................. 344 Smoker equations............................................................................................ 346 Approximate column sizing.......................................................................... 348 Sieve tray..................................................................................................... 348 Active hole area................................................................................. 350 Packed column.................................................................................. 350 Tray efficiency.................................................................................................. 352 Murphree tray efficiencies........................................................................ 353 Overall column efficiency......................................................................... 353 Prediction of efficiency.............................................................................. 355 Number of gas-phase transfer units........................................................ 356 Number of liquid-phase transfer units................................................... 356 Mixing factor............................................................................................... 356 Prediction of vapor diffusivity................................................................. 358 Prediction of liquid diffusivity................................................................ 358 Column hydraulics and design..................................................................... 362 Tray pressure drop.......................................................................................... 362 Sieve tray..................................................................................................... 362 © 2010 Taylor & Francis Group, LLC Contents xvii Dry pressure drop............................................................................ 363 Orifice coefficient (Co)....................................................................... 363 Weir liquid crest (how)........................................................................ 363 Residual head (hr)....................................................................................... 364 Valve tray..................................................................................................... 365 Dry pressure drop............................................................................ 365 Downcomer design.................................................................................... 367 Downcomer backup......................................................................... 367 Downcomer residence time............................................................. 368 Flow regimes............................................................................................... 369 Spray regime...................................................................................... 369 Froth regime...................................................................................... 369 Emulsion regime............................................................................... 369 Bubble regime................................................................................... 370 Pressure drop through packing............................................................... 370 Estimation of pressure drop........................................................... 370 Packing factor.................................................................................... 371 Height equivalent to theoretical plate.......................................................... 373 Entrainment......................................................................................................374 Weeping and dumping.................................................................................. 376 Programming.................................................................................................. 379 Program for Smoker equations................................................................ 379 References........................................................................................................ 381 Chapter 6 Separators.................................................................................. 383 Introduction..................................................................................................... 383 General principles of separation................................................................... 383 Droplet in a vertical vessel........................................................................ 383 Droplet in a horizontal vessel................................................................... 386 Gravity settling: Limiting conditions...................................................... 386 Newton’s law............................................................................................... 387 Stokes’ law................................................................................................... 387 Intermediate law........................................................................................ 387 Critical particle diameter.......................................................................... 387 Vertical vs. horizontal separators................................................................. 388 Advantages of the horizontal separator.................................................. 389 Disadvantages of the horizontal separator............................................. 389 Advantages of the vertical separator....................................................... 389 Disadvantages of the vertical separator.................................................. 389 Design of a gas–liquid separator.................................................................. 389 Critical settling velocity............................................................................ 389 Design constant, KD.................................................................................... 390 API 521 method.......................................................................................... 391 Design of liquid–liquid separators............................................................... 392 © 2010 Taylor & Francis Group, LLC xviii Contents Mist eliminator................................................................................................ 394 Wire mesh mist eliminator....................................................................... 394 Efficiency of the mist eliminator.................................................... 394 Inertial parameter (K)....................................................................... 395 Maximum gas velocity..................................................................... 395 Corrected pad-specific surface area (SO)...................................... 395 Impaction efficiency factor (E)........................................................ 396 Pressure drop of the mist eliminator...................................................... 397 Vane-type mist eliminator........................................................................ 397 Efficiency of vane pack.............................................................................. 398 Terminal centrifugal velocity................................................................... 398 Pressure drop through the vane pack..................................................... 398 General dimensions and setting of levels................................................... 399 The horizontal separator........................................................................... 399 Boot..................................................................................................... 402 Vertical separator....................................................................................... 403 Separator internals.......................................................................................... 404 Inlet nozzle.................................................................................................. 404 Vortex breaker............................................................................................. 405 Separator control............................................................................................. 406 Pressure and flow control......................................................................... 406 Light liquid-level control........................................................................... 407 Heavy phase liquid-level and slug control............................................. 407 High-performance separator......................................................................... 407 Salient features of GLCC........................................................................... 408 Design parameters.......................................................................................... 409 Flow rates.................................................................................................... 409 Slug length .................................................................................................. 409 Density..........................................................................................................411 Viscosity........................................................................................................411 Oil in gas droplet size................................................................................ 413 Oil in water droplet size............................................................................ 413 Water in oil droplet size............................................................................ 413 Inlet nozzle velocity................................................................................... 413 Gas outlet nozzle velocity..........................................................................414 Liquid outlet velocity..................................................................................414 Separator program...........................................................................................414 Program limitations/notes.........................................................................414 Horizontal separators................................................................................ 415 Three-phase flooded weir............................................................... 415 Three-phase nonflooded-weir separator....................................... 415 Three phase with boot separator.................................................... 415 Two-phase vapor–liquid separator................................................ 415 Two-phase liquid–liquid separator................................................ 415 © 2010 Taylor & Francis Group, LLC Contents xix Vertical separators.......................................................................................416 Two-phase vapor–liquid separator.................................................416 Two-phase liquid–liquid separator.................................................416 General overview of the separator.exe program....................................416 Design.......................................................................................................... 421 Slug volume................................................................................................. 421 Further checking and analysis................................................................. 422 Design.......................................................................................................... 423 Analysis....................................................................................................... 424 Nomenclature.................................................................................................. 425 Greek characters......................................................................................... 426 References........................................................................................................ 427 Chapter 7 Overpressure protection........................................................ 429 Introduction..................................................................................................... 429 Impact on plant design.............................................................................. 429 Impact on individual design.................................................................... 429 Definition......................................................................................................... 430 Accumulation.............................................................................................. 430 Atmospheric discharge............................................................................. 431 Built-up back pressure............................................................................... 431 General back pressure............................................................................... 431 Superimposed back pressure................................................................... 432 Balanced-bellows PRV............................................................................... 432 Blowdown.................................................................................................... 432 Closed discharge system........................................................................... 432 Cold differential test pressure.................................................................. 432 Conventional PRV...................................................................................... 432 Design capacity........................................................................................... 432 Design pressure.......................................................................................... 433 Maximum allowable accumulated pressure.......................................... 433 Maximum allowable working pressure.................................................. 433 Operating pressure.................................................................................... 433 Overpressure.............................................................................................. 433 Pilot-operated PRV..................................................................................... 434 Pressure relief valve................................................................................... 434 Pressure safety valve................................................................................. 434 Rated relieving capacity............................................................................ 434 Relief valve.................................................................................................. 434 Relieving conditions.................................................................................. 434 Rupture disk............................................................................................... 435 Safety relief valve....................................................................................... 435 Safety valve................................................................................................. 435 Set pressure................................................................................................. 435 © 2010 Taylor & Francis Group, LLC xx Contents Vapor depressuring system...................................................................... 436 Vent stack..................................................................................................... 436 Types of pressure relief valves...................................................................... 436 Conventional pressure relief valve (vapor service)............................... 436 Conventional pressure relief valve (liquid service)............................... 438 Balanced-bellows pressure relief valve................................................... 439 Pilot-operated pressure relief valve......................................................... 440 Rupture disk............................................................................................... 443 Selection of pressure relief valves................................................................ 445 Conventional pressure relief valve.......................................................... 445 Balanced-bellows pressure relief valve................................................... 445 Pilot-operated pressure relief valve......................................................... 446 Rupture disk............................................................................................... 446 PRV installation and line sizing................................................................... 447 Compressors and pumps.......................................................................... 447 Fired heaters................................................................................................ 448 Heat exchangers......................................................................................... 448 Piping........................................................................................................... 448 Pressure vessels.......................................................................................... 449 PRV isolation valves................................................................................... 449 Inlet piping to PRVs................................................................................... 451 Discharge piping from PRVs.................................................................... 453 Contingency quantification........................................................................... 454 General......................................................................................................... 454 Power failure............................................................................................... 455 Local power failure.......................................................................... 456 Failure of a distribution center....................................................... 456 Total power failure........................................................................... 457 Cooling water failure................................................................................. 457 Instrument air failure................................................................................ 458 Steam failure............................................................................................... 460 Total steam failure............................................................................ 460 Loss of steam to specific equipment.............................................. 460 Partial steam failure......................................................................... 460 Check valve failure.................................................................................... 460 Blocked outlet............................................................................................. 461 Pump or compressor discharge...................................................... 461 Multiple outlet................................................................................... 462 Block valve downstream of control valve..................................... 462 Control valve failure.................................................................................. 462 Vapor breakthrough................................................................................... 463 Maximum flow........................................................................................... 465 Thermal relief............................................................................................. 465 Modulus of elasticity of pipe material (E)..................................... 468 © 2010 Taylor & Francis Group, LLC Contents xxi Coefficient of linear thermal expansion (α).................................. 468 Valve leakage rate (q)........................................................................ 469 Compressibility of liquid (Z)........................................................... 469 Coefficient of cubic expansion of liquids (β)................................. 469 Installation of thermal relief valve................................................. 471 Fire exposure.............................................................................................. 471 General guidelines........................................................................... 472 Estimation of wetted surface area.................................................. 472 Fire circle.............................................................................................474 Estimation of latent heat and physical properties........................474 Liquid wet vessel.............................................................................. 475 Vessels with only gas....................................................................... 477 Two liquid phases............................................................................. 479 Heat exchanger tube rupture................................................................... 480 Contingency calculation.................................................................. 482 Reflux failure and overhead system........................................................ 484 Loss of reboiler heat................................................................................... 485 Venting of storage tanks............................................................................ 485 Venting due to liquid movements.................................................. 486 Thermal venting............................................................................... 486 Fire exposure..................................................................................... 486 Minimum flow area......................................................................... 488 Sizing procedure............................................................................................. 489 Sizing of liquid relief................................................................................. 489 Sizing of vapor relief.................................................................................. 491 Critical flow....................................................................................... 491 Subcritical flow.................................................................................. 492 Conventional and pilot-operated PRV........................................... 492 Balanced-bellows PRV..................................................................... 492 Sizing for steam relief................................................................................ 493 Sizing for two-phase fluids....................................................................... 494 Type 1 (omega method).................................................................... 496 Type 2 (omega method).................................................................... 499 Type 3 (integral method)................................................................. 501 Design of flare stack................................................................................... 503 Minimum distance..................................................................................... 504 Fraction of heat intensity transmitted (τ)................................................ 504 Fraction of heat radiated (F)...................................................................... 505 Heat release (Q)........................................................................................... 505 Sizing of a flare stack: Simple approach................................................. 505 Calculation of stack diameter......................................................... 505 Calculation of flame length............................................................. 506 Flame distortion caused by wind velocity.................................... 506 Sizing of flare stack: Brzustowski and Sommer approach................... 508 © 2010 Taylor & Francis Group, LLC xxii Contents Calculation of flare stack diameter................................................ 508 Location of flame center xc, yc.......................................................... 509 Lower explosive limit of mixtures................................................. 509 Vertical distance (yc)..........................................................................511 Horizontal distance (xc).....................................................................511 SIL analysis.......................................................................................................514 Definitions................................................................................................... 515 Diagnostic coverage......................................................................... 515 Final element..................................................................................... 515 MooN.................................................................................................. 515 Programmable electronics............................................................... 515 Programmable electronic system................................................... 515 Protection layer................................................................................. 515 Safety-instrumented function......................................................... 515 Safety-instrumented systems...........................................................516 Safety integrity...................................................................................516 Safety integrity level.........................................................................516 Safety life cycle...................................................................................516 Matrix for SIL determination....................................................................516 Probability of failure on demand............................................................. 517 ALARP model............................................................................................. 519 Determination of SIL........................................................................ 519 Financial...................................................................................................... 521 Health and safety....................................................................................... 522 Environment and asset.............................................................................. 522 Programming.................................................................................................. 524 Program for pressure relief valve............................................................ 524 Program limitations and notes....................................................... 525 General overview.............................................................................. 525 Project details.................................................................................... 525 File save.............................................................................................. 526 File open............................................................................................. 526 File print............................................................................................. 527 Exit...................................................................................................... 527 Specific message or warning: back pressure................................ 527 Back-pressure correction factor...................................................... 527 Pilot-operated PRV........................................................................... 527 Liquid................................................................................................. 528 Vapor.................................................................................................. 529 Two-phase type 1 calculation......................................................... 529 Two-phase type 2 calculation......................................................... 529 Two-phase type 3 calculation......................................................... 529 Program for flare stack estimation.......................................................... 531 Program limitations and notes....................................................... 531 © 2010 Taylor & Francis Group, LLC Contents xxiii Specific message/warning.............................................................. 532 Nomenclature.................................................................................................. 533 Greek characters......................................................................................... 533 References........................................................................................................ 534 Chapter 8 Glycol dehydration.................................................................. 537 Introduction..................................................................................................... 537 Basic scheme.................................................................................................... 537 Advantages.................................................................................................. 539 Disadvantages............................................................................................. 539 Pre-TEG coalescer....................................................................................... 539 Contactor..................................................................................................... 539 Flash separator............................................................................................ 540 Filters............................................................................................................ 540 Pumping...................................................................................................... 540 Glycol/glycol exchanger............................................................................ 541 Gas/glycol exchanger................................................................................. 541 Regenerator................................................................................................. 541 Physical properties.......................................................................................... 542 Selection of type of glycol......................................................................... 542 Common properties of glycol................................................................... 543 Densities of aqueous glycol solutions............................................ 543 Solubility of various compounds................................................... 543 Fire hazard information............................................................................ 543 Viscosities of aqueous glycol solutions.......................................... 543 Specific heats of aqueous glycol solutions.................................... 543 Thermal conductivities of aqueous glycol solutions................... 543 Design aspects................................................................................................. 544 Water content in hydrocarbon gas........................................................... 544 Equilibrium dew point.............................................................................. 545 Minimum lean-TEG concentration.......................................................... 548 Number of theoretical stages of the contactor....................................... 550 Design of contactor.................................................................................... 551 Type of internals............................................................................... 554 Liquid distributor............................................................................. 562 Flash separator............................................................................................ 563 Filters............................................................................................................ 564 Particulate filter................................................................................. 564 Carbon filter....................................................................................... 564 Glycol/glycol exchanger............................................................................ 564 Gas/glycol exchanger................................................................................. 565 Regenerator................................................................................................. 566 Still column........................................................................................ 567 Reboiler........................................................................................................ 569 © 2010 Taylor & Francis Group, LLC xxiv Contents Fire tube heat density....................................................................... 569 Fire tube heat flux............................................................................. 570 Lean-glycol storage.................................................................................... 570 Energy exchange pump............................................................................. 571 Burner management.................................................................................. 573 Specifications.............................................................................................. 578 Programming.................................................................................................. 578 Program limitations................................................................................... 582 General overview....................................................................................... 582 File menu............................................................................................ 582 Unit menu.......................................................................................... 583 Project details.................................................................................... 584 Data entry.......................................................................................... 584 References........................................................................................................ 585 © 2010 Taylor & Francis Group, LLC Preface After publishing the first edition in 2007, I received many suggestions from professionals who encouraged me to bring out the second edition. Considering the suggestions received from end users and to make the book more useful, I have added three more chapters to the book: Thermodynamics, Heat Transfer, and Distillation. I have also developed the following additional programs in Visual Basic®. Calculation of JT effect due to drop in pressure Double-pipe heat exchanger design Batch heating and cooling calculation Metal temperature calculation Design of distillation column using Smoker equations With an additional 5 programs, the total number of programs has increased to 14. Most of the existing Visual Basic® programs have been modified to make them more user-friendly; however, the possibilities of program bugs cannot be totally eliminated. Arun Datta Brisbane, Australia © 2010 Taylor & Francis Group, LLC xxv Acknowledgments I wish to express my gratitude to all the professionals who encouraged me to write the second edition of this book with additional chapters. Special thanks to my wife, Dr. Nivedita Datta, and my daughter, Raka Datta, whose support and encouragement were the key factors in the ­completion of this work. I am also grateful to Anthony Buckley and Malcolm Rough of WorleyParsons for reviewing some chapters of the book and p ­ roviding useful suggestions. I also appreciate the contribution I received from Dr. Pramod Mathur of Technip who reviewed some chapters and provided valuable feedback. I extend my gratitude to Haruo Kikkawa of WorleyParsons for reviewing and checking the work-out examples of the new chapters. I also acknowledge the help received from the Tubular Exchanger Manufacturers Association and Pergamon Press for permitting me to publish relevant figures. Special thanks are also due to the editorial and production staff of CRC Press and Techset Composition, particularly Syed Mohamad Shajahan, Florence Kizza, and Allison Shatkin, for publishing this work with outstanding quality. I will thankfully acknowledge any suggestion to further improve future editions. Arun Datta Brisbane, Australia © 2010 Taylor & Francis Group, LLC xxvii Author Arun Datta a lead facilities engineer working with Santos, has more than 30 years experience in the field of process engineering and design. He holds a master’s degree in chemical engineering from the Indian Institute of Technology, Delhi, and has worked with several process consultancy organizations both in India and Australia. Dr. Datta has been a consultant for a large number of process engineering organizations, including refineries, oil and gas industries, fine chemicals, and pharmaceuticals. His fields of expertise include heat and mass transfer, process simulations, exchanger design, pressure vessel design, design of safety systems, and design of control systems. Some of his clients include BP Refinery, Caltex Refinery, Santos, ExxonMobil, ONGC, Indian Oil, Incitec, and Oil Search. He is a chartered professional engineer in Australia (Queensland chapter) as well as a member of the Institute of Engineers, Australia. © 2010 Taylor & Francis Group, LLC xxix chapter one Basic mathematics Introduction Understanding mathematics is the most fundamental requirement in understanding engineering. Some fields in chemical engineering require the solution of complex mathematical equations. The purpose of this chapter is to get some idea in the field of mathematics commonly used for chemical engineering design and includes the following: • Physical constants • Mensuration • Algebra • Trigonometry • Analytical geometry • Calculus • Differential equations • Partial differential equations • Numerical analysis • Equation of states • Unit conversions • Programming Physical constants The commonly used physical constants are presented in Table 1.1. SI prefixes The International System of Units (SI) prefixes are presented in Table 1.2. Mensuration Triangles Area = 1/2 bh (1.1) where b = base and h = altitude. © 2010 Taylor & Francis Group, LLC 1 2 Process engineering and design using visual basic® Table 1.1 Commonly Used Physical Constants Name Symbol Unit Value Speed of light Planck’s constant c h hbar G G e me mp mn mH amu NA k eV a sigma cm/s erg⋅s erg⋅s cm3/(g⋅s2) Nm2/kg2 ESU g g g g g 2.99792458E10 6.6260755E−27 1.05457266E−27 6.67259E−8 6.67259E−11 4.8032068E−10 9.1093897E−28 1.6726231E−24 1.6749286E−24 1.6733E−24 1.6605402E−24 6.0221367E23 1.380658E−16 1.6021772E−12 7.5646E−15 5.67051E−5 2.1798741E−11 8.31439 1.98719 0.0820567 3.1415926536 2.7182818285 Gravitational constant Electron charge Mass of electron Mass of proton Mass of neutron Mass of hydrogen Atomic mass unit Avogadro’s number Boltzmann constant Electron volt Radiation density constant Stefan–Boltzmann constant Rydberg constant Gas constant Pi Napierian (natural) logarithm base Euler’s constant Logarithm conversion Logarithm conversion Radian Degree Minute Second R R R π e erg/k erg erg/(cm3⋅K4) erg/(cm2⋅K4⋅s) erg J/(mol⋅K) cal/(mol⋅K) l.atm/(mol⋅K) Y log x ln x 0.5772156649 0.4342944819 ln x 2.302585093 log x 57.2957795131° 0.0174532925 rad 0.0002908882 rad 0.0000048481 rad Rectangles Area = ab (1.2) where a and b are the lengths of the sides. Parallelogram (opposite sides parallel) Area = ah = ab sin α © 2010 Taylor & Francis Group, LLC (1.3) Chapter one: Basic mathematics 3 Table 1.2 SI Prefixes Multiplication factor 1 000 000 000 000 000 000 1 000 000 000 000 000 1 000 000 000 000 1 000 000 000 1 000 000 1 000 100 10 0.1 0.01 0.001 0.000 001 0.000 000 001 0.000 000 000 001 0.000 000 000 000 001 0.000 000 000 000 000 001 b = = = = = = = = = = = = = = = = 10 1015 1012 109 106 103 102 101 10−1 10−2 10−3 10−6 10−9 10−12 10−15 10−18 18 Prefix Symbol exa peta tera giga mega kilo hecto deka deci centi milli micro nano pico femto atto E P T G M k h da d c m μ n p f a h α a Figure 1.1 Parallelogram. where a and b are the lengths of the sides, h the height, and α the angle between the sides. See Figure 1.1. Rhombus (equilateral parallelogram) Area = 1/2 ab (1.4) where a and b are the lengths of the diagonals. Trapezoid (four sides, two parallel) Area = 1/2(a + b)h (1.5) where a and b are the lengths of the parallel sides, and h is the height. © 2010 Taylor & Francis Group, LLC 4 Process engineering and design using visual basic® Quadrilateral (four sided) Area = 1/2 ab sin θ (1.6) where a and b are the lengths of the diagonals, and θ is the acute angle between them. Regular polygon of n sides (refer to Figure 1.2) Area = 1/4 nL2 cot(180°/n) (1.7a) R = L/2 csc(180°/n) (1.7b) r = L/2 cot(180°/n) (1.7c) β = 360°/n (1.7d) θ = (n − 2)180°/n (1.7e) L = 2r tan(β/2) = 2R sin(β/2) (1.7f) Circle (refer to Figure 1.3) Let C = circumference r = radius D = diameter A = area S = arc length subtended by θ L = chord length subtended by θ H = maximum rise of arc above chord, r − H = d θ = central angle (rad) subtended by arc S R r β θ Figure 1.2 Regular polygon (n = 5). © 2010 Taylor & Francis Group, LLC L Chapter one: Basic mathematics 5 S H θ r d D Figure 1.3 Circle. Then C = 2πr = πD (1.8a) S = rθ = 1/2 Dθ (1.8b) L = 2 r 2 − d 2 = 2r sin(θ/2) = 2d tan(θ/2) (1.8c) d = 1/2 4r 2 − L2 = 1/2L cot(θ/2) (1.8d) θ = S/r = 2cos−1(d/r) = 2sin−1(L/D) (1.8e) A(circle) = πr2 = 1/4 πD2 (1.8f) A(sector) = 1/2 rS = 1/2 r2θ (1.8g) A(segment) = A(sector) − A(triangle) = 1/2 r2 (θ − sin θ) (1.8h) (r − H ) − (r − H )(2rH − H 2 )0.5 r (1.8i) A(segment ) (φ/360°)(π/4) − ( h − h 2 )(0.5 − h) = A(total) π/4 (1.8j) = r 2cos −1 where h = H/D, h ≤ 0.5 ϕ = 2{90 − sin−1(1 − 2h)} © 2010 Taylor & Francis Group, LLC 6 Process engineering and design using visual basic® b a Figure 1.4 Ellipse. F y E G x Figure 1.5 Parabola. Ellipse (refer to Figure 1.4) Area = πab (1.9a) Circumference = 2π{(a2 + b2)/2}0.5 (approximately) (1.9b) Parabola (refer to Figure 1.5) Length of arc EFG = (4x 2 + y 2 ) + {( y2 ln 2x + 2x Area of section EFG = 4/3 xy 4x2 + y 2 ) y} (1.10a) (1.10b) Prism Lateral surface area = (perimeter of right section) * (lateral edge) (1.11a) Volume = (area of base) * (altitude) © 2010 Taylor & Francis Group, LLC (1.11b) Chapter one: Basic mathematics 7 Pyramid Lateral area of a regular pyramid = 1/2 (perimeter of base) * (slant height) (1.12a) = 1/2 (number of sides) * (length of one side) * (slant height) Volume = 1/3 (area of base) * (altitude) (1.12b) (1.12c) Right circular cylinder Lateral surface area = 2π (radius) * (altitude) (1.13a) Volume = π (radius)2 * (altitude) (1.13b) Sphere (refer to Figure 1.6) Area (sphere) = 4πR 2 = πD2 (1.14a) Area (zone) = 2πRh = πDh (1.14b) Volume (sphere) = 4/3πR3 = 1/6πD3 (1.14c) Volume (spherical sector) = 2/3πR2 h = 1/6πh1(3r22 + h12 ) (1.14d) Volume (spherical segment of one base) = 1/6πh1 (3r22 + h12 ) (1.14e) Volume (spherical segment of two bases) = 1/6πh (3r12 + 3r22 + h22 ) (1.14f) r2 r1 h1 h2 R h D Figure 1.6 Sphere. © 2010 Taylor & Francis Group, LLC 8 Process engineering and design using visual basic® Right circular cone Curved surface area = πr(r2 + h2)0.5 (1.15a) Volume = 1/3 πr2h (1.15b) Surface area (general) = πa2 + π/2(b2/e)ln{(1 + e)/(1 − e)} (1.16a) where r = radius h = height of the cone Dished end Surface area (ellipsoidal, b = a/2) = πa2 + (πa2/8e)ln{(1 + e)/(1 − e)} (1.16b) = 4.336 a2 Surface area (hemispherical, b = a) = 2πa2 (1.16c) Volume (general) = 2/3 πa2b (1.16d) Volume (ellipsoidal) = 1/3 πa3 (1.16e) Volume (hemispherical) = 2/3 πa3 (1.16f) where a = semimajor axis b = semiminor axis e = eccentricity = (1 − b2/a2)0.5 Irregular shape Let y0, y1, y2, . . ., yn be the lengths of a series of equally spaced parallel chords and h be the distance between them. The approximate area of the figure is given by using the trapezoidal rule or by Simpson’s rule. Trapezoidal rule Area = h/2 {(y0 + yn) + 2(y1 + y2 + y3 + ⋯ + yn−1)} (1.17) Simpson’s rule Area = h/3 {(y0 + yn) + 4(y1 + y3 + y5 + ⋯ + yn−1) + 2(y2 + y4 + ⋯ + yn−2)} (1.18) where n is even. The greater the value of n, the greater the accuracy of approximation. © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 9 Irregular volume To find the irregular volume, replace y’s by cross-sectional area Aj, and use the results in the preceding equation. Algebra Factoring a2 − b2 = (a + b)(a − b) (1.19a) a3 − b3 = (a − b)(a2 + ab + b2) (1.19b) a3 + b3 = (a + b)(a2 − ab + b2) (1.19c) an − bn = (a − b)(an−1 + an−2b + an−3b2 + ⋯ + bn−1) (1.19d) (a + b)2 = a2 + 2ab + b2 (1.19e) (a − b)2 = a2 − 2ab + b2 (1.19f) (a + b + c)2 = a2 + b2 + c2 + 2ab + 2ac + 2bc (1.19g) (a − b − c)2 = a2 + b2 + c2 − 2ab − 2ac + 2bc (1.19h) (a + b)3 = a3 + 3a2b + 3ab2 + b3 (1.19i) (a − b)3 = a3 − 3a2b + 3ab2 − b3 (1.19j) (a + b)n = an + nan−1b + {n(n − 1)/2!}an−2b2 + {n(n − 1)(n − 2)/3!}an−3b3 + ⋯ + bn (1.19k) Arithmetic progression A series is said to be in arithmetic progression (AP) if the algebraic difference between any two successive terms is the same throughout the series. The following series is in AP: a, a + b, a + 2b, a + 3b, . . ., nth term where a = first term b = common difference The nth term can be defined as tn = a + (n − 1)b © 2010 Taylor & Francis Group, LLC (1.20a) 10 Process engineering and design using visual basic® Sum of the series S = (n/2){2a + (n − 1)b} (1.20b) Geometric progression A series is said to be in geometric progression (GP) if the ratio of any term to the preceding one is the same throughout the series. The following series is in GP: a, ar, ar2, ar3, . . ., nth term where a = first term r = common ratio The nth term can be defined as tn = arn−1 (1.21a) Sum of the series S= a(1 − r n ) (1 − r ) (1.21b) Infinite series (in GP) When r < 1, the sum of the series = a/(1 − r) (1.21c) Example Series 1 + 1/3 + 1/9 + 1/27 + ⋯ + 1/∞ The sum = a/(1 − r) = 3/2 Best-fit straight line (least squares method) The straight line y = a + bx should be fitted through the given points (x1,y1), (x2,y2), . . ., (xn,yn) so that the sum of the squares of the distances of those points from the straight line is minimum, where the distances are measured in the vertical direction (y-direction). The values of a and b are calculated from the following equations: an + bΣxj = Σyj © 2010 Taylor & Francis Group, LLC (1.22a) Chapter one: Basic mathematics 11 and aΣx j + bΣx 2j = Σx j y j (1.22b) where n is the number of points. Example 1.1 Let the four points be (−1,1), (−0.1,1.099), (0.2,0.808), and (1,1). n=4 Σx j = 0.1 Σx 2j = 2.05 Σy j = 3.907 Σx j y j = 0.0517 4 a + 0.1b = 3.907 0.1a + 2.05b = 0.0517 The solution is a = 0.9773 b = −0.0224 Therefore, the equation of the best-fit straight line is y = 0.9773 − 0.0224x. Binomial equation The general equation is ax2 + bx + c = 0 (1.23a) General solution of Equation 1.23a x= −b ± b 2 − 4 ac 2a (1.23b) Polynomial equation General solution of the following type of polynomial equation: y = ax2 + bx + c © 2010 Taylor & Francis Group, LLC (1.24a) 12 Process engineering and design using visual basic® If three values (x1,y1), (x2,y2), and (x3,y3) are known, then a= ( y1 − y 2 )( x2 − x3 ) − ( y 2 − y 3 )( x1 − x2 ) ( x12 − x22 )( x2 − x3 ) − ( x22 − x32 )( x1 − x2 ) (1.24b) {( y − y ) − a(x − x )} b= (1.24c) c = y1 − ax12 − bx1 (1.24d) 1 2 2 1 2 2 ( x1 − x2 ) Example 1.2 Solve the equation y = ax2 + bx + c for three sets of values (1,10), (3,32), and (5,70). SOLUTION a= (10 − 32)(3 − 5) − (32 − 70)(1 − 3) =2 (1 − 9)(3 − 5) − (9 − 25)(1 − 3) b= {(10 − 32) − 2(1 − 9)} = 3 −2 c = 10 − 2 − 3 = 5 Therefore, the general solution will be y = 2x2 + 3x + 5. Maxima/minima Let a function be y = f(x) (1.25a) If a solution for x at y′= 0 exists, then there will be either a maximum value or a minimum value for the function. At a value of x, where y′ = 0 If y″ is negative, then there will be a maximum value for the function. If y″ is positive, then there will be a minimum value for the function. Example 1.3A Let the equation be y = ax + b y′ = a = 0 © 2010 Taylor & Francis Group, LLC (1.25b) Chapter one: Basic mathematics 13 No solution exists at y′ = 0; this indicates that there will be no maxima or minima for the function. This is the equation of a straight line. Example 1.3B Let the equation be y = x3 + x − 1 (1.25c) 2 y′ = 3x + 1 = 0 (1.25d) or x2 = −1/3 (1.25e) No general solution exists for Equation 1.25e, meaning that Equation 1.25c will have no general maxima or minima. Example 1.3C Let the equation be y = 4x3 − 3x + 2 (1.25f) y′ = 12x − 3 = 0 2 x = ±1/2 At x = 1/2, y″ = 12 and at x = −1/2, y″ = −12. Therefore, at x = 1/2, the value of y will be minimum. The value of y = 1. At x = −1/2, the value of y will be maximum. The value of y = 3. The nature of this graph is such that for x values less than −1/2, the value of y will decrease continuously, and for x values more than 1/2, the value of y will increase continuously. Cubic equation An accurate solution of a cubic equation is very important in process engineering calculations. The commonly used Newton’s method (discussed later) may not be adequate to establish all the roots of a cubic equation. One root is always real and the other two roots can be real or imaginary depending on the equation. General procedure Let the equation be ax3 + bx2 + cx + d = 0 (1.26) The following factors are calculated as 3c b 2 p = − 3 a a © 2010 Taylor & Francis Group, LLC (1.27a) 14 Process engineering and design using visual basic® 9bc 27 d b q = 2 − 2 + 27 a a a 3 3 p q ∆ = + 3 2 2 (1.27b) (1.27c) If Δ < 0, then all three roots will be real. Otherwise, one root will be real and the other roots will be imaginary. When Δ < 0, all roots are real |p|3 v= 27 0.5 −q φ = cos −1 2v |p| w= 3 0.5 (1.28) (1.29) (1.30) y1 = 2w cos(ϕ/3) (1.31a) φ + π y 2 = −2w cos 3 (1.31b) φ − π y 3 = −2w cos 3 (1.31c) The final roots will be x1 = y1 − b 3a (1.32a) x2 = y 2 − b 3a (1.32b) x3 = y 3 − b 3a (1.32c) q + ∆ 0.5 2 (1.33a) When Δ >= 0, only one root is real u1 = − © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 15 If u1 < 0, then u = − u1 1/3 (1.33b) Else u = u11/3 k1 = − (1.33c) q − ∆ 0.5 2 (1.34a) 1/3 (1.34b) If k1 < 0, then k = − k1 Else k = k11/3 (1.34c) y1 = u + k (1.35) b 3a (1.36) The final root will be x1 = y1 − Example 1.4A Solve the equation x3 − x2 + 0.1x − 0.002 = 0 SOLUTION p = −0.2333 q = −0.04274 Δ = −0.000013 Since the value is negative, there will be three real roots v = 0.02169 ϕ = 0.1722 w = 0.27889 y1 = 0.55685 y2 = −0.250715 y3 = −0.30614 The final roots will be x1 = 0.89019 x2 = 0.08262 x3 = 0.02719 © 2010 Taylor & Francis Group, LLC 16 Process engineering and design using visual basic® Example 1.4B Solve the equation 3x3 − x2 + 0.1x − 0.002 = 0 SOLUTION p = −0.0037 q = 0.000294 Δ = 1.9E−8 Since the value is positive, there will be one real root u1 = −0.00000656 u = −0.01872 k1 = −0.000287 k = −0.06596 y1 = −0.08468 The final real root will be x1 = 0.02643 Matrix Addition and multiplication of matrices • If two m by n matrices A and B are given, the sum A + B can be defined as the m by n matrix, adding corresponding elements, that is (A + B) [i,j] = A[i,j] + B[i,j] (1.37a) • If a matrix A and a number c are given, the multiplication of the matrix can be defined as cA = cA[i,j] (1.37b) Addition of matrices a i. d b e c u + f x v y w a + u = z d + x a ii. d b e c a + f d b e c 2a = f 2d b+v e+y 2b 2e Multiplication of matrices a iii. c b e * d g f ae + bg = h ce + dg © 2010 Taylor & Francis Group, LLC af + bh cf + dh c + w f + z 2c a = 2 2f d b e c f Chapter one: Basic mathematics a iv. d b e 17 x c ax + by + cz * y = f dx + ey + fz z The multiplication of two matrices is well defined only if the number of columns of the first matrix is the same as the number of rows of the second matrix. If A is an m by n matrix (m rows, n columns) and B is an n by p matrix (n rows, p columns), then their product AB is the m by p matrix (m rows, p columns) given by (AB)[i,j] = A[i,1] * B[1,j] + A[i,2] * B[2,j] + ⋯ + A[i,n] * B[n,j] for each pair of i and j. Multiplication has the following properties: • (AB)C = A(BC) for all k by m matrices A, m by n matrices B, and n by p matrices C (associativity). • (A + B)C = AC + BC for all m by n matrices A and B and k by m matrices C (distributivity). • In general, commutativity does not hold, meaning generally AB ≠ BA. Matrix properties involving addition Let A, B, and C be m by n matrices. Then a. A + B = B + A (1.38a) b. (A + B) + C = A + (B + C) (1.38b) c. A + 0 = A (1.38c) where 0 is the m by n zero matrix (all its entries are equal to 0). d. A + B = 0 if and only if B = −A (1.38d) Matrix properties involving multiplication a. Let A, B, and C be three matrices. If the products AB, (AB)C, BC, and A(BC) then (AB)C = A(BC) (1.39a) b. If α and β are numbers and A is a matrix, then α(βA) = (αβ)A (1.39b) c. If α is a number, and A and B are two matrices such that the product AB is possible, then α(AB) = (αA)B = A(αB) © 2010 Taylor & Francis Group, LLC (1.39c) 18 Process engineering and design using visual basic® d. If A is an n by m matrix and 0 is the m by k zero matrix, then A0 = 0 (1.39d) Matrix properties involving addition and multiplication a. Let A, B, and C be three matrices, then and (A + B)C = AC + BC (1.40a) A(B + C) = AB + AC (1.40b) b. If α and β are numbers and A and B are matrices, then and α(A + B) = αA + αB (1.40c) (α + β)A = αA + βA (1.40d) Transpose The transpose of a matrix is another matrix, produced by turning rows into columns and vice versa. The transpose of an n by m matrix A is the n by m matrix AT defined by AT[i,j] = A[j,i] (1.41) For the matrix a d A= g j c f i l b e h k the transpose a A = b c T d e g h f i j k l Symmetric matrix A symmetric matrix is a matrix equal to its transpose. A symmetric matrix must be a square matrix, for example © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics a b 19 a b and b c c b d e c e f Diagonal matrix A diagonal matrix is a symmetric matrix with all of its entries equal to zero, except possibly the values of the diagonal, for example a 0 a 0 and 0 b 0 0 0 0 0 0 b Determinants Determinants are important in both calculus and algebra. The determinant of a 1 × 1 matrix is the element itself: det[a] = a. The 2 × 2 matrix a A= c b d has the determinant det(A) = ad − bc (1.42) The 3 × 3 matrix a A = d g b e h c f i has the determinant det(A) = a(ei − fh) − b(di − fg) + c(dh − eg) (1.43) Properties of determinants 1. Any matrix A and its transpose have the same determinant, meaning det A = det AT. 2. If the elements of one row (or column) of a determinant are all zero, the value of the determinant is zero. © 2010 Taylor & Francis Group, LLC 20 Process engineering and design using visual basic® 3. The determinant of a triangular matrix is the product of the entries on the diagonal, that is a 0 b a = d b 0 = ad d 4. If one determinant is obtained from another by interchanging any two rows (or columns), the value of either is the negative of the value of the other. a c b c = − d a d b 5. If the elements of one row (or column) of a determinant are multiplied by the same constant factor, the value of the determinant is multiplied by this factor. na c nb a = n d c b a = d nc b nd 6. If two rows (or columns) of a determinant are identical, the value of the determinant is zero. 7. If two determinants are identical except for one row (or column), the sum of their values is given by a single determinant obtained by adding corresponding elements of dissimilar rows (or columns) and leaving the remaining elements unchanged. 3 1 2 4 + 5 7 2 7 = 5 8 2 = 19 5 8. The value of a determinant is not changed if a constant multiple of the corresponding elements of any other row (or column) is added to the elements of any row (or column). a + nc c b + nd a = d c b a = d c + na d + nb b 9. If all the elements but one in a row (or column) are zero, the value of the determinant is the product of that element and its cofactor. © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 21 Cofactor Let A be an n × n matrix. The ij-th cofactor of A, denoted by Aij, will be Aij = (−1)i+j|Mij| (1.44) Example 1.5 Find the cofactors A32 and A24 of a 4 × 4 determinant A −3 4 5 0 1 2 A= 1 4 5 0 9 2 6 3 −2 7 SOLUTION 1 A32 = (−1)3 + 2 M32 = − 2 4 A24 = (−1) 2+ 4 1 1 4 5 0 2 −3 5 0 6 3 = −8 7 5 9 = −192 2 Determinant and inverses Theorem 1 If A is invertible, then det A ≠ 0 and det A−1 = 1/det A (1.45) Adjoint Let a determinant be A11 A 21 B= An1 A12 A22 An 2 ... ... ... A1n A2 n Ann (1.46) Let A be an n × n matrix and let B, given in Equation 1.46, denote the matrix of its cofactors. Then the adjoint of A, written as adjA, is the transpose of the n × n matrix B. © 2010 Taylor & Francis Group, LLC 22 Process engineering and design using visual basic® A11 A 12 adjA = BT = A1n A21 A22 A2 n ... ... ... An1 An 2 Ann (1.47) 0 0 detA 0 ... ... ... 0 0 0 0 = (detA)I detA (1.48) Theorem 2 Let A be an n × n matrix. Then detA 0 ( A)( adjA) = 0 0 0 detA 0 0 Theorem 3 Let A be an n × n matrix. Then A is invertible if and only if detA ≠ 0. If detA ≠ 0, then A −1 = 1 adjA detA (1.49) Cramer’s rule Consider a system of n equations and n unknowns. a11x1 + a12x2 + ⋯ + a1nxn = b1 a21x1 + a22x2 + ⋯ + a2nxn = b2 ⋮ ⋮ ⋮ (1.50a) ⋮ an1x1 + an2x2 + ⋯ + annxn = bn which can be written in the form Ax = b (1.50b) If detA ≠ 0, then Equation 1.50b will have a unique solution given by x = b/A © 2010 Taylor & Francis Group, LLC (1.50c) Chapter one: Basic mathematics 23 Let D be detA. The other matrix can be defined as b1 b 2 A1 = bn a1n a11 a a2 n 21 , A2 = ann an1 ... ... ... a12 a22 an 2 b1 b2 bn ... ... ... a1n a2 n , etc. ann Let D1 = detA1, D2 = detA2 , . . ., Dn = detAn, then x1 = D1 D D , x2 = 2 , … , xn = n D D D Example 1.6 Solve using Cramer’s rule, the system 2x1 + 4x2 + 6x3 = 18 4x1 + 5x2 + 6x3 = 24 3x1 + x2 − 2x3 = 4 SOLUTION The determinant is calculated first as 2 D = 4 3 4 5 1 6 6 = 2(−10 − 6) − 4 ( −8 − 18 ) + 6 ( 4 − 15) −2 = −32 + 104 − 66 = 6 Because the value of D ≠ 0, the system will have a unique solution. 18 D1 = 24 4 4 5 1 6 6 = 18(−10 − 6) − 4(−48 − 24) −2 + 6 ( 24 − 20 ) = 24 2 D2 = 4 3 18 24 4 6 6 = 2(−48 − 24) − 18(−8 − 18) −2 + 6 (16 − 72) = −12 © 2010 Taylor & Francis Group, LLC (1.51) 24 Process engineering and design using visual basic® 2 D3 = 4 3 4 5 1 18 24 = 2 ( 20 − 24 ) − 4 (16 − 72) 4 + 18 ( 4 − 15) = 18 Therefore x1 = D1/D = 24/6 = 4 x2 = D2/D = −12/6 = −2 x3 = D3/D = 18/6 = 3 Trigonometry Functions of circular trigonometry Trigonometric functions are the ratios of various sides of the reference angles presented in Figure 1.7. The trigonometric relationships are: Sine of α = sin α = p/h; secant of α = sec α = h/b Cosine of α = cos α = b/h; cosecant of α = csc α = h/p Tangent of α = tan α = p/b; cotangent of α = cot α = b/p The magnitude and sign of trigonometric functions are presented in Table 1.3. h p b h p α b b p α α b h h Figure 1.7 Triangles. Table 1.3 Magnitude of Trigonometric Functions Function sin α csc α cos α sec α tan α cot α 0–90° 90–180° 180–270° 270–360° +0 to +1 +∞ to +1 +1 to 0 +1 to +∞ +0 to +∞ +∞ to +0 +1 to +0 +1 to +∞ −0 to −1 −∞ to −1 −∞ to −0 −0 to –∞ 0 to –1 −∞ to −1 −1 to −0 −1 to −∞ +0 to +∞ +∞ to +0 −1 to −0 −1 to −∞ +0 to +1 +∞ to +1 −∞ to −0 −0 to −∞ © 2010 Taylor & Francis Group, LLC p Chapter one: Basic mathematics 25 Periodic functions The following periodic functions are commonly used in trigonometry: cos(α + 2π) = cos α (1.52a) sin(α + 2π) = sin α (1.52b) cos(α + 2nπ) = cos α, n = 0, ±1, ±2, . . . (1.52c) sin(α + 2nπ) = sin α, n = 0, ±1, ±2, . . . (1.52d) Magic identity The following identities are very basic to the analysis of trigonometric expressions: sin2 α + cos2 α = 1 (1.53a) 1 + tan2 α = sec2 α (1.53b) 1 + cot2 α = csc2 α (1.53c) Addition formulas The following addition formulas are very important for the analysis of trigonometric expressions: cos (a + b) = cos a cos b − sin a sin b (1.54a) cos(a − b) = cos a cos b + sin a sin b (1.54b) sin(a + b) = sin a cos b + cos a sin b (1.54c) sin(a − b) = sin a cos b − cos a sin b (1.54d) tan( a + b) = tan a + tan b 1 − tan a tan b (1.54e) tan( a − b) = tan a − tan b 1 + tan a tan b (1.54f) © 2010 Taylor & Francis Group, LLC 26 Process engineering and design using visual basic® Example 1.7 Find the exact value of cos 165°, given that cos 120° = −1/2, sin 120° = 3 /2, and 45° = sin 45° = 2 /2 . SOLUTION cos 165° = cos (120° + 45°) = cos 120° cos 45° − sin 120° sin 45° = −1 2 3 2 − * * 2 2 2 2 =− 6+ 2 4 Double angle and half angle formulas Double- and half-angle formulas are very useful in trigonometry. The following equations are widely used: cos(2a) = cos2 a − sin2 a = 2 cos2 a − 1 = 1 − 2sin2 a (1.55a) sin(2a) = 2sin a cos a (1.55b) 2 tan a 1 − tan 2 a (1.55c) tan(2a) = 1 a cos 2 = (1 + cos a) 2 2 (1.55d) 1 a sin 2 = (1 − cos a) 2 2 (1.55e) sin a a 1 − cos a tan = = 2 sin a 1 + cos a (1.55f) Example 1.8 Use the half-angle formulas to find cos(π/8) and sin(π/8). SOLUTION Let a = π/4, then π/8 = a/2. Now, from the half-angle formula, we have 1 π 1 2 π cos 2 = 1 + cos = 1 + 8 2 4 2 2 © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 27 Because 0 < π/8 < π/2, the value of cos(π/8) will be positive. Therefore π cos = 8 2+ 2 2 π sin = 8 2− 2 2 Similarly Product and sum formulas The following product and sum formulas are commonly used in trigonometry: cos a cos b = 1 {cos( a + b) + cos(a − b)} 2 (1.56a) sin a sin b = 1 {cos( a − b) − cos(a + b)} 2 (1.56b) sin a cos b = 1 {sin( a + b) + sin(a − b)} 2 (1.56c) cos a sin b = 1 {sin( a + b) − sin(a − b)} 2 (1.56d) a + b a − b cos a + cos b = 2 cos cos 2 2 (1.56e) a + b a − b cos a − cos b = −2 sin sin 2 2 (1.56f) a + b a − b sin a + sin b = 2 sin cos 2 2 (1.56g) a + b a − b sin a − sin b = 2 cos sin 2 2 (1.56h) © 2010 Taylor & Francis Group, LLC 28 Process engineering and design using visual basic® β c r h a γ α b Figure 1.8 Triangle. Relations between angles and sides of triangles Refer to Figure 1.8. Let a, b, and c be the sides of a triangle. Let α, β, and γ be the angles opposite the sides in the triangle. 2s = a + b + c A = area r = radius of the inscribed circle R = radius of the circumscribed circle h = altitude Law of sines sin α/a = sin β/b = sin γ/c (1.57) a + b tan 1/2(α + β) = a−b tan 1/2(α − β) (1.58a) b + c tan 1/2(β + γ ) = b−c tan 1/2(β − γ ) (1.58b) a + c tan 1/2(α + γ ) = a−c tan 1/2(α − γ ) (1.58c) a 2 = b 2 + c 2 − 2bc cos α (1.59a) b 2 = a 2 + c 2 − 2ac cosβ (1.59b) Law of tangents Law of cosines © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 29 c 2 = a 2 + b 2 − 2ab cos γ (1.59c) Other relations b 2 + c2 − a2 2bc (1.60a) a = bcos γ + ccos β (1.60b) 2 s(s − a)(s − b)(s − c) bc (1.60c) cos α = sin α = α sin = 2 (s − b)(s − c) bc α cos = 2 A= a 2 sin β sin γ 1 1 bh = ab sin γ = = 2 2 2 sin α r= s(s − a) bc (1.60d) (1.60e) s(s − a)(s − b)(s − c) = rs (1.60f) (s − a)(s − b)(s − c) s (1.60g) a abc = 2 sin α 4A (1.60h) R= h = c sin α = a sin γ = 2rs b (1.60i) Inverse trigonometric functions General inverse trigonometric functions with the following restrictions: −π/2 ≤ sin−1 x ≤ π/2 0 ≤ cos−1 x ≤ π −π/2 ≤ tan−1x ≤ π/2 © 2010 Taylor & Francis Group, LLC 30 Process engineering and design using visual basic® are sin −1 x = cos −1 1 − x 2 = tan −1 = sec −1 1 1− x 2 = csc −1 cos −1 x = sin −1 1 − x 2 = tan −1 = csc −1 1 1− x 2 = tan −1 x = sin −1 x 1 − x2 = cot −1 1 − x2 x 1 π = − cos −1 x x 2 (1.61a) 1 − x2 x 1 = cot −1 = sec −1 2 x x 1− x π − sin −1 x 2 x 1+ x 2 (1.61b) 1 = cos −1 = sec −1 1 + x 2 = csc −1 1+ x 2 1 + x2 x = cot −1 1 x (1.61c) Hyperbolic functions The hyperbolic functions are similar to the trigonometric functions and are presented as follows: cosh x = ex + e−x 2 (1.62a) sinh x = ex − e−x 2 (1.62b) tanh x = ex − e−x ex + e−x (1.62c) coth x = ex + e−x ex − e−x (1.62d) sech x = 2 ex + e−x (1.62e) csch x = 2 e − e−x (1.62f) © 2010 Taylor & Francis Group, LLC x Chapter one: Basic mathematics 31 Other hyperbolic functions cosh2 x − sinh2 x = 1 (1.63a) sech2 x + tanh2 x = 1 (1.63b) coth2 x − csch2 x = 1 (1.63c) sinh (x ± y) = sinh x cosh y ± cosh x sinh y (1.63d) cosh (x ± y) = cosh x cosh y ± sinh x sinh y (1.63e) tanh 2x = 2s tanh x 1 + tanh 2 x (1.63f) Inverse hyperbolic functions The inverse of sinh x can be established as follows: Let y = sinh x or 2y = ex − e−x or 2yex = e2x − 1 or (ex)2 − 2y(ex) − 1 = 0 or e x = y ± y2 + 1 Because ex > 0 for all x, and y 2 + 1 > y for all y, we can have the solution as ex = y + y2 + 1 ( y2 + 1 Therefore x = ln y + ) and ( x2 + 1 ) (1.64a) ( x2 − 1 ) (1.64b) sinh −1 x = ln x + Similarly cosh −1 x = ln x + tanh −1 x = © 2010 Taylor & Francis Group, LLC 1 1+ x ln 2 1− x (1.64c) 32 Process engineering and design using visual basic® coth −1 x = 1 x+1 ln 2 x−1 (1.64d) 1 + 1 − x2 sech −1x = ln x (1.64e) 1 + 1 + x2 csch −1x = ln x (1.64f) Analytical geometry Straight line The general equation of a straight line is ax + by + c = 0 (1.65) If b ≠ 0, the slope is −a/b. The intersection at the y-axis when x = 0 is −c/b. Straight line through two points It is possible to draw a straight line through two points. The general equation of a straight line through two points P1 (a1,b1) and P2 (a2,b2) can be represented as x a1 a2 y b1 b2 1 1 = 0 1 (1.66a) or x(b1 − b2) − y(a1 − a2) + (a1b2 − a2b1) = 0 (1.66b) Three points on one line Although it is possible to draw a straight line through two points, any three points may not fall on a straight line. Three points P1 (a1,b1), P2 (a2,b2), and P3 (a3,b3) can be on a straight line if and only if a1 a2 a3 b1 b2 b3 © 2010 Taylor & Francis Group, LLC 1 1 = 0 1 (1.67) Chapter one: Basic mathematics 33 Circle The equation of a circle with coordinates of the center as (a,b) and radius r is (x − a)2 + (y − b)2 = r2 (1.68a) Expanding Equation 1.68a, the general equation of a circle can be developed as x2 + y2 + 2mx + 2ny + c = 0 (1.68b) m 2 + n2 − c > 0 (1.68c) with The coordinates of the center of the circle are (−m, −n) and the radius is r= m2 + n2 − c (1.68d) Tangent The tangent at any point (h,k) of a circle is defined to be a straight line that meets the circle at the specified point but, when produced, does not cut it. This tangent is always perpendicular to the radius drawn from the center to the point of contact. The equation of the tangent at a point (h,k) on a circle with center (a,b) and radius r is given by y−k =− a−h ( x − h) b−k (1.69) The slope of the line is −(a − h/b − k). Normal The normal at any point of a curve is the straight line that passes through the point and is perpendicular to the tangent at that point. The general equation of the normal with the coordinates of the center as (a,b) and that of the point as (h,k) is x a h y b k © 2010 Taylor & Francis Group, LLC 1 1 = 0 1 (1.70) 34 Process engineering and design using visual basic® Four points on a circle Four points can be on a circle if the following condition is satisfied. Let the four points be (a1,b1), (a2,b2), (a3,b3), and (a4,b4). The four points can be on a circle if a12 + b12 2 2 a2 + b2 2 2 a3 + b3 2 2 a 4 + b4 a1 b1 a2 b2 a3 b3 a4 b4 1 1 =0 1 1 (1.71) Example 1.9 Check if the four points (5,0), (4.33,2.5), (2.5, −4.33), and (−3.536, −3.536) are on the same circle. SOLUTION The condition of the four points on the same circle is given in Equation 1.71. The value of the matrix will be 25 25 25 25 5 4.33 2.5 −3.536 25 − 5 25 25 0 2.5 −4.33 −3.536 2.5 −4.33 −3.536 1 4.33 1 = 25 2.5 1 −3.536 1 1 25 1 − 1 25 25 1 4.33 2.5 −3.536 2.5 −4.33 −3.536 1 1 1 2.5 −4.33 = −1067 + 1067 = 0 −3.536 Therefore, all the four points will be on the same circle. Circle through three points The general equation of a circle through the three points (a1,b1), (a2,b2), and (a3,b3) (provided the three points do not fall on a straight line) can be given as x2 + y 2 2 2 a1 + b1 2 2 a2 + b2 2 2 a3 + b3 x y a1 b1 a2 b2 a3 b3 © 2010 Taylor & Francis Group, LLC 1 1 =0 1 1 (1.72) Chapter one: Basic mathematics 35 Conic section The locus of a point P that moves so that its distance from a fixed point is always in a constant ratio to its perpendicular distance from a fixed straight line is called a conic section. Focus The previously mentioned fixed point is called the focus and is usually denoted by S. Eccentricity The constant ratio is called eccentricity and is denoted by e. Directrix The fixed straight line is called the directrix. An algebraic curve with an equation of the form ax2 + bxy + cy2 + dxz + eyz + fz2 = 0 (1.73) is called a conic section. The Cartesian equation of the conic section is ax2 + bxy + cy2 + dx + ey + f = 0 (1.74) Partial derivatives The three partial derivatives of the equation of a conic section are Fx′ (x,y,z) = 2ax + by + dz (1.75a) Fy′ (x,y,z) = bx + 2cy + ez (1.75b) Fz′ (x,y,z) = dx + ey + 2fz (1.75c) The matrix formed by the coefficients of x, y, and z is called Δ. 2a ∆ = b d b 2c e d e 2 f Table 1.4 characterizes the curve represented by the equation. Example 1.10 Establish the type of curve for the equation x2 + 2xy + y2 + 3x − 4y + 6 = 0. © 2010 Taylor & Francis Group, LLC (1.76) 36 Process engineering and design using visual basic® Table 1.4 Conic Section b2 − 4ac < 0 Δ≠0 Δ=0 b2 − 4ac = 0 aΔ < 0 a ≠ c, an ellipse a = c, a circle aΔ > 0, no locus Point b2 − 4ac > 0 Parabola Hyperbola Two parallel lines if Q = d2 + e2 − 4(a + c)f > 0; one straight line if Q = 0; no locus if Q < 0 Two intersecting straightlines SOLUTION 2 ∆ = 2 3 2 2 −4 3 −4 = −98 ≠ 0 12 b2 − 4ac = 0 Therefore, the curve will be a parabola. Parabola As in Figure 1.9, let AA′ be a straight line and e be a point (e is not on line AA′). The locus of all points B such that the distance of B from line AA′ is equal to the distance of B from point e will form a parabola. The point e is the focus and the line AA′ is the directrix. The general equation of a parabola is y2 = 4ax (1.77) A y B e A′ Figure 1.9 Parabola. © 2010 Taylor & Francis Group, LLC x Chapter one: Basic mathematics 37 Parametric equations of a parabola Let a and b be two lines in a plane with equations x = 4at2 (1.78a) y = 4at (1.78b) respectively. The real number t is a parameter. Now, to obtain an equation of the curve, we eliminate the parameter t from the two equations. Eliminating t from Equations 1.78a and 1.78b, we get y x = 4a 4a 2 or y2 = 4ax which is the equation of the parabola. Equation of tangent of a parabola obtained as The slope of a tangent line can be 2yy′ = 4a or slope y′ = 2a/y The slope of the tangent line at a point (x0, y0) = 2a/y0. The equation of the tangent line will be 2a ( x − x0 ) y0 (1.79a) yy0 − 4ax0 = 2ax − 2ax0 (1.79b) yy0 = 2a(x + x0) (1.79c) y − y0 = or or Equation 1.79c is the equation of the tangent of the parabola y2 = 4ax at point (x0, y0). © 2010 Taylor & Francis Group, LLC 38 Process engineering and design using visual basic® Tangent line with a given slope, m For a parabola with equation y2 = 4ax, the equation of the tangent line with a constant slope m can be presented by y = mx + a m (1.80) Ellipse (refer to Figure 1.10) Let there be two points F and F′ such that the distance F – F′ is always less than a fixed positive value 2a. The locus of all points A such that distance AF + AF′ = 2a is an ellipse. Two points F and F′ are called the foci of the ellipse. The general equation of an ellipse is x2 y2 + 2 =1 a2 b (1.81) where a = semimajor axis b = semiminor axis Parametric equations of an ellipse Take two lines l and m in a plane with the respective equations x = a cos t (1.82a) y = b sin t (1.82b) The real number t is the parameter. y A F Figure 1.10 Ellipse. © 2010 Taylor & Francis Group, LLC F′ x Chapter one: Basic mathematics 39 Now, to obtain an equation of the curve, we eliminate the parameter t from the two equations. Eliminating t from Equations 1.82a and 1.82b, we get x/a = cos t y/b = sin t or x2 y2 + 2 = cos 2 t + sin 2 t = 1 a2 b is the general equation of the ellipse. General properties of an ellipse Eccentricity The eccentricity of an ellipse is defined as e= 1− b2 , e<1 a2 (1.83) Focus The coordinates of the focus are (±ae, 0). ellipse is Tangent to a Point P of an Ellipse The general equation of an x2 y2 + 2 =1 a2 b The slope of the tangent line can be obtained by differentiating implicitly 2x 2 yy ′ + 2 =0 a2 b (1.84a) or y′ = − b2x a2 y (1.84b) The equation of the tangent line at point (x0, y0) is y − y0 = − b 2 x0 ( x − x0 ) a2 y0 (1.84c) or x0 x y 0 y + 2 =1 a2 b © 2010 Taylor & Francis Group, LLC (1.84d) 40 Process engineering and design using visual basic® y F P F′ x Figure 1.11 Hyperbola. Normal at a point P (x0, y0) can be given as The equation of a normal at a point P ( y − y o )b 2 ( x − x o )a 2 = xo yo (1.85) Hyperbola (refer to Figure 1.11) Let there be two points F and F′ and a strictly positive value 2a. The locus of all points P such that the absolute difference between PF′ and PF is 2a will be a hyperbola. The general equation of a hyperbola is x2 y2 − =1 a2 b 2 (1.86) Parametric equations of a hyperbola Take two lines l and m in a plane with the respective equations x = a sec t (1.87a) y = b tan t (1.87b) The real number t is the parameter. Now, to obtain an equation of the curve, we eliminate the parameter t from the two equations. Eliminating t from Equations 1.87a and 1.87b, we get x/a = sec t y/b = tan t or x2 y2 − = sec 2 t − tan 2 t = 1 a2 b 2 is the general equation of the hyperbola. © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 41 General properties of a hyperbola Eccentricity The eccentricity of a hyperbola is defined as e= 1+ b2 , e>1 a2 (1.88) Focus The coordinates of the focus are (±ae, 0). Tangent to a point P of a hyperbola The general equation of a hyperbola is x2 y2 − =1 a2 b 2 The slope of the tangent line can be obtained by differentiating implicitly 2x 2 yy ’ − 2 =0 a2 b (1.89a) or y’ = b2x a2 y (1.89b) The equation of the tangent line at point (x0, y0) is y − y0 = b 2 x0 ( x − x0 ) a2 y0 (1.89c) or x0 x y 0 y − 2 =1 a2 b (1.89d) Normal at a point P The equation of a normal at a point P (x0, y0) can be given as ( y − y0 )b 2 ( x − x 0 )a 2 =− x0 y0 © 2010 Taylor & Francis Group, LLC (1.90) 42 Process engineering and design using visual basic® Calculus Differential calculus A function f is said to be differentiable if the following limit exists: lim h→ 0 f ( x + h) − f ( x ) h (1.91) If this limit exists, it is called the derivative of f at x and is denoted by f′(x). Example 1.11 Estimate the derivative of 1/x. SOLUTION The derivative can be established based on Equation 1.91 as 1 1 − f ( x + h) − f ( x ) −1 x + h x = = h h x( x + h) Therefore f ’( x) = lim h→0 f ( x + h) − f ( x ) −1 −1 = lim = 2 h → 0 x( x + h) h x provided x ≠ 0. Example 1.12 If f(x) = 5 − x3, establish the value of f′(2). SOLUTION f ′ ( 2) = lim h→0 f (2 + h) − f (2) h = lim {5 − (2 + h) } − {5 − 2 } = lim {5 − (8 + 12h + 6h + h )} + 3 3 h→0 3 h 2 h→0 h = lim (−12 − 6 h − h 2 ) h→ 0 = −12 © 2010 Taylor & Francis Group, LLC 3 Chapter one: Basic mathematics 43 Understanding the derivatives The purpose of derivatives can be explained by using the following example. Example 1.13 Estimate the derivative of f(x) = 2x at x = 0. SOLUTION (SEE FIGURE 1.12) The slope of line BA = (20 − 2−1)/1 = 1/2 and the slope of line AC = (21 − 20)/1 = 1. Therefore, the derivative at x = 0 will be in between 1/2 and 1. Now, for small values of h, Table 1.5 presents the value of 2h with the values of the difference quotients. From Table 1.5, it is clear that difference quotients calculated for negative h values are less than calculated for positive h values, and the derivative is in between 0.693123 and 0.693171. If we use a value up to three decimal places, f′(0) = 0.693. 2 C 1.5 A B 1 Tangent line slope = f ′(0) 0.5 –1 0 1 Figure 1.12 Graph y = 2x. Table 1.5 Solution of Example 1.13 h −0.003 −0.002 −0.001 0 0.001 0.002 0.003 2h Difference quotient: (2h − 1)/h 0.99979 0.99986 0.99993 1 1.00007 1.00014 1.00021 0.693075 0.693099 0.693123 © 2010 Taylor & Francis Group, LLC 0.693171 0.693195 0.693219 44 Process engineering and design using visual basic® Therefore, the equation of the tangent at point A will be y = 0.693x + 1 (because the intercept is at 1) Standard derivatives d(xn) = n xn−1 dx d(ex) = ex dx d(ax) = ax ln a dx d(ln x) = (1/x) dx d(log x) = {log (e/x)} dx d(sin x) = cos x dx d(cos x) = −sin x dx d(tan x) = sec2 x dx d(cot x) = −csc2 x dx d(sec x) = tan x sec x dx d(csc x) = −csc x cot x dx d(sin−1 x) = (1 − x2)−1/2 dx d(cos−1 x) = −(1 − x2)−1/2 dx d(tan−1 x) = (1 + x2)−1 dx d(cot−1 x) = −(1 + x2)−1 dx d(sec−1 x) = x−1 (x2 − 1)−1/2 dx d(csc−1 x) = −x−1 (x2 − 1)−1/2 dx d(sinh x) = cosh x dx d(cosh x) = sinh x dx d(tanh x) = sech2 x dx d(coth x) = −csch2 x dx d(sech x) = −sech x coth x dx d(sinh−1 x) = (x2 + 1)−1/2 dx d(cosh−1 x) = (x2 − 1)−1/2 dx d(tanh−1 x) = (1 − x2)−1 dx d(coth−1 x) = −(x2 − 1)−1 dx d(sech−1 x) = x(1 − x2)−1/2 dx d(csch−1 x) = −x−1 (x2 + 1)−1/2 dx © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 45 Integral calculus Suppose f is continuous for a ≤ t ≤ b. The definite integral of f from a to b, written as b ∫ f (t) dt (1.92) a is the limit of the left- or right-hand sums with n subdivisions of [a, b], as n gets arbitrarily large. In other words b n −1 f (t) dt = lim(left-hand sum) = lim f (ti )∆t n →∞ n →∞ i=0 a (1.93a) n f (t) dt = lim(right-hand sum) = lim f (ti )∆t n →∞ n →∞ i =1 a (1.93b) ∑ ∫ and b ∑ ∫ Each of these sums is called a Riemann sum, f is called the integrand, and a and b are called the limits of integration. Volume of horizontal dished end (refer to Figure 1.13) The volume of the strip is dV = π/2 * y * d/2 * dx (1.94) b d 2a dV dx x (0,0) (x – a)2/a2 + y2/b2 = 1 Figure 1.13 Volume of horizontal dished end. © 2010 Taylor & Francis Group, LLC a–x a x 46 Process engineering and design using visual basic® The volume up to a height of x is V = π 2 x=x 1 ∫ 2 dydx (1.95) x=0 (d/2)2 = a2 − (a − x)2 = 2ax − x2 (1.96a) y2/b2 = 1 − (x − a)2/a2 = (2ax − x2)/a2 (1.96b) and Therefore, Equation 1.94 will become πb V = 2a = x=x ∫ (2ax − x ) dx 2 x=0 πb 2 x 3 ax − 2a 3 (1.97) Equation 1.97 is the general equation of the horizontal dished end volume. Total volume (x = 2a) The total volume of the dished end V T = 2/3 πba2 Elliptical dished end (b = a/2) (1.98) The general equation of volume V = π/4 (ax2 − x3/3) (1.99a) The total volume (x = 2a) V T = π/3 a3 Hemispherical dished end (b = a) (1.99b) The general equation of volume V = π/2 (ax2 − x3/3) (1.100a) The total volume (x = 2a) V T = 2/3 πa3 © 2010 Taylor & Francis Group, LLC (1.100b) Chapter one: Basic mathematics 47 Volume of vertical dished end (refer to Figure 1.14) The equation of the curve with a shifted coordinate is x 2 ( y − b )2 + =1 a2 b2 (1.101) The volume up to a distance y from the bottom will be y=y V = π ∫ 4 4x dy 2 (1.102) y =0 Integrating Equation 1.102 and using the value of x2 from Equation 1.101 V = πa 2 2 y 3 by − b2 3 (1.103) Equation 1.103 is the general equation of the volume of the vertical dished end up to a height of y from the bottom. Total volume (y = b) The total volume of the dished end V T = 2/3 πba2 Elliptical dished end (b = a/2) (1.104) The general equation of volume V = 4π (ay2/2 − y3/3) (1.105a) The total volume (x = 2a) V T = π/3 a3 (1.105b) y 2a 2x dy y (0,0) Figure 1.14 Volume of vertical dished end. © 2010 Taylor & Francis Group, LLC b x 48 Process engineering and design using visual basic® Hemispherical dished end (b = a) The general equation of volume V = π (ay2 − y3/3) (1.106a) The total volume (x = 2a) V T = 2/3 π a3 Standard integrals ∫ (du + dv + dw) = ∫ du + ∫ dv + ∫ dw ∫ adv = a∫ dv ∫ v n +1 + c(n ≠ −1) n+1 v n dv = dv ∫ v = ln v + c ∫ av dv = av +c ln a ∫ e dv = e + c v v ∫ sin v dv = − cos v + c ∫ cos v dv = sin v + c ∫ sec v dv = tan v + c 2 ∫ csc v dv = − cot v + c 2 ∫ sec v tan v dv = sec v + c ∫ csc v cot v dv = − csc v + c 1 dv v ∫ v + a = a tan a + c 2 2 © 2010 Taylor & Francis Group, LLC −1 (1.106b) Chapter one: Basic mathematics 49 dv v ∫ a − v = sin a + c 2 −1 2 1 dv v − a ∫ v − a = 2a ln v + a + c 2 2 ∫ v ± a = ln {v + v ± a } + c dv 2 2 2 2 ∫ sec v dv = ln(sec v + tan v) + c ∫ csc v dv = ln(csc v − cot v) + c Differential equations First-order differential equations An equation of the following type: dy = 50 − y dx (1.107) is called a first-order differential equation because it involves the first derivative, but no higher derivative. Example 1.14 Solve the following first-order differential equation: dy = 2x dx SOLUTION Integrating the preceding equation y = ∫ 2x dx = x + C (C = constant of integration) 2 The solution curves are parabolas. © 2010 Taylor & Francis Group, LLC 50 Process engineering and design using visual basic® Separation of variables Let us use the following equation and solve the equation using the separating variables method: dy = ky dx Separating the variables 1 dy = k dx y Integrating 1 ∫ y dy = ∫ k dx The result is ln (y) = kx + C or y = ekx+C = ekxeC = Aekx Therefore, the general solution of the equation dy = ky dx is y = Aekx (1.108) for any value of A. Second-order differential equations The concept of a second-order differential equation can be expressed with the problem of free body movement under gravity. The general equation of a free-falling body under gravity is d 2s = −g dt 2 (1.109a) where s is the distance, t is the time, and g is the acceleration due to gravity. Equation 1.98a is a second-order differential equation. Now, we know that the velocity can be expressed as v = ds/dt. © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 51 Therefore, a solution of Equation 1.109a will be ds = − gt + v0 dt (1.109b) where v0 is the initial velocity. Integrating Equation 1.109b, we get s=− 1 2 gt + v0t + s0 2 (1.109c) where s0 is the initial height. Example 1.15 Solve the following differential equation: d 2s + w 2s = 0 dt 2 (1.110a) SOLUTION We need to find a solution whose second derivative is the negative of the original function. This can be achieved by using properties s(t) = cos wt and s(t) = sin wt. d d2 (cos t) = (− sin t) = − cos t dt 2 dt and d d2 (sin t) = (cos t) = − sin t dt 2 dt Therefore, the general solution of Equation 1.110a is s(t) = C1 cos wt + C2 sin wt (1.110b) where C1 and C2 are arbitrary constants and the values of C1 and C2 depend on the boundary conditions. Bessel function Bessel’s differential is one of the most important equations in applied mathematics, and the standard Bessel functions are used for the solution of the following types of equations: x2y″ + xy′ + (x2 − v2)y = 0 © 2010 Taylor & Francis Group, LLC (1.111a) 52 Process engineering and design using visual basic® or y ′′ + 1 v2 y′ + 1 − 2 y = 0 x x (1.111b) The general solution of Equation 1.111a or Equation 1.111b is denoted by Jn(x) and is given by ∞ J n ( x) = x n (−1)m x 2 m 22 m + n m !(n + m)! m=0 ∑ (1.111c) The solution is called the Bessel function of the first kind of order n. This series converges for all x, as the ratio test shows, and in fact converges very rapidly because of the factorials in the denominator. Bessel functions J0(x) and J1(x) ∞ J 0 ( x) = (−1)m x 2 m x2 x4 x6 ∑ 2 (m !) = 1 − 2 (1!) + 2 (2 !) − 2 (3 !) + 2m 2 2 2 4 2 6 2 (1.112a) m=0 This looks similar to a cosine curve. ∞ J1 ( x ) = (−1)m x 2 m + 1 x x3 x5 x7 = − + − + 22 m + 1 m !(m + 1)! 2 231! 2 ! 252 ! 3 ! 27 3 ! 4 ! m=0 ∑ (1.112b) This looks similar to a sine curve. Standard Bessel functions Standard Bessel functions are very important in applied mathematics. These are presented in Table 1.6 [1]. Partial differential equations An equation involving one or more partial derivatives of an (unknown) function of two or more independent variables is called a partial differential equation. The order of the highest derivative is called the order of the equation. A few important partial differential equations are presented in the following text: One-dimensional wave equation: 2 ∂ 2u 2 ∂ u = c ∂t 2 ∂x 2 © 2010 Taylor & Francis Group, LLC (1.113a) Chapter one: Basic mathematics 53 Table 1.6 Standard Bessel Functions x J0(x) J1(x) x J0(x) J1(x) x J0(x) J1(x) 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 1.0000 0.9975 0.9900 0.9776 0.9604 0.9385 0.9120 0.8812 0.8463 0.8075 0.7652 0.7196 0.6711 0.6201 0.5669 0.5118 0.4554 0.3980 0.3400 0.2818 0.2239 0.1666 0.1104 0.0555 0.0025 −0.0484 −0.0968 −0.1424 −0.1850 −0.2243 0.0000 0.0499 0.0995 0.1483 0.1960 0.2423 0.2867 0.3290 0.3688 0.4059 0.4401 0.4709 0.4983 0.5220 0.5419 0.5579 0.5699 0.5778 0.5815 0.5812 0.5767 0.5683 0.5560 0.5399 0.5202 0.4971 0.4708 0.4416 0.4097 0.3754 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 −0.2601 −0.2921 −0.3202 −0.3443 −0.3643 −0.3801 −0.3918 −0.3992 −0.4026 −0.4018 −0.3971 −0.3887 −0.3766 −0.3610 −0.3423 −0.3205 −0.2961 −0.2693 −0.2404 −0.2097 −0.1776 −0.1443 −0.1103 −0.0758 −0.0412 −0.0068 0.0270 0.0599 0.0917 0.1220 0.3991 0.3009 0.2613 0.2207 0.1792 0.1374 0.0955 0.0538 0.0128 −0.0272 −0.0660 −0.1033 −0.1386 −0.1719 –0.2028 −0.2311 −0.2566 −0.2791 −0.2985 −0.3147 −0.3276 −0.3371 −0.3432 −0.3460 −0.3453 −0.3414 −0.3343 −0.3241 −0.3110 −0.2951 6.0 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 0.1506 0.1773 0.2017 0.2238 0.2433 0.2601 0.2740 0.2851 0.2931 0.2981 0.3001 0.2991 0.2951 0.2882 0.2786 0.2663 0.2516 0.2346 0.2154 0.1944 0.1717 0.1475 0.1222 0.0960 0.0692 0.0419 0.0146 −0.0125 −0.0392 −0.0653 −0.2767 −0.2559 −0.2329 −0.2081 −0.1816 −0.1538 −0.1250 −0.0953 −0.0652 −0.0349 −0.0047 0.0252 0.0543 0.0826 0.1096 0.1352 0.1592 0.1813 0.2014 0.2192 0.2346 0.2476 0.2580 0.2657 0.2708 0.2731 0.2728 0.2697 0.2641 0.2559 One-dimensional heat equation: ∂u ∂ 2u = c2 2 ∂t ∂x (1.113b) Two-dimensional Laplace equation: ∂ 2u ∂ 2u + =0 ∂x 2 ∂y 2 © 2010 Taylor & Francis Group, LLC (1.113c) 54 Process engineering and design using visual basic® Two-dimensional Poisson equation: ∂ 2u ∂ 2u + = f (x, y) ∂x 2 ∂y 2 (1.113d) Three-dimensional Laplace equation: ∂ 2u ∂ 2u ∂ 2u + + =0 ∂x 2 ∂y 2 ∂z 2 (1.113e) Example 1.16 Refer to Figure 1.15 above. A string of length l is stretched between two fixed points, and the motion is started by drawing aside, through a small distance b, a point of the string at distance 1/5 from one end. Establish the displacement y at distance x from the end at time t. SOLUTION Let us take the fixed end O of the string as the origin and the equilibrium position OA along the x-axis, where OA = l. OY is taken in the plane OBA, and it is perpendicular to OX. The point A′ of the string, which is at a distance l/5 from the origin O, is drawn aside through a small distance b to the position B, and then released from rest. The motion starts from the position OB and BA (A is also a fixed point) of the string, and we measured time from this position of the string. Boundary conditions: 1. y = 0 when x = 0 and x = l, for all t 2. y = 5bx/l for 0 ≤ x ≤ l/5, when t = 0 3. y = 5(l − x)b/(4l) for l/5 ≤ x ≤ l, when t = 0 4. ∂y/∂t = 0 for 0 ≤ x ≤ l, when t = 0 y B 0 A l/5 A′ l Figure 1.15 Example 1.16. © 2010 Taylor & Francis Group, LLC x Chapter one: Basic mathematics 55 The differential equation for the vibrating string is the wave equation 2 ∂2 y 2 ∂ y = c ∂t 2 ∂x 2 (1.114a) Because y = 0 when x = 0, we can assume y = T sin mx (1.114b) where T is a function of t only, and m ≠ 0. Substituting Equation 1.114b in Equation 1.114a T″ sin mx = −T m2c2 sin mx For all values of x, sin mx ≠ 0. Therefore T″ + m2c2 T = 0 (1.114c) The general solution of Equation 1.114c is T = A cos(mct) + B sin(mct) or y = [A cos(mct) + B sin(mct)] sin(mx) Because ∂y = 0, when t = 0 ∂t 0 = T′ sin mx when t = 0 or T′ = 0 when t = 0 because sin mx ≠ 0. Now, T′ = mc [−A sin(mct) + B cos(mct)]. Given T′ = 0 when t = 0, or B = 0. Therefore y = A cos(mct) sin mx; m≠0 (1.114d) Because y = 0 when x = l, from Equation 1.114b 0 = T sin ml, T≠0 Therefore, sin ml = 0 or ml = nπ, when n is any positive or negative integer. Because the positive and negative values of n will result in identical sets of solutions of Equation 1.114a, we can assume only positive values, that is, n = 1, 2, 3, 4, . . ., ∞. Therefore, the general solution of Equation 1.114a will be ∞ y = ∑ b cos(mct)sin(mx) n n =1 ∞ = nπct nπx ∑ b cos l sin l n (1.114e) n =1 Now, y = 5bx/l, 0 ≤ x ≤ l/5 for t = 0 and y = 5b (l − x)/(4l), l/5 ≤ x ≤ l for t = 0. © 2010 Taylor & Francis Group, LLC 56 Process engineering and design using visual basic® Let us assume that y = V0 when t = 0. Therefore ∞ V0 = nπx ∑ b sin l n (1.114f) n =1 The right-hand side of Equation 1.114f represents the Fourier halfrange sine series for the function V0 defined in (0,l); therefore bn = = l l/5 2 5bx 5b(l − x) nπx nπx sin dx + sin dx 4l l l l l l/5 0 ∫ ∫ 25b nπ sin 2n 2 π 2 5 Therefore, the solution will be ∞ y = 25b 1 nπx nπ nπct sin cos sin 2π 2 n = 1 n 2 5 l l ∑ (1.114g) Example 1.17 Solve the heat equation ∂u ∂ 2u = c2 2 ∂t ∂x (1.115a) for the following boundary conditions: u = 0 when x = 0 and x = l u = x when t = 0 SOLUTION Because u = 0 when x = 0, we can assume that u = T sin mx, and T is the function of t only for a solution of Equation 1.115a (m ≠ 0). Substituting in Equation 1.115a T′ sin mx = −c2Tm2 sin mx or T′ = −Tc2m2 (because sin mx ≠ 0) The solution is 2 2 T = Ae − c m t Equation 1.115a will be 2 2 u = Ae − c m t sin mx © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 57 Now, u = 0 when x = l. Therefore 2 2 0 = Ae − c m t sin ml Therefore, sin ml = 0, or m = πn/l (n = ±1, ±2, ±3, ±4, . . . , ±∞) Therefore 2 2 nπ u = Ae − c ( nπ/l ) t sin x l (1.115b) Because the positive and negative values of n will give identical sets of solutions of Equation 1.115a, we can therefore assume either the positive or negative values of n to have an independent set of solutions of Equation 1.115a. The general solution will be ∞ u= ∑b e n − c 2 ( nπ / x )2 t n =1 nπ sin x l (m ≠ n ≠ 0) Now, u = x when t = 0. Therefore ∞ x= nπ ∑ b sin l x n n =1 The right-hand side of the above equation is the Fourier halfrange sine series for the function f(x) defined in (0,l). Therefore l 2 nπ bn = x sin x dx l l ∫ 0 2l = (−1)n + 1 nπ Therefore, the solution will be ∞ u= 2l (−1)n + 1 − c2 ( nπ/l )2 t nπx sin e l π n =1 n ∑ (1.115c) Example 1.18 Solve the following Laplace equation: ∂ 2u ∂ 2u + =0 ∂x 2 ∂y 2 (1.116a) subject to the conditions u = 0 when x = 0, x = c, and y = b and u = u0 when y = 0. © 2010 Taylor & Francis Group, LLC 58 Process engineering and design using visual basic® SOLUTION Because u = 0 when x = 0, we assume u = Y sin mx, where m ≠ 0, for a solution of Equation 1.116a. Substituting in Equation 1.116a −Y m2 sin mx + Y″ sin mx = 0 or Y″ − Y m2 = 0 (1.116b) (sin mx cannot be zero for all values of x) whose solution is Y = A cosh my + B sinh my Therefore u = (A cosh my + B sinh my) sin mx, m≠0 (1.116c) Because u = 0 when x = c, we have 0 = Y(y) sin mc. Y(y) cannot be zero for all values of y. Therefore, sin mc = 0 or mc = nπ, n = 0 ± 1 ± 2 ± 3 ± 4 ± . . . ± ∞. u = 0 when y = b. 0 = (A cosh mb + B sinh mb) sin mx. Because x is arbitrary, therefore, we have 0 = A cosh mb + B sinh mb. Therefore cosh mb u = A cosh my − sinh my sin mx sinh mb = A [cosh my sinh mb − cosh mb sinh my]sin mx sinh mb = A sinh m(b − y )sin mx sinh mb Because the positive and negative values of m will result in identical sets of solutions of Equation 1.116a, we can use either the positive or negative values of m to have an independent set of solutions of Equation 1.116a. In this case, we will use the positive values of m. Therefore, the general solution of Equation 1.116a will be ∞ u= ∑A n n =1 sinh(nπ/c)(b − y ) nπx sin sinh( nπb/c) c Because u = u0 when y = 0, we have ∞ u0 = nπx ∑ A sin c n n =1 © 2010 Taylor & Francis Group, LLC (1.116d) Chapter one: Basic mathematics 59 The right-hand side of Equation 1.116d represents the Fourier half-range sine series for all functions of u0. Therefore c An = 2 nπx u0 sin dx c c ∫ 0 = 2u0 [1 − (−1)n ] nπ When n is even, the value will be zero, and when n is odd, we use n = 2m − 1 (m = 1, 2, . . . , ∞). A2 m − 1 = 4u0 (2m − 1)π (1.116e) Hence, the general solution of Equation 1.116a is ∞ ∑ 4u0 u= 2 ( m − 1)π m =1 2m − 1 π(b − y ) 2m − 1 c sin πx 2m − 1 c sinh πb c sinh (1.116f) Laplace transform The Laplace transform of a function x(t) is the function x (s) defined by ∞ x (s) = ∫ x(t)e dt − st 0 where s > 0, and is written as L[x(t)]. Therefore, from definition L [ x(t)] = ∞ ∫ x(t)e dt − st 0 where s > 0, which is a function of x (s). Example 1.19 Work out the Laplace transform of t. SOLUTION x(t) = t ∞ L[t] = ∫ te dt − st 0 © 2010 Taylor & Francis Group, LLC (1.117) 60 Process engineering and design using visual basic® ∞ e − st e − st = t − 2 s 0 −s ∞ 1 te − st e − st = − lim − 2 s t →∞ 1 s 0 1 1 t = − lim st − 2 [−1] s t →∞ e s 1 1 1 1 = − lim st + 2 = 2 s t →∞ se s s (L′ Hospital ’s rule) Therefore L[t] = 1/s2 Standard Laplace transforms L[1] = 1 s L[t] = 1 s2 L[t n ] = n! sn +1 L[e at ] = 1 s−a L[e − at ] = 1 s+a L[sin at] = a s + a2 L[cos at] = s s + a2 L[sinh at] = a s − a2 © 2010 Taylor & Francis Group, LLC 2 2 2 (1.118) Chapter one: Basic mathematics 61 L[cosh at] = s s − a2 2 L[t cos at] = s2 − a 2 ( s 2 + a 2 )2 L[t sin at] = 2sa ( s 2 + a 2 )2 Fourier half-range expansions [1] In various applications, there is a practical need to use Fourier series in connection with function f(x) that are given on some intervals only. We could extend f(x) periodically with period L and then represent the extended function by a Fourier series, which in general would involve both cosine and sine terms. Fourier half-range cosine series The cosine half-range expansion is ∞ f ( x) = a0 + nπ ∑ a cos L x n (1.119a) n =1 where a0 = 2 an = L 1 L L ∫ f (x)dx (1.119b) 0 L nπx ∫ f (x)cos L dx (1.119c) 0 Fourier half-range sine series The sine half-range expansion is ∞ f ( x) = nπ ∑ b sin L x n n =1 © 2010 Taylor & Francis Group, LLC (1.120a) 62 Process engineering and design using visual basic® where bn = 2 L L nπx ∫ f (x)sin L dx (1.120b) 0 Example 1.20 [1] Find the two half-range expansions of the following function: f(x) = 2kx/L if 0 < x < L/2 and f(x) = 2k(L − x)/L if L/2 < x < L SOLUTION Even periodic extension: L L/ 2 1 2k 2k k a0 = x dx + (L − x) dx = 2 L L L 0 L/ 2 ∫ an = ∫ L L/ 2 2 2k 2k nπ nπ x cos x dx + (L − x)cos x dx L L L L L 0 L/ 2 ∫ ∫ Integrating by parts L/ 2 ∫ x cos 0 nπ L2 nπ L2 nπ x dx = sin + 2 2 cos − 1 2nπ 2 2 L nπ and L nπ L2 nπ L2 nπ ∫ (L − x)cos L x dx = − 2nπ sin 2 − n π cos nπ − cos 2 2 2 L/ 2 Therefore an = 4k nπ 2 cos − cos nπ − 1 2 2 nπ 2 © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 63 Thus a2 = − 16k 16k , a4 = 0, a6 = − 2 2 , a8 = 0,… 22 π 2 6 π Therefore, the first half-range expansion of f(x) is f ( x) = 2π 1 6π k 16k 1 − 2 2 cos x + 2 cos x + 2 6 π 2 L L Odd periodic extension: Similarly, for the odd periodic extension bn = nπ 8k sin n2π 2 2 Hence, the second half-range expansion of f(x) is f ( x) = 8k 1 1 3π 1 5π π x + 2 sin x − sin x − 3 2 sin 5 π 2 12 L L L Numerical analysis Solving linear equations (Newton’s method) Given a function f(x) that is continuous and has a continuous derivative and also, given a starting value of x0: For n = 1, 2, 3, . . . until termination Compute f′(xn). If f′(xn) = 0, signal and stop. Else, compute xn + 1 = xn − f ( xn ) f ’( xn ) (1.121a) Test for termination. Example 1.21 Let the function f(x) = x3 + x − 1 = 0. xn + 1 = xn − xn3 + xn − 1 2xn3 + 1 = 3 xn2 + 1 3 xn2 + 1 Starting value x0 = 1. © 2010 Taylor & Francis Group, LLC (1.121b) 64 Process engineering and design using visual basic® Therefore, x1 = 3/4 = 0.75 x2 = 2 * 0.753 + 1 = 0.686047 3 * 0.752 + 1 x3 = 0.682340 x4 = 0.682328 The value of x4 is exact to the 6th decimal. A larger number of analyses may be required if the function does not converge rapidly. Therefore, the solution of the function x3 + x − 1 = 0 will be x = 0.682328. Newton’s method in two variables [2] Let (x0, y0) be chosen. We need to generate the sequence of vectors (xn, yn) recursively as follows: Let D(x, y) = fx(x, y)gy(x, y) − f y(x, y)gx(x, y) Then xn + 1 = xn − f ( x n , y n ) g y ( x n , y n ) − f y ( x n , y n ) g( x n , y n ) D( xn , y n ) (1.122a) yn+1 = yn − − f ( x n , y n ) g x ( x n , y n ) + f x ( x n , y n ) g( x n , y n ) D( xn , y n ) (1.122b) Under suitable conditions, the sequence (xn, yn) will converge to a vector (u, v) that satisfies f(u, v) = g(u, v) = 0 (1.122c) Newton’s method is most likely to work when the initial vector (x0, y0) is close to a solution. It is not necessary that the system has only one solution. Example 1.22 Use Newton’s method to find a solution to the system x2 − 2x − y + 1/2 = 0 x2 + 4y2 − 4 = 0 starting at the initial vector (2,0.25). © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 65 SOLUTION f = x2 − 2x −y + 1/2 fx = 2x − 2 and f y = −1 g = x2 + 4y2 − 4 gx = 2x and g y = 8y D(x,y) = fx g y − f y gx = (2x − 2)(8y) − (−1)(2x) = 2x − 16y + 16xy fg y − f yg = (x2 − 2x − y + 1/2)(8y) − (−1)(x2 + 4y2 − 4) = −4 + 4y + x2 − 4y2 − 16xy + 8x2y −fgx + fxg = −(x2 − 2x − y + 1/2)(2x) + (2x − 2)(x2 + 4y2 − 4) = 8 − 9x + 2xy + 2x2 − 8y2 + 8xy2 Thus xn + 1 = xn − −4 + 4 y n + xn2 − 4 y n2 − 16 xn y n + 8 xn2 y n 2xn − 16 y n + 16 xn y n yn+1 = yn − 8 − 9xn + 2xn y n + 2xn2 − 8 y n2 + 8 xn y n2 2xn − 16 y n + 16 xn y n Starting at x0 = 2 and y0 = 0.25 x1 = 2 − 0.75/8 = 1.90625 and y1 = 0.25 − (−)0.5/8 = 0.3125 The first four iterations are presented in Table 1.7. The solution is correct up to six decimal places. The values of the above-mentioned two equations can be calculated using x = 1.900677 and y = 0.311219 from Table 1.7 as x2 − 2x − y + 1/2 = (1.900677)2 − 2(1.900677) − 0.311219 + 0.5 = 0.000000058 x2 + 4y2 − 4 = (1.900677)2 + 4(0.311219)2 − 4 = 0.000002112 Table 1.7 Solution of Example 1.21 n xn yn xn+1 yn+1 0 1 2 3 2 1.90625 1.900691 1.900677 0.25 0.3125 0.311213 0.311219 1.90625 1.900691 1.900677 1.900677 0.3125 0.311213 0.311219 0.311219 © 2010 Taylor & Francis Group, LLC 66 Process engineering and design using visual basic® Numerical methods in linear algebra Gauss elimination [3] In this method, unknowns are eliminated by combining equations such that the n equations and n unknowns are reduced to an equivalent upper triangular system, which is then solved by back substitution. Let us consider the following system: a11x1 a21x1 a31x1 a12 x2 a22 x2 a32 x2 a13 x3 = b1 a23 x3 = b2 x33 x3 = b3 (1.123) For the first stage of elimination, multiply the first row of Equation 1.123 by a21/a11 and a31/a11, respectively, and subtract from the second and third rows. a22( 2) x2 a32( 2) x2 a23( 2) x3 = b2( 2) a33( 2) x3 = b3( 2) (1.124) where a22(2) = a22 − (a21/a11)a12 a23(2) = a23 − (a21/a11)a13 a32(2) = a32 − (a31/a11)a12 a33(2) = a33 − (a31/a11)a13 b2(2) = b2 − (a21/a11)b1 b3(2) = b3 − (a31/a11)b1 In the next stage of elimination, multiply the first row of Equation 1.124 by a32(2)/a22(2) and subtract from the second row in Equation 1.124. a33(3) x3 = b3(3) where a33(3) = a33(2) − (a32(2)/a22(2))a23(2) b3(3) = b3(2) − (a32(2)/a22(2))b2(2) The first equation from each stage results in a11x1 a12 x2 a22( 2) x2 a13 x3 = b1 a23( 2) x3 = b2( 2) a33( 3 ) x3 = b3( 3 ) (1.125) The elements a11, a22(2), and a33(3), which are assumed to be nonzero, are called pivot elements and this elimination method is called Gauss elimination. © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 67 One condition of the analysis is that the pivots must be different from zero. To achieve this, it may be required to change the order of the equations. This is called partial pivoting. In some cases, it may require not only an interchange of equations, but also an interchange of the position of the variables. This is called complete pivoting. Example 1.23 Solve the following equations using Gauss elimination: x1 + x2 + x 3 = 6 3x1 + 3x2 + 4x3 = 20 2x1 + x2 + 3x3 = 13 SOLUTION Eliminating x1 from the last two equations x1 + x2 + x 3 = 6 x3 = 2 −x2 + x3 = 1 In this case, the pivot point in the second equation is zero, and we need to interchange the preceding second and third equations before the second step. Therefore x1 + x2 + x 3 = 6 −x2 + x3 = 1 + x3 = 2 The solution is x3 = 2, x2 = 1, and x1 = 3. Cholesky method This method is also known as the square root method. If the coefficient matrix A is symmetric and positively definite, the matrix A can be decomposed as A = LLT. The popular method of solving an equation Ax = b (1.126a) A = LLT (1.126b) LLTx = b (1.126c) LTx = z (1.126d) Lz = b (1.126e) is or This can be written as © 2010 Taylor & Francis Group, LLC 68 Process engineering and design using visual basic® Based on the preceding equations, a matrix can be factorized as a11 a21 a31 a13 m11 a23 = m21 a33 m31 a12 a22 a32 m32 0 m11 0 0 m33 0 m11 = a11 0 m22 m21 m22 0 m31 m32 m33 (1.126f) where (1.126g) i −1 mii = aii − ∑m 2 ij i = 2, … , n (1.126h) j =1 ai1 m11 mi1 = j −1 1 mij = m jk mik aij − m jj k =1 ∑ i = 2, … , n (1.126i) i = j + 1, j + 2, … , n, k ≥ 2 (1.126j) Example 1.24 Using the Cholesky method, solve the following equations: 4 −1 0 0 −1 4 −1 0 0 −1 4 −1 0 x1 1 0 x2 0 = −1 x3 0 4 x 4 0 The form of factorization 4 −1 0 0 −1 4 −1 0 0 −1 4 −1 0 m11 0 m21 = −1 m31 4 m41 0 m22 m32 m42 0 0 m33 m43 0 m11 0 0 0 0 m44 0 Using the preceding equations m11 = 2 m21 = −1/2 m22 = (15/4)0.5 © 2010 Taylor & Francis Group, LLC m21 m22 0 0 m31 m32 m33 0 m41 m42 m43 m44 Chapter one: Basic mathematics 69 m31 = 0 m32 = −(4/15)0.5 m33 = (56/15)0.5 m41 = 0 m42 = 0 m43 = −(15/56)0.5 m44 = (209/56)0.5 The solution for z will be 2 −1/2 0 0 0 0 15/4 0 − 4/15 56/15 0 − 15/56 z1 1 z2 0 z = 0 0 3 209/56 z4 0 0 0 or z1 = 1 , z2 = 2 1 , z3 = 60 1 , z4 = 840 1 11704 The final solution for x will be 2 0 0 0 −1/2 0 15/4 − 4/15 0 56/15 0 0 x1 1/2 0 x2 1/ 60 = − 15/56 x3 1/ 840 209/56 x 4 1/ 11704 0 or x4 = 1 4 15 56 , x3 = , x2 = , x1 = 209 209 209 209 Numerical integration Two methods are extremely popular in numerical integration: 1. Trapezoidal rule 2. Simpson’s rule Trapezoidal rule Under this rule, the interval (a,b) is divided into N subintervals of length h = (b − a)/N, and if the subintervals are denoted as (x0,x1), (x1,x2), (x2,x3), . . . , (xN−1,xN), then the general integration can be written as x1 b I = ∫ a f ( x) dx = ∫ xN x2 f ( x) dx + x0 © 2010 Taylor & Francis Group, LLC ∫ x1 f ( x) dx + + ∫ f (x) dx xN − 1 (1.127) 70 Process engineering and design using visual basic® Evaluating each integral by the trapezoidal rule, the integration can be written as I = h f 0 + 2 ( f1 + f 2 + + f N −1 ) + f N 2 (1.128) Simpson’s rule Under this rule, the interval of integration (a,b) is divided into an even number of equal subintervals, say into N = 2M subintervals of length h = (a − b)/2M, with end points x0 = a, x1, x2, . . . , x2M−1, x2M = b. The general form of the integration will be b I = x2 x4 ∫ f (x) dx = ∫ f (x) dx + ∫ a x0 x2 M f ( x) dx + … + x2 ∫ f (x) dx (1.129) x2 M − 2 Using Simpson’s rule, the final integration will be I = h f 0 + 4 ( f1 + f 3 + + f 2 M −1 ) + 2 ( f 2 + f 4 + + f 2 M − 2 ) + f 2 M (1.130) 3 Example 1.25 A slug catcher 60 m long, having a 0.5 m diameter, and at a 2° angle with the horizontal plane, has a liquid-filled length of 5 m as shown in Figure 1.16. Calculate the filled volume of the slug catcher. SOLUTION The volume can be calculated by integration using Simpson’s rule. 0.5 m Angle = 2º 60 m Figure 1.16 Slug catcher volume. © 2010 Taylor & Francis Group, LLC h h 5m 2b Chapter one: Basic mathematics 71 The distance from the bottom corner of the slug catcher up to the liquid level (h) can be calculated as h = 5 tan2° = 0.175 m. This is less than the radius of the pipe. For this condition, the top view of the surface will always look like a half-ellipse. For a liquid length of l, if the major axis is 2x and the minor axis is 2y (the values of x and y depend on the value of l), the surface area (A) of the half-ellipse will be A = πxy/2 The volume of the liquid (V) can be estimated as l=5 πxy ∫ 2 sin 2°dl (1.131a) x = l/cos2° (1.131b) y = {l tan 2° (2r − l tan2°)}0.5 (1.131c) V = l=0 Now and where r = radius of the slug catcher = 0.25 m. Therefore, the volume will be l=5 V = πl ∫ 2 cos 2° * {l tan 2°(2r − l tan 2°)} sin 2°dl 0.5 l=0 or l=5 V = 0.054853 ∫ l * {0.03492l * (0.5 − 0.03492l)} dl (1.131d) 0.5 l=0 Now, a = 0 and b = 5. The number of divisions between limits (l = 0 and l = 5), 2M = 50, and the value of each division, h = 5/50 = 0.1. The value of the integrals will be f0 = 0, f50 = 0.054853 * 5{0.1746 * (0.5 − 0.1746)}0.5 = 0.06537 f1 = 0.054853 * 0.1 * {0.003492 * (0.5 − 0.003492)}0.5 = 0.000228 f 2 = 0.054853 * 0.2 * {0.006984 * (0.5 − 0.006984)}0.5 = 0.000644 and so on. The sum of the odd integrals will be ( f1 + f3 + f5 + ⋯ + f49) = 0.701109 © 2010 Taylor & Francis Group, LLC 72 Process engineering and design using visual basic® and the sum of the even integrals (2–48) will be (f 2 + f4 + f6 + . . . + f48) = 0.668797 Therefore, the volume will be V = 0.1 {0 + 4 * 0.701109 + 2 * 0.668797 + 0.06537} = 0.14 m 3 3 Double integration using Simpson’s rule [3] A double integration in the following form: b I = f ( x , y )dx dy c a d ∫∫ (1.132) can be solved using Simpson’s rule with h = (b − a)/2 and k = (d − c)/2. The value of the integral will be I = hk [ f ( a, c) + f ( a, d) + f (b , c) + f (b , d) + 4{ f ( a, c + k ) + f ( a + h, c) 9 + f ( a + h, d) + f (b , c + k )} + 16 f ( a + h, c + k )] (1.133) Example 1.26 Using Simpson’s rule, evaluate the integral 2 2 I = dxdy ∫ ∫ (x + y) 1 1 SOLUTION h = 0.5 and k = 0.5. I = 0.25 [ f (1, 1) + f (1, 2) + f (2, 1) + f (2, 2) + 4{ f (1, 1.5) + f (1.5, 1) 9 + f (11.5, 2) + f (2, 1.5)} + 16 f (1.5, 1.5)] or I = 0.25 2 2 16 2 0.5 + + 0.25 + 4 + + = 0.33988 9 3 2.5 3.5 3 A more accurate solution is 0.339789. © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 73 Numerical solution of first-order differential equations Euler’s method [2] This method is very simple, but the results are not very accurate. In this method, y1 is obtained by assuming that f(x,y) varies so little in the interval x0 ≤ x ≤ x1 that only a small error is made by replacing it by the constant value f(x0, y0). Integrating dy = f (x, y) dx from x0 to x1, we get x1 y( x1 ) − y0 = y( x1 ) − y( x0 ) = ∫ f (x, y)dx ≈ f (x , y )(x − x ) 0 0 1 0 (1.134) x0 Because h = x1 − x0 y1 = y0 + hf(x0, y0) The general equation is yn+1 = yn + hf(xn, yn) (1.135) Improved Euler’s method The accuracy of Euler’s method is improved by introducing the trapezoidal rule: x1 h ∫ f (x, y)dx ≈ 2 { f (x , y ) + f (x , y(x ))} 0 0 1 1 (1.136) x0 The value of y(x1) is not known and is estimated by Euler’s method, which is called z1. This modification results in general equations such as zn+1 = yn + hf(xn, yn) (1.137a) and yn+1 = yn + h [ f ( xn , y n ) + f ( xn + 1 , zn + 1 )] 2 © 2010 Taylor & Francis Group, LLC (1.137b) 74 Process engineering and design using visual basic® Example 1.27 Using Euler’s method, solve the following equation: dy = −2xy 2, dx y (0 ) = 1 at the value x = 1. SOLUTION The value of h = 0.2 and the calculation is made by using the values of x as 0.0, 0.2, 0.4, 0.6, 0.8, and 1.0. z1 = y0 + hf(x0, y0) = 1 y1 = y 0 + h f ( x0 , y 0 ) + f ( x1 , z1 ) = 1 + 0.1 * [0 − 0.4] = 0.96 2 z2 = y1 + hf(x1, y1) = 0.96 + 0.2(−0.3686) = 0.8863 y 2 = y1 + h f ( x1 , y1 ) + f ( x2 , z2 ) = 0.96 + 0.1 2 * [−0.3686 − 0.6284] = 0.88603 and so on. The results are presented in Table 1.8 (calculated value = 0.5034). The exact solution is 0.5. Runge–Kutta method [1] The Runge–Kutta method is widely used as a numerical method to solve differential equations. This method is more accurate than the improved Euler’s method. This method computes the solution of the initial value problem. y′ = f(x,y), y(x0) = y0 at equidistance points x1 = x0 + h, x2 = x0 + 2h, . . ., xN = x0 + Nh Table 1.8 Solution of Example 1.27 xn yn f(xn, yn) zn+1 f(xn+1, zn+1) yn+1 0 0.2 0.4 0.6 0.8 1.0 1 0.96 0.8603 0.7350 0.6116 0.5034 0 −0.3686 −0.5921 −0.6483 −0.5985 1 0.8863 0.7419 0.6053 0.4919 −0.4 −0.6284 −0.6605 −0.5862 −0.4839 0.96 0.8603 0.7350 0.6116 0.5034 © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 75 The general method of the solution is For n = 0, 1, 2, 3, . . . , N − 1 Evaluate k1 = hf(xn, yn) (1.138a) k2 = hf(xn + 0.5h, yn + 0.5k1) (1.138b) k3 = hf(xn + 0.5h, yn + 0.5k2) (1.138c) k4 = hf(xn + h, yn + k3) (1.138d) xn+1 = xn + h (1.138e) 1 ( k1 + 2 k 2 + 2 k 3 + k 4 ) 6 (1.138f) yn+1 = yn + This method is repeated till the solution is reached. Example 1.28 Solve Example 1.27 using the Runge–Kutta method. dy = −2xy 2 , y(0) = 1 dx at the value x = 1. SOLUTION For n = 0, xn = 0, yn = 1, and value of h = 0.2. Using the preceding equations k1 = 0.2f(0, 1) = 0 k2 = 0.2f(0.1, 1) = −0.04 k3 = 0.2f(0.1, 0.98) = −0.0384 k4 = 0.2f(0.2, 0.9616) = −0.074 x1 = 0.2 y1 = 1 + 1 (0 − 0.08 − 0.0768 − 0.074) = 0.9615 6 Similarly, other values can be calculated and tabulated as in Table 1.9 (the calculated value is 0.500007). The exact solution is 0.5. © 2010 Taylor & Francis Group, LLC 76 Process engineering and design using visual basic® Table 1.9 Solution of Example 1.28 n xn yn k1 k2 k3 k4 xn+1 yn+1 0 1 2 3 4 5 0 0.2 0.4 0.6 0.8 1.0 1 0.9615 0.8621 0.7353 0.6098 0.500007 0 −0.074 −0.119 −0.13 −0.119 −0.04 −0.103 −0.129 −0.126 −0.109 −0.038 −0.099 −0.127 −0.127 −0.111 −0.074 −0.119 −0.1296 −0.119 −0.0995 0.2 0.4 0.6 0.8 1.0 0.9615 0.8621 0.7353 0.6098 0.500007 Second-order differential equations Runge–Kutta–Nystrom method [1] This system computes the solution of the initial value problem for an equation y″ = f(x, y, y′), where the initial values x0, y0, and y0′, the step size h, and the number of steps N are known. The general method of solution is as follows: For n = 0, 1, 2, . . . , N − 1 Evaluate k1 = 0.5hf ( xn , y n , y n′ ) (1.139a) K = 0.5h( y n′ + 0.5k1 ) (1.139b) k 2 = 0.5hf ( xn + 0.5h, y n + K , y n′ + k1 ) (1.139c) k 3 = 0.5hf ( xn + 0.5h, y n + K , y n′ + k 2 ) (1.139d) L = h( y n′ + k 3 ) (1.139e) k 4 = 0.5hf ( xn + h, y n + L, y n′ + 2k 3 ) (1.139f) xn+1 = xn + h (1.139g) 1 y n + 1 = y n + h y n′ + (k1 + k 2 + k 3 ) 3 (1.139h) 1 ( k1 + 2 k 2 + 2 k 3 + k 4 ) 3 (1.139i) y n′ + 1 = y n′ + © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 77 Example 1.29 Solve the following second-order differential equation: d2 y = 0.5( x + y + y ′ + 2) at the value x = 1 dx 2 Initial values: x0 = 0, y0 = 0, y0′ = 0, and h = 0.2. SOLUTION For n = 0, xn = 0, yn = 0, yn′ = 0, and the value of h = 0.2. Using the preceding equations k1 = 0.1 K = 0.005 k2 = 0.11025 k3 = 0.110763 L = 0.022153 k4 = 0.122184 xn+1 = 0.2 yn+1 = 0.021401 y′n+1 = 0.221401 Similarly, other values can be calculated and tabulated as shown in Table 1.10. The solution up to four decimal places = 0.7183. Partial differential equations In chemical engineering, the solutions of partial differential equations are often required, particularly for the problems associated with heat conduction. Different numerical methods are used for solving different types of partial differential equations. Table 1.10 Solution of Example 1.29 Value n 0 1 2 3 4 5 xn 0 0.2 0.4 0.6 0.8 1 yn yn′ xn+1 yn+1 yn′+1 0 0.021401 0.091819 0.222109 0.425526 0.718258 0 0.221401 0.49182 0.82211 1.225526 1.718259 0.2 0.4 0.6 0.8 1 0.021401 0.091819 0.222109 0.425526 0.718258 0.221401 0.49182 0.82211 1.225526 1.718259 © 2010 Taylor & Francis Group, LLC 78 Process engineering and design using visual basic® Time row j+1 k Time row j h h Figure 1.17 Mesh size. Heat conduction problem [1] Generally, the Crank–Nicolson method is used for the numerical solution of heat conduction problems that are parabolic in nature. This method solves a mesh with mesh size h in the x-direction and mesh size k in the y-direction (time direction). It calculates the values of u at six points as shown in Figure 1.17. The equation used to solve the problem is 1 1 (ui , j + 1 − uij ) = (ui + 1, j − 2uij + ui −1, j ) k 2h2 + 1 (ui + 1, j + 1 − 2ui , j + 1 + ui −1, j + 1 ) 2h 2 (1.140) Using r = k/h2, Equation 1.140 can be modified to (2 + 2r )ui , j + 1 − r(ui + 1, j + 1 + ui −1, j + 1 ) = (2 − 2r )uij + r(ui + 1, j + ui −1, j ) (1.141) In Equation 1.141, the three values on the left side are unknown, whereas the three values on the right side are known. Using the initial and boundary conditions, most of the values can be made known except two values. Equation 1.141 is then solved for two consecutive values of m (m = 1,2, then m = 2,3, etc.). Under this situation, we will have two equations with two unknowns that can be solved easily. Example 1.30 Solve the problem in Example 1.17 using theoretical and numerical methods. The heat equation ∂u ∂ 2u = c2 2 ∂t ∂x Initial condition: u = x when t = 0 Boundary condition: u = 0 when x = 0 and x = l This problem is further simplified by assuming c = 1 and l = 1. © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 79 SOLUTION Theoretical solution The general solution assuming c = 1 and l = 1 can be obtained from Equation 1.104c as follows: ∞ u= 2 (−1)n + 1 −( nπ )2 t sin( nπx) e π n =1 n ∑ Value i = 0 Values of u = 0 for all grid points of n Value i = 1 (x = 0.3333) Value of j = 1 (t = 0.0278) For n = 1 sin (nπx) = 0.866 Exp (−n2π2t) = 0.7602 Subvalue = 0.6584 For n = 2 sin (nπx) = 0.866 Exp (−n2π2t) = 0.334 Subvalue = −0.1446 For n = 3 sin (nπx) = 0 Exp (−n2π2t) = 0.0848 Subvalue = 0 For n = 4 sin (nπx) = −0.866 Exp (−n2π2t) = 0.0124 Subvalue = 0.0027 It is clear from the preceding analysis that this infinite series is highly converging in nature, and it is adequate to calculate up to n = 4. The sum = 0.3287. Similarly, other values of j can be estimated as follows: Value of j = 2 (t = 0.0556) The sum = 0.2879 Value of j = 3 (t = 0.0833) The sum = 0.2319 Value of j = 4 (t = 0.1111) The sum = 0.1807 and so on. Using the procedure given earlier, other values for i = 2, and so on can be estimated easily. Numerical solution The nodal points are represented in Figure 1.18 as follows. For the solution, the values of h and k have been assumed as h = 1/3 and k = 1/36; therefore, r = 1/4. © 2010 Taylor & Francis Group, LLC 80 Process engineering and design using visual basic® u0,1 u0,0 u2,2 u1,2 u0,2 u3,2 u1,1 u2,1 u3,1 u1,0 u2,0 u3,0 Figure 1.18 Representation of nodal points. Equation 1.141 will be changed to −0.25ui −1, j + 1 + 2.5ui , j + 1 − 0.25ui + 1, j + 1 = 0.25ui −1, j + 1.5uij + 0.25ui + 1, j (1.142) From the initial and boundary conditions, we have u0,0 = 0; u1,0 = 1/3; u2,0 = 2/3 u0,1 = u0,2 = u3,0 = u3,1 = u3,2 = 0 For j = 0 For i = 1 − 0.25u0,1 + 2.5u1,1 − 0.25u2,1 = 0.25u0,0 + 1.5u1,0 + 0.25u2,0 or 2.5u1,1 − 0.25u2,1 = 0.6667 (1.143a) For i = 2 −0.25u1,1 + 2.5u2,1 − 0.25u3,1 = 0.25u1,0 + 1.5u2,0 + 0.25u3,0 or −0.25u1,1 + 2.5u2,1 = 1.0833 (1.143b) Solving Equations 1.143a and 1.143b, u1,1 = 0.3131 and u2,1 = 0.4646. For j = 1 For i = 1 −0.25u0,2 + 2.5u1,2 − 0.25u2,2 = 0.25u0,1 + 1.5u1,1 + 0.25u2,1 or 2.5u1,2 − 0.25u2,2 = 0.5858 © 2010 Taylor & Francis Group, LLC (1.144a) Chapter one: Basic mathematics 81 Table 1.11 Example 1.29 Node Point u1,1 u2,1 u1,2 u2,2 Theoretical Numerical analysis 0.3287 0.5094 0.2879 0.3494 0.3131 0.4646 0.268 0.3369 For i = 2 −0.25u1,2 + 2.5u2,2 − 0.25u3,2 = 0.25u1,1 + 1.5u2,1 + 0.25u3,1 or −u1,2 + 2.5u2,2 = 0.7752 (1.144b) Solving Equations 1.144a and 1.144b, u2,2 = 0.3369 and u1,2 = 0.268. The theoretically calculated values and values obtained through numerical analysis are presented in Table 1.11. Alternating direction implicit method [3] These methods are two-step methods involving the solution of the traditional systems of equations along the lines parallel to the x- and y-axes, at the first and second steps, respectively. In the Peaceman–Rachford alternating direction implicit (ADI) method, in the first step, it is advanced from tm to tm+1/2, and in the second step, it is advanced from tm+1/2 to tm+1. The ADI method is written as uim, j+ 1/2 − uim, j 1 1 = 2 ∂ 2x uim, j+ 1/2 + 2 ∂ 2y uim, j k/2 h h (1.145a) uim, j+ 1 − uim, j+ 1/2 1 1 = 2 ∂ 2x uim, j+ 1/2 + 2 ∂ 2y uim, j+ 1 k/2 h h (1.145b) and The equations can also be written as r 2 m + 1/2 r = 1 + ∂ 2y uim, j 1 − ∂ x ui , j 2 2 (1.146a) r 2 m+1 r 2 m + 1/2 1 − ∂ y ui , j = 1 + ∂ x ui , j 2 2 (1.146b) © 2010 Taylor & Francis Group, LLC 82 Process engineering and design using visual basic® The intermediate values can be obtained as r r uim, j+ 1/2 = 0.5 1 + ∂ 2y uim, j + 0.5 1 − ∂ 2y uim, j+ 1 2 2 (1.147) The boundary conditions to obtain the solution of Equation 1.146a can be obtained as r r uim, j+ 1/2 = 0.5 1 + ∂ 2y uim, j + 0.5 1 − ∂ 2y uim, j+ 1 i = 0,, M 2 2 (1.148) Eliminating uim, j+1/2 from Equations 1.146a and 1.146b r 2 r 2 m+1 r 2 r 2 m 1 − ∂ x 1 − ∂ y ui , j = 1 + ∂ x 1 + ∂ y ui , j 2 2 2 2 (1.149) Equation 1.149 can be written in the D’yakonov split form as r 2 * m+1 r 2 r 2 m 1 − ∂ x ui , j = 1 + ∂ x 1 + ∂ y ui , j 2 2 2 (1.150a) r 2 m+1 * m+1 1 − ∂ y ui , j = ui , j 2 (1.150b) Intermediate boundary conditions r u0* m, j + 1 = 1 − ∂ 2y ( g1 )mj + 1 2 (1.151a) r 2 * m+1 uM ∂ y ( g 2 )mj + 1 ,j = 1 − 2 (1.151b) and Example 1.31 Solve the following two-dimensional heat conduction equation: ∂u ∂ 2u ∂ 2u = + ∂t ∂x 2 ∂y 2 Initial condition: u(x, y, 0) = sin πx sin πy, © 2010 Taylor & Francis Group, LLC 0 ≤ x, y ≤ 1 Chapter one: Basic mathematics 83 Boundary conditions: u = 0, on the boundary for t ≥ 0 Use the ADI method. Assume h = 1/4 and k = 1/8 and integrate for one time step. SOLUTION The nodal points are xi = i , 0≤i≤4 4 yj = j , 0≤ j≤4 4 The initial and boundary conditions become πj πi ui0, j = sin sin 4 4 u0m, +j 1/2 = u4m, +j 1/2 = 0, 0 ≤ j ≤ 4 uim, 0+ 1 = 0 = uim, 4+ 1 , 0 ≤ i ≤ 4 The ADI method is given by 1 2 m + 1/2 1 2 m = 1 + ∂ y ui , j 1 − 16 ∂ x ui , j 16 1 2 m+1 1 2 m + 1/2 1 − 16 ∂ y ui , j = 1 + 16 ∂ x ui , j For m = 0, the solution for ui1,/j 2 − 1 1/2 9 1 1/2 1 0 7 1 0 ui − 1, j + ui1,/j 2 − ui + 1, j = ui , j − 1 + ui0, j + ui , j + 1 16 8 16 16 8 16 For j = 1 For i = 1 − 1 1/2 1 0 7 1 0 1 1/2 9 1/2 u0 ,1 + u1,1 − u2 , 1 = u1, 0 + u10,1 + u1, 2 16 8 16 16 8 16 For i = 2 − 1 1/2 1 0 7 1 0 1 1/2 9 1/2 u1,1 + u2 ,1 − u3 , 1 = u2 , 0 + u20,1 + u2 , 2 16 8 16 16 8 16 © 2010 Taylor & Francis Group, LLC 84 Process engineering and design using visual basic® For i = 3 1 1/2 1 0 7 1 0 1 1/2 9 1/2 u2 ,1 + u3 ,1 − u4 , 1 = u3 , 0 + u30,1 + u3 , 2 16 8 16 16 8 16 − Using boundary conditions 9/8 −1/16 0 0 u11,/12 (7 2 + 1)/(16 2) −1/16 u12/,12 = (14 + 2 )/(16 2 ) 9/8 u13/,112 (7 2 + 1)/(16 2 ) −1/16 9/8 −1/16 The solution is u11,/12 = u13/,12 = 0.46468 u12/,12 = 0.65716 For j = 2 For i = 1 − 1 1/2 1 0 7 1 0 1 1/2 9 1/2 u0 , 2 + u1, 2 − u2 , 2 = u1,1 + u10, 2 + u1, 3 16 8 16 16 8 16 For i = 2 − 1 1/2 1 0 7 1 0 1 1/2 9 1/2 u1, 2 + u2 , 2 − u3 , 2 = u2 ,1 + u20, 2 + u2 , 3 16 8 16 16 8 16 For i = 3 − 1 1/2 1 0 7 1 0 1 1/2 9 1/2 u2 , 2 + u3 , 2 − u4 , 2 = u3 ,1 + u30, 2 + u3 , 3 16 8 16 16 8 16 Using boundary conditions 9/8 −1/16 0 −1/16 9/8 −1/16 0 u11,/22 (7 2 + 1)/16 −1/16 u12/, 22 = (14 + 2 )/16 9/8 u13/,222 (7 2 + 1)/16 The solution is u11,/22 = u13/, 22 = 0.65716 u12/, 22 = 0.92936 © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 85 For j = 3 For i = 1 − 1 1/2 1 0 7 1 0 1 1/2 9 1/2 u0 , 3 + u1, 3 − u2 , 3 = u1, 2 + u10, 3 + u1, 4 16 8 16 16 8 16 For i = 2 − 1 1/2 1 0 7 1 0 1 1/2 9 1/2 u1, 3 + u2 , 3 − u3 , 3 = u2 , 2 + u20, 3 + u2 , 4 16 8 16 16 8 16 For i = 3 − 1 1/2 1 0 7 1 0 1 1/2 9 1/2 u2 , 3 + u3 , 3 − u4 , 3 = u3 , 2 + u30, 3 + u3 , 4 16 8 16 16 8 16 Using boundary conditions 9/8 −1/16 0 0 u11,/32 (14 + 2 )/32 −1/16 u12/, 32 = (7 2 + 1)/32 9/8 u13/,332 (14 + 2 )/32 −1/16 9/8 −1/16 The solution is u11,/32 = u13/, 32 = 0.46468 u12/, 32 = 0.65716 For the solution of ui1, j − 1 1 9 1 1 1 1/2 7 1 1/2 ui , j − 1 + ui1, j − ui , j + 1 = ui − 1, j + ui1,/j 2 + ui +1, j 16 8 16 16 8 16 For i = 1 For j = 1, 2, and 3 9/8 −1/16 0 −1/16 9/8 −1/16 0 u11,1 0.44767 −1/16 u11, 2 = 0.63310 9/8 u11, 3 0.44767 © 2010 Taylor & Francis Group, LLC 86 Process engineering and design using visual basic® The solution is u11,1 = u11, 3 = 0.43186 u11, 2 = 0.61074 This method is repeated to find the solution at each mesh point. Unit conversions The basic unit conversions are presented in Table 1.12. An electronic conversion table is also included in this chapter. Programming General notes for all programs • All programs have separate input and output frames. • Most input data entry cells are white—it means that user inputs are required. • Some input cells are yellow—it means that the values cannot only be calculated using this program, but can also be modified externally. • All output cells are red—it means that the values are calculated results and cannot be modified externally. • Both the SI and English units can be used for all programs, with the SI unit being the default. These units are fixed units and cannot be modified externally. Vessel The vessel.exe program has been developed to estimate the total and filled-liquid volumes and the dry and wet surface areas for horizontal, vertical, and inclined (e.g., slug catcher) vessels. For horizontal and vertical vessels, the program also calculates the weight of the material and the hydro test weight. Once the vessel program executes, the form shown in Figure 1.19 will appear. This form presents a general understanding of the program and has three menus: • Vessel • Project details • Help © 2010 Taylor & Francis Group, LLC free fall (g) ft/s2 grad min rad cm2 ft2 ha in.2 km2 m2 byte exabyte Gb Kb Mb degree acre bit Con­verted to cm/s2 Con­verted from © 2010 Taylor & Francis Group, LLC acre degree Computer 0.125 bit 1.0842E−19 1.16415E−10 0.00012207 1.19209E−7 Area Angle cm/s2 Con­verted from Acceleration 40468564.2 43560 0.4046863 6272640 0.004046856 4046.856 1.11111 60 0.0174533 0.001097 0.032808 Multiplied by Table 1.12 Unit Conversions nibble Petabyte terabyte yottabyte zettabyte mi2 mm2 perch square yd2 revolution sec m/s2 mm/s2 Con­verted to 0.25 1.11022E−16 1.13687E−13 1.03398E−25 1.05879E−22 continued 0.0015625 4046856422.4 160 435.6 4840 0.0027778 3600 0.01 10 Multiplied by Chapter one: Basic mathematics 87 μM/cm3 μM/L mmol/cm3 mmol/L g/m3 kg/cm3 kg/m3 mg/cm3 mg/m3 cm dm Furlong ft in. km lightyear m g/cm3 angstrom Con­verted to kmol/m3 Con­verted from Con­verted from © 2010 Taylor & Francis Group, LLC 1E−8 1E−9 4.97097E−13 3.28084E−10 3.93701E−9 1E−13 1.057023E−26 1E−10 Distance Density angstrom g/cm3 Concentration kmol/m3 1000,000 0.001 1000 1000 1000,000,000 1000 1000000 1 1000 Multiplied by Table 1.12 (continued) Unit Conversions μm Mil Mi mm nm nmi parsec yd oz/gal (E) oz/gal (U.S.) lb/ft3 lb/in.3 mmol/m3 mol/cm3 mol/L mol/m3 Con­verted to 0.0001 0.00000393701 6.213712E−14 0.0000001 0.1 5.39957E−14 3.24078E−27 1.09361E−10 160.35591 133.52381 62.42769 0.0361273 1000000 0.001 1 1000 Multiplied by 88 Process engineering and design using visual basic® g-force dyn © 2010 Taylor & Francis Group, LLC 0.00101972 0.0416667 6624.5833 1.840162 0.2339458 0.000064984 34.973 1.4572083 0.0242868 0.00040478 42 1.75 10,550,600,000 0.00000105506 10,758,575.59 0.000393 1055.03 erg GJ gf-cm hp-h J barrel/h cm3/h cm3/s ft3/h ft3/s gal(E)/d gal(E)/h gal(E)/min gal(E)/s gal(U.S.)/d gal(U.S.)/h 251.99 cal barrel/day Btu Force dyn Flow Energy barrel/day Btu N gal(U.S.)/min gal(U.S.)/s L/h L/s m3/d m3/h m3/s mL/h mL/s oz/h oz/s kJ kWh N-m lbf-ft Wh kcal 0.00001 continued 0.0291667 0.000486111 6.6245833 0.001840162 0.15899 0.00662458 0.00000184 6624.58333 1.840162 224 0.0622222 1.05506 0.00029307 1055.06 778.1693 0.29307 0.25199 Chapter one: Basic mathematics 89 fc lx gr g kg μg mg Btu/min cal/min Flame Carat Btu/h Con­verted from © 2010 Taylor & Francis Group, LLC 0.016667 4.199833 3.08647 0.2 0.0002 200000 200 4 43.055642 Power Btu/h Mass carat Light flame Heat transfer coefficient 0.00027778 Btu/(h⋅ft2⋅F) 0.488251 4882.51 0.000135625 1.35625 1E−8 0.01 kN mN Btu/(s⋅ft2⋅F) cal(h⋅cm2⋅C) cal/(h⋅m2⋅C) cal/(s⋅cm2⋅C) cal/(s⋅m2⋅C) 0.00000101972 Multiplied by kg-force Con­verted to Btu/(h⋅ft2⋅F) Con­verted from Table 1.12 (continued) Unit Conversions kcal/min kW oz lb stone t (metric) m-cd kcal/(h⋅m2⋅C) kJ/(h⋅m2⋅C) kW/(m2⋅K) W/(m2⋅K) lb-force oz-force Con­verted to 0.00419993 0.00029281 0.0070548 0.000440925 0.000031494 0.0000002 43.055642 4.88251 20.44175 0.005678263 5.678263 0.000002248 0.0000359694 Multiplied by 90 Process engineering and design using visual basic® bar in. Hg kg/cm2 kg/m2 kPa MPa cm/s ft/h ft/s km/h km/s mN/m N/m °F K atm cm/h dyn/cm °C hp kcal/h © 2010 Taylor & Francis Group, LLC °C * 1.8 + 32 °C + 273.15 1 0.001 Speed cm/h Pressure atm Temperature °C Surface Tension dyn/cm 0.000277778 0.0328084 0.000009113 0.00001 2.777778E−9 1.01325 29.9213 1.0332 10332 101.325 0.101325 0.000392665 0.251996 °R pdl/ft kn m/h m/s mi/h mi/s mbar mm Hg lb/ft2 lb/in.2 torr lb-ft/min W continued °C * 1.8 + 491.67 0.002205 5.399E−6 0.01 2.777778E−6 6.21371E−6 1.72603E−9 1013.25 760 2116.224 14.696 760 12.958 0.2928104 Chapter one: Basic mathematics 91 Con­verted to Btu/(s⋅ft⋅F) cal/(h⋅cm⋅C) cal/(h⋅m⋅C) cal/(s⋅cm⋅C) cal/(s⋅m⋅C) d decade fortnight h leap year millennium gf-cm kgf-m kN-m MN-m mN-m Con­verted from Btu/(h⋅ft⋅F) century dyn-cm Con­verted from © 2010 Taylor & Francis Group, LLC 0.001019716 1.01972E−8 1.0E−10 1.0E−13 0.0001 36525 10 2608.9286 876600 25 0.1 Torque dyn/cm Time century Thermal Conductivity 0.00027778 Btu/(h⋅ft⋅F) 14.8813 1488.13 0.00413369 0.4133694 Multiplied by Table 1.12 (continued) Unit Conversions N-m ouncef-ft poundf-ft poundf-in. ms min month s week year kcal/(h⋅m⋅C) kJ/(h⋅m⋅C) kW/(m⋅K) W/(m⋅K) Con­verted to 1.0E−7 1.180097E−6 7.37561E−8 8.850728E−7 3.15576E12 52596000 1200 3155760000 5217.857 100 1.48813 6.229312 0.00173036 1.73036 Multiplied by 92 Process engineering and design using visual basic® g/(cm⋅s) kg/(m⋅h) lb/(ft⋅h) lb/(ft⋅s) mN⋅s/m2 cm3 ft3 in.3 m3 yd3 cup drop gal (E) gal (U.S.) cP barrel 158,990 5.6147 9702.202 0.15899 0.207952 672.0064 2,451,625.8 34.974 42 0.01 3.6 2.42 0.00067222 1 Volume barrel Viscosity cP L μL mL oz (E) oz (U.S.) pt (E) pt (U.S.) tablespoon teaspoon milli Pas⋅s N⋅s/m2 Pas⋅s P 158.99 158,990,000 158,990 5595.678 5376.006 279.7834 336.0053 10,752.012 32,256.036 1 0.001 0.001 0.01 Chapter one: Basic mathematics © 2010 Taylor & Francis Group, LLC 93 94 Process engineering and design using visual basic® Figure 1.19 Vessel. The vessel menu gives the following calculation options: • Horizontal • Inclined • Vertical Program limitations The following program limitations may be noted: • The inclined vessel calculation is typically designed for a pipe without dished ends. • If the filled length of the inclined vessel (Figure 1.22) is less than the total length, the value of the height must be entered as 0 (default value). • For the inclined vessel, any value of the height will ignore the value of the length. The Project details menu will open a project details form as shown in Figure 1.20. This form will enable one to enter the general details of the © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 95 Figure 1.20 Project details. project and the calculations. This also includes the calculation done by and the calculation checked by options along with dates. Once the details are entered, pressing the OK button will transfer the information to the main vessel form. Horizontal Once the Horizontal menu executes, the form shown in Figure 1.21 will appear. This form is designed for horizontal vessel calculations. This form has two menus: • File • Unit The File menu is further divided into four submenus: (1) Open, (2) Save, (3) Print, and (4) Exit. The Unit menu is used to select a proper unit for calculations. Both the SI and Eng units can be used for calculation, the default unit being SI. It is not possible to change the unit of individual items. Data entry During data entry, care must be taken while entering the units. Because the basic units are fixed, the data must be entered for the unit shown in the form. The tab key is preferably used for data entry. The tab key will allow © 2010 Taylor & Francis Group, LLC 96 Process engineering and design using visual basic® Figure 1.21 Horizontal vessel form. data entry in a sequential manner, and once the data entry is complete, the tab key will select the Calculate button for the calculation. The data entry is simple; however, the program allows the following options: Type of dish end: 1. Elliptical 2. Hemispherical The selection of dish ends has a significant impact on the calculation of the volume, the surface area, and the weight. © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 97 Material of construction: 1. Aluminum 2. Copper 3. Gold 4. Iron 5. Mild steel 6. Monel 7. Nichrome 8. Platinum 9. Stainless steel The material of construction is only used to estimate the vessel weight and requires plate thickness for estimation. It must be noted that only the shell thickness is entered, and it is assumed that the dish end thickness is the same as the shell thickness. This may not be correct for all cases, and the designer should keep this in mind. However, for a preliminary estimate, the calculated weight will be adequate. In the weight calculation, a 5% margin is added. This addition is mainly to account for the weight of nozzles, man way, and so on. For a particular material in the list, the density is automatically selected by the program. However, it is not possible to modify the density. In case the material is not present in the list, it is preferable to select one with closely matching density. Buttons 1. Calculate 2. Cancel The Calculate button is used to calculate the parameters after the completion of data entry. If the tab key is used for data entry, this will automatically select the Calculate button once the data entry is complete. Pressing the Calculate button will calculate the parameters. The Cancel button is used to cancel the execution. Once the Cancel button is pressed, the program will be transferred to the main menu for further calculation options. Inclined The general format of the inclined vessel calculation is presented in Figure 1.22. The general data entry and calculation principles are as discussed for the horizontal vessel calculation. However, the following points should be considered: • The height indicated on the left side of the form is the height of the liquid at the furthest left side of the inclined vessel. The default value © 2010 Taylor & Francis Group, LLC 98 Process engineering and design using visual basic® Figure 1.22 Inclined vessel form. of the height is zero. In most slug catcher type of calculations, the volume is calculated for partially filled vessels, and for such calculations, the height must be zero. The calculation is based on the total length and the length as indicated in the form. In general, the value of the length is smaller than the value of the total length, and the value of the height must be zero. If any positive value is entered for the height, the program will ignore the value entered for the length and will calculate the volume and surface area based on the total length and height. • Dished ends have not been used in this calculation. In general, for the slug catcher type of calculations, the impact of dished ends is negligible. The inclined calculation does not include the calculation of the weight, and material selection is not required for this. The calculation is only for the total and filled volumes and the total and wet surface areas. © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 99 Vertical The general format of the vertical vessel calculation is presented in Figure 1.23. The general data entry and calculation principles are as discussed for the horizontal vessel calculation. However, the following points should be considered: Figure 1.23 Vertical vessel form. © 2010 Taylor & Francis Group, LLC 100 Process engineering and design using visual basic® Figure 1.24 Conversion. • The height indicated in the form is the height above the tan line of the vessel as almost all calculations are like this. The dished end volume added is based on the type of dished ends. In case a negative height is entered, the program will calculate the dished end volume and subtract the negative shell volume. The result will not represent the actual volume of the liquid in the dished end. • For an elliptical dished end, the dished end volume is calculated for a dished end height 0.25 times the vessel diameter, and for a hemispherical dished end, the volume is calculated for a dished end height 0.5 times the vessel diameter. Conversion (Figure 1.24) Unit conversion has been divided into 23 subgroups, namely • Acceleration • Angle © 2010 Taylor & Francis Group, LLC Chapter one: Basic mathematics 101 • Area • Computer • Concentration • Density • Distance • Energy • Flow • Force • Heat transfer coefficient • Light • Mass • Power • Pressure • Speed • Surface tension • Temperature • Thermal conductivity • Time • Torque • Viscosity • Volume Program limitations The following program limitations may be noted: • The program calculates the output values automatically when the input values are changed. • The program does not calculate the output values when the input/ output sections are changed. • If the section of the input/output parameters is changed, the value in the input value cell must be re-entered to calculate the output value. • Large numbers of commonly used units have been selected for each subgroup for conversion. Procedure The procedure for conversion is as follows: • Select the required subgroup (from 23 radio buttons). • Available units will appear in both the input and output boxes. • Select the input unit; this is the unit that is to be converted. The input value will indicate the selected unit. • Select the output unit; this is the unit to be converted to. The output value will indicate the selected unit. © 2010 Taylor & Francis Group, LLC 102 Process engineering and design using visual basic® • Enter the value in the input value text box. The output values will be calculated automatically. The output value text box is read-only and cannot be modified externally. The input value is to be modified every time a calculation is required. Changing unit selection will not automatically recalculate the output value. References 1. Kreyszig, E., Advanced Engineering Mathematics, 7th ed., John Wiley and Sons, New York, 1993. 2. Grossman, S.I., Multivariable Calculus, Linear Algebra and Differential Equations, 3rd ed., Sunders College Publishing, 1994. 3. Jain, M.K., Iyengar, S.R.K., and Jain, R.K., Numerical Methods for Scientific and Engineering Computation, Wiley Eastern Limited, New Delhi, 1985. © 2010 Taylor & Francis Group, LLC chapter two Thermodynamics Introduction The thermodynamic approach was developed in the nineteenth century for a better understanding of the change in the energy in steam engines. Certain principles were developed, known as the first and second laws of thermodynamics, to mathematically correlate the changes in heat and energy during a particular process. An understanding of the above is extremely important for all branches of science and engineering. The mathematical correlations developed help us to understand how the physical properties and energies are changed during operations such as compression, expansion, and so on. Heat, work, and energy From our experience, we know that if two bodies of different temperatures are brought into contact with each other, the heat is transferred from the hot body to the cold body. In fact, the transfer of heat is directly proportional to the difference in temperatures between the two bodies. A popular unit of heat is the calorie, which is defined as the heat required to increase the temperature of 1 g of water by 1°C. The calorie is now recognized as a unit of energy. In the SI unit, the unit of energy is the joule, which is equal to 1 Nm or the mechanical work done when a force of 1 N acts through a distance of 1 m. Thus, mathematically, the work can be defined as a product of force (N) and displacement (m). Force Force is derived from Newton’s second law as a product of mass and acceleration. The SI unit of force is N. Mathematically F = ma (2.1) While the mass of a body is a scalar quantity that is independent of location, force is a vector quantity that depends on the acceleration due to gravity at any particular location. For example, if an astronaut weighs © 2010 Taylor & Francis Group, LLC 1 2 Process engineering and design using visual basic® 750 N on Earth (a = 9.81 m/s2), his mass on Earth will be 76.45 kg and his weight on the moon will be 127.67 N (assuming that the acceleration on the moon is 1.67 m/s2). Kinetic and potential energy The concept of work, kinetic energy, and potential energy was developed through Newton’s laws of motion. The work done is defined as dW = madl (2.2) Considering the definition of acceleration as velocity over time and velocity as length over time, Equation 2.2 can be modified as dW = mvdv (2.3) v 2 − v12 mv 2 W = m 2 = ∆ 2 2 (2.4) Integrating The term ½ mv2 is called the kinetic energy. EK = 1 mv 2 2 (2.5) If a body of mass m is raised by a distance z, the work done can be defined as W = Δ(mzg) (2.6) The term mzg is called the potential energy: EP = mzg (2.7) First law of thermodynamics The first law of thermodynamics defines the relationship between heat and work. According to the first law, if heat is produced from work, there will be a relationship between the work done and heat produced or vice © 2010 Taylor & Francis Group, LLC Chapter two: Thermodynamics 3 versa. Alternatively, energy can exist in different forms and the total quantity of energy is always constant. If energy disappears in one form, it will appear in some other form simultaneously. According to the first law of thermodynamics, the relationship among internal energy, heat, and work in a closed system can be expressed mathematically as dU = dQ + dW (2.8) Phase rule In a heterogeneous system, phase rule defines how the degree of freedom (F) relates to the number of components (C) and the number of phases (P), such as F=C−P+2 (2.9) As an example, water exists in two phases (liquid and vapor) at 101.3 kPa and 100°C. In this case, the degree of freedom is 1, meaning that when water exists in the vapor and liquid phases and at 101.3 kPa pressure, the temperature cannot be changed from 100°C. If we add another component, say, glycol, the degree of freedom will be 2. This means that even at 101.3 kPa pressure and under a two-phase condition, the temperature can be a variable depending on the composition. Reversible process A system can change from one state to another through either a reversible or an irreversible process. In a reversible process, the change occurs slowly in minute quantities till the total specified change happens. If an expansion is carried out from an initial pressure P1 to a final pressure P2 (volume from V1 to V2), the reversible work (Wr) and irreversible work (Wir) done at constant temperature are Wr = RT ln V2 P = RT ln 1 V1 P2 P Wir = P2 (V2 − V1 ) = RT 1 − 2 P1 © 2010 Taylor & Francis Group, LLC (2.10) (2.11) 4 Process engineering and design using visual basic® The difference between reversible work and irreversible work can be defined as Wr − Wir = RT (P1 − P2 )2 P1P2 (2.12) The right-hand side of Equation 2.12 is a positive quantity, meaning that the work done in a reversible process is always greater than the work done in an irreversible process. Example 2.1 1 mol air at 300 K is expanded from 500 to 100 kPa. Estimate the work done in both reversible and irreversible processes. SOLUTION Reversible work Wr = 8.314 * 300 * ln(5) = 4014.3 J Irreversible work Wir = 8.314 * 300 * (1 − 0.2) = 1995.4 J Heat content or enthalpy The enthalpy of a system is defined as H = U + PV (2.13) dH = dU + PdV + VdP (2.14) In differential form Heat capacity at constant volume and constant pressure The heat capacity at constant volume is defined as the change in internal energy with the temperature at constant volume, and the heat capacity at contact pressure is defined as the change in enthalpy with the temperature at constant pressure. Mathematically [1] ∂U CV = ∂T V © 2010 Taylor & Francis Group, LLC (2.15a) Chapter two: Thermodynamics 5 ∂H CP = ∂T P (2.15b) The values of two specific heats are not the same, and the relationship between the two values can be expressed as ∂H ∂U CP − CV = − ∂T P ∂T V ∂U ∂U ∂V = + P − ∂T P ∂T P ∂T T V ∂U ∂U ∂U ∂V ∂V = + + P − ∂T V ∂V T ∂T P ∂T P ∂T V (Since U = f(T,V)) ∂U ∂V = + P ∂V T ∂T P For ideal gas, (∂U/∂V)T = 0 Therefore R ∂V CP − CV = P = P* =R ∂T P P (2.16) Isothermal process An isothermal process is a process when the temperature remains constant. The work done to increase an ideal gas pressure from P1 to P2 is defined as PV = constant W = RT ln P2 P1 (2.17) Adiabatic process An adiabatic process is the process when there is no heat transfer between the system and the surrounding area (dQ = 0). For this case, the work done © 2010 Taylor & Francis Group, LLC 6 Process engineering and design using visual basic® to increase the system pressure from P1 to P2 is defined as [1] PV γ = constant ( γ − 1)/ γ RT1 P2 − 1 γ − 1 P1 W = (2.18) Example 2.2 1 kmol air is compressed from 100 kPa and 25°C to 500 kPa. Calculate the work done if the compression is (a) isothermal and (b) adiabatic. The ratio of specific heats for air is 1.4. SOLUTION a. The work done for an isothermal process W = RT ln P2 = 8.314 * 298 * 1.609 = 3987.5 kJ P1 b. The work done for an adiabatic process W = 8.314 * 298 (1.584 − 1) = 3616.1 kJ 0.4 Equation of state Boyle’s law and Charles’s law We can assume a cubical box with each side of length l (as shown in Figure 2.1) and whose three axes are x, y, and z. The velocity v can be defined as v 2 = x 2 + y 2 + z2 y B z Figure 2.1 Pressure in a cube. © 2010 Taylor & Francis Group, LLC (2.19) c x A Chapter two: Thermodynamics 7 The momentum of a gas particle, with mass m, in the x-direction will be mx, and if we assume that the gas molecule rebounds in an elastic manner, the change in momentum will be 2mx. Now, with the distance between the two opposite walls equal to l, the number of collisions per unit time will be x/l. The change in momentum per unit time will be 2mx2/l. Considering all the sides, the total momentum imparted per unit time will be 2m ( x 2 + y 2 + z 2 ) 2mv 2 = l l Now, considering N number of molecules, the total force exerted on all the walls will be F= 2mNv 2 l (2.20) Again, pressure P can be defined as P= 1 mNv 2 F = 6l 2 3 V (2.21a) 1 mNv 2 3 (2.21b) or PV = where V = volume of the cube Now PV = 2 1 N * mv 2 3 2 For a given mass of gas, 2/3 N and ½ mv2 (kinetic energy) are constant if the temperature is constant. Otherwise, PV is constant when the temperature is constant. This is Boyle’s law. Again, at constant pressure, V/T is constant, which is Charles’s law. Combining Boyle’s and Charles’s laws PV = RT where R = universal gas constant © 2010 Taylor & Francis Group, LLC (2.22) 8 Process engineering and design using visual basic® Equation of state for real gas Equation 2.22 is valid for a perfect gas. In practice, the equation is required to be modified to represent the actual world. There are large numbers of semi-empirical correlations available in the literature, and they are generally developed following identical logics. A gas molecule experiences uniform attraction in all directions when located at the center of a container. However, the gas molecule close to the wall will experience an unbalanced attraction (pulling inward). This will reduce the momentum of the gas molecule. If this decrease in pressure is denoted as p/, then the ideal pressure will be P + p/, where P is the actual observed pressure. Similarly, the gas molecule will occupy some space within the container and the actual volume will be reduced to some extent. If the reduction in volume is b, the actual volume will be V – b. With these modifications, the general equation is modified as (P + a)(V − b) = RT (2.23) The first equation of state (EOS) was developed by J.D. van der Waals in 1873 and presented as [1] a P + 2 (V − b) = RT V (2.24) where the values of a,b typically depend on the pressure and temperature conditions. Changing the values to zero, the equation will modify into the equation of an ideal gas. Various EOSs were developed to establish calculation procedures for a and b. Out of a large number of EOSs, the following two are extensively used in process engineering calculations: • Peng–Robinson (PR) [2] • Soave–Redlich–Kwong (SRK) [3] Comparison between PR and SRK EOSs The comparison between PR and SRK EOSs is presented in Table 2.1. Acentric factor One important parameter presented in the EOS is the acentric factor ω. The acentric factor is used to correlate physical and thermodynamic properties. Mathematically, the acentric factor is defined as [4] ω = − log pr* − 1.000 © 2010 Taylor & Francis Group, LLC (2.26) Chapter two: Thermodynamics 9 Table 2.1 Comparison between PR and SRK EOSs PR P= SRK RT a − V − b V (V + b) + b(V − b) Z 3 − (1 − B)Z 2 + ( A − 2B − 3B2 )Z Equation number RT a − V − b V (V + b) (2.25a) Z3 − Z2 + (A − B − B2)Z − AB = 0 (2.25b) P= − ( AB − B2 − B3 ) = 0 where b= ∑x b ∑x b i i i i i =1 i =1 bi = 0.077796 (2.25c) N N RTci Pci N xi ai 0.5 a= i =1 ∑ 2 0.08664 RTci Pci N xi ai 0.5 i =1 ∑ 2 aciαi ai = aciαi (2.25d) (2.25e) (2.25f) (RTci )2 Pci (2.25g) α 0i .5 = 1 + mi (1 − T 0ri.5 ) 1 + mi (1 − T ri0.5 ) (2.25h) mi = 0.37464 + 1.54226 ω i − 0.26992ω 2i 0.48 + 1.574ω i − 0.176ω 2i (2.25i) aci = 0.457235 (RTci )2 Pci 0.42747 A= aP (RT )2 aP (RT )2 (2.25j) B= bP RT bP RT (2.25k) Note: T = absolute temperature, P = absolute pressure, V = specific volume, Z = compressibility, Tc = critical temperature, Pc = critical pressure, Tr = reduced temperature, ω = acentric factor, a,b = parameters used in the equations, a(T) = parameter used in the equations, ac = value of a(T) at T = Tc, α = correction factor, a/ac, m = slope of α0.5 against Tr0.5, i = component i in the mixture, N = number of components. © 2010 Taylor & Francis Group, LLC 10 Process engineering and design using visual basic® where pr* = reduced vapor pressure, p*/pc p* = vapor pressure at T = 0.7Tc, kPaA pc = critical pressure, kPaA T = temperature, K Tc = critical temperature, K For hydrocarbon mixtures, the acentric factor is calculated as N ω= ∑x ω i i (2.27) i =1 where N = number of components ωi = acentric factor of component i xi = mole fraction of component i Other important factors used to establish the physical and thermodynamic properties of hydrocarbon mixtures are the Watson characterization factor K and the critical compressibility factor zc. Table 2.2 presents the values of the acentric factor, the Watson characterization factor, and the critical compressibility factor. A complete list is available in the API Technical Data Book [4]. Vapor pressure of pure components The vapor pressure of pure components can be calculated using the Antoine equation. The Antoine equation defines the vapor pressure of pure components as [5] ln(P) = A − B T+C (2.28) where P = vapor pressure, mmHg T = temperature, K A,B,C = constants in the Antoine equation For the commonly used hydrocarbon vapor, the values of constants A, B, and C along with critical pressures and temperatures are presented in Table 2.3. A more complete list is available in the literature [1,5]. © 2010 Taylor & Francis Group, LLC Chapter two: Thermodynamics 11 Table 2.2 Acentric Factors, Watson Characterization Factors, and Critical Compressibility Factors of Pure Substances Watson characterization factor (K) Critical compressibility factor (zc) Components Acentric factor (ω) Hydrogen Nitrogen Oxygen Carbon monoxide Carbon dioxide Sulfur dioxide Hydrogen sulfide Water Ammonia Nonhydrocarbons −0.2153 0.04 0.0218 0.0663 0.23894 0.2451 0.081 0.344 0.252 0.305 0.292 0.288 0.295 0.274 0.269 0.284 0.229 0.242 Methane Ethane Propane n-Butane i-Butane n-Pentane i-Pentane 2,2-Dimethylpropane n-Hexane i-Hexane 3-Methylpentane 2,2-Dimethylbutane 2,3-Dimethylbutane n-Heptane i-Heptane 3-Methylhexane 3-Ethylpentane 2,2-Dimethylpentane 2,3-Dimethylpentane 2,4-Dimethylpentane 3,3-Dimethylpentane 2,2,3-Trimethylbutane n-Octane Paraffins 0.011498 19.54 0.0986 19.49 0.1524 14.69 0.201 13.50 0.18479 13.78 0.25389 13.03 0.2224 13.01 0.1964 13.36 0.3007 12.78 0.2781 12.82 0.2773 12.65 0.2339 12.77 0.2476 12.62 0.3494 12.68 0.3282 12.72 0.3216 12.55 0.3094 12.36 0.2879 12.60 0.2923 12.35 0.3018 12.72 0.2672 12.42 0.2503 12.38 0.3962 12.68 0.288 0.284 0.280 0.274 0.282 0.269 0.270 0.269 0.264 0.267 0.273 0.272 0.269 0.263 0.261 0.255 0.268 0.267 0.256 0.265 0.273 0.266 0.259 continued © 2010 Taylor & Francis Group, LLC 12 Process engineering and design using visual basic® Table 2.2 (continued) Acentric Factors, Watson Characterization Factors, and Critical Compressibility Factors of Pure Substances Watson characterization factor (K) Critical compressibility factor (zc) Components Acentric factor (ω) i-Octane n-Nonane n-Decane 0.3768 0.4368 0.4842 12.64 12.64 12.64 0.261 0.255 0.249 Cyclopropane Cyclobutane Cyclopentane Methylcyclopentane Ethylcyclopentane Cyclohexane Methylcyclohexane Ethylcyclohexane Cyclooctane Napthenes 0.1348 11.93 0.1866 11.45 0.1943 10.94 0.2302 11.32 0.2715 11.39 0.2149 11.00 0.2350 11.31 0.2455 11.36 0.2536 10.89 0.274 0.274 0.273 0.272 0.269 0.273 0.269 0.270 0.270 Ethylene Propylene 1-Butene cis-2-Butene trans-2-Butene i-Butylene 1-Pentene cis-2-Pentene trans-2-Pentene 1-Hexene cis-2-Hexene trans-2-Hexene 1-Heptene trans-2-Heptene 1-Octene trans-2-Octene 1-Nonene 1-Decene 0.0852 0.1424 0.1867 0.2030 0.2182 0.1893 0.2330 0.2406 0.2373 0.2800 0.2722 0.2613 0.3310 0.3389 0.3747 0.3384 0.4171 0.4645 Olefins © 2010 Taylor & Francis Group, LLC 14.21 13.04 12.61 12.93 13.01 12.65 12.48 12.61 12.50 12.30 12.45 12.41 12.39 12.40 12.36 12.42 12.46 0.277 0.275 0.276 0.272 0.274 0.275 0.270 0.279 0.279 0.265 0.266 0.267 0.262 0.256 0.256 0.260 0.249 0.247 Chapter two: Thermodynamics 13 Table 2.2 (continued) Acentric Factors, Watson Characterization Factors, and Critical Compressibility Factors of Pure Substances Watson characterization factor (K) Critical compressibility factor (zc) Components Acentric factor (ω) Propadiene 1,2-Butadiene 1,3-Butadiene 1,2-Pentadiene 1,3-Pentadiene 2,3-Pentadiene 0.1594 0.2509 0.1932 0.2235 0.0837 0.2194 12.58 12.16 12.51 11.90 12.21 11.91 0.271 0.267 0.270 0.256 0.285 0.253 Acetylene Methylacetylene Ethylacetylene Acetylenes 0.1873 16.72 0.2161 12.34 0.0500 12.14 0.271 0.276 0.270 Benzene Toluene Ethylbenzene o-Xylene m-Xylene p-Xylene n-Propylbenzene i-Propylbenzene n-Butylbenzene i-Butylbenzene Napthalene Aromatics 0.2108 9.74 0.2641 10.11 0.3036 10.33 0.3127 10.27 0.3260 10.41 0.3259 10.44 0.3462 10.59 0.3377 10.54 0.3917 10.82 0.3811 10.84 0.3019 9.32 0.271 0.264 0.263 0.263 0.259 0.260 0.265 0.262 0.261 0.256 0.269 Diolefins Source: Adapted from Technical Data Book—Petroleum Refining, 4th ed., American Petroleum Institute, Washington, D.C., 1982. Vapor pressure of water A much better correlation can be developed for the estimation of water vapor pressure by using the following equation: P = 10(7.97−1668.2/(T−45.2)) where P = vapor pressure of water, mmHg T = temperature, K © 2010 Taylor & Francis Group, LLC (2.29) 14 Process engineering and design using visual basic® Table 2.3 Values of Antoine Constants and Critical Pressures and Temperatures Constant in Antoine equation Temperature limits (°C) Compo­ nents A C Min Max Pressure Temperature (kPa) (K) Methane 15.2243 597.84 −7.16 −180 −153 4640.7 190.7 Ethane Propane n-Butane i-Butane n-Pentane n-Hexane n-Heptane n-Octane n-Nonane n-Decane Carbon monoxide Carbon dioxide Hydrogen sulfide Nitrogen Oxygen Hydrogen Water 15.6637 15.726 15.6782 15.5381 15.8333 15.8366 15.8737 15.9426 15.9671 16.0114 14.3686 1511.42 1872.46 2154.9 2032.73 2477.07 2697.55 2911.32 3120.29 3291.45 2456.8 530.22 −17.16 −25.16 −34.42 −33.15 −39.94 −48.78 −56.51 −63.63 −71.33 −78.67 −13.15 −143 −109 −78 −86 −53 −28 −3 19 39 57 −210 −74 −24 17 7 57 97 127 152 179 203 −165 4883.9 4256.7 3796.6 3647.6 3375.1 3031.6 2736.8 2490 2290 2110 3499 305.4 369.9 425.2 408.1 469.6 507.9 540.2 568.7 594.6 617.7 132.9 22.5898 3103.39 −0.16 −119 −69 7370 304.1 16.1040 1768.69 −26.06 −83 −43 9007.8 373.6 14.9542 15.4075 13.6333 18.3036 588.72 734.55 164.9 3816.44 −6.6 −6.45 3.19 −46.13 −219 −210 −259 11 −183 −173 −248 168 3394.4 5043 1313 22,120 126.2 154.6 33.19 647.3 B Critical conditions Vapor pressure calculation using EOSs The vapor pressure of pure components can be calculated by estimating the fugacity of the component. The general equation of fugacity for pure components SRK EOS f A Z + B = Z − 1 − ln(Z − B) − ln P B Z (2.30) f Z + 2.414B A = Z − 1 − ln(Z − B) − ln P 2 2B Z − 0.414B (2.31) ln PR EOS ln © 2010 Taylor & Francis Group, LLC Chapter two: Thermodynamics 15 Vapor pressure is the equilibrium pressure, where fL = fV where f L = fugacity of the liquid phase f V = fugacity of the vapor phase P = pressure Z = compressibility B = parameter defined in Table 2.1 Example 2.3 Estimate the vapor pressure of n-hexane at 31.6°C (304.75 K). SOLUTION Use the Antoine equation A = 15.8366 B = 2697.55 C = −48.78 ln(P) = 15.8366 − 2697.55 = 5.29806 304.75 − 48.78 or P = 199.95 mmHg = 26.66 kPa Use PR EOS Critical pressure = 3025 kPa Critical temperature = 507.6 K Acentric factor = 0.3047 Temperature = 304.75 K Parameters are calculated as ac = 0.457235 (8.314 * 507.6)2 = 2692.04 3025 mi = 0.37464 + 1.54226 * 0.33047 − 0.26992 * 0.3047 2 = 0.8195 Tri = 304.75/507.6 = 0.6 α = (1 + 0.8195 * (1 − 0.6 0.5 ))2 = 1.4031 a = ac * α = 3777.15 b = 0.077796 8.314 * 507.6 = 0.1085 3025 © 2010 Taylor & Francis Group, LLC (2.32) 16 Process engineering and design using visual basic® The vapor pressure will be the pressure at which the fugacity of the liquid and vapor phases will be the same. This is calculated by assuming an initial value and then modifying the value suitably. This calculation converges very rapidly. Assumption 1: Vapor pressure is 1 kPa A= 3777.15 * 1 = 0.0005884 (8.314 * 304.75) 2 B= 0.1085 * 1 = 0.000043 304.75 * 8.314 Using the above values of A and B, the cubic equation will be Z3 − 0.99996Z2 + 0.000503Z − 2.337 * 10−8 = 0 The above equation has three real roots; the highest value is the compressibility of the vapor phase and the lowest one is the compressibility of the liquid phase: Compressibility of vapor phase = 0.99945 Compressibility of liquid phase = 0.000052 The fugacity can be calculated as Liquid-phase fugacity = 26 kPa Vapor-phase fugacity = 1 kPa Since the values are not the same, the initial pressure is to be modified and recalculated. This calculation is repeated till the liquid and vapor phase fugacity difference is <0.00001. The estimated vapor pressure is 26.7 kPa (200.3 mmHg). The calculated vapor pressure of hexane at 31.6°C: Using the Antoine equation = 26.66 kPa (199.95 mmHg) Using PR EOS = 26.7 kPa (200.3 mmHg) Literature value [6] = 200 mmHg Second law of thermodynamics The first law of thermodynamics states that the energy is interchangeable, but it did not provide any indication whether change will occur at all or to what extent it will occur. The second law provides the essential conditions to make a change possible. • The change from heat to work is possible through a thermodynamic engine, which works in a reversible cyclic process. © 2010 Taylor & Francis Group, LLC Chapter two: Thermodynamics 17 • The thermodynamic engine must work between two temperatures, taking up heat from the higher-temperature source, converting a portion into work, and giving up the rest of the heat to the lowertemperature sink. Carnot’s cycle Carnot’s cycle (Figure 2.2) can be used to explain how and to what extent work is obtained from heat. In this cycle, the engine starts at a point A and comes back to the same point. Alternatively, the engine must operate in a complete cycle. Also, maximum work can be obtained when every step operates in a reversible fashion. In the above cycle, the following operations can be analyzed. Operation 1: Gas is allowed to expand, isothermally and reversibly, from point A to point B (volume changes from V1 to V2). For an ideal gas, the heat absorbed is equal to the work done. Q1 = RT1 ln V2 V1 (2.33) Operation 2: The gas is then allowed to expand from V2 to V3 adiabatically and reversibly till the temperature drops to the temperature of the sink. Owing to the adiabatic process, the heat exchange is 0. The work done (W1) by the gas can be calculated as W1 = CV (T1 − T2) (2.34) Operation 3: The gas is compressed isothermally and reversibly from V3 to V4. For an ideal gas, the heat given out is equal to the work done by the gas: Q2 = RT2 ln A V1 V4 V3 T1 (2.35) B V2 P D V4 T2 V Figure 2.2 Carnot’s cycle. © 2010 Taylor & Francis Group, LLC C V3 18 Process engineering and design using visual basic® Operation 4: The gas is compressed adiabatically and reversibly from V4 to V1 and comes back to the initial state. W2 = −CV (T1 − T2) (2.36) The net work (W) done by the gas in the complete cycle W = RT1 ln V2 V + CV (T1 − T2 ) + RT2 ln 4 − CV (T1 − T2 ) V1 V3 (2.37) V2 V + RT2 ln 4 V1 V3 (2.38) or W = RT1 ln Now, from the first law V2 V = 3 V1 V4 Therefore, the net work done can be defined as W = R (T1 − T2 )ln V2 V1 (2.39) The efficiency (η) of the process is given as W T = 1− 2 Q1 T1 (2.40) T W = Q1 1 − 2 T1 (2.41) η= And the work is given as This relationship is the mathematical form of the second law. Entropy With some extension of the above analysis, it can be concluded that a thermodynamic change defined as dQ/T is independent of the path of the © 2010 Taylor & Francis Group, LLC Chapter two: Thermodynamics 19 transformation of the system. This function is called entropy and is normally denoted by S. Mathematically, the change in entropy is measured by the ratio of the heat change and temperature at which the heat change occurs and is defined as dS = dQrev T (2.42) The term dQrev indicates that the heat change occurs through a reversible process. Sensible heat Enthalpy is a function of temperature and pressure H = f(T,P) or ∂H ∂H dH = dT + dP ∂ T P ∂ P T or ∂H dH = CP dT + dP ∂ P T (2.43a) In the above equation, the second term is zero for the following conditions: a. When the pressure is constant b. When enthalpy is independent of the pressure, for example, lowpressure gas Considering the above conditions, the change in enthalpy can be defined as dH = CP dT where CP is the isobaric specific heat. © 2010 Taylor & Francis Group, LLC (2.43b) 20 Process engineering and design using visual basic® Thermodynamic properties The following thermodynamic properties are extremely important in all process engineering calculations. This section will discuss the method to estimate these thermodynamic properties. • Isobaric specific heat of hydrocarbon ideal gases • Isobaric specific heat of hydrocarbon real gases • Isobaric specific heat of hydrocarbon gas mixtures • Isobaric specific heat of ideal liquids • Isobaric specific heat of real liquids • Enthalpy of gases • Enthalpy of gas mixtures • Entropy of ideal gases • Entropy of real gases • Entropy of hydrocarbon gas mixtures • Viscosity of ideal liquids • Viscosity of ideal hydrocarbon vapors • Liquid viscosity of defined mixtures at low pressure • Vapor viscosity of defined mixtures at low pressure • Thermal conductivity of pure hydrocarbon liquids at low pressure • Thermal conductivity of pure hydrocarbon vapors at low pressure Isobaric specific heat of hydrocarbon ideal gases Specific heat at a constant pressure is an important parameter for engineering calculations. This value is largely influenced by the temperature and the actual pressure of the fluid. The specific heat of pure components for an ideal gas is calculated as [1] CP/R = A + BT + CT2 + DT−2 (2.44) where CP = specific heat of ideal gas, kJ/(kmol⋅K) R = universal gas constant, kJ/(kmol⋅K) T = temperature, K A,B,C,D = constants Constants for the calculation of the specific heat of commonly used ideal gases are presented in Table 2.4. Example 2.4 Estimate the heat required to raise the temperature of 1 kmol methane from 100°C to 400°C. © 2010 Taylor & Francis Group, LLC Chapter two: Thermodynamics 21 Table 2.4 Constants for the Calculation of Specific Heat—Ideal Gases Ideal Gases MW Tmax (K) A Methane 16.043 1500 Ethane 30.070 1500 Propane 44.097 n-Butane i-Butane D * 10−5 B * 103 C * 106 1.702 9.081 −2.164 1.131 19.225 −5.561 1500 1.213 28.785 −8.824 58.123 1500 1.935 36.915 −11.402 58.123 1500 1.677 37.853 −11.945 n-Pentane 72.150 1500 2.464 45.351 −14.111 n-Hexane 86.177 1500 3.025 53.722 −16.791 n-Heptane 100.204 1500 3.570 62.127 −19.486 n-Octane 114.231 1500 4.108 70.567 −22.208 Air 28.851 2000 3.355 0.575 Nitrogen 28.014 2000 3.280 0.593 0.040 Oxygen 31.999 2000 3.639 0.506 −0.227 Hydrogen 2.016 3000 3.249 0.422 0.083 Hydrogen sulfide 34.082 2300 3.931 1.49 −0.232 Carbon monoxide 28.010 2500 3.376 0.557 −0.031 Carbon dioxide 44.01 2000 5.457 1.045 −1.157 Water 18.015 2000 3.47 1.45 0.121 −0.016 Source: Adapted from Smith, J.M., Van Ness, H.C., and Abbott, M.M., Introduction to Chemical Engineering Thermodynamics, 6th ed., McGraw-Hill, New York, 2001. Note: Values for other components are available in the literature [1,5,7]. Tmax is the maximum temperature, K. SOLUTION The heat required can be calculated as T2 Q = dH = ∫ C dT P T1 k CP ∫ R dT =R 1 T2 T3 = R AT1 (k − 1) + B 1 (k 2 − 1) + C 1 (k 3 − 1) 2 3 where T1 = initial temperature = 373.15 K k = temperature ratio = 673.15/373.15 = 1.804 A,B,C = constants as per Table 2.4 © 2010 Taylor & Francis Group, LLC 22 Process engineering and design using visual basic® Solving the above equation for methane 373.152 Q = 8.314 1.702 * 373.15 * 0.804 + 9.801 * 10 −3 * 2 2.254 − 2.164 * 10 −6 373.153 * 4.871 3 = 15515 kJ Isobaric specific heat of hydrocarbon real gases Isobaric specific heat is an important thermodynamic parameter and is used in several calculations, including sensible heat effect, Joule–Thomson cooling, and so on [4]. Isobaric specific heat is calculated as C 0 − CP CP = C P0 − R P R (2.45) where CP = isobaric specific heat of the real gas, kJ/(kmol·K) C P0 = isobaric specific heat of the ideal gas, kJ/(kmol·K) R = gas constant = 8.314 kJ/(kmol·K) (C P0 − CP )/R = dimensionless correction factor The dimensionless correction factor is calculated as 0 0 h C P0 − CP CP0 − CP CP0 − CP ω C P0 − CP = + h − R R R R ω (2.46) where ((C P0 − CP )/R)0 = effect of the pressure for simple fluid (use Equation 2.47 to calculate) ((C P0 − CP )/R)h = effect of the pressure for the heavy reference fluid (n-octane) (use Equation 2.47 to calculate) The pressure effect is calculated as i CP0 − CP T (∂Pr /∂Tr )V2 r ∆CV = 1+ r + R R ( ∂P /∂V ) r © 2010 Taylor & Francis Group, LLC r Tr i (2.47) Chapter two: Thermodynamics 23 where 1 ∂ Pr 2c b1 + b3 /Tr2 + 2b4 /Tr3 c1 − 2c3 /Tr3 d + + 15 − 3 4 2 ∂ T = V 1 + 2 Tr Vr Vr Vr Vr r Vr r γ γ × β + 2 exp − 2 Vr Vr (2.48) Tr c4 γ γ 2B 3C 6D ∂ Pr ∂ V = − V 2 1 + V + V 2 + V 5 + T 3V 2 3β + 5 − 2 β + V 2 V 2 r Tr r r r r r r r r γ × exp − 2 Vr (2.49) i 2 (b3 + 3b4 /Tr ) 3c ∆CV + 3 3 2 + 6E = − 2 R Tr Vr Tr Vr (2.50) where Pr = reduced pressure Tr = reduced temperature Vr = reduced volume = ZTr/Pr Z = compressibility B = b1 − b2 b b − 32 − 43 Tr Tr Tr (2.51a) c2 c + 33 Tr Tr (2.51b) d2 Tr (2.51c) C = c1 − D = d1 + E= γ c4 γ β + 1 − β + 1 + 2 exp − 2 3 Vr 2Tr γ Vr (2.51d) Other constants used in the above equations for both simple and heavy reference fluids are tabulated in Table 2.5. © 2010 Taylor & Francis Group, LLC 24 Process engineering and design using visual basic® Table 2.5 Values of Constants Constants Simple fluid Heavy reference fluid b1 b2 b3 b4 c1 c2 c3 c4 d1 * 104 d2 * 104 β γ 0.1181193 0.265728 0.154790 0.030323 0.0236744 0.0186984 0 0.042724 0.155488 0.623689 0.65392 0.060167 0.2026579 0.331511 0.027655 0.203488 0.0313385 0.0503618 0.016901 0.041577 0. 48736 0.0740336 1.226 0.03754 Source: Adapted from Technical Data Book—Petroleum Refining, 4th ed., American Petroleum Institute, Washington, D.C., 1982. Isobaric specific heat of hydrocarbon gas mixtures The above method can also be used to calculate the isobaric specific heat of real hydrocarbon gas mixtures [4]. However, the pseudocritical properties are to be used for the calculation. Pseudocritical properties are calculated as n Ppc = ∑x P i ci (2.52) ∑xT (2.53) i =1 n Tpc = i ci i =1 n ω= ∑x ω i i (2.54) i =1 CP = ∑w C i pi where Ppc = mixture’s pseudocritical pressure, kPa Pci = critical pressure of component i, kPa Tpc = mixture’s pseudocritical temperature, K Tci = critical temperature of component i, K © 2010 Taylor & Francis Group, LLC (2.55) Chapter two: Thermodynamics 25 n = number of components xi = mole fraction of component i ω = mixture’s acentric factor ωi = acentric factor of component i CP = mixture’s isobaric specific heat CPi = isobaric specific heat of component i wi = weight fraction of component i Example 2.5 Estimate the isobaric specific heat for i. Methane at 10,000 kPag and 20°C ii. Ethane at 3000 kPag and 50°C iii. Nitrogen at 8000 kPag and 30°C iv. Mixed gas (nitrogen 10 mol%, methane 45 mol%, and ethane 45 mol%, at 3000 kPag and 30°C) (ignore the interaction parameters) SOLUTION i. Isobaric specific heat of ideal gas = 34.74 kJ/(kmol·K) Compressibility = 0.81698 ∂ Pr ∂ T = 2.3698 r Vr ∂ Pr ∂ V = −3.4043 r Tr i ∆CV R = −0.2418 0 C P0 − CP = −1.77765 R C P0 − CP = −1.7572 R CP = 34.74 + 8.314 * 1.7572 = 49.35 kJ/(kmol·K) (HYSYS® calculated value is 49.32 kJ/(kmol·K)) ii. Isobaric specific heat of ideal gas = 56.226 kJ/(kmol·K) Compressibility = 0.77283 C P0 − CP = −1.6363 R CP = 69.83 kJ/(kmol·K) (HYSYS calculated value is 69.98 kJ/(kmol·K)) © 2010 Taylor & Francis Group, LLC 26 Process engineering and design using visual basic® iii. Isobaric specific heat of ideal gas = 29.13 kJ/(kmol·K) Compressibility = 0.98869 C P0 − CP = − 0.3971 R CP = 32.43 kJ/(kmol·K) (HYSYS calculated value is 32.99 kJ/(kmol·K)) iv. Pseudocritical pressure = 4625.48 kPa Pseudocritical temperature = 235.88 K Acentric factor = 0.05354 Compressibility factor = 0.87746 (Note-1) Isobaric specific heat of methane at 30°C = 35.38 kJ/(kmol·K) Isobaric specific heat of ethane at 30°C = 53.61 kJ/(kmol·K) Isobaric specific heat of nitrogen at 30°C = 29.13 kJ/(kmol·K) Weight fraction of methane = 0.3064 Weight fraction of ethane = 0.5743 Weight fraction of nitrogen = 0.1193 Isobaric specific heat of ideal mixtures = 45.11 kJ/(kmol·K) CP0 − CP = − 0.7559 R CP = 51.4 kJ/(kmol·K) (HYSYS calculated value is 49.64 kJ/(kmol·K), Note-1) Note-1: The compressibility factor is calculated without considering the interaction parameters. As a result, both the compressibility factor and the isobaric specific heat of real gas mixtures will be different from the calculated value using the interaction parameters. Joule–Thomson coefficient If we consider a case where volume V1 of a gas at pressure P1 is allowed to pass to a lower pressure P2, through a semipermeable membrane slowly and reversibly, the volume at the lower pressure side will increase to V2 (V2 > V1) as shown in Figure 2.3. If we assume that the piston is frictionless and the system is thermally insulated and there is no heat change (dQ = 0), then the work done can be defined as Work done by the high-pressure side = P1V1 Work done by the low-pressure side = P2V2 © 2010 Taylor & Francis Group, LLC Chapter two: Thermodynamics 27 V1 P1 V2 P2 Figure 2.3 Joule–Thomson effect. Now, from the first law of thermodynamics dU = −dW = P1V1 − P2V2 or U1 + P1V1 = U2 + P2V2 or H1 = H2 or ΔH = 0 This indicates that an adiabatic expansion is also isenthalpic. However, during this expansion, there will be a change in the temperature, and this variation of temperature is called the Joule–Thomson effect. The rate of change in temperature with pressure is called the Joule– Thomson coefficient. dT µ= dP H (2.56) Generally, the value of μ is positive, meaning that with a drop in pressure, the temperature will also drop. However, in some cases (hydrogen, helium at room temperature), the value of μ is negative, meaning that there will be an increase in temperature with a decrease in pressure. Now, H = f(T,P) 1 ∂H ∂T ∂T ∂H = − = − ∂P H ∂H P ∂P T CP ∂ P T or µ=− © 2010 Taylor & Francis Group, LLC 1 ∂H CP ∂ P T (2.57) 28 Process engineering and design using visual basic® Again RT 2 ∂ Z ∂H ∂V = − = − V T ∂P T ∂T P P ∂T P where Z = compressibility factor The general equation of the Joule–Thomson coefficient can be defined as [1] µ= RT 2 ∂ Z CP P ∂ T P Example 2.6 Estimate the Joule–Thomson cooling temperature if methane at 10,000 kPag and 20°C is expanded to the atmospheric pressure. SOLUTION This can be calculated by reducing the pressure in steps and estimating the temperature at the end of each step. The isobaric specific heat of a real gas is calculated using the procedure described in Example 2.5. The PR EOS is used for this calculation. Let the number of steps be 50; therefore, the reduction in pressure at the end of each step will be 200 kPa. Constant parameters Critical pressure = 4640.68 kPa Critical temperature = 190.7 K Acentric factor = 0.0115 Step 1 calculation Calculated the value of mi (Equation 2.25i) = 0.3923 Calculated the value of aci (Equation 2.25g) = 247.67 Calculated the value of bi (Equation 2.25d) = 0.0266 Compressibility (Z) = 0.81792 Value of (∂Z/∂T)P = 0.00239 Isobaric heat capacity of a real gas = 49.35 kJ/(kmol·K) Joule–Thomson coefficient (Equation 2.58) = 0.00342 Drop in temperature (Equation 2.56) = 0.68°C Temperature after first step = 19.32°C The above step is repeated 50 times to calculate the final temperature. © 2010 Taylor & Francis Group, LLC (2.58) Chapter two: Thermodynamics 29 Table 2.6 Joule–Thomson Temperature Calculation for Single Component Pressure (kPag) Final temperature (oC) Component Initial Final Initial temperature (oC) HYSYS Manual Methane Methane Methane Ethane Propane i-Butane Carbon dioxide Nitrogen Nitrogen Nitrogen 10,000 8000 8000 3000 2000 1000 5000 8000 7000 6000 0 0 3000 0 0 0 0 0 0 2000 20 −7 −10 60 100 150 60 −7 10 0 −32.3 −60.5 −39.9 29.1 78.6 141.6 8.1 −30.3 −8.2 −10.6 −32.0 −61.3 −40.4 30.1 78.8 141.6 6.1 −30.6 −8.4 −10.7 Calculated final temperature = −32.0°C (Note-1) (HYSYS calculated temperature = −32.3°C) Note-1: This calculation is not valid if the liquid phase is detected at any step. The results of a few typical calculations along with the HYSYS calculated values are presented in Table 2.6. Isobaric specific heat of ideal liquids Similarly, specific heat at a constant pressure for liquids can be calculated as CP/R = A + BT + CT2 (2.59) Constants for the calculation of specific heat of commonly used liquids are presented in Table 2.7. Isobaric specific heat of real liquids The calculation of the isobaric specific heat for a real liquid is identical to the procedure used for a real gas [4]. The isobaric specific heat of real hydrocarbon liquid mixtures is calculated as [4] CP = ∑w C i pi where CP = isobaric specific heat of mixtures wi = weight fraction of component i CPi = isobaric specific heat of component i © 2010 Taylor & Francis Group, LLC (2.60) 30 Process engineering and design using visual basic® Table 2.7 Constants for the Calculation of Specific Heat—Liquids Liquids A B * 103 C * 106 Ammonia 22.626 −100.75 192.71 Aniline 15.819 29.03 −15.80 Benzene −0.747 67.96 −37.78 1,3-Butadiene 22.711 −87.96 205.79 Carbon tetrachloride 21.155 −48.28 101.14 −31.90 Chlorobenzene 11.278 32.86 Chloroform 19.215 −42.89 83.01 Cyclohexane −9.048 141.38 −161.62 Ethanol 33.866 −172.60 349.17 Ethylene oxide 21.039 −86.41 172.28 Methanol 13.431 −51.28 131.13 n-Propanol 41.653 −210.32 427.20 Sulfur trioxide −2.930 137.08 −84.73 Toluene 15.133 6.79 16.35 Water 8.712 1.25 −0.18 Source: Adapted from Smith, J.M., Van Ness, H.C., and Abbott, M.M., Introduction to Chemical Engineering Thermodynamics, 6th ed., McGraw-Hill, New York, 2001. Enthalpy of gases The enthalpy of a gas is estimated by estimating the enthalpy of an ideal gas. The enthalpy of an ideal gas is calculated using the following equation: 0 T H =H 0 25 R + M T CP ∫ R dT (2.61) 298.15 where H T0 = ideal gas enthalpy of formation at temperature T, kJ/kg 0 H 25 = ideal gas enthalpy of formation at 25°C, kJ/kg R = gas constant, kJ/(kmol·K) M = molecular weight CP = isobaric specific heat, kJ/(kg·°C) T = temperature, K The ideal gas enthalpy of formation at 25°C is presented in Table 2.8 [4]. The enthalpy of a real gas is estimated by using the following equation [1]: HT = H T0 + H R © 2010 Taylor & Francis Group, LLC (2.62) Chapter two: Thermodynamics 31 Table 2.8 Ideal Gas Enthalpy of Formation at 25°C MW Heat of formation at 25°C (kJ/kg) Methane 16.043 −4645.1 Ethane 30.070 −2787.5 Propane 44.097 −2373.9 n-Butane 58.123 −2164.2 i-Butane 58.123 −2308.5 n-Pentane 72.150 −2034.1 n-Hexane 86.177 −1937.2 n-Heptane 100.204 −1872.7 n-Octane 114.321 −1827.4 Component Source: Adapted from Technical Data Book—Petroleum Refining, 4th ed., American Petroleum Institute, Washington, D.C., 1982. Note: Values for other components are available in the literature [4]. where HT = enthalpy of real gas, kJ/kg HR = residual enthalpy, kJ/kg Residual enthalpy is calculated as [1] d ln α(Tr ) HR 1 = − 1 qI Z − 1 + RT M d ln(Tr ) (2.63) Different equations are used for different EOSs to calculate the value of α(Tr) are indicated below [1]. For the PR EOS α (Tr ) = [1 + (0.37464 + 1.54226ω − 0.26992ω 2 )(1 − Tr0.5 )]2 (2.64a) For the SRK EOS α (Tr ) = [1 + (0.480 + 1.574 ω − 0.176ω 2 )(1 − Tr0.5 )]2 where ω = acentric factor © 2010 Taylor & Francis Group, LLC (2.64b) 32 Process engineering and design using visual basic® The value of q is calculated using the following equation [1]: For the PR EOS q= 0.457235α(Tr ) 0.077796Tr (2.65a) q= 0.42747α (Tr ) 0.08664(Tr ) (2.65b) For the SRK EOS The value of I is calculated using the following equations [1]: Z + β I = ln Z (2.66) Pr Tr (2.67a) Pr Tr (2.67b) where Z = compressibility and for the PR EOS β = 0.077796 For the SRK EOS β = 0.08664 where Pr = reduced pressure Tr = reduced temperature Enthalpy of gas mixtures For hydrocarbon gas mixtures, a similar procedure is used to estimate the enthalpy of gas mixtures with some modifications to the pressure and temperature parameters [4]. The critical temperature is replaced by a pseudocritical temperature using the following equation: n Tpc = ∑xT i ci i =1 © 2010 Taylor & Francis Group, LLC (2.68) Chapter two: Thermodynamics 33 The critical pressure is replaced by a pseudocritical pressure using the following equation: n ∑x P Ppc = (2.69) i ci i =1 The mixture acentric factor is calculated as n ω= ∑xω i (2.70) i i =1 The ideal gas enthalpy of the mixture is calculated as H0 = ∑x H wi 0 i where Tpc = pseudocritical temperature of the mixture, K Tci = critical temperature of component i, K xi = mole fraction of component i Ppc = pseudocritical pressure of the mixture, kPa Pci = critical pressure of component i, kPa ω = mixture acentric factor ωi = acentric factor of component i H0 = ideal gas enthalpy of the mixture, kJ/kg xwi = weight fraction of component i H i0 = ideal gas enthalpy of component i n = number of components Example 2.7 Estimate the enthalpy of methane at 293.15 K and 10,101.3 kPa and n-butane at 500 K and 5000 kPa. Use the PR EOS for the calculation. SOLUTION Enthalpy of methane The enthalpy of methane at 25°C is –4645.1 kJ/kg. The change in enthalpy for a temperature change from 298.15 to 293.15 K is calculated using the following equation: T2 dH = ∫ C dT P T1 = R T12 2 T13 3 (k − 1) AT1 (k − 1) + B (k − 1) + C 2 3 M © 2010 Taylor & Francis Group, LLC (2.71) 34 Process engineering and design using visual basic® where R = gas constant, kJ/(kmol·K) = 8.314 T1 = initial temperature = 298.15 k = temperature ratio = 0.983 A = constant = 1.702 B = constant = 9.081 * 10−3 C = constant = −2.164 * 10−6 M = molecular weight = 16.043 Differential enthalpy = −10.9 kJ/kg The enthalpy of ideal methane at 20°C is −4656 kJ/kg Calculation of residual enthalpy The compressibility of methane at 10,101.3 kPa and 293.5 K is 0.8179. (The calculation of compressibility has been discussed before.) Acentric factor = 0.011498 Critical pressure = 4640.7 kPa Critical temperature = 190.7 K Reduced pressure = 2.177 Reduced temperature = 1.573 Value of α(Tr) = 0.82065 Value of q = 3.1376 Value of I = 0.1263 Residual enthalpy = −120.2 kJ/kg Enthalpy of real gas = −4776.2 kJ/kg (HYSYS calculated enthalpy = −4795 kJ/kg) Enthalpy of n-butane The enthalpy of methane at 25°C is –2164.2 kJ/kg. The change in enthalpy for a temperature change from 298.15 to 500 K is calculated using the following equation: T2 dH = ∫ C dT P T1 = R T12 2 T13 3 (k − 1) AT1 (k − 1) + B (k − 1) + C 2 3 M where R = gas constant, kJ/(kmol·K) = 8.314 T1 = initial temperature = 298.15 k = temperature ratio = 1.6773 A = constant = 1.935 B = constant = 36.915*10−3 C = constant = −11.402*10−6 M = molecular weight = 58.123 © 2010 Taylor & Francis Group, LLC Chapter two: Thermodynamics 35 Differential enthalpy = 427.7 kJ/kg The enthalpy of ideal methane at 500 K = −1736.5 kJ/kg Calculation of residual enthalpy The compressibility of methane at 5000 kPa and 500 K is 0.6908. (The calculation of compressibility has been discussed before.) Acentric factor = 0.201 Critical pressure = 3796.6 kPa Critical temperature = 425.2 K Reduced pressure = 1.317 Reduced temperature = 1.176 Value of α(Tr) = 0.8895 Value of q = 4.446 Value of I = 0.1188 Residual enthalpy = −89.1 kJ/kg Enthalpy of real gas = −1825.6 kJ/kg (HYSYS calculated enthalpy = −1827 kJ/kg) Entropy of ideal gases The entropy of an ideal gas at 25°C can be calculated using the following equation [4]: 0 S25 = 4.1867 * (6.2854B + 1.0734C + 0.43207 D + 0.0206E + 0.001037 F + G) (2.72) where 0 S25 = entropy of ideal gas at 25°C, kJ/(kg·K) B,C,D,E,F,G = constants The constants used in the above equation are presented in Table 2.9. The ideal gas entropy at temperature T can be calculated using the following equation [4]: T 0 ST0 = S25 + ∫ 298.15 C P0 dT T (2.73) or T R CT 2 DT −2 S =S + A ln T + BT + − M 2 2 298.15 0 T 0 25 © 2010 Taylor & Francis Group, LLC (2.74) 36 Process engineering and design using visual basic® Table 2.9 Constants for the Calculation of Entropy—Ideal Gases Ideal Gases B C D E F G Methane 0.53829 −0.21141 0.33928 −1.16432 1.38961 −0.50287 Ethane 0.26461 −0.02457 0.29140 −1.28103 1.81348 0.08335 Propane 0.16030 0.12608 0.18143 −0.91891 1.35485 0.26090 n-Butane 0.09969 0.26655 0.05407 −0.42927 0.66958 0.34597 i-Butane 0.09907 0.23874 0.09159 −0.59405 0.90965 0.30764 n-Pentane 0.11183 0.22852 0.08633 −0.54465 0.81845 0.18319 n-Hexane 0.08971 0.26535 0.05778 −0.45221 0.70260 0.21241 n-Heptane 0.08978 0.26092 0.06345 −0.48471 0.75546 0.15776 n-Octane 0.07780 0.27936 0.05203 −0.46312 0.75074 0.17417 Nitrogen 0.25410 −0.01662 0.01530 −0.03100 0.01517 0.04868 Oxygen 0.22172 −0.02052 0.03064 −0.10861 0.13061 0.14841 Hydrogen 3.19962 Hydrogen sulfide 0.23745 −0.02323 0.03881 −0.11329 0.11484 −0.04064 Carbon monoxide 0.25284 −0.01540 0.01608 −0.03434 0.01757 0.10562 Carbon dioxide 0.15884 −0.03371 0.14811 −0.96620 2.07383 0.15115 0.39279 −0.29345 1.09007 −1.38787 −3.93825 Source: Adapted from Smith, J.M., Van Ness, H.C., and Abbott, M.M., Introduction to Chemical Engineering Thermodynamics, 6th ed., McGraw-Hill, New York, 2001. Note: Values for other components are available in the literature [4]. where ST0 = entropy of ideal gas at temperature T, kJ/(kg·K) 0 S25 = entropy of ideal gas at 25°C, kJ/(kg·K) C P0 = specific heat of ideal gas, kJ/(kg·K) T = temperature, K A,B,C,D = constants as per Table 2.4 Entropy of real gases The entropy of a pure real gas can be calculated using the following equation [4]: S = ST0 − R S0 − S M R where S = entropy of real gas, kJ/(kg·K) ST0 = entropy of ideal gas at temperature T, kJ/(kg·K) © 2010 Taylor & Francis Group, LLC (2.75) Chapter two: Thermodynamics 37 R = gas constant, kJ/(kmol·K) M = gas molecular weight ((S0 − S)/R) = dimensionless effect of pressure on entropy The dimensionless effect of pressure on entropy can be calculated as [4] f S0 − S p R M R = − H RT + ln p + ln 6.8947 (2.76) c where HR = residual enthalpy, kJ/kg; calculated using the previous method f/p = fugacity correction p = pressure, kPa T = temperature, K Tc = critical temperature, K M = molecular weight Fugacity correction Fugacity correction can be calculated using the following equation [4]: 0 0 h f f f ω f ln ln = ln + − ln ω h p p p p (2.77) where (ln(f/p))i can be calculated using the following equation: i f B C D ln p = Z − 1 − ln Z + V + 2V 2 + 5V 5 + E r r (2.78) r where Z = compressibility Other parameters are calculated using the method described under specific heat calculation and constants in Table 2.5. © 2010 Taylor & Francis Group, LLC 38 Process engineering and design using visual basic® Entropy of hydrocarbon gas mixtures The entropy of a defined hydrocarbon gas mixture can be calculated using the following equation [4]: n 0 S = ∑ x S − M (x ln x ) 0 wi i R i i i =1 where S0 = entropy of the gas mixture, kJ/(kg·K) xwi = weight fraction of component i R = gas constant, kJ/(kmol·K) M = molecular of the gas mixture = ∑ i xi Mi xi = mole fraction of component i Mi = molecular weight of component i Example 2.8 Estimate the entropy of the following pure components using the PR EOS. a. Methane at 10,000 kPag and 20°C b. Ethane at 4800 kPag and 30°C SOLUTION a. Methane at 10,000 kPag and 20°C Phase = vapor Entropy at 25°C = 11.629 kJ/(kg·K) Entropy at 20°C = 11.593 kJ/(kg·K) Residual enthalpy calculated using the previous method = −120.2 kJ/kg Entropy pressure correction = 6.27 8.314 Entropy at 10,000 kPag, 20°C = 11.593 − * 6.27 16.04 = 8.343kJ/(kg·K) (HYSYS calculated value is 8.733 kJ/(kg·K)) b. Ethane at 4800 kPag and 30°C Phase = liquid Entropy at 25°C = 7.626 kJ/(kg·K) Entropy at 30°C = 7.656 kJ/(kg·K) Residual enthalpy calculated using the previous method = −300.8 kJ/kg Entropy pressure correction = 9.803 © 2010 Taylor & Francis Group, LLC (2.79) Chapter two: Thermodynamics 39 Entropy at 4800 kPag, 30°C = 7.6558 − 8.314 * 9.803 30.07 = 4.945 kJ/(kg⋅K ) (HYSYS calculated value is 4.664 kJ/(kg·K)) Viscosities of ideal liquids The viscosity of pure components depends primarily on the temperature and can be calculated using the following general equation [5]: 1 1 µ = exp A * − T B (2.80) Table 2.10 Constants for the Calculation of Liquid Viscosity—Pure Components at Low Pressure Ideal Components A B Methane Ethane Propane n-Butane i-Butane n-Pentane n-Hexane n-Heptane n-Octane Nitrogen Oxygen Hydrogen Hydrogen sulfide Carbon monoxide Carbon dioxide Methanol Ethanol Propanol Benzene Toluene Water 114.14 156.60 222.67 265.84 302.51 313.66 362.79 436.73 473.70 90.3 85.68 13.82 342.79 94.06 578.08 555.30 686.64 951.04 545.64 467.33 658.25 57.60 95.57 133.41 160.20 170.20 182.48 207.09 232.53 251.71 46.14 51.50 5.39 165.54 48.90 185.24 260.64 300.88 327.83 265.34 255.24 283.16 Source: Adapted from Coulson, J.M. and Richardson, J.F., Chemical Engineering, Volume 6 (SI Unit), Pergamon Press, USA, 1986. Note: Values for other components are available in the literature [5]. © 2010 Taylor & Francis Group, LLC 40 Process engineering and design using visual basic® where μ = viscosity, cP A,B = constants as per Table 2.10 T = temperature, K Viscosity of water The viscosity of water at low pressure can also be calculated using the ­following equation. The following equation is valid for a temperature range of 0–150°C. 609.246 µ = exp −3.827 + 138.89 + t (2.81) where μ = viscosity, cP t = temperature, °C Viscosity of ideal hydrocarbon vapors The viscosity of ideal vapors can be calculated using the following equation [4]: µ= 1000 ATRB (1 + (C/TR ) + (D/TR2 )) (2.82) where μ = viscosity, cP TR = temperature, R A,B,C,D = constants as per Table 2.11 Liquid viscosity of defined mixtures at low pressure The liquid viscosities of defined mixtures at low temperature can be calculated using the following equation [4]: n µm = xiµ 1i /3 i =1 ∑ where μm = viscosity of the mixture, cP μi = viscosity of component i, cP n = number of components xi = mole fraction of component i © 2010 Taylor & Francis Group, LLC 3 (2.83) Chapter two: Thermodynamics 41 Table 2.11 Constants for the Calculation of Vapor Viscosity—Pure Components at Low Pressure Ideal Components A B C D Methane Ethane Propane n-Butane i-Butane n-Pentane n-Hexane n-Heptane n-Octane Nitrogen Oxygen Hydrogen Hydrogen sulfide Carbon monoxide Carbon dioxide Water 3.715E−7 1.737E−7 1.670E−7 1.528E−7 5.090E−7 3.853E−8 1.155E−7 4.100E–8 1.806E–8 4.588E–7 7.906E–7 1.201E–7 3.223E–8 8.133E–7 1.639E–6 4.152E–7 5.901E–1 6.799E–1 6.861E–1 6.944E–1 5.214E–1 8.476E–1 7.074E–1 8.284E–1 9.292E–1 6.081E–1 5.634E–1 6.850E–1 1.017 5.338E–1 4.600E–1 6.778E–1 190.3 178.0 322.7 409.9 412.2 75.10 282.8 154.4 99.16 98.48 173.3 −1.06 670.3 170.5 522.0 1525.0 0 0 −2.67E4 −4.73E4 0 0 0 0 0 0 0 4.536E2 −2.08E5 0 0 −2.4E5 Source: Adapted from Technical Data Book—Petroleum Refining, 4th ed., American Petroleum Institute, Washington, D.C., 1982. Note: Values for other components are available in the literature [4]. Vapor viscosity of defined mixtures at low pressure The viscosity of defined hydrocarbon mixtures at low pressure can be ­calculated using the following equation [4,8]: n µm = ∑ i =1 µi n 1+ ∑φ x j =1 j≠i φ ij = xj ij i [1 + (µ i/µ j )0.5 ( M j /Mi )0.25 ]2 8 [1 + ( Mi /M j )]0.5 where μm = viscosity of the mixture, cP μi = viscosity of component i, cP ϕij = interaction parameter of component i with respect to j xi = mole fraction of component i xj = mole fraction of component j Mi = molecular weight of component i Mj = molecular weight of component j n = number of components in the mixture © 2010 Taylor & Francis Group, LLC (2.84) (2.85) 42 Process engineering and design using visual basic® Example 2.9 Estimate the viscosity of a gas mixture at 0 kPag and 30°C. Component Mole fraction Methane Ethane Carbon monoxide Carbon dioxide Nitrogen 0.9 0.02 0.02 0.03 0.03 SOLUTION The viscosity of individual components can be calculated as A Constants B C D Viscosity (cP) 3.715E−7 1.737E−7 8.133E−7 1.639E−6 4.588E−7 0.5901 0.6799 0.5338 0.4600 0.6081 190.3 178.0 170.5 522.0 98.48 0 0 0 0 0 0.0114 0.0095 0.0179 0.0152 0.0179 Σϕij (xj/xi) Component Methane Ethane Carbon monoxide Carbon dioxide Nitrogen The interaction parameters can be calculated as Interaction 1-2 1-3 1-4 1-5 2-1 2-3 2-4 2-5 3-1 3-2 3-4 3-5 4-1 4-2 4-3 4-5 5-1 5-2 5-3 5-4 Mi Mj ϕij ϕij (xj/xi) 16.043 16.043 16.043 16.043 30.070 30.070 30.070 30.070 28.010 28.010 28.010 28.010 44.010 44.010 44.010 44.010 28.014 28.014 28.014 28.014 30.070 28.010 44.010 28.014 16.043 28.010 44.010 28.014 16.043 30.070 44.010 28.014 16.043 30.070 28.010 28.014 16.043 30.070 28.010 44.010 1.4824 1.0340 1.3500 1.0332 0.6623 0.7228 0.9526 0.7223 0.9344 1.4619 1.3561 0.9992 0.6592 1.0411 0.7328 0.7322 0.9352 1.4633 1.0008 1.3573 0.03294 0.02298 0.04500 0.03444 29.80284 0.72275 1.42885 1.08341 42.04872 1.46190 2.03408 1.49880 19.77659 0.69409 0.48850 0.73224 28.05564 0.97552 0.66720 1.35726 © 2010 Taylor & Francis Group, LLC 0.13536 33.03785 47.04350 21.69142 31.05562 Chapter two: Thermodynamics 43 Calculated viscosity = 0.0119 cP (HYSYS calculated value is 0.0117 cP) Thermal conductivity of pure hydrocarbon liquids at low pressure The thermal conductivity of a pure hydrocarbon liquid varies linearly with temperature. With known thermal conductivities at two different temperatures, the value can be calculated at any temperature using linear interpolation. The thermal conductivity of common hydrocarbon liquids can be presented in Table 2.12. The thermal conductivity of pure hydrocarbon liquid mixtures can be calculated as km = ∑ ∑ φφ k (2.86) i j ij i j 1 1 k ij = 2 + ki k j −1 (2.87) Table 2.12 Thermal Conductivity of Pure Hydrocarbon Liquids at Low Pressure Temperature (oC) Component Freezing Methane Propane n-Butane n-Pentane n-Hexane n-Heptane n-Octane Benzene Toluene o-Xylene m-Xylene p-Xylene −182.5 −187.7 −138.3 −129.7 −95.3 −90.6 −56.8 5.5 −95.0 −25.2 −47.9 13.3 Normal boiling −161.5 −42.0 −0.5 36.1 68.7 98.4 125.7 80.1 110.6 144.4 139.1 138.4 Thermal conductivity (W/(m.K)) At freezing temperature At normal boiling temperature 0.2246 0.2130 0.1869 0.1782 0.1622 0.1598 0.1519 0.1493 0.1615 0.1430 0.1475 0.1326 0.1883 0.1289 0.1176 0.1086 0.1042 0.1025 0.0981 0.1265 0.1116 0.1040 0.1035 0.1031 Source: Adapted from Technical Data Book—Petroleum Refining, 4th ed., American Petroleum Institute, Washington, D.C., 1982. Note: Values for other components are available in the literature [4]. © 2010 Taylor & Francis Group, LLC 44 Process engineering and design using visual basic® φi = xiVi ∑x V (2.88) ∑φ = 1 (2.89) j j j i i where km = thermal conductivity of the mixture, W/(m.K) ϕi, ϕj = volume fraction of pure components i and j ki, kj = thermal conductivity of pure components i and j, W/(m.K) Vi, Vj = molar volume of pure components i and j, m3 per kg·mol xi, xj = mole fraction of pure components i and j Example 2.10 Calculate the thermal conductivity of the following liquid mixture at 0 kPag and 30°C. n-Pentane = 40 vol% n-Hexane = 30 vol% n-Heptane = 30 vol% The following data are available for the calculation: Component Density (kg/m3) MW Molar volume (m3/kg·mol) n-Pentane n-Hexane n-Heptane 615.6 652.4 673.8 72.15 86.18 100.2 0.1172 0.1321 0.1487 SOLUTION Thermal conductivity of n-pentane at 30°C = 0.1112 W/(m.K) Thermal conductivity of n-hexane at 30°C = 0.1179 W/(m.K) Thermal conductivity of n-heptane at 30°C = 0.1232 W/(m.K) k11 = k1 = 0.1112 k 22 = k 2 = 0.1179 k 33 = k 3 = 0.1232 k12 = k 21 = 0.1145 k13 = k 31 = 0.1169 k 23 = k 32 = 0.1205 φ 1 = 0.4, φ 2 = 0.3, φ 3 = 0.3 Thermal conductivity of the liquid mixture = 0.1167 W/(m.K) © 2010 Taylor & Francis Group, LLC Chapter two: Thermodynamics 45 Table 2.13 Constants for the Calculation of Hydrocarbon Vapor Thermal Conductivity Ideal components A × 103 B × 105 C × 108 Methane Ethane Propane n-Butane n-Pentane n-Hexane n-Heptane n-Octane 16.77 8.74 7.54 6.91 6.76 6.42 4.95 3.59 4.358 4.343 3.362 2.809 2.337 2.214 2.444 2.710 1.335 1.364 1.971 2.841 2.778 2.180 1.685 1.175 Source: Adapted from Technical Data Book—Petroleum Refining, 4th ed., American Petroleum Institute, Washington, D.C., 1982. Note: Values for other components are available in the literature [4]. Thermal conductivity of pure hydrocarbon vapors at low pressure The thermal conductivity of pure hydrocarbon gas at low pressure can be calculated using the following equation [4]: k = A + BT + CT2 (2.90) where k = thermal conductivity, Btu/(h.ft.°F) A,B,C = constants (refer to Table 2.13) T = temperature, °F The thermal conductivity of pure hydrocarbon vapor mixtures can be calculated as [4] n km = ∑1 i =1 ki n ∑A y yi j =1 ij (2.91) j where km = thermal conductivity of the mixture, Btu/(h.ft.°F) ki = thermal conductivity of component i, Btu/(h.ft.°F) n = number of components in the mixture yi, yj = mole fraction of components i and j 2 0.5 µ i M j 0.75 (1 + (Si /T )) (1 + (Sij /T )) 1 Aij = 1 + 4 µ j Mi (1 + (Sj /T )) 1 + (Si /T ) © 2010 Taylor & Francis Group, LLC (2.92) 46 Process engineering and design using visual basic® Si, Sj = 1.5 Tb Sij = SiSj μi, μj = viscosities of components i and j, cP Mi, Mj = molecular weight of component i and j Tb = normal boiling point, R T = temperature, R Flash calculation Flash calculation is probably the most important unit operation to solve process engineering problems. Any mixture at a defined pressure and temperature can exist either in a liquid phase or in a vapor phase, or in two phases. Flash calculation is required to establish the state of the fluid under a specific condition. Vapor–liquid equilibrium When a fluid exists in two phases, the mole fraction of any component in the vapor and liquid phases differs depending on the vapor–liquid equilibrium constant. The higher the value of the vapor–liquid equilibrium, the higher will be the ratio of mole fraction between the vapor and liquid phases. Mathematically Ki = yi xi (2.93) where Ki = vapor–liquid equilibrium constant of component i yi = mole fraction of component i in vapor phase xi = mole fraction of component i in liquid phase Once the value of the equilibrium constant is known, it is easy to do a flash calculation and the bubble and dew points can be calculated using the following equations: Bubble point ∑ y = ∑ K x = 1.0 (2.94) ∑ x = ∑ K = 1.0 (2.95) i i i Dew point i yi i © 2010 Taylor & Francis Group, LLC Chapter two: Thermodynamics 47 It is clear from the above analysis that a flash calculation can proceed only when an accurate equilibrium constant is available. Any flash calculation is initiated with the preliminary estimated values for equilibrium constants. A large number of correlations and graphs are available in the literature and a preliminary estimate can be made using the following equation [9]: Ki = Pci T exp 5.37(1 + ω i ) 1 − ci P T (2.96) where Ki = vapor–liquid equilibrium constant of component i Pci = critical pressure of component i Tci = critical temperature of component i ωi = acentric factor of component i P = operating pressure T = operating temperature The mole fraction of component i in the liquid and vapor phases can be estimated as [9] xi = zi 1 + V (K i − 1) (2.97) yi = x i K i (2.98) An overall material balance can result: N zi (K i − 1) ∑ 1 + V(K − 1) = 0 i =1 (2.99) i where zi = overall mole fraction of component i V = vapor phase mole fraction Other terms are as defined before. Using the above equations, the compositions in the vapor and liquid phases can be calculated using a set of equilibrium constants. The adequacy of the calculation needs to be checked through the calculation of the fugacity of each component. For the correct equilibrium condition, the fugacity of each component in both the vapor and liquid phases will be the same. If the fugacity is different, the equilibrium constants are © 2010 Taylor & Francis Group, LLC 48 Process engineering and design using visual basic® to be modified and recalculated. For the PR EOS, the fugacity of each component in both the liquid and vapor phases is calculated using the following equation [2]: ∑ 2 xi aik fk bk A i bk ln = (Z − 1) − ln (Z − B) − − xk P b a b 2 2B Z + 2.414B × ln Z − 0.414B (2.100) where ∑∑x x a i j (2.101) b= ∑x b (2.102) aij = (1 − δ ij ) ai0.5 a 0j .5 (2.103) a= i j ij i i δij = interaction parameter, generally determined experimentally f k = fugacity of component k Other parameters are as defined in Table 2.1. Equation 2.100 is solved for both the liquid and vapor phase parameters to calculate the fugacity in both phases. Programming Calculation of JT effect due to drop in pressure This program has been developed to estimate the impact of the Joule– Thomson effect when a gas is expanded through a pressure reduction unit. The following basis has been used in this estimation: • The calculation is based on the PR EOS. • It is assumed that the expansion is adiabatic and not isentropic. Generally, the temperature drop is larger in isentropic expansion in comparison to adiabatic expansion. • This calculation assumes only the vapor phase expansion and does not perform any enthalpy balance due to a change in phase. © 2010 Taylor & Francis Group, LLC Chapter two: Thermodynamics 49 Figure 2.4 Solution of Example 2.6. • If the liquid phase is detected at any step in the calculation, the ­program generates a note “Note-1: Liquid phase detected. Results may not be accurate.” • This calculation is performed using 50 steps and a downstream ­pressure–temperature relationship can be developed from the results. Checking Example 2.6 The Visual Basic® solution of Example 2.6 is presented in Figure 2.4. Nomenclature a CP CV EK EP F gc H l K m MW acceleration, m/s2 heat capacity at constant pressure, kJ/(kg·°C) heat capacity at constant volume, kJ/(kg·°C) kinetic energy potential energy force, N acceleration due to gravity, m/s2 enthalpy, kJ displacement, m vapor–liquid equilibrium constant mass, kg molecular weight © 2010 Taylor & Francis Group, LLC 50 Process engineering and design using visual basic® P Q R S T U v V W z Z pressure, kPa heat, kJ universal gas constant, kJ/(kmol·K) entropy, kJ/(kmol·K) temperature, K internal energy, kJ velocity, m/s volume, m3 work, kNm elevation, m compressibility Greek characters γ η ω μ ratio of specific heats efficiency acentric factor Joule–Thomson coefficient References 1. Smith, J.M., Van Ness, H.C., and Abbott, M.M., Introduction to Chemical Engineering Thermodynamics, 6th ed., McGraw-Hill, New York, 2001. 2. Peng, D.Y. and Robinson, D.B., A two constant equation of state, I.E.C. Fundamentals, 15, 59–64, 1976. 3. Soave, G., Equilibrium constants from a modified Redlich-Kwong equation of state, Chemical Engineering Science, 27(6), 1197, 1972. 4. Technical Data Book—Petroleum Refining, 4th ed., American Petroleum Institute, Washington, D.C., 1982. 5. Coulson, J.M. and Richardson, J.F., Chemical Engineering, Volume 6 (SI Unit), Pergamon Press, USA, 1986. 6. Perry, R.H. and Green, D., Perry’s Chemical Engineering Handbook, 6th ed., McGraw-Hill, Malaysia, 1984. 7. Moran, M.J. and Shapiro, H.N., Fundamentals of Engineering Thermodynamics, 5th ed., John Wiley, USA, 2004. 8. Bromley, A. and Wilke, C.R., Viscosity behavior of gases, Industrial and Engineering Chemistry Chemical Engineering Science, 43(7), 1641, 1951. 9. Naji, H.S., Conventional and rapid flash calculations for the Soave-RedlichKwong and Peng-Robinson equations of state, Emirates Journal for Engineering Research, 13(3), 81–91, 2008. © 2010 Taylor & Francis Group, LLC References 1 Chapter 1 - Basic mathematics 1. Kreyszig, E., Advanced Engineering Mathematics, 7th ed., John Wiley and Sons, New York, 1993. 2. Grossman, S.I., Multivariable Calculus, Linear Algebra and Differential Equations, 3rd ed., Sunders College Publishing, 1994. 3. Jain, M.K., Iyengar, S.R.K., and Jain, R.K., Numerical Methods for Scientific and Engineering Computation, Wiley Eastern Limited, New Delhi, 1985. 2 Chapter 2 - Thermodynamics 1. Smith, J.M., Van Ness, H.C., and Abbott, M.M., Introduction to Chemical Engineering Thermodynamics, 6th ed., McGraw-Hill, New York, 2001. 2. Peng, D.Y. and Robinson, D.B., A two constant equation of state, I.E.C. Fundamentals, 15, 59–64, 1976. 3. Soave, G., Equilibrium constants from a modified Redlich-Kwong equation of state, Chemical Engineering Science, 27(6), 1197, 1972. 4. Technical Data Book—Petroleum Refining, 4th ed., American Petroleum Institute, Washington, D.C., 1982. 5. Coulson, J.M. and Richardson, J.F., Chemical Engineering, Volume 6 (SI Unit), Pergamon Press, USA, 1986. 6. Perry, R.H. and Green, D., Perry’s Chemical Engineering Handbook, 6th ed., McGraw-Hill, Malaysia, 1984. 7. Moran, M.J. and Shapiro, H.N., Fundamentals of Engineering Thermodynamics, 5th ed., John Wiley, USA, 2004. 8. Bromley, A. and Wilke, C.R., Viscosity behavior of gases, Industrial and Engineering Chemistry Chemical Engineering Science, 43(7), 1641, 1951. 9. Naji, H.S., Conventional and rapid flash calculations for the Soave-RedlichKwong and Peng-Robinson equations of state, Emirates Journal for Engineering Research, 13(3), 81–91, 2008. 3 Chapter 3 - Fluid mechanics 1. American Society of Mechanical Engineers Standard, Measurement of Fluid Flow in Pipes Using Orifice, Nozzle, and Venturi. 2. Fluid Meters Their Theory and Application, 6th ed., Report of the American Society of Mechanical Engineers Research Committee on Fluid Meters, 1971. 3. Crane Technical Paper No. 410, Flow of Fluids through Valves, Fittings, and Pipe, Metric edition—SI Unit, 1995. 4. Miller, R.W., Flow Measurement Engineering Handbook, 2nd ed., McGraw-Hill, USA, 1989. 5. Perry, R.H. and Green, D., Perry’s Chemical Engineers’ Handbook, 6th ed., McGraw-Hill, Malaysia, 1984. 6. Tuve, G.L. and Sprenkle, R.E., Instruments, 6, 201, 1933. 7. Coulson, J.M. and Richardson, J.F., Chemical Engineering, 4th ed., Vol. 1, Pergamon Press, Great Britain, 1990. 8. ISO 5167-2, Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross Section Conduits Running Full, Part 2, Orifice Plate, International Standard, Switzerland, 2003. 9. ASME B31.3, Process Piping, ASME Code for Pressure Piping, American Society of Mechanical Engineers, USA, 2002. 10. ASME B16.21, Nonmetallic Flat Gaskets for Pipe Flanges, American Society of Mechanical Engineers, USA, 2005. 11. ASME B16.5, Pipe Flanges and Flanged Fittings, American Society of Mechanical Engineers, USA, 2003. 12. McCabe, W.L. and Smith, J.C., Unit Operations of Chemical Engineering, 3rd ed., McGraw-Hill, Tokyo, 1976. 13. Hooper, W.B., Calculated head loss caused by change in pipe size, Chemical Engineering, November 7, 89–92, 1988. 14. Hooper, W.B., The two-K method predict head loss in pipe fittings, Chemical Engineering, August 24, 96–100, 1981. 15. Zenz, F.A., Minimize manifold pressure drop, Hydrocarbon Processing and Petroleum Refiner, 41(12), 125–130, 1962. 16. Fisher ED full port equal percentage case, Fisher Catalog-10, USA, pp. 1–73. 17. API RP 14E, Recommended Practice for Design and Installation of Offshore Production Platform Piping Systems, 5th ed., American Petroleum Institute, 1991. 18. Massey, B.S., Mechanics of Fluids, 6th ed., Van Nostrand Reinhold, chap. 12, London, 1989. 19. External Extruded High-Density Polyethylene Coating System for Pipes, Australian/New Zealand Standard AS/NZS 1518:2002. 20. External Fusion-Bonded Epoxy Coating for Still Pipes, Australian/New Zealand Standard AS/NZS 3862:2002. 21. Kern, D.Q., Process Heat Transfer, International edition, McGraw-Hill, Singapore, 1988. 22. Hausen, H., Darstellung des Warmeuberganges in Rohren durch verallgemeinerte Potenzbeziehungen, Zeitsche, V.D.I. Beihefte Verfahrenstechnik, No. 4, 1943. 23. Carslaw, H.S. and Jaeger, J.C., Conduction of Heat in Solids, Oxford University Press, Great Britain, 1959. 24. Parker, J.D., Boggs, J.H., and Blick, E.F., Introduction to Fluid Mechanics and Heat Transfer, Addison-Wesley, Reading, MA, 1969. 25. Hilpert, R., Warmeabgabe von geheizen Drahten und Rohren, Forsch Gebiete Iingenieurw, 4, 1933. 26. Beggs, H.D. and Brill, J.P., A study of two-phase flow in inclined pipe, Journal of Petroleum Technology, May, 607–617, 1973. 27. Mukherjee, H. and Brill, J.P., Liquid holdup correlations for inclined twophase flow, Journal of Petroleum Technology, May, 1003–1008, 1983. 28. Mukherjee, H. and Brill, J.P., Pressure drop correlations for inclined twophase flow, Journal of Energy Resources Technology, 107, December, 549–554, 1985. 29. Gregory, G.A., Mandhane, J., and Aziz, K., Some design consideration for two-phase flow in pipes, Journal of Canadian Petroleum Technology, January– March, 65–71, 1975. 30. Bendiksen, K.H., Malnes, D., Moe, R., and Nuland, S., The dynamic twofluid model OLGA: Theory and application, SPE Production Engineering, May, 171–180, 1991. 31. Baker, A., Nielsen, K., and Gabb, A., Pressure loss, liquid-holdup calculations developed, Oil and Gas Journal, March 14, 55–59, 1988. 32. Baker, A., Nielson, K., and Gabb, A., Holdup, pressure-loss calculation confirmed, Oil and Gas Journal, March 28, 44–49, 1988. 33. Mukherjee, H. and Brill, J.P., Empirical equations to predict flow patterns in two-phase inclined flow, International Journal of Multiphase Flow, 11(3), 299–315, 1985. 34. Waard, C. and Lotz, U., Corrosion 93, The NACE Annual Conference and Corrosion Show, Paper No. 69. 35. CO 2 Corrosion Rate Calculation Model, Norsok Standard, M-506, Rev2, June 2005. 36. Waard, C., Lotz, U., and Millams, D.E., Corrosion 91, The NACE Annual Conference and Corrosion Show, Paper No. 577. 37. NACE Standard MR0175-2001, Item No. 21304. 38. Waard, C., Lotz, U., and Dugstad, A., Corrosion 95, The NACE International Annual Conference and Corrosion Show, Paper No. 128. 4 Chapter 4 - Heat transfer 1. Kern, D.Q., Process Heat Transfer, International ed., McGraw-Hill, Singapore, 1988. 2. Holman, J.P., Heat Transfer, 8th ed., McGraw-Hill, USA, 1997. 3. Rohsenow, W.M. and Hartnett, J.P., Handbook of Heat Transfer, McGraw-Hill, New York, 1973. 4. Carslaw, H.S. and Jaeger, J.C., Conduction of Heat in Solids, Oxford University Press, Great Britain, 1959. 5. Andrews, R.V., Solving conductive heat transfer problems with electricalanalogue shape factors, Chemical Engineering Progress, 51(2), 67, 1955. 6. Kreyszig, E., Advanced Engineering Mathematics, 7th ed., John Wiley and Sons, New York, 1993. 7. Gray, A. and Mathews, G.B., A Treatise on Bessel Functions and Their Applications to Physics, Macmillan, London, 1895. 8. Coulson, J.M. and Richardson, J.F., Chemical Engineering, Vol. 1, 4th ed., Pergamon Press, Great Britain, 1990. 9. Bird, R.B., Stewart, W.E., and Lightfoot, E.N., Transport Phenomenon, International ed., John Wiley and Sons, USA, 1976. 10. McAdams, W.H., Heat Transmission, 3rd ed., McGraw-Hill, New York, 1954. 11. Perry, R.H. and Green, D., Perry’s Chemical Engineers’ Handbook, 6th ed., McGraw-Hill, Malaysia, 1985. 12. Parker, J.D., Boggs, J.H., and Blick, E.F., Introduction to Fluid Mechanics and Heat Transfer, Addison-Wesley, Reading, MA, 1969. 13. Holland, F.A., Moores, R.M., Watson, F.A., and Wilkinson, J.K., Heat Transfer, Heinemann Educational Books, London, 1970. 14. Chopey, N.P. (Editor), Handbook of Chemical Engineering Calculations, 3rd ed., McGraw-Hill, New York, 2004. 15. Welty, J.R., Wicks, C.E., and Wilson, R.E., Fundamentals of Momentum, Heat and Mass Transfer, 3rd ed., John Wiley and Sons, USA, 1984. 16. Standards of the Tubular Exchanger Manufacturers Association, 8th ed., TEMA Inc, New York, 1999. 17. Perrotin, T. and Clodic, D., Fin Efficiency Calculation in Enhanced Fin-and-Tube Heat Exchangers in Dry Conditions, International Congress of Refrigeration, Washington, DC, 2003. 18. Siegel, R. and Howell, J.R., Thermal Radiation Heat Transfer, McGraw-Hill, New York, 1981. 5 Chapter 5 - Distillation 1. Treybal, R.E., Mass Transfer Operation, 3rd ed., McGraw-Hill International Student Edition, Tokyo, 1980. 2. Coulson, J.M. and Richardson, J.F., Chemical Engineering, Vol. 6, 6th ed., Pergamon Press, Great Britain, 1986. 3. McCabe, W.L. and Smith, J.C., Unit Operations of Chemical Engineering, 3rd ed., McGraw-Hill International Student Edition, Tokyo, 1976. 4. Kurihara, K., Nakamichi, M., and Kojima, K., Isobaric vapor-liquid equilibria for methanol + ethanol + water and the three constituent binary systems, J. Chem. Eng. Data, 38, 446–449, 1993. 5. Smoker, E.H., Analytical determination of plates in fractioning columns, Trans. Am. Inst. Chem. Eng., 34, 165, 1938. 6. Fair, J.R., How to predict sieve tray entrainment and flooding, Petro./Chem. Eng., 33, 45, 1961. 7. Chopey, N.P., Handbook of Chemical Engineering Calculation, 3rd ed., McGrawHill, New York, 2004. 8. Murphree, E.V., Rectifying column calculations with particular reference to N component mixtures, Ind. Eng. Chem., 17(7), 747, 1925. 9. Lewis, W.K., Rectification of binary mixtures, Ind. Eng. Chem., 28, 399, 1936. 10. Couper, J.R. et al., Chemical Process Equipment—Selection and Design, 3rd ed., Burlington, MA, Oxford, UK, 2010. 11. Perry, R.H. and Green, D., Perry’s Chemical Engineers’ Handbook, 8th ed., McGraw-Hill, New York, 2008. 12. AIChE Research Committee, Bubble Tray Design Manual, New York, 1958. 13. Gerster, J.A., Hill, A.B., Hochgraf, N.N., and Robinson, D.G., Tray Efficiencies in Distillation Columns. Final Report, University of Delaware, AIChE, 1958. 14. Smith, B.D., Design of Equilibrium Stage Processes, McGraw-Hill, New York, 1963. 15. Fuller, E.N., Schettler, P.D., and Giddings, J.C., A new method for the prediction of gas-phase diffusion coefficients, Ind. Eng. Chem., 58(5), 19, 1966. 16. Wilke, C.R. and Chang, P., Correlation of diffusion coefficients in dilute solutions, AIChE, 1955. 17. Lockett, M.J., Distillation Tray Fundamentals, Cambridge University Press, England, 2009. 18. Kister, H.Z., Distillation Design, McGraw-Hill, USA, 1992. 19. Robbins, L.A., Chem. Eng. Prog., May, 87, 1991. 20. Lockett, M.J., Chem. Eng. Prog., 94(1), 60, 1998. 21. Zuiderweg, F.J., Sieve trays—A view on the state of art, Chem. Eng. Sci., 37(10), 1441, 1982. 22. Lockett, M.J. and Banik, S., Weeping from Sieve Trays, AIChE Meeting, November, San Francisco, 1984. 6 Chapter 6 - Separators 1. Gas Processors Suppliers Association, GPSA Engineering Databook, 11th ed. GPSA, SI, Oklahoma, 1998. 2. Perry, R.H., Ed., Chemical Engineers’ Handbook, 5th ed., chap. 5, McGraw-Hill Book, Tokyo, 1973. 3. Fabian, P., Cusack, R., Hennessey, P., and Neuman, M., Demystifying the selection of mist eliminators, Part I, Chemical Engineering, November, 148–156, 1993. 4. API Specification 12J, Specification for Oil and Gas Separators, 7th ed., American Petroleum Institute, Washington DC, 1989. 5. API Specification 11P, Specification for Packaged Reciprocating Compressors for Oil and Gas Production Services, 2nd ed., American Petroleum Institute, Washington DC, 1989. 6. API RP 521, Guide for Pressure-Relieving and Depressuring Systems, 4th ed., American Petroleum Institute, Washington DC, 1997. 7. Design guide, Separations & Mass-transfer Products, ACS Industries, LP, Houston, USA. 8. Campbell, J.M., Gas Conditioning and Processing, 8th ed., John M. Campbell and Company, Vol. 2, Oklahoma, 2004. 9. Scott, S.L., Shoham, O., and Brill, J.P., Prediction of slug length in horizontal, large-diameter pipes, SPE Production Engineering, August, 335–340, 1989. 10. CO 2 Corrosion Rate Calculation Model, NORSOK M-506, Revision 1, June, Norway, 1998. 7 Chapter 7 - Overpressure protection 1. API 520, Sizing, Selection, and Installation of Pressure-Relieving Devices in Refineries, Part-1—Sizing and Selection, 8th ed., American Petroleum Institute, Washington, D.C., 2008. 2. API 520, Sizing, Selection, and Installation of Pressure-Relieving Devices in Refineries, Part-II—Installation, 4th ed., American Petroleum Institute, Washington, D.C., 1994. 3. API 521, Pressure-Relieving and Depressuring Systems, 5th ed., American Petroleum Institute, Washington, D.C., 2007. 4. ASME Section VIII, Rules for Construction of Pressure Vessels, Division 1, American Society of Mechanical Engineers, New York, 2003. 5. ASME B31.3, Process Piping, American Society of Mechanical Engineers, New York, 2002. 6. AS 1271, Safety Valves, Other Valves, Liquid Level Gauges and Other Fittings for Boiler and Unfired Pressure Vessels, Australian Standard, Sydney, 1997. 7. API Std 598, Valve Inspection and Testing, 8th ed., American Petroleum Institute, Washington, D.C., 2004. 8. Yaws, C.L., Calculate thermal-expansion coefficients, Chemical Engineering, August 1995. 9. Perry, R.H. and Green, D., Perry’s Chemical Engineers’ Handbook, 6th ed., McGraw-Hill, Malaysia, 1984. 10. Lapple, C.E., Isothermal and adiabatic flow of compressible fluids, Transactions of AIChE, 39, 1943. 11. Mak, H.Y., New method speeds pressure relief manifold design, Oil and Gas Journal, November 20, 1978. 12. API Std. 2000, Venting Atmospheric and Low-Pressure Storage Tanks, 5th ed., American Petroleum Institute, Washington, D.C., 1998. 13. AS 1940, The Storage and Handling of Flammable and Combustible Liquids, Australian Standard, Sydney, 1993. 14. Fisher, H.G., DIERS research program on emergency relief systems, CEP, August, 33–36, 1985. 15. Fauske, H.K., Emergency relief system (ERS) design, CEP, August, 53–56, 1985. 16. Leung, J.C. and Grolmes, M.A., A generalized correlation for flashing choked flow of initially subcooled liquid, AIChE, April, 688–691, 1988. 17. Grolmes, M.A., Leung, J.C. and Fauske, H.K., Large-scale experiments of emergency relief systems, CEP, 57–62, 1985. 18. Fauske, H.K. and Leung, J.C., New experimental technique for characterizing runaway chemical reactions, CEP, August, 39–46, 1985. 19. Brzustowski, T.A. and Sommer, E.C., Jr., Predicting radiant heating from flares, Proceeding—Division of Refining, 53, 865–898, 1973. 20. BS 5345, Selection, Installation and Maintenance of Electrical Apparatus for Use in Potentially Explosive Atmospheres (Other than Mining Applications or Explosives Processing and Manufacture) Part 1: General Recommendations, 1989. 21. IEC 61508, Functional Safety of Electrical/Electronics/Programmable Electronic Safety-related Systems (Part 1 to Part 7). 22. IEC 61511, Functional Safety—Safety Instrumented Systems for the Process Industry Sector (Part 1 to Part 3). 23. ANSI/ISA—S84.01, Application of Safety Instrumented Systems for the Process Industries, 1996. 8 Chapter 8 - Glycol dehydration 1. API Specification 12GDU, Specification for Glycol-Type Gas Dehydration Units, 1st ed., December 15, 1990. 2. Campbell, J.M., Gas Conditioning and Processing, John M. Campbell and Company, 8th ed., Vol. 2, Oklahoma, 2004. 3. Gas Processors Suppliers Association, GPSA Engineering Data Book—SI, GPSA, Oklahoma, 1998. 4. Glycol Pumps for the Next Generation, General Product Information, Rotor-Tech. 5. Glycol Pumps and Accessories, Kimray Inc. 6. AS 3814—2005, Australian Standard, Industrial and Commercial Gas-Fired Applications. Figure 8.15 Message box.