COMPUTATIONAL ALGORITHMS for MULTICOMPONENT PHASE EQUILIBRIA and DISTILLATION by MATTHEW OCHUKOH OHANOMAH B.Sc.(Hons.), University of Ife, 1977 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY in THE FACULTY OF GRADUATE STUDIES Department of Chemical Engineering We accept this thesis as conforming to the required standard THE UNIVERSITY OF BRITISH COLUMBIA November 1981 © Matthew Ochukoh Ohanomah, 1981 In presenting t h i s thesis i n p a r t i a l f u l f i l m e n t of the requirements for an advanced degree at the University of B r i t i s h Columbia, I agree that the Library s h a l l make i t f r e e l y a v a i l a b l e for reference and study. I further agree that permission for extensive copying of t h i s thesis for scholarly purposes may be granted by the head of my department or by h i s or her representatives. I t i s understood that copying or publication of t h i s thesis for f i n a n c i a l gain s h a l l not be allowed without my written permission. Department of CjrJuiY<*,C,oJL £.<Wfrlrvgj^r w The University of B r i t i s h Columbia 2075 Wesbrook Place Vancouver, Canada V6T 1W5 Da ABSTRACT This work has two major objectives: (1) To develop r e l i a b l e , stable, easily-programmable and f a s t computational algorithms that would apply to process operation and design. (2) To determine the best algorithms for s p e c i f i c operations through comparative studies. The study covers the following areas: (1) Isothermal phase e q u i l i b r i a i n up to four phases — one vapour, two l i q u i d and one s o l i d — with emphasis on vapour-liquid, l i q u i d - l i q u i d , l i q u i d - s o l i d and v a p o u r - l i q u i d - l i q u i d systems. (2) S e n s i t i v i t y analysis i n vapour-liquid e q u i l i b r i a . (3) Saturation-point c a l c u l a t i o n methods. (4) Adiabatic vapour-liquid e q u i l i b r i a . (5) Conventional equilibrium-stage d i s t i l l a t i o n - u n i t c a l c u l a t i o n s . The study deals with multicomponent systems and, except where constrained by lack of information, a l l n o n i d e a l i t i e s are rigorously accounted f o r . The phase-equilibria studies embody both mass-balance and f r e e -energy-minimization methods and some of the algorithms are, l i k e the s e n s i t i v i t y - a n a l y s i s study, based on geometric programming. Vector projection methods, for accelerating multivariate successive-s u b s t i t u t i o n i t e r a t i o n , and a quadratic form of Wegstein's projection method have been developed and successfully applied. The saturation-points study includes three i n t e r p o l a t i o n methods — regula f a l s i and quadratic i n t e r p o l a t i o n s and a dynamic form - i i -of Lagrange i n t e r p o l a t i o n — , a quasi-Newton formulation and the generally applied Newton and Richmond methods. The r e s u l t s favour the i n t e r p o l a t i o n methods. For a d i a b a t i c - f l a s h and d i s t i l l a t i o n - u n i t c a l c u l a t i o n s , algorithms employing two-dimensional Newton-Raphson, BP-partitioning and SR-partitioning methods have been developed. Methods for reducing eq u i l i b r i u m - r a t i o c a l c u l a t i o n to once per i t e r a t i o n per stage i n the f i r s t two classes and for reducing enthalpy evaluation In the t h i r d c l a s s , have also been developed. For every problem-type, relevant algorithms have been applied to a wide class of systems and compared. However, the lack of data excluded any applications on s o l i d - l i q u i d - l i q u i d - v a p o u r e q u i l i b r i a and on wide-boiling d i s t i l l a t i o n . TABLE OF CONTENTS Page ABSTRACT i i LIST OF TABLES x i i LIST OF FIGURES xv ACKNOWLEDGEMENT xlx CHAPTER ONE - INTRODUCTION 1 1-1 Preamble 1 1-1-1 Purpose and Scope of Study 5 1-1-2 A Word on the Results 7 1-2 Isothermal Phase Equilibria 9 1-2-1 The Mass-Balance Approach 10 1-2-2 The Free-Energy-Minimization Approach 14 1- 2-3 The Geometric-Programming Method 17 1-3 Sensitivity Analysis 18 1-4 Bubble- and Dew-Point Calculations 19 1-5 Adiabatic Vapour-Liquid Equilibria 21 1-6 Multicomponent Multistage D i s t i l l a t i o n with Equilibrium stages 22 1-7 Estimation of Physical Properties 24 1- 8 Structure of this Work 26 CHAPTER TWO - ESTIMATION OF PHYSICAL PROPERTIES 29 2- 1 Introduction 29 2-2 Saturation Pressure 29 2-3 Liquid-Phase Reference Fugacity.... 30 2- 3-1 Condensable Components ' '< 30 2-3-2 Hypothetical-Liquid and S u p e r c r i t i c a l Components..... 32 - i v -Page 2-4 Solid-Phase Reference Fugacity 33 2-5 Vapour Molar Volume and Compressibility Ratio 35 2-5-1 The Truncated V i r l a l Equation of State 35 2-5-2 The Wilson Modification of the Redlich-Kwong EOS 38 2-6 Liquid Molar Volume 39 2-7 Vapour-Phase Fugacity Coefficient 42 2-8 Liquid-Phase Activity Ceofficient 43 2-8-1 The Wilson Equation 43 2-8-2 The Non-Random-Two-Liquid Model 44 2-8-3 The Universal Quasichemical Model 45 2-9 Vapour Molar Enthalpy 47 2-9-1 The Departure Function 47 2-9-2 The Ideal-gas Enthalpy 48 2- 10 Liquid Enthalpy 49 2-10-1 Departure from Saturation Value 50 2-10-2 Enthalpy of Vaporization 51 2-10-3 Enthalpy of Mixing 51 CHAPTER THREE - ISOTHERMAL VAPOUR-LIQUID FLASH 53 3- 1 Introduction 53 3-1-1 Nomenclature. 53 3-1-2 Systems Employed and a Measure of Nonideality 56 3-2 Double-Loop Univariate Methods 63 3-2-1 T h e o r e t i c a l Background 64 3-2-2 A General Form of the Algorithm 65 3-2-3 A Comparative Study of the D i f f e r e n t Formulations 68 3-2-4 Exploring Other P o s s i b i l i t i e s 76 3-2-5 Investigating D i f f e r e n t I n i t i a l i z a t i o n Schemes 85 3-2-6 Applications 89 3-2-7 Deductions 91 -v-Page 3-3 Free-Energy-Minimlzation Methods 92 3-3-1 General Theory 93 3-3-2 The Rand Method 94 3-3-3 A Modified Rand Method 96 3-3-4 A Geometric-Programming Formulation 100 3-3-5 Seeking a Solution Method for the Geometric-Programming Problem (GPP) 105 3-3-6 Various Successive-Substitution Arrangements of the GPP 108 3-3-7 Accelerating the GPP by Hyperplane L i n e a r i z a t i o n 109 3-3-8 Accelerating the GPP by Vector P r o j e c t i o n I l l 3-3-9 A Method Based on S e n s i t i v i t y Analysis 121 3-3-10 I n i t i a l i z a t i o n Schemes 122 3-3-11 Applications and Deductions 123 3-4 Single-Loop Univariate Methods 128 3-4-1 Richmond-Accelerated Methods 128 3-4-2 Methods U t i l i z i n g the Mean-Value Theorem 129 3-4-3 Wegstein-Projected Methods 130 3-4-4 A Quadratic Form of Wegstein's Acceleration Method 139 3-4-5 Applications and Deductions 146 3- 5 How the Different Methods Compare 148 3-5-1 Applications and Deductions 148 3-5-2 Varying the Frequency of K-Computation 149 3- 5-3 Conclusions 153 CHAPTER FOUR - SENSITIVITY ANALYSIS IN VAPOUR-LIQUID EQUILIBRIA 154 4- 1 Introduction 154 4- 1-1 Nomenclature 154 4-2 The Vapour-Liquid Equilibrium Formulation 155 4-2-1 Eliminating Matrix Inversion 156 4-2-2 Applications and Outcome 158 4-3 A Quadratic Taylor-Approximation 159 - v i -Page 4-4 A Mean-Value-Theorem Approach 162 4-4-1 Obtaining a Best a 163 4-4-2 Algorithm A 167 4-4-3 Algorithm B 168 4-4-4 Algorithm C 168 4-5 Error-Tracking 176 4-6 Predictor-Corrector Approach 179 4-6-1 Method 1 179 4-6-2 Method 2 179 4-6-3 Method 3 180 4- 6-4 Applications and Deductions 180 4- 7 Conclusions 181 CHAPTER FIVE - ISOTHERMAL LIQUID-LIQUID AND LIQUID-SOLID FLASH CALCULATION 184 5- 1 Introduction 184 5- 1-1 Nomenclature 184 5-2 Liquid-Liquid Equilibria 185 5-2-1 T h e o r e t i c a l Background 187 5-2-2 Outline of Algorithms 187 5-2-3 NRTL Model and the Problem of Multiple Solutions 190 5-2-4 I n i t i a l i z a t i o n Schemes 192 5-2-5 Applications 203 5-2-6 Deductions 207 5-3 Liquid-Solid Equilibria 207 5-3-1 Theoretical Background 207 5-3-2 Choice of Algorithms 211 5-3-3 I n i t i a l i z a t i o n Schemes 211 5-3-4 Applications 214 5-3-5 Observations and Deductions 214 5-4 Conclusions 216 - v i i -Page CHAPTER SIX - MULTIPHASE EQUILIBRIA 217 6—1 Introduction. 217 6-1-1 Nomenclature 218 6-2 The Phase-Fraction Approach 219 6-2-1 Problem Formulation 220 6-2-2 Solving By a Newton-Raphson Approach 222 6-2-3 Employing a Quasi-Newton Approach 223 6-2-4 P a r t i t i o n i n g Method with MVT and Tetrahedral P r o j e c t i o n 224 6-3 The Geometric-Programming Formulation 225 6-3-1 The Three-phase Liquid-Liquid-Vapour Case.... 226 6-3-2 The Generalized S o l i d - L i q u i d - L i q u i d -Vapour Problem 230 6-3-3 Solution Methods 231 6-4 The Sensitivity Approach 234 6-4-1 A General Two-phase Problem 235 6-4-2 A General Three-phase Problem 237 6-4-3 The Generalized S o l i d - L i q u i d - L i q u i d -Vapour Problem 239 6-4-4 The General Algorithm 242 6-5 Some Alternative Formulations 243 6-6 I n i t i a l i z a t i o n Schemes 245 6-7 Applications 249 6- 8 Conclusions 254 CHAPTER SEVEN - BUBBLE- AND DEW-POINT CALCULATIONS 255 7- 1 Introduction 255 7-1-1 Nomenclature 256 7-2 Theoretical Background 257 7-3 A Regula-Falsi Interpolation Method 261 7-4 A Quadratic Interpolation Method 261 - v i i i -Page 7-5 The Dynamic Lagrange Interpolation Method 262 7-6 Newton's Method 264 7-7 The Third-order Richmond Method 266 7-8 A Quasi-Newton Approach 269 7-9 I n i t i a l i z a t i o n Schemes 276 7-10 Applications 279 7-10-1 Double-Loop Algorithms 283 7- 10-2 Fixed-Inner-Loop Algorithms 284 7- 11 Conclusions 290 CHAPTER EIGHT - ADIABATIC VAPOUR-LIQUID FLASH CALCULATION 293 8- 1 Introduction.. 293 8- 1-1 Nomenclature 293 8-2 Theoretical Background 295 8-3 Newton-Raphson Methods 298 8-3-1 The Conventional Formulation 300 8-3-2 The Barnes-Flores Form 301 8-3-3 A Modified Approach 303 8-4 A Double-Iteration Regula-Falsi Method 309 8-5 Sum-Rates Partitioning Methods 311 8-5-1 A Successive-Substitution Method with Vector-Projection 311 8-5-2 Absorption-Factor Formulation with Vector-Projection 314 8-5-3 Absorption-Factor Formulation without Acceleration 315 8-6 Bubble-point Partitioning Methods 315 8-6-1 The Conventional Form 316 8-6-2 Elimi n a t i n g Bubble-point C a l c u l a t i o n 317 8-6-3 Reducing K Computation 322 8-6-4 Eliminating Direct K-T Derivative C a l c u l a t i o n 324 - i x -Page 8-7 Applications 325 8-7-1 Convergence C r i t e r i a 326 8- 7-2 Results and Observations 328 8- 8 Conclusions 334 CHAPTER NINE - DISTILLATION-UNIT CALCULATION 338 9- 1 Introduction 338 9- 1-1 Nomenclature 339 9-1-2 Problem S p e c i f i c a t i o n and Working Equations 342 9-2 BP Methods — A General Algorithm 347 9-3 BP Methods — Updating Total-Flow Profiles 348 9-4 BP Methods — Updating Temperature Profile 348 9-4-1 A Bubble-point-Temperature Approach 349 9-4-2 The K b Method 349 9-4-3 The One-Step Newton-Iteration Approach 353 9-5 BP Methods — Updating the Composition Profiles.... 359 9-5-1 Modified Thomas Algorithm with the 6 Method of Convergence 359 9-5-2 An Al t e r n a t i v e Composition Updating Scheme 362 9-6 SR-type Solution Methods 372 9-6-1 A General Algorithm 372 9-6-2 Updating the Temperature P r o f i l e 372 9-6-3 Updating the Flow and Composition P r o f i l e s 376 9-7 Boiling-Range-Unlimited Methods 378 9-7-1 Tomich's 2N Newton-Raphson Method 379 9-7-2 A Stage-wise Two-dimensional Newton-Raphson Approach 383 -x-Page 9-8 Applications 389 9-8-1 I n i t i a l i z a t i o n Schemes and Convergence C r i t e r i a 389 9-8-2 Results 397 9-9 Conclusions 400 CHAPTER TEN - GENERAL CONCLUSIONS AND RECOMMENDATIONS 401 BIBLIOGRAPHY 406 APPENDICES 411 A General Notes on Programming 411 B A v a i l a b i l i t y of Programs and Some S p e c i f i c Program D e t a i l s 415 C The Geometric Programming Concept 427 D The Solid-phase Reference Fugacity 430 E Sources of Data 438 LIST OF TABLES Table Page 3-1 V i t a l information on vapour-liquid systems 57 3-2 Computation times (CPU seconds) for double-loop univariate algorithms 90 3-3 Computation times (CPU seconds) for f i r s t phase of a p p l i c a t i o n of free-energy minimi-zation algorithms 125 3-4 Computation times (CPU seconds) for the f i n a l comparison of free-energy minimi-zation algorithms 127 3-5 Computation times (CPU seconds) for s i n g l e -loop univariate algorithms 147 3-6 Absolute errors (E) for various K-computation frequencies 151 3- 7 F i n a l comparison of vapour-liquid algorithms: Computation times (CPU seconds) 152 4- 1 Errors for s e n s i t i v i t y analysis ( o r i g i n a l GP version) for system VA, with T* = 336.5K 160 4-2 Errors for s e n s i t i v i t y - a n a l y s i s Algorithms A and B for system VA, with T* = 336.5K 169 4-3 Errors for s e n s i t i v i t y - a n a l y s i s Algorithm C for system VA with T* = 336.5K 174 4-4 Errors for a more comprehensive a p p l i c a t i o n of s e n s i t i v i t y - a n a l y s i s Algorithm C 175 4-5 Er r o r - t r a c k i n g r e s u l t s (system VA with T* = 336.5K and AT = 2K) 178 4- 6 Computation times (CPU seconds) f or Predictor-Corrector algorithms 182 5- 1 V i t a l information on l i q u i d - l i q u i d systems 186 5-2 8, and i t e ration count (I.C.) for d i f f e r e n t Li i n i t i a l i z a t i o n schemes 205 - x i i -Table r 0 Page 3-J Computation times (CPU seconds) for l i q u i d -l i q u i d systems 206 5-4 V i t a l information on l i q u i d - s o l i d systems. 208 5- 5 Computation times (CPU seconds) for l i q u i d -s o l i d systems 215 6- 1 I t e r a t i o n counts obtained from applying the two GP arrangements to liquid - l i q u i d - v a p o u r systems 233 6-2 I t e r a t i o n counts for d i f f e r e n t i n i t i a l i z a t i o n schemes, applied to liquid-liquid-vapour systems.... 248 6-3 I t e r a t i o n counts for the various multiphase algorithms, based on assumption of the r i g h t number of phases 251 6- 4 I t e r a t i o n counts for the various multiphase algorithms, based on assumption of redundant phases. 253 7- 1 Computation times (CPU seconds) for bubble-point c a l c u l a t i o n based on the double-iteration algorithm 285 7-2 Computation times (CPU seconds) for dew-point c a l c u l a t i o n based on the double-iteration algorithms 286 7-3 Computation times (CPU seconds) for bubble-point c a l c u l a t i o n based on algorithms with inner i t e r a t i o n f i x e d at 2 288 7-4 Computation times (CPU seconds) for dew-point c a l c u l a t i o n based on algorithms with inner i t e r a t i o n fixed at 2 289 7-5 Computation times (CPU seconds) for bubble-point c a l c u l a t i o n based on algorithms with inner i t e r a t i o n bounded at 4 291 7-6 Computation times (CPU seconds) for dew-point c a l c u l a t i o n based on algorithms with inner i t e r a t i o n bounded at 4 292 8-1 V i t a l information on a d i a b a t i c - f l a s h systems. 294 - x i i i -Table Page 8-2 I t e r a t i o n counts for d i f f e r e n t check-function formulations for one-step Newton-iteration update of temperature i n BP algorithms 323 8-3 Reference names and descriptions of adia b a t i c -f l a s h algorithms 327 8-4 Computation times (CPU seconds) for adia b a t i c -f l a s h algorithms 329 8-5 Comparison of i t e r a t i o n counts for BP algorithms 331 8-6 Computation times (CPU seconds) for ad i a b a t i c -f l a s h algorithms for narrow-boiling systems 333 8-7 I t e r a t i o n counts for the two versions of 'SR algorithm 3' without temperature damping 335 8- 8 Computation times (CPU seconds) for adia b a t i c -f l a s h algorithms for wide-boiling systems 336 9- 1 V i t a l information on d i s t i l l a t i o n systems 341 9-2 I t e r a t i o n counts for one-step Newton-iteration temperature-updating schemes 358 9-3 I t e r a t i o n counts for alternative-composition-updating convergence schemes 369 9-4 Code names and descriptions of the d i s t i l l a t i o n -unit computational algorithms 390 9-5 X T values for the d i f f e r e n t temperature-i n i t i a l i z a t i o n schemes 394 9-6 I t e r a t i o n counts for d i f f e r e n t temperature-i n i t i a l i z a t i o n schemes 396 9-7 Computation times (CPU seconds) and i t e r a t i o n counts ( i n parenthesis) for narrow-boiling systems 398 B-l Information on accessible programs 416 E - l Source references for data employed i n study 438 - x i v -LIST OF FIGURES Figure Page 3-1 Two-phase region temperature p r o f i l e for narrow-b o i l i n g systems 59 3-2 Two-phase region temperature p r o f i l e for wide-b o i l i n g systems 60 3-3 K V. 9 for the d i f f e r e n t systems at 9* « 0.5 61 r v v 3-4 Plot of nonideality parameter versus s o l u t i o n -point vapour f r a c t i o n 62 3-5 Standard form check-function p r o f i l e s f o r system VA 69 3-6 Standard logarithmic check-function p r o f i l e s for system VA 70 3-7 Rachford-Rice check-function p r o f i l e s f o r system VA 71 3-8 Barnes-Flores check-function p r o f i l e s for system VA 72 3-9 Comparing the four formulations for system VA at 340K 74 3-10 Comparing the four formulations for system VA at 342.5K 75 3-11 I t e r a t i o n units (on a scale of 0 to 100) v. vapour f r a c t i o n for system VC (based on Newton's method.) 77 3-12 I t e r a t i o n units v. vapour f r a c t i o n : comparison between Newton and Richmond for system VB 78 3-13 f, v. 9 for d i f f e r e n t values of n f6r system VA at 341.66K 81 3-14 <|> v. 8^ for d i f f e r e n t forms of <|> 83 3-15 f. v. 9 for d i f f e r e n t forms of <b for system <p v VA at 341.66K 84 -xv.-F i g u r e Page o * 3 -16 9 v . 9 f o r systems VA and VP based on i n i t i a l i -v v z a t i o n Schemes 3 and 4 88 3-17 S o l u t i o n - s p a c e t r i a n g l e 114 3 -18 D i s p a r i t y - s p a c e t r i a n g l e 114 3 -19 D i s p a r i t y - s p a c e te t rahedron 117 3 -20 D i s p a r i t y - s p a c e t e t r a h e d r a l base 119 3 - 2 1 G o l d e n - s e c t i o n search fo r o p t i m a l MVT parameter 131 g 3-22 9 v . 8 f o r d i f f e r e n t va lues of t f o r system VA v v g at T cor responding to 9^ « 0 .35 134 3 -23 9 s v . 9 f o r t = 1 and t = 20 f o r system VA 135 v v 3-24 9 s v . 9 f o r t= 1 and t = 20 f o r system VP 136 v v 3 - 2 5 t p r o f i l e s f o r systems VA and VP 138 g 3-26 9 v . 9 f o r the R ichmond -acce le ra ted standard v v f o r m u l a t i o n 140 g 3-27 8 v . 8 f o r the Newton -acce le ra ted standard v v f o r m u l a t i o n 141 3-28 8 s v . 8 f o r the R ichmond -acce le ra ted R a c h f o r d -v v R i c e form 142 g 3-29 8 v . 8 f o r the Newton -acce le ra ted R a c h f o r d -v v R i c e form 143 3 -30 8 S v . 9 f o r the MVT -acce le ra ted R a c h f o r d - R i c e 144 v v fo rm. 4 - 1 F i t of mean-value- theorem parameter , a , f o r system VA 166 -xv i -F i g u r e Page 4 - 2 AnK-versus -T p a r t i t i o n i n g scheme 171 5 - 1 f ( 9 L ) v e r s u s e L f o r t h e system LA at 298K (based on NRTL) 191 5-2 F ^ 6 L ^ v * 9 L ' u s i n § t h e UNIQUAC model , w i t h K ' s c o r r e c t e d fo r composi t ion dependence 193 5 L 3 F ( 9 L ) V ' 6 L » u s i n § t h e UNIQUAC model , w i t h K ' s uncor rec ted f o r compos i t ion dependence 194 5-4 f ( 8 ) v . 9 u s i n g the NRTL model , w i t h K ' s Li L i c o r r e c t e d f o r compos i t ion dependence 195 5 -5 f ( 8 ) v . 9 us ing the NRTL model , w i t h L L K ' s uncor rected f o r compos i t ion dependence 196 5 -6 T e m p e r a t u r e - s o l i d - f r a c t i o n p r o f i l e f o r the s o l i d systems 209 5-7 f ( 9 ) versus 9 f o r the system SA 212 s s 5 -8 f ( 9 ) v . 8 f o r system SB 213 s s 7 -1 The B u b b l e - p o i n t check f u n c t i o n f o r system VA at P = 1.0 Atm 259 7-2 The Dew-point check f u n c t i o n f o r system VA at P = 1.0 Atm 260 7-3 Percent Abso lu te d e v i a t i o n of approximate K va lues [Eq. ( 7 - 1 9 ) ] from exact va lues as f u n c t i o n s of Temp, f o r system VD, u s i n g 370K as base t e m p e r a t u r e . . 267 7-4 t r versus r f o r po lynomia ls of d i f f e r e n t degrees 272 7-5 I t e r a t i o n - u n i t s - v e r s u s - t p r o f i l e r e s u l t i n g from the golden s e c t i o n o p t i m i z a t i o n scheme 275 7 -6 V a r i a t i o n of T. . - T , w i t h system pressure | i n i t s o l | 3 v f o r system VC 280 7-7 V a r i a t i o n of T. . - T n \ w i t h system pressure I i n i t s o i l f o r system VA 281 - x v i i -Figure Page 7- 8 V a r i a t i o n of J T I N I T - T G O L | with system pressure for system VP 282 8- 1 An adiabatic f l a s h drum 296 8-2 V a r i a t i o n of Enthalpies with temperature at constant composition 306 8- 3 V a r i a t i o n of system average K with temperature at constant composition 307 9- 1 D i s t i l l a t i o n column configuration 343 9-2 Model assumed for feed-plate behaviour 344 9-3 Normalized r e l a t i v e v o l a t i l i t y versus tempera-ture for system DA 352 9-4 P r o f i l e s of check function represented by Equation ( 9 - 4 1 ) at f i r s t i t e r a t i o n 367 9-5 V a r i a t i o n of 8 with i t e r a t i o n for Convergence Schemes 1 and 2 368 D-l Comparison of errors i n f°/f° for three systems J-i s included i n a - c o r r e l a t i o n f i t 436 D-2 Comparison of errors i n f°/f° for three systems lj s not included i n a - c o r r e l a t i o n f i t 437 - x v i i i -ACKNOWLEDGEMENT Any report of this nature i s the product of the e f f o r t s of many more people than just i t s acknowledged author. This report i s no exception. I would l i k e to express my gratitude to everyone who has contributed i n some p o s i t i v e way, no matter how small, towards i t s making. I am e s p e c i a l l y indebted to Dr. D.W. Thompson, who supervised t h i s work, for his unremitted moral support, frequent h e l p f u l suggestions and general unalloyed co-operation. The contribution made by the members of my thesis committee i n the process of giving this report a f i n i s h i n g touch i s also appreciated. The s t a f f of the Department of Chemical Engineering, The Un i v e r s i t y L i b r a r y and the Computing Centre ( a l l of the Univ e r s i t y of B r i t i s h Columbia) have been e s p e c i a l l y co-operative and I am thankful to them. Special acknowledgement also goes to the Canadian Government for providing me with f i n a n c i a l sustenance (through the Canadian Commonwealth Scholarship Association), and to the Univ e r s i t y of B r i t i s h Columbia for supplementary f i n a n c i a l support. - x i x -CHAPTER ONE INTRODUCTION 1-1 Preamble The i n d u s t r i a l world has experienced a s i g n i f i c a n t r e o r i e n t a t i o n over the l a s t few decades. The two main agents of change are: (1) a realignment i n s o c i a l perspective, and (2) the advent of the computer. The f i r s t factor i s the product of the a c t i v i t i e s of consumer advocates and environmental groups, who have generated increased public awareness, which has i n turn pressured l e g i s l a t o r s into imposing inc r e a s i n g l y more stringent regulations on environmental and product-qu a l i t y c o n t r o l . The i n d u s t r i a l i s t s are thus beginning to r e a l i z e that the much-cherished 'safety-factor approach' to process design, whereby designs based on highly-crude methods are c e r t i f i e d good through the imposition of a large 'safety factor', are less than safe. If they must control t h e i r a c t i v i t i e s within the l i m i t s that ensure that neither human health, nor the natural elements with which the ef f l u e n t s from the process plants ultimately blend, are unduly i n t e r f e r e d with, then there i s the need to adopt more sophisticated design methods that guarantee very e f f e c t i v e operation and control of the various process u n i t s . This brings us to the second f a c t o r . The computer has brought with i t a gradual s h i f t i n process-design methods — from simple but approximate graphical methods to complex but far more r e l i a b l e computer methods. This trend i s s i g n i f i c a n t i n more ways than one: - 1 -(1) I t constitutes an agreeable response to the dictates of the new s o c i a l order (of environmental groups and consumer advocates). (2) I t makes for large-scale and more economically feasible designs. (3) In terms of design effort as well as process operation, the drudgery i s shifted onto the machine; by so doing, many man-hours are saved. I t w i l l not be far-fetched to conjecture that i n the not-too-distant future, we s h a l l arrive at a point where any process design that i s less than optimal w i l l be regarded with displeasure. Positive i n d i -cators i n this direction are provided by: (1) The tremendous amount of effort that has been devoted, over the past twenty years, to the development of improved mathematical models for the prediction of the properties of substances. (2) The sustained interest i n the development of computational algorithms for handling the design and operation of different types of process units. (3) The recent and increasing devotion to the study of techniques for the synthesis of optimal chemical processes (see, for example, Thompson and King, 1972; Hendry and Hughes, 1972; Fernando et a l . , 1975; Westerberg and Stephanopoulos, 1975; Nishida and Powers, 1978; Ostrovskii and Shevchenko, 1979). A chemical process plant i s a c o l l e c t i o n of reactors, separation units and a n c i l l a r y equipment (for mass, momentum and energy transport), judiciously combined to effect, at reasonable cost, the elevation of the utility-', of some material by converting i t from i t s 'raw' state to a desirable 'finished' product. Any serious attempt at the design or - 3 -analysis of any of the often-multitudinous process units that constitute the process plant involves the solution of a large number of highly nonlinear mathematical relationships. Because of their multivariate and nonlinear characteristics, their solution is necessarily of an iterative nature. This calls for an efficient solution path or algorithm. To be considered efficient, one would expect a computer-oriented algorithm to satisfy the following c r i t e r i a : (1) It should be reliable — converging to the right solution. (2) It should be stable — preferably yielding smooth non-oscillatory convergence. (3) It should be applicable to a reasonably large number of chemical systems. (4) It should be easily programmable. (5) It should be able to locate the solution in a reasonable period of time. The third condition arises from the fact that while the overall configuration of a plant depends on the particular chemical system being processed, the building blocks — process units — are not unique to the plant, with the result that algorithms are developed not with any parti-cular chemical system in mind, but on the basis of the momentum-, mass-and heat-transfer principles underlying the operation of the process unit. The fourth condition is s t r i c t l y for user convenience and need not be a constraining determinant, since an algorithm that shows superiority over a l l competing algorithms except in complexity can easily be converted by a programming expert into a readily-accessible computer package. -4-An algorithm w i l l , of course, have to s a t i s f y the f i r s t c r i t e r i o n for a given system for i t to be applicable at a l l . An algorithm's standing i n respect of the f i r s t and the f i f t h c r i t e r i a i s dependent on the degree to which i t meets the second condition. For any system, given that an algorithm s a t i s f i e s the f i r s t condition, then the only l o g i c a l quantitative measure of i t s e f f i c i e n c y i s the computation time. On a computer time-scale, a central-processing-unit (CPU) time difference of a decisecond, nay a centisecond, on a high-speed d i g i t a l computer could be quite s i g n i f i c a n t i n the comparison of algorithms for handling small-scale process-operation problems. This s i g n i f i c a n c e be-comes apparent when one considers that: (1) Any plant design involves a very large number of such compu-tations — more so i f the ultimate goal i s to achieve optimal design. (2) The f i n a n c i a l l y - c o n s t r a i n e d designer who i s not blessed with a high-speed computing unit could incur on his modest computer a time m u l t i p l i c a t i v e - f a c t o r of the order of one m i l l i o n . The l i t e r a t u r e i s replete with algorithms for performing any given process-design c a l c u l a t i o n . This m u l t i p l i c i t y of algorithms makes i t necessary that any new algorithms, before they are 'marketed', be subjected to a comparative test. The absence of any r e l i a b l e compara-t i v e studies constitutes a problem to: (1) The algorithm user, who would have to painstakingly go through mountains of published work i n order to select an algorithm — more often than not, ending up with the wrong choice. (2) The industry, which i s robbed of v i t a l man-hours due to the consequent u n d e r u t i l i z a t i o n of i t s employees. - 5 -The l i t e r a t u r e reveals that most of the comparative studies that have been undertaken on computational algorithms have been founded on those same assumptions of i d e a l i t y or semi-ideality that render the graphical methods unsuitable for high-quality design work. The conclus-ions that derive from such studies cannot but be viewed with skepticism because the r e l a t i v e performance of the algorithms could be quite d i f f e r e n t when they are applied to r e a l systems. 1 - 1 - 1 Purpose and Scope of Study This study has been directed towards the formulation and the com-parative study of computational algorithms that are applicable to a number of process operations, the p r i n c i p a l objectives being: (1) To furnish the designers and analysts of process units with algorithms that, i n addition to being r e l i a b l e , stable, v e r s a t i l e and easily-programmable, are also s u f f i c i e n t l y fast as to save on computer costs. (2) To eliminate much of the confusion or misguidance that plagues the decision on the choice of algorithm for performing s p e c i f i c operations. The study covers the following areas: (1) A thorough i n v e s t i g a t i o n of the isothermal vapour-liquid f l a s h problem, with new methods developed based on the theory of geometric programming, and with new techniques introduced for acce l e r a t i n g multivariate successive-substitution i t e r a t i o n s . (2) An exploration of the u t i l i t y of the s e n s i t i v i t y - a n a l y s i s method of geometric programming i n so far as i t applies to the isothermal vapour-liquid f l a s h problem. - 6 -(3) A study of isothermal liquid-liquid and liquid-solid e q u i l i -bria, drawing on the experience gained from the vapour-liquid case. (4) An extension of the methods studied for two-phase equilibria to vapour-liquid-liquid-solid equilibria, with the algorithms formulated to be able to also handle any two- and three-phase system, so long as i t contains at least one liquid phase. (5) A quite thorough investigation of the adiabatic vapour-liquid flash problem, with the introduction of a number of time-saving techniques. (6) A comparative study of different methods — some of them newly introduced in this study — of handling bubble- and dew-point calculations. (7) An investigation of computational methods for handling the conventional distillation-column operation problem, with applications to the specific case of one with a partial condenser and with d i s t i l l a t e rate and reflux ratio specified. For each of the investigations itemized above, the following ex-perimental path was adopted: (a) New methods are developed and implemented. (b) The best of the existing methods is implemented as docu-mented in the literature. Where no comparative studies exist or where the outcomes of such studies are considered inconclusive, the most promising or the most widely-applied methods are implemented. (c) The methods of Step b are studied c r i t i c a l l y and, where possible, modifications aimed at improving them are made. The modified versions are then implemented. - 7 -(d) The methods of Steps a through c are a p p l i e d to a number of systems w i t h a view to determin ing the best s o l u t i o n method. 1 - 1 - 2 A Word on the R e s u l t s The CPU time consumed i n the execut ion of an a l g o r i t h m (wi th the t ime f o r data input excluded) was chosen as the measure of i t s e f f i -c i e n c y , g iven that i t i s r e l i a b l e , s t a b l e and v e r s a t i l e . (The computer employed i s AMDAHL-47,0.) U n f o r t u n a t e l y , i t was observed, at a l a t e stage i n the s tudy , that the PL/1 (F - v e r s i o n 5 .5 ) c o m p i l e r , which was used i n t h i s s t u d y , conta ined a bug w h i c h , where i t o c c u r r e d , had a way of approx imate ly doub l ing the execut ion t i m e . Every e f f o r t was made, i n c o l l a b o r a t i o n w i t h the s t a f f of the u n i v e r s i t y computing c e n t r e , to e l i m i n a t e the problem - w i thout s u c c e s s . However, i t was d i s c o v e r e d that the bug, where i t o c c u r r e d , d i d not always a f f e c t a l l three opt ions of the compi ler that are a v a i l a b l e . I t was a l s o found tha t where i t d i d a f f e c t a l l three o p t i o n s , i t was p o s s i b l e i n a good number of cases to e l i m i n a t e i t from at l e a s t one of them by r e s t r u c t u r i n g the program. The approach adopted i n every one of the comparisons thus i n v o l v e d : (a) Compi l ing each program u s i n g a l l three a v a i l a b l e compi le r o p t i o n s . (b) A p p l y i n g a l l three c o m p i l a t i o n s to one system and p r i n t i n g the execut ion times as w e l l as the number of i t e r a t i o n s r e q u i r e d . (c) De te rmin ing , through a comparison of the execut ion times as w e l l as the i t e r a t i o n s f o r a l l a lgo r i thms of the same c l a s s and by a rough a n a l y s i s of the computation e f f o r t per i t e r a t i o n r e q u i r e d by each of them, whether the bug has i n t e r f e r e d or n o t . - 8 -(d) Restructuring those programs for which the bug has affected a l l three compilation options u n t i l i t i s eliminated from at l e a s t one option. (e) Choosing, for any algorithm, the compiler option that gives the minimum execution time and using that i n every a p p l i c a t i o n of the algorithm. This approach was found to work quite well for the f a i r l y small programs (less than 200 programming l i n e s for the i t e r a t i o n routine) and, for these, the comparisons have been based s o l e l y on execution time. For the very large programs, the story was quite d i f f e r e n t , be-cause i t was impossible to f i n d , i n every case, a program structure that eliminated the bug. This was the case with the comparison of multiphase f l a s h algorithms, where the i t e r a t i o n routines ranged i n length from 340 to 450 l i n e s . In this case, only the i t e r a t i o n counts have been pre-sented. For the comparison on d i s t i l l a t i o n - u n i t c a l c u l a t i o n , involving i t e r a t i o n routines of intermediate length (ranging from 200 to 360 l i n e s ) , i t was not c e r t a i n i f the bug was eliminated i n every case, and the r e s u l t s have been presented i n terms of both execution time and i t e r a t i o n count. A l l the algorithms implemented i n this work have been based on rigorous methods that involve no s i m p l i f y i n g assumptions and account for a l l n o n i d e a l i t i e s , using the best methods currently known for estimating the properties of substances. The emphasis attached to the choice of property-estimation methods should not be misconstrued to mean that t h i s work has as one of Its objectives a 'goodness-of-fit' study of any of the p r e d i c t i v e c o r r e l a t i o n s . Far from i t . This 'best-of-all-known-worlds' approach was borne of the b e l i e f , expressed e a r l i e r on, that any -9-computational algorithm cannot be said to have been t r u l y tested unless i t i s subjected to the same treatment as i t would experience at the hands of the ultimate 'consumer': the designer. 1-2 Isothermal Phase Equilibria Phase-equilibrium c a l c u l a t i o n constitutes a s i g n i f i c a n t component of the work involved i n chemical process design, modelling and simula-t i o n . I t features prominently i n general material-transport con-siderations where the formation of more than one phase anywhere along the flow l i n e c a l l s for a knowledge of the r e l a t i v e d i s t r i b u t i o n of the components i n the d i f f e r e n t phases, without which knowledge a decision cannot be made as to the best mode of transportation and of material treatment. It i s even more important i n the design of separation u n i t s , where the objective could be the separation of a vapour or l i q u i d mix-ture into a l i g h t (vapour) phase and a heavy ( l i q u i d ) phase (as i n f l a s h drums and d i s t i l l a t i o n columns); or the r e d i s t r i b u t i o n of the components of a mixture between two l i q u i d phases (as i n l i q u i d - l i q u i d e x t r a c t i o n ) , or between a s o l i d phase and a l i q u i d phase (as i n f r a c t i o n a l c r y s t a l -l i z a t i o n , leaching and adsorption), or between a l i q u i d phase and a vapour phase (as i n absorbers and s t r i p p e r s ) . Nor can i t s importance be gainsaid i n complex chemical reactions where the thermodynamics of the system might be such as to lead to the formation of more than one phase. U n t i l about two decades ago, a l l phase-equilibrium computations were based on the so-called 'mass-balance' method, which involves com-bining equilibrium, mass-balance and mole-fraction-balance r e l a t i o n s h i p s - 10 -to yield check functions whose dimensions are one less than the number of existing phases, and with phase fractions as the independent vari-ables. The chemical-equilibrium equivalent of this is the mass-action law. In 1958, Dantzig and co-workers (see Zeleznik and Gordon, 1968), drawing on the enlightening work of J. W. Gibbs (see Shapley and Cutler, 1970) who had shown the relationship between the Gibbs free-energy func-tion and the mass-action laws around the turn of the century, pioneered research in the application of the free-energy-minimization method to the solution of the chemical-equilibrium problem. In view of the similarities between the physical- and the chemical-equilibrium problems, the free-energy minimization approach has also been success-fully applied to the former type of problem. Thus, the two methods — the mass-balance method and the free-energy minimization approach — form the core to a l l phase-equilibrium computational algorithms today. 1-2-1 The Mass-balance Approach Much of the effort that has been put into studying the applica-tion of the mass-balance method to solving the phase-equilibrium problem has been devoted to two-phase vapour-liquid equilibrium. For this type of problem, the standard form of the check function (for derivation, see Section 3-2-1) assumes the form: N N 1+(K -1)6 i v } " 1 (1-1) -11-where: i s the equilibrium r a t i o for component i , N i s the number of components i n the system, x-£ denotes the l i q u i d mole f r a c t i o n of i , z i i s the system mole f r a c t i o n of i , and 6 V i s the vapour f r a c t i o n on a molar basis. Rachford and Rice (1952) have proposed another type of check function which i s reported to be more l i n e a r and thus to converge f a s t e r than the standard form. I t i s of the form: N ( V l ) Z l F ( 6 v ) = K y ^ ) = l{ } (1-2) i-1 i = l 1 V where y^ i s the mole-fraction of component i i n the vapour phase. While the or i g i n a t o r s of the above check function employed a dichotomous search method i n solving for 0 V, other applicants of the method since i t s introduction have found i t more suitable to apply either the Newton method or the third-order Richmond method (for a treatment of the two methods, see Lapidus, 1962). Sanderson and Chien (1973) have developed an algorithm, f o r simultaneous chemical- and phase-equilibrium problems, that e n t a i l s performing a f l a s h c a l c u l a t i o n with F(0 V) as defined i n Equation (1-2). A polynomial expansion of Equation (1-2) has also been studied by Rosenberg (1963, 1977). I t has turned out, however, not to be competitive. - 12 -A multivariate Newton-Raphson formulation of the mass-balance method (Nagata and Gotoh, 1975) has also been applied to different classes of problems by various workers, including Edwards et al (1978), and Hirose et al (1978). Here the equilibrium, material-balance and mole-fraction-balance equations are individually expressed in the form of check functions, each equation contributing one dimension to the Newton-Raphson Jacobian matrix. The two main limitations of this form-ulation are: (a) The high dimensionality of the working matrix, whose inverse has to be determined. (b) The problem of a reasonable ini t i a l guess for the independent-variable vector, without which convergence might not be achieved. Quite recently, King (1980) reported on a new formulation by Barnes and Flores which its authors claim is superior to that of Rachford and Rice. It is of the form: F(6 y) = in[I y ±] - *n[! x±] - ln[\ ' f t ] - ln[\ '* ] (1-3) i=l i=l i=l i v i=l i v In a comparative study undertaken by Rohl and Sudall (1967), the authors dismissed the standard formulation as not being capable of con-verging, and concluded that the best result is produced by the Rachford--Rice formulation accelerated by either the second-order Newton method or the third-order Richmond method. Their conclusion regarding the standard formulation is, however, not right for, as Holland (1975) rightly asserts, this formulation converges to the desired solution i f the vapour fraction is initialized to 1. The conclusiveness of the study by Rohl and Sudall is further undermined by the fact that It - 1 3 -preceded and therefore excludes the method of Barnes and Flores. R e l a t i v e l y l i t t l e work has been done i n the area of computer a p p l i c a t i o n to l i q u i d - l i q u i d equilibrium c a l c u l a t i o n . The most exten-sive and comprehensive seems to be that recently published by Prausnitz and co-workers (1980). In the algorithm published by these workers, the check function takes the f orm of Equation (1—2) with the vapour phase replaced by a second l i q u i d phase and the phase parameters appropriately redefined. For any given set of K values, the equation i s solved for (the phase f r a c t i o n for the second l i q u i d phase) by the Newton method. A f t e r the f i r s t three i t e r a t i o n s , a Wegstein acceleration (Wegstein, 1958) i s applied on alternate i t e r a t i o n s i f some imposed con-d i t i o n s are s a t i s f i e d (see Section 5-2-2 for d e t a i l s ) . Henley and Rosen (1969) proposed a method for handling three-phase v a p o u r - l i q u i d - l i q u i d e q u i l i b r i a , u t i l i z i n g the check functions: v v v = J ! v v v - * i i < v L > ] and V 6 v , e L ) = n x2i< 6v> V " X l i < V ^ i = l N I i=l where: e v = V / F , e L = L i / ( L i + L 2 ) , F i s the t o t a l molar-content of the system, V and L denote the t o t a l vapour and l i q u i d moles respectively, and subscripts '1' and '2' on x and L denote f i r s t and second l i q u i d phases respectively. - 14 -The authors recommend a two -d imens iona l Newton-Raphson a c c e l e r a t i o n method i n s o l v i n g f o r 6 V and 6L- The method, or a m o d i f i c a t i o n of i t , has been implemented and a p p l i e d by a number of i n v e s t i g a t o r s ( see , f o r example, Deam and Maddox, 1969; E r b a r , 1973; M a u r i , 1980) . Lu and co -workers (1974) have a l s o a p p l i e d a m o d i f i e d R e g u l a -f a l s i i t e r a t i o n to the v a p o u r - l i q u i d - l i q u i d problem. Accord ing to the a u t h o r s , the method, which does not i n v o l v e d e r i v a t i v e s , converges where the Newton-Raphson method f a i l s t o . However, where the l a t t e r does c o n -ve rge , i t i s f a s t e r . One genera l shortcoming of the v a r i o u s works pub l i shed on the mass -balance approach to p h a s e - e q u i l i b r i u m c a l c u l a t i o n s i s the l e s s -than-adequate emphasis at tached to the q u e s t i o n of the i n i t i a l i z a t i o n of v a r i a b l e s . The f a i l u r e to f u l l y a p p r e c i a t e the e f f e c t that a good i n i t i a l i z a t i o n scheme has on the s t a b i l i t y and speed of convergence of an a l g o r i t h m cou ld lead to the adopt ion of a lgo r i thms which are i n f a c t not the b e s t . The v a p o u r - l i q u i d e q u i l i b r i u m problem i s a case i n p o i n t . The a lgo r i thms f o r s o l v i n g t h i s problem are g e n e r a l l y designed to embody an inner i t e r a t i o n loop to c o r r e c t f o r the dependence of the e q u i l i b r i u m r a t i o s on phase c o m p o s i t i o n s . Non idea l systems r e p o r t e d l y f a i l to converge wi thout t h i s c o r r e c t i o n . But t h i s inner i t e r a t i o n i s a great t ime-consumer and i t s e l i m i n a t i o n through a good and r e l i a b l e i n i t i a l i z a t i o n scheme could r e s u l t i n a tremendous sav ing i n computat ion t ime w i thout j e o p a r d i s i n g the o v e r a l l s t a b i l i t y of the method. 1 - 2 - 2 The F r e e - e n e r g y - m i n i m i z a t i o n Approach The f r e e - e n e r g y - m i n i m i z a t i o n approach i s , as the name i m p l i e s , an o p t i m i z a t i o n method i n v o l v i n g the m i n i m i z a t i o n of Gibbs f ree energy, G, -15-defined by M % G = I I » l p [ ^ p « T t e ( ^ ) ] (1-5) p=l 1=1 f where i s the moles of component i i n phase p for a system con-t a i n i n g M phases, Np i s the number of components i n phase p, f and u denote fugacity and chemical p o t e n t i a l respectively, T and R denote temperature and the Universal gas constant res-pec t i v e l y , and superscript 'o' denotes standard state. Equation (1-5) i s optimized subject to mass-balance constraints and p o s i t i v i t y r e s t r i c t i o n s on the component molar quantities, which, for an isothermal i s o b a r i c sytem, constitute the Independent v a r i a b l e s . The d i f f e r e n t algorithms that have been developed based on the free-energy-minimization p r i n c i p l e have as t h e i r objective the s o l u t i o n of the chemical equilibrium problem and have been applied to physical e q u i l i b r i a merely by virtu e of the l a t t e r class of problems being a s p e c i a l case of the former. One of the i n i t i a l e f f o r t s i n this area of research was that of White and co-workers (1958), who defined an unconstrained objective function i n form of a Lagrangian based on a quadratic approximation of Taylor's expansion of Gibbs free energy. They employed two optimization techniques: a steepest-descent search method and a linear-programming technique. While t h e i r algorithms were l i m i t e d to a single (vapour) phase and hence inapplicable to the phase-equilibrium problem, th e i r method has since been extended to cover more phases by other workers - 16 -(see Gautam and Seider, 1979), the final form being the RAND algorithm as presented by Dluzniewski and Adler (1972). Two other algorithms, similar to those of White and co-workers in that they employ the Lagrangian of a truncated Taylor's expansion of G, have been proposed by Clasen (1965) and by Eriksson and Rosen (1973). These algorithms are applicable to multiphase systems. While the two algorithms were originally restricted to ideal systems, in a later paper Eriksson (1975) described a computer program which, while retaining the linear-programming formulation previously presented by Eriksson and Rosen (1973), allows for the consideration of nonidealities by making room for the possible inclusion of a subprogram that updates the 'constants' in the linear equations. Two other algorithms similar to that of White and co-workers, applicable to multiphase systems and allowing for nonidealities, are the 'NASA' algorithm of Gordon and McBride, and the 'quadratic-programming' algorithm of Wolfe (see Gautam and Seider, 1979). Yet another algorithm, presented by Ma and Shipman (1972), uses a modified Naphthali method — a form of the method of steepest descent — to obtain an approximate solution, which is then refined through a Newton-Raphson iteration method. Two shortcomings that undermine the robustness of a l l the free-energy-minimization methods cited above are: (a) Their high dimensionality, which is reinforced by the intro-duction of Lagrange multipliers. (b) Their requirement of information on chemical potentials for every component for a l l phases in which it is present. - 17 -George and co-workers (1976) have proposed another algorithm which is not undermined by the problem of high dimensionality. They formulate the problem in unconstrained form by employing allocation functions, then minimize the resulting objective function by the Powell optimization technique. The algorithm involves an open-ended search (from - 0 0 to +») for the optimal values of the unconstrained variables, and therein lies its weakness. Gautam and Seider (1979) have undertaken a comparative study of the major free-energy-minimization algorithms, and their conclusion was in favour of the RAND algorithm. 1-2-3 The Geometric-programming Method Geometric programming is a relatively new technique which, since its conception in 1961 and its subsequent development by Duffin and co-workers (1967), has enjoyed a wide application in different facets of engineering design (see, for example, Beightler and Phillips, 1976; Gupta and Radhakrishnan, 1978). A brief presentation of that aspect of the basic concept that is relevant to this work is contained in Appendix C-l. Duffin and co-workers presented a simple example on how the geo-metric-programming method could be applied to chemical equilibrium problems through a transformation of the Gibbs free-energy function (see Appendix C of Duffin et al, 1967). Although the mathematical presenta-tion implies applicability to a system containing more than one phase, it was founded on the ideal gas law, which automatically limits it to one phase: an ideal gas phase. Passy and Wilde (1968) have also developed a geometric-programming algorithm for solving chemical-equilibrium problems. - 18 -Their approach involves transforming exp (-G/RT), which i s the dual objective function for the problem, into i t s corresponding primal with an i n e q u a l i t y constraint (for a single phase), and seeking the desired sol u t i o n by applying a d i r e c t search to determine the saddle point of the Lagrangian function. Here again, there i s the r e s t r i c t i o n to a single, i d e a l phase. More recent e f f o r t s have been aimed at eliminating the i d e a l i t y r e s t r i c t i o n i n the a p p l i c a t i o n of the geometric-programming method to chemical e q u i l i b r i a (see, for example, Lidor and Wilde, 1978). However, no attempt has hitherto been made to formulate the phase-equilibrium problem u t i l i z i n g the geometric-programming theory. In concluding this section, i t should be stated emphatically that geometric programming merely serves as a technique for transforming a problem from one form to another form which might lend i t s e l f more re a d i l y to solution; i t does not provide any mathematical tools for s o l -ving the r e s u l t i n g problem. 1-3 Sensitivity Analysis i n Phase Equilibria Another area i n which geometric programming has enjoyed some patronage i n the realm of chemical e q u i l i b r i a i s i n the determination of the changes i n phase d i s t r i b u t i o n that r e s u l t from changes i n the i n t e n -sive state variables (temperature and pressure). The relevant basic theory, as proposed by D u f f i n and co-workers (1967), i s presented i n Appendix C-2. The technique presupposes that a so l u t i o n i s known at some con-d i t i o n of temperature and pressure, and i t provides the mathematical tools for estimating the solution at a d i f f e r e n t condition of temp-erature and pressure not f a r removed from the o r i g i n a l state. - 19 -Dinkel and Lakshmanan (1975, 1977) have been fervent explorers in the application of the perturbation technique to the chemical equili-brium problem. However, their applications were restricted to ideal-gas systems, and the results were not very impressive where fairly large temperature changes were involved. The development of a phase-equilibrium equivalent of the sensiti-vity-analysis method has been undertaken in this work. No ideality as-sumptions are involved in the development. Various steps have been taken to improve the results that are obtained from applying the per-turbation technique to different vapour-liquid systems. 1-4 Bubble- and Dew-point Calculations In process-plant operation and design, the chemical engineer quite frequently encounters the problem of determining the temperature at which a given liquid or vapour mixture experiences incipient vapori-zation (bubble point) or condensation (dew point) respectively. This problem could arise in the process of determining what temp-erature a given mixture must be made to assume in order to avoid the formation of a second phase, with the attendant complications that go with the handling — especially in a flow line — of two-phase mixtures. Or it could rear its head when the chemical engineer is confronted with the problem of designing some separation unit (see, for example, Lyster et al, 1959a; Holland, 1963; Petryschuk and Johnson, 1965). Experience shows that these saturation-point calculations, being iterative, can be quite time-consuming. When, for example, they are in-corporated into an algorithm for the design of a distillation column, they could claim as much as half of the total execution time. -20-In view of the above observation, a s i g n i f i c a n t amount of e f f o r t was devoted to in v e s t i g a t i n g the problem with a view to determining the most t i m e - e f f i c i e n t solution method. For nonideal systems, a saturation-point-temperature c a l c u l a t i o n normally involves two lev e l s of i t e r a t i o n : an inner i t e r a t i o n loop that corrects for the dependence of the equilibrium r a t i o s on composition; and an outer loop that updates the temperature. The d i f f e r e n t methods for solving the problems d i f f e r only i n the approach used to update the temperature. Je l i n e k and Hlavacek (1971) compared three methods of temperature update — the second-order Newton method, the third-order Richmond method, and the Chebyshev method — and reached the conclusion that the Richmond method was the f a s t e s t . In t h e i r i n v e s t i g a t i o n , they assumed the fu n c t i o n a l form of the equilibrium r a t i o , K^, to be A i A r i K i = T^Tc + B i ( 1 " 6 ) 1 where A-^ , and are constants for any component i . The above r e l a t i o n s h i p presupposes that the system i s i d e a l , since i t does not account for the dependence of K-£ on composition. I t i s , i n f a c t , nothing more than the combination of Raoult's law and an Antoine vapour-pressure equation. More recent studies by Sobolev et a l . (1975) and by Ketchum (1978) are also g u i l t y of the i m p l i c i t assumption of i d e a l i t y . For a general solution method unconstrained by any assumptions as to the degree of a f f i n i t y that p r e v a i l s amongst the system's constituent components, the complexity of the problem assumes a much higher dimen-sion. The methods studied i n this work are based on this rigorous approach. - 21 -1-5 Adlabatlc Vapour-Liquid Equilibria The a d i a b a t i c v a p o u r - l i q u i d f l a s h problem i n v o l v e s the d e t e r -m i n a t i o n of the temperature and the p h a s e - d i s t r i b u t i o n that w i l l r e s u l t i f a mix ture w i t h a f i x e d heat content i s t h r o t t l e d i n t o a p e r f e c t l y -i n s u l a t e d f l a s h drum. Th is problem i s of a h igher degree of d i f f i c u l t y than the i s o t h e r m a l v a p o u r - l i q u i d e q u i l i b r i u m case , because i t has temp-e r a t u r e as an a d d i t i o n a l unknown. The a d d i t i o n a l equat ion that has to be so lved i s the enthalpy r e l a t i o n s h i p . Two methods that are c o n v e n t i o n a l l y employed i n s o l v i n g the a d i a b a t i c - f l a s h problem both i n v o l v e i t s f o r m u l a t i o n i n t o a problem w i t h two independent v a r i a b l e s : vapour f r a c t i o n and temperature . One of the methods ( H o l l a n d , 1975) u t i l i z e s a r e g u l a f a l s i c o n -vergence of the temperature . I t i n v o l v e s two l e v e l s of i t e r a t i o n . At the lower i t e r a t i o n l e v e l , an i s o t h e r m a l f l a s h c a l c u l a t i o n i s performed at the cu r ren t va lue of temperature to determine the cor responding vapour f r a c t i o n . At the outer i t e r a t i o n l e v e l , the va lues of tempera-tu re at the l a s t two i t e r a t i o n p o i n t s and the cor responding enthalpy check f u n c t i o n s are employed i n a r e g u l a f a l s i i n t e r p o l a t i o n to d e t e r -mine an improved va lue of temperature . The second method ( H o l l a n d , 1963) employs a two -d imens iona l Newton-Raphson approach to s imu l taneous l y d r i v e the v a r i a b l e s to the s o l u t i o n p o i n t . A recent p r o p o s i t i o n by Barnes and F l o r e s ( K i n g , 1980) employs the R a c h f o r d - R i c e f o r m u l a t i o n (Equat ion 1-2) f o r the mass-balance check f u n c t i o n and adopts a d i f f e r e n t f o r m u l a t i o n of the entha lpy check f u n c t i o n from the c o n v e n t i o n a l form due to H o l l a n d . The fo rego ing methods of t a c k l i n g the a d i a b a t i c - f l a s h problem i n v o l v e b u b b l e - and dew-point c a l c u l a t i o n f o r the purpose of temperature -22-i n i t i a l i z a t i o n . These are necessarily time-consuming steps. Even with this i n i t i a l i z a t i o n scheme, the convergence of the Newton-Raphson method i s not assured and three rules proposed by Holland (1963) s t i l l have to be employed to avoid e r r a t i c behaviour and possible divergence of the temperature search. In this work, other methods have been studied i n addition to the two cited above. Some of the methods derive d i r e c t l y from the algo-rithms for d i s t i l l a t i o n - u n i t calculation, which d i f f e r s from the adiabatic-flash calculation not i n i t s basic nature and logic but only i n i t s degree of complexity. 1-6 Multicomponent, Multistage D i s t i l l a t i o n with Equilibrium Stages The decision to devote some e f f o r t , i n this study, to the investigation of D i s t i l l a t i o n - u n i t computations — as opposed to other separation units — was guided by the fact that i t i s the most commonly used separation method, for reasons which have been discussed by King (1980). Computation methods for multicomponent, multistage separations generally f a l l into two classes: short-cut methods and rigorous methods. The various methods have been given ample treatment i n most texts on separation processes (see, for example, van Winkle, 1967; Smith, 1963; Holland, 1963 and 1975; King, 1980; Henley and Seader, 1981). A review of the methods i s not intended here. A discussion of any of the methods w i l l be undertaken only i n so far as i t relates to this study. This investigation pertains to the class of rigorous methods, and i t approaches the problem from an operating, rather than a design, - 23 -point of view — this being the problem-type for which most of the existing rigorous algorithms are formulated. The study is further limited to the case of a conventional, as distinct from a complex, column. The 6-converged Bubble-point (BP) method of Lyster and co-workers (1959a) was implemented, this in view of its proven superiority over other methods when applied to narrow-boiling mixtures (see, for example, Seppala and Luus, 1972). The modification proposed by Seppala and Luus (1972) was also implemented. The BP method involves the determination of stage temperatures through a bubble-point calculation on each tray at every iteration. This step constitutes a significant time-sink. In this study, a number of modifications of the BP method, aimed at reducing the computation time, have been introduced. The K^, method (Holland, 1963), which was deviced to avoid bubble-point calculation, was also implemented. An appreciable amount of effort has also been devoted to studying possible ways of applying a sum-rate (SR) type of approach, whereby the temperature profile is updated by means of the enthalpy balances, to distillation. The approach is known not to be applicable to narrow-boiling systems, for reasons given by Friday and Smith (1964). The study on the subject was meant to provide a complement to the BP algorithms. Because the BP and SR methods apply to opposite regions of the boiling-range axis, with an intermediate region where both of them could f a i l , the 2N Newton-Raphson method of Tomich (1970) has also been imple-mented. This method is applicable to narrow- as well as wide-boiling systems. It is a compromise between the methods of partitioning - 24 -(such as the BP methods) and a f u l l Newton-Raphson simultaneous-convergence (SC) method (Newman, 1968; Goldstein and S t a n f i e l d , 1970; Naphtali and Sandholm, 1971). Unless the system i s extremely non-i d e a l , i t i s known to require less computer-time than the more-highly-dimensioned SC algorithms. The i n v e s t i g a t i o n was extended to include a study of how wide-b o i l i n g systems could possibly be handled without getting involved i n Jacobian matrices and matrix inversions. The Tomich method was used as a reference for assessing the performance of the r e s u l t i n g algorithms. 1-7 Estimation of Physical Properties The thermodynamic r e l a t i o n s involved i n t h i s work contain various p h y s i c a l properties whose values are required as functions of tempera-ture, pressure and ( i n some cases) phase composition. Empirical values of these parameters hardly ever e x i s t , and the conventional approach i s to resort to estimation methods. The problem then becomes that of making a judicious choice from amongst the often very large number of estimation c o r r e l a t i o n s that are to be found i n the l i t e r a t u r e . In this i n v e s t i g a t i o n , the choice of estimation methods was guided by three main fac t o r s : (1) The q u a l i t y of the estimate. (2) The r e l a t i v e s i m p l i c i t y of the estimation method. (3) The ease of determination of the parameters involved i n the c o r r e l a t i o n . For any given property, the c o r r e l a t i o n r e l a t i o n s h i p ultimately chosen was that which has been well tested over the years and, going by the - 25 -three factors above, is known to show an advantage over other methods. An example on this selection procedure should suffice. Let us consider the problem of estimating the liquid-phase acti-vity coefficient. A current-state-of-the-art study reveals that the efforts of molecular thermodynamicists to predict this quantity through equations of state — such equations as the Redlich-Kwong and the rather cumbersome Benedict-Webb-Rubin have been subjected to such experiment-ation — have yielded very l i t t l e reward. Thus, given the present level of understanding of fluid-phase molecular behaviour, the best that can be done is employ semi-empirical correlations that relate the activity coefficients to temperature and liquid-phase composition through a number of interaction parameters determined from equilibrium data. A further review shows that the predictive correlations can be classified into three groups (Tripathi and Sri Krishna, 1976): (a) The Wohl-type equations, which include Margules, van Laar and Scatchard-Hamer equations. (b) The Redlich-Kister equation. (c) Expressions based on the concept of local composition. The last group includes the Wilson equation (Wilson, 1964) and its various modifications (for example: Nagata and Gotoh, 1975; Nagata et al., 1975a and 1975b; Tsuboka and Katayama, 1975), the Non-Random-Two-Liquid (NRTL) equation (Renon and Prausnitz, 1968) and its modifications (Marina and Tassios, 1973; Novak, 1974b), and the universal quasi-chemical (UNIQUAC) equation (Abrams and Prausnitz, 1975; Anderson and Prausnitz, 1978). Further investigation reveals that for systems that exhibit no phase splitting and no maxima in their activity coefficients, the - 26 -original Wilson equation is generally regarded as the best. It has therefore been employed for that purpose in this work. Where phase splitting is involved, the NRTL equation has usually been resorted to. However, experience has shown (Heidemann and Mandhane, 1973; Novak, 1974a) that i t has the defect of sometimes predicting multiple solutions. In view of this, it has waned in popularity to the advantage of the UNIQUAC equation. Both the NRTL and the UNIQUAC equations have been implemented in this work. 1-8 The S t r u c t u r e o f t h i s Work While this work has been organized in such a way as to reflect a logical sequence of development, the various chapters have been so structured that they can be perused almost exclusively without much loss in comprehension. Chapter 2 presents the various correlations utilized in this work for predicting physical properties. Chapter 3 deals with the isothermal vapour-liquid flash problem. It is partitioned into four main parts, with the first three parts res-pectively discussing double-loop univariate methods, free-energy-minimi-zation methods and single-loop univariate methods. The concluding part compares the best of the different classes of methods in addition to testing the effect of altering the frequency of equilibrium-ratio calcu-lation. In Chapter 4, the effort made at applying the perturbation theory of geometric programming to vapour-liquid equilibria is documented. The investigation is taken a step further in Chapter 5 through the applicat-ion of the most promising of the algorithms studied so far to -27-isothermal l i q u i d - l i q u i d and l i q u i d - s o l i d e q u i l i b r i a . The l i q u i d - l i q u i d f l a s h algorithm recently proposed by Prausnitz et a l (1980) i s also implemented. The chapter i s i n two main parts, each part dealing with one of the two problem-types. Chapter 6 takes us to the problem of multiphase e q u i l i b r i a . The work i n t h i s chapter draws on the experience furnished by the three preceding chapters. A number of algorithms for a generalized vapour-l i q u i d - l i q u i d - s o l i d system are developed as l o g i c a l extensions of those i n Chapters 3 and 5. The i n i t i a l i z a t i o n schemes tested are s i m i l a r l y patterned. In Chapter 7, the problems of bubble- and dew-point c a l c u l a t i o n s are investigated. This i s i n a n t i c i p a t i o n of t h e i r a p p l i c a t i o n to the study of adiabatic vapour-liquid f l a s h and d i s t i l l a t i o n - u n i t c a l c u l a t i o n s i n succeeding chapters. Chapter 8 brings us to the question of adiabatic vapour-liquid e q u i l i b r i a . In i t s wake (Chapter 9) i s i t s watchful 'Big Brother': multistage d i s t i l l a t i o n . Chapter 10 serves as the concluding chapter. The appendices open with general notes on the programming l o g i c employed i n t h i s work. This i s the subject matter of Appendix A. This i s followed (Appendix B) by short notes on s p e c i f i c programs. The remaining appendices contain a few theories and mathematical derivations that have been duly referenced i n the main body of the report. The very large number of symbols employed i n this work necessita-ted the adoption of a sp e c i a l d e f i n i t i o n format aimed at preventing ambiguity. In Chapter 2, symbols are defined immediately following the - 28 -equations in which they occur. This was considered suitable for handling correlations due to different authors, who may have used some common symbols with different meanings, without having to alter the symbols originally used by the authors. For the other chapters, the symbol definitions are presented in the form of a Nomenclature at the beginning of each chapter. This way, the same symbol could be given different identities in different chapters and a shortage of symbols does not then arise. The symbols are not redefined within the chapter, as this would make the report rather untidy. CHAPTER TWO THE DETERMINATION OF THERMODYNAMIC PARAMETERS 2-1 Introduction T h i s chapter c o n t a i n s , under separate s u b s e c t i o n s , the c o r r e l a t i o n s employed i n t h i s work f o r e s t i m a t i n g the f o l l o w i n g p h y s i c a l p r o p e r t i e s : s a t u r a t i o n p r e s s u r e , l i q u i d - p h a s e re fe rence f u g a c i t y , vapour molar volume and c o m p r e s s i b i l i t y r a t i o , l i q u i d molar volume, vapour -phase f u g a c i t y c o e f f i c i e n t , l i q u i d - p h a s e a c t i v i t y c o e f f i c i e n t , vapour molar en tha lpy , l i q u i d molar e n t h a l p y , and s o l i d re fe rence f u g a c i t y . 2-2 Saturation Pressure Where r e l e v a n t data e x i s t , the pure-component s a t u r a t i o n p r e s s u r e s are determined from a s i x - p a r a m e t e r equat ion of the form ( P r a u s n i t z et a l , 1967) : C 2 2 Un P S = C L + + C AT + C 5 r + C6*nT ( 2 - 1 ) where s P = pure-component s a t u r a t i o n - p r e s s u r e , T = system temperature , and C^ ( i = 1 , 2 , . . . , 6 ) are e m p i r i c a l c o n s t a n t s . I n the absence of the necessary e m p i r i c a l c o n s t a n t s , P s i s es t imated from a c o r r e s p o n d i n g - s t a t e equat ion proposed by P i t z e r and C u r l ( P r a u s n i t z et a l , 1967) : -29-- 30 -s - 0 . 3 4 5 6 ^ 1.454 4.318 . o n o l o g l O P r = — ^ - + — 2 — + 3 ' 2 0 9 Lr x r A r + . ( £ ^ 8 1 _ 2,524 + 2^008 + Q ( 2 _ 2 T| Tf. T r where s P r = reduced s a t u r a t i o n - p r e s s u r e , T r = reduced temperature, and a) = P i t z e r ' s a c e n t r i c f a c t o r . 2-3 Liquid-Phase Reference Fugaclty For the purpose of e s t i m a t i n g l i q u i d re fe rence f u g a c i t y , each component i s c l a s s i f i e d as condensable ( T r < 1 ) , h y p o t h e t i c a l - l i q u i d ( T r not much g reate r than 1) and s u p e r c r i t i c a l ( T r much g reate r than 1 ) . Th is i s i n accordance w i t h the approach employed by P r a u s n i t z and co -workers (1967) . 2 - 3 - 1 Condensable Components For a condensable component, the r e f e r e n c e f u g a c i t y , f 0 ^ i s determined from the fundamental thermodynamic r e l a t i o n s h i p Vi x i - *±**i where Y i = a c t i v i t y c o e f f i c i e n t , ad jus ted f o r p r e s s u r e , P = system p r e s s u r e , <t>i = f u g a c i t y c o e f f i c i e n t , - 3 1 -and x i » Y i are l i q u i d and vapour mole f r a c t i o n s r e s p e c t i v e l y . I n the above e q u a t i o n , f ° L has the P o y n t i n g f a c t o r i n c o r p o r a t e d . When the equat ion i s a p p l i e d to the pure component at s a t u r a t i o n c o n d i t i o n , we have L s L V i i f± = <^i^i exp( g ^ - ) x P o y n t i n g f a c t o r where Poynt ing f a c t o r = e x P ( ~ g j - ) , L = pure-component l i q u i d molar volume, = component p a r t i a l l i q u i d molar volume, and s u p e r s c r i p t ' s ' denotes s a t u r a t e d c o n d i t i o n . Due to l a c k of d a t a , Is u s u a l l y r e p l a c e d w i t h v^1, the pure-component l i q u i d molar volume. Th is i s not unreasonable at low and moderate p ressures where v a p o u r - l i q u i d e q u i l i b r i u m i s r e l a t i v e l y i n s e n s i t i v e to With t h i s a l t e r a t i o n , we have ( P _ p s ) v L f f - * J P J exp{ ' (2 -3 ) I f T r < 0 .56 f o r the component under c o n s i d e r a t i o n , <t>| i s determined from an a p p r o p r i a t e equat ion of s t a t e (see S e c t i o n 2 - 7 ) . Otherwise , the method of Lyckman and co -workers ( P r a u s n i t z et a l , 1967) i s employed. The l a t t e r i s a c o r r e s p o n d i n g - s t a t e r e l a t i o n which g i ves <t>s by: M> S = 4 > ( 1 ) ( T r ) + o x ( , ( 2 ) ( T r ) ( 2 - 4 ) - 32 -where (1) m 0.57335015 _ 3,076574 + 5.6085595 _ r m3 m2 _ T T T r r r J ,.(2)^ \ -0.012089114 0.015172164 0.068603516 and <fr (T ) = -J2 " T l 3 b ~ T T T r r r 0.024364816 0.14936906 0.18927037 _ 0.12147436 -j9 ,^8 7 ,^6 r r r r 0.10665730 1.1662283 0.12666184 ,5 4 3 T T T r r r + 0.3166137 + 4.3538729 _ T T r r 2-3-2 H y p o t h e t i c a l L i q u i d and S u p e r c r i t i c a l Components The re fe rence f u g a c i t y of a h y p o t h e t i c a l l i q u i d component i s es t imated from the c o r r e l a t i o n of Lyckman, E c k e r t and P r a u s n i t z . Acco rd ing to the a n a l y t i c a l form of the c o r r e l a t i o n , presented by P r a u s n i t z and co-workers (1967), f ° L = P e x p l F^+cdjF^ } x P o y n t i n g f a c t o r (2-5) where <o> = -1.1970522 . L3785023 + 2 m ( m 8 M 1 T T r r - -2-7741817 , 1.5454928 and F± = + + 1.3057555 T T r r - 33 -For s u p e r c r i t i c a l components, the reference fugacity i s deter-mined from the Henry's constant, H-jj, of the s u p e r c r i t i c a l component, i , i n a reference condensable component (solvent), j , at the operating temperature. For a mixed solvent, j i s the condensable component with the highest c r i t i c a l temperature for which information on H^j i s a v a i l a b l e . From the values of H^j supplied at two temperatures and at the reference pressure, the constants H^^ and H^2^ are deter-mined from an exponential f i t of the reference-pressure Henry's cons-tant as a function of temperature, thus: R ( P r ) = H ( l ) T H ( 2 ) ( 2 _ 6 ) The reference fugacity of component i i s then given by -v" .Ps f ° L = H ^ r ) exp( * j J ) x Poynting factor (2-7) 00 v ^ j , the p a r t i a l molar volume of i at i n f i n i t e d i l u t i o n i n solvent j , i s estimated from a l i n e a r i n t e r p o l a t i o n based on values of v supplied at two temperatures. 2-4 Solid-phase Reference Fugacity os The solid-phase reference fugacity, f , i s related to that of the l i q u i d phase by (Prausnitz, 1969): ^oL , , f f. Ah. T AC . T T - T *n(~o7> = — t 1 - — ] + - ^ ( - ^ - - ^ - ] f± RT T t l R T T (2-8) - 34 -where Ah^ i s the l a t e n t heat of f u s i o n of i , T i s the t r i p l e po in t of i , and ^ p i * S t * i e d i f f e r e n c e between the l i q u i d heat c a p a c i t y and that of the s o l i d , both determined at T , t i . Due to the l a c k of i n f o r m a t i o n on the t r i p l e - p o i n t of most compounds, and i n view of the p r o x i m i t y of the t r i p l e po in t to the normal m e l t i n g p o i n t , i t i s normal p r a c t i c e to rep lace T w i t h the normal m e l t i n g p o i n t , T • Equat ion (2 -8 ) then becomes mi f ° L Ahf T AC . T . T . -T *n<4r ) - — [1 ] + - ^ [ * n ( ^ - ) - J 5 ^ _ ] ( 2 - 9 ) f 7 RT T , R T T i mi Another impediment encountered i n e v a l u a t i n g Equat ion ( 2 - 9 ) i s the q u a n t i t y AC . , f o r which i n f o r m a t i o n i s h a r d l y ever a v a i l a b l e . P i To s i d e t r a c k the problem, the second term on the r i g h t i s normal ly i g n o r e d , the j u s t i f i c a t i o n being that the f a c t o r i n bracket i s r e l a t i v e l y s m a l l . The equat ion then reduces to f ? L A h ! T *n<4r> - — [ i ] ( 2 " 1 0 ) f ° S RT T t i mi L e t us take a c l o s e r look at the ignored term. I f we expand T T £n( =—) about the po in t —~ - 1 , and s u b t r a c t (T . - T)/T, the i l mi r e s u l t i s - 35 -T -T ml T = - I - [l-T ,/T] L_ n L ml J n=z 00 n Thus, for the term on the left-hand side of Equation (2-11), and hence the ignored term i n Equation (2-9), to be n e g l i g i b l e , T ./T must be mi reasonably close to 1. In order to extend the range of a p p l i c a b i l i t y of the r e l a t i o n s h i p w i t h i n the l i m i t s of the r e s t r i c t i o n s imposed by the lack of information, an attempt was made at developing a c o r r e l a t i o n that would AO f u r n i s h estimators of f with an estimate of the normally-ignored term. Unfortunately, the e f f o r t shied away from the taste of success. A b r i e f documentation of i t i s presented i n Appendix D i n the hope that i t might stimulate the reader to greater ideas. The truncated r e l a t i o n s h i p [Equation (2-10)] has been employed i n t h i s work. 2-5 Vapour Molar Volume and Compressibility Ratio The vapour molar volume and compressibility r a t i o are two q u a n t i t i e s that are normally estimated from a suitable equation of state. In this work, two equations of state have been employed: the truncated v i r i a l equation of state, and the Wilson modification of the Redlich-Kwong equation of state. 2-5-1 The Truncated V i r i a l Equation of State The v i r i a l equation of state, truncated a f t e r the second term, i s employed for systems at low and moderate pressures. In the p r e s s u r e - e x p l i c i t form, i t i s Z = (2-12) - 36 -where B = the vapour-mixture second v i r i a l c o e f f i c i e n t , v = molar volume of the vapour and Z = the compressibility r a t i o of the vapour mixture. The above equation i s a quadratic i n v and lends i t s e l f to easy solu-t i o n . However, should the r e s u l t i n g roots be complex, the volume-e x p l i c i t form of the v i r i a l equation i s resorted to, thus: Pv BP Z = Bf " 1 + RT ( 2" 1 3> Equation (2-13) i s l i n e a r i n v. Whichever form i s employed, Z follows from the left-hand-side equality. B i s determined from N N B = 1 I y y B ±ii j£i y i y j i j where B-£i i s the second v i r i a l c o e f f i c i e n t for pure component i , B i j (1 * J) i s the second v i r i a l c r o s s - c o e f f i c i e n t between components i and j . N i s the number of components i n the mixture. B i s determined from the c o r r e l a t i o n of P i t z e r and Curl, as modified by Prausnitz and co-workers (1967) to account for p o l a r i t y and ass o c i a t i o n . According to these workers, P B £|_ii = F ( 0 ) ( T r ) + <oHi F ( 1 ) ( T r ) + F y ( p r , T r ) + V a 0 ^ ( 2 _ U ) where W H i = t 1 i e a c e n t r : 5 - c factor of the homomorph of i , - 37 -y^ = the reduced dipole moment of i , given by y_ = IOV2P i c i T s c i V>^ = the dipole moment of i i n Debye un i t s . = the association constant of i , Subscript 'c* denotes the c r i t i c a l state, F ( o ) ( T ) - 0.1445 - _ 0,1385.. Mm r T T T r r r F ( 1 ) ( T ) - 0.073 + Mi _ P^ O ! 0^97 _ 0^0073 r T T T T r r r r F-(T ) = exp[6.6(0.7 - T ) ] , and F (y ,T ) = -5.237220 + 5.665807£ny y r ' r r - 2.133816(£ny r) 2 + 0.2525373(£ny r) 3 + ^-[5.769770 - 6.181427Jc-nyr + 2 .28327(£ny r) 2 r - 0.2649074(*n y ) 3 1 . r The c r o s s - c o e f f i c i e n t , B i s also determined from the above c o r r e l a t i o n s , with the following mixing r u l e s : T , . = (T , T . ) 1 / 2 c i j c i C2 ' P = 4T V g i + !£iAl](v1{3 + V 1 / 3 ) " 3 , c i j c i j L T c ± T c j J V c i c j 1 Q V j P c i j , V - 2 ^ ' c i j n = 0.5(n 1 + n ), - 38 -and 0) H ± . 0.5(1^ + 0)j) for both i and j nonpolar 0.5(w H i + u)j) for i polar and j nonpolar 0.5(a>Hi + co ) for both i and j polar 2-5-2 The Wilson Mod i f i c a t i o n of the Redlich- Kwong Equation of State The truncated v i r i a l equation of state i s known not to be suitable for systems at high pressures. For the purpose of equilibrium c a l c u l a t i o n involving such systems, programs p a r a l l e l to those employing the v i r i a l equation of state have been written based on the Wilson modification of the Redlich-Kwong equation of state (Reid et a l , 1977). This equation takes the form Pv v ft b Z = _ = F ( 2 - 1 5 ) RT v-b ft b v+b where: N F = I y ± F i=l 1 1 N 1=1 F ± = 1 + (1.57 + 1.62(0±) (T~* - 1), ft, RT , b c i b i = - P — • c i ft = 0.4274802327 a and ft = 0.086640350 b - 39 -Eliminating v from Equation (2-15) and rearranging, we have Z 3 - Z 2 - (A 2 + A - B) Z - AB = 0 (2-16) where _ bP ~~ RT bPF a " d B " S I T b Equation (2-16), a cubic i n Z, i s solved d i r e c t l y (for method see, for example, La Fara, 1973) for i t s largest r e a l root. The vapour molar volume then follows from the left-hand-side equality of Equation (2-15). 2-6 Liquid Molar Volume The method of estimation of component l i q u i d molar volume depends, l i k e that of reference fugacity, on whether the component i s condensable, h y p o t h e t i c a l - l i q u i d or s u p e r c r i t i c a l . For the noncondensable components, the estimate i s that of the p a r t i a l molar volume at i n f i n i t e d i l u t i o n i n the mixed solvent. For a condensable component, the l i q u i d molar volume i s assumed to bear a quadratic r e l a t i o n s h i p with temperature, thus: v\ = v j°> + v ^ T + v f V (2-17) where > a n c * a r e c o n s t a n t s determined from values of L v supplied at three temperature points. Where only two values are (2) supplied, ' i s set equal to zero, while i f only one value i s supplied, we assume v £ ^ = = 0 -40-The l i q u i d molar volume for a hypothetical l i q u i d i s estimated by the method of Lyckman and co-workers (Prausnitz et a l , 1967). According to this method, j m RT . v ( 0 ) v L = V.°°= " 1 (2-18) i i P . v ' c i where as determined by Prausnitz et a l (1967), i s given by v j 0 ) = -9.5259777A2 + 2.9766410A., + 0.085762954 i l i i s defined by T ,P . _ r i c i i ~ -2 where v = ) x .v . and v<5 = £ 6 .x .v^, jeC 2 2 2 'C being the set of condensable components. The s o l u b i l i t y parameter, 6^ , i s given by ,2 -± = 5<°> + u> 6 ^ + u> ( 2 ) 6<2> P . i i i i i c i where 650)= -20.141089T4.+ 57.150420T3.- 60.717499T2. x r i r i r i + 27.093334T - 3.1509051, r i 6? X )= -52.996350T4. + 151.56585T~\ - 153.64561T2. l r i r i r i + 59.821527T . - 4.3229852, r i •40a-Leaf 41 missed in numbering - 42 -and (2) = _ 6 > 8 4 3 7 8 8 5 T 5 + 8 . 6 3 6 3 5 6 9 T 4 i r i r i + 32.902287T3. - 89.695653T2 r i r i + 73.721696T . - 18.674318 r i For a s u p e r c r i t i c a l component, the l i q u i d molar volume i s estimated from L — 0 0 1 v L— 0 0 v. - v. = — I x.v>. . (2-19) where v and C are as defined above for hypothetical l i q u i d s . 2-7 Vapour-phase Fugacity Coefficient The component vapour-phase fugacity c o e f f i c i e n t i s defined by the fundamental thermodynamic r e l a t i o n s h i p (Prausnitz, 1969): oo *n * i = RT- M i lAv.n " ^ ] d V " *nZ ^~ 2^ v i j * i This i n t e g r a l requires an equation of state and the two that have been most widely employed are the Redlich-Kwong equation or any of i t s various modifications ( for example: Lu et a l , 1974; Mukhopadhyay and Singh, 1975; Reid et a l , 1977), and the v i r i a l equation truncated a f t e r the second term (Prausnitz et a l , 1967; Dojcansky and Surovy, 1975; Nagata and Gotoh, 1975; Leach, 1977) — the former being the preferred choice at elevated pressures. These two equations have been adopted here to play complementary r o l e s , as discussion i n Section 2-5. As already mentioned, the Wilson modification of the Redlich-Kwong equation was considered the most suitable version. When the truncated v i r i a l equation [Equation (2-12)] i s substituted into Equation (2-20) and the i n t e g r a t i o n performed, the r e s u l t i n g r e l a t i o n s h i p i s - 43 -2 N * n * ± = v I 7^.. - *nZ (2-21) j=l J J on With the Wilson modification of the Redlich-Kwong equation [see Equati (2-15)], we have b ft v ft Fb *n * ± = * n ( ^ ) + ^ + ^ F ± * n ( ^ ) - ^ • ^ - *nZ (2-22) b b 2-8 Liquid-Phase Activity Coefficient While vapour-phase n o n i d e a l i t i e s , as expressed by the fugacity c o e f f i c i e n t , can quite accurately be determined from an equation of state, the same cannot be said of i t s l i q u i d counterpart: the a c t i v i t y c o e f f i c i e n t . As has already been discussed i n Section 1-7, three d i f f e r e n t c o r r e l a t i o n s for estimating a c t i v i t y c o e f f i c i e n t s have been implemented i n t h i s work. They are the Wilson equation (Wilson, 1964), the Non-Random-Two-Liquid (NRTL) equation of Renon and Prausnitz (1968), and the Universal Quasichemical (UNIQUAC) equation of Abrams and Prausnitz (1975), as modified by Anderson and Prausnitz (1978). 2-8-1 The Wilson Equation The Wilson equation (Wilson, 1964), with i t s various modifications (Nagata et a l , 1975a and 1975b; Tsuboka and Katayama, 1975), has been widely applied and found to give very good estimates of a c t i v i t y c o e f f i c i e n t , Y i , subject to two l i m i t a t i o n s : that the system e x h i b i t s no phase s p l i t t i n g ; and that there be no maxima or minima i n the a c t i v i t y c o e f f i c i e n t p r o f i l e . In i t s o r i g i n a l form, the equation - 44 -states: N N x, A j j , n y = i _ o_ i V . . A 1 _ V r k k i i - 1 - M I M J - I [-*-=—] (2-23) where A i j " L e x P L S i J V i and (^^j "" i s a n e m p i r i c a l l y - c o r r e l a t e d energy parameter. This two-parameter form of the Wilson equation i s employed for conden-sable components. For noncondensable components, the approach by Prausnitz and co-workers (1967) i s adopted and y determined from a one-parameter modification of the form A x X,n y ± = SLn[—^ ] - - j - — * (2-24) I A , .x, I x A . A l j j j=l j * J where subscript 'r' denotes the chosen reference solvent for the noncondensable component i . For i n t e r a c t i o n between two noncondensable components, i t i s assumed that X . - A = X - X = 0, so that n i j J J oo V . A _ J i j - 0 V i 2-8-2 The Non-Random-Two-Liquid (NRTL) Model Experience with a c t i v i t y - c o e f f i c i e n t p r e d i c t i o n by various workers has revealed that the weakness of the Wilson equation i s the strength of the NRTL c o r r e l a t i o n (Renon and Prausnitz, 1968). While other p r e d i c t i v e correlations such as the UNIQUAC equation (Abrams and -45-Prausnitz, 1975) and the Orye equation (Bruin, 1970) are reportedly also capable of c o r r e c t l y predicting phase s p l i t t i n g , the NRTL equation — i n s p i t e of some l i m i t a t i o n s (Heidemann and Mandhane, 1973; Novak, 1974a) — has gained by far the widest a p p l i c a t i o n to date. According to the c o r r e l a t i o n , N N «" \ - V + J N - T (2-25) where G j i " e*P<-° ji T jl>» T _ ( g j i " g i i ) j i RT 8 i j S j i ' and x.. = o i i The energy parameters (g - 8^) ^ g j i ~ g j ' ^ ' t ^ 6 n o n r a n < * o m n e s s parameter a are determined from empirical data. 2-8-3 The Universal Quasi-Chemical (UNIQUAC) Model As a r e s u l t of the shortcomings of the NRTL model referred to i n Section 2-8-2 — l i m i t a t i o n s that are related to m u l t i p l i c i t y of parameters and of solutions — the UNIQUAC model (Abrams and Prausnitz, 1975) as modified by Anderson and Prausnitz (1978) has also been implemented. This model i s given by - 46 -i i i . , J J •j=l N 6'T •qi M l 6'T ) + q« - q'£ 3 l j (2-26) where z I j T ^ - q j ) - ^ - ! ) . z = l a t t i c e coordination number, and i s assigned the value 10, v i N I r .x . j-1 J J q i X i e . = 1 1 i N 1 I q 1 » 1 j-1 J J q i x i 6' = 1 1 N j-1 J J T K . = exp [-ak./RT] The a 's are the UNIQUAC parameters (two for every component pa i r ) k J while r, q and q' are pure-component molecular-structure constants which depend on molecular size and external surface areas. -47-2-9 Vapour Molar Enthalpy The departure of the vapour p a r t i a l molar enthalpy, of component i from the ideal-gas value, H°, i s given by the thermodynamic r e l a t i o n s h i p (Holland, 1963): (H ± - H°) = 34nf v 2 9T RT (2-27) p,n v Since by d e f i n i t i o n , f± = t^jY^* Equation (2-27) becomes 34n<|> 9T " ( H i " H i } (2-28) P,n R T 2 2-9-1 The Departure Function According to Reid et a l (1977), while the truncated v i r i a l equation i s u n r e l i a b l e i n the p r e d i c t i o n of enthalpy departures, the Wilson modification of the Redlich-Kwong equation i s reported to give very good r e s u l t s . Combining Equations (2-22) and (2-28) with Equation (2-15), we have (H, - H°) -b b, ft bF 4 ft Fb, i i | i , a i , a i + — + 2 1 2 2 RT v(v-b) (v-b) ftv v(v+b) 0, (v+b) b b v ; v8T ;p,n T ftb v v f b n 8 T ;p,n ti b * 1 < £ > _ . (2-29) ftb (v+b) v8T yp,n - 48 -where V 9(TF) 1 9v ^ bv(v+b) 9T (v-b) (—) and Q. bF(2v+b) I 1 ft v^(v+b) (v-b) 3. 3F T ^ p . n " " ( 1 ' 5 7 + L M V 3F -1 N (3T>p,n = 72 ^ 7 ^ 1 . 5 7 + 1 . 6 2 ^ ) 1 ^ N [ ^ ] p > n = " ^ y ±(0.57 + 1.62» ±) 2-9-2 The Ideal-Gas Enthalpy Treating Enthalpy as a function of temperature and pressure, and recognizing the fact that ideal-gas enthalpy i s Independent of pressure, we have 9H° d H l • <-§T>p d T " C p i d T Therefore, T H? = / C°,dT (2-30) ref where T ^ i s the enthalpy reference temperature. In t h i s work, C° i s represented by a third-order polynomial function of temperature, thus: C°. = a, + S T + C,T + d 4T (2-31) px i i i i - 49 -Combining Equations (2-30) and (2-31), we have H° - a i T + ^ T 2 + ! | T 3 + f j . T 4 + e ± (2-32) where ^ e i " - t a i T r e f + "T T r e f + ^ T r e f + ~T T r e f 1 ' 2-10 Liquid Enthalpy The estimation of l i q u i d enthalpy i s more involved, compared to that of the vapour. The representation adopted here i s i n accordance with the recommendation by Reid and co-workers (1977). The pure-component l i q u i d enthalpy-departure i s defined by: \ ~ H° = ( h ± - hj) + (hj - Hj) + (Hj - H°) (2-33) where hj^ = the l i q u i d enthalpy of pure component i at the system temperature and pressure. H° = the ideal-gas enthalpy of component i at the system temperature and at the reference pressure, P°. h^ = the saturated-liquid enthalpy at the system tempera-ture and a pressure corresponding to the vapour pressure of the component. g = the saturated-vapour enthalpy of the component at the same conditions as h^. The l i q u i d mixture enthalpy i s given by N N h - I x,(h, - H?) + I x.H° + h E i = l i=l 1 F where h i s the heat of mixing. - 50 -s o The term (H^ - H^) i s a vapour-phase property and i s obtained by applying the equations developed i n Section 2-9 to i n d i v i d u a l components. The other required terms are estimated as discussed i n the following subsections. I t should be noted that the relationships s s s presented below for (h^ - h^) and (h^ - H^) do not apply to super-c r i t i c a l components. None of the applications i n t h i s work involved such components. 2-10-1 Departure from Saturation Value g The term (h^ - h^) represents the e f f e c t of pressure on l i q u i d enthalpy, and i t i s correlated by the corresponding-states equation of Yen and Alexander (Reid et a l . , 1977), thus: h i " h i H i " h i H i " h i ( m ) C rp ) C r n ) c i c i SL c i SCL where the subscripts 'SL' and 'SCL' denote 'saturated l i q u i d ' and 'sub-cooled l i q u i d ' r e s p e c t i v e l y . The saturated-liquid term i s defined by Six *i * v-' 1*^ 1 T o i SL ~ 1 + d i < * " P r i > ' ' while the subcooled-liquid term i s given by <V"\ = - a ± ( P r l " b ±) - C i ( T r i - d ±) - e . ( T r i - f . ) 2 T c i SCL - 8 1 ( P r r h l ) ( T r l - 1 i ) + V" Pri + V* n P r i ) ( * n Tri> .2 + l ± ( l n P r.)(£n T r ± ) + m± (2-35) - 51 -The constants — 'a' through 'd' i n Equation (2-34), and 'a' through 'm' i n Equation (2-35) — are given as discrete functions of the c r i t i c a l c o m p r e s s i b i l i t y r a t i o , Z^, of the component (for t h e i r values, see Reid et a l , 1977). P i n the above equations i s the reduced vapour-pressure of component i . 2-10-2 The Enthalpy of Vaporization s s The enthalpy of vaporization, h^ - H^, i s estimated from Watson's r e l a t i o n s h i p (Reid et a l , 1977) referred to the normal b o i l i n g point of the component, thus: »0.38 hf - H S = - AH i i vbi 1 - T , r i 1 ~ T r b i J (2-36) where ^ T^^^ = the reduced normal b o i l i n g temperature of the component. and AH , = the component's enthalpy of vaporization at T , vbi r b i AH , . i s estimated from the c o r r e l a t i o n of Vetere (Reid et a l , 1977): vbi 0.4343£nP - 0.68859 + 0.89584T AH = RT ( £± b r l 9 ) (2-37) D 1 0.37691 - 0.37306T, , + 0.14878P ,T~ , b r i c i b r i 2-10-3 The Enthalpy of Mixing The molar enthalpy of mixing for component I i n a l i q u i d mixture i s given by the r e l a t i o n (Reid et a l , 1977): h - h 3An Y •( o — 5 = ( > (2-38) RT 3T P,n - 52 -The Wilson equation [Equation (2-23)] was employed by Orye (Prausnitz et a l . , 1967) i n the estimation of excess enthalpy and was found to give reasonable r e s u l t s , e s p e c i a l l y with nonassociating solutions. When equation (2-23) i s substituted into Equation (2-38) and the d i f f e r e n t i a t i o n i s performed, the re s u l t i s N N L X J 6 i J A i J N x ^ ^ X j 8 k j \ j ^ V u " £ X A J (.L=L X J V . where hi - hi - \ i The molar enthalpy of mixing for the l i q u i d mixture i s given by N _ h = I x (h - h ) i= l 1 1 When this summation i s applied to Equation (2-39), the second term on the right-hand side reduces to zero, and we have N T x 3 A N x L j i j i j *E <2-*°> I x j A i j 3=1 CHAPTER THREE ISOTHERMAL VAPOUR-LIQUID FLASH CALCULATION 3—1 Introduction An exhaustive study of the vapour-liquid f l a s h problem has been done here i n an attempt to obtain conclusive r e s u l t s and to form the basis for tack l i n g the related problems of l i q u i d - l i q u i d and l i q u i d -s o l i d e q u i l i b r i a . The i n v e s t i g a t i o n i s i n three parts. The f i r s t part (Section 3-2) treats double-loop univariate methods. The second part (Section 3-3) deals with free-energy minimization methods. The l a s t segment (Section 3-4) treats single-loop univariate methods. Section 3-5 con-tains a comparison of the d i f f e r e n t methods, a study of the e f f e c t of varying the frequency of equ i l i b r i u m - r a t i o computation, and general conclusions. 3-1-1 Nomenclature Symbol D e f i n i t i o n a Matrix defined i n Eq. (3-40a). A Matrix defined i n Eq. (3-29). A Matrix defined i n Eq. (3-36). b_ Set of column vectors defined i n Eq. (3-43). B_ Vectors defined i n Eq. (3-29) and i n Eq. (3-36). C Parameter defined i n Eq. (3-40). E Deviation parameter. -53-- 54 -f P a r t i a l fugacity. f Check function. f° Standard state fugacity. F T o t a l molar feed rate. F Functions defined i n Equations (3-28), (3-40) and (3-53). g Modified G, defined i n Eq. (3-32). g Variable defined by Eq. (3-78). G Normalized Gibbs free energy function. G a Quadratic Taylor approximation of G. G T T o t a l Gibbs free energy of system. I_ Identity matrix defined i n Eq. (3-29). J Jacobian matrix. K Equilibrium Ratio. K Q A reference K, defined i n Eq. (3-1). K r K r a t i o as defined i n Eq. (3-1). 1 Component l i q u i d molar content. L T o t a l l i q u i d molar content. n Number of 'species' i n geometric programming formu-t i o n . N Number of components i n system. P Pressure. r Variables defined i n Eq. (3-43). R Universal gas constant. Parameter defined i n Eq. (3-78a). - 55 -t Exponent parameters defined i n Equations (3-18) and (3-78a). T Temperature, u Lagrange m u l t i p l i e r s . V Total'Vapour molar content. w Geometric programming variable vector, defined i n Section 3-3-4, paragraph 1. W Geometric programming va r i a b l e , related to w. x Liquid-phase mole f r a c t i o n , y Vapour-phase mole f r a c t i o n , z System mole f r a c t i o n . Z Component molar content for system. Greek Symbols a Mean-value theorem parameter, a Parameter defined i n Eq. (3-18). Y Liquid-phase a c t i v i t y c o e f f i c i e n t . 6 Kronecker delta, defined i n Eq. ( 3 - 2 6 ) . 9 Phase f r a c t i o n . 0 Temperature function defined by Eq. (3-48). A Parameter variously defined i n Equations ( 3 - 3 0 ) , (3-55) and (3-58). y Chemical p o t e n t i a l , v Component vapour molar content. <t> Vapour-phase fugacity c o e f f i c i e n t . <|> Function defined i n Eq. (3-17). X Nonideality parameter, defined Immediately following Eq. (3-1). - 56 -Subscripts f Frequency. i , j , k Component. L L i q u i d . o Denoting hypothetical primal function i n geometric-programming formulation, s successive-substitution value, v Vapour. - (as i n x): denotes a vector quantity. superscripts m Defined i n Eq. (3-76). n I t e r a t i o n counter. o Standard state; i n i t i a l point. ' F i r s t d e r i v a t i v e . Second d e r i v a t i v e . * Equilibrium; optimal value. 3-1-2 Systems Employed and a Measure of Nonideality Sixteen systems were used i n the a p p l i c a t i o n of the vapour-liquid f l a s h c a l c u l a t i o n methods. They range from binary systems to systems containing s i x components. They were chosen to span a wide spectrum of b o i l i n g ranges and to embody mixtures with d i f f e r e n t degrees of noni d e a l i t y . Table 3-1 contains v i t a l information on each system as w e l l as a code-name by which the system w i l l henceforth be addressed. The T-versus-6* p r o f i l e f o r each system has also been generated. This was done by choosing 12 temperatures at uniform i n t e r v a l s to cover - 57 -Table 3-1 Vi t a l information on vapour-liquid systems Code-Name No. Of Components Pressure (Atm.) Bubble-Point (K) Dew-Point (K) Composition (mole %) VA 4 1.0 336.15 342.64 N-Hexane (37.1); Ethanol (3.4); Methylcyclopentane (50.1); Benzene (9.4). VB 3 1.316 85.87 88.94 Nitrogen (30.36); Argon (29.48); Oxygen (40.16) VC 5 1.0 330.83 335.34 Benzene (3.6); Chloroform (82.2); Methanol (6.3); Acetone (4.2); Methyl-Acetate (3.7) VD 4 1.0 351.40 365.54 Water (27.217); Ethanol (22.783); Ethyl-Acetate (27.217); Acetic-Acid (22.783). VE 4 1.0 323.24 328.85 Acetone (32.4); Chloroform (32.6); Dimethylbutane (22.2); Methanol (12.8). VF 5 1.0 352.27 360.88 Hexane (18.6); Methylcyclo-pentane (25.7); Cyclohexane (11.8); Benzene (15.3); Toluene (28.6). VG 4 1.0 344.21 344.69 Cyclohexane (18.6); Benzene (42); Isopropanol (35.2); Methyl-Ethyl-Ketone (4.2). VH 4 1.0 328.06 331.17 Ethanol (10); Chloroform (20); Acetone (50); N-Hexane (20). VI 4 1.0 334.05 341.08 Benzene (45.6); Chloroform (5.3); Methanol (5.4); Methyl-Acetate (43.7). VJ 6 1.0 343.08 360.05 Hexane (18.6); Methylcyclo-pentane (20.7); Cyclohexane (11.8); Benzene (15.3); Toluene (28.6); Ethanol (5.0). VK 3 3.7 373.97 376.77 Acetone (25.7); Methanol (64.0); Water (10.3) VL 2 1.0 383.10 542.97 Benzene (50.0); Heptadecane (50.0) VM 2 1.5 402.26 545.97 Cyclohexane (50.0); Hexadecane (50.0). VN 2 1.0 386.60 583.49 Cyclohexane (50.0); Eicosane (50.0) VO 2 1.0 379.33 529.24 Tetrachloromethane (50.0); Hexadecane (50.0). VP 4 1.0 380.50 ' 528.35 Cyclohexane (17);Hexadecane (49); Tetrachloromethane (17); Benzene (17). - 58 -the vapour-liquid two-phase region and, at each temperature, performing * a f l a s h c a l c u l a t i o n to obtain 6 . The r e s u l t i n g p r o f i l e s are presented g r a p h i c a l l y i n Figures 3-1 and 3-2. A scheme was devised aimed at quantifying the degree of non-i d e a l i t y of each system. I t involved the following steps: (1) Choose (from Figure 3-1 or 3-2) the temperature corresponding to 6 = 0.5 v (2) Determine K corresponding to 6 = 0.0. Define t h i s as K . — v —o (3) Vary 9^ at uniform i n t e r v a l s from 0.0 to 1.0. For each 8 , determine the corresponding K. Then define (3-1) The - versus - 8^ p r o f i l e f o r each system i s presented graphi-c a l l y i n Figure (3-3). In view of the monotonicity of the p r o f i l e s , a single parameter x» was introduced as a measure of the degree of nonideality of each system. I t i s defined by X = K at 8 = 1.0, r v and i t i s a function only of temperature. X has been generated as a function of temperature for the d i f f e r e n t systems by determining K r ( ^ v = 1) at temperatures correspond-* * * ing to d i f f e r e n t values of 9 from 9 = 0 to 9 =1. Plots of x versus V V V * * 9^ are presented i n Figure 3-4 for a l l 16 systems. - 59 -346 • 1 1 1 1 i 1 1 1 1 0.0 0.1 0.2 0.3 0.4 05 0.6 0.7 OB OS 1.0 »-Vapour Fraction, 8* Fig 3-1 : Two-phase region temperature profiles for narrow-boiling systems - 60 -3 - 2 : Two-phase region temperature profiles for wide-boiling systems - 61 -0 0.1 0.2 0 3 0.4 0.5 Q6 0.7 0.8 0.9 1.0 * Fig 3-3; K"r V .C? v for the different systems at Q# 0.5 - 62 -0.420 0.380 4 0.340^ 0.300 0,260 4 0.220 0.180 0.140H 0.100H 0.604 0.20H T 1 1 1 1 ' r 0,0 0,1 0.2 0.3 0.4 0.5 0,6 0.7 0.8 0.9 1.0 a* Fig 3-4: Plot of nonidealiry parameter versus solution-point vapour fraction - 63 -3-2 Double—Loop Univariate Methods The double-loop univariate methods are based on the mass-balance approach. As the name implies, they involve two l e v e l s of i t e r a t i o n : an outer i t e r a t i o n loop for converging the vapour f r a c t i o n ; and an inner i t e r a t i o n loop for updating the equilibrium r a t i o s , and hence the mole f r a c t i o n s , at the current value of the vapour f r a c t i o n . The e f f i c i e n c y of the univariate methods depends very much on the following three fa c t o r s : (a) The way the check-function for updating the vapour f r a c t i o n i s formulated. (b) The acceleration method employed i n updating the vapour f r a c t i o n . (c) The way the variables are i n i t i a l i z e d . The most comprehensive comparative study of the subject known to have been undertaken to date i s that by Rohl and Sudall (1967). The authors reached the conclusion that the best r e s u l t i s produced by the formulation of Rachford and Rice (1952) accelerated by either the second-order Newton method or the third-order Richmond method. However, the study has a number of points against i t : (1) The authors erroneously concluded that the standard formulation (see d e f i n i t i o n below) i s incapable of converging. As Holland (1975) r i g h t l y asserts, this formulation converges to the desired s o l u t i o n i f the vapour f r a c t i o n i s i n i t i a l i z e d to 1. (2) The study was undertaken before a recent formulation, reported by King (1980) and said to be superior to the Rachford-Rice formulation, was proposed by Barnes and F l o r e s . - 64 -(3) The study f a i l e d to appreciate the great influence that the mode of i n i t i a l i z a t i o n has on the performance of the d i f f e r e n t formulations and acceleration methods. This study starts by i n v e s t i g a t i n g four d i f f e r e n t formulations of the problem: (a) The standard formulation. (b) A logarithmic form of the standard formulation. (c) The Rachford-Rice formulation. (d) The Barnes-Flores formulation. The second formulation has been introduced because i t i s to the standard form what the Barnes-Flores formulation i s to the Rachford-Rice formulation. Both the Newton method and the Richmond method have been studied as ways of accelerating convergence. Some other formulations of the problem are explored l a t e r (Section 3-2-4) while d i f f e r e n t i n i t i a l i z a t i o n schemes are discussed i n Section 3-2-5. 3-2-1 Theoretical Background The mass-balance approach to phase-equilibrium computation i s centered on the fundamental thermodynamic equilibrium equality f i l = f i 2 = = f i p = - - f i M ( 3 " 2 ) where f i s the p a r t i a l fugacity of component i , at equilibrium, i n phase p of an M-phase system. In the case of a vapour-liquid equilibrium, Equation (3-2) becomes f i L = f i v - 65 -Defining f i L " Vi Xi and f i v = • 1 P y i , (3-2a) we have Y i f i X i = * i P y i <3"3> If we now introduce the concept of equilibrium r a t i o s , K^, then Equation (3-3) leads to the equilibrium r e l a t i o n s h i p 1 " *T " *7~ " 2 ' " ' ' N ) ( 3 " 4 ) The a d d i t i o n a l equations that have to be considered along with Equation (3-4) are: Component-Mass Balance: 1 + v - Z = 0 ( 1 - 1 , 2 N) (3-5) Total-Mass Balance: L + V - F = 0 (3-6) L i q u i d Mole-Fraction R e s t r i c t i o n : N I x = 1 (3-7) 1-1 Vapour Mole-Fraction R e s t r i c t i o n : N I y. = i (3-8) - 66 -Introducing the r e l a t i o n s v F ' v± = % (3-8a) and Z i = F z i and combining Equations (3-2) through (3-4), we have z i x. ( i = 1, 2,..., N) (3-9) l + O ^ - i ) ev From Equation (3-4): K z. y = K x = i - i (i=l,2,...,N) (3-10) 1 + (K -1)0 i v The various formulations of the re s i d u a l function employ d i f f e r e n t combinations of Equations (3-7) through (3-10). The Standard Formulation It combines the residual form of Equation (3-7) with Equation (3-9) to give N N z f(9 ) = I x - 1 = I { i } -1 (3-11) i=l i = l 1 + (K -1)6 ) i v The Standard Logarithmic Form: This involves taking the logarithm of Equation (3-7) and combining i t with Equation (3-9), thus: N N z f(8 ) = £n[ I x ] = An[ I { ± }] (3-12) i=l i = l 1 + (K -1)6 i v - 67 -The Rachford-Rice Formulation: Equation (3-7) i s subtracted from Equation (3-8) and the r e s u l t combined with Equations (3-9) and (3-10) to y i e l d N N (K - l ) z f(9 ) = I {V± ~ x } = I { — } (3-13) i = l i = l 1 + (K.-l)6 1 v The Barnes-Flores Formulation: The combination of Equations (3-7) and (3-8) gives N N I x = I y i= l i=l Taking the logarithm of this equation and su b s t i t u t i n g for x^ and y^ from Equations (3-9) and (3-10) respectively, we have f ( 6 ) = i n[ I { -An[ l { i }] (3-U) v 1-1 1+(K -1)6 i = l 1+(K -1)6 i v i i v 3-2-2 A General Form of the Algorithm A general algorithm for the double-loop univariate methods consists of the following main steps: (1) I n i t i a l i z e x, y, K and 8 . (2) Compute x corresponding to the current values of K and 8 from Equation (3-9). v (3) Compute y_ from y^ = K ^ x ^ . (4) Normalize x and y_ and update K. (5) Using the new values of K, update x^ (6) If the new x i s not within some tolerance of i t s old value, then go to Step 3. Otherwise go to Step 7. - 68 -(7) Test for convergence. If the outcome i s p o s i t i v e then terminate the i t e r a t i o n . Otherwise go to Step 8. (8) Update 6^ a n d go to Step 2. A l l the double-loop univariate methods have the basic structure presented above. They d i f f e r only i n the way Step 8 i s implemented. Where Newton's method i s employed i n the updating of 8 , then the r e l a t i o n s h i p i s e n + 1 = 0 n _ f(en)/f(en) V V v v V where f ( 8 n ) = d f v' d8 v 8 = en With Richmond's method, the appropriate equation i s e^1 = ej; - 2f(e^).f(e^/{2[f'(e^)]2 - f(e^.f(e^} where v de 2 'e =en V V V f(8^) i s given by one of Equations (3-11) through (3-14) depending on which formulation i s being tested. 3-2-3 A Comparative Study of the Formulations In order to have a better understanding of the nature of the four formulations represented by Equations (3-11) through (3-14), the check functions were generated at d i f f e r e n t temperatures for system VA. These have been plotted and are presented i n Figures 3-5 through 3-8. And for the purpose of comparing the l i n e a r i t y of the logarithmic formulations r e l a t i v e to t h e i r nonlogarithmic counterparts, t h e i r - 69 -0.18 -0.02 H Fig 3-5: Standard form check-function profiles for system VA - 70 -0.16H -0.02H -Q04J 1 Fig 3-6: Standard logarithmic check-function prof iles for system VA - 71 -0.24 -0.20-1— — • « ( , Fig 3-7; Rochford-Rice check-function profiles for system VA - 72 -0.22 -0.16H — Fig 3-8: Barnes-Flores check-function profiles for system VA -73-check-function p r o f i l e s have been juxtaposed at two temperatures (see Figures 3-9 and 3-10). A quick study of the plots reveals that: (1) The standard and the standard logarithmic forms, accelerated by any gradient method, should always converge to the rig h t s o l u t i o n i f 9^ i s i n i t i a l i z e d to 1 or any point i n the range 6* < 9 < 1. v — v — (2) The Rachford-Rice and Barnes-Flores formulations could f a i l to converge i f not properly i n i t i a l i z e d . The way to guarantee t h e i r convergence i s by ensuring that 9° s a t i s f i e s the condition 0 < 9° < 9 . — v — v (3) Given that for the standard and the standard-logarithmic forms, 9° = 1 and that for the other two forms, 9° = 0, then one v v ' would expect the former pair to return better computation times for mixtures that are 'vapour-heavy' and the l a t t e r pair to be better for 'liquid-heavy' mixtures. (4) The logarithmic forms do turn out to be s l i g h t l y more l i n e a r i n the regions where the i n i t i a l i z a t i o n of 9^ i s expected to lead to convergence. However, i t i s only through the empirical process that i t can be ascertained whether the gain i n l i n e a r i t y i s s u f f i c i e n t to o f f s e t the extra computing e f f o r t that the transformation to a logarithmic scale requires for the check functions and t h e i r d e r i v a t i v e s . In order to test out the above deductions empirically, the d i f f e r e n t formulations were applied to a l l the 16 systems, using the i n i t i a l i z a t i o n schemes stated under Deduction 3. In each case, r e s u l t s were generated for 19 points spread approximately uniformly on the 0/124 • ^ v Fig 3-9: Comparrig the fouriormulotions for system VA at 340 K - 7 5 -0.22 Fig 3-10 : Comporing the four formulotions for system VA at 342.5 K -76-9 axis between 0.05 and 0.95. Both the Newton and Richmond methods v were employed i n acceleration. The r e s u l t s c l e a r l y confirmed Deduction 3 as can be seen from the plot for system VC i n Figure 3-11 (A s i m i l a r trend was observed for other systems). They also revealed that while the logarithmic forms have a s l i g h t edge over t h e i r nonlogarithmic counterparts when Newton's acceleration method i s employed, the p o s i t i o n i s reversed when Richmond's method, which i s not a l i n e a r acceleration method and which requires second derivatives, i s used. I t was further observed that the Richmond method generally requires less i t e r a t i o n s , and less computation time, than the Newton method (see Figure 3-12 as an example of t h i s ) . However, while the Newton method converged i n a l l cases for a l l the formulations, the Richmond method was found to encounter convergence problems due to overprojection i n a number of cases — e s p e c i a l l y with wide-boiling systems — for a l l the formulations except the standard. In view of t h i s , no quantitative r e s u l t s are presented here, this having been deferred u n t i l a f t e r an i n v e s t i g a t i o n of more elegant i n i t i l i z a t i o n schemes. 3-2-4 Exploring Other P o s s i b i l i t i e s Documented i n this section i s a summary of the attempts made at seeking a formulation that would be superior to the four formulations already discussed. Let us consider Equation (3-5). I t can re a d i l y be shown, by combining this equation with Equations (3-6) and (3-8a) and summing the r e s u l t over a l l components, that -77-TOO 3 0 H 20 H 10H Legend : I Standard II Standard logarithmic III Rachford-Rice I V Barnes-Flores r 1 1 1 1 1 1 1 " 0 0 . 1 0 . 2 0 , 3 0 . 4 0 . 5 0 . 6 0 . 7 0 . 8 0 . 9 IJO *- 8y Fig 3-11: Iteration units (on a scale of OtolOO) v. vapor fraction for system VC (based on Newton's method) -78-'E c o 2 100 90 4 80-70 4 604 504 404 30 20H 104 Legend: Newton-acceleroted standard method Richmond-accelerated standard method Newton-occelerated Rachford-Rice method IV = Richmond-accelerated Rachford-Rice meth 0 0.1 Q2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 • f t Fig 3-12: Iteration units v. vapor fraction : comparison between Newton and Richmond for system VB - 79 -N N N (3-15) Equation (3-15) can be arranged to give N , N I (x,-y.) = — ( I x - 1) (3-16) i=l 6 i=l 1 v We find that the left-hand-side term is the Rachford-Rice check function while the numerator of the right-hand-side expression is the standard check function. In view of the above relationship between the two check functions and bearing in mind the nature of the profiles in Figures 3-5 through 3-8, i t was felt that an appropriate redefinition of the denominator of the right-hand side of Equation (3-16) could produce a check function that would be more linear, and hence converge faster, than a l l the existing formulations. Let us introduce a general check function, f^, defined by 1) (3-17) where <(> is some function of 0 satisfying the condition <|> + 0 as 6 •»• 0 v Two classes of <(> were studied. - 80 -Class 1: In this class, <f> was given the general d e f i n i t i o n <f> = ^ (3-18) The f^ p r o f i l e for system VA at 341.66K i s presented i n Figure 3-13 f o r d i f f e r e n t values of t. The question arises as to the best value of t to employ for any given system. A number of t - f i x i n g methods were t r i e d . One of these involved s e t t i n g t = 1 - 6°, where 6° i s v v obtained by i n i t i a l i z a t i o n Scheme 5 discussed i n Section 3-2-5. The underlying reasoning i s that since the previous i n v e s t i g a t i o n revealed that the standard formulation behaved better than the Rachford-Rice form ft ft for 6 close to 1 while the l a t t e r was better for 0 close to 0, v v i f 6° i s s u f f i c i e n t l y close to 0 , then d> would tend to 1 (the v v standard form) near the l i q u i d saturation l i n e , and to 0 (the Rachford-Rice form) near the vapour saturation l i n e . This way, f ^ would combine the best of the two methods. On testing the t - f i x i n g methods, i t turned out that a scheme such as the one outlined above performed, on the average, only as well as the simple scheme setting t = 0.5. This constant value of t was therefore employed i n subsequent investigations of the formulation. Class 2: One defect of the class-1 type of <J> proposed above i s the presence of the turning point ( c h a r a c t e r i s t i c of the standard check function) for values of t not i n the neighbourhood of 1. This i s -81--0.20-! 1 1 1 1 1 1 1 1 1 1 0.10 0 .20 0.30 Q 4 0 0.50 0.60 0.70 0.80 0.90 1,00 *-9y Fig 3-13 : fi \/.Qv for different values of t for system VA at 341.66K - 8 2 -a t t r i b u t a b l e to the asymmetric nature of the <t>(9v) p r o f i l e s about the (1 -6 ) n n e (see p l o t s of <t> versus 8 f o r t = 0 .2 and 0 . 5 i n v v F i g u r e 3 - 1 4 ) . To o b t a i n a symmetric p r o f i l e , $> was def ined by •<V = 1 + (I"- 1)6 < 3" 1 8> v P l o t s of <t> versus 6^ f o r a = 2 and a = 5 are shown i n F i g u r e 3-14 w h i l e f^ p r o f i l e s f o r the same va lues of a are presented i n F i g u r e 3 - 1 5 f o r system VA at 341.66K. Here, the problem i s that of determin ing a s u i t a b l e a f o r a g iven system. One of the schemes experimented w i t h i n v o l v e d : (1) I n i t i a l i z i n g K w i t h x = y = z_ (2) Assuming $ = 6 and e s t i m a t i n g f A ( 0 . 0 ) , f , ( 0 . 5 ) and f x ( 1 . 0 ) v 9 <p <p f rom: N f + ( 0 . 0 ) = 1 - 1 K±z± , N d - K , ) , ± 1-1 ' N z , i - 1 K i V°- 5 > = and f ^ l . O ) = -83-Fig 3-14: <p v. 0 V for different forms of <£> -84--0.20-1 1 1 1 1 1 1 1 1 1 1 0.10 Q20 030 0.40 050 0.60 0.70 0.80 0.90 1.00 ^ Fig 3-15: f,v. £?v for different forms of <£> for system VA at 341.66 K -85-(3) Constructing a l i n e on the {9 ,f^} plane through {O.O, f^(O.O)}, and JO.5, f (0.5)} to pass through {1.0, f*(1.0)}. f*(1.0) (4) Setting oc = \ fjn0)\ <P When the above scheme was tested, i t was found to y i e l d unreasonable values of a i n some cases — e s p e c i a l l y near the saturation l i n e s . This i s due mainly to the dependence of K on composition which i s not accounted for i n the scheme. Simply s e t t i n g a equal to 2 was found to perform just as well, on the average, as the more involved schemes such as the one above. In the applications to follow, we s h a l l r efer to the method using 0.5 2 9 v <j) = 6 as '^-normalized method 1' and the one with $ = as V 1 + 9 v '^-normalized method 2'. 3-2-5 Investigating D i f f e r e n t I n i t i a l i z a t i o n Schemes Five i n i t i a l i z a t i o n schemes were formulated and studied. In a l l the schemes, presented below, K i s based on x = y = z. Scheme 1 - In t h i s scheme, 9° i s simply given by N z, 9° = I i •XT *-< V 1 = 1 1 + 1/K - 8 6 -Scheme 2 - This scheme i s i n two steps: N z Step 1: Define 6 = £ -V i=l 1 + 1/K N z Step 2: Set 6° = £ — v i = l 1-6 v i Scheme 3 - This scheme i s based on a r e g u l a - f a l s i i n t e r p o l a t i o n between 6 =1.0 and 9 =0.5, using approximate values of f(6 ) v v v obtained from the standard formulation. Thus, define N z > - f(9 = 1.0) = I ^ - 1, i=l i F 2 - f ( 9 v = 0.5) = 2 ^ - 1, and F = F 2 / ( F 2 - F ^ . Then, 9° = 0.5(1 + F ) . Scheme 4 - This scheme, l i k e Scheme 3, also involves a r e g u l a - f a l s i i n t e r p o l a t i o n . However, the i n t e r p o l a t i o n i s between 9° = 0.0 and 9^ = 0.5 and i t i s based on approximate values of f(9^) -87-obtained from the Rachford-Rice formulation. Thus, i f we define N F = f(9 = 0.0) = I K z - 1, i=l 1 1 N (K - l ) z F 2 = f ( 6 v = 0.5) = 2 J * 1 . 1=1 i and F = F 2 / ( F 2 - F^), then 9° = 0.5(1 - F) v When the four schemes above were applied to a good cross-section of the systems, Schemes 3 and 4 were found to perform better than Schemes 1 and 2. I t was further observed that for most of the systems, * Scheme 3 outclasses Scheme 4 i n the range 0.5 < 9 < 1.0 but i s out-v — * performed by the l a t t e r i n the range 0.0 <^ 6^ < 0.5. The d i s p a r i t y was also found to depend much on the b o i l i n g range of the system. In view of these observations, 9° versus 9 data were generated and v v plotted for systems VA and VP, using the two competing schemes. These are presented i n Figure 3-16. The curves of Figure 3-16 r e f l e c t the observed behaviour and they led to the conception of Scheme 5. Scheme 5: Step 1: Apply Scheme 4. -88-schemes 3 and 4 -89-Step 2: I f the value of 6° from Step 1 i s greater than 0.5, then apply Scheme 3. As expected, Scheme 5 was the best of them a l l , and the r e s u l t s presented i n the next section are based on this scheme (A few other r e s u l t s , based on terminal i n i t i a l i z a t i o n , are also presented for comparison). 3-2-6 Applications In the r e s u l t s presented here and i n any other section of t h i s chapter, the convergence c r i t e r i o n used i s 1 ! |v" - v?- 1! < 10" 4 N i = l 1 Each of the s i x formulations was applied to each of the 16 systems at 19 points d i s t r i b u t e d approximately uniformly between 6 =0.05 and 9 =0.95. For each of the f i r s t four formula-v v tions, both Newton's and Richmond's methods were employed i n ac c e l e r a t i o n . Only the Richmond method was applied to the ^-normalized methods. In applying i n i t i a l i z a t i o n Scheme 5, 6° was constrained between 0.05 and 0.95. The r e s u l t s are presented i n Table 3-2. To show how much more e f f i c i e n t this i n i t i a l i z a t i o n scheme i s compared to the simple terminal i n i t i a l i z a t i o n , the r e s u l t s obtained by applying terminal i n i t i a l i z a t i o n (8^ = i.o) to the standard method have also been included. Table 3-2 Computation time (CPD seconds) for double-loop univariate algorithms System Proposed initialization with I Newton I 'roposed init :ializatioi I with Rj chmond Terminal i tion with Lnltializa-stand.form Standard Standard Logarithmic Rachford-Rice Barnes-Flores Standard Standard Logarithmic Rachford-Rice Barnes Flores ^-normal-ized 1 ^-normal-ized 2 Newton Richmond VA 0.9549 0.9977 1.0243 1.0231 0.9161 0.8954 0.9022 0.8980 0.9079 0.8813 1.1110 1.0169 VB 0.6432 0.6641 0.6255 0.6333 0.6257 0.6370 0.6399 0.6682 0.6487 0.6618 1.0743 0.9156 VC 1.1844 1.2021 1.0948 1.1247 1.1398 1.1639 1.1698 1.1957 1.1556 1.1684 1.9364 1.6105 VD 1.3679 1.3522 1.2152 1.2245 1.2393 1.2389 1.2106 1.2043 1.1646 1.1793 2.3183 1.6690 VE 1.1336 1.1534 1.1990 1.1550 1.1934 1.2067 1.1736 1.1590 1.1863 1.1495 2.2575 1.9408 VF 1.1246 1.1363 1.0654 1.0459 1.0932 1.0917 1.0607 1.0660 1.1169 1.0568 2.0782 1.6829 VG 0.9748 0.9891 0.9784 0.9606 0.9911 0.9897 0.9716 0.9652 0.9996 0.9842 2.1553 1.9070 VH 1.2832 1.2864 1.2850 1.2793 1.3092 1.3061 1.2869 1.2742 1.3060 1.2692 2.3846 1.9826 VI 1.0242 1.0349 1.0095 0.9994 1.0427 1.0568 1.0223 1.0087 1.0431 1.0242 1.7549 1.5226 VJ . 1.4401 1.4418 1.2869 1.2732 1.3482 1.3807 1.3209 1.3440 1.3555 1.3168 2.3292 1.8480 VK 0.9330 0.9196 0.8809 0.8884 0.9099 0.9343 0.8834 0.8898 0.8906 0.8669 1.6487 1.3901 VL 0.6187 0.5883 0.5741 0.5877 0.5474 0.5626 0.5659 0.5735 0.5592 0.5623 1.2973 0.6667 VM 0.6275 0.5853 0.5827 0.5889 0.5765 0.5891 0.5797 0.5845 0.5724 0.5822 1.1685 0.6791 VN 0.6361 0.6162 0.5954 0.6144 0.5872 0.6192 0.5941 0.5848 0.6063 0.6038 1.4750 0.6985 VO 0.6114 0.5772 0.5589 0.5828 0.5689 0.5918 0.5557 0.5519 0.5478 0.5439 1.2307 0.6574 VP 0.8405 0.7904 0.7707 0.7725 0.7802 0.7929 0.7637 0.7777 0.7658 0.7638 1.7977 0.9000 I 15.3981 15.3350 14.7567 14.7537 14.8688 15.0566 14.7010 14.7455 14.8263 14.6144 27.9976 21.0877 - 9 1 -3-2-7 Deductions From the results i n Table 3-2 as well as those r e s u l t s for term-i n a l i n i t i a l i z a t i o n that have not been presented — p a r t l y because of space and p a r t l y due to the f a i l u r e s previously reported — the follow-ing deductions have been made: (1) The chosen i n i t i a l i z a t i o n scheme seems to be quite r e l i a b l e since there was no single case of f a i l u r e i n a l l the points (a t o t a l of 2,432 points) to which i t was applied. (2) The adopted I n i t i a l i z a t i o n scheme r e s u l t s i n a tremendous saving i n computation time, compared to the t e r m i n a l - i n i t i a l i z a t i o n approach (f o r example, using the standard formulation: 27.9976 seconds versus 15.3981 seconds with Newton's method; 21N.0877 seconds versus 14.8688 seconds with Richmond's method). (3) While the Richmond acceleration method far outclasses the Newton method when terminal I n i t i a l i z a t i o n i s employed (compare 27.9976 seconds versus 21.0877 seconds for the standard formulation), with the adopted i n i t i a l i z a t i o n scheme the difference becomes quite small (15.3981 seconds versus 14.8688 seconds for the same formulation above). (4) The observation previously made regarding the r e l a t i v e performance of the logarithmic and the nonlogarithmic formulations i s found to s t i l l hold true. (5) The adopted i n i t i a l i z a t i o n scheme also has the e f f e c t of eliminating the s i t u a t i o n whereby the r e l a t i v e e f f i c i e n c y of a method depends on the l o c a t i o n of the s o l u t i o n . -92-(6) The ^-normalized methods give just about the same performance as the other methods, with method 2 being s l i g h t l y better than the Rachford-Rice method. With the proposed i n i t i a l i z a t i o n scheme, i t becomes quite d i f f i -c u l t to choose from amongst the d i f f e r e n t methods. On the average, (^-normalized method 2 has a narrow edge over the other methods. 3-3 Free—Energy Minimization Methods The free-energy minimization methods involve determining the equilibrium point of an isothermal, i s o b a r i c system by fi n d i n g the point at which i t s Gibbs free energy i s a minimum. A good number of algorithms e x i s t for e f f e c t i n g the free-energy minimization. Such algorithms are generally formulated for multiphase chemical e q u i l i b r i a with possible applications to non-reacting systems. Noteworthy works i n the a p p l i c a t i o n of this p r i n c i p l e include those of White et a l . (1958), Clasen (1965), Dluzniewski and Adler (1972), Ma and Shipman (1972), Eriksson and Rosen (1973), Eriksson (1975), George et a l . (1976), and Gautam and Seider (1979). A comparative study of the major algorithms was recently under-taken by Gautam and Seider (1979), and the conclusion was that the RAND method as implemented by Dluzniewski and Adler (1972) should be given a f i r s t - p l a c e consideration. The RAND method has been developed here for the s p e c i f i c case of vapour-liquid phase equilibrium. But because the method, i n i t s o r i g i n a l form, was found to be rather i n e f f i c i e n t when applied to two-phase e q u i l i b r i a , a modified version of i t has been developed. The problem has also been studied from the point of view of -93-geometric programming. The report includes two methods that were developed for accelerating successive-substitution i t e r a t i o n s . The methods have been remarkably successful and could r e a d i l y f i n d a p p l i -cations i n other areas of problem-solving. A method based on s e n s i t i -v i t y analysis — the development of which i s presented i n Chapter 4 — i s also included. 3-3-1 General Theory The t o t a l Gibbs free energy, of a vapour-liquid system i s given by Vi-I>" lml < V i v + V i L > ( 3 - 1 9 > i s r elated to the p a r t i a l fugacity, f^, i n the same phase by f, p. = p° + RT£n(—) 1 1 f i Defining G = G^/RT, we have G(v,l) = I { v . [ ^ + £ n ( % ] -f 1 + i n ( % ] } (3-20) i = l RT f ? 1 RT f° i v i L Substituting Equations (3-2a) into Equation (3-20), r e c a l l i n g that f ° v = 1 (by d e f i n i t i o n ) , and u t i l i z i n g the d e f i n i t i o n of x^ and i n molar terms, we have o o N u v y 1 G(v,l) = I {v [ — + *n(<f>.P-^-) + l . [ — + * n ( Y . — ) ] } (3-21) i=l RT fy. RT l l . • 3 • 3 3 3 Thermodynamic theory requires that G assume a minimum value at equilibrium, and what the free-energy minimization methods do i s employ - 9 4 -some optimization technique to determine the values of v_ and 1^ that correspond to that minimum — subject to v + 1 = Z ( i = 1,2,....N) (3-22) and 0 < v < Z ( i = 1,2,...,N) (3-23) 3-3-2 The RAND Method The RAND method combines Newton's optimum-seeking technique with Lagrange's penalty method of handling constraints (Himmelblau, 1972). F i r s t , G i s approximated by a quadratic Taylor expansion, G , about the current point, {v_n, l n } , thus: G a ( v , l ) = G ( v n , l n ) + I {|£(v - v " ) + | f ( l - i")} j=l j J J j J 1 N N 9 2G + 2 ^ , ^ f e ( V J " V j ) ( \ " Vk> 2=1 k=l J k + § O I , ( 1 j " ^ \ - W (3"24) J k J where the derivatives are evaluated at {v_n, _l n} and do not take into consideration the dependence of and T on and 1^ r e s p e c t i v e l y . D i f f e r e n t i a t i n g Equation (3-21), we have o If = # + * n * j p y i . < 3" 2 5> 3 2 6 A 9 G k 1 3 k 3 0, for k * j where 6^ = { 1, for k = j The derivatives with respect to the liquid-phase composition are - 9 5 -obtained from Equations (3-25) and (3-26) by replacing v by 1, V by L, and <f> .Py . by Y .x .. 3 3 3 3 A combination of Equations (3-24) and (3-26) yi e l d s G a ( v , l ) = G ( v n , l n ) + H(^+ t n ^ X V j - v n) V°T , N N 6 . J j J J ^ , = 1 k = 1 v n v n j J The constraint Equations (3-22) are incorporated i n Equation (3-27) by means of Lagrange m u l t i p l i e r s u j ( J = 1»2,-»«,N) to give the Lagrangian function N F(v,l,u) = G a ( v , l ) + I u (Z - v - 1 ) (3-28) j=l J J J 3 The d i r e c t i o n of search for the minimum i s given by the vector l i n k i n g {v n,.l n} with the point at which VF(_v,_l,u) = 0. Evaluating VF from Equations (3-27) and (3-28) and equating to zero y i e l d s -h 0 = B —u (3 0 K Av B —V A l 0 -h u i l -29) -96-where ^ i s an N x N i d e n t i t y matrix; A l i s an N-element vector whose 1th element i s 1 - l n ; j j ' Av i s defined i n a way si m i l a r to Al j B i s an N-element vector whose ith element i s -Z .; ~u 3 3^ i s an N-element vector whose j t h element i s - y° /RT - An^y"; B_^ i s an N-element vector whose jth element i s o ,„„ . n n - p.T/RT - AnY.x.; J J A^ i s an N x N matrix whose elements are given by . \ i jk v . " V 3 and A^ i s defined i n a manner s i m i l a r to A v, with v and V replaced with 1 and L resp e c t i v e l y . With {Av . A l J obtained from Equation (3-29), a new value of {^.lj i s determined from h n + 1>l n + 1} = { A l " } + X{Av n,Al n} (3-30) A Golden-section search (Himmelblau, 1972), i s implemented to determine X*, the value of X within the l i m i t s X , < X < X which min — — max minimizes G as defined by Equation (3-21). X and X are min max the values of X that ensure that the mass-balance constraints and the p o s i t i v i t y r e s t r i c t i o n s are not v i o l a t e d . 3-3-3 The Modified RAND Method The RAND method has two l i m i t a t i o n s that c a l l e d for the need to seek a suitable modification. One of these i s the requirement of -97-standard Gibbs free energies, which are not normally available as functions of temperature. The other l i m i t a t i o n i s the high dimensionality of the f i n a l objective function that has to be minimized. For a system consisting of N components, there are 3N independent v a r i a b l e s . (Going s t r i c t l y by the formulation of Dluzniewski and Adler, there would have been 3N + 2 such variab l e s , since V and L would also have been treated as independent variables.) This involves the inversion of a matrix of the same dimension. The modification discussed below has the following e f f e c t s : (1) I t eliminates the standard Gibbs free energy. (2) I t reduces the number of independent variables to N. (3) I t does away with the matrix inversion. E l i m i n a t i n g 1 between Equations (3-21) and (3-22) and rearranging, we have N u°. u ° <j>.P v. Z. - v. G (^> • J V J RT + 1«T^> + £ n v i - l«-hrr>] N Z - v N u° + Z i [ * n ( - F ^ r > + 4 ^ ± ] + J ^ i - i f < 3" 3 1> Since the l a s t term on the right-hand side of Equation (3-31) i s a constant for any isothermal system, i t does not aff e c t the shape of the G(v) p r o f i l e . I t can therefore be ignored. Further using the fact that o o y v i - U L i o = - £nf (see Section 3-3-4 for proof) RT and introducing K 4, we now have -98-N v. Z g ( v ) = I v [-AnK + Arr-i- - £n(4" i=l 1 1 V F - v. N Z - v. + J Z J £ n ( p - V X ) + £ n Y J (3-32) N where g(v) = G(v) - £ Z.u° /RT 1=1 1 L ± From Equation (3-32): 9 j _ = -9v and a2g AnK. + An(-i) 3 x. k k 9v . 9 v , v . Z . - v . V F - V J k j j j where 6^ is as defined in Equation (3-26). The quadratic Taylor-series approximation to Equation (3-32) then becomes N y n F(v) = G a(v) = g(v n) + I £n(—i)(v - v n) j=l K.x. J J 3 3 1 N N 6 i , 6 i , 1 i + i j X[—+ ! £ — - i - - J L _ ] . 2 J - l k-1 v n Z. - v n V n F - V n J J J (3-33) (3-34) (v . - v .)(v k - v k) Setting VF(v) = 0 leads to A Av = B (3-35) (3-36) where Av is the N-element vector whose jth element i s v - v n; J 3 -99-i s an N-element vector whose j t h element i s in K nx n 1 1. n 7 J and A i s an N x N matrix given by ,2 i j 3V.9V, with the second p a r t i a l d erivative as v=v defined i n Equation (3-34). The search d i r e c t i o n i s determined by solving Equation (3-36) for Av and a new value of _v i s given by n+1 n . *. , „ „_, v_ = v + U v (3-37) where A*, determined as previously described, s a t i s f i e s the condition 0 1 v j £ Z j (J = 1. 2, ...,N) A comparison between Equations (3-36) and (4-6) shows that they are i d e n t i c a l , with A = J(v) and B = A£nK I t w i l l be shown i n Section 4-2-1 that the matrix inversion step can be eliminated i n equations of this form and Equation (3-36) manipulated to y i e l d I( v n l n Av - - L i i Z, 13 J J=l 1 ) N x .y. 1 " I <-A + B. (3-38) U j-1 ~i In implementing the modified RAND method, two schemes were adopted. -100-Scheme 1 Equation (3-37) i s solved using the o r i g i n a l approach of ft Dluzniewski and Adler whereby the optimal value of X i s a c t u a l l y solved f o r . Scheme 2 This i s tagged the 'Broyden-modified RAND method' and i t 0 involves a step-limited search as proposed by Broyden (1965) i n his work on quasi-Newton methods. With this method, the unidimensional search on the X-axis i s terminated as soon as a value of X i s encountered such that G(v n + XAv) < G(v n) 3-3-4 A Geometric-Programming Formulation For the convenience of the reader who might want to r e l a t e the following derivation to the geometric-programming theory presented i n Appendix C . l , the following symbols have been temporarily introduced: w = v, wT = 1, W = V, WT = L and w = (w , 1, v}. —v — —L — v L — 1 o — —' A l l other uncommon terms used i n this section are defined i n Appendix C - l . According to Equation (3-20), N ° ° G " H ' J j T * + » L 1 [ ^ + * . ( T t &]} (3-39) i=l v L Define C = w =1, o o F(w) - (C /w ) W° exp(-G), — o o ^o C i v • 6 X P ( -- 1 0 1 -and C i L - I exp(^) Then Equation (3-39) becomes ' C F(w) = U Wo O N C W L i \~C. ~ { n -it _iy_ i = l L W L i J |_ Wvi _ w vi WT W } w w v L v (3-40) Define a o j = -Z. (j = 1, 2, ...,N) and ijv, ijL 1, for i = j (3-40a) 0, for i * j Combining these definitions with the mass-balance relationship [Equation (3-22)] leads to N a -w + I (a, . w + a w ) = 0 oj o ijv vi ijL LiJ (3-41) A close comparison of Equations (3-40) and (3-41) with the Dual-Geometric-Program formulation in Appendix C - l reveals that they are identical for a two-phase system, with in Equation (C-6) = C q in Equation (3-40), no = 1> n l " n2 = N» and I w J = w = 1 (the normality condition). iej(o) 1 ° The positivity condition in the Appendix is, of course, also satisfied by virtue of the physical definition of w . Thus, the formulation is complete and the solution to the problem is given by the value of w that maximizes Equation (3-40) subject to Equation (3-41) and positivity restrictions on w. By the definition above, the exponent matrix l a^j} is given by -102-N N (3.42) where Z = {z^ z 2, ...,ZN} and I N i s an N x N i d e n t i t y matrix. A f i r s t step to solving the dual problem i s to obtain N vectors of dimension 2N + 1 which are orthogonal complements of each column of {a^j}. This i s achieved through the following operation on {a^} (see Duff i n et a l , 1967, Chapter 3): -z h upper segment h (Interchange rows '1' and 'N+l* and V -z p a r t i t i o n into upper segments.) and lower 7 Lower segment (Extract the negative transpose of lower segment) ^ -I N -103-Append an (N+l) dimensional i d e n t i t y matrix below the l a s t row) T Z -I N N+l (Interchange rows '1' and 'N+l') 1 0 = {b(J>} 0' I. where 0_ and ()' are N-element row and column n u l l vectors respectively. The matrix {b^jp} has columns which are orthogonal with the columns of l ^ j } - Furthermore, i t s f i r s t row s a t i s f i e s the normality condition as required: n £l±o l o Hence i t furnishes us with a normality vector: b ( o ) = { i , z l f z 2,...,z N, 0, 0 } T , and N n u l l i t y vectors b^> through b<N> with b<J> _b V J / given by -1, for i = j + l 1, for i = N + j + 1 0, for other i values - 1 0 4 -The general so l u t i o n to the dual program, expressed i n terms of basic v a r i a b l e s , r ( j = 1,2,...,N), i s w = b ( 0 ) + I r . b ( : , ) j-1 2 By introducing the b vectors into Equation (3-43), we obtain and w L i = Z i ~ r i W v i • r i _| ( i = 1,2, ,N) (3-43) (3-44) Equ i l i b r i u m requires that 8£nF(w) 3r = 0 ( j = 1,2,...,N) (3-45) A combination of Equations (3-40), (3-44) and (3-45) y i e l d s C . w . WT jv = v j L C .T W * wT . jL v L j From the d e f i n i t i o n of C . and C „ , we have jv JL' / o o . C. y . (u . - p. ) -JI. = - J _ ^ x p { - ^ j v _ i C.T ^ T P ^ X P 1 RT ; JL J (3-46) (3-47) From the basic d e f i n i t i o n of the chemical p o t e n t i a l (Smith and van Ness, 1959): p° = 9 .(T) + RT£nf ° JL J v JL (3-48) and p° = 8 .(T) + RT£nf° jv 3 Jv (3-49) subtracting Equation (3-49) from Equation (3-48) and using the fact that f° = 1, we have jv o o ^- IL ~ ^ i v . RT * n f j L (3-50) -105-Combining Equations (3-46), (3-47) and (3-50), one obtains y -f°T w . WT j J L oi K «. _2Ll Ji = _ 1 k_ (3-511 Equation (3-51) i s , of course, the equilibrium r e l a t i o n = Y^x^ The above outcome of the geometric-programming a p p l i c a t i o n i s s i g n i f i c a n t for two reasons. F i r s t , i t shows conclusively the equivalence of the mass-balance and the free-energy-minimization methods. Secondly, i t reveals that the values of r^ [and hence V j , from Equation (3-44)] that s a t i s f y the N equilibrium equations automatically s a t i s f y the (2N + 3) equations that are involved i n the mass-balance formulation. A single i t e r a t i o n i s a l l that i s necessary to solve the N equations represented by Equation (3-51) — as opposed to the double i t e r a t i o n s required for the class of algorithms studied i n Section 3-2. What i s needed then i s an e f f i c i e n t , convergent method for solving the N nonlinear equations. 3-3-5 Seeking a Solution Method for the Geometric-Programming Problem (GPP). I f we eliminate 1 V and L from Equation (3-51) and rearrange the outcome, we would have N N K.(Z. - v ) I v . - v { F - I v.] = 0 ( i = 1,2,...,N) (3-52) j=l J j=l J For the purpose of testing the performance of d i f f e r e n t s o l u t i o n techniques on the above equations, a hypothetical binary system with composition-independent K values was chosen. The problem was tackled using three so l u t i o n techniques: the Newton-Raphson i t e r a t i o n method, -106-the method of continuity, and a successive-substitution method. The Newton-Raphson Method: Check functions were defined by N N F. - K.(Z. - v-) J v . - v { F - I v.}, (i=l,2,...,N) (3-53) I 1 1 1 j-1 2 1 j-1 2 Then by the Newton-Raphson technique (Henley and Rosen, 1969); n+1 n —1. n x n x ,„ ~ i \ _v = ;y_ - J (v_ )»F(v ) (3-54) where J *(v_n) denotes the inverse of the Jacobian matrix of J_ with respect to v_ at the point v_n. When the method was applied to the sample problem, i t was found to give f a u l t y convergence to the t r i v i a l solutions at either v = 0 or v = Z. The Method of Continuity: For the purpose of applying the method of continuity (Perry and Ch i l t o n , 1973), Equation (3-52) was rearranged to give N N (K Z.-F)v + K Z I v.+ (1-K )v I v. = 0 (i=l,2,...,N) I I 1 1 j * i 2 1 j=l 2 Then F^ was defined by N N F, = (K Z -F)v + K Z I v. + X(l-K )v £ v. = 0 (i=l,2...,N) (3-55) i i i i i lp± j i i j = 1 j Treating v ( j = 1,2...,N) as functions of X and d i f f e r e n t i a t i n g Equation (3-55) with respect to X, we have N 8F dv 8F H^r -df] +-9r= 0 <i=1>2 N> (3-56> j=l J -107-A rearrangement of the set of r e l a t i o n s represented by Equation (3-56) leads to where J - 1 ( v ) i s as defined i n Equation (3-54). With v_ i n i t i a l i z e d by solving Equation (3-55) with X = 0, Equation (3-57) i s integrated numerically between the l i m i t s X = 0 and X = 1 to give the desired value of v. When this method was applied to the sample problem, the r e s u l t was f a u l t y convergence to the t r i v i a l s o l u t i o n ^_ - 0_> The Method of Successive Substitution: For convenience, l e t us define N A = I v (3-58) Then, a rearrangement of Equation (3-52) y i e l d s (1 " K ± ) v 2 - [F - Z 1K ±- (1 - K 1 ) A ± ] v ± + K iZ 1X 1 = 0 (3-59) The method of successive s u b s t i t u t i o n (see, for example, La Fara, 1973) i s applied to Equation (3-59) by tre a t i n g i t as a quadratic function of and choosing the root that l i e s between 0 and Z^. When the above method was applied to the sample problem, i t converged to the desired solution — a l b e i t s l u g g i s h l y . Out of the three solution-methods discussed above, the successive s u b s t i t u t i o n method was chosen for further i n v e s t i g a t i o n . Five arrangements of the equations were studied and three acceleration methods were investigated. -108-3-3-6 Various Successive-Substitution Arrangements of the GPP Arrangement 1: Represented by Equation (3-59) Arrangement 2: This is aimed at avoiding the large number of • conditional statements involved in the programming of Arrangement 1. is updated from K.Z.(A°+v") vf" 1 = i (3-60) F + ( K.-l ) ( x £ + vj) Arrangement 3; Equation (3-60) is rearranged to absorb in the explicit term the in the right-hand-side numerator. The result is »»« f i f £ _ (3-6!) F + (K ± - l)(Xj + v n) - K ±Z 1 Arrangement 4: Equation (3-59) is equated to the check function f(v^) and updated by the Newton method, _. n. f ( v ) v f 1 = v? — V <3-62> 1 1 f(vj) where 9f(v.) 9v v i i -109-Arrangement 5: This i s s i m i l a r to Arrangement 4 except that the Richmond method i s employed, thus n+1 n 2 f ' < v f t f « f r v. = v (3-63) 1 1 2 [ f ( v n ) ] 2 - f ( v n ) f " ( v n ) where £.(VJ) - i n 9v v i 1 3-3-7 Accelerating the GPP by Hyperplane L i n e a r i z a t i o n This method i s due to Barreto and Farina (1979). In i t s basic form, i t involves l o c a t i n g , by successive s u b s t i t u t i o n , N points on each of the N hypersurfaces defined by Equation (3-59). The following steps are involved: (1) Choose a v . s e t 1 = 0. —o J (2) Applying successive s u b s t i t u t i o n to v_.t generate v —j+1 . Test for convergence. I f the outcome i s p o s i t i v e then terminate the i t e r a t i o n . Otherwise, go to Step 3. (3) Increment j . If j < N then go to Step 2. Otherwise go to Step 4. (4) Determine v_D, the i n t e r s e c t i o n of the N hyperplanes that are defined by the points located on the hypersurfaces, from -2. D O . . — Z v f = v - AR «A R »Av - 1 1 0 -where -2 A R i s the inverse of AR - AR , and -1 ARQ = {A^, Av x, Av,,,..., A v ^ } , AR i = {A^, Av 2, , A V i } , A ^ " " vj ( j = 0,1,..., N-1) (Since a knowledge of v^ ±s n o t necessary for i t s update when j = 0, v_P and a l l the vectors involved i n i t s determination exclude the f i r s t component — to save on computation time). (5) Set v p = v N 1 , \>Q = v_p and j = 0. Go to Step 2. The authors of the above acceleration method proposed two modifications that were aimed at reducing the number of successive-s u b s t i t u t i o n i t e r a t i o n s . One involves employing N i n i t i a l points, using each of these points for a successive-substitution step, and u t i l i z i n g the r e s u l t i n an acceleration step; t h i s being followed by an acceleration step after every successive-substitution i t e r a t i o n . The second modification takes the same form as the basic algorithm up to the f i r s t a c c e l eration step; i t then follows the pattern of the f i r s t m o d ification a f t e r that. While the basic algorithm showed s t a b i l i t y and r e l i a b i l i t y when applied to a number of systems, the modifications performed poorly and were therefore not studied further. The hyperplane l i n e a r i z a t i o n method has two major shortcomings: (1) There are N successive-substitution i t e r a t i o n s between - I l l -accelerations. For large values of N, the low acceleration frequency could slow down convergence appreciably. (2) I t involves a matrix inversion at every acceleration step. In the in t e r e s t of computation time, this i s an operation that were better avoided. The two acceleration methods proposed i n Section 3-3-8 below are without these defects. 3-3-8 Accelerating the GPP by Vector P r o j e c t i o n The two vector-projection acceleration methods proposed here require only one successive-substitution i t e r a t i o n between acc e l e r a t i o n steps. And i n addition to not requiring matrix inversion, they are — by comparison to the hyperplane method — easy to implement. While the f i r s t of the two, tagged 'tr i a n g u l a r - p r o j e c t i o n method', requires two i t e r a t i o n s before the f i r s t a c c e l e r a t i o n step, the second method — the 'tetrahedral-projection method' — requires three such i t e r a t i o n s . The Triangular-Projection Method In developing the method, we s h a l l define two N-dimensional Euclidean vector spaces. One we s h a l l c a l l the 'solution vector space' and the other we s h a l l r e f e r to as the ' d i s p a r i t y vector space'. A c h a r a c t e r i s t i c p o s i t i o n vector w i l l be denoted by and i t w i l l be the r e s u l t of applying successive s u b s t i t u t i o n to the vector v_. The corresponding d i s p a r i t y vector w i l l be represented by f_ and w i l l be defined by Now supposing that we have located two points, v and -si v , i n the vector space — the res u l t s of applying successive —sz s u b s t i t u t i o n to two points, v_ and v_ re s p e c t i v e l y . I f we * denote the solu t i o n which we are seeking by v , the philosophy of s the t r i a n g u l a r - p r o j e c t i o n method i s to employ our knowledge of the points v and v _ i n loc a t i n g a point v which i s closer s JL S£ sn * to v than both v and v „. —s — s i —sz Let us consider the t r i a n g l e whose v e r t i c e s are the points ft v , v and v (see Figure 3-17). v the desired point, i s —s 1 —s2 ~~s —sn' ' ft such that v v i s perpendicular to v v . But then, a problem —s -sn — s i - S 2 a r i s e s : to locate v , we need to know the p o s i t i o n of v which — f i n — ~ S ' we are completely ignorant of or we would not be t a l k i n g of loc a t i n g v —sn i n the f i r s t place. To overcome this problem, l e t us turn to the d i s p a r i t y vector space. There i s a one-to-one correspondence between v and f, and —s — * * corresponding to the point v^ i s the point f_ = (). I f we map the construction of Figure (3-17) onto the f-space, what we have i s Figure (3-18). Since we know that f_ i s the n u l l vector, we can e a s i l y determine f . —n Let us r e l a t e v , v and v by some parameter a according to —sn — s i —sz the equation v = av + (1 - a) v (3-65) —sn — s i — s i v ' 112a-Leaf 113 missed in numbering FIG 3-18: DISPARITY - SPACE TR IANGLE - 1 1 5 -Then, by s i m i l a r i t y , f = of + (1 - a) f (3-66) —n — l —z From Figure (3-18), a = -d/c. Now, -d = aCosB and from the cosine formula, _ „ a + c - b CosB = = 2ac Hence, a 2 + c 2 - b 2 & + ( i 2 - i i > T ( i 2 - i i > - £h a = 2 T 2 c 2 ( f 2 " - l ) The above r e l a t i o n s h i p can be s i m p l i f i e d further to y i e l d (1? " l i ) T Ly « = i 1 i (3_67) The implementation of the method involves the following main steps: (1) Assume v_ and determine • Compute f± and set v = v , . -2 - s i * (2) Determine and test for convergence. I f the outcome i s p o s i t i v e then stop; otherwise compute f_ . (3) Compute a from Equation (3-67) and from Equation (3-65). (4) Set f.= f , , v , = v and v„ = v . Go to Step 2. — 1 — 2 — s i —s2 —2 —sn - 1 1 6 -The above convergence method has the property of f o r c i n g convergence for an otherwise divergent i t e r a t i o n . I t i s i n t e r e s t i n g to note that i f we apply the approach to a unidimensional problem, Equations (3-64), (3-65) and (3-67) combine to y i e l d the Wegstein acc e l e r a t i o n r e l a t i o n s h i p (Wegstein, 1958) — a method which has been widely applied to univariate problems and which i s known to possess convergence-forcing properties. The Tetrahedral-Projection Method; The tetrahedral-projection acceleration method follows the same basic philosophy as the t r i a n g u l a r - p r o j e c t i o n technique. The only difference l i e s i n the number of points employed i n the projection: the tetrahedral projection method requires three points. Assume that we have located i n the so l u t i o n vector-space, three points ^ 2 a t u* — r e s u l t i n g from successive s u b s t i t u t i o n on V. , v_ and _v r e s p e c t i v e l y . The points v v and v together with * the unknown solu t i o n form a tetrahedron. Since our knowledge i s * l i m i t e d to the plane of v . , v 0 and v the nearest point to v * that we can locate i s the image of on t h i s plane. Let this be denoted by v and l e t i t be related to the three known vectors by —sn J v = p v + P v + P v -sn 1-sl 2-s2 3-s3 (3-68) To determine P^, a n <* ^3» w e consider the f-space t e t r a -* * hedron f^fgfgf. » s n o w r l schematically i n Figure (3-19). f_ i s - 1 1 7 -FIG 3-19: DISPARITY - SPACE TETRAHEDRON. -118-again the n u l l vector. From s i m i l a r i t y , i t follows from Equation (3-68) that f - P f + P f + P f (3-69) —n 1—1 2—2 3—3 Let us consider Figure 3-20, extracted from Figure 3-19 with tu rectangular coordinates as defined. It can be shown that a2 + d 2 _ e2 ( f t - | _ 2 ) T f x a = — — 2 * 2 ( l l - 1 2 ) T ( l l - 12> g = c^ + e 2 - h 2 _ ^ 2 ~ h ^ h 2 c 2 ( f 2 - f 3 ) T ( f 2 - f 3 ) , b2 _ a 2 c 2 and CosB = -2ac Employing the above information and applying basic mathematical p r i n c i p l e s to Figure 3-20, i t can be proved that: (a) The l i n e which the vector ^12^.3 * S 3 P a r t * s represented on the tu coordinate system by t = aa (3-70) (b) The l i n e which has the vector f 0 0 f for a segment has a —15—n mathematical i d e n t i t y on the tu plane given by u = aCotB + gcCosecB - tCotB (3-71) -119-FIG 3-20: DISPARITY - SPACE TETRAHEDRAL BASE. -120-(c) The point f_3 i s defined by {t,u} = {a + cCosB, cSinB} Using the above-listed f a c t s , i t can i n turn be shown that: (d) f 1 3 i s defined by {t,u} = {aa, (e) i s defined by {t,u} = {aa,[(l-a)aCotB + BcCosecB]} 2 2ct3. 2 2 2 ( f ) l is given by i = — — where Y = a + b - c f \ A A v Y[(1-OQ6 + 23c 2l (g) m i s given by m = — ^ ^—^ ^ — L a[4a c - 6 ] 2 2 2 Where o - b - a - c From Figure (3-20), we have: f_ 1 2 = «f 2 + d-a) lx (3-72) -13 = *-3 + -1 ( 3 _ 7 3 ) and f - mf., + (1-m) f 1 0 (3-74) —n —13 —12 I t follows from Equations (3-72) through (3-74) that f = [ l - a +(a-£)m] f, + a(l-m) f„ + JLmf. —n —1 —2 — J Hence, we have the ultimate r e s u l t s : P^ = 1 - a + (a-£)m P 2 = a(l-m) (3-75) P 3 = *m -121-where a,£ and m are as previously defined. The key steps i n the implementation of the method are: (1) Assume v and determine v „. Set v„ = v and determine —2 —s2 —3 —s2 v . Compute f. and f.. Set v = v . — s J —z —3 — —s3 (2) Using v, determine v and test for convergence. I f the out-s come i s po s i t i v e then terminate the i t e r a t i o n ; otherwise compute f. (3) Set = v s 2 , v g 2 - v ^ , v g 3 = v s , f , = f_ 2, f_2 = f.3 and and f_ = f . Determine v from Equation (3-68). —3 —n —sn (4) Set v = v and go to Step 2. — —sn 3-3-9 A Method Based on S e n s i t i v i t y Analysis The algorithm presented here i s based on the s e n s i t i v i t y analysis discussed i n the next chapter (see 'Predictor-Corrector Method 3' i n Section 4-6-3). The working equation (derived i n Chapter 4) i s given by v m l m i i N I J j - l m m. „ x i y i A £ n K j z . J Z. l 1 i »i mm N x .y . _ V JJ J 1. n n y i where AJlnK . = £nK . - Jln(-i) J -122-Superscript 'm' denotes a point such that v , for example, i s given by v m = v n + a ( v n + 1 - v n) (i=l,2,...,N) (3-77) where 0 < a < 1. The algorithm employed involves the following main steps: (1) v_, _1, _x and y_ are suitably i n i t i a l i z e d . (2) K i s determined and the corresponding AAnK computed. (3) With superscript 'm' replaced with 'n' i n Equation (3-76), v11"*"1 i s estimated. This i s then employed i n Equation (3-77) to determine v_m, using a = 0.5. The corresponding _ l m , x"1 and y_m are computed. (4) v_ n + 1 i s determined from Equation (3-76). (5) Convergence i s tested f o r . If the outcome i s p o s i t i v e , the i t e r a t i o n i s terminated; otherwise control i s transferred to Step 2. 3-3-10 I n i t i a l i z a t i o n Schemes Four d i f f e r e n t i n i t i a l i z a t i o n schemes, mostly based on the same lo g i c as those presented i n Section 3-2-4, have been studied here. For each of the schemes, K i s based on x = y = z. Scheme 1: v° = 0.5Z ± (1=1,2 N) This scheme, simple as i t i s , performed quite well with the GP algorithms. However, i t was unsuitable for the other methods because i t Kx implies x_ = y_ = z_ and this has a great e f f e c t on £n — , on which the convergence of these other methods strongly depends. - 1 2 3 -Scheme 2: This scheme defines v° by v° - Z i 1 1 + 1/K • 1,2,...,N) Scheme 3: Three steps are involved: Z. (a) Compute v = -1 + 1/K N (b) Compute V = £ v and L = F - V i=l i Z (c) Compute v° = ±- ( i = 1,2,...,N) 1 1 + — K.V l Scheme 4: In th i s scheme, 9° i s determined as i n Scheme 5 of v Section 3-2-4. v° i s then computed from o h V i = ^ o - (1=1,2,...,N) 1 + K.e° i v When the above schemes were applied to the various free-energy-minimization algorithms, Schemes 3 and 4 performed better than the other two. On the average, Scheme 4 gave the best showing for a l l the methods. I t has therefore been adopted i n a l l subsequent applications of the methods. 3-3-11 Applications and Deductions The f i r s t phase of the ap p l i c a t i o n of the algorithms presented i n Sections 3-3-2 through 3-3-9 was car r i e d out with two objectives i n mind: -124-(1) To test the d i f f e r e n t arrangements of the GPP so as to determine the most e f f i c i e n t arrangement; and to compare the performance of the unaccelerated successive s u b s t i t u t i o n implementation of the GPP with that of the accelerated version. (2) To compare the performance of the 'modified RAND algorithm' — that i s , with the unidimensional search on X car r i e d to within a tolerance of X — to that of the 'Broyden-modified RAND algorithm'. Six systems — VA, VI, VJ, VN, VO and VP — were chosen for the t e s t . The chosen systems were considered to be quite representative of a l l 16 systems, i n terms of b o i l i n g range, degree of nonideality, and mixture complexity as measured by number of components. The experimental design employed for the double-loop univariate methods was maintained and w i l l , of course, be sustained throughout the chapter. For the purpose of meeting Objective 1 above, the t r i a n g u l a r -p r o j e c t i o n method was used i n acc e l e r a t i o n . The r e s u l t s obtained are presented i n Table 3-3. The r e s u l t s lead to the following inferences: (1) The best GPP arrangement i s Arrangement 4, which involves applying Newton's method successively to the pseudo-univariate check functions. (2) The ac c e l e r a t i o n method applied here to the GPP does have a tremendous accelerating e f f e c t on i t s convergence. This i s e s p e c i a l l y so for narrow-boiling systems. (3) The 'Broyden-modified RAND' method i s far superior to the 'modified RAND' method i n terms of computation time. However, i t appears to be less stable. Table 3—3 Computation time (CPU seconds) for f i r s t phase of application of free-energy minimization algorithms System Differ mt GPP arrange jments with tr (.angular projei :tion Effect of acc< (with arrang jleration jment 4) The mod alg( Lfied RAND jrithms Arrangement 1 Arrangement 2 Arrangement 3 Arrangement 4 Arrangement 5 Unaccelerated Triangular Projection 'Modified RAND 'Broyden-Modlfied RAND' VA 0.8007 0.9065 0.7658 0.7727 0.7982 2.9079 with 94.7% non convergence 0.7727 1.8229 0.7342 VI 0.7925 0.9372 0.7583 0.7678 0.7985 2.0209 0.7882 5.3%Failure VJ 1.0463 1.0458 0.9403 0.9832 1.0001 2.3285 0.9393 VN 0.2799 0.3338 Failed 0.3210 0.3709 1.1868 0.4088 VO 0.2748 0.3333 Failed 0.3201 0.3521 1.1744 0.3957 VP 0.5175 0.4982 0.5974 0.4937 0.5269 0.7566 0.4937 1.5904 0.5576 I 3.7117 4.0548 3.6585 3.8467 10.1239 3.8238 -126-The second phase of the app l i c a t i o n was designed to involve a l l the 16 systems. Guided by the res u l t s obtained i n the f i r s t phase and the outcome of some preliminary tests on the methods not involved i n the f i r s t a pplications, the following methods were selected for i n v e s t i -gation: (1) GPP (Arrangement 4) accelerated by hyperplane l i n e a r i z a t i o n . (2) GPP (Arrangement 4) accelerated by triangular projection. (3) GPP (Arrangement 4) accelerated by tetrahedral projection. (4) The se n s i t i v i t y - b a s e d algorithm. (5) < The Broyden-modified RAND algorithm. (6) A combination of the s e n s i t i v i t y method and triangular projection. (7) A combination of the s e n s i t i v i t y method and tetrahedral p r o j e c t i o n . In the l a s t two methods, the successive-substitution block i n Methods 2 and 3 are replaced with the s e n s i t i v i t y method. The r e s u l t s , presented i n Table 3-4, lead to the following deduc-tions: (1) The two proposed vector-projection acceleration methods are far superior to the hyperplane-linearization method. The tetr a h e d r a l -p r o j e c t i o n method i s the better of the two for narrow-boiling systems, but returns s l i g h t l y worse times for wide-boiling mixtures. (2) The Broyden-modified RAND algorithm i s rather u n r e l i a b l e , recording an average f a i l u r e rate of 2.6%. (3) A comparison of the sens i t i v i t y - b a s e d algorithm with those that do not involve the s e n s i t i v i t y method shows that i t i s the f a s t e s t with narrow-boiling mixtures while i t i s more sluggish than the Table 3-4 Computation times (CPU seconds) for f i n a l comparison of free-energy minimisation algorithms System GPP-hyperplane l i n e a r i z a t i o n GPP-triangular projection GPP-tetrahedral projection S e n s i t i v i t y -based algorithm Broyden-modified RAND S e n s i t i v i t y with triangular projection S e n s i t i v i t y with tetrahedral projection VA 1.2712 0.7727 0.6931 0.6000 0.7342 0 .5460 0.5275 VB 0.9599 0.5861 0.5323 0.4696 0 . 5 4 4 4 * (15 .8% f ) 0.3744 0.3701 VC 1.7910 0.9390 0.8655 0.7961 0.9663 0 .6938 0.6405 VD 1.3114 0.6825 0.6882 0.6669 0.8346 0.6187 0.5601 VE 2.2041 1.1594 0.8689 0.6629 0 . 8086 * ( 5.3% f ) 0.5814 0.5822 VF 1.5942 0.8802 : 0.7959 0.6373 0.8385 ( 10 .5% f ) 0.5648 0.5457 VG 2.4796 0.8757 0.8403 0.5382 0.7395 1 .0365t 0 . 9 139 t VH 1.7547 1.0102 0.9061 0.7292 0 . 9 0 2 1 * ( 5 . 3% f ) 0.6353 0.6098 VI 1.4379 0.7678 0.6642 0.6113 0 . 7 8 8 2 * ( 5 . 3% f ) 0.5223 0.5331 VJ 1.7189 0.9832 0.9905 0.8070 0.9393 0.6627 0.6257 VK 2.1827 0.8012 0.6260 0.4772 0.6547 0 . 4 9 2 9 t 0 . 5 097 t VL 0.4307 0.3258 0.3333 0.4185 0.4158 0 .3203 0.3701 VM 0.4362 0.3275 0.3352 0.4315 0.4143 0 .3292 0.3545 VN 0.4204 0.3210 0.3284 0.4264 0.4088 0.3094 0.3405 VO 0.4421 0.3201 0.3250 0.4279 0.3957 0 .3175 0.3464 VP 0.6800 0.4937 0.5068 0.5843 0.5576 0.4391 0.4714 I 21.1150 11.2461 10.2997 9.2843 10.9426 (2 .6% f ) 8.4443 8.3012 * f = f a i l u r e t O s c i l l a t o r y convergence -128-others (except the GPP accelerated by hyperplane l i n e a r i z a t i o n ) for wide-boiling systems. (4) The algorithms that combine s e n s i t i v i t y with vector projection returned the best times for a l l the systems except f or systems VG and VK, the two systems with the narrowest b o i l i n g ranges (0.48K and 2.8K r e s p e c t i v e l y ) , for which they are found to display o s c i l l a t o r y convergence. 3-4 Single—Loop Univariate Methods The reason that the double-loop path i s often adopted i n the implementation of the univariate methods i s because, for s u f f i c i e n t l y nonideal systems, convergence may not be achieved i f the dependence of K on composition i s not i t e r a t i v e l y corrected for i n an inner loop. This second-level i t e r a t i o n consumes much time and undermines the advantage which the univariate methods have over free-energy minimization methods — that of having to contend with only one independent v a r i a b l e . This inves t i g a t o r believes that the second-level i t e r a t i o n can be safely disposed of, no matter the system involved, given a suitable i n i t i a l i z a t i o n scheme. In this section, single-loop v a r i a t i o n s of some of the univariate methods are studied. Some new methods are also introduced here. A l l the methods employ i n i t i a l i z a t i o n Scheme 5 of Section 3-2-5. 3-4-1 Richmond-Accelerated Methods The methods c l a s s i f i e d under this heading are drawn d i r e c t l y from Section 3-2. Aft e r a c a r e f u l assessment of the res u l t s obtained i n that section, the algorithms involving the Newton method and those - 1 2 9 -i n v o l v i n g logarithmic formulations have been l e f t out. Thus we have the following four methods ( a l l employing Richmond's a c c e l e r a t i o n ) : (1) The standard formulation. (2) The Rachford-Rlce formulation. (3) <t>-normalized method 1. (4) ^-normalized method 2. The key steps of a general algorithm are: (1) I n i t i a l i z e x, y, K and 9 . (2) Compute _x corresponding to the current values of K and 9 ^ from Equation (3-9). Compute y_ from y^ = K^x^ (3) Normalize x_ and y, and update K. Then recompute x and y_ as i n Step 2. (4) Test for convergence. If the outcome i s p o s i t i v e then terminate the i t e r a t i o n ; otherwise go to Step 5. (5) Update 9 ^ and go to Step 2. 3-4-2 Methods U t i l i z i n g the Mean-Value Theorem The methods discussed i n this section employ an acceleration method that i s based on the mean-value theorem (MVT) of d i f f e r e n t i a l calculus (for MVT, see Holland, 1975). The algorithm involved i s the same as that presented i n Section 3-4-1 above. The 9 ^ update i n Step 5 now involves ( a f t e r the nth i t e r a t i o n ) : (1) Computing f ( 9 * ) and f ' ( 9 ^ ) . a f ( 6 n ) (2) Computing 9 m = 9 n — . V V f»(9 n) v -130-where a, the MVT parameter, s a t i s f i e s the condition 0 < a < 1. (3) C a l c u l a t i n g (4) Updating 8 from In order to determine the best value of a to employ, a golden-section search technique (Himmelblau, 1972) was applied to systems VA and VP with a as the search v a r i a b l e and the sum of the number of i t e r a -tions (over 19 points for each system) as the objective function. The r e s u l t of the search i s plotted i n Figure 3-21 and i t leads to a choice of ct = 0.6. Two versions of the MVT algorithm were implemented: one i s based on the standard formulation of f(8 ) the other on the Rachford-Rice v formulation. 3-4-3 Wegstein-projected Methods D i f f e r e n t ways of applying the Wegstein acceleration method (Wegstein, 1958) to the vapour-liquid f l a s h problem have been developed and studied here. The general algorithm involves the following steps: s (1) I n i t i a l i z e x, y_, K and 8 . Determine 6^ through one of the d i r e c t - i t e r a t i o n methods discussed i n subsequent paragraphs. - 1 3 1 -100 • 99 H 98 | 97-"a CD 96 H 95 H 94 * • 1 1 1 1 1 1 r-0.0 0.1 0,2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 MVT parameter.a Fig 3-21: Golden-section search for optimal MVT parameter -132-Compute g from g = 6 s - 8 (3-78) v v Set g_ = g, 8 = 8 s and 8 =' 8 s 2 °' v2 v v v (2) Using the current value of 8 determine 8 s as In Step 1. v v v (3) Test for convergence. I f the outcome i s p o s i t i v e then terminate the i t e r a t i o n ; otherwise go to Step 4. (4) Compute g from Equation (3-78) and set g l = g2, g2 = g, e v l = e v 2 and e v 2 = ej (5) Define S2 " S l and compute 8 from v 8 = P8 + (1 - p)8 v v l v2 (6) Go to Step 2. Di f f e r e n t d i r e c t - i t e r a t i o n schemes for obtaining 6 , ar updated value of 8 were studied. A l l the schemes have the v following steps i n common: (a) Compute x_ from Equation (3-9) and y_ from y^= K^x^ (b) Normalize x_ and y_ and update K. (c) Using the new K, recompute x and y_. (d) Obtain 8 s from one of the schemes discussed below. v -133-Scheme 1: where In this scheme, we employ 0 S = 6 S t v v y (3-78a) N S y = 1 y i y i = l 1 and t i s some po s i t i v e exponent. Figure 3-22 shows p r o f i l e s exemplifying the influence of t on 0^ v* Q^. Figures 3-23 and 3-24 i n turn compare 6 y ( t = 1) and 8 (t = 20) for small and large © v f o r systems VA and VP. The curves reveal that the narrow-boiling system (VA) w i l l be favoured by a large t while the wide-boiling system (VP) w i l l do better with a small t. A method of computing t was t r i e d . I t was aimed at ensuring that for any given system, t s a t i s f i e s the following two conditions simultaneously: Condition 1: Condition 2: 0 s - 0 v v 0 s - 0 0 =0.05 v 0 =0.5 v 0.04 for S < 1 y 0.8 for S > 1 y < 0.4 Thus, i f we define 0.05 1, for S = 1 y 2.8332/^nS , for S > 1 y y -1.6094/^nS , for S < 1 y y - 1 3 4 -Fiq 3-22: 8 w.Q for different values of t for system VA at T corresponding to a v *035 -135-0 0.2 0.4 0.6 0.8 1.0 »• # v Fig 3-23: 0* v.Qy fort =1 and t = 20 for system VA - 1 3 6 -.0 - 1 3 7 -1, for S = 1 y and t 0.5 0.587787/£nS for S > 1 y -1.609438/^ nS , for S < 1 y y with S for t y 1 0.05 and t, 0.5 based on 0 =0.05 and v 0 =0.5 respectively, then The determination of t is done just before the first calculation of The t-profiles presented in Figure 3-25 resulted from applying the above method to systems VA and VP. The scheme was applied to systems VA, VI, VJ, VN, V0 and VP using: (1) The above t-fixing method (2) A constant value of t = 1. The second method was found to be better for the wide-boiling systems, and only slightly worse than the first for the narrow-boiling systems. The scheme was therefore adopted in the form It was also found that in computing x and y.for the purpose of updating K at each iteration, it is better to keep x and y_ in mass, rather than equilibrium, balance. They were therefore determined as follows: v 0S = 0 S v v y y i 1 + (K, - 1)0 » i v -138--139-i N s Scheme 2 This scheme involves determining 6^ from 9^ by applying Richmond's method to the standard formulation. Some plots of 8 v v versus 9^ based on t h i s scheme are presented i n Figure 3-26 for systems VA and VP. An attempt to replace the Richmond method with the Newton method i n this scheme was discouraged by the l a t t e r ' s poor performance with wide-boiling systems (see p r o f i l e s i n Figure 3-27). Scheme 3: This scheme i s s i m i l a r to the preceding one except that the Rachford-Rice formulation replaces the standard form. Both Newton's and Richmond's acceleration methods were t r i e d (see Figures 3-28 and 3-29) and the former was found to be u n r e l i a b l e . Scheme 4: This scheme combines the Rachford-Rice formulation with the mean-value theorem acceleration method. As the p r o f i l e s i n Figure 3-30 show, poor i n i t i a l i z a t i o n could lead to divergence. Scheme 5: Here, the Richmond acceleration technique i s applied to '^-normalized method 2'. 3-4-4 A Quadratic Form of Wegstein's P r o j e c t i o n Because the e f f i c i e n c y of an acceleration method generally increases with i t s order (compare: Richmond's and Newton's methods i n Section 3-2; tetrahedral and tri a n g u l a r projection methods i n Section 3-3), a quadratic form of the Wegstein projection method has been developed here. The method employs the three most current values of 9 s and g [defined i n Equation (3-78)] i n ac c e l e r a t i o n . -140-Fig 3-26: # v v.#v for the Richmond-accelerated standard formulation -141-Legend: System VA System VP * 6 L Fig 3-27: $ V S v. Ov forthe Newton-accelerated standard formulation -142-1.4-1.2-1.0 0.8H 0.6i to > CD A 0.4H 0.2H -0.24 -0.41 •0.64 — i 1 1 ;—i 1 1 1—: 1 1— Q1 0.2 0.3 0.4 0.5 0,6 07 '\0,8 OS Legend: System VA System VP - a Fig 3-28; 6y v. f9v for the Richmond-accelerated Rachford-Rice form - 1 4 3 -Fig3-29; (9%. 6 for the Newton-accelerated Rachford-Rice form -144--145-Let us represent the three most current values of 0s by v 8 ^ , 9 2 and 8^ and the corresponding values of g by g^, g^ and g^. Then to determine the point 8 ^ corresponding to g = 0, an a p p l i c a t i o n of Lagrange's i n t e r p o l a t i o n formula (Jenson and J e f f r e y s , 1963) leads to So So S i So S-i 8o 6 " r = r 9 i " -ATir 9 9 + r / eo ( 3 - 7 9 ) v 1 4>x 4>3 2 * 2 * 3 3 v ' where • l = S 2 " 8 1 , and $ 3 = g 3 - g 2 The value of 8 ^ obtained from Equation ( 3 - 7 9 ) i s used i n the next s d i r e c t i t e r a t i o n to determine a new 8 . v There i s only one d i r e c t i t e r a t i o n between accelerations. The algorithm requires the same main steps as are outlined i n Section 3 - 4 - 3 , except that three d i r e c t i t e r a t i o n s are required for the scheme to take o f f . At every stage, a f t e r a new 8 ^ i s computed, the following assignments are made: Q 1 = Q 2 ; 9 2 = V 6 3 = 6 v ' 8 1 = 8 2 ; 8 2 = 8 3 ; 8 , = 8 s - 8 . 3 v v In applying the method, d i r e c t - i t e r a t i o n Scheme 4 was used. This choice was based on the outcome of tests of the d i f f e r e n t schemes using the ( l i n e a r ) Wegstein acc e l e r a t i o n . - 1 4 6 -3-4-5 Applications and Deductions The various methods discussed in Sections 3-4-1 through 3-4-4 were applied to the 16 systems, using the same experimental design hitherto employed. The computation times obtained are presented in Table 3-5. It is significant to note that there was no single failure or oscillatory convergence. The results lead to the following inferences: (1) Of the four Richmond-accelerated methods, ^-normalized method 2 is the best. It has a thin edge over the Rachford-Rice formulation — it being better about 60% of the time. (2) The MVT acceleration scheme gives better results than the Richmond acceleration method. A comparison of the two methods for corresponding problem formulations shows that the former produces better computation times for every one of the systems. (3) The Wegstein-projected methods are generally superior to the other methods. (4) The proposed quadratic form of the Wegstein method is better than the linear form only 50% of the time; and i t yields an overall performance that is slightly worse, compared to the latter form. (5) Everything considered, the best performance is obtained with the Wegstein-projected form of the MVT-accelerated Rachford-Rice formulation. By way of comment, i t should be noted that the relative performances of the quadratic and linear forms of the Wegstein projection method depend very much on the nature of the function being considered. Although the linear form has turned out to be slightly more Table 3-5 Computation times (CPU seconds) for single-loop univariate algorithms System Richmond-accelerated Methods MVT-acce Metr lerated ods Wegstein-•projected Methods Quadratic Wegstein (+ MVT + Rachford-Rice) Standard Rachford-Rice •-normal-ized 1 •-normal-ized 2 Standard Rachford-Rice Scheme 1 Scheme 2 Scheme 3 Scheme 4 Scheme 5 VA 0.5553 0.5549 0.5490 0.5452 0.5433 0.5416 0.4885 0.4883 0.4763 0.4906 0.4725 0.4878 VB 0.4364 0.4071 0.3987 0.3973 0.4111 0.3804 0.3881 0.3824 0.3536 0.3530 0.3598 0.3434 VC 0.7619 0.7421 0.7376 0.7348 0.7480 0.7259 0.7601 0.6757 0.6943 0.6864 0.6943 0.6718 VD 0.6809 0.6801 0.6828 0.6855 0.6536 0.6536 0.5928 0.6529 0.6396 0.6176 0.6587 0.6438 VE 0.6895 0.6782 0.6869 0.6836 0.6652 0.6489 0.5582 0.6037 0.5855 0.5886 0.5999 0.6125 VF 0.6524 0.6552 0.6575 0.6482 0.6411 0.6433 0.6301 0.5598 0.5703 0.5674 0.5610 0.5946 VG 0.5728 0.5598 0.5614 0.5578 0.5451 0.5396 0.5494 0.5119 0.4850 0.4842 0.5007 0.4939 VH 0.7758 0.7881 0.7930 0.7817 0.7504 0.7569 0.6540 0.7393 0.7135 0.7039 0.7359 0.7507 VI 0.6441 0.6042 0.6043 0.6096 0.6265 0.5794 0.5335 0.5663 0.5443 0.5484 0.5554 0.5201 VJ 0.7785 0.7307 0.7428 0.7337 0.7438 0.7107 0.7268 0.6813 0.6557 0.6494 0.6681 0.6504 VK 0.5496 0.5556 0.5620 0.5492 0.5238 0.5346 0.5284 0.4683 0.4573 0.4685 0.5144 0.4483 VL 0.3878 0.3646 0.3657 0.3590 0.3576 0.3442 0.2963 0.3228 0.3256 0.3123 0.3248 0.3069 VM 0.3754 0.3655 0.3669 0.3740 0.3704 0.3489 0.2931 0.3300 0.3143 0.3072 0.3180 0.2989 VN 0.3858 0.3749 0.3727 0.3800 0.3670 0.3533 0.3040 0.3287 0.3223 0.3221 0.3358 0.3228 VO 0.3763 0.3636 0.3625 0.3590 0.3603 0.3361 0.3039 0.3237 0.3175 0.3127 0.3241 0.3132 VP 0.5067 0.4977 0.5059 0.4961 0.4897 0.4726 0.4322 0.4629 0.4468 0.4480 0.4563 0.4426 I 9.1292 8.9223 8.9497 8.8947 8.7969 8.5700 8.0394 8.0980 7.9019 7.8603 8.0797 7.9017 -148-time-efficient here, the quadratic form could prove superior with some other class of problems. 3-5 How the Different Methods Compare In this section, the best in the three broad classes of methods are compared. Attention is next turned on investigating the effect of varying the frequency of K-computation. The section is terminated with general conclusions on the contents of the chapter as a whole. 3-5-1 Applications and Deductions Based on the outcome of the studies reported in Sections 3-2 through 3-4, the final comparison was designed to involve. (1) The double-loop univariate approach based on '^-normalized method 2' and employing Richmond's acceleration technique. (2) The free-energy-minimization algorithm based on the sensitivity method accelerated by tetrahedral projection. (3) The single-loop univariate method based on the MVT-accelerated Rachford-Rice formulation projected by Wegstein's technique. The results obtained are presented in the three columns under the heading "'Normal' K-computation frequency" in Table 3-7. The following inferences are drawn: (1) The double-loop univariate approach is far less efficient than the other approaches. (2) The free-energy-minimization algorithm is slightly better than the single-loop univariate algorithm for most of the narrow-boiling mixtures, notable exceptions being systems VG and VK for which i t -149-exhibits o s c i l l a t o r y convergence. For wide-boiling mixtures, the former algorithm i s s l i g h t l y out-performed by the l a t t e r . 3-5-2 Varying the Frequency of K-Computation The free-energy minimization algorithms and the single-loop univariate methods have been developed on a structure whereby the equilibrium ratios are computed once i n an i t e r a t i o n . There i s nothing sacrosanct i n this logic and there i s no reason not to expect good performance from a scheme that updates K less frequently. But how much less frequently should this be without s a c r i f i c i n g s t a b i l i t y and result-quality for convergence-speed? The answer to this question w i l l depend on how composition-dependent the equilibrium ratios are. To answer i t i n quantitative terms, the following algorithms were modified so that the frequency of K-computation could be varied: (1) The Wegstein-projected MVT-accelerated Rachford-Rice method. (2) The tetrahedral-projection-accelerated s e n s i t i v i t y method• (3) The tetrahedral-projection- accelerated GP method. (4) The s e n s i t i v i t y method. The algorithms were applied to systems VA, VD, VH, VJ, VN, VO and VP. In each case, the frequency of K-computation was varied from 'once every i t e r a t i o n ' to 'once every four i t e r a t i o n s ' . The tetrahedral-projection-accelerated s e n s i t i v i t y method was observed to encounter problems near the saturation lines for frequencies other than 'once every i t e r a t i o n ' . The results obtained for the other three methods have been subjected to some analysis to determine how much loss i n quality — r e l a t i v e to a frequency of 'once every i t e r a t i o n ' — re s u l t s . A deviation parameter, E f, was introduced and defined by -150-where the subscript ' f denotes a frequency of 'once every f i t e r a t i o n s ' and i s the vapour flow for f=1. The average E^ values — averaged over 19 temperature points f o r each system — are presented i n Table 3-6. E^ for the univariate method and E^ and E^ for the s e n s i t i v i t y method are not included i n the Table due to lack of convergence at these frequencies. If we assume a value of E < 0.001 as a tolerable deviation, then the r e s u l t s indicate that a frequency of '1 every 2 i t e r a t i o n s ' can be used for the univariate and the s e n s i t i v i t y methods i n the i r a p p l i c a t i o n to any of the systems. They also indicate that for the tetrahedral-projection-accelerated GP method, a frequency of '1 every 3 i t e r a t i o n s ' would be s a t i s f a c t o r y . Having thus gained some experience as to the safe frequencies to use for each of the methods, the three methods were executed, based on th e i r l i m i t i n g frequencies, for a l l 16 systems. The phase-distribution r e s u l t s obtained were, i n every case, checked against those for 'normal' K-computation frequency, and were found to y i e l d deviations that are within the assumed tolerable l i m i t . The computation times r e s u l t i n g from the a p p l i c a t i o n are presented i n Table 3-7. Also included i n the same Table for the purpose of comparison are the execution times obtained i n Section 3-5-1. The main deduction to be made here i s that reducing the Table 3-6 Absolute deviations (E) for various K-computatlon frequencies System Wegstein-projec l e r a t e d Rachfoi : t e d , MVT-acce-rd -R ice Method T e t r a h e d r a l - p r c > j e c t i o n - a c c e l e i rated GP Method S e n s i t i v i t y Method E2 E3 E2 E3 Ek E2 VA 0.000069 0.005057 0.000110 0.000282 0.002418 0.000017 VD 0.000017 0.007604 0.000077 0.000053 0.001537 0.000013 VH 0.000206 0.023116 0.000205 0.000525 0.001846 0.000030 VJ 0.000147 0.001845 0.000574 0.000172 0.001600 0.000035 VN 0.000016 0.023967 0.000023 0.000032 f 0.000004 VO 0.000009 0.012801 0.000007 0.000051 f 0.000003 VP 0.000011 0.012414 0.000023 0.000022 0.000538 0.000003 f = f a i l u r e Table 3-7 Final comparison of vapour—liquid algorithms: computation times (CPU seconds) System 'Norma 1' K-computation fre quency Limiting K-computation frequency (tolerable E < 0.001) Double-loop Richmond-accelera-ted •-normalized method 2 Sensitivity method with tetrahedral projection Single-loop Wegstein-projected MVT-accelerated Rachford-Rice Meth. GP with tetrahedral projection Sensitivity Method Single-loop Wegstein-projected MVT-accelerated Rachford-Rice Method VA 0.8556 0.5227 0.5027 0.5651 0.4902 0.4311 VB 0.6612 0.3700 0.3574 0.4188 0.3769 0.3390 VC 1.1560 0.6420 0.6763 0.7941 0.6777 0.5812 VD 1.1455 0.5682 0.6248 0.7278 0.6477 0.5398 VE 1.1294 0.5755 0.5951 0.8404 0.6195 0.5391 VF 1.0525 0.5357 0.5448 0.6619 0.5926 0.4954 VG 0.9657 0.9207* 0.4826 0.7244 0.5018 0.4129 VH 1.2392 0.6145 0.7232 0.9288 0.7305 0.5900 VI 1.0066 0.5207 0.5565 0.6796 0.5506 0.5361 VJ 1.2903 0.6260 0.6504 0.7433 0.6524 0.5629 VK 0.8761 0.5100* 0.4830 0.6560 0.5272 0.4208 VL 0.5679 0.3432 0.3270 0.3195 0.3387 0.3060 VM 0.5677 0.3437 0.3179 0.2961 0.3328 0.2954 VN 0.5816 0.3506 0.3246 0.3135 0.3409 0.3091 VO 0.5508 0.3454 0.3178 0.3059 0.3337 0.2982 VP 0.7586 0.4676 0.4609 0.4350 0.4761 0.4112 I 14.4046 8.2565 7.9450 9.4102 8.1893 7.0682 * Oscillatory convergence Note: Equivalent total time for double -loop Newton-accelerated Rachford-Rice with terml initialization (6° = 0.0) is 19.5157 seconds. nal 1 — — — . _* 1 -153-frequency of K-computation for the best single-loop univariate method by half results in an average time-saving of about 12% and makes i t distinctly better than the best of the free-energy minimization methods. 3-5-3 Conclusions (1) Solving the vapour-liquid flash problem by a double-iteration algorithm is comparatively inefficient. (2) The speed, stability and r e l i a b i l i t y of the computational algorithms are a strong function of the i n i t i a l i z a t i o n scheme employed. With proper i n i t i a l i z a t i o n , even highly nonideal mixtures can be handled by a single-iteration computational algorithm. (3) It is possible to reduce the frequency of K-computation from the 'normal' value of 'once every iteration', in most cases by half, for even highly nonideal systems without incurring intolerable loss in the quality of results. (4) The geometric-programming formulation of the free-energy minimization method compares favourably with other methods, given a suitable acceleration method. (5) The two vector-projection methods proposed in this work have put up a quite good showing and seem to have a future. (6) The quadratic form of the Wegstein accelerat ion method proposed here has not been a disappointment and could find useful application in other classes of problems. CHAPTER FOUR SENSITIVITY ANALYSIS IN VAPOUR-LIQUID EQUILIBRIA 4-1 Introduction This chapter presents the attempts made to apply sensitivity analysis to vapour-liquid equilibria, the object being to be able to accurately project from an equilibrium solution at some temperature and pressure condition to the equilibrium solution at a different level of temperature and pressure. The study was undertaken in the belief that the technique, if successful, could constitute a powerful tool in the design and automatic control of process separation units. The geometric-programming-based perturbation theory of Duffin and co-workers (1967), the gist of which is presented in Appendix C-2, is put to the test and its weaknesses unveiled. The subject is* then viewed from other angles. 4-1-1 Nomenclature Note: Any symbol not defined below and not clearly defined where i t occurs within this chapter retains the definition of Section 3-1-1. The system code employed here refers to Table 3-2. Symbol Definition A,B Parameters in K versus T model. s Partition parameter. Subscripts i»j.k.n Components. Superscripts j Interval. -154--155-4-2 The Vapour-liquid Formulation A p p l i c a t i o n of the theory presented i n Appendix C-2 to the vapour-liquid problem leads to the re l a t i o n s h i p j=l k=l n=l nL nv + b<k> -gS.}] (4-1) o where J i s given by , b ( « b < k ) N b<J>b<k> b < « b < k ) b U j * " ^ i k(w*) - - ^ r 2 - + I [^V^ + - ^ h r ^ ] - t- 1 = 1 1 = 1 w i = l 1. v. L o i i N N + i i t i - i ] ( 4 . 2 ) V In the above equations, the star superscript denotes the equilibrium s o l u t i o n from which the projection i s being made, while w denotes the vector tw , _1 , _v }. A l l other parameters are as defined i n Section 3-3-4. Substituting the values of the normality and n u l l i t y vectors into Equation (4-1), we have d^= - dv = J - 1(w*) • [dJlnf^ - d£nC_v] (4-3) X where dinC^ = [dlnC^, dlnC^, ,d£nC ] . dAnC^ i s s i m i l a r l y defined, with 'v' substituted for 'L'. A s i m i l a r s u b s t i t u t i o n into Equation (4-2) y i e l d s 6. 6. J i 4 " + - J " ) " ( — + — ) ( i = 1,2,...,N) (4-4) J 1 v L V i i -156-1 for j = i , where 6 . = { J 0 f o r j M From Equation (3-46), C . •"• • = K. . • Therefore, |"d£nCT - dJlnC 1 = -dJtnK (4-5) L v — where dlvK = [dZnK^ d£nK2,... .dJlnl^] Combining Equations (4-3) and (4-5), we have dv = - dl = J-1(w*) • dfcnK (4-6) Equations (4-4) and (4-6) constitute the working equations. 4-2-1 Eliminating Matrix Inversion Equation (4-6) shows that an application of the sensitivity analysis method would involve the inversion of an N x N matrix — a time-consuming step, especially for large N values. However, Equation (4-4) reveals that a l l the off-diagonal elements of the matrix are identical. Advantage was taken of this special form of the Jacobian matrix by doing some matrix manipulation that led to the elimination of any matrix inversion. Using the facts that L* + V* = F L i and 1, + v± = Z (i = 1,2 N), Equation (4-4) was rearranged to give T - 1 J F J i j * * *~* (4 - 7 ) V i L V -157-Let us introduce the re l a t i o n s h i p s -,* = T * x * 1 ± L x ±, V* = V*v* i v y i ' and Z = Fz . i i Then the matrix J can be manipulated to give -F J = * * L V (1 - D) (4-8) where 1_ i s an N x N matrix whose elements are a l l i d e n t i c a l l y unity, and D i s the N x N diagonal matrix defined by i i * * X i y i (4-9) Combining Equations (4-6), (4-8) and (4-9), we have -J-^ Q - D)dv = dJtnK L V or * ic -L V ldv - Ddv = — - — d£nK (4-10) The product ldv i s a column vector whose elements are dV, while the product Ddv i s a column vector whose 1th element i s z.dv./x*y*. J J J J Hence, Equation (4-10) leads to * * ic ic X i y i d V X i y i L*V* d V i = z + ' d ^ n K i ( 1 = 1 , 2 N ) Summing Equation (4-11) from 1 to N, we have N N x.y. L V N x.y.dfcnK. I dv. = dV = dV I -J-J- + — - — v - J - J J-j=l J=l 3 I j=l z . 3 (4-11) or dV -L V N x.y.d^nK. V 3 3 3 F z. J=l J * * . , Z . J-1 J (4-12) -158-Substituting Equation (4-12) into Equation (4-11) and rearranging, we obtain * * N x*y*d*nK. V J ] J 3=1 J * it N x .y. 1 " I -JJ-+ d^nK. (4-13) 3=1 3 This i s the f i n a l working equation, with 'A' replacing 'd' to s i g n i f y a f i n i t e rather than an i n f i n i t e s i m a l change. 4-2-2 Applications and Outcome In the ap p l i c a t i o n of the method, while the programs employed were written to be able to handle perturbations i n both temperature and pressure, only var i a t i o n s i n temperature were a c t u a l l y tested. This i s j u s t i f i e d by the fact that the thermodynamic parameters y, $ and f° are most s e n s i t i v e to temperature changes, and much less so to pressure v a r i a t i o n s . The following are the main steps involved i n the implementation of the method: (1) An isothermal vapour-liquid f l a s h c a l c u l a t i o n i s carried out at the base temperature, T , to obtain the 'known sol u t i o n ' . (2) A step change i n T, AT, i s introduced and the corresponding A&nK (based on the composition at T*) i s determined. (3) The molar compositions at the new T are computed from v = v* + A^ v, and 1_ = Z_ - v_, with A\> calculated from Equation (4-13). -159-The method was tested by applying i t to systems VA and VB. The resu l t s for system VA are summarized i n Table 4-1 i n the form of an error term, E, defined by where V r e s u l t s from s e n s i t i v i t y analysis and V i s the expected value, obtained by re-solving the problem at T. I t should be noted that i n the applications of the s e n s i t i v i t y method — here and i n subsequent sections — an exact s o l u t i o n i s determined only at the i n i t i a l base point (the T* i n the relevant Tables). The estimated r e s u l t for any point, T = T* + nAT, n = 2,3,4... re s u l t s from using the estimated r e s u l t for T = T* + (n-1)AT as the 'known s o l u t i o n ' . The errors for system VB are of the same order of magnitude. The errors are d e f i n i t e l y s i g n i f i c a n t , and this c a l l s for a clo s e r look at the s e n s i t i v i t y method. 4-3 A Quadratic Taylor Approximation A close inspection of the s e n s i t i v i t y r e l a t i o n s developed i n the preceding section reveals that they are i d e n t i c a l to what would r e s u l t from a two-term truncation of the Taylor series-expansion of A n K ^ i = 1,2,...,N) with respect to v_, that i s A N 9£nK ^ AnK± = AnK± + I ^ 1 A (v - v ) ( i = 1,2,...N) (4-14) j=l j v. J J In view of this observation, a three-term truncation of the Taylor series-expansion, manipulated to eliminate second-order derivatives, was next studied. - 1 6 0 -Table 4-1 Errors for Sensitivity Analysis (original GP version) for system VA, with T* - 336.5K AT(K) T(K) E 0.1 340.5 -0.0946 341.3 -0.1267 0.2 340.5 -0.1612 342.5 -0.2433 0.8 340.5 -0.3437 342.1 -0.5503 2.0 340.5 -0.4483 342.5 -0.5880 -161-The Tay lo r expansion i s g iven by A T 1 & & AnKj^v) = JtnK (v ) + V [ j l nK^v ) ] ( v - v ) + 2<v - v ) A V [ £ n K ± ( v ) ] ( v - v ) + [4th term + . . . . . . ] ( 1 - 1 , 2 , ,N) ( 4 - 1 5 ) Taking the g rad ien t of Equat ion (4 -15) and p o s t m u l t i p l y i n g each term by 0.5(^v - v*) , we have y V T [ A n K . ( v ) ] ( v - v*) = y V ^ J t n K ^ v * ) ] ^ - v*) 1 & T 0 $c + ) V [ £ n K i ( v ) ] ( v - v ) +. [j x 4 t h Term + ] ( 4 - 1 6 ) I f we assume that [4th Term + . . . ] i n E q n . ( 4 - 1 5 ) = [ -^x 4 th Term + . . . ] i n Eqn. ( 4 - 1 6 ) , then s u b t r a c t i n g Equat ion (4 -16) from (4 -15) g i v e s AnK ± - *nK* = | { V T [ £ n K 1 ( v ) ] - V T [ £ n K ± ( v * ) ] } ( v - v*) ( 4 - 1 7 ) A p p l y i n g to Equat ion (4 -17) a m a t r i x m a n i p u l a t i o n s i m i l a r to that performed i n S e c t i o n 4 - 2 - 1 r e s u l t s i n ( 1 = 1 , 2 , . . . . N ) (4 -18) Av. = 2v 1 1 1 N I j= l v . l . A£nK. 1 1 J F "A v i i i + A£nK. -162-* * where and LV = V L .VL * * V L + VL The above r e l a t i o n s h i p i s unfortunately recursive i n v thus ne c e s s i t a t i n g some form of i t e r a t i o n i n i t s evaluation. In applying the r e l a t i o n s h i p s , a fixed number of i t e r a t i o n s (ranging from 1 to 10) was employed i n updating JL, V, L and K. When the method was applied to systems VA and VB, the r e s u l t s turned out to be quite disappointing, not showing any s i g n i f i c a n t improvement i n re s u l t q u a l i t y over the two-term Taylo r - s e r i e s truncation to j u s t i f y the extra computation i t involves. In view of t h i s , the approach was not investigated further. 4-4 A Mean-value—theorem Approach The next consideration given to the s e n s i t i v i t y technique was the a p p l i c a t i o n of the mean-value theorem of d i f f e r e n t i a l calculus (Holland, S t i l l t r e a t i n g InY.^ as a function of the vapour molar vector, we have, according to the mean-value theorem, 1975). Zn K ± = in K* + V T [ j l n K ±(v*+ aAv)](v - v*) (i = l ,2,... ,N) (4-19) where 0 < a < 1 - 1 6 3 -Solving the above N equations for v, we have v_ = v* + J - 1A£nK (4-20) where J i s the Jacobian of AnK with respect to v™, where m * * v = v + a(v - v ) - - - - } (4-21) l m = Z - v m and jc*, y* are obtained by summation and normalization. With a = 0, the above r e l a t i o n s h i p reduces to that obtained from the geometric-programming theory. Thus, Equation (4-13) s t i l l applies except that the star superscript i s replaced with 'm'. To evaluate v™, one needs reasonable estimates of the unknown quantities a and v^ . For the l a t t e r quantity, this i s obtained by doing an I n i t i a l c a l c u l a t i o n based on a = 0. 4-4-1 Obtaining a Best a Attempts were made to determine the value of a, as a function of 8 , that would be the most suitable i n the a p p l i c a t i o n of the mean-value theorem. Starting with the r e l a t i o n s h i p JlnK = Znv^ + £nL -£nV -Znli (4-22) and s u b s t i t u t i n g for l . i n terms of v and for L and V i n terms of 8 , i i v we have 4nK = Anv - £n(Z ± - v ) + An(l - 6 ) - InQ^ (4-23) Treating as a function of and 8^ and applying the mean value theorem to Equation (4-23) re s u l t s i n -164-A*nK = [-j + s ]Av. v^ ^ + aAv^ ^ Z± -(v^ + aAv^) - [—3j—^ + ^ ]A6 (4-24) 6 + aA9 1 - (6 + aA6 ) v V V V Equation (4-24) can be reduced to the form f.(a) = C i > 4 a 4 + C i > 3 a 3 + C ^ a 2 + C . ^ a + C 1 > 0 = 0 (4-25) where C. . = A£nK •A9 2«Av 2, i,4 i v i ' C i , 3 = " A 9 v - A v i - ^ n K i [ A v i ( l - 2 6 * ) + A B ^ Z ^ v * ) ], C. 0 = [A6 -Av.(Z -2v*)(l-29*) - 8*(l-6*)-Av 2 i,2 L v i i i v v v i o & & - A6 v- v 1(Z i-v 1)]A£nK 1 + Av^A9 v(Z 1A9 v-Av i), c i , i = [ e v , A v i ( i - v ( z r 2 v i ) + A e v # v J ( z 1 - v i ) ( i " 2 e C ) ] M n K i + Av 1.A9 v[(Z i-2v*) - Z i ( l - 2 9 * ) ] , and C 4 - = v*^9*(Z -v*)(l-9*)A£nK. + v*»A9 (Z.-v*) 1,0 i v i i v i 1 v I 1 * * - Z «e «Av.(l-9 ). i v i v Summing Equation (4-25) for a l l components i , (i=l,2 ,...,N), we have N 4 f(«) = I f,(a) = I C a J = 0 i-1 1 j-0 J N where C. = I C (j=0,l,2,3,4) 3 1»3 i = l -165-Using one of the vapour-liquid f l a s h algorithms of Chapter 3, r e s u l t s were generated for system VA at d i f f e r e n t temperatures spanning the two-phase region. The points were chosen such that A0 « 0.1 i n each case. These r e s u l t s were employed i n the evaluation of the C^ terms. Equation (4-26) was then solved for each point, using the Newton method, to obtain the value of a corresponding to each 6 . The r e s u l t i n g p r o f i l e of a as a function of 6 ± s shown i n Figure 4-1. When, instead of Equation (4-26), Equation (4-25) was applied to the i n d i v i d u a l components, the p r o f i l e s obtained were e s s e n t i a l l y the same as that shown i n Figure 4-1. This agreement j u s t i f i e s the incorporation of the dependence of a on v and A £ n K. into that of 0 . However, i t must be i i v ' r e a l i z e d that a also depends on A0^ and the plot of Figure 4-1 can therefore serve only as a rough guide. Guided by Figure 4-1 the following a-versus-0^ r e l a t i o n s h i p s were tested: (1) An exponential f i t of the p r o f i l e i n Figure 4-1, r e s u l t i n g i n the r e l a t i o n s h i p 0.46 - 0.31 exp(-15.5273 6 ), 0 < 8 < 0.5 v — v — 0.46 + 5.5968(10~ 8) exp(15.5273 e v), 0.5 < e y < 1 (2) A l i n e a r r e l a t i o n s h i p of the form a = m0 + c. v 12 d i f f e r e n t sets of {m,c} were tested, including {o.1,0.45}, {0.1,0.4}, {0.2,0.35}, {0.2,0.4}, {0,0.5}, {0,0.45}, {0,0.48} and {0,0.52}. (3) A parabolic r e l a t i o n s h i p of the form a = c + 4m6 (1-0 •) v v y a = - 1 6 6 -1.0 a I 0.8 E o i _ D CL | 0.6 o OJ JZ r -I CD I 0.4-> i sz D CU 0.2H — i 1 1 1 1 1 1 1 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0 .8 0.9 1.0 •Bi Fig 4-1: Fit of mean-value -theorem parameter, a, for system VA - 1 6 7 -13 sets of {m,c} were tested. These included p o s i t i v e and negative values of m. The d i f f e r e n t a-versus-6^ r e l a t i o n s h i p s were compared on the basis of the maximum absolute errors i n the mole fr a c t i o n s (x_ and y), and the percentage error i n the t o t a l flow rates, that resulted when they were applied to system VA at the same temperatures and with the same temperature changes. The best r e s u l t s were obtained with a = 0.53 - 0.089 v(l - 6 ) (4-27) I t i s remarkable that the constant r e l a t i o n a = 0.5 performed better than most of the 8-dependent re l a t i o n s h i p s and was i n fact almost as good as that represented by Equation (4-27). With an a-rela t i o n s h i p thus determined, the next step i s that of determining the algorithm that minimizes the s e n s i t i v i t y errors without costing too much i n terms of execution time. Three algorithms were studied. 4-4-2 Algorithm A This algorithm involves the following steps: (1) Obtain the solu t i o n at T* through an isothermal f l a s h c a l c u l a t i o n . (2) Set T = T* + AT and compute K based on T, x* and y*. Hence determine A&nK. (3) Calculate v_m from Equation (4-21) where Av_ i s estimated from Equation (4-13) and a i s computed from Equation (4-27). Calculate the corresponding values of _ l m , x m and y m . -168-(4) Employing the quantities computed i n Step 3 and replacing the '*' superscript with 'm' i n Equation (4-13), determine the f i n a l value of v_. The r e s u l t s obtained from applying t h i s algorithm to system VA are presented at two temperatures and three AT values i n Column 3 of Table 4-2. A comparison of these r e s u l t s with those of Table 4-1 shows that the former i s an improvement over the l a t t e r . 4-4-3 Algorithm B In Algorithm A, K at T was computed using x* and y*. By v i r -tue of i t s d e f i n i t i o n , K ought to be based on x and y at T. However, these values are unknown. In t h i s algorithm, K i s calculated using 2£ m» m^^ steps involved are exactly the same as for A l g o r i -thm A except that i n Step 3, K i s recomputed using x m and y™. Column 4 of Table 4-2 shows the r e s u l t s obtained from applying this algorithm to system VA. Compared to the re s u l t s i n Column 3 of the Table, these r e s u l t s are not s i g n i f i c a n t l y d i f f e r e n t . In view of t h i s , i t was f e l t that K could be treated as being approximately independent of composition over a temperature range as large as 2K for system VA. Algorithm C i s based on t h i s assumption. 4-4-4 Algorithm C By the very nature of s e n s i t i v i t y analysis, the smaller the perturbation, the more accurate the r e s u l t of the analysis. I f K i s assumed to be independent of x and y_ over a temperature range T* < T < (T* + AT), then the pro j e c t i o n from T* to T = (T* + AT) can be effected i n a series of steps by p a r t i t i o n i n g the temperature range into a number of i n t e r v a l s and computing AJtnK for each i n t e r v a l from a suitable K-versus-T f i t . Table 4-2 Errors for sensitivity-analysis algorithms A and B for system VA, with T* = 336.5K AT(K) T(K) E \ /alues Algorithm A Algorithm B 0.2 340.5 -0.0110 -0.0185 342.5 -0.0134 -0.0281 0.8 340.5 -0.1170 -0.1214 342.1 -0.3492 -0.3497 2.0 340.5 -0.3281 -0.2907 342.5 -0.3613 -0.3725 - 1 7 0 -Two types of K-versus-T f i t were considered: (1) A l i n e a r AnK versus -^ r e l a t i o n s h i p . (2) A l i n e a r AnK versus T r e l a t i o n s h i p . Linear AnK versus T * For t h i s we have B. AnKi = A ± + -y (4-28) I f we divide AT into s equal i n t e r v a l s (see Figure 4-2), then applying Equation (4-28) to the points T* and T and taking the difference, we have -T TAAnK B i = AT ( 4 " 2 9 ) By s i m i l a r l y applying Equation (4-28) to any two adjacent i n t e r v a l i+1 i points, T J and T , we have -T^T^AAnK^ B. = : (4-30) 1 AT J where AJlnKJ = £ n K j + 1 - £nK^ and AT j = T J + 1 - T j ( j = 0,1,...,s-l). Combining Equations (4-29) and (4-30) and rearranging, we have T*.T.AT^.AAnK M n K i = — n + i — - ( 4 _ 3 1 ) Combining Equation (4-31) with the re l a t i o n s h i p s AT J = AT/s -171-s-2 Temperature Fig 4 - 2 : I n K - v e r s u s - T partitioning scheme - 1 7 2 -T j = T [ l _ C - 3 ) A T ] sT and T 3 + 1 - T * [ l + ( 3 + ^ A T ] t sT A£nK Is we have MnK2 = - r r — - (4-32) i r (j+DAT i r _ (s - j)ATi v L s(T - AT) J 1 sT J Linear £nK versus T A l i n e a r £nK versus T r e l a t i o n s h i p implies £nK i = A ± + B/T (4-33) If we apply the same p a r t i t i o n i n g approach as i n the f i r s t f i t and follow a s i m i l a r mathematical procedure, the f i n a l r e s u l t i s A£nK ; j = A£nK i/s (4-34) Bearing i n mind that (j + 1) and (s - j) are always less than or equal to s, a comparison of Equations (4-32) and (4-34) reveals that for reasonably small AT and for noncryogenic systems, the two f i t s are equivalent. The l a t t e r was employed i n the tests that follow. The following steps are involved i n the ensuing algorithm: (1) Obtain the solu t i o n at T* through an isothermal f l a s h algorithm. (2) Set T = T* + AT. Compute K based on T, x* and y*. Calculate A£nK and hence determine AAnK-', from Equation (4-34). (3) Calculate v m for the f i r s t i n t e r v a l as i n Step 3 of Algorithm A. (4) Calculate v_ for the f i r s t i n t e r v a l by the same procedure as Step 4 of Algorithm A. -173-(5) Repeat Steps 3 and 4 for i n t e r v a l s 2 to s, using the r e s u l t for any i n t e r v a l as the 'known sol u t i o n ' (with '*' status) for the succeeding i n t e r v a l . The algorithm was applied to system VA for s = 2,3,....,6 and with AT = 2K. The r e s u l t s obtained are presented i n Table 4-3 at two d i f f e r e n t temperature l e v e l s . They are a d e f i n i t e improvement over those for algorithms A and B with the same AT. A more comprehensive test of the method was next c a r r i e d out, i n v o l v i n g systems VA, VD, VH, VJ, VN, VO, and VP. For each of the systems, the temperature corresponding approximately to 9* = 0.05 was chosen as the base temperature. Three other temperatures were then chosen to correspond approximately to 0* values of 0.35, 0.65 and 0.95. The exact s o l u t i o n was determined only at the base temperature. Thus, for example, the estimate at T corresponding to 0* a 0.65 was based on the estimated so l u t i o n at T corresponding to 0* « 0.35 The error i n each estimate was computed from where superscripts 's' and ' r ' are as previously defined, and subscript 'n' s i g n i f i e s the point (1,2 and 3 for the points corresponding approximately to 8* values of 0.35, 0.65 and 0.95 r e s p e c t i v e l y ) . The error values are presented i n Table 4-4. The symbol , 0 0' denotes cases where an indeterminate logarithmic term, due to a negative composition quantity, resulted i n premature termination of execution. -174-Table 4-3 Errors for Sensitivity-analysis Algorithm C for System VA, with T* = 336.5K s E Va Lues T = 340.5K T = 342.5K 2 -0.1919 -0.2625 3 -0.0937 -0.1066 4 -0.0381 0.0009 5 -0.0040 0.0627 6 0.0182 0.1199 Table 4-4 Errors for a more comprehensive application of sensitivity-analysis Algorithm C. System E Values 8 = 1 8 = 2 8 = 3 s = 4 8 = 5 8 = 6 1 - 0.4080 - 0.1966 - 0.0927 - 0.0323 0.0054 0.0302 VA 2 -0.4459 -0.2246 -0.0869 0.0024 0.0618 0.1024 3 -0.4982 -0.2763 -0.1137 0.0003 0.0630 0.1262 1 -0.1928 -0.0427 -0.0091 0.0048 0.0122 0.0166 VD 2 -0.2029 -0.0070 0.0283 0.0425 0.0499 0.0543 3 -0.2929 -0.0086 0.0287 0.0444 0.0528 0.0577 1 -0.2355 -0.1235 -0.0926 -0.0790 -0.0717 -0.0673 VH 2 -0.1994 -0.0612 -0.0248 -0.0088 -0.00004 0.0045 3 -0.1783 -0.0381 -0.0019 0.0143 0.0230 0.0280 1 -0.3213 -0.0714 0.0089 0.0473 0.0689 0.0821 VJ 2 -0.2268 -0.0442 0.0214 0.0555 0.0754 0.0878 3 -0.2170 -0.0456 0.0181 0.0510 0.0586 0.1156 1 -1.1449 -0.0513 0.3646 0.9343 2.2471 3.5916 VN 2 10.6047 6.0xl05 00 OO OO 00 3 2.5xl05 OO CO oo oo oo 1 -1.0043 0.0062 0.2744 0.4182 0.5480 0.6773 vo 2 8.8900 5.9x10"* 3.76xl0 3 2 OO oo oo 3 -9.4xl08 OO OO oo CO oo 1 -0.9409 0.0006 0.2123 0.2998 0.3623 0.4141 VP 2 -1.3343 265.8 4.8xl0 2 7 OO oo OO 3 -6.1xl05 oo OO oo oo oo Note: 0 0 s premature termination due to indeterminate logarithm -176-The errors, as can be seen from the Table, are quite s i g n i f i c a n t . They are e s p e c i a l l y so for the wide-boiling systems. The next step taken was to attempt to track down the error with a view to knowing whether reasonable steps can be taken to reduce i t to n e g l i g i b l e l e v e l s . This i s the subject matter of the next section. 4-5 Error-tracking In attempting to apportion the error i n the res u l t s obtained by applying Algorithm C discussed above, two major sources were considered: (a) The error due to the composition-dependence of K. (b) The error due to the inexactitude of a. Three computer programs were written for the er r o r - t r a c k i n g . The f i r s t (henceforth designated 'Program A') eliminates the f i r s t type of er r o r . The second error-type i s eliminated by the second program ('Program B'). The t h i r d program ('Program C ) eliminates the e f f e c t of both sources of error. Program A This program involves the following key steps: (1) Algorithm C i s employed i n performing the s e n s i t i v i t y analysis on a given system. (2) With T replacing T*, AT set equal to 0, and the current values of the molar quantities replacing t h e i r values at T*, steps 2 to 4 of Algorithm A (Section 4-4-2) are executed. (3) Step 2 i s repeated u n t i l -177-Program B This involves the following steps: (1) Algorithm C i s employed as i n Step 1 of Program A (2) With K fixed at i t s current value (calculated under Algorithm C using x* and y*) , the problem i s re-solved using a modified version of one of the f l a s h algorithms of Chapter 3. This modified version uses the re s u l t s of Step 1 as i n i t i a l values and does not recalculate K throughout the i t e r a t i o n . Program C (1) Same as Step 1 of Program A. (2) Same as Step 2 of Program B. (3) Steps 2 and 3 of Program A are implemented. The three programs were executed for system VA based on T* = 336.5K and AT = 2K. The re s u l t s are presented at two temperatures i n Table 4-5. The n e g l i g i b l y small errors recorded for Program C j u s t i f i e s the non-consideration of any other possible error sources. The s l i g h t errors that i t y i e l d s can a c t u a l l y be at t r i b u t e d to the successive, rather that simultaneous, correction of the two error types. While the errors for Program A are due to the inexactitude of a, those for program B r e s u l t from the composition-dependence of K. From the r e s u l t s , the two error-types are both s i g n i f i c a n t . The error due to the dependence of K on composition could be corrected, possibly without i n c u r r i n g two much increase i n computation time. However, the same cannot be said of the error due to a, e s p e c i a l l y as the s i t u a t i o n i s further complicated by the dependence of this error on the value of the Table 4-5: Error-tracking results (system VA with T* = 336.5 K and AT = 2TC) T = 340.5 K T = 342.5 K Program E Maximum Absolute Error in X Maximum Absolute Error In y E Maximum Absolute Error In X Maximum Absolute Error in Z A 0.1418 0.0004 0.0003 0.0097 0.0014 0.0004 B -0.6258 0.0020 0.0008 0.0205 0.0007 0.0004 C 0.0281 0.0001 0.0001 0.0032 0.0000 0.0000 - 1 7 9 -p a r t i t i o n parameter, s, employed. Attention was at t h i s point directed towards a 'predictor-corrector' approach. 4-6 Predictor-corrector Approach This approach employs the s e n s i t i v i t y - a n a l y s i s method as a 'predictor' step which provides an estimate of the desired s o l u t i o n . The estimate i s then used as an i n i t i a l point by a suitable 'corrector' method to solve for the exact s o l u t i o n . Since this approach y i e l d s exact r e s u l t s , computation time becomes the c r i t i c a l factor i n assessing i t s worth. Three methods have been investigated here, and they are discussed i n the three subsequent subsections. 4-6-1 Method 1 The f i r s t method involves the following steps: (1) Algorithmic C of Section 4-4-4 i s implemented. (2) Using the r e s u l t s from Step 1 as the i n i t i a l point, the best of the isothermal f l a s h algorithms of Chapter 3 i s employed i n obtaining the f i n a l r e s u l t s . 4-6-2 Method 2 I t was f e l t that instead of a 'corrector' step that employs the best of the f l a s h algorithms of Chapter 3, a shorter and f a s t e r corrector step might be possible. Let us express Equation (4-19) i n the i t e r a t i v e form A£nK* = V T[£nK i(v n + a A v n ) ] ( v n + 1 - v 1 1) ( i = 1,2,...,N) (4-35) where n i s an i t e r a t i o n counter ( n = 0 , 1, 2, . . . ) , -180-n and AAnK? - AnK? - A n ( — ) 1 i n x i K n i s computed at T, x 1 1 and y n . I f we replace '*' by 'n' i n Equation (4-13) then i t becomes i d e n t i c a l to Equation (4-35). Thus, the key steps for this method are: (1) Algorithm C of Section 4-4-4 i s executed. (2) Denoting the r e s u l t s from Step 1 by the superscript 'o', Equation (4-35) i s solved i t e r a t i v e l y u n t i l convergence i s achieved. 4-6-3 Method 3 This method cannot s t r i c t l y be described as a predictor-corrector one. I t i s a modification of Method 2 i n which the predictor step has been eliminated. Thus, i n essence, i t involves the following steps: (1) The solution at T* i s obtained through a f l a s h c a l c u l a t i o n . (2) Denoting the r e s u l t s from Step 1 by the superscript 'o', Equation (4-35) i s solved i t e r a t i v e l y as i n Step 2 of Method 2. 4-6-4 Applications and Deductions To test the performance of the predictor-corrector algorithms and to ascertain whether the s e n s i t i v i t y analysis study i s worth pursuing any further, the algorithms were applied to systems VA, VD, VH, VJ, VN, VO and VP. For each system four temperatures, one of which i s the base temperature, were chosen along the l i n e s of what i s presented i n Section 4-4-4. The solution for any given point serves as the i n i t i a l point f o r the next point. For Methods 1 and 2 which involve the p a r t i t i o n i n g - 1 8 1 -parameter, s, the value of 2 was used. This choice was based on a comparison of the results i n Table 4-4 for d i f f e r e n t s values at n = 1. In addition to the three predictor-corrector algorithms, two versions of the most e f f i c i e n t of the isothermal f l a s h algorithms of Chapter 3 were also implemented. One version uses the s o l u t i o n at any given point to i n i t i a l i z e the computation for the succeeding point ( j u s t as for the predictor-corrector algorithms); the other version uses the i n i t i a l i z a t i o n scheme of Chapter 3. The r e s u l t s are contained i n Table 4-6. The r e s u l t s show that where the known solu t i o n i s far removed from the s o l u t i o n being sought, as i s the case i n the tests here, Methods 2 and 3 quite often f a i l to converge to the desired s o l u t i o n . Since the version of the isothermal f l a s h algorithm that uses the predictor-corrector i n i t i a l i z a t i o n scheme also suffers from t h i s ailment, and since the computation times for t h i s program as well as those for the s e n s i t i v i t y predictor-corrector methods are generally not as good as those obtained from a d i r e c t r e - s o l u t i o n of the problem at every point using the i n i t i a l i z a t i o n scheme of Chapter 3, i t can be deduced that the l a t t e r i n i t i a l i z a t i o n scheme y i e l d s a point that i s better than the base s o l u t i o n . 4-7 Conclusion The s e n s i t i v i t y - a n a l y s i s approach to the handling of the vapour-liquid f l a s h problem y i e l d s rather poor estimates of the desired s o l u t i o n , except of course i n a world neighbouring on the i n f i n i t e s i m a l or the i d e a l . As has been revealed by the study i n this chapter and by the s e n s i t i v i t y based algorithm of Chapter 3, the method i s r e a l l y no Table 4-6: Computation times (CPU seconds) for predictor-corrector algorithms System Predictor-Corrector Algorithm 1 Predictor-Corrector Algorithm 2 Predictor-Corrector Algorithm 3 Flash Algorithm with Base-point Initialization Flash Algorithm without Base-point Initialization VA 0.0825 0.0900 0.0896 0.0660* 0.0848 VD 0.0981 0.0711* 0.0730* 0.1150 0.1027 VH 0.1206 0.1155 0.0803* 0.1172 0.1175 VJ 0.1166 0.1228 0.0817* 0.1431 0.1171 VN 0.0671 0.0*** 0.0305** 0.0542* 0.0644 VO 0.0644 0.0244** 0.0671 0.0478* 0.0649 VP 0.0900 0.0263** 0.0375** 0.0678* 0.0872 I 0.6393 (0.4481) [0.4597] {0.6111} 0.6386 (0.4463) [ 0 . 4 5 9 7 ] { 0 . 6 I I I ) Notes: i *i ** k In the summation row, the different quantities in last column correspond to similarly-represented points in other columns. failure at 3rd point failure at 2nd and 3rd points failure at a l l three points. -183-more than one i t e r a t i o n of a m u l t i - i t e r a t i o n s o l u t i o n path. When i t i s so applied, i t has to be suitably i n i t i a l i z e d to be r e l i a b l e — and even then, i t i s not necessarily the 'king' of time-savers. CHAPTER FIVE ISOTHERMAL LIQUID-LIQUID AND LIQUID-SOLID FLASH CALCULATIONS 5-1 Introduction This chapter i s devoted to the study of l i q u i d - l i q u i d and l i q u i d - s o l i d equilibrium c a l c u l a t i o n s . While the algorithms presented for the l i q u i d - s o l i d problem follow as a l o g i c a l consequence of the study i n Chapter 3, the l i q u i d - l i q u i d study has, i n addition to those deriving from Chapter 3, a method recently published by Prausnitz and co-workers (1980). The l i q u i d - l i q u i d problem i s treated i n Section 5-2. Section 5-3 deals with the l i q u i d - s o l i d case, while Section 5-4 contains conclusions drawn on both studies. 5-1-1 Nomenclature Note: Any symbol not defined below and not c l e a r l y defined where i t occurs within t h i s chapter retains the d e f i n i t i o n of Section 3-1-1. Symbol D e f i n i t i o n f P a r t i a l fugacity f Check function f° Standard state fugacity F T o t a l feed rate I,J Components i d e n t i f i e r s K Equilibrium r a t i o L Liquid-phase flow rate x Mole f r a c t i o n -184--185-Greek Symbols Y A c t i v i t y c o e f f i c i e n t 6 Phase f r a c t i o n (j) Function defined i n Eq. (3-17) Subscripts i , j Components L L i q u i d or l i q u i d - l i q u i d L l L i q u i d phase 1 L2 L i q u i d phase 2 s S o l i d phase 1 L i q u i d phase 1 2 L i q u i d phase 2 Superscripts L L i q u i d phase s S o l i d phase s Successive-substitution value T Transpose 5-2 Liquid-liquid Equilibria The l i q u i d - l i q u i d equilibrium study was heavily constrained by the s c a r c i t y of empirical or semi-empirical data needed for the ap p l i c a t i o n of the necessary property-predicting c o r r e l a t i o n s . Table 5-1 contains v i t a l information on the systems that were f i n a l l y put together for the purpose of this i n v e s t i g a t i o n . Throughout this work, they w i l l be referred to by the codes given i n Column 1 of the Table, any such reference implying the mixture at the given pressure (unless otherwise stated). Table 5-1: V i t a l Information on liquid-liquid systems I d e n t i f i c a t i o n Code No. of Components System Pressure (Atm.) Temperature range (K) Components and molar composition (%). LA 4 1.0 298-298 Water (9.4); Methanol (6.0); Benzene (37.6); A n i l i n e (47.0). LB 3 1.0 248-348 Water (40.0); Methanol (20.0); Benzene (40.0) LC 3 1.0 253-353 Butyl-alcohol (20.2); Water (74.18); Propyl-alcohol (5.62). LD 3 1.0 278-378 Water (23.5); Benzene (57.5); Ethanol (19.0). LE 3 0.980 314-414 Methanol (3.38); Water (77.19); Butanol (19.43) LF 3 1.009 315-415 Ethanol (3.17); Water (76.72); Butanol (20.11). LG 4 1.0 248-348 Fu r f u r a l (40.0); 2,2,4-trimethylpentane (30.0); Benzene (10.0); Cyclohexane (20.0). LH 3 1.0 283-383 Water (60.0); A c r y l o n i t r i l e (35.0); A c e t o n i t r i l e (5.0). -187-5-2-1 Theoretical Background The mathematical relationships for l i q u i d - l i q u i d e q u i l i b r i a are quite s i m i l a r to those for vapour-liquid e q u i l i b r i a . The two types of e q u i l i b r i a d i f f e r only to the extent that vapour-phase property r e l a t i o n s h i p s are d i f f e r e n t from those for the l i q u i d phase. The various r e l a t i o n s h i p s presented i n Chapter 3 apply, with the following modifications: (1) x i s replaced with JC^ and y with x ^ • (2) JL i s replaced with JL a n d v with JLj. (3) L i s replaced with L and V with L 2 . (4) The parameters for l i q u i d phase 1 are subscripted with ' L l ' and those for l i q u i d phase 2 with 'L2 1. (5) K and 9^ are replaced with and 8^ respectively. (6) i s given by ! L 2 i = W U I L i l YL21*1.21 For condensable components, f ^ ^ = f ^ 2 i a n d Equation (5-1) reduces to = ^ L 2 i _ i L l i 1 1 X Y ( 5 - 2 ) L ± * L l i Y L 2 i 5-2-2 Outline of Algorithms Based on the performances of the d i f f e r e n t methods of Chapter 3 as measured by both execution time and i t e r a t i o n count, with s p e c i a l -188-s i g n l f i c a n c e attached to t h e i r strengths and weaknesses when dealing with highly nonideal systems, the following methods were selected: (1) The GP method with triangular projection. (2) The GP method with tetrahedral p r o j e c t i o n . (3) The s e n s i t i v i t y - b a s e d method. (4) The s e n s i t i v i t y method with tetrahedral p r o j e c t i o n . (5) The Wegstein-projected MVT-accelerated Rachford-Rice method. (6) The Wegstein-projected d i r e c t i t e r a t i o n employing j=l (7) The quadratic-Wegstein-projected MVT-accelerated Rachford-Rice method. In a preliminary study, the 5th method was implemented based on the double-iteration l o g i c . I t s performance was, to say the l e a s t , disappointing. Prausnitz and co-workers (1980) have also reached a conclusion, regarding the a p p l i c a t i o n of double-iteration methods to l i q u i d - l i q u i d e q u i l i b r i a , which i s i n consonance with the above observation. In addition to the above seven methods, the study included the method recently proposed by Prausnitz and co-workers (1980). This method employs the Rachford-Rice formulation and converges the phase composition by applying Wegstein's acceleration on alternate i t e r a t i o n s using the function <|> defined by N • | YL11 XL11 " Y L 2 i x L 2 i | < 5 _ 2 a> -189-The main steps of the algorithm are: (1) I n i t i a l i z e x ^ , ' a n d 9 L (2) Using the current values of K^, x ^ and X J ^ J solve the check func-ti o n i t e r a t i v e l y for an updated value of 8 , using Newton's method. Af t e r every step of t h i s i t e r a t i o n , test the value of 8 . JLi I f 9 L > K^IR) - 1 t h e n S e t 6 L = 6 L + 0' 5< 6L + K J I R ) - 1> E l s e l f 9 L < K ^ I E ) - 1 ' t h e n S e t 9 L = 9 L + °' 5< 6L + K j I E ) - 1> 8° denotes the previous value of 8^ while IR and IE denote r a f f i n -ate ( l i q u i d phase 1) and extract ( l i q u i d phase 2) 'solvents' r e s p e c t i v e l y . (3) Compute x ^ i a n a < jS^ 2 a n d n o m ^ z e them. (4) Apply Wegstein acceleration to X Q and x ^ i f the following conditions are s a t i s f i e d : (a) The i t e r a t i o n number, n, i s greater than 3 and there was no acceleration for (n-1). (b) 0 < 8 L < l . o while n < 5. (c) The current $ i s less than 0.2 and Is less than i t s previous value. Set negative mole f r a c t i o n s to zero and normalize x ^ and x ^ * (5) Compute and Y. (6) Store the current value of <|> and compute a new value. I f i t i s an accelerated i t e r a t i o n then go to Step 8; otherwise go to Step 7. -190-(7) Test for convergence. I f the outcome i s p o s i t i v e then terminate the i t e r a t i o n ; otherwise go to the next step. (8) Store current values of the phase compositions for the purpose of acceleration and go to Step 2. The algorithm presented above was structured to f i t i t s authors' adopted convergence c r i t e r i o n , which i s based on (j). In this work, the convergence c r i t e r i o n , for a l l algorithms, i s based on 1 and defined i n a manner s i m i l a r to that for vapour-liquid algorithms. In view of t h i s , the algorithm was restructured (without undermining i t s convergence prop e r t i e s ) : Step 7 i s placed immediately a f t e r Step 3 and i t i s executed for a l l i t e r a t i o n s ; Step 6 then leads to Step 8 i n a l l cases. 5-2-3 The NRTL Model and the Problem of Mul t i p l e Solutions The NRTL and UNIQUAC models are among the few excess-Gibbs-energy models that are capable of predicting l i m i t e d m i s c i b i l i t y . The o r i g i n a l i n t e n t i o n was to use the NRTL model i n t h i s work. However, when i t was incorporated into the algorithms presented i n Section 5-2-2 and applied to system LA, three d i f f e r e n t solutions were obtained, depending on the algorithm employed and the i n i t i a l i z a t i o n scheme used. The f(9 ) I J versus 6^ p r o f i l e - with f ( 8 L ) based on the Rachford-Rice formu-l a t i o n - was consequently generated and plotted (see Figure 5-1). What we have i s a clear case of multiple solutions, which a few other workers (Guffey and Wehe, 1972; Heidemann and Mandhane, 1973) have also observed with the NRTL model and which constitutes a serious shortcoming of the model. -191-0.16 0 . 1 2 4 0.081 0.04 A •0.04H - 0.08H •0.12H Q!O Q10 0.20 0^30 0.40 0.50 0.60 0.70 0.80 Q90 1.00 ~0L Fig.5- 1 f (8L) v. 6L for the system LA at 298 K (based on NRTL) -192-In l i g h t of this observation, the decision pendulum swung i n the d i r e c t i o n of the UNIQUAC model. The version proposed by Anderson and Prausnitz (1978) was chosen. Some check function p r o f i l e s (Rachford-Rice type) r e s u l t i n g from applications of the model are presented i n Figures 5-2 and 5-3. While Figure 5-2 was based on values corrected for composition-dependence, Figure 5-3 involved uncorrected values and i s thus more representative of the search —Li path of the algorithms under i n v e s t i g a t i o n . The corresponding plots r e s u l t i n g from using the NRTL model are presented i n Figures 5-4 and 5-5. Here again, we f i n d that the model also predicts multiple solutions for system LE. E x i t NRTL; enter UNIQUAC. 5-2-4 I n i t i a l i z a t i o n Schemes The i n i t i a l i z a t i o n schemes of Chapter 3 were found to be unsuitable here, which i s not s u r p r i s i n g , considering the highly convoluted nature of the p r o f i l e s displayed i n Figure 5-3. This section focuses on the steps taken to overcome the problem. The i n i t i a l i z a t i o n scheme employed by Prausnitz and co-workers, which served as the cornerstone for the schemes developed here, w i l l receive prime discussion. The Scheme of Prausnitz and Co~workers The scheme i s i n two parts: (1) The pair of components with the least mutual s o l u b i l i t y i s determined from amongst the set of components having z > 0.1; (2) The pair i s assumed to be the only e x i s t i n g components, with each 98% r i c h i n one of the two phases, and K i s — T j computed based on t h i s assumed composition. -193-Fig 5-2: f(#L) v.fusing the UNIQUAC model, with K's corrected for composition dependence -194--0.4-1 1 1 , 1 1 1 1 I i 1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 3 1.0 Fig 5-3 : f{QL) v. 6L, using the UNIQUAC model,wifh K's uncorrected for composition dependence -195--196-- 1 9 7 -An outline of the scheme is as follows: (1) For every pair of components, I and J, with both z(I) and z(J) greater than 0.1: (a) Set x u ( I ) = x L 2(J) = 0.02 and x ^ J ) = x L 2(I) = 0.98. Set al l other mole fractions to zero and compute K^ . (b) Define KS = max { K L ( I ) , ^ —^-jy} and IS as the I or J corres-ponding to KS. (2) Set X ^ C I S ) = 0.02 and x L 2(IS) = 0.98. Then for every component J such that J * IS and z(J) > 0.1, set * L l(J) =0.98 and x L 2(J) = 0.02. Set a l l other mole fractions to zero and compute K . Define KP as the smallest of a l l the K (J)'s and define IP as — T J L I the corresponding value of J. (3) Set IE = IS and IR = IP. IE and IR denote the extract and raffinate solvents respectively and they constitute the least soluble pair. (4) Initialize x^ and x^ by setting x^IR) = x L 2(IE) = 0.98, x^^ClE) = x L 2(IR) = 0.02 and a l l other mole fractions to zero. (5) Compute an init i a l value for K based on the composition in Step 4. (6) Define z(IE) a = z(IE) + z(IR) - 1 9 8 -and i n i t i a l i z e 8 from Ju flQ = -<* , (a - l ) L ^ ( I R ) - 1 K ^ I E ) - 1 (' : >" J ; Constrain 8° within the l i m i t s 0 < 8° £ 1.0. The above scheme i s quite ingenious and i t yielded a stable and r e l i a b l e convergence for systems LB through LH (system LA was not included due to u n a v a i l a b i l i t y of UNIQUAC parameters for some of i t s component-pairs). However, i t does not seem to have been devised with a mind on the importance of execution speed. For a large-component system with many of the constituents enjoying composition prominence, the time required for i n i t i a l i z a t i o n could be astronomical - by a computer time-scale, that i s . For example, an eight-component system with a composition d i s t r i b u t i o n so close that every component has z > 0.1 w i l l require, i n the process of i n i t i a l i z a t i o n , 72 a c t i v i t y - c o e f f i c i e n t evaluations! The i n i t i a l i z a t i o n schemes presented below were designed to eliminate the above shortcoming while seeking not to obtain a worse i n i t i a l point. Scheme 1: The following main steps are involved: (1) Set x ^ = £ and compute T (2) Set X j ^ = JLlj,!.* Normalize x ^ and compute Y j ^ * (3) Compute = T L l i / Y L 2 i ( i = 1,2, , N). (4) Define IE and IR such that K (IE) i s the largest K (I) and K T(IR) I J Li L the smallest K L ( I ) for a l l I such that z(I) > 0.1. -199-(5) I n i t i a l i z e x and xT by setting x f I R ) = x „(IE) = 0.98, L l —Lz L l L2 x L 1 ( I E ) = x L 2 ( I R ) = 0.02, and a l l other mole fractions to zero (6) I n i t i a l i z e K based on the compositions i n Step 5. (7) I n i t i a l i z e 9 from, Li Z(IE)-(1 - * E )) + K L(IR)-Z(IR) 0 ° = Ji (5-A\ L Z(IE) + Z(IR) ^ * ; subject to 0 < 8° < 1.0 Equation (5-4) derives from assuming that only components IE and IR ex i s t , each contributing Z(IE) and Z(IR) moles to the system; and that Z(IE)/K L(IE) moles of IE dissolve i n the IR-rich phase 1 while K^(IR) Z(IR) moles of IR dissolve i n the IE-rich phase 2. Application of the above scheme to the hypothetical eight-component system would require only 4 a c t i v i t y - c o e f f i c i e n t evaluations — the same for any other number of components. Scheme 2: For this scheme, Steps 1 through 6 of Scheme 1 are retained, but the computation of 9° i n Step 7 i s based on the method of Prausnitz Li and co-workers [Equation (5-3)] Scheme 3: This scheme retains Steps 1 through 3 of Scheme 1. Then: N (4) Define x = I Z. K T.« Then for every component, I, with K (I) < x» _^ ^ 1 L i X Li set x (I) = z(I) and x (I) = 0,0; for every other component, J, LiL Lii~ set X L 1 ( J ) = 0 and x L 2 ( J ) = z ( J ) . -200-(5) I n i t i a l i z e 6° from L i N 5o (6) Normal ize x ^ and x ^ a n d compute K^. Scheme 4 T h i s scheme i s s i m i l a r to Scheme 3 except f o r the f o l l o w i n g m o d i f i c a t i o n s : I n Step ( 4 ) : For a l l I w i t h 1^(1) < x, set ^ ( 1 ) = z ( I ) and x ^ C l ) = K^( I )*z ( I ) . For every other component, J , set x L 2 ( J ) = Z ( J ) and x u ( J ) = z ( J ) / K L ( J ) . I n Step 5: Obta in 6° from L i N A ^ i 9° = 1 = 1 L N N ^ ^ l i + ^ X L 2 i 1=1 L i l 1 = i L 2 i Scheme 5: The f i r s t 5 steps of t h i s scheme are i d e n t i c a l to those of Scheme 1 . (6) Assume L 2 = 1 2 ( I E ) and F = Z( IE) + Z ( I R ) . Then s ince -201-i t follows that aKL(IE)6: 6° = L L where a = L [ ^ ( I E ) - l]9° + 1 Z(IE) Z(IE) + Z(IR) By expressing the above equation e x p l i c i t l y for 0°, we have L aK (IE) - 1 ,o _ L L = K, (IE) - 1 VIE> Scheme 6: I t follows an approach s i m i l a r to Scheme 5, but i t more pr e c i s e l y defines 0° by the r e l a t i o n s h i p Li 1 (IE) + 1 (IR) QO _ _2 2 L Z(IE) + Z(IR) where Z(IE) 1 2(IE) = -2 1 - 0 ° 1 + and 0°K L(IE) Z(IR) 1 9(IR) = -2 1 - 0 ° 1 + L 0° K J I R ) A combination of the above three equations leads to the quadratic equation [ ^ ( I E ) - l J t K j I R ) - l](0°) 2 + {aK L(IE)[2 - ^ ( I R ) ] - a - 1 + a [ l - ^ ( I E ) ] = 0 -202-Writing this as a(6 T°) 2 + b6T° + c = 0, Li Li then the quadratic i s solved for i t s root that l i e s between 0 and 1. I f both roots l i e inside this range or both are outside i t , the average value i s taken and constrained within 0 < 9°< 1. Also, i f by any Ju 2 chance, the discriminant b - 4ac i s negative, i t i s a r b i t r a r i l y set to zero. Scheme 7: This scheme implements Steps 1 through 6 of Scheme 1 and complements this with the ef'-determining procedure of Scheme 4. Li When any of the above schemes i s applied to an algorithm that requires i n i t i a l i z a t i o n of 1 as i s the case with the GP algorithms, 1 ±s computed from Z 1-M — ( i = 1,2 ,N) 2 1 1 - 6° 1 + 9 X i I f the i n i t i a l i z a t i o n of 1^ , and i s also required (the s e n s i t i v i t y method i s a case i n point), then: N L2 = 1 hi 1=1 and L = F - L 2 The seven schemes outlined above, as well as the method of Prausnitz and co-workers, were tested using the tetrahedral-projection-accelerated GP method. The test involved one temperature point for each of systems LB through LH. In each case, 9° and the number of Li -203-i t e r a t i o n s required to reach a sol u t i o n were recorded. In counting the i t e r a t i o n s , the i n i t i a l i z a t i o n step was taken as one i t e r a t i o n , i r r e s p e c t i v e of the number of computations involved. Thereafter, each c a l c u l a t i o n i s counted as one i t e r a t i o n . The r e s u l t s are presented i n Table 5-2. I t i s s i g n i f i c a n t to note that a l l the schemes except Scheme 4 gave p o s i t i v e r e s u l t s i n every case. A close inspection of 6° * values for Scheme 4 shows that they are i n fact closer to 6^ than for most of the other schemes. I t s f a i l u r e must therefore be due to the method i t employs i n determining K . This deduction i s Li supported by the fact that the only difference between Schemes 4 and 7 i s i n the determination. I t i s apparent from the i t e r a t i o n counts that Scheme 1 gives the o v e r a l l best r e s u l t . I t was therefore incorporated into the various algorithms. 5-2-5 Applications In comparing the algorithms, f i v e temperature points were used for each of the systems LB through LH. The points were spread uniformly over the temperature ranges given i n Table 5-1. The algorithm of Prausnitz et a l was implemented i n two forms: one employing t h e i r o r i g i n a l i n i t i a l i z a t i o n scheme; the other using the proposed 'Scheme 1'. Table 5-3 contains the r e s u l t s , i n terms of computation time. I t should be mentioned, i n passing, that reducing the frequency of K^-computation — as was done for vapour-liquid systems — led to very sluggish convergence. - 2 0 5 a -Leaf 204 missed in numbering Table 5-2: 8? and iteration count (I.C.) for different initialization schemes System Scheme 1 Scheme 2 Scheme 3 Schen ie 4 Schen ie 5 Schen ie 6 Schen ie 7 Prausr et £ titz L l . T (K) e* L 9° L I.C. 6L I.C. 9L I.C. 6" L I.C. 9° L I.C. 9° L I.C. 9° L I.C. 9° L I.C. LB 298 0.4144 0.5884 8 0.6573 8 0.4000 9 0.4982 f 0.6066 8 0.6551 8 0.3869 9 0.5013 9 LC 303 0.5034 0.4136 8 0.2681 9 0.2582 8 0.4888 f 0.1925 11 0.2362 10 0.3756 9 0.2681 9 LD 328 0.2715 0.2911 8 0.2864 8 0.2350 11 0.4494 f 0.2851 9 0.2882 8 0.3589 10 0.7136 8 LE 364 0.4522 0.4114 10 0.2477 10 0.2281 10 0.4794 f 0.1726 11 0.2178 10 0.3707 10 0.2477 10 LF 365 0.4981 0.4161 9 0.2569 12 0.2328 11 0.4829 f 0.1793 11 0.2256 12 0.4015 10 0.2569 12 LG 298 0.3939 0.5621 8 0.5738 8 0.4000 7 0.4917 f 0.5514 8 0.5717 8 0.4212 7 0.4262 8 LH 333 0.4431 0.4088 7 0.3814 7 0.4000 7 0.4949 f 0.3487 8 0.3735 7 0.5392 7 0.3814 7 f = failure Table 5-3: Computation times (CPD seconds) for l i q u i d - l i q u i d systems System GP with triangular projection GP with tetrahedral projection Sensitivity method Sensitivity Wegstein-projection Quadratic Wegstein + Prausnitz et al with tetrahedral projection Rachford-Rice with MVT with 9L " 9L \\2t Rachford-Rice + MVT Original Ini-tialization Proposed In i t i a l i z a -tion LB 0.3359 0.2696 0.5831 0.2906 0.6848 0.5511 0.7878 0.5001 0.5048 LC 0.4729 0.2819 0.8466 0.2872 0.9424 0.7250* 0.8524 0.4157 0.3952 LD 0.3753 0.3168 1.1938 0.3640 1.4237 1.1881 1.7872 0.7755 0.6906 LE 0.3486 0.3302 1.0776 0.3073 0.7985 0.8635 1.1918 0.4170 0.3969 LF 0.5129 0.3444 1.1445 0.3132 0.8465 0.9139 1.3242 0.4280 0.4010 LG 0.3435 0.2946 0.4840 0.3011 0.5309 0.5399 0.6980 0:3862 0.3015 LH 0.3197 0.2444 0.4824 0.2531 0.5225 0.5495 0.5764 0.3025 0.2845 I 2.7088 2.0819 5.8120 2.1165 5.7493 5.3310 (2.9%fallure) 7.2178 3.2250 2.9745 * fault y convergence to e L = 0 at t he 5th tempera ture-point. -207-5-2-6 Deductions (1) The vector-projection-accelerated algorithms outclass the other methods, the tetrahedral-projection version being by far the better of the two. (2) On the average, the tetrahedral projection does s l i g h t l y better with the GP method than with the s e n s i t i v i t y method. (3) As expected, the algorithm of Prausnitz and co-workers i s more e f f i c i e n t with the proposed i n i t i a l i z a t i o n scheme than with the authors' o r i g i n a l scheme. One should expect the d i s p a r i t y between the two versions to escalate as the number of components increases. 5-3 Liquid-solid Equilibria The problem of the dearth of data that was encountered i n the study of l i q u i d - l i q u i d e q u i l i b r i a assumed a much higher dimension when the searchlight was turned on l i q u i d - s o l i d e q u i l i b r i a . I t was with excruciating e f f o r t that s u f f i c i e n t data was garnered to make possible the a p p l i c a t i o n of the algorithms involved i n the study to two binary systems. ( I t should be noted that e l e c t r o l y t i c systems are not considered here.) V i t a l data on the two systems are presented i n Table 5-4. Code names, by which the systems w i l l henceforth be addressed, are included i n the Table. The temperature-solid-fraction p r o f i l e s for the systems have also been prepared and are to be found i n Figure 5-6. 5-3-1 Theoretical Background The vapour-liquid equilibrium r e l a t i o n s h i p s presented i n Chapter Table 5-4: V i t a l Information on liquid-solid systems I d e n t i f i c a -t i o n code No. of components System pressure (Atm.) Melting point (K) Freezing point (K) Components and % Molar Composition SA 2 0.221 77.74 79.45 Nitrogen (43.17); Argon (56.83). SB 2 0.2105 89.82 93.83 Nitrogen (50.0); Methane (50.0). -209-95.0-1 85.0H 80.OH SA 75.0-1 1 1 1 1 1 " r 0,0 0.1 0.2 Q3 Q4 0,5 0,6 0.7 0.8 0.9 1.0 Fig 5-6: Temperature-solid-fraction profile for the Solid Systems -210-3 transform d i r e c t l y to give the l i q u i d - s o l i d equilibrium equivalents, with the following r e d e f i n i t i o n s : (1) y i s replaced with x^, with £ and V with S. (2) Subscript 's' takes the place of subscript 'v'. (3) K i s replaced with and the liquid-phase mole f r a c t i o n i s given by x^. (4) The l i q u i d a c t i v i t y c o e f f i c i e n t i s subscripted with 'L' to di s t i n g u i s h i t from the s o l i d a c t i v i t y c o e f f i c i e n t , Y . s The solid-phase p a r t i a l fugacity i s normally defined by OS f s i = Y s i f i x s i <* - L 2 —-.*) When this i s combined with the corresponding liquid-phase r e l a t i o n s h i p , we have ,oL X o - l Y T - I f - I K = _si = J±LJ_ ( 5 _ 5 ) s i ..os * L i Y s i f i The evaluation of Y poses a serious problem due to lack of relevant data. As a r e s u l t , a number of algorithms involving the s o l i d phase have been based on the assumption that a l l solid-phase constituents e x i s t as separate pure-component e n t i t i e s (see, for example, Gautam and Seider, 1979). This implies that Y „ = x . s i s i = 1 for a l l i i n the s o l i d phase. In isothermal l i q u i d - s o l i d e q u i l i b r i a involving the p r e c i p i t a t i o n of more than one component, the pure-solid assumption would be highly u n r e a l i s t i c , for i t would presuppose that either there i s the highly u n l i k e l y event of an occlusion-free consecutive p r e c i p i t a t i o n , or that some mysterious f o r c e - f i e l d ensures that ' l i k e p e r f e c t l y a t t r a c t s l i k e ' while 'unlike absolutely repels unlike'. -211-In t h i s work, i t has been considered more l o g i c a l to assume, i n the manner of Erbar (1973), that the s o l i d phase i s a mixture with no i n t e r a c t i o n e f f e c t s between i t s components. Equation (5-5) then becomes £oL K . - 5 ! . _1LA_ ( 5 _ 6 ) s i x_ . _os v 1 *L1 f O S i In t h i s model, those components that do not undergo s o l i d i f i c a t i o n assume a ' n u l l presence' i n the s o l i d phase at equilibrium - i n s i m i l i t u d e to highly non-volatile components i n a vapour-liquid system. The l i q u i d a c t i v i t y c o e f f i c i e n t s i n Equation (5-6) are evaluated from the Wilson model. 5-3-2 Choice of Algorithms The seven algorithms drawn from Chapter 3 and applied to l i q u i d - l i q u i d e q u i l i b r i a were considered to show the greatest promise and have been implemented here. 5-3-3 I n i t i a l i z a t i o n Schemes In order to formulate suitable i n i t i a l i z a t i o n schemes for the l i q u i d - s o l i d algorithms, i t was necessary to gain a v i s u a l knowledge of the nature of the functions involved i n the problem s o l u t i o n . The Rachford-Rice check function was used for this purpose. Some p r o f i l e s have been plotted at d i f f e r e n t temperatures for each system i n Figures 5-7 and 5-8. While the pl o t s for system SA (Figure 5-7) are based e n t i r e l y on K values corrected f or composition-dependence, p r o f i l e s —s based on uncorrected K values (aimed at simulating the actual —s s o l u t i o n path) are also presented for system SB (Figure 5-8). -212-0 . 0 3 2 0 . 0 2 4 ^ 0.016 0 . 0 0 8 A CD - 0 . 0 0 8 H -0.016H - 0 . 0 2 4 - 0 . 0 3 2 -7 7 . 8 0 K i r ~\ r 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Q 9 1D +~ 6s Fig 5-7: f (#s) v e r s u s $s f o r t n e s y s t e m S A - 2 1 3 -0.030 0.024 4 0.016 0.008 4 eg •4-4 if) 0 •0.008 4 -0.016 4 -0.0244 •0.032 -0.0404 -0.048 4 ••.T = 91.59 K Legend: •f(t9s) employing composition-corrected K's f(6S) employing composition-uncorrected K s 0.0 0.1 0.2 Q 3 0.4 0.5 Q 6 0.7 0-8 0.9 1.0 •eSL Fig 5-8- f ($s) v. 65 for system SB -214-The shapes of the curves suggest that the i n i t i a l i z a t i o n schemes developed for vapour-liquid e q u i l i b r i a w i l l be s u i t a b l e . These schemes were therefore applied to the two systems with a view to determining the best scheme. I t was found that Scheme 5 (see Section 3-2-5), which, i t w i l l be r e c a l l e d , gives the best r e s u l t s for vapour-liquid f l a s h , i s also the best here. However, with 0° constrained the way 6° was for vapour-l i q u i d systems, the vector-projection methods were each found to y i e l d one f a u l t y convergence, due to over-projection, for a point close to the l i q u i d saturation l i n e of system SB. This f a u l t was eliminated when the constraints on 6° were redefined thus: s 0.2 for 6° < 0.02 6° = { S 0.80 for 9° > 0.98 s 5-3-4 Applications The experimental design was s i m i l a r to that of Chapter 3 — that i s , using temperatures at 19 points corresponding approximately to uniform i n t e r v a l s of 8 g from 0.05 to 0.95. The computation times obtained are presented i n Table 5-5. 5-3-5 Observations and deductions The following observations and inferences were made from the r e s u l t s i n Table 5-5 as well as the raw computer r e s u l t s containing i t e r a t i o n information: Table 5-5: Computation times (CPU seconds) for liquid-solid systems System GP with triangular projection GP with tetrahedral projection S e n s i t i v i t y method S e n s i t i v i t y with tetrahedral projection Wegstein ] Rachford-Rice with MVT jr o j e c t i o n with 9 s = 6 £x . s s £ s i Quadratic Wegstein + Rachford-Rice .+ MVT SA 0.3813 0.3125 0.4616 0.7071* 0.2621 0.4185** 0.2696 SB 0.5944 0.3861 0.6021 0.4613* 0.4484 0.4684** 0.4683 I 0.9757 0.6986 1.0637 1.1684 0.7105 0.8869 (5. 3 % f a i l u r e ) 0.7379 * O s c i l l a t o r y convergence at some points, with greater o s c i l l a t i o n for SA. ** In each case, f a i l s for 1 point near the s o l i d saturation l i n e . - 2 1 6 -(1) The tetrahedral-projection-accelerated sensit ivi ty method exhibits oscillatory convergence at some points. It manifested this same behaviour for the two vapour-liquid systems with the narrowest boiling-ranges. It would seem that the problem here is also related to the narrowness of the melting-ranges of the systems. (2) On a computation-time scale, the quadratic form of the Wegstein acceleration technique is again s l ight ly worse than the linear form. (3) The tetrahedral-projection-accelerated GP method and the Wegstein-projected MVT-accelerated Rachford-Rice method give the best results . On the average, the former is s l ight ly better. 5—4 Conclusion The studies undertaken in this chapter lead to the following conclusions: (1) Unless one is dealing with a system for which the NRTL activity-model has been proven satisfactory, employing the model entails the risk of one encountering multiple solutions, which is just as bad as no solution at a l l . It is safer to use the UNIQUAC model. (2) The i n i t i a l i z a t i o n scheme presented in Section 5-2-4 and tagged 'Scheme 1' seems to be very eff ic ient for handling the highly nonlinear l i q u i d - l i q u i d equilibrium problem. (3) The tetrahedral-projection-accelerated GP method has given a quite good account of i t s e l f in the l i q u i d - l i q u i d and l i q u i d - s o l i d equi l ibr ia applications here. This is especially true of the l i q u i d - l i q u i d case. CHAPTER SIX MULTIPHASE EQUILIBRIA 6-1 Introduction In t h i s chapter, the search l i g h t i s turned on the multiphase equilibrium problem. A l l the algorithms studied here are designed to be able to handle any of the following phase e q u i l i b r i a : liquid-vapour, l i q u i d - l i q u i d , l i q u i d - s o l i d , l i q u i d - l i q u i d - v a p o u r , s o l i d - l i q u i d - l i q u i d , solid-liquid-vapour and s o l i d - l i q u i d - l i q u i d - v a p o u r . The algorithms are structured i n such a way that they s t a r t by assuming the maximum number of phases that could possibly e x i s t , based on information supplied by the user (see Appendix B). In the process of searching for a solution, any phase whose flow-rate reduces to zero i s eliminated. And i t i s an important feature of the algorithms that at any phase elimination, the search i s not restarted but simply continues, using the composition of the other phases at the elimination point. Methods based on the phase-fraction approach are treated i n Section 6-2. Section 6-3 discusses methods deriving from the geometric-programming (GP) formulation. An extension of the s e n s i t i v i t y method to multiphase systems i s the subject matter of Section 6-4. Section 6-5 treats some a l t e r n a t i v e formulations which employ vector projection based on the dimension of the GP formulation as well as i n a reduced-dimension form. The question of i n i t i a l i z a t i o n i s b r i e f l y considered i n Section 6-6. Section 6-7 contains various applications of the methods while Section 6-8 presents the conclusions reached. -217--218-For reasons discussed i n Section 1-1-2, the r e s u l t s i n t h i s chapter are presented only i n terms of i t e r a t i o n requirements. The mixtures employed are drawn from Chapters 3 and 5, and the same code names are used here. 6-1-1 Nomenclature Note: Any symbol not defined below and not c l e a r l y defined where i t occurs within t h i s chapter retains the d e f i n i t i o n of Section 3-1-1. Symbol D e f i n i t i o n f P a r t i a l fugacity f Check function o f Fugacity c o e f f i c i e n t ^l'^2'^3 Check functions for phase-fraction formulation H Negative of inverse of Jacobian matrix J Jacobian matrix K Equilibrium r a t i o 1 Liquid-phase component flow L Liquid-phase t o t a l flow s Solid-phase component flow S Solid-phase t o t a l flow x Mole f r a c t i o n for a phase other than the vapour phase Greek Symbol 9 Phase f r a c t i o n Subscripts i , j Component -219-L L i q u i d or l i q u i d - l i q u i d L l L i q u i d phase 1 L2 L i q u i d phase 2 s S o l i d phase v Vapour phase 1 L i q u i d phase 1 2 L i q u i d phase 2 - (As i n K): Vector quantity Superscripts m Mean-value point defined following Eq. (6-42) o Standard state; i n i t i a l point 6-2 The Phase-fraction Approach The phase-fraction formulation has been applied by a number of workers to v a p o u r - l i q u i d - l i q u i d systems (for example: Osborne, 1964; Henley and Rosen, 1969; Deam and Maddox, 1969; Erbar, 1973; Peng and Robinson, 1976; Mauri, 1980). Most of these algorithms use a two-dimensional Newton-Raphson method of convergence. They v a r i o u s l y employ { i ^ , ^ } , { i ^ / F , I ^ / F } , { V / I ^ , and {v/F, ^ / ( L ^ ) } as the check vari a b l e s . The l a s t form, which i s due to Henley and Rosen (1969), ensures that the check variables have cle a r l y - d e f i n e d l i m i t s of 0 and 1. In the more general development for s o l i d - l i q u i d - l i q u i d - v a p o u r e q u i l i b r i a presented below, the approach of Henley and Rosen has been employed, with one important departure: the above-named authors defined the equilibrium r a t i o s by -220-K l i = y i / x l i and K 2 i = y ; L / x 2 i ; In t h i s work, the second r a t i o has been replaced by K2±^xl±' This modification introduces two advantages: (1) The working equations assume a simpler form. (2) I t makes for easy a p p l i c a t i o n to a two-phase l i q u i d - l i q u i d system. 6-2-1 The Problem Formulation The total-mass balance equation i s given by F = V + L 1 + L 2 + S (6-1) For the component-mass balance we have Z i • V h± + hi + s i ( 6 ~ 2 ) Expressing Equation (6-2) In terms of t o t a l flows and mole f r a c t i o n s , we have F z ± = V 7 l + L x u + L 2 x 2 1 + S x s l (6-3) Define ev = -J- (6-4) eL = ^ (6-5) and 8 s = p . V S . ^ (6-6) Combining Equations (6-4) through (6-6), we obtain V = F6 v (6-7) L2 = F 8 L ( 1 " V ( 6 _ 8 ) and S = F6 (1 - 9 )(1 - 8 t) (6-9) s v L -221-Substituting Equations (6-7) through (6-9) into Equation (6-1) leads to L. - F ( l - 6 )(1 - 9 )(1 - 9 ) (6-10) 1 v L s Let the equilibrium r a t i o s be defined by y i = K v i x l i < 6- U> X 2 i " ^ 1*11 ( 6~ 1 2> and x . = K . (6-13) s i s i l i When Equation (6-1) and Equations (6-7) through (6-13) are combined, we have x. - z,/[e K . + e (i - e )K . + e (i - e )(i - e )K . l i i v v i L v L i s L v s i + (1 - 8 )(1 - 9 )(1 - 6 )] (6-14) S Li V Now, define the check functions N f,(8 ,6,8 ) = I (x - y ) (6-15) 1 v L s l i i N f,(9 ,6 ,9 ) = I (x - x ) (6-16) 2 v L s l i 2 i N and f,(9 , 8 6 ) - £ (x - x ) (6-17) j v L s l i s i Equations (6-11) through (6-17) constitute the working equations. The main steps of a general algorithm are: (1) Information i s supplied as to which of the four phases are expected to exist (where there i s doubt, the maximum possible number of phases i s assumed). (2) 9 , 9T and 9 are appropriately i n i t i a l i z e d , and mole v L s fr a c t i o n s are i n i t i a l i z e d for phases that have been assumed to e x i s t . -222-(3) Appropriate K values are computed and the relevant ones amongst Equations (6-7) through (6-14) are solved. (4) The relevant check functions are computed and new values of the relevant phase fract i o n s are determined through an appropriate a c c e l e r a t i o n technique. (5) Any phase whose phase f r a c t i o n i s nonpositive i s eliminated. (6) Convergence i s tested f o r . The i t e r a t i o n i s terminated i n the event of a p o s i t i v e outcome; otherwise, control i s transferred to Step 3. I t should be mentioned, for the records, that a double-loop version of the above algorithm, involving an i t e r a t i v e implementation of Step 3 with the objective of correcting for the composition-dependence of the K values, was also studied and was abandoned because i t performed very poorly. 6-2-2 Solving by a Newton-Raphson Approach In applying the Newton-Raphson acceleration method to converge the phase-fraction formulation of the multiphase problem, the p a r t i a l d erivatives of the check functions with respect to the relevant phase f r a c t i o n s are evaluated a n a l y t i c a l l y . For any two-phase system, only one p a r t i a l d e r i v a t i v e i s involved and what we have i s the Newton method. For a three-phase system, four derivatives are required and the inverse of the r e s u l t i n g 2 x 2 square matrix i s obtained d i r e c t l y , using the fact that '11 '21 l12 22 22 -a -a 21 12 '11 a a — a a 11 22 12 21 -223-A four-phase system requires a 3 x 3 Jacobian matrix. The matrix inversion i s performed through a Gauss-Jordan elimination method (La Fara, 1973). With the inverse of the Jacobian matrix thus determined, the phase-fraction vector, 9_, i s updated from 6 n + 1 = 6_n - J _ 1 ( f / ^ n ) . f _ ( ^ n ) ... (6-18) where 6 i s a vector with the dimension of 1,2 or 3 depending on whether the system has 2,3 or A phases. 6-2-3 Employing a Quasi-Newton Approach The quasi-Newton method was applied to the multiphase problem i n order to c a p i t a l i z e on the two advantages that i t has over the Newton method: i t s avoidance, a f t e r the f i r s t i t e r a t i o n , of the evaluation of p a r t i a l derivatives; and i t s elimination of the matrix-inversion step of the Newton method. As a further improvement, the step-limited unidimensional search on t, as proposed by Broyden (1965), i s employed — t being defined by e n + 1 = e n + t N H n f ( e n ) (6-19) In Equation (6-19), H° = -J _ 1(f/e°) For a two-phase system, H N (n > 0) i s determined from the 'quasi-Newton' method of Section 7-8, the appropriate recurrence formula being H n = H ( n - D / ( 1 _ f n / f ( n - l ) } For a system containing more than two phases, the recurrence formula of -224-Broyden (1965) Is employed, thus r R ( n - l ) n _ f ( n - l ) + ( n - l ) H ( n - l ) f ( n - 1 ) i ( n - l ) f ( n - l ) ^ ( n - l ) H N= H N _ 1 - ~ ~ ~ J ~ ~ ~ - - ( H ( n - l ) f ( n - l ) ) T H ( n - l ) ( f n _ f ( n - 1 ) ) T In performing the unidimensional search on t, f_ i_ i s used as the objective function to be minimized. A q u a d r a t i c - f i t method (discussed i n some d e t a i l i n Section 9-7-1) i s employed i n the search, and the search i s terminated as soon as a t i s obtained that gives an improved value of the objective function. 6-2-4 P a r t i t i o n i n g Method with MVT and Tetrahedral P r o j e c t i o n This Is an attempt at d i r e c t l y extending the Wegstein-projected MVT-accelerated univariate method for two-phase systems to the multiphase problem, the only philosophical difference being that the tetrahedral projection method has replaced the triangular projection method, which i s the multivariate equivalent of the Wegstein method. The method involves updating through a successive s u b s t i t u t i o n that matches 6 ^ 6 L a n d 9 g with Equations (6-15), (6-16) and (6-17) r e s p e c t i v e l y . For each successive-substitution step, the relevant 9 i s updated by means of the mean-value-theorem technique. A new value of the 6_ vector having been obtained, a further improvement of the _9_ values i s sought through tetrahedral p r o j e c t i o n . 6-3 The Geometric Programming (GP) Formulation For a geometric-programming formulation of the multiphase problem, the following s p e c i a l symbols w i l l be introduced: g. = a thermodynamic a t t r i b u t e (see d e f i n i t i o n below) of component i i n phase p. - 2 2 5 -M = t o t a l number of phases i n the system. = number of components i n phase p w^p = number of moles of component i i n phase p. = t o t a l number of moles i n phase p p = subscript denoting 'phase'. A l l other strange symbols that feature i n this section r e t a i n the d e f i n i t i o n s of Section 3-3-4. For the M-phase system, G (as defined i n Section 3-3-4) i s given by N N ° g = i X w * p [ ~ ^ + * n c~!oV ( 6" 2 o ) p=l i=l f Define C = - 1 — exp{-y° /RT} (6-21) ip f W and g = - i E - 2 . . (6-22) ip j.O i p i p ^ i p n a s D e e n defined such that i t contains no molar q u a n t i t i e s . I f we substitute Equations (6-21) and (6-22) into Equation(6-20) and we define C = w = 1 o o w and v(w) = (C O/W q) °exp{-G/RT}, the r e s u l t i s N w M p w W v(w) = (C /w ) ° H { n (C. /w ) l p W p} (6-23) p=l i = l p p p -226-I f we further define a . = -Z ., oj J and a. . = { i-JP 1 for i = j 0 for i * j then a mass balance for component j y i e l d s M N p a w + I I a . w = 0 ( j = 1,2,...,N) ° 2 ° p=l i=l i j p i p (6-24) A comparison of Equations (6-23) and (6-24) with Equations (C-6) and (C-12) (Appendix C-l) shows that the above equations constitute the dual program for a problem with M constraints and with n = 1, so o that £ w = w = 1 i e j f o ] ° The p o s i t i v e l y conditions are, of course, automatically binding since w^p» being a molar quantity, i s always p o s i t i v e . The a p p l i c a t i o n of Equations (6-23) and (6-24) to liquid-l i q u i d - v a p o u r e q u i l i b r i a i s presented i n Section 6-3-1 below while i t s extension to the s o l i d - l i q u i d - l i q u i d - v a p o u r case i s outlined i n Section 6-3-2. 6-3-1 Liquid-liquid-vapour E q u i l i b r i a For an N-component liquid - l i q u i d - v a p o u r system where a l l components are soluble i n a l l three phases, Equation (6-23) becomes: n w n I l li ] L 2 i V "JrT _ O C i L l L i l 2 , C i v _ w o _ i i=l L ^ i J L v i _ *>_»±i >_2 -S i m i l a r l y , Equation (6-24) becomes I L l L2 V 1L1 L 2 V V (6-25) " Z j + + X 2 j + V j = 0 ( j = 1.2.-...N) (6-26) -227-Following the procedure employed i n Section 3-3-4, we have -z N and to obtain the orthogonal transformation, we follow the steps: -Z Interchange rows 1 and ( N + l ) and p a r t i t i o n as shown -Z Extract the negative transpose of lower segment Append a (2N + 1) i d e n t i t y matrix below the l a s t row 1 ~h ~h ^(2N+1) Interchange rows 1 and (N+l) 1 > U ) 1 -22.8-{t/j)} i s the desired transformation. I t i s a (3N + 1) by (2N + 1) matrix whose j t h column i s given by _ b ^ \ The vector b ( o ) i s defined by ^(o) = [ 1 ,Z 2 , • •. ,Zjj,0,0,... ,0 ] , while b ^ ( j = 1,2 2N) i s the column vector { b ^ } such that for (j=l,2,...,N), ^ -1 for i = j+1 = 1 for i = N+j+1 _ 0 for a l l other i ' s and for ( j = N+l, N+2,...,2N), f_ -1 for i = j-N+1 1 for i = N+j+1 L_ 0 for a l l other i ' s The vector w i s defined by ( > 2 N ( -\ w.= b ^ 0 ; + I r.b)3) (1=0,1, ,2N) i 1 , , ] i 1=1 where, i n th i s case, T W = [ W 1- , 1, _T V . . . . V 1_ . .... 1_ • J — L o 1,1 1,N 1 N 2,1 2,NJ Substituting for b ^ ( j = 0,1,...,2N) i n Equation (6-27) we have (6-27) 1 l i Z i " r i " rN+i V i = r i 1 = r 2 i N+i Equil i b r i u m requires ( i = 1,2,...N) (6-28) H^ 1 ( I l ^ » I 2 ) = 0 (J " 1.2.....2N) (6-29) - 2 2 9 -Combining Equations (6-25), (6-28) and (6-29) and si m p l i f y i n g the r e s u l t , we have: for ( j = 1,2 N), C. v. L - v 1 I TT < « - * » jL 1 j and for ( j = N+l, N+2,...,2N), j L l 2 1 j From the d e f i n i t i o n s of the C s , i t can re a d i l y be shown that C j v „ Y J L l f j L l = C3L1 * j P ^ a n d C_JL2 m Y j L l f j L l m j L 1 Y j L 2 f j L 2 Hence, Equations (6-30) and (6-31) become v. L K v i = V 1 J T ( J = 1 » 2 » ' - - » N ) < 6 " 3 2 > 1 j X21 L l and K . = (6-33) Lj L 2 l L j Equations (6-32) and (6-33) are the equilibrium r e l a t i o n s h i p s . When they are combined with Equation (6-28) and expressed i n terms of the variables v_ and 1^ i n a manner s i m i l a r to the vapour-liquid case, the r e s u l t i n g equations are (for i = 1,2,...,N): ? N (1 - K ,)v, -[F - I 1- . - K ,(Z, - 1„.) - (1 - K ,)A . ]v. v i i L . , 2 i v i i 2 i v i v i J i + K v i ( Z i - V ^ i = ° ( 6 ~ 3 4 ) -230-and (1 - K L i ) l 2 2 . - [F - v. - K L ± ( Z 1 - v ± ) - (1 - K L i ) X L i ] l 2 1 + *Li< Z± ~ V XLi = ° ( 6 " 3 5 ) where N X . = I v ^ X L i = I h2 j * i J Equations (6-34) and (6-35) constitute the 2N equations that have to be solved simultaneously for and 1^• 6-3-2 S o l i d - l i q u i d - l i q u i d - v a p o u r E q u i l i b r i a The development i s s i m i l a r to that of liquid - l i q u i d - v a p o u r e q u i l i b r i a . The d e t a i l s have therefore been omitted and only a summary of the f i n a l r e s u l t s i s presented. The 3N equations that r e s u l t from applying the transformation are (for i = 1,2,... ,N): ( 1 _ K ) v 2 . [ F _ j ( 1 + j _ K ( z _ ^ _ } _ ( 1 . K v ± ) X ]v J=l J J + K v i ( Z i " hi - S i ) X v i = °> < 6' 3 6) ( 1 " " L i ^ l ' f F " \ ( V j + S j ) " ^ i " V i - S i ) " " hl^hl 1=1 + *L1<Z1 " V i " S i ) X L i = ° ( 6 " 3 7 ) -231-and 2 N (1 - K v ^ s i ) s i -[F - ^ (v. + 12.) - K 8 l ( Z ± - v ± - l 2 i ) - (1 - K s l ) X s i ] S i + K s i ( V Vi - hiKi " ° <6"38> where N * - I s. J * i J In solving the above equations, the following bounds are imposed on the variables 0 < v < Z ± 0 < l 2 i < ( Z ± - v ± ) ° < 8 1 < < Z l - v i - l 2 i > _ J (6-39) F i n a l l y , 1 i s computed from l ^ Z - v - ^ - ^ (6-40) 6-3-3 Solution Methods A general algorithm for handling the GP problem has the following basic structure: ( 1 ) A number of phases i s assumed, based on information supplied by the user, and storage i s appropriately a l l o c a t e d . ( 2 ) The relevant component flows are i n i t i a l i z e d . (3) K values are computed and the relevant component flows are updated through a successive-substitution approach applied to Equation (6-36) through (6-38). In the update, the flows are constrained within the bounds defined by Equation (6-39). -232-(4) Convergence i s tested f o r . If the outcome i s p o s i t i v e , execution i s terminated; otherwise Step 5 i s implemented. (5) If any phase composition reduces to zero (within some tolerance), that phase i s eliminated. (6) Acceleration i s performed on v^ , 1 and s_> as applicable, through an appropriate method and _1 i s updated from Eqaution (6-40). (7) Control i s transferred to Step 3. The two vector-projection methods developed i n Section 3-3-8 are employed i n Step 6. For the general four-phase system, the vector i s defined by w = {y_, 1^ > s}» a n& i t i s appropriately reduced for less than four phases. The a p p l i c a t i o n of the successive-substitution method to Equations (6-36) through (6-38) could take one of two forms: (1) Phase-by-phase Arrangement. This involves updating the variables i n the order [v ( j = 1,2,...N), 1 ( j = 1,2 N), s ( j = 1,2,...,N)] (2) Component-by-component Arrangement In t h i s case, the updating order i s [v , 1 2 , s ( j = 1,2....,N)]. The two arrangements are i d e n t i c a l for any two-phase system. To test the r e l a t i v e performance of the two structures, they were applied to four l i q u i d - l i q u i d - v a p o u r systems, with i n i t i a l i z a t i o n based on Scheme 1 of Section 6-6. The tetrahedral projection method was employed. The r e s u l t s , presented i n Table 6-1, reveal that the r e l a t i v e performance depends on the system being handled. Subsequent studies are based on Arrangement 1. Table 6-1 I t e r a t i o n counts obtained from a p p l y i n g the two GP arrangements to l i q u i d - l i q u i d - v a p o u r systems System Code Temp (K) P h a s e - b y - p h a s e a r r a n g e m e n t Component-by-component a r r a n g e m e n t LB 335 .50 16 13 LC 364.60 66 52 L E 364 .0 21 28 LF 365 .0 22 37 -234-The next step taken was to test the e f f e c t of the constraints of Equation (6-39) on the convergence properties of the GP algorithm. The following four constraining methods were studied: Method 1: No constraints are applied Method 2: The values of the variables r e s u l t i n g from the a c c e l e r a t i o n step are constrained according to Equation (6-39). The values obtained from the successive-substitution step are not constrained. Method 3: The values of the variables obtained from the successive-substitution step as well as those r e s u l t i n g from the a c c e l e r a t i o n step are constrained according to Equation (6-39). Method 4: This method i s s i m i l a r to Method 2 except that any v a r i a b l e that strays out of i t s bounds i s set to i t s previous value instead of the l i m i t i n g value defined by the constraints. The four methods were applied to 16 systems: 5 vapour-liquid, 5 l i q u i d - l i q u i d , 2 l i q u i d - s o l i d , and 4 l i q u i d - l i q u i d - v a p o u r . The i n i t i a l i z a t i o n scheme and the acceleration method employed are the same as for the structure test e a r l i e r reported. As i t turned out, the four methods required exactly the same number of i t e r a t i o n s for each of the 16 systems. This outcome favours not applying the constraints at a l l . 6-4 The Sensitivity Approach While the s e n s i t i v i t y method performed quite well with vapour-liquid systems, i t was far less successful with l i q u i d - l i q u i d and l i q u i d - s o l i d systems. As to how i t w i l l perform with multiphase systems — w e l l , i t i s only by eating the pudding that one gets to know i t s true taste. To be able to rest assured that nothing has been l e f t untested -235-which ought to have been tested, a multiphase version of the s e n s i t i v i t y method has been developed here, i n defiance of the cumbersome algebra involved. The following three subsections present, i n a n u t s h e l l , the development of the working re l a t i o n s h i p s for a general two-phase system, a general three-phase system, and a four-phase system re s p e c t i v e l y . 6-4-1 A General Two-phase Problem The development i n this section covers the following two-phase combinations: vapour-liquid, l i q u i d - l i q u i d and l i q u i d - s o l i d . The method has already been applied to these phase-combinations i n Chapters 3 and 5, based on the contents of Chapter 4. I t i s merely summarized here i n a form that v i v i d l y emphasizes i t s l o g i c a l extension to multiphase systems. For convenience, l e t us use vapour-phase symbols to denote the second phase which could be a vapour, l i q u i d or s o l i d phase — and the normal liquid-phase symbols to denote the base l i q u i d phase. Following from Chapter 4, we have ,m. n . . ,,n J Av = A£nK (6-41) —v where J (6-42) with { 1 for j = i 6 0 for j * i ; Av n n+l n v - v -236-n y and A£nK n, = JlnK^ - J t n ( — ) . v i v i n X i m i s given by m n , , n+1 n. v = v + a(v - v ) m m in with 0 < a < 1. 1^ , V and L are s i m i l a r l y defined. I f we substitute Equation (6-42) into Equation (6-41) and manipulate the re s u l t i n a way s i m i l a r to what was done i n Section 4-2-1, the outcome i s Av n - e , .AVn + e _. (j = 1,2,...,N) (6-43) j v l j v2j V J ' ' ' where e . . = —j- ( + ), v l j d. vm Lm^' 1 A^nK n,, v 2 J a. VJ and d . = — r ^ J v m x m j j By summing Equation (6-43) over a l l j and rearranging the r e s u l t , we have AV n = (6-44) where N F - ~ I e . . v . , v2j J=l N and D = I e - 1 • i v l j J-1 J -237-A s u b s t i t u t i o n of Equation (6-44) into Equation (6-43) leads to the value of Av 1 1 and hence of vn+^, 6-4-2 The Three-phase Problem The re l a t i o n s h i p s developed here are capable of handling any of the following three-phase combinations: v a p o u r - l i q u i d - l i q u i d , vapour-l i q u i d - s o l i d and l i q u i d - l i q u i d - s o l i d . The base l i q u i d phase i s denoted here by the normal l i q u i d symbols while the other two phases are, for convenience, denoted by the symbols for vapour and s o l i d phases r e s p e c t i v e l y . Following the same approach as for two-phase systems, we have JAr 1 1 = AJtnKn (6-45) where A_rn = {Av^As 1 1} and A£nK n = {A£nK n,A£nK n} —v Expressing £nK as a function of _r, we have fcnK . = Jim* - £nV + £n(F - V - S) - An(Z, - v j - S j ) _ i v i i 1 i i ^ and £ n K s i = £ n s i " £ n S + £ n ( F ~ V - S) - Zn(Z± - v± - s ± ) . (6-46) The Jacobian, J , i s determined by d i f f e r e n t i a t i n g Equation (6-46) with respect to _r. When this i s substituted into Equation (6-45) and the r e s u l t s i m p l i f i e d , the outcome i s (6-47) + J L ) A v n + -L- As" - (^- + J - ) AVn — AS n = AAnKn. vm xm j ±m 2 v * ^ L* v j 3 3 i and I Av n + (— + — ) As n - — AV n - ( ^ + -1 ) AS n = AJlnK n. (6-48) l m J s m l m 2 L m S m L m S J -238-I f Equations (6-47) and (6-48) are solved simultaneously for Av n and As*!, the r e s u l t i s 3 3 i v % e , .AVn + e 0 .ASn + e „ ., (6-49) j v l j v2j v 3 j ' and A s n = e , .AVn + e , .AS*1 + e - , (6-50) j s l j s2j s3j where e e e . . « ( i - + i - ) + _ L . ] , v l j d. L ITm \.m m Tm mJ j V 1. s . L s. 3 3 3 = l _ r _ i L.1 v2 j d . L T m m „m, mJ' j L s . S 1 . J 3 - J T [ ( — +^-)A£nK n. - ^ - AJlnK n.], 3 1 3 e s l j d.LLmvm vm i m 1 + s z j d. _,m ,m m Tm mJ' j S 1. v . L v . 3 3 3 , = ! _ [ ( ! - + !-)AiLnK n, - — A £ n K n . l , s3j d j v m 1 S J l m V J and d . = — — + — — + 1 j mm ,m m m, m J V.s . 1.s . v . l . j 3 3 3 3 3 By summing Equations (6-49) and (6-50) respectively for a l l j ( j = 1,2,..,N) and solving the r e s u l t s simultaneously for AV n and AS n, we have j=l J j-1 J j=l J j=l J -239-N N N N and M » - l»l< Uv3iH Usli) - lU^ll^-n] (6-52) N N N N where D = ( £ e - 1)( £ e - 1) - ( £ e )( £ e ) j = 1 v l j j = 1 s2j j = 1 s l j j = 1 v2j A combination of Equations (6-49) through (6-52) gives the adjustments i n the phase molar quantities for the nth i t e r a t i o n . 6-4-3 The Four-phase Problem For the general v a p o u r - l i q u i d - l i q u i d - s o l i d system, the phase symbols are exactly the same as those employed i n Sections 6-2 and 6-3. The development follows the same path as for the three-phase system, except that the process i s far more involved here. Only a summary of the f i n a l r e s u l t s i s presented. The changes i n the phase component flows are given by Av n = e . .AVn + e „ . AL" + e - .ASn + e , . (6-53) j v l j v2j 2 v3j v4j A l " = e T 1 .AVn + e T 0 .AL? + e T , .As" + e T . . (6-54) 2j L l j L2j 2 L3j L4j and As^ = e s l .AVn + e ^ .AL* + e g 3 .A S n + e s 4 j (6-55) where e v l • " T~[ — + — ( C t . + C, . + C 0 .) 1, J j L M " J 3 J 2 J 1 e = kj - l l - J I 1 v2j d . L _m Tm J ' •3 ^ V2 ..j-[.si-fa. ], v3j d. m m J ' -240-L V 6j 3j l y v j 3j T, 2j s j J 1_ r _ 5 j _ _3_J l d. L Tm TTm J' J \ V 1 C S - 1 d L m m 5j 3j j L l L 2 [ ( C 5 j + C 3 j + C l j > M n K l ! j " C l j M n K s j " C 3 j A * < j ] » i _ r 1 d. 1 Tm ,.m J' J L x V 2_ _ _ l l 1 d. L Tm Tm J ' J L 2 1 V 1 i _ [ _ H + i _ (C + C l . + c _ , ) ] , j L m S m J J J — [(C + C + C )AJlnKn - C A£nK n - C A£nK n ], dj * j l j 2j s j l j L j 2j v j -^-(C. . + C. . + C 0 .) + -^J- , gm l j * J i m j l j m,m ' v .1. . J l j m m ' l j 2j -241-' 3 1 ,m m' 1, .s . 41 m,m ' '51 mm' v .s . J J and J6i , 1 m J l 0 . s . 2j J The simultaneous solution of Equations (6-53) through (6-55) for ,„n .,n , ,„n _ AV , AL 2 and AS leads to F AV n = (6-56) A L n = ^ , (6-57) F and AS n - jp-, (6-58) where F v " t EL3 Es2 " ( E L 2 - 1 ) ( E s 3 " + t Ev2 ( E 83 " ^ " ^ 2 ^ 4 + t Ev3 ( EL2 " 1 } " E v 2 E L 3 ^ E s 4 ' F L " t E L l ( E s 3 " X ) - E L 3 E s J E v 4 + K 3 E s l " ( E v l " 1 ) ( E S 3 " + [ ( E v l " 1 ) E L 3 - E v 3 E J E s 4 > - 2 4 2 -F s " [ ( EL2 " 1 ) E s l " E L l E s 2 ] E v 4 + ^ v l " 1 ) E s 2 " E V 2 E S 1 ^ 4 + t E v 2 E L 1 " < E v i " D ( \ 2 " 1 ) ] E s 4 > and ° " t ( E L 2 " 1 ) ( E s 3 " X ) " E L 3 E s 2 ^ E v l " X ) + [ E L 3 E s l " E L l ( E s 3 " l)Kl + [ E L l E s 2 " ( E L 2 - 1 ) E s J E v 3 In the above d e f i n i t i o n s , the E's are given by N E = I e pn j = 1 pnj where p = v, L or s, and n = 1,2,3, or 4. Equations (6-53) through (6-58) constitute the working equations. 6-4-4 The General Algorithm In the implementation of the s e n s i t i v i t y method, the r e l a t i o n s h i p s of Section 6-4-1 through 6-4-3 are b u i l t into a general algorithm. The class of r e l a t i o n s h i p s applied to any system at any stage of the i t e r a t i v e solution then depends on how many phases presumably e x i s t . The algorithm i s , as i n previous applications of the s e n s i t i v i t y method, based on the mean-value-theorem (MVT) technique, and the MVT parameter, a, i s taken to be 0.5. The general algorithm consists of the following main steps (1) Based on information supplied as to the phases that could possibly e x i s t , i n i t i a l i z e a l l relevant equilibrium r a t i o s , mole f r a c t i o n s , phase component flows and phase t o t a l flows. (2) Apply the equations of Section 6-4-1, 6-4-2 or 6-4-3, -243-depending on whether there are 2, 3 or 4 phases. In every case, obtain the quantities superscripted with 'm' i n the equations by f i r s t solving the equations with 'm' replaced by 'n' and then incrementing the current values of the unknown molar flows by half the r e s u l t i n g A values. (3) Eliminate any phase whose t o t a l flow i s within a tolerance of zero. (4) Test for convergence. I f the outcome i s p o s i t i v e , then terminate the i t e r a t i o n ; otherwise go to Step 2. In the event of an e x i s t i n g phase not containing a p a r t i c u l a r component — a very r e a l p o s s i b i l i t y with the s o l i d phase — , the phase flow i n question i s set to a value within a tolerance of zero. The method does not admit of zero flow values as this would make some of the terms i n the working equations indeterminate. 6-5 Some A l t e r n a t i v e Formulations Two a l t e r n a t i v e formulations are introduced here. They are designed such that they could employ 1^ as the independent variable and thus peg the dimension of the problem at N, i r r e s p e c t i v e of the number of phases involved. A l t e r n a t i v e 1 The GP algorithm of Section 6-3-3 applies, except that the successive-substitution step takes the following form (applied to i from 1 to N): Step 1 Compute 1 s i (6-59) v i -244-hi = \ i h i 3nd S i = Si1!!' where A v i = V K v i / L l ' \i * L 2 K L i / L l and A = SK /L, s i s i 1 For any phase that does not e x i s t , A i s set to zero. Step 2 Update the t o t a l phase-flows based on the updated flows for component i . A l t e r n a t i v e 2 It also d i f f e r s from the GP algorithm of Section 6-3-3 i n the successive-substitution step. By rearranging Equation (6-59) and introducing the d e f i n i t i o n s . X = L l " h i ' X v = V - v ± > X L = L2 " h i ' and X = S - s , s i we would have hi\X + hi + K v i ( X v + V + K L i ( X L + 12i> + K s i ( X s + 8 ± » - Z ±(X + 11±) = 0 (6-60) Substituting the r e l a t i o n s h i p s for ^ a n d u n d e r A l t e r n a t i v e 1 into Equation (6-60) and rearranging, we have -245-t 1 + K v i A v i + ^ A i + K s i A s i ^ l i + lX + \ i \ + \ i \ + K si X s - Z ± \ ± - X Z i • ° ( 6 ' 6 1 ) 1 ^ i s updated by applying a Newton i t e r a t i o n step to Equation (6-61). The r e s u l t i n g 1 does not y i e l d component-mass balance when employed i n updating v ± 2 ± and s± according to the r e l a t i o n s h i p s under Al t e r n a t i v e 1. To ensure component-mass balance, we employ the r e l a t i o n s h i p s V i = \iV X 2 i = V i ' and s. = A . 8 ., I s i I where 3 ± = ( Z ± - + \ ± + A^) Each of the two a l t e r n a t i v e methods Is implemented In two forms: Form 1: The tetrahedral-projection method i s employed, using the same var i a b l e vector as i n Section 6-3-3. Form 2: Here, the reduced-dimension form e a r l i e r mentioned i s implemented. This involves applying tetrahedral p r o j e c t i o n to the vector JL . For either a l t e r n a t i v e , the r e s u l t i n g 1± i s employed i n updating the other component-mass flows from the relevant r e l a t i o n s h i p s under 'Alternative 2' above. 6-6 Initialization Schemes Three i n i t i a l i z a t i o n schemes were studied. Scheme 1: This scheme involves the following steps: (1) Set the phase fract i o n s for phases that cannot exist to zero. I n i t i a l i z e the other phase-fractions according to the adopted - 2 4 6 -i n i t i a l i z a t i o n schemes for the appropriate two-phase systems each case assuming the existence of only two phases. (2) U t i l i z i n g Equations (6-7) through (6-10), compute (where appropriate): 3 =_! = (1_es)(i-eL)(i-ev), V + L a = — — - = 6 + 3 , v F v L + L a L = - 2 - _ - l = eL(i-ev) + g, S + L and o — - = 9 (1-9 ) ( l - 9 ) + B S F S L V (3) Compute (where appropriate): V i " V i ^ 1 + ( 1 - Q v ) / e v K v i ^ i°± = ^ /{i + d-e L)/9 LK L i}, s° = a Z,/{l + (1-9 )/9 K } i s i 1 s s s i J and 1° - h - ( v j + l | ± + .J) Scheme 2: The following steps are involved: (1) Same as Step 1 of Scheme 1. (2) Compute 3 as i n Scheme 1 and from ^ I = V*1 + A v i + Si + Si> where A - 9 K ./e, v i v v i Si • ( 1 - V 9 L K L i / 0 -247-and A = (1-9 )(1-9 t )6 K /8 s i v L s s i (3) Compute (where appropriate): 0 _ o o _ o o _ o V i " v i h i ' L2± \±Lli ' s i ~ s i h i Scheme 3: This method e n t a i l s the following steps: (1) Determine 9° as i n vapour-liquid e q u i l i b r i a using Z_ as the system mixture. Then compute v° = z . / { i + (i-e°)/e°K } 1 i 1 v v v i J (2) Determine 9° as i n l i q u i d - s o l i d e q u i l i b r i a using s (Z - v°) as the system mixture. Then compute • j • ' z i - + ^y^j (3) Determine 9° as i n l i q u i d - l i q u i d e q u i l i b r i a using Li (Z^ - v° - s°) as the system mixture. Then compute Compute 1^ by component-mass balance. Where t o t a l phase flows and phase mole fr a c t i o n s need to be i n i t i a l i z e d , they are computed from the component flows obtained from any of the schemes above. The three i n i t i a l i z a t i o n schemes give i d e n t i c a l r e s u l t s f o r two-phase systems. To compare t h e i r performances with multiphase systems, they were applied to the four liquid-liquid-vapour systems f o r which information i s a v a i l a b l e . Table 6-2 contains the r e s u l t s of t h i s l i m i t e d a p p l i c a t i o n . The r e s u l t s favour the choice of Scheme 1. Table 6-2 Iteration counts for different i n i t i a l i z a t i o n schemes, applied to liquid-liquid-vapour systems System Temp Scheme Scheme Scheme Code (K) 1 2 3 LB 335.50 16 21 21 LC 364.60 66 f 71 LE 364.0 21 30 22 LF 365.0 22 30 44 f = f a i l u r e -249-6-7 Applications For the purpose of applying the various methods discussed i n the preceding parts of this chapter, the following algorithms have been implemented: (1) The phase-fraction method with Newton-Raphson acceleration. (2) The phase-fraction method with quasi-Newton acceleration. (3) The p a r t i t i o n e d phase-fraction method with MVT and tetrahedral projection. (4) The GP method with triangular projection. (5) The GP method with tetrahedral p r o j e c t i o n . (6) The s e n s i t i v i t y method. (7) A l t e r n a t i v e Formulation 1 with reduced dimension. (8) A l t e r n a t i v e Formulation 1 with GP dimension. (9) A l t e r n a t i v e Formulation 2 with reduced dimension. (10) A l t e r n a t i v e Formulation 2 with GP dimension. It should be mentioned that i n implementing each of the algorithms above, allowance i s made for the p o s s i b i l i t y of reducing to zero while i s greater than zero. In such an event, l i q u i d phase 1 i s eliminated and l i q u i d phase 2 i s redefined as l i q u i d phase 1, the base l i q u i d phase. Should reduce to zero while i s also equal to zero, execution i s automatically terminated. The scope of the a p p l i c a t i o n of the algorithms has been highly r e s t r i c t e d by the lack of information on multiphase systems, with the r e s u l t that only the liqu i d - l i q u i d - v a p o u r multiphase combination has been solved for four systems. The applications are i n two forms. One form involves assuming the r i g h t number of phases known to exist at equilibrium. The other -250-form i s based on assuming more phases to be present than a c t u a l l y e x i s t . Assuming the Right Phase Combination This form was applied to 16 systems: 5 vapour-liquid, 5 l i q u i d - l i q u i d , 2 l i q u i d - s o l i d and 4 l i q u i d - l i q u i d - v a p o u r . Appropriate information on the systems and the r e s u l t s obtained from applying each of the 10 algorithms to them, at one point each, are presented i n Table 6-3. The r e s u l t s lead to the following observations: (1) The quasi-Newton phase-fraction algorithm i s unreliable except for vapour-liquid systems. (2) For two-phase systems, the 'Alternative formulations' show performances that are comparable to those of the 'GP algorithms' that are based on the same convergence method. (3) The reduced-dimension forms of the 'Alternative formulations' give very sluggish convergence for multiphase systems. (4) For multiphase systems, the 'Partitioned phase-fraction algorithm' and the ' S e n s i t i v i t y algorithm' run into convergence problems. This must be the e f f e c t of n o n i d e a l i t i e s , for when these two algorithms as well as the 'Newton-Raphson phase-fraction algorithm' and the 'GP algorithms' were tested with the sample quarternary li q u i d - l i q u i d - v a p o u r problem which was solved by Osborne (1964) and by Deam and Maddox (1969) — the problem i s based on constant K values — a l l the algorithms converged speedily to the righ t s o l u t i o n . (5) In the multiphase applications, none of the algorithms excels f or a l l systems. Assuming Redundant Phases Ten systems were involved i n t h i s a p p l i c a t i o n . Table 6-4 Table 6—3 Iteration counts for the various multiphase algorithms, based on assumption of the right number of phases ro System Code Temp (K) Phases Phase--fraction algor thms GP algoi -ithms Sensitivity algorithm Alternt with re dimei itives •duced is ion Alternt witt dimei itives l GP ision Newton-Raphson Quasi-Newton Partitioned Triangular Projection Tetrahedral Projection Form 1 Form 2 Form 1 Form 2 VD 356.0 LV 7 5 7 6 6 7 7 7 7 7 VH 329.5 LV 9 6 9 9 10 9 8 7 8 7 VJ 353.0 LV 5 5 5 6 7 5 7 7 7 7 VN 515.5 LV 5 5 4 2 3 4 4 4 4 4 VP 470.0 LV 4 4 3 3 5 3 4 5 4 5 LB 298.0 LL 21 fc 22 9 7 22 7 8 7 8 LC 303.0 LL 33 13 32 13 7 32 10 8 10 8 LD 328.0 LL 54 f 54 8 10 53 9 11 9 11 LE 330.0 LL 36 fc 35 14 8 35 9 8 9 8 LF 330.0 LL 38 fc 38 19 9 38 11 9 11 9 SA 78.7 SL 5 6 6 7 5 6 5 6 5 6 SB 92.66 SL 14 fc 14 13 : 6 14 8 7 8 7 LB 335.50 LLV 16 f f 17 16 f NC NC 13 21 LC 364.60 LLV 42 f f 58 66 f NC NC 44 35 LE 364.0 LLV 36 f 42 38 21 f NC NC 29 33 LF 365.0 LLV 41 fc f 38 22 f NC NC 36 32 f = failure; fc : faulty convergence; NC = convergence not attained in the set iteration limit of 100 -252-contains information on: (1) The system code-name and temperature. (2) The expected and assumed phases i n the system ('S', 'L', 'V denote ' s o l i d 1 , ' l i q u i d ' and 'vapour' phases r e s p e c t i v e l y ) . (3) The outcome of the i t e r a t i o n . (4) The average increase i n number of i t e r a t i o n s — r e l a t i v e to applications based on the righ t phase combination — for l i q u i d - l i q u i d systems with liqui d - l i q u i d - v a p o u r phases assumed, and for liquid-vapour systems with solid-liquid-vapour phases assumed. (The r e s u l t s for l i q u i d - l i q u i d and li q u i d - l i q u i d - v a p o u r systems assuming s o l i d - l i q u i d - l i q u i d - v a p o u r have not been s i m i l a r l y analyzed due to the high f a i l u r e r a t e ) . The following observations derive from the r e s u l t s : (1) The quasi-Newton and s e n s i t i v i t y methods almost always f a i l when the wrong phase combination i s assumed. (2) A l l the algorithms except those mentioned i n Observation 1 perform quite well when a liq u i d - l i q u i d - v a p o u r phase combination i s assumed for l i q u i d - l i q u i d systems. Some of the algorithms — notably, the triangular-projection-accelerated GP algorithm — a c t u a l l y require less i t e r a t i o n s with this wrong phase combination. (3) The algorithms commended under Observation 2 also show good convergence behaviour when a solid-liquid-vapour combination i s assumed for liquid-vapour systems. However, the performance i s not as good as when liquid- l i q u i d - v a p o u r i s assumed for l i q u i d - l i q u i d systems. (4) For cases where s o l i d - l i q u i d - l i q u i d - v a p o u r i s assumed f o r Table 6—4 Iteration counts for the various multiphase algorithms, based on assumption of redundant phases System Code Temp (K) Expected phases As sumed phases Phase--fraction algor Lthms GP algoi rithms Sensitivity algorithm Alternj with r« dimer itives •duced is ion Alternj W i t t dimei itives l GP ision Newt on-Raphson Quasi-Newton Partitioned Triangular Projection Tetrahedral Projection Form 1 Form 2 Form 1 Form 2 LB 298.0 LL LLV 28 fc 23 9 8 fc 8 9 8 9 LC 303.0 LL LLV 33 fc 32 10 9 fc 9 8 9 8 LF 330.0 LL LLV 38 fc 38 14 10 fc 10 10 10 10 VD 356.0 LV SLV 9 8 8 9 7 fc 13 10 8 9 VJ 353.0 LV SLV 8 fc 6 9 9 11 7 8 8 8 VN 515.5 LV SLV 10 fc 5 6 7 fc 6 6 5 5 LB 298.0 LL SLLV 31 f fc fc fc fc f f 11 fc LF 330.0 LL SLLV 42 fc 39 16 11 fc 18 f 11 11 LB 335.5 LLV SLLV fc f fc fc fc fc fc fc 26 28 LF 365.0 LLV SLLV fc f fc 47 41 fc NC NC 36 35 Average iteration increase for assuming LLV for LL systems 2.3 - 0.3 -2.7 1.3 - -0.3 0.7 -0.3 0.7 Average iteration increase for assuming SLV for LV systems 3.3 - 1.0 3.3 2.3 - 2.7 2.0 1.0 1.3 f - failure; fc = faulty convergence NC = convergence not attained in the set iteration limit of 100 ' - 2 5 4 -e i t h e r l i q u i d - l i q u i d or l i q u i d - l i q u i d - v a p o u r systems, only 'Alternative formulation 1 with GP dimension' emerges unscathed. 6—8 Conclusions (1) For l i q u i d - l i q u i d systems where i t i s known with absolute ce r t a i n t y that s o l i d formation cannot occur but where vaporization could take place, the approach whereby the solution procedure i s not restarted a f t e r a phase elimination seems to be a l r i g h t . (2) Where the formation of two l i q u i d phases as well as a vapour phase and a s o l i d phase i s possible, the algorithm based on 'Alternative formulation 1 with GP dimension' appears to be the only r e l i a b l e one. As for the generally poor performance of the algorithms when an o v e r s p e c i f i c a t i o n of a s o l i d - l i q u i d - l i q u i d - v a p o u r combination i s used, i t i s possible that the poor state of the solid-phase r e l a t i o n s h i p s employed constitutes, as i t were, an A c h i l l e s ' heel. (3) Everything considered, the best multiphase f l a s h algorithm seems to be that based on 'Alternative formulation 1 with GP dimension'. CHAPTER SEVEN BUBBLE- AND DEW-POINT CALCULATION. 7-1 Introduction The study of bubble- and dew-point c a l c u l a t i o n undertaken and treated i n t h i s chapter embraces s i x d i f f e r e n t methods: (1) A r e g u l a - f a l s i i n t e r p o l a t i o n method. (2) A quadratic i n t e r p o l a t i o n method (3) A dynamic Lagrange i n t e r p o l a t i o n technique. (4) Newton's method (5) The third-order Richmond approach. (6) A quasi-Newton approach. Of the s i x methods only two — the Newton and Richmond methods — are known to have hitherto been subjected to any comparative studies (Jelinek and Hlavacek, 1971; Sobolev et a l , 1975; Ketchum, 1978), the conclusions from which are undermined by the fact that they were founded on the i m p l i c i t assumption of i d e a l i t y . While the r e g u l a - f a l s i method has previously been discussed by Holland (1963) as one way of solving the problem, i t has never been compared against other methods. The quadratic i n t e r p o l a t i o n method, though a f a i r l y well-known mathematical technique for solving univariate problems, Is here making i t s debut i n the arena of saturation-point c a l c u l a t i o n . The other two methods are completely new developments introduced here. The study also includes an i n v e s t i g a t i o n of the p o s s i b i l i t y of handling the saturation-point problem through a single-loop i t e r a t i o n as opposed to the conventional double-loop approach. - 2 5 5 -- 2 5 6 -The mixtures employed are the same as those l i s t e d i n Table 3-1. However, the system pressures presented there do not apply here since pressure i s now a v a r i a b l e . 7-1-1 Nomenclature Note: Any symbol not defined below and not c l e a r l y defined where i t occurs within this chapter retains the d e f i n i t i o n of Section 3-1-1. Symbols D e f i n i t i o n f Fugacity f Check function f° Standard state fugacity H Enthalpy n I t e r a t i o n count r , t Parameters defined i n Eq. (7-34) x L i q u i d mole f r a c t i o n x,y General variables used i n Lagrange i n t e r p o l a t i o n formula y Vapour mole f r a c t i o n Greek Symbols 6 Symbol denoting a small change T Variable defined i n Eq. (7-24) <|> Fugacity c o e f f i c i e n t Subscripts b Boiling-point value bp Bubble-point dp Dew-point i Component -257-i , j , l Summation and product parameters n Normal v Vaporization v Vapour Superscripts a Average 7-2 Theoretical Background The basic check function for the bubble point of a mixture i s given by N f(T) = I K z - 1 (7-1) i=l 1 1 The corresponding equation for the dew-point i s N f(T) = I z /K - 1 (7-2) i=l For the bubble-point c a l c u l a t i o n , x i s set equal to z^ and y^ computed from j y i = V i ' ( i = 1 , 2 N ) ' The dew-point problem involves s e t t i n g y_ = z_ and obtaining x from X i = Z i / K i ( ± = 1 . 2 » - - ' » N ) -The updating of K at any temperature involves an inner i t e r a t i o n loop to eliminate the e f f e c t of composition. The outer loop updates T from Equation (7-1) or (7-2). The only difference between the various methods i s i n the temperature update. As c o r r e c t l y pointed out by Sobolev and co-workers (1975) and by Ketchum (1978), a more l i n e a r r e l a t i o n s h i p i s obtained by defining the check functions as: -258-1 N f(^) = *n[ I K z ] (7-3) 1-1 x for bubble-point determination, and l N f(^) = M I z./K.] (7-4) i=l 1 for the dew-point case. The preference of ^ over T as the check variable is born out by Figures 7-1 and 7-2 where the logarithmic check functions have been plotted with respect to both T and }~ for system VA at standard atmospheric pressure. Equations (7-3) and (7-4) have aptly been used in this work with ^ a s the check variable. The main steps of a general double-iteration algorithm are: (1) Initialize T and set x = y_ = z_ (2) Compute K. For bubble-point calculation, update y_ from y i = K i Z i ( i = 1 » 2 » - " . N ) -For dew-point calculation, update x from X i = Z i / K i ( ± = 1» 2»"-» N) At the current T value, iteratively update the appropriate components of K for bubble point; and f° — the latter only for noncondensable components — for dew point) until i t is constant within some tolerance. (3) Update the temperature and test i t for convergence. If the outcome is positive, terminate the iteration; otherwise go to Step 2. -259--260-- 2 6 1 -A m o d i f i c a t i o n of the above a l g o r i t h m which was aimed at e l i m i n a t i n g the inner i t e r a t i o n i s d i s c u s s e d i n S e c t i o n 7 - 1 0 - 2 . B r i e f t reatments of the s i x methods are presented i n the subsequent s e c t i o n s . 7-3 The Regula-falsi Interpolation Method A p p l i c a t i o n of the r e g u l a - f a l s i or f a l s e - p o s i t i o n method to e i t h e r of Equat ions (7 -3 ) and (7 -4 ) y i e l d s an updated va lue of temperature g iven by n n -1 T = f n - f n ( 7 - 5 ) T n ~ T n - 1 I n the event of a negat ive convergence t e s t , f n + ^ i s determined and ( T n + 1 , f n + 1 ) i s s u b s t i t u t e d f o r the po in t cor responding to max { ( f 1 1 - 1 ! , ! ^ } . I n a p p l y i n g the method, two i n i t i a l p o i n t s are r e q u i r e d . Two methods f o r o b t a i n i n g these were i n v e s t i g a t e d . In the f i r s t method, T° and T^ " are r e s p e c t i v e l y set equal to T, . and T, , bmin bmax the computed b o i l i n g p o i n t s f o r the most and the l e a s t v o l a t i l e components, determined by the method to be d i s c u s s e d i n S e c t i o n 7 - 9 . The second method chooses T° as w i l l be d i s c u s s e d i n S e c t i o n 7 - 9 , and obta ins through a Newton's a c c e l e r a t i o n step as subsequent ly d i s c u s s e d under "Newton's method". The second method was found to be the b e t t e r of the two. 7-4 The Quadratic Interpolation Method The q u a d r a t i c i n t e r p o l a t i o n method, which r e q u i r e s 3 p o i n t s f o r i t s implementat ion , i s of a h igher order than the r e g u l a - f a l s i method. A p p l i e d to Equat ion (7 -3 ) or ( 7 - 4 ) , g i ven three p o i n t s (T^ } f ^ -262-(T , f ) and (T , f„)» a new temperature value results from 1 T + (7-6) where and After a new f is evaluated based on the updated T, and in the event of a negative convergence-test, the new point (T,f ) is substituted for the point corresponding to max {|f1 , |f2|> f f3| } -The f i r s t three temperature points are obtained as for the regula-fals i method. 7—5 The Dynamic Lagrange Interpolation Method This method has been devised as an extension of the polynomial interpolation technique, of which regula-falsi interpolation and quadratic interpolation are f i r s t - and second-order versions respectively. It was conceived in the hope that i t w i l l require fewer iterations to reach a solution than does the quadratic-interpolation method. It is dynamic i n the sense that the order of the polynomial depends on the iteration number, no points being rejected as the i teration progresses. Thus, i t is equivalent to a regula-falsi method after the f i r s t i teration and to a quadratic interpolation after the second. The well-known Lagrange interpolation method for f i t t i n g experimental data (Jenson and Jeffreys, 1963) can be expressed in the compact form -263-n n (x. - x ) y. n ... 1 n+1 i r 2, ^ - V where x i s the variable whose value i s known at the point 'n+1', y i s the variable whose value i s unknown at the point 'n+1' and subscripts 1 through n denote the n points for which f u l l information i s a v a i l a b l e . Now, i f we are seeking the value of y at which x = 0, then s e t t i n g x n + 1 = 0 i n Equation (7-7), doing some rearrangement and setting x = f and y = we have n n j j — r r = n f I — (7-8) T k-1 J=l n ( f i _ f 3 ) The i t e r a t i o n i s i n i t i a t e d as i n the r e g u l a - f a l s i method and the f i r s t temperature updating i s c a r r i e d out s i m i l a r l y . Let us define n k n k-1 n and 4 = n ( f 1 - f J ) ( j = 1,2,...n) n J i * j Af t e r the nth i t e r a t i o n , only (|> i s calculated f u l l y . The other qu a n t i t i e s are merely updated according to the equations: (7-9) -264-• n 1 • . ( f n - f J ) ( j = 1,2,...,n-l) and = * n 1 f n n—1 n Then T i s updated according to the equation 1 n mn+l n . L. T 1=1 T J f Jd> . J nj (7-10) (7-11) 7-6 Newton's Method In applying the popular Newton's method to bubble- and dew-point c a l c u l a t i o n s , two possible computation paths present themselves: one involving an a n a l y t i c a l determination of the derivatives of K with respect to temperature; the other u t i l i z i n g a f i n i t e - d i f f e r e n c e approach i n determining the d e r i v a t i v e s . Let us look into the former case with a view to assessing i t s f e a s i b i l i t y . From the basic d e f i n i t i o n of the equilibrium r a t i o , _oL| 9T P,x,y ° K i L ~ 3 f 9*nf + Bin*, P,x,y "5T" P,x,y ] (7-12) |P,x,y • ~5T~ D i f f e r e n t i a t i n g the Wilson a c t i v i t y model with respect to temperature leads to 9 Any, 9T N P,x,y N -1_ RT 2 N + . \ {~N I x A . \~ J-1 J i j k = 1 J-1 J k j *k \ i \ X A A J 3-1 1 N (7-13) -265-where 3,. = A . - X i j i j i i A s i m i l a r d i f f e r e n t i a t i o n of the Wilson modification of the Redlich-3*n<|> Kwong equation (to determine —~=-1 ) y i e l d s the same r e s u l t as o l |r,x,y combining Equations (2-28) and (2-29). A comparison of the derivatives with the equations defining and 4^ [Equations (2-23) and (2-22)] shows that evaluating the derivatives numerically i s far more advantageous — i n terms of programming e f f o r t , computer storage requirement and computation time — than using an a n a l y t i c a l approach. The f i n i t e - d i f f e r e n c e method uses 9K K ±(T + ST) - K ±(T) 8f-|p,x,y " &T ( 7 _ 1 4 ) where ST i s a perturbation i n T. In this work, ST was set equal to 0.001K (Employing ST = 0.01K was found not to a f f e c t the i t e r a t i o n requirement). Applying the Newton method to Equation (7-3) y i e l d s , for bubble-point determination, T n + 1 = (7-15) f n I Z ±K? 1 + 1 = 1 N 3K. i = l i Z i 8T T n For the purpose of programming, i t was considered neater to employ Equation (7-15) i n the form - 2 6 6 -N N £n I z K (T + 6T) - Zn I z K . ( T ) 3f i = l 1 1 i = l 1 1 , 7 1 7 , where = ^ (7-17) For the dew-point problem, E q u a t i o n (7-16) i s a l s o a p p l i c a b l e , w i t h the d e r i v a t i v e term d e f i n e d by N z^ N z^ ^ 9 F *N ± L = 1 VT I «T) - J=1 y r ) 3T ST . ( 7 " 1 8 ) 7-7 A Third-order Richmond Approach The main hinderance to the a p p l i c a t i o n of the t h i r d - o r d e r Richmond method i n the r i g o r o u s s o l u t i o n of the bubble- and dew-point problems l i e s i n i t s r e q u i r i n g the e v a l u a t i o n of the second d e r i v a t i v e of K w i t h respect to T, which cannot be r e a d i l y done by the f i n i t e - d i f f e r e n c e approach. ( I t would i n v o l v e three K e v a l u a t i o n s . ) I n the implementat ion of the method, t h i s problem was overcome by assuming, only f o r the purpose of e v a l u a t i n g the second d e r i v a t i v e s , a model of the form AnK. = a , + b . / T (7-19) I i x where a i and ^ i a r e f u n c t i o n s of c o m p o s i t i o n but not of temperature. F i g u r e 7-3 shows a comparison of the K values obta ined from E q u a t i o n (7-19) w i t h those obta ined from a r i g o r o u s c a l c u l a t i o n f o r system VD. The r e s u l t s are based on a constant compos i t ion and the parameters , a^ and b^, were eva luated at a base temperature of 370 K. The percentage a b s o l u t e d e v i a t i o n i s de f ined by IOOIK. «. - K. I v < i , e x a c t x , a p p r o x . % A b s o l u t e d e v i a t i o n = • 1 — — L i , e x a c t -268-The plot shows that the % absolute deviation tends to increase para-b o l i c a l l y with the absolute difference between the base temperature (the temperature for the current i t e r a t i o n ) and the projected temperature (the temperature for the next i t e r a t i o n ) . Thus, while an error of 40% could r e s u l t for a AT of +100K, the corresponding error for a AT of +50K i s less than 7.5%, and for a AT of +25K, i t i s only about 1.5%. I t follows that provided the temperature change from i t e r a t i o n to i t e r a -t i o n i s not very large, basing the second derivative on Equation (7-19) w i l l not r e s u l t i n very s i g n i f i c a n t errors that w i l l tend to retard convergence. I f we d i f f e r e n t i a t e Equation (7—19) twice with respect to T and carry out some algebraic manipulation, we come out with The temperature-updating r e l a t i o n s h i p i s (for both bubble and dew points) 3T 3T K. 3T (7-20) l T ,n (7-21) 1 -D n where D - f f f 2f' and For bubble-point determination, f" i s given by -269-For the dew-point case, , N x _ d K T4I ^ { ^ [a^/a r ] 2 - - | } I x N x, 32 , f L_L_J: L_ l i f . ( f . + 2 T ) (7-23) 1-1 1 7-8 A Quasi-Newton Approach A preliminary comparison of the f i v e methods discussed above revealed that the Newton and Richmond methods require the same number of i t e r a t i o n s i n most cases, and that, i n a good number of cases, each of these two methods, while consuming more time than the three non-gradient methods, required one i t e r a t i o n less than these. In view of t h i s observation, and considering that a su b s t a n t i a l amount of time i s drained by the derivative evaluation, i t was f e l t that a 'best' method might r e s u l t from a quasi-Newton approach that would do away with the f i n i t e - d i f f e r e n c e derivative evaluation. For the purpose of developing a quasi-Newton method, l e t us assume that the segment of the check function p r o f i l e between any two i t e r a t i o n s i s a quadratic of the form f ( T ) = ax 2 + bx + c (7-24) where 1 = T" At the end of the (n+l)th i t e r a t i o n , we have the following information: f ( x n ) = f n (7-25) f ( x n + 1 ) = f n + 1 (7-26) f ( T n ) = ( f ' ) n (7-27) I f we substitute Equations (7-25) through (7-27) into Equation (7-24) and solve for a and b, we have -270-. n n+1. , „ .. n „ n+1 n v a = ( T - ><f> + f ^ (7-28) , n+1 n N2 (T - T ) - f ( T n + 1 ) 2 - ( T n ) 2 1 ( f ' ) n + 2 T n ( f n - f n + 1 ) ( T N + 1 - T N ) : and b = ^ V L > 1^ > ^ ^ i L (7-29) n+1 n. 2 v ' From Equation (7-24), we have ( f ) n + 1 = 2 a x n + 1 + b (7-30) Combining Equations (7-28) through (7-30) and using the r e l a t i o n n n+1 f n T - T = , ( f ^ we have as a f i n a l r e s u l t n+1 ( f ' ) n + 1 = (1 - — ) ( f ' ) n (7-31) f n Thus, with f evaluated for n = 1, successive values of f can be estimated from Equation (7-31). Equation (7-31) i s exact for quadratic polynomials. For other functions, one would expect a m u l t i p l i c a t i v e factor d i f f e r e n t from 2 fn+l attached to the r a t i o . If for, example, one were to assume a f n r e l a t i o n s h i p of the form f ( T ) = ax + j + c (7-32) a s i m i l a r derivation to the one above would lead to a gradient recurrence formula of the form + 1 n fn+l ( f ' ) n + i = [ l - (1 + -!—) i _ - ] ( f - ) n (7-33) x f Thus we have a variable factor that i s greater than or less than 2 - 2 7 1 -depending on whether the solution is being approached from a higher value of T ( T N > xn+^") or from a lower one (x 1 1 < x n +^"). It must be observed that as the solution is approached, the factor tends to 2. For example, applying the method to the problem £ ( t ) - 2 0 T T ! 2 2 0 - 1 0 o f with T i n i t i a l i z e d to 100, yields the solution x = 10 in 5 Iterations with (1 + x^x 1* 4 4) values of 17.750, 1.660, 1.908 and 1.997 in that order. Following from the above observations, let us, for general purposes, express the recurrence formula in the form ( f ' ) n + 1 = (1 - t r n ) ( f ) n (7-34) where .n+l n f r = f n and t is a parameter whose magnitude would depend on the nature of the function, f. To test the general applicability of Equation (7-34), t was determined as a function of r from n+l t = - ( U ] (7_35) ( f ) n for polynomials of degree varying from 2 to 6. In each case, the i n i t i a l point was chosen very far from the real solutions. A plot of tr versus r is shown in Figure 7-4 for the different polynomials. While the second degree polynomial yields a straight line of slope 2, in agreement with Equation (7-31), the other polynomials yield curves -272-Fig 7-4:tr versus r for polynomials of different degrees -273-(divergent points are not plotted) with slopes (values of t, that i s ) that vary from 1.875 <_ t _< 2.0 for the third-degree polynomial to 1.552 _< t _< 2.0 for the sixth degree polynomial. I t was observed i n every case that as the sol u t i o n i s approached (r •*• 0), the value of t approaches 2.0. Now, we turn attention to the bubble- and dew-point problems. Values of r and t were generated for systems VA through VE and systems VL through VP by applying Newton's method i n the determination of t h e i r bubble and dew points. For each system, r and t were generated for every i t e r a t i o n a f t e r the f i r s t at 20 d i f f e r e n t system conditions (pressure i s the v a r i a b l e ) . Analysis of the data r e s u l t i n g from the above revealed that more than 95% of the points yielded t values l y i n g between 1.5 and 2.4, with more than 70% l y i n g i n the narrower range 1.9 _< t _< 2.1. The points, c o n s t i t u t i n g less than 5%, that lay outside the range 1»5 <_ t <_ 2.4 were observed to r e s u l t from an i n i t i a l o s c i l l a t o r y or divergent tendency i n the Newton method. An attempt to cor r e l a t e f as a general function of r for these anomalous points did not meet with much success, f o r , while for narrowing-boiling systems these points - and they only -corresponded to either r < - 0.1 or r > 0.02, no such fin e l i n e of demarcation could be drawn for wide-boiling systems. In the process of trying to obtain a best t - p r o f i l e for the poorly-behaved points, i t was observed that using a constant t of 0.5 gives e s s e n t i a l l y the same number of i t e r a t i o n s for the well-behaved points as using the value of 1.8, which i s the approximate average -274-empirical value for these points. This can be explained by the fa c t that the recurrence gradient-formula has a s e l f - a d j u s t i n g e f f e c t , as the following argument shows: Assume, for example, that ( f ' ) n i s exact and that a too-small value of t i s used. This, from Equation (7-34), would r e s u l t i n a too-large value for ( f ' ) n + 1 / ( f ' ) n . This would i n turn lead to a too-small A t n + 1 which, for a well-conditioned function, would y i e l d a too-large r n + 1 which would r e s u l t i n a too-small ( f ) / ( f ) that would tend to compensate for the too-large ( f 1 ) n + 1 / ( f ' ) n . For the poorly-behaved points, i t was observed that t = 1.25 gives a performance that i s intermediate between t = 0.5 and t = 1.8. This suggests an optimal t within the range 0.5 < t < 1.8. To determine the optimal t, a golden-section search technique (Himmelblau, 1972) was employed, using the number of i t e r a t i o n s for a l l the poorly-behaved points for f i v e of the systems as the object function. The search was performed within the l i m i t s 0.5 <^ t <_ 2.0. The r e s u l t s , plotted i n Figure 7-5, led to the conclusion that the value of t that gives the most stable behaviour i s 1.0. Hence, for the purpose of t h i s study, the recurrence gradient-formula was defined simply as +1 f n + 1 ( f ' ) = (1 - - ) ( f ' ) n (7-36) f n Let us attempt to construct a t h e o r e t i c a l foundation for the above empirical r e l a t i o n s h i p . According to Newton, -275-Fig7-5: Iteration-units versus-t prof ile resulting from the Golden section optimization scheme -275a-Leaf 276 missed in numbering -277-I f we assume that ( f ) l i n k i n g ( x n , f n ) and (T T n+1 (7-37) the r e l a t i o n s h i p f + (f) n+1. n AT (7-38) A combination of Equations (7-37) and (7-38) leads to Equation (7-36). Now, the argument leading to Equation (7-38) implies that Equation (7-36) i s a secant convergence r e l a t i o n s h i p provided that i n the f i r s t i t e r a t i o n , the secant method i s replaced with the Newton method. Since this i s the scheme adopted i n the r e g u l a - f a l s i i t e r a t i o n , the 'quasi-Newton' method represented by Equation (7-36) would have been i d e n t i c a l to the regula f a l s i method but for the difference i n the elimination of points: the former method always eliminates the older of the two stored points; the l a t t e r method eliminates the one with the larger | f | . For this sole difference, the 'quasi-Newton' method has been retained as a separate method. 7-9 I n i t i a l i z a t i o n Schemes or x (for dew point) i s i n i t i a l i z e d to z. Three schemes for temperature i n i t i a l i z a t i o n were studied. Scheme 1 The scheme involves the following steps: (1) Estimate the b o i l i n g points of the pure components at the system pressure from the Clausius-Clapeyron equation, integrated — with the basic assumptions that lead to the vapour-pressure r e l a t i o n of Clapeyron (Reid et a l , 1977) — between normal atmospheric pressure For the purpose of the f i r s t K c a l c u l a t i o n , y_ (for bubble point) -278-and the system pressure to y i e l d T T = (7-41) lbi RT u.Hn P W ; i nbi AH . v i where T , . = Normal b o i l i n g point of component i nbi T, . = the estimated b o i l i n g point of component i at pressure bi P, and AH = the normal enthalpy of vaporization of component i (2) I n i t i a l i z e T from T° = 0.5(T V + T u . ) (7-42) bmax bmin where T, and T, . are the computed b o i l i n g points for bmax bmin the least and the most v o l a t i l e components respectively. Scheme 2: In th i s scheme, T values are computed according to Equation (7-41) but T i s i n i t i a l i z e d to N T° = I Z i T b i (7-43) i = l 1 0 1 Scheme 3: Here T° i s obtained d i r e c t l y from Equation (7-41) by using mole-fraction-weighted average values of T ^ a n c* ^H^, thus: T° = ( 7_ 4 4 ) RTa, £n P ^ _ nb AH a where N nb ^ i nbi -279-N and AH a = Y Z jAH t v i v i The three i n i t i a l i z a t i o n schemes were applied to 11 of the systems — s i x narrow-boiling (VA through VK) and 5 wide-boiling (VL through VP) — over a pressure range of 1 atm. to 14.5 atm. This was done for both bubble- and dew-point determination. Figures 7-6 through 7-8 represent the three d i f f e r e n t trends that are found to be assumed by the dependence, on pressure, of the absolute difference between T° and T or T, . bp dp - The trend represented by Figure 7-6, whereby Scheme 3 i s consistently better than the other two schemes for both bubble- and dew-point c a l c u l a t i o n , was found to predominate. For some of the systems, this led to fewer i t e r a t i o n s f o r Schemes 2 and 3 than f o r Scheme 1. The trend of Figure 7-7, where there i s a cross-over between Scheme 1 and Schemes 2 and 3, was less common. Figure 7-8 represents the trend observed for wide-boiling systems. The r e s u l t s show a net c r e d i t i n favour of Scheme 3. This scheme also has the following points i n i t s favour: (1) I t i s computationally less demanding than the other two schemes. (2) I t i s , l i k e Scheme 2, a better c h a r a c t e r i z a t i o n of the system than i s Scheme 1 which i s blin d to the r e l a t i v e d i s t r i b u t i o n of the constituents of the system. A l l the succeeding empirical work i s based on Scheme 3. 7-10 Applications The s i x methods were implemented for both bubble- and dew-point c a l c u l a t i o n s . In each case, two algorithms were studied: the -280-18.0 16.0-14.0-12.0-10.0-6 .04 4.0 2.0-Legend: Bubble point Dew point Initialization sheme 1 • Initialization scheme 2 o Initialization scheme 3 x -o I-::::?-' x o o-& • ' o X 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 1E0 13.0 14.0 15.0 •Pressure ( Atm.) Fig7-6: Variation of lTj n j — T I with system Pressure for system VC -281-30.01 26.0 J 22.CH 18.0H 8 6.0 2.0 Legend: Bubble point Dew point Initialization scheme 1 • Initialization scheme 2 ° Initialization scheme 3 x o-x-o ; x • « " 0 . . . .JO • X 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 • Pressure (Atm.) Fig 7-7: Variation of I T. , f - T I with system Pressure for system VA -282-75.0! 52.0 -I 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.0 2.0 3D 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 Pressure (Atm.) Fig 7-8; Variation of l T i n i t - T S 0 L l with system Pressure for system VP -283-double-iteration algorithm presented i n Section 7-2, and a new algorithm (discussed i n Section 7-10-2) that aims at eliminating the inner i t e r a t i o n . The methods were applied to systems VA through VP (see Table 3-1). The saturation points for each system were determined at 10 pressure conditions uniformly d i s t r i b u t e d over a pressure range of 27 atm., with the pressure values i n Table 3-1 as the minima. For systems VL through VP (the wide-boiling systems), the pressure range used for dew-point c a l c u l a t i o n was narrowed s l i g h t l y because some convergence problem (common to a l l the methods) was observed at pressures close to 28 atm. The search was terminated a f t e r the nth i t e r a t i o n i f I n n-11 T - T | _< 0.001K The above tolerance i s considered to be i n tune with r e a l i t y , bearing i n mind the degree of p r e c i s i o n of the best temperature-measuring devices i n common use. In the inner loop, the composition-dependence of K i s considered to have been f u l l y corrected for when the average absolute change i n the appropriate phase-mole-fractions i s less than 10 ^. 7-10-1 Double-Loop Algorithms In the a p p l i c a t i o n of the methods using the double-iteration algorithm of Section 7-2, the following observations were made: (1) The Newton and Richmond methods require the same number of i t e r a t i o n s i n almost a l l cases. In view of t h i s , the Richmond method concedes favour to the Newton method to the extent that the former requires more c a l c u l a t i o n i n the temperature update. -284-(2) The Lagrange method i s to the quadratic method what Richmond's i s to Newton's a l a Observation (1). (3) In a good number of cases, the r e g u l a - f a l s i method requires the same number of i t e r a t i o n s as the quadratic i n t e r p o l a t i o n method. (4) The 'quasi-Newton' method gives a performance that i s comparable — i n terms of i t e r a t i o n count and s t a b i l i t y — to that of the r e g u l a - f a l s i method. The former thus returns s l i g h t l y better computation times than the l a t t e r due to i t s simpler point-elimination scheme. The above observations on i t e r a t i o n requirements are r e f l e c t e d i n the computation-time values presented i n Tables 7-1 and 7-2 for bubble and dew points r e s p e c t i v e l y . The re s u l t s indicate that the regula-f a l s i , quadratic, Lagrange and 'quasi-Newton' methods have comparable performances, with the 'quasi-Newton' method having a s l i g h t edge — i n terms of the t o t a l computation times for both bubble- and dew-point c a l c u l a t i o n s as well as of the ease of programming. 7-10-2 Fixed-Inner-Loop Algorithms The f i r s t attempt made at improving the double-loop algorithm of Section 7-2 involved j e t t i s o n i n g the inner i t e r a t i o n . Step 3 then involved using K values (obtained i n Step 2) that have not been corrected for t h e i r composition-dependence. When th i s single-loop algorithm was tested on the various systems, i t was found to be quite u n r e l i a b l e , and more so for the non-gradient than the gradient methods. F i x e d - i n n e r - i t e r a t i o n algorithms were next considered. In the f i r s t version of the f i x e d - i n n e r - i t e r a t i o n algorithm, the number of inner i t e r a t i o n s was fixed at 2. The re s u l t s obtained with Table 7-1 Computation times (CPU seconds) for bubble-point calculation based on the double-iteration algorithms System Regula-falsi Quadratic Lagrange Newton Richmond 'Quasi-Newton' VA 0.3107 0.3180 0.3225 0.3836 0.4084 0.3111 VB 0.2030 0.2060 0.2073 0.2564 0.2638 0.2003 VC 0.4190 0.4156 0.4191 0.5416 0.5385 0.4200 VD 0.4041 0.4109 0.4117 0.5066 0.5061 0.4033 VE 0.3720 0.3810 0.3841 0.4410 0.4410 0.3707 VF 0.3103 0.3047 0.3155 0.4041 0.4045 0.3075 VG 0.3302 0.3376 0.3403 0.4044 0.4214 0.3301 VH 0.3500 0.3573 0.3602 0.4200 0.4333 0.3508 VI 0.3556 0.3619 0.3686 0.4178 0.4303 0.3544 VJ 0.4627 0.4626 0.4666 0.5900 0.5881 0.4596 VK 0.2520 0.2553 0.2658 0.3195 0.3391 0.2478 VL 0.2670 0.2649 0.2722 0.3139 0.3159 0.2652 VM 0.2241 0.2334 0.2383 0.2932 0.2982 0.2259 VN 0.2855 0.2885 0.2950 0.3257 0.3357 0.2843 VO 0.2582 0.2596 0.2610 0.3023 0.3002 0.2666 VP 0.3982 0.3775 0.3744 0.4593 0.4762 0.3848 I 5.2026 5.2348 5.3026 6.3794 6.5007 5.1824 Table 7-2 Computation times (CPU seconds) for dew-point calculation based on the double-iteration algorithms System Regula-falsi Quadratic Lagrange Newton Richmond 'Quasi-Newton' VA 0.3531 0.3544 0.3621 0.4203 0.4334 0.3439 VB 0.2929 0.2903 0.3009 0.3235 0.3351 0.2820 VC 0.5368 0.5190 0.5225 0.6260 0.6231 0.5271 VD 0.54523 0.5474 0.5574 0.6273 0.6438 0.5302 VE 0.7167 • 0.6918 0.7238 0.7041 0.7247 0.6943 VF 0.5669 0.5645 0.5758 0.6072 0.5914 0.5566 VG 1.0078 0.9369 0.9648 0.8908 0.9094 0.9423 VH 0.7214 0.6980 0.8214 0.7280 0.7740 0.6945 VI 0.5045 0.5189 0.5207 0.5627 0.5891 0.4956 VJ 0.6765 0.6841 0.7135 0.7346 0.7495 0.6623 VK 0.4000 0.4007 0.4190 0.4733 0.4906 0.4048 VL 0.3213 0.3193 0.3224 0.3703 0.3675 0.3219 VM 0.3480 0.3426 0.3553 0.3918 0.3836 0.3534 VN 0.3797 0.3749 0.3811 0.4152 0.3985 0.3847 VO 0.3483 0.3391 0.3422 0.3881 0.3838 0.3568 VP 0.5728 0.5699 0.5728 0.6341 0.6499 0.5661 I 8.2890 8.1518 8.4557 8.8973 9.0474 8.1165 -287-t h i s algorithm are presented i n Tables 7-3 and 7-4 for bubble- and dew-point c a l c u l a t i o n s respectively. The r e s u l t s reveal that: (1) This algorithm, y i e l d i n g a great improvement over the s i n g l e -i t e r a t i o n algorithm, s t i l l records a number of f a i l u r e s . (2) Where i t does converge, the algorithm i s , almost always, more t i m e - e f f i c i e n t than the double-loop algorithm. (3) The algorithm behaved well for the bubble-point c a l c u l a t i o n of a l l the narrow-boiling systems (VA through VK) and with a l l the methods except the Richmond method (which, at any rate, i s the most sluggish of them a l l ) . Observation 3 i s quite i n t e r e s t i n g because i f the r e s u l t s for the 11 narrow-boiling systems used here can be generalized to a l l narrow-b o i l i n g mixtures, then the version of the f i x e d - i n n e r - i t e r a t i o n algorithm as applied above can be incorporated into a BP algorithm for d i s t i l a t i o n - u n i t c a l c u l a t i o n (see treatment i n Chapter 9), since the BP method i s normally applicable to only narrow-boiling systems. To ensure the s t a b i l i t y of the f i x e d - i n n e r - i t e r a t i o n algorithm, higher numbers of inner i t e r a t i o n were t r i e d . A value of 3 was found to also y i e l d some f a i l u r e , but a value of 4 was found to give r e l i a b l e performance. In s e t t i n g the inner i t e r a t i o n at 4, one was mindful of the p o s s i b i l i t y of less than four i t e r a t i o n s being a c t u a l l y required to do the K-composition-dependence correction — e s p e c i a l l y i n the neigh-bourhood of the sol u t i o n . The value of 4 was therefore used as an upper l i m i t , with convergence tests being c a r r i e d out a f t e r every i t e r a t i o n . In applying this new version of the f i x e d - i n n e r - i t e r a t i o n algorithm, r e s u l t s were generated only for those systems which, when : Computation tines (CPD seconds) for bubble-point calculation based algorithms with inner iteration fixed at 2. System Regula-falsi Quadratic Lagrange Newton Richmond 'Quasi-Newton' VA 0.2739 0.2746 0.2862 0.4050 f 0.2814 VB 0.1788 0.1823 0.1884 0.2410 0.2460 0.1801 VC 0.3826 0.3853 0.3892 0.5271 0.6353 0.3834 VD 0.3569 0.3617 0.3645 0.5484 0.6863 0.3624 VE 0.3224 0.3243 0.3302 0.4611 0.5861 0.3309 VF 0.2772 0.2813 0.2860 0.3937 0.3956 0.2794 VG 0.2804 0.2891 0.2995 0.3829 f 0.2918 VH 0.3158 0.3235 0.3310 0.4221 0.6483 0.3284 VI 0.3313 0.3466 0.3432 0.4227 0.5107 0.3294 VJ 0.4124 0.4124 0.4232 0.5858 0.7521 0.4142 VK 0.2259 0.2272 0.2375 0.3077 0.3174 0.2289 VL f f f 0.3965 f f VM 0.2182 f f 0.3540 f 0.2192 VN f f f 0.4372 f f VO 0.2316 f f 0.3995 f 0.2364 VP 0.3538 f f 0.5208 f 0.3691 I for VA' through VK 3.3576 3.4083 3.4789 4.6975 ? 3.4103 Corresponding 1 for Double-iteration 3.7696 3.8109 3.8617 4.6794 3.7556 f => failure in at least one point. Table 7-4 Computation times (CPU seconds) for dew-point calculation based on algorithms with inner iteration fixed at 2 System Regula-falsi Quadratic Lagrange Newton Richmond 'Quasi-Newton' VA f f f f f f VB* 0.2130 0.2181 0.2193 0.2704 0.3259 0.2173 VC* 0.5241 0.5153 0.5151 0.6188 0.7846 0.5168 VD* 0.4116 0.4362 0.4486 0.5970 f 0.4116 VE f 0.4060 0.4272 f f 0.4133 VF f 0.4377 0.4551 f f 0.4437 VG 0.5151 f f f f 0.4918 VH f f f f f f VI* 0.3970 0.4740 0.4898 0.5526 0.5829 0.3943 VJ* 0.5167 0.5203 0.5348 0.6965 0.7342 0.5096 VK 0.3067 0.3166 0.3202 f f 0.3100 VL* 0.2459 0.2347 0.2366 0.3127 f 0.2387 VM* 0.2563 0.2392 0.2448 0.3374 f 0.2656 VN f f f f 0.4078 f VO* 0.2584 0.2424 0.2426 0.3299 0.4086 0.2590 VP* 0.4270 0.4133 0.4063 0.5696 f 0.4347 £ for starred systems 3.2500 3.2935 3.3379 4.2849 3.2476 corresponding i for Double-iteration 4.1434 4.1306 4.2077 4.6584 - 4.0954 f => fai lure in at leas t one point -290-solved with the f i r s t version, recorded at least a f a i l u r e with at least one of the methods, excluding Richmond's. The r e s u l t s are i n Tables 7-5 (bubble-point ca l c u l a t i o n ) and 7-6 (dew-point c a l c u l a t i o n ) . The t o t a l times summed over the same systems are also included for the double-iteration algorithms. The observations made on the r e s u l t s i n Tables 7-1 and 7-2 also apply to those i n Tables 7-5 and 7-6. And comparing the fixed-inner-loop method with the double-loop method, one finds that the time-gain by the former over the l a t t e r i s rather small for bubble-point c a l c u l a t i o n — ranging from 6.7 to 9.0 percent for the various methods (Richmond's excluded). This i s not s u r p r i s i n g because one would not o r d i n a r i l y expect vapour-composition corrections for K to take much more than four i t e r a t i o n s . The time saving for the more-composition-sensitive dew-point c a l c u l a t i o n i s more s i g n i f i c a n t , assuming magnitudes of 18.4 to 21.1 percent ( t h i s excludes the Newton and Richmond methods which registered some f a i l u r e for system VG). 7-11 Conclusions J (1) The nongradient methods are on the same scale of performance, and they outclass the Newton and Richmond methods. (2) Imposing a c e i l i n g of 4 on the inner i t e r a t i o n that corrects K values for composition-dependence helps to cut down on computation time. This gain i n computation time i s more s i g n i f i c a n t for dew-point c a l c u l a t i o n . (3) The r e g u l a - f a l s i method, based on the f i r s t - i t e r a t i o n a c c e leration method adopted here, i s better implemented i n the form of the 'quasi-Newton' method. This not only leads to a s l i g h t reduction i n computation time but i t also seems to improve s t a b i l i t y , as the re s u l t s i n Table 7-4 suggest. Table 7-5: Computation times (CPU seconds) for bubble-point calculation based on algorithms with Inner iteration bounded at 4. System Regula-falsi Quadratic Lagrange Newton Richmond 'Quasi-Newton' VA 0.3081 0.3192 0.3150 0.3755 0.3929 0.3084 VG 0.3384 0.3412 0.3383 0.4028 0.4176 0.3367 VL 0.2410 0.2348 0.2451 0.2829 0.3167 0.2366 VM 0.2089 0.2051 0.2118 0.2663 0.3096 0.2037 VN 0.2549 0.2468 0.2497 0.3022 0.3927 0.2529 VO 0.2404 0.2254 0.2332 0.2617 0.3501 0.2322 VP 0.3442 0.3247 0.3217 0.4149 0.5333 0.3455 I 1.9359 1.8972 1.9148 2.3063 2.7579 1.9160 Corresponding I for Double-i t e r a t i o n 2.0739 2.0795 2.1037 2.4824 2.5560 2.0680 % time gain 6.7 8.8 9.0 7.1 -7.9 7.4 Table 7-6: Computation times (CPU seconds) for dew-point calculation based on algorithms with inner iteration bounded at 4. System Regula-falsi Quadratic Lagrange Newton Richmond *Quasi-Newton1 VA 0.3311 0.3283 0.3347 0.3980 0.4083 0.3230 VE 0.5237 0.4927 0.5209 0.5448 0.7829 0.4947 VF 0.4906 0.4804 0.5001 0.5345 0.5905 0.4808 VG 0.6918 0.6424 0.6567 f f 0.6286 VH 0.6393 0.6056 0.6461 0.6518 0.7518 0.5723 VK 0.3343 0.3307 0.3370 0.4040 0.4790 0.3254 VN 0.3718 0.3539 0.3569 0.3879 0.3802 0.3569 I 3.3826 3.2340 3.3524 ? ? 3.1817 Corresponding I for Double-i t e r a t i o n 4.1456 4.0212 4.2480 4.2389 4.3220 4.0211 %Time gain 18.4 19.6 21.1 1 1 20.9 f => f a i l u r e i n at least one point; ? => unknown CHAPTER EIGHT ADIABATIC VAPOUR-LIQUID FLASH CALCULATION 8-1 Introduction The close attention given to the adiabatic vapour-liquid f l a s h problem, as documented i n this chapter, i s due p a r t l y to i t s importance i n the design of f l a s h drums and p a r t l y to the fact that i t i s a diminu-t i v e form of the d i s t i l l a t i o n - u n i t problem. Holland (1963) presents two methods which are conventionally employed i n handling the adiabatic f l a s h problem: a two-dimensional Newton-Raphson method, and a double-iteration r e g u l a - f a l s i approach. The l i t e r a t u r e i s without any reported comparative study to determine the best method for solving the problem. In addition to the two methods mentioned above, a number of methods, some of which derive d i r e c t l y from multistage d i s t i l l a t i o n algorithms, has been developed i n this study. Three algorithms based on the Newton-Raphson approach are presented i n Section 8-3 while the r e g u l a - f a l s i method i s treated i n Section 8-4. Section 8-5 investigates the p o s s i b i l i t y of applying a p a r t i t i o n method of the sum-rates type (King, 1980) to the problem. In Section 8-6, p a r t i t i o n methods of the bubble-point type are studied. Section 8-7 contains applications of the various methods while Section 8-8 concludes the chapter. V i t a l information on the systems which were employed i n t e s t i n g out the various algorithms i s contained i n Table 8-1. 8-1-1 Nomenclature Note: Any symbol not defined below and not c l e a r l y defined where i t occurs within t h i s chapter retains the d e f i n i t i o n of Section 3-1-1. -293-Table 8-1: V i t a l Information on adiabatic-flash systems System Code No. of Components Components and % Composition Feed Temperature Range (K) Feed Pressure Range (Atm.) Operating Pressure (Atm.) HA 4 Same as for system VA 370 - 410 8 - 8 1.0 HB 3 Same as for system VB 108 - 144 20 - 40 1.316 HC 5 Same as for system VC 378 - 478 21 - 37 1.0 HD 4 Same as for system VD 360 - 508 10 - 42 1.0 HE 4 Same as for system VE 350 - 486 10 - 38 1.0 HF 5 Same as for system VF 370 - 490 10 - 38 1.0 HG 4 Same as for system VG 350 - 486 10 - 38 1.0 HH 4 Same as for system VH 340 - 488 10 - 46 1.0 HI 4 Same as for system VI 350 - 498 10 - 46 1.0 HJ 6 Same as for system VJ 370 - 490 10 - 38 1.0 HK 3 Same as for system VK 380 - 480 10 - 46 3.7 HL 2 Same as for system VL 400 - 580 10 - 22 1.0 HM 2 Same as for system VM 410 - 598 10 - 46 1.5 HN 2 Same as for system VN 400 - 592 10 - 38 1.0 HO 2 Same as for system VO 390 - 578 10 - 46 1.0 HP 4 Same as for system VP 385 - 585 10 - 46 1.0 -295-Symbol D e f i n i t i o n f Check function F T o t a l feed rate h Liquid-phase enthalpy H Vapour-phase enthalpy Greek Symbols av > a T Damping parameters for T and V 0 Phase f r a c t i o n Subscripts bp Bubble-point dp Dew-point F Feed H Enthalpy 1 Component; equation number M Mass balance 1,2,3 I t e r a t i o n points Superscripts E Excess o Ideal gas value; i n i t i a l point * Equilibrium point - (as i n H): denotes p a r t i a l value 8-2 Theoretical Background A physical d e f i n i t i o n of the adiabatic vapour-liquid f l a s h prob-lem i s represented diagrammatically i n Figure 8-1. As the mixture under consideration makes i t s way towards the f l a s h drum from some other part -296-FIG 8 - 1 : AN ADIABATIC F L A S H DRUM -297-of the process plant loaded with some amount of heat at a f i x e d condition of temperature, T and pressure, P p, i t encounters a t h r o t t l e valve and undergoes i s e n t h a l p i c expansion to a pressure P. The mixture experiences a f l a s h (or a phase r e d i s t r i b u t i o n , i f two phases already e x i s t ) at t h i s reduced pressure. And because heat i s neither added nor removed, the system e q u i l i b r i a t e s at some lower temperature, T. Unlike the case of isothermal f l a s h , the adiabatic f l a s h problem requires the s o l u t i o n of the enthalpy-balance equation as well as the mass-balance and equilibrium r e l a t i o n s — since temperature i s an addi-t i o n a l unknown. The enthalpy balance assumes the form N _ N _ f H = I v H + I l h - H = 0 (8-1) H 1=1 1 1 i=l 1 1 F According to the r e l a t i o n s h i p s i n Chapter 2, the liquid-phase heat of mixing i s not computed for the i n d i v i d u a l components. However, i t has been found convenient to define h^ by h i - h i + \ (8-2) This d e f i n i t i o n introduces no difference to the enthalpy balances as long as N I 1 ± - L i = l X N or I x -1 -298-Where the feed to the t h r o t t l e valve i s subcooled or saturated l i q u i d , we have N _ H„ = I Z h , (8-3) F t ^ i F i For the general case where the feed i s a vapour-liquid mixture, H F i s given by N _ N _ H = T v H + y i h (8-4) F ^ F i F i £ F i F i v ' I t i s common practice to assume Hp as a known quantity supplied to a computer program for handling the adiabatic f l a s h c a l c u l a -t i o n . This i s , however, not l o g i c a l l y sound since the known quantity i s Ty and not Hp. A more r e a l i s t i c approach i s adopted i n t h i s study: H i s determined by performing an isothermal f l a s h c a l c u l a -te t i o n on the feed at T and P , and employing the r e s u l t s and r r appropriately-computed phase molar-enthalpies i n Equation (8-3) or(8-4). To determine the state (temperature and phase d i s t r i b u t i o n ) of the adiabatic system, Equation (8-1) i s solved along with the mass-balance, equilibrium and mole-fraction-balance r e l a t i o n s h i p s presented i n Chapter 3. 8—3 Newton-Raphson Methods The Newton-Raphson formulation of the a d i a b a t i c - f l a s h problem studied here employs two independent variables: vapour f r a c t i o n and temperature. The 'conventional formulation' according to Holland (1963) and a new form recently proposed by Barnes and Flores (King, 1980) are outlined i n Sections 8-3-1 and 8-3-2 r e s p e c t i v e l y . A modification aimed at reducing computation time i s discussed i n Section 8-3-3. -299-The conventional method and the method of Barnes and Flores require that the i n i t i a l temperature be i n the two-phase region, that i s : T, < T° < T, . bp dp In view of t h i s , both bubble- and dew-point cal c u l a t i o n s need to be performed on the system before the i t e r a t i o n can take o f f . Even with the temperature so i n i t i a l i z e d , there i s no guarantee of convergence. Holland (1963) recommends some simple rules to reduce the chances of divergence: Rule 1: For a negative 9 n + 1 , use 9 n + 1 = 0.5 (6° + 9 n) v v v v Rule 2: For T n + 1 < T , use T n + 1 = 0.5(T n + T. ) bp bp Rule 3: For T n + 1 > 1\ , set T n + 1 =0.5 ( T n + T\ ) dp dp The following steps are common to the conventional and the Barnes-Flores algorithms. (1) Compute H„ and determine T, and T, at the operating F bp dp pressure. (2) I n i t i a l i z e 9 , T and K. v — (3) Compute the check functions. (4) Compute the derivative terms. (5) Update 9^ and T. Apply Rules 1 through 3 above. (6) Test for convergence. If the outcome i s p o s i t i v e then terminate the i t e r a t i o n . Otherwise go to Step 3. -300-In the implementation of the two algorithms, i n i t i a l values are obtained from: T • °-5(TbP + V' 6° = 0.5 or V° = 0.5F, v ' o o K i s based on T and x = y = z. 8-3-1 The Conventional Formulation In the relationships that follow, x. i s given by Z i x, ~ i 1 + (K, - 1) e i v and y_ by y i • K i X i The mass-balance check function i s given by fM ( V T ) = I x ± " 1 C 8" 5) i = l 1 By s u b s t i t u t i n g the re l a t i o n s h i p s v = Z - 1 i i i and 1 = F ( l - 6 ) x into Equation (8-1) and rearranging, we have the enthalpy check function f H ( e v T ) = X z i * i " ( 1 " 9 v ) X x i ( V V " r- ^ By applying the Newton-Raphson method to Equations (8-5) and (8-6), we have -301-"9 ~ n+1 "B -V = V T T where 3f. D = M 80 3f 9f H M 3T ~ 9T 3f. 9f. H H 9f. H 30 9f. M ~3f 9 f , M n — — f M H — _ (8-7) The derivative terms are given by 9f, M 30 X i " y i 3f. M N v i + ( K ± - l ) «vj 3K, 3T i= l 3T (K ±-l) 0 v ' 9f. H 30 9f H 9T ? y i ( H i ' h i > A i + Oc± - i ) ey> N 9H 3(H. - h.) U*± 3 ^ " (1 " V * J 3T - - 9 K i 9 v ( H i - h i > -W i + ( K ± - i) e v ]} (8-8) In the above r e l a t i o n s h i p s , the derivatives of K and enthalpy with respect to T are determined through a f i n i t e - d i f f e r e n c e approach, with a perturbation of 0.001K on T. 8-3-2 The Barnes-Flores Form The Barnes-Flores method i s based on the Rachford-Rice -302-mass-balance check function and an enthalpy check function which assumes a d i f f e r e n t form from Equation (8-6). In the following r e l a t i o n s h i p s , x and y are again defined as i n Section 8-3-1. Mass Balance: Employing the Rachford-Rice r e l a t i o n s h i p , we have y e v,T) = ^ ( y ± - x ± ) (8-9) Enthalpy Balance: The enthalpy check function can be obtained from Equation (8-6) by combining the terms i n a n d subs t i t u t i n g 6 K x for z. - (1 - 0 ) x . The r e s u l t i s v i i l v i N H_ W T ) = \ x J e v K i H i + ( 1 " V h J - -i 1=1 Equation (8-7) applies, with the derivatives given by 3f. M 36 N ( K 1 - l ) ( y 1 - x ± ) H 3K, 3f, M N x i 3T 3T 3f. 36 H ±lx 1 + ( V D 6 v i=l 1 + (K - 1)6 i v 3f_ N 6 (1-6 )(H -h,)3K, H _ y r v x v / x i i i 3T , L . X i t 1 + (K -1) 0 3T i=l I v 3H 3h + t V i — + <X " QJ — ]} 3T 3T (8-10) (8-11) -303-8-3-3 A Modified Approach The modified approach proposed below embodies a number of time-saving devices. The vapour f r a c t i o n , 8 , i s replaced by V as one of the check v a r i a b l e s . The check functions are defined by N f M(V,T) = I (K - l)x i = l 1 X N N and f H(V,T) - V ^ K . x ^ - h ± ) + ^ - H, (8-12) (8-13) In Equation (8-13), x^ i s NOT treated as a function of V or T. In Equation (8-12), i t i s treated as a function of V only, the re l a t i o n s h i p being Z. x. * i F + (K - 1) V * This r e l a t i o n s h i p i s used only for the purpose of d i f f e r e n t i a t i n g x^ with respect to V. The derivatives presented i n Equation (8-15) below are based on the following d e f i n i t i o n s of x and y: Z, (1) v ± = 1 + K i V (2) 1 ± = Z± - v ± (3) x, = l i i N I l i i= l (4) y. i N 1=1 (8-14) -304-This approach, which ensures that x and y are i n mass balance at every stage of the i t e r a t i o n , was found to be more e f f i c i e n t than the a l t e r n a t i v e approach that i s based on an equilibrium agreement between them. The derivatives are determined from (8-15) In applying the above r e l a t i o n s h i p s , three time-saving measures were introduced: (1) Holding constant the derivatives of K and enthalpy with respect to T, a f t e r a number of i t e r a t i o n s ; (2) Reducing the number of K evaluations per i t e r a t i o n ; (3) Eliminating the d i r e c t evaluation of the K-T d e r i v a t i v e s . The three modifications are discussed below. 3 f M N g ± - i r L 7 i-1 i 9V 3f. M 3T N 3K ± = I x , i=l 1 3T 3f„ . N H 3V 3f. = I K,x,(H. - h ), i-1 x H 3T N - V I x [(H -h ) i=l 1 1 1 3 K i a ( H l - h . ) 3T + K i 3T ] N 3h -305-Holding K-T, H-T and h-T Derivatives constant Figure 8-2 shows some plots of phase-enthalpies, weighted by system mole-fractions. For example, H i n the plot i s given by N _ H = I z H A l l the plotted points are based on the constant compositions, x = y_ = z. Similar plots of average K values, defined by N K = I z.K 1-1 are presented i n Figure 8-3. From the curvature of the p r o f i l e s i t was speculated that when the f i r s t few i t e r a t i o n s have brought T within a reasonable distance of * — _ the desired solution, T , the H-T, h-T and K-T derivatives could be held constant without i n c u r r i n g an increase i n the number of i t e r a t i o n s . 9K i S-H^ 8 ^ To test this out empirically, values of , and —g^- were genera-ted as functions of i t e r a t i o n number for some systems, including both narrow- and wide-boiling mixtures. It was observed that i n every case, the values of the derivatives were r e l a t i v e l y constant a f t e r the t h i r d i t e r a t i o n . The algorithm was therefore modified to compute these derivatives only for the f i r s t three i t e r a t i o n s , and to use the values for the t h i r d i t e r a t i o n for a l l succeeding i t e r a t i o n s . Fig8-2: Variation of Entholpies with temperature at constant composition -307-o > < ° T 0 +10 +20 +30 +40 +50 +60 +70 +80 +90 +100 • Temperature( Kelvin units) Fig 8 — 3 : Variation of system average K with temperature at constant composition -308-Results were generated at 10 points for system HA and at 6 points for system HL based on this modification. When the re s u l t s were compared with those obtained without the modification, i t was found that the modified form did not incur extra i t e r a t i o n s and did lead to an average time-saving of about 23%. Reducing the Number of K Evaluations per I t e r a t i o n This modification takes advantage of the fa c t that the K values employed i n temperature updating at every i t e r a t i o n are based on the same composition as the K values used i n the next composition updating. The l a t t e r K values are therefore estimated from the former by means of a suitable K-T model. The approach adopted i s discussed l a t e r i n Section 8-6-3, and the applicable r e l a t i o n s h i p i s presented as Equation (8-35). Elim i n a t i n g D i r e c t Evaluation of K-T Derivatives Let us consider the thermodynamic r e l a t i o n s h i p (Prausnitz, 1969): SAnf, i L 3T " ( h ± - H°) p,x RT 2 (8-16) The corresponding vapour-phase equation i s (Holland, 1963): 3£nf, i v 3T -<H± - H°) P,7 RT 2 (8-17) If we employ the basic d e f i n i t i o n s of f f . and K , we would have i L , i v i * n f i L " * n f i v = £ n K i + £ n x i " £ n y i (8-18) -309-From Equation (8-18), we have HnK 9 * n f i L 3T 9^nf, i v p,x i p,y ~3T (8-19) P,x,y E l i m i n a t i n g the f u g a c i t y - d e r i v a t i v e terms between Equations (8-16), (8-17) and (8-19) leads to 9 K i 9T K i ( H i " V P,x,y R T 2 — (8-20) In the implementation of the d i f f e r e n t versions of the 'modified Newton-Raphson' method (see algorithms s e r i a l l y numbered 5 through 7 i n Table 8-3), the temperature was simply i n i t i a l i z e d as i n the saturation-point c a l c u l a t i o n and the three flow- and temperature-constraining rules of Section 8-3 were not applied. The method performed well i n t h i s form and this s u ccessfully eliminates the determination of system bubble and dew points. The method requires i n i t i a l i z i n g L and V and these are each set to half the feed value. For the purpose of computing i n i t i a l K values, x and y_ are set equal to z_ 8-4 A Double-iteration Regula-falsi Method This method involves the s o l u t i o n of the mass-balance, equilibrium and mole-fraction-balance r e l a t i o n s h i p s through an isothermal f l a s h c a l c u l a t i o n at the current temperature, followed by a temperature update through the a p p l i c a t i o n of the r e g u l a - f a l s i method to the two most current temperature points, using the enthalpy check function as the temperature-dependent v a r i a b l e . -310-The following are the key steps involved: (1) Determine the state of the feed through an isothermal f l a s h . Then compute Hp. (2) Choose two temperatures, T and T 2, such that T, < T. < T„ < T, . bp — 1 — 2 — dp At each of these temperatures, perform an isothermal fl a s h calcula-tion and determine the corresponding enthalpy check functions, f and f from Equation (8-1). HI Hz (3) Carry out an interpolation regula f a l s i between points T^ and T 2 to obtain T from f T - f T T = J L i Hl__2 ( g _ 2 1 ) H2 HI Perform an isothermal flash at T. (4) Test for convergence. Terminate i t e r a t i o n i f the outcome i s positive; otherwise go to Step 5. (5) Determine f at T. H (6) Replace the larger of f , f with f and the corresponding HI H2 H temperature with T. Go to Step 3. Step 2 requires that both the dew and bubble points be determined. To save on computation time, T^ and T^ i n this step are set equal to T, and T, respectively. This way, the isothermal bp dp fl a s h at the two i n i t i a l temperatures are avoided and fewer enthalpy terms are also computed. -311-8-5 Sum-Rates P a r t i t i o n i n g Methods The methods described i n this section have been loosely branded 'sum-rates' methods because l i k e the d i s t i l l a t i o n - c a l c u l a t i o n sum-rates methods, so i d e n t i f i e d by Friday and Smith (1964), they involve the matching of temperature with enthalpy. The sum-rates i d e n t i t y i s l o s t when i t comes to determining phase d i s t r i b u t i o n . The main objective here was to develop a method that eliminates the double-iteration structure of the method of Section 8-4 without getting Involved i n the evaluation of derivatives and the double compu-tat i o n of K and enthalpies that they e n t a i l (as i n the Newton-Raphson Methods) or i n time-consuming saturation-point c a l c u l a t i o n s . The three algorithms that have been studied i n this section treat _v and T as the independent vari a b l e s . 8-5-1 Successive-Substitution Method with Vector Projection Let us consider Equation (8-1). A simple manipulation leads to N _ N N _ N I v,(H-H°) + I v H° + I 1 (h.-H?) + I I H ? - H - 0 i-1 1 1 1 1-1 1 1 1=1 1 1 1 i-1 1 1 F Combining the ideal-gas terms and using the fact that h + V i = Z i > we have fH = XZ±E1 + J / i ^ i - H i ) + X h ^ P ~ *F " ° <8-22> i=l i=l i=l The scheme adopted here involves solving Equation (8-22) for temperature successively with the r e l a t i o n s for v_. Because of the highly non-linear, non-polynomial nature of the three middle terms of -312-Equation (8-22), some assumption was made i n order to avoid a f i n i t e - d i f f e r e n c e derivative evaluation i n updating T. I t was assumed that a l l the enthalpy terms, except the ideal-gas term, are constant at the current temperature. Since H° i s a fourth-degree polynomial i n temperature, this assumption converts Equation (8-22) into an e a s i l y - d i f f e r e n t i a b l e polynomial i n T. The main steps of the algorithm are: (1) Perform an isothermal f l a s h c a l c u l a t i o n on the feed at T and F Pp. Hence compute Hp. (2) I n i t i a l i z e v_ and T. (3) Compute the enthalpy departures at the current T, x_ and y_. Employing these i n Equation (8-22) and tre a t i n g the ideal-gas enthalpy term as a function of temperature, perform a Newton step on the equation to obtain a new estimate of T. (4) Using the current values of T, x and y_, calculate K and obtain new estimates of v_ and 3. by performing a single successive-s u b s t i t u t i o n step of the GP algorithm of Section 3-3. (5) Perform an appropriate vector-projection on as i n the GP algorithm. (In testing the method, the t r i a n g u l a r - p r o j e c t i o n method was employed.) (6) Test for convergence. If the outcome i s negative then go to Step 3; otherwise terminate execution. For temperature i n i t i a l i z a t i o n , the three schemes developed f o r saturation-point c a l c u l a t i o n (Section 7-9) were tested and Scheme 3 was found to be s l i g h t l y better than the other two. Also, i n i t i a l i z i n g v -313-f rom V l = 1 (i=l,2,...,N) with K based on T° and x = y_ = z_ gave s l i g h t l y better r e s u l t s than with K c a r r i e d over from the isothermal f l a s h on the feed at {T ,P }, F F and also than from simply setting v° = 0.5Z^ When the algorithm was applied i n the above form to system HA, o s c i l l a t o r y behaviour was observed. By the very nature of the algorithm, the temperature i s always forced i n such a d i r e c t i o n as to reduce the error i n the flow quantities, as the following argument shows. Assume that _v i s less than i t s equilibrium value at some stage i n the i t e r a t i o n and that T i s not too far from i t s equilibrium value. The t o t a l enthalpy departure would be les s than i t s equilibrium value. For Equation (8-22) to be s a t i s f i e d , the ideal-gas term would have to be higher than i t s equilibrium value. Since H° i s an increasing func-t i o n of T, a higher T would r e s u l t . This would i n turn drive up the value of _v — i n the d i r e c t i o n of equilibrium. A s i m i l a r argument obtains for a s i t u a t i o n where i s currently larger than . The source of the o s c i l l a t i o n then i s the d i s p a r i t y between the convergence speed of T and that of _v. To eliminate the o s c i l l a t o r y behaviour, _v and T were damped according to the r e l a t i o n s h i p s mn+l , . n T = a T T + (1 - a T) T , and n+l n+l . . . . n+l v = a v + ( l - a ) v — v— v — -314-where 0 < a < 1 — T — and 0 < a < 1 — v — D i f f e r e n t combinations of a T a n d a.^ w e r e experimented upon and the best r e s u l t s were obtained with the combination To see what e f f e c t the embodiment of the t o t a l enthalpy r e s i d u a l i n the ideal-gas term has on the convergence of the method, an approach that takes account of the dependence of a l l the enthalpy terms on temperature was t r i e d . The derivative was determined from of - g | = 1000[f R(T + 0.001) - f H ( T ) ] The approach was found not to eliminate the o s c i l l a t o r y behaviour. I t therefore also required temperature-damping, and since i t involves two enthalpy computations for every temperature update, i t i s more time-consuming . 8-5-2 Absorption-Factor Formulation with Vector P r o j e c t i o n This i s an attempt to eliminate the damping of v^ , as was employed i n the preceding section, by using a more sluggish flow-convergence formulation. Arrangement 2 of Section 3-3-6, which i s known to converge very slowly, was t r i e d . This arrangement leads to Z. v. = 1 i F - V - + 1 K ±V Z i ° r ' V i = A + 1 ( 1 = 1> 2»--->N) (8-23) where A i s absorption factor. -315-The steps involved i n the r e s u l t i n g algorithm are the same as those outlined i n Section 8-5-1, with the following exception: i n Step 4, v_ i s computed from Equation (8-23) and Step 5 i s appropriately execu-ted; no damping of _v i s done. 8-5-3 Absorption-Factor Formulation Without Acceleration S t i l l i n search of a mass convergence rate that w i l l match the temperature convergence speed and eliminate o s c i l l a t i o n s , another ver-sion of the algorithm was studied. This version excludes the vector-proj e c t i o n acceleration as represented by Step 5 of the algorithm of Section 8-5-1. Also, i s simply i n i t i a l i z e d from v° = 0.5Z, as this was found here to be just as good as the scheme adopted i n Section 8-5-1. In a l l other respects, this algorithm i s the same as that of Section 8-5-2. 8-6 Bubble-point (BP) Partitioning Methods Bubble-point (BP) p a r t i t i o n i n g methods are widely applied to d i s t i l l a t i o n c a l c u l a t i o n s involving the separation of narrow-boiling mixtures (see, for example, King, 1980; Henley and Seader, 1981). The p a r t i t i o n i n g matches enthalpy with either V or L and e n t a i l s updating temperature through a bubble-point c a l c u l a t i o n . In t h i s section, an algorithm based on the basic BP concept has been developed (Section 8-6-1). The algorithm has been subjected to a c r i t i c a l study with a view to eliminating the time-consuming bubble-point c a l c u l a t i o n step (Section 8-6-2). Steps are next taken to reduce -316-the number of K evaluations per i t e r a t i o n (Section 8-6-3). F i n a l l y , i n Section 8-6-4, the algorithm i s modified to embody the method proposed i n Section 8-3-3 for eliminating the d i r e c t c a l c u l a t i o n of the K-T d e r i v a t i v e s . The study reported i n t h i s section was undertaken i n f u l l know-ledge of the K^-method (Holland, 1975), a technique currently employed i n BP algorithms to eliminate bubble-point c a l c u l a t i o n . An algorithm based on the technique has, however, not been implemented here because, as l a t e r shown i n Section 9-4-2, i t i s — with suitable choice of a base component — simply one of the formulations that have been studied i n Section 8-6-2. 8-6-1 The Conventional Form In the formulation, l e t us choose V as the other check variable i n addition to T. V i s updated from the enthalpy balance while T i s up-dated from a bubble-point c a l c u l a t i o n , based on the current liquid-phase composition, x. For the purpose of computing V, the enthalpy balance i s rearranged into the reportedly more e f f i c i e n t constant-composition form (Holland, 1975). To achieve t h i s , substitute the equation x i = V K i into Equation (8-13), and set the r e s u l t equal to zero. Then solving for V y i e l d s N _ H F " 1 z i \ 1=1 J-V = i - — (8-24) I y ±(H - h ) 1=1 1 1 -317-The main steps of the c a l c u l a t i o n a l procedure are: (1) Determine as i n previous algorithms. (2) I n i t i a l i z e L, V, T and K. (The i n i t i a l i z a t i o n scheme applied to the 'modified Newton-Raphson' method was adopted.) (3) Compute v_ from Equation (8-23) and determine 1 from component mass balance. Hence compute x_ and y_. (4) Calculate T as the bubble-point based on x and the operating pressure. (5) Compute the enthalpies at the current T, x_ and y_. (6) Determine V from Equation (8-24) and L from total-mass balance. (7) Test for convergence. If the outcome i s p o s i t i v e , then terminate the i t e r a t i o n ; otherwise go to Step 3. 8-6-2 Eliminating Bubble-point C a l c u l a t i o n It w i l l be r e c a l l e d that the bubble-point of a l i q u i d of composi-t i o n x i s normally determined by i t e r a t i v e l y solving for the temperature that reduces the check function N f(T) = I K x - 1 (8-25) i=l 1 1 or an inverse-logarithmic form of i t to zero. When Equation (8-25) i s employed i n updating T, the r e s u l t would be i n * error to the extent that x i s removed from x , the equilibrium l i q u i d composition. There i s therefore no j u s t i f i c a t i o n i n performing a time-draining bubble-point c a l c u l a t i o n for the purpose of obtaining an inexact value of T. -318-In the bubble-point-eliminating methods experimented upon here, T i s updated by applying a single Newton-iteration step at the current temperature-point to check functions of the form of Equation (8-25). This not only r e s u l t s i n tremendous time-saving for each i t e r a t i o n , but could a c t u a l l y lead to a reduction i n the number of i t e r a t i o n s , as the following argument shows. By considering the r e l a t i o n s h i p : Z i x. = i 1 + (K - 1) 6 i v ie ie ie ie i t w i l l be seen that T = T, for 6 =0.0 while T = T,, for 9 = 1 . bp v dp v Now suppose that {6 ,T} i s currently such that 0 < 6 < 9 . 1 v ' v v Carrying out a bubble-point c a l c u l a t i o n at the current x_ would r e s u l t ie ie i n a new T such that T, < T < T • I f T was greater than T bp before the updating, this would amount to an overcorrection. The single-step Newton-iteration approach proposed here would at least damp ie the overcorrection. If T was less than T , the one-step method would also y i e l d a better updated value i f the displacement of 9 v ie ie from 9^ was such as to s h i f t T farther away from T . A s i m i l a r * argument applies to the case where 0 < 9 < 1. v v Seven d i f f e r e n t check functions were studied i n the one-step-temperature-up-date algorithm. In the presentation of the seven formu-la t i o n s which follows, the following r e l a t i o n s h i p s w i l l be invoked where necessary: -319-Z i x. = i 1 + (K - 1)6 ' i v V i and i 1 + (K - 1)9 » 9 K i 9 x i _ 1 V 3T 8 T " [1 + ( K l - l ) 6 v ] 2 ' 3K 9 ^ i ^ " V Z i I f 8 T [1 + (K ± - l ) 9 v ] 2 N Form 1: f(T) = I K x - 1 (8-26) i-1 Equation (8-26) i s applied with x^ treated as independent of T, so that N 3K f (T) - ^ x - t ? y i Form 2: f(T) - £ -±. - l (8-27) i-1 K i Here, i s treated as temperature-independent, with the r e s u l t that N y 3K f ( T ) = - i 4 i 2_i i-1 K 2 3T -320-N y Form 3: f(T) = I (K x - -±) (8-28) 1=1 1 1 K i where the dependences of x^ and y^ on T are ignored. The resulting derivative is N y 8K f'(T) = I (x + - g i i=l 1 KT v i N Form 4: f(T) = I x - 1, with x treated as a funtion of T. 3 _ 1 J-i=l Thus, we have N z ± f ( T ) i + (K - i) e " 1 i=l i v (8-29) and f ( T ) = - I z< 9 ^ 1 V 8T-i=i [ l + (K ± - i) e j ' N Form 5: f(T) = £ y - 1, i=l 1 with y treated as a function of T. In this case, the working equations become N K z f ( T ) " * 1 + (K - 1) 6 " 1 <8-30> i=l i v and f ( T ) = I 8K N (i - e v) z ± -gi i=i [l + (K± - i) e y] i -321-N Form 6 : f (T ) = £ (y - x ) , where both y and x are f u n c t i o n s of T. i = l 1 1 1 1 Th is leads to :(T) - I ^ N (K ± - 1) z ± 1-1 - ( K i " l ) 6 v (8 -31) and f ' ( T ) = J i 3T i-i [l + (K± - i) ey]' I n a p p l y i n g each of the above f o r m u l a t i o n s , the temperature i s updated a c c o r d i n g to the Newton i t e r a t i o n formula T n+1 = T n _ f (T " ) f ' ( T n ) (8 -32) Form 7 : An i n v e r s e - l o g a r i t h m r e l a t i o n s h i p of the form N I 1=1 1 r f(—) = in I K x w i t h x t r e a t e d as independent of T. A p p l y i n g the Newton i t e r a t i o n formula to t h i s form y i e l d s r—- N N T n+1 T n 1 + ( I K x )(*n I K x ) i = l 1=1 1 m n r i L x i ^ T N I i = l (8 -33) Only two K computations are r e q u i r e d f o r each temperature update, 8K the second be ing n e c e s s i t a t e d by the f a c t that i s determined by a f i n i t e - d i f f e r e n c e method. -322-The above re l a t i o n s h i p s were applied to 8 of the systems l i s t e d i n Table 8-1. The algorithms are, of course, d i f f e r e n t from that of Section 8-6-1 only i n Step 4 where T i s updated through one of the above r e l a t i o n s h i p s . For each system, f i v e points, uniformly d i s t r i b u t e d over the feed-pressure and temperature ranges indicated i n Table 8-1, were used. The r e s u l t s obtained are presented i n Table 8-2 i n the form of the number of i t e r a t i o n s required, summed over the f i v e points involved. As can be seen from the Table, the d i f f e r e n t formulations are quite close i n t h e i r performance, with no single formulation e x c e l l i n g for a l l systems. On the average, Formulations 4 through 6 show a s l i g h t edge over the other four, and they are found to give i d e n t i c a l perform-ances. Since Formulation 4 requires less computational e f f o r t than the other two, i t was declared the winner. 8-6-3 Reducing K Computation In following the computational path of Section 8-6-2, K i s compu-ted three times i n every i t e r a t i o n : once for the purpose of evaluating from Equation (8-23), and twice for the temperature update. Now, a scrutiny of the path reveals that there i s no updating of x_ and y_ between any temperature update and the next v_ c a l c u l a t i o n . Advantage was taken of this observation to eliminate the d i r e c t evaluation of the K required for c a l c u l a t i n g v_ from Equation (8-23), by estimating 9K K from a simple K-T model. In so doing, the fact that i s evaluated i n the process of updating T i s b e n e f i c i a l . Table 8-2 I t e r a t i o n counts f o r d i f f e r e n t check f u n c t i o n f o r m u l a t i o n s f o r one-step Newton-Iteration update of temperature i n BP a l g o r i t h m System Form 1 Form 2 Form 3 Form 4 Form 5 Form 6 F orm 7 HA 30 26 27 27 27 27 30 HD 34 36 35 34 34 34 33 HE 37 37 37 37 37 37 37 HG 43 37 42 40 40 40 42 HH 39 39 39 39 39 39 39 HI 28 31 30 30 30 30 29 HJ 28 29 28 27 27 27 29 HK 24 26 24 24 24 24 24 I 263 261 262 258 258 258 263 -324-Let us consider a two-term truncation of the Taylor s e r i e s -expansion of £nK^ with respect to -^ about point T n. This r e s u l t s i n 1 1 9 J l n K< *nK = InK (T n) + (A - ±-) -± 1 1 T T n 3(1) T=T (8-34) n I f we apply Equation (8-34) to the point T n + * and we simplify the r e s u l t i n g equation, we would have 3K K i ( T n + 1 ) = K i e x p { T n ( l - T n / T n + 1 ) ^ / K j (8-35) where the quantities to the right of the equality sign r e f e r to the point T n. In the new form of the algorithm, the convergence te s t of Step 9 (see Sectin 8-6-1) i s followed, i f necessary, by the updating of 3K from Equation (8-35), ^-1 having been previously evaluated i n the process of applying the temperature-updating scheme of Section 8-6-2. The K computation i n Step 3 i s thus eliminated. 8-6-4 Eliminating K-T Derivative C a l c u l a t i o n Seeking a further improvement on the algorithm of Section 8-6-1, i steps were taken to eliminate the d i r e c t evaluation of and, by so doing, further reduce the number of K computations by one (to one) i n every i t e r a t i o n . To achieve this objective, the r e l a t i o n s h i p developed i n Section 8-3-3 and presented as Equation (8-20) was employed. However, since the r e l a t i o n s h i p requires a knowledge of the enthalpy terms and since, according to the algorithm as previously outlined, the enthalpies are -325-3 K i not evaluated u n t i l a f t e r the temperature update (for which i s needed), some rethinking was necessary. The approach adopted was to 9 K i determine 7 ^ — d i r e c t l y for the f i r s t i t e r a t i o n and to estimate i t from Equation (8-20) for a l l subsequent i t e r a t i o n s , using the enthalpy values r e s u l t i n g from the previous i t e r a t i o n . A f t e r a l l the bludgeoning, the algorithm now assumes the following shape: (1) Determine H as before. F (2) I n i t i a l i z e L, V, T, x and y. Compute K. (3) Compute from Equation (8-23) and determine 1^ from component mass-balance. Hence compute x and y_. 3K (4) Compute K. If i t i s the f i r s t i t e r a t i o n , then compute 3K by f i n i t e difference; otherwise, compute — ^ from Equation (8-20). (5) Update T by the method recommended i n Section 8-6-2. (6) Compute the enthalpies at the current T, x and y_. (7) Update V from Equation (8-24) and L from total-mass balance. (8) Test for convergence. If the outcome i s p o s i t i v e then terminate the i t e r a t i o n ; otherwise go to Step 9. (9) Update K from Equation (8-35) and go to Step 3. 8-7 A p p l i c a t i o n s The theories presented i n the foregoing sections of this chapter have been organized into 15 d i f f e r e n t algorithms. The reference names -326-f o r , as well as short descriptions of, these algorithms are presented i n Table 8-3. Both the conventional and the Barnes-Flores formulations of the Newton-Raphson method have each been implemented i n two forms: a ver-sion that employs K values that have not been i t e r a t i v e l y corrected for th e i r composition dependence; and a version that does a composition c o r r e c t i o n on the K values at the current values of 0 and T. The — v references on the two methods contain no information as to which of these two versions, i n each case, i s the recommended choice. 8-7-1 Convergence C r i t e r i a Two d i f f e r e n t c r i t e r i a have been employed i n t h i s work for terminating the adiabatic f l a s h i t e r a t i o n : a temperature c r i t e r i o n , and a vapour component-flow c r i t e r i o n . The v_ c r i t e r i o n i s the same as that employed for terminating isothermal f l a s h c a l c u l a t i o n s , that i s The temperature c r i t e r i o n was s i m i l a r l y chosen to match that employed i n terminating saturation-point c a l c u l a t i o n s , v i z : | T n - T n _ 1 | < 0.001 I t e r a t i o n i s terminated a f t e r the nth i f the above two c r i t e r i a are s a t i s f i e d simultaneously. Table 8-3 Reference names and descriptions of a d i a b a t i c - f l a s h algorithms Serial Number Reference Name Description 1 Conventional Newton-Raphson 1 Based on the conventional Newton-Raphson method discussed in Section 8-3-1, and employs K values that are corrected for composition dependence. 2 Conventional Newton-Raphson 2 Same as 1 but uses K values that are NOT corrected for composition effects. 3 Barnes-Flores 1 Based on the Barnes-Flores version of. the Newton-Raphson method discussed in Section 8-3-2, with K values that are corrected for composition-dependence. 4 Barnes-Flores 2 Same as 3 but with K values that are NOT corrected for composition effects. 5 Modified Newton-Raphson 1 Based on proposed formulation of Section 8-3-3, with evaluation of K-T, H-T and h-T derivatives only for fi r s t 3 iterations, and without application of Equations (8-20) and (8-35). 6 Modified Newton-Raphson 2 Same as 5 but with application of Eq.(8-35) to estimate K values employed in composition update. 7 Modified Newton-Raphson 3 3K Same as 6 but with ^ estimated from Eq.(8-20). 8 Double-iteration Regula-falsi Based on the method described in Section 8-4. 9 SR 1 Based on the method discussed in Section 8-5-1. 10 SR 2 Based on the method described in Section 8-5-2. 11 SR 3 Based on the method discussed in Section 8-5-3. 12 BP with Bubble point Based on the algorithm of Section 8-6-1. 13 Proposed BP 1 Same as 12 but with T update as described in Section 8-6-2 14 Proposed BP 2 Same as 13 but with reduction in K computation through application of Equation (8-35). 15 Proposed BP 3 Same as 14 but with K-T derivatives estimated from Equation (8-20). -328-8-7-2 Results and Observations In a l l the applications for which r e s u l t s have been presented here, f i v e points were u t i l i z e d for each system. In each case, the f i v e points were spread uniformly on the l i n e l i n k i n g the point of minimum feed-temperature and -pressure to the point of maximum feed-temperature and -pressure i n the ranges given i n Table 8-1. As a f i r s t step i n the comparison, a l l 15 algorithms were applied to 10 of the systems. The r e s u l t s are presented i n Table 8-4 and they lead to the following observations: (1) A check of the equilibrium temperature, flows and compositions generated by the d i f f e r e n t algorithms showed that a l l the converged solutions are exactly the same i n a l l cases. (2) The BP methods, as expected, f a i l when applied to wide-boiling systems. (3) None of the three SR algorithms i s t o t a l l y r e l i a b l e for handling narrow-boiling systems, and only 'SR algorithm 3' performs well f o r wide-boiling systems. (4) The conventional Newton-Raphson and the Barnes-Flores algorithms perform better when the K values are corrected for composition-dependence i n an inner i t e r a t i o n - l o o p . The 'Modified Newton-Raphson' algorithms, implemented as they are without composition-correction of the K values, are quite r e l i a b l e and f a s t . (5) A comparison of the i t e r a t i o n requirements for the conventional Newton-Raphson and the Barnes-Flores algorithms (version 1 i n either case) revealed that t h e i r i t e r a t i o n requirements are quite close, the l a t t e r being better for only about 50% of the systems. This i s r e f l e c t e d i n the execution times. Table 8-4 Computation times (CPU seconds) for adiabatic-flash algorithms Newton-Raphson Algorithms Double-iteration Regula-falsi SR Algorith ms BP Algorithms System Conventional Barnes-Flores Modified 1 2 3 with bubble Proposed 1 2 1 2 1 2 3 point 1 2 3 HA 1.3333 2.8010 1.2250 2.4143 1.0709 0.7990 0.7777 f 1.6541 0.8956 0.5696 1.4905 0.5807 0.5241 0.4600 HD 2.1308 >5.9456 2.2373 >5.9202 1.4234 1.0837 0.8378 1.7538 f f f 1.9511 0.8400 0.8076 0.6356 HG 1.9908 1.9358 2.2158 2.1779 1.3669 1.0317 1.0476 1.9536 1.9365 f 1.0503 1.7668 0.8386 0.7543 0.5667 HH 1.9040 2.3249 2.2000 2.5166 1.3142 1.0047 0.9683 1.7696 2.3349 f 0.9961 2.1930 0.8708 0.7885 0.6070 HI 1.7066 2.4211 1.7304 2.5637 1.2079 0.9694 0.9278 1.4005 2.2859 f 1.0265 1.7926 0.6992 0.6568 0.5504 HJ 2.5608 >4.5484 2.4282 >6.3566 1.8122 1.6929 1.4982 2.2945 2.5324 f 1.1266 2.2215 0.8322 0.7573 0.7122 HK 1.3765 1.4789 1.5082 1.5440 1.0959 0.9677 0.8372 1.7679 f f 2.3173 0.9870 0.4729 0.4434 0.3856 HN 1.6435 >3.5117 1.6134 >3.6381 1.5334 1.4006 1.6895 1.3565 f f 0.5327 f f f f HO 1.6060 >3.2032 1.5082 >3.2419 1.2715 1.1450 1.2742 1.3006 f f 0.5636 f f f f HP 2.0733 >4.7989 1.9005 >4.9861 l l .3975 1.0689 1.2453 1.3712 1.8211 f 1.0826 f f f f f => > => failure converge in at le nee was ast one not reac joint. ied, for at leas t one po int, within the set upper bound on number of iterations -330-(6) The iteration requirements for the different BP algorithms are presented in Table 8-5. A comparison of the iterations for 'BP with Bubble point' and 'Proposed BP 1' vindicates the argument presented in Section 8-6-2 regarding possible 'overcorrection' with the bubble-point algorithm. The results in the Table further show that the time-saving steps resulting in Proposed BP algorithms 2 and 3 respectively do not have any significant adverse effects on their i teration requirements. (7) An i teration comparison (not presented) for the 'Modified Newton-Raphson' algorithms showed that Algorithm 2 required less i terations, on the average, than Algorithm 1. It also showed that Algorithm 3 required about the same number of iterations as Algorithm 2 for narrow-boiling systems, but required much more — sometimes more than 20% more — for wide-boiling systems. (8) The proposed BP methods showed greater s tabi l i ty with wide-boiling systems than does the 'BP with bubble point' method; for while the latter method fai led in every case of wide-boiling mixture application, the former algorithms were found to converge for one out of every five points when applied to systems HO and HN. This suggests that they could show good behaviour with simple damping techniques. However, this option was not pursued, in view of the experience with the SR methods where damping does not lead to good performance with ALL narrow-boiling systems. Guided by the results from the f i r s t stage of the applications, the f i n a l comparison was designed to exclude some of the 15 algorithms, and to involve separate comparisons for narrow-boiling and wide-boiling systems. Table 8 - 5 Comparison of I t e r a t i o n count f o r BP algorithms System W i t h Bubble P o i n t P r o p o s e d 1 P r o p o s e d 2 P r o p o s e d 3 HA 31 27 27 29 HD 34 34 36 36 HG 38 40 40 37 HH 40 39 39 38 HI 31 30 31 33 HJ 32 27 27 33 HK 23 24 24 26 -332-Narrow-boiling Systems For the narrow-boiling systems (systems HA through HK), the following algorithms were involved: (a) Conventional Newton-Raphson 1. (b) Modified Newton-Raphson 2. (c) Modified Newton-Raphson 3. (d) Double-iteration regula f a l s i . (e) BP with bubble-point. ( f ) Proposed BP 3. The computation times are presented i n Table 8-6. The o v e r a l l best r e s u l t s are obtained with the 'Proposed BP algorithm 3', while, i n the class of methods that apply to both narrow- and wide-boiling systems, the 'Modified Newton-Raphson algorithm 3' i s the preferred choice. Wide-boiling Systems For the wide-boiling systems (systems HL through HP), the comparison was amongst the following algorithms: (a) Conventional Newton-Raphson 1 (b) Modified Newton-Raphson 2 (c) Modified Newton-Raphson 3 (d) Double-iteration regula f a l s i (e) SR algorithm 3 Before the comparison was made, a further look was taken at 'SR algorithm 3' with a view to determining how i t would fare with wide-boiling systems without any temperature damping. Two versions of the algorithms, both without temperature damping, were considered: one Table 8-6 Computation times (CPU seconds) for adiabatic-flash algorithms for narrow-boiling systems I Newton-Raphson algorithms Double-iteration BP algo rithms System Modif ied regula-falsi with bubble-point Proposed 3 Conventional 1 2 3 HA 1.3333 0.7990 0.7777 f 1.4905 0.4600 HB 1.6471 1.0928 0.8672 1.4165 0.9498 0.3301 HC 2.1203 1.3892 1.2436 2.3260 2.3159 0.6516 HD 2.1308 1.0837 0.8378 1.7538 1.9511 0.6356 HE 1.8507 1.0171 0.8476 1.6326 2.1329 0.6316 HF 2.1097 1.3224 1.1744 2.0458 1.7819 0.5794 HG 1.9908 1.0317 1.0476 1.9536 1.7668 0.5667 HH 1.9040 1.0047 0.9683 1.7696 2.1930 0.6070 HI 1.7066 0.9694 0.9278 1.4005 1.7926 0.5504 HJ 2.5608 1.6929 1.4982 2.2945 2.2215 0.7122 HK 1.3765 0.9677 0.8372 1.7679 0.9870 0.3856 I 20.7306 12.3706 11.0274 »19.5941 19.5830 6.1102 f = time re ading marred by f a i l ure at one point. -334-version employs only the ideal-gas enthalpy-temperature de r i v a t i v e i n updating the temperature, just as i n the o r i g i n a l algorithm; the second version bases the enthalpy-temperature derivative on a l l the enthalpy terms and uses a f i n i t e - d i f f e r e n c e technique. The i t e r a t i o n counts r e s u l t i n g from applying the two versions are shown i n Table 8-7. The i t e r a t i o n counts are comparable, and that makes the l a t t e r by far the worse, since i t requires two enthalpy evaluations per i t e r a t i o n . The o r i g i n a l form of temperature update was therefore retained. The r e s u l t s of the f i n a l comparison are presented i n Table 8-8. In the Table the res u l t s for 'SR algorithm 3' are for both the version with temperature damping and the one without i t . As the res u l t s reveal, the SR algorithm without T-damping i s the o v e r a l l best performer for this class of systems. Amongst the methods that are not subject to boiling-range l i m i t a t i o n s , the 'Modified Newton-Raphson algorithm 2' gives the best performance. 8 - 8 Conclusions The study undertaken i n t h i s chapter leads to the following conclusions: (1) The s p e c i a l i z e d ( p a r t i t i o n i n g ) methods require less computation times than the all-purpose methods. (2) The proposed one-step Newton-iteration method for updating the temperature i n BP algorithms performs very well and successfully eliminates the need for bubble-point c a l c u l a t i o n . (3) The methods proposed for reducing K computation [Equation (8-35)] and for eliminating d i r e c t evaluation of K-T derivatives Table 8-7 Iteration counts for the two versions of "SR algorithm 3* without temperature damping System Employing only i d e a l -gas derivative Derivative by f i n i t e d ifference HL 63 60 HM 121 118 HN 66 65 HO 75 72 HP 99 95 Table 8-8: Computation times (CPU seconds) for adiabatic-flash algorithms for wide-boiling systems System Newton-Raphson Algorithms Double-iteration Regula-falsi SR Algol ithm 3 Conventional 1 Modif ied With T-damping Without T-damping 2 3 HL 1.5719 0.9882 1.3934 1.1936 0.4294 0.4419 HM 1.5739 1.2052 1.3563 1.2309 0.7700 0.7845 HN 1.6435 1.4006 1.6895 1.3565 0.5237 0.4661 HO 1.6064 1.1450 1.2742 1.3006 0.5636 0.5199 HP 2.0733 1.0689 1.2453 1.3712 1.0826 1.0613 I 8.4690 5.8079 6.9587 6.4528 3.3693 3.2737 -337-[Equation (8-20)] give good performance, with the proposed BP algorithms as well as with the modified Newton-Raphson algorithms. (4) The SR algorithm of Section 8-5-3, implemented without temperature damping, performs quite well with wide-boiling systems. (5) For the t r a n s i t i o n region between narrow- and wide-boiling systems — a region i n which both types of s p e c i a l i z e d solution-methods might f a i l — the modified Newton-Raphson method proposed i n Section 8-3-3 i s the preferred choice. This could be implemented i n the form of Algorithm 2 where K values for composition updating are estimated from Equation (8-35) — this version i s the best for systems at the wide-boiling end of the t r a n s i t i o n zone — or i n the form of Algorithm 3 where i n addition to the estimation of K from Equation (8-35), the K-T derivatives are also estimated from Equation (8-20) — this form i s the most suitable for systems at the narrow-boiling end of the t r a n s i t i o n region. No attempt has been made here to empirically define the narrow-and wide-boiling regions; for such a study, the reader i s referred to the work of Friday and Smith (1964). CHAPTER NINE DISTILLATION-UNIT CALCULATION 9-1 Introduction I n t h i s c h a p t e r , the focus i s on the d i s t i l l a t i o n - u n i t o p e r a t i o n problem as i t a p p l i e s to a c o n v e n t i o n a l , as opposed to a complex, column. The problem s p e c i f i c a t i o n on which the d i f f e r e n t methods, as s t u d i e d i n t h i s c h a p t e r , are based, and the g e n e r a l working equat ions f o r d i s t i l l a t i o n - u n i t c a l c u l a t i o n s are presented i n S e c t i o n 9-1-2. P r e v i o u s i n v e s t i g a t i o n s have shown that the performance of most s o l u t i o n methods - e s p e c i a l l y those i n v o l v i n g p a r t i t i o n i n g - i s h i g h l y dependent on the b o i l i n g - r a n g e of the system under c o n s i d e r a t i o n (see, f o r example, K i n g , 1980; Henley and Seader, 1981; H o l l a n d , 1963, 1975, 1981). On t h i s s u b j e c t , the study of F r i d a y and Smith (1964) i s a c l a s s i c . I n l i g h t of the above f a c t s and guided by the r e s u l t s of the study of the a d i a b a t i c v a p o u r - l i q u i d f l a s h problem, t h i s i n v e s t i g a t i o n has been d i v i d e d i n t o three p a r t s . The f i r s t p a r t , covered i n S e c t i o n s 9-2 through 9 - 5 , deals w i t h the b u b b l e - p o i n t (BP) methods, which are s u i t a b l e f o r h a n d l i n g n a r r o w - b o i l i n g systems. The second p a r t , t r e a t e d i n S e c t i o n 9-6 , e n t a i l s an attempt to extend the SR type f o r m u l a t i o n , which was developed f o r a d i a b a t i c f l a s h , to the d i s t i l l a t i o n of w i d e - b o i l i n g systems. The t h i r d p a r t , which i s the subject matter of S e c t i o n 9-7 , i n v o l v e s methods that are a p p l i c a b l e to both narrow- and w i d e - b o i l i n g systems. - 3 3 8 --339-The d i f f e r e n t algorithms are compared i n Section 9-8, while the conclusions reached are to be found i n Section 9-9. Table 9-1 contains v i t a l information on the systems that were employed i n this study. For the noninclusion of wide-boiling systems, see Section 9-8-2. 9-1-1 Nomenclature Note: Any symbol not defined below and not c l e a r l y defined where i t occurs within this chapter retains the d e f i n i t i o n of Section 3-1-1. Symbol D e f i n i t i o n a,b Parameters i n equilibrium r a t i o model [Eq. (9-12)] a,b,c,d [ i n Eq. (9-45)]: Ideal gas heat capacity constants defined i n Eq. (2-31). A Absorption factor b Bottom-product component flow rate B Bottom-product t o t a l flow rate d Overhead-product component flow rate D Overhead-product t o t a l flow rate f Number of trays above and including the feed tray F Check function F Rate of t o t a l feed to column F Rate of t o t a l flow to stage j h Liquid-phase enthalpy h Enthalpy of bottom product B H Vapour-phase enthalpy Enthalpy of overhead product H w Enthalpy of feed stream -340-N Number of components N Number of trays, excluding condenser and r e b o i l e r Q Condenser heat duty c Q R Reboiler heat duty 5 Stripping factor X Independent-variable vector i n 2N Newton-Raphson method Z Rate of component feed to column Z_. T o t a l rate of component flow to stage j Greek Symbols a Relative v o l a t i l i t y 6 Convergence parameter Subscripts b Denotes base component for r e l a t i v e v o l a t i l i t i e s B Bottom product c Denotes calculated value D Overhead product f Feed tray number F Feed i Component j Tray N The tray immediately above the r e b o i l e r Vector (as i n V,T,L,x_.,y_,_v ,_1 ) or matrix (as i n _x»v_,v_,l) • Superscripts (In h, H): P a r t i a l value (In v ,T): Defined i n Equations (9-35) and (9-36) Table 9-1 V i t a l information on d i s t i l l a t i o n systems 4>; System code No of Com-ponents Components and % Composition Feed temperature (K) Feed pressure (Atm.) Operating pressure (Atm.) Boiling range (K) N t f D F L D° DA 4 Hexane (37.1); Ethanol (3.4); Methylcyclopentane (50.2); Benzene (9.4). 370.0 8.0 1.0 6.49 3 2 0.5 1.0 D6 4 Hexane (30.0); Ethanol (10.0); Methylcyclopentane (30.0); Benzene (30.0). 335.02 1.0 1.0 6.72 8 4 0.5 2.0 DC 5 Benzene (3.6); Chloroform (82.2); Methanol (6.3); Acetone (4.2); Methyl-acetate (3.7). 378.0 21.0 1.0 4.51 10 7 0.5 3.0 DD 4 Acetone (32.4); Chloroform (32.6); Dimethylbutane (22.2); Methanol (12.8). 350.0 10.0 1.0 5.61 8 4 0.6 1.333 DE 4 Ethanol (10.0); Chloroform (20.0); Acetone (50.0); Hexane (20.0). 340.0 10.0 1.0 3.11 4 2 0.4 1.5 DF 4 Benzene (45.6); Chloroform (5.3); Methanol (5.4); Methyl-acetate (43.7). 350.0 10.0 1.0 7.03 10 6 0.7 1.429 -342-9-1-2 Problem S p e c i f i c a t i o n and Working Equations As i s customary i n most d i s t i l l a t i o n operations, a l l but three of the degrees of freedom are u t i l i z e d by specifying the composition, t o t a l flow, temperature and pressure of the feed, and the column pressure. The three other s p e c i f i c a t i o n s made i n this work are: (1) Overhead product flow. (2) The r e f l u x rate. (3) The condition of p a r t i a l condensation. The column configuration i s represented diagrammatically i n Figure 9-1. The form of the material and energy balances depends on whether they are nested to enclose the ends — one end for both sections or separate ends for the two sections — of the column, or whether they enclose only the stage under consideration. Equations are presented below for both forms of 'system boundary'. The model assumed for feed-plate behaviour i s shown i n Figure 9-2. Nested Balances (taken about the top): (a) Component-mass Balances ( i = 1,2 ,N) V l.i - V - d i = 0 (J = O'1 V j + l , i + Z i " 1 j i " d i = ° (3=f,f+l,...,N t) (9-1) b + d - Z. = 0 i i i -344-Fig 9 — 2 : Model assumed for feed-plate behaviour -345-(b) Total-mass Balances V l " L j ~ ° = ° U = ° ' 1 f _ 1 ) + F - L j - D = 0 ( j - f . f + l ,Nfc) (9-2) B + D - F = 0 (c) Enthalpy Balances j } V i , i V i , i - VJI N J J V i . i V i . i - V V - d A i } + V ^ c = 0 (j=f,f+i,...,N t) - d ±H D.} - Q c = 0 ( j = 0 , l , . . . , f - l ) N QR + H F ' Q c V B I + b i V l = 0 (9-3) (d) Equilibrium Relations ( i = l , 2 , . •. ,N) y j i " K J i X J i = ° > N t + 1 ) (9-4) (e) Composition Balances N i = l J N i=l J L. = 0 J ( j - 0 , l Nt+1) (9-5) - 3 4 6 -Stagewise Balances (a) Component-mass Balances (1=1,2,...,N) v - 1 . - d. = 0 l i oi l V j + l , i , 1 " V i i V f + l , i + h-i »i + Z i V j + l , i + V i , 1 - v N+l , 1 - b. l ' f i - x f i • 0 ( 9 " 6 ) (b) Total-mass Balances V, - L - D = 0 1 o V + V l " Vj " L j = ° ( J = 1 . 2 , . . . , f - 1 ) V f + 1 + Vl + F " Vf " L f =° ( 9 - 7 ) V + V i " v j " L j = 0 a=f+i>f+2,...,Nt) LN t + VN t+l " B " 0 (c) Enthalpy Balances N I {v. . 5 . . - 1 ,h . - d.H_.} - Q = 0 . , 1 l i l i oi oi O r ^c i=l N J xtV i . i V i . i + ' j-i.iVi.r V i i " V i i } " 0 (j=1'2 f _ 1 ) .yvf+i,i5f+i,i+ v^iVi.i - vfi5fi - ^ A i } + ^ - ° (9-8) N I -5 .^ , . + 1 . . .h. . - V..H. - l..h..} = 0 (j=f+l ,N ) j+l,i j+l,i 3 - 1 , 1 j - 1 , 1 j i j i j i j i J V J t y N 7 {l„ h„ - v„ H ,, - b.,h„.} + Q = 0 L 1 N N N + 1 , 1 N + 1 , 1 i B i J XR 1=1 t , i t , i t t -347-(d) Equilibrium Relations: Same as Equations (9-4). (e) Composition Balances: Same as Equations (9-5). 9 - 2 BP S o l u t i o n Methods — A g e n e r a l A l g o r i t h m The term 'BP method' has been explained i n Section 8-6 and needs no further d e f i n i t i o n here. The method as i t currently applies to the d i s t i l l a t i o n problem i s the r e s u l t of a gradual development dating back some four decades to the work of Thiele and Geddes (1933). Prominent amongst the present-day a r c h i t e c t s who have contributed s i g n i f i c a n t l y towards giving It i t s current l u s t r e are Lyster and collaborators (1959a,b,c), Wang and Henke (1966) and Holland (1963, 1975). In the presentation that follows, some modifications aimed at improving the method have been introduced. The demarcation between the old and the new w i l l come to l i g h t as the treatment unfolds. The following c a l c u l a t i o n a l steps are common to a l l the BP methods that are discussed i n the subsequent sections. Throughout this chapter, x and y_ without any subscripts should be interpreted as (Nfc+2) x N matrices whose ' j i ' elements (j=0,1,...,N t+l; i=l,2,...,N) denote values for the i t h component on the j t h stage. The same i n t e r p r e t a t i o n applies to 1^ and \>. C a l c u l a t i o n a l Steps (1) I n i t i a l i z e T, V, L, x and y (2) Update _x and y_ (3) Update T (4) Update L and V (5) Compute and test for convergence. If the outcome i s p o s i t i v e - 3 4 8 -then compute 1 and terminate the i t e r a t i o n . Otherwise, go to Step 2. 9-3 BP Solution Methods — Updating the Total-flow Profiles The l i q u i d total-flow p r o f i l e i s determined from the nested form of the enthalpy balances using a top-down approach. To ensure s t a b i l i t y , the sp e c i a l arrangement of the enthalpy balances tagged 'the constant composition method', described by Holland (1963) i s employed. It involves s u b s t i t u t i n g the nested component-balance equations into the enthalpy-balance r e l a t i o n s to eliminate vapour component-flows, and solving the r e s u l t i n g equations for l i q u i d total-flows, the r e s u l t being N L . = J "J/DAI " Vl,i } + Q c N ( j = l , 2 , . . . , f - l ) L . = J ^ V ^ + B J , X B i V l , l + Q c - H F i= l i=l J ' N I - h.. } ( j - f Nfc) (9-9) where an enthalpy balance about the condenser y i e l d s % - L o X « 0 l t 5 u - \J + D j y D i ^ i i " *»J (9-10) 'i-1 1=1 With values of L^ . obtained from Equation (9-9), the vapour t o t a l - f l o w p r o f i l e i s updated from Equation (9-2). 9-4 BP Solution Methods — Updating the Temperature Profile Over the years, various e f f o r t s have been made to eliminate the time-consuming bubble-point c a l c u l a t i o n from the BP methods. The main -349-product of these e f f o r t s i s the method, which i s reported to amount to a su b s t a n t i a l Improvement. In this study both methods have been investigated — with a view to placing them i n proper perspective i n l i g h t of the saturation-point study reported i n Chapter 7. The method has been subjected to a c r i t i c a l analysis i n t h i s work. F i n a l l y , the one-step Newton i t e r a t i o n method of temperature updating, which was successfully applied to the adiabatic f l a s h problem, i s implemented i n various forms for the d i s t i l l a t i o n problem. 9-4-1 A Bubble-Point-Temperature Approach In applying the bubble-point-temperature approach, the temperature for stage j ( j - 0,1, N^ + 1) i s updated for the nth i t e r a t i o n by determining the bubble point, at column pressure, of the l i q u i d stream having the composition x*j (x.. having been updated for the nth i t e r a t i o n i n Step 2 of the algorithm presented i n Section 9-2). In doing t h i s , the temperature i s i n i t i a l i z e d to i t s current m t i - l value, T. . J 9-4-2 The K Method h The method i s based on the assumption that the r e l a t i v e v o l a t i l i t i e s are i n s e n s i t i v e to temperature changes. If we express the f i r s t of Equations (9-5) i n the alternate form N I y.. - i = o ( j = o , i , N + i ) i=i J and substitute Equation (9-4) into t h i s , then a simple manipulation y i e l d s -350-j b N V n 1-1 J i J i ( j = 0,1,..., N + 1) (9-11) where K J 1 ' J b and subscript 'b' denotes a base component. With K , thus j b determined from Equation (9-11), a new temperature i s calculated from a K-versus-T r e l a t i o n s h i p , for the base component, of the form Zn K .. = -2-jb T_ + b (9-12) To account for the composition-dependence of K, a and b w i l l need to be evaluated i n every i t e r a t i o n . I f we apply Equation (9-12) between T j and T^ , we would have n+l J b -n+l T n J 1 -T n J b | „ (9-13) To eliminate a d i r e c t evaluation of a, l e t us combine Equations (9-11) and (9-13). The r e s u l t i s Tn+1 T n N K n £n I x. J b ± ^ J i j i 1 + T n J b | „ TJ wrUi (9-14) There i s some a r b i t r a r i n e s s as to the choice of a base component, -351-Holland (1975, 1981) t i e s the evaluation of a and b i n Equation (9-12) to the component of intermediate v o l a t i l i t y i n the mixture. This w i l l be used as the base component i n the implementation of the K method b and for comparison against the a l t e r n a t i v e choice of base component proposed below. Let us, i n the a l t e r n a t i v e , refer the r e l a t i v e v o l a t i l i t i e s to a hypothetical base component with equilibrium r a t i o given by N Kn, = I x . l " (9-15) jb tiY j l J l If Equation (9-15) i s combined with Equation (9-14), the r e s u l t i s N N i i \> i J l J i J i J i J l J T j J ^ j i W - | T n A comparison of Equations (9-16) and (8-33) reveals that the two equations are i d e n t i c a l . Thus, the K, method, with the proposed b hypothetical base component, ac t u a l l y belongs to the class of temperature-update formulati ons studied i n Section 8—6—2 for adiabatic f l a s h and extended to d i s t i l l a t i o n - u n i t c a l c u l a t i o n as discussed i n the next section. To compare the temperature-sensitivity of r e l a t i v e v o l a t i l i t i e s r e s u l t i n g from the two forms of base components discussed above, the appropriate values were generated as functions of temperature for system DA. These values, normalized by d i v i s i o n such that each p r o f i l e has i t s lowest point at 1 on the a scale, are displayed graphically i n Figure 9-3. The p r o f i l e s do reveal that the proposed method y i e l d s r e l a t i v e v o l a t i l i t i e s that are far less temperature-sensitive, except for Ethanol Temperature (K ) Fig. 9-3 Normalized Relative Volatility versus temperature for system DA -353-(3.4%) which i s the base component for the 'conventional' method and therefore, by d e f i n i t i o n , has a constant r e l a t i v e v o l a t i l i t y of 1. While generalized conclusions cannot be reached from t h i s single test, the proposed method does have the following arguments i n i t s favour: (1) The 'conventional' approach i s b l i n d to the 'population d i s t r i b u t i o n ' i n the system. If the r e s u l t i n g base component has low concentration i n the mixture, while Its r e l a t i v e v o l a t i l i t y w i l l be constant on the temperature scale, those of the more prominent constituents could vary s i g n i f i c a n t l y with temperature. This could very well lead to i n s t a b i l i t y i n the convergence process. (2) With the proposed method, the components that are present i n the largest amounts would have near-constant a's (In the l i m i t , a component with x = 1 would have a constant a of 1.), and t h i s should constitute a s t a b i l i z i n g e f f e c t . (3) The proposed method i s i n fact divorced from the assumption of constant r e l a t i v e v o l a t i l i t i e s , as borne out by the fact of i t s being i d e n t i c a l to the one-step Newton-iteration method using the check function 1 N T j i = l J l j l The proposed r e l a t i o n s h i p [Equation (9-16)] has been duly c l a s s ! f i e d and compared with other one-step Newton-iteration formulations i n the next section. 9-4-3 The One-step Newton-iteration Approach This i s an extension of the bubble-point-eliminating methods applied to the adiabatic f l a s h problem (Section 8-6-2). Six d i f f e r e n t -354-formulations have been tested here. In the f i r s t f i v e , the mole fra c t i o n s are treated as constant (with respect to temperature) at t h e i r current values. Formulation 1 N F(T ) = I K x - 1 ( j = 0,1,...,N + 1) J i=l (9-17) and F'(T .) J N 3K.. i - l " 1 9 T J Formulation 2 F(T ) = j This r e s u l t s i n F'(T ) = j Formulation 3 . K j i X j i - 1 ( j = 0,1,...,f-1) (9-18) y i i / K i i " 1 (J " f, f+l,.--,N t + 1) same as Formulation 1 for j = 0,1,...,f-1 -I 2 3T 1=1 KZ., x j J i ( j - f,f+l,...,N t + 1) F ( _ f T ) N A n.£ K j i * j i ( j = 0,l,...,N t + 1) (9-19) and 2 N 3 K j i i " T J ^ i X J i ~9TT _ i = l J F'(-^-) = j N 1-1 J l J l -355-Formulation 4 F ( ^ ) = j same as Formulation 3 for j = 0,1,...,f-1 v" y i i k 1=1 K j i (9-20) ( j = f,f+l,...,N t + 1) The corresponding derivatives are F ' ( T L " ) = f— Same as Formulation 3 for j = 0,1 f - 1 TT N ys, 3K, N v L-l K j i y 1J1 L 2 3T j i J ( j = f,f+l,...,N t+l) Formulation 5 with N y. F(T ) - I (K x - - J i ) ( j = 0,1,...,N + 1) (9-21) 1=1 J 1 J 1 R j i C N y., 3K.. Jix J i F'(T.) = I (x + ^ i ) J 1 = 1 j i R 2 ^ 9T. Formulation 6 This formulation i s based on the preceding one and i t was introduced a f t e r comparing the performances of the f i v e formulations above. I t i s of the form N F ( T .) = I (K. - l ) x J ±" = 1 • J i J l ( j = 0,1,...Nt + 1) (9-22) where both K.. and x.. are treated as functions of T.. In J i J i J order to account for the dependence of x.. on T,, x.. i s J i J J i r e l a t e d to other stage parameters through a mass balance about the stage. The r e s u l t i s (9-23) -356-where and F . J v u for j = 0, 1 • i 4 + v * + Z, f or j = f j - l , i j+l,i i J 1. . . for j = N + 1 1. , • + v . . i j for a l l other j ' s j - l , i j + l , i J V- for j = 0 L . 1 + .V... + F for j = f j-1 3+1 J L. . for j = N + 1 j-1 J t L - i + V - _ L I f o r a l l other j's J-1 J+l J By combining Equations (9-22) and (9-23), d i f f e r e n t i a t i n g the r e s u l t and combining this with Equation (9-23), we have 9 K . N X j i 3 T . F'(T.) = I 1 J i=l j i 1 + <Kji - » r Thus, Z.. need not be computed. J i For Formulations 3 and 4, T i s updated from n T n T n j j Tn+1 T J J The other four formulations employ the r e l a t i o n s h i p (9-24) T ^ + 1 = T j - F(TJ)/F'(TJ) (9-25) -357-For the purpose of comparison, each of the s i x formulations was applied to systems DA, DC, DE and DF. The programs employed the compo-sition-updating method presented l a t e r i n Section 9-5-1 and an appropri-ate i n i t i a l i z a t i o n scheme. The re s u l t s ( i n form of i t e r a t i o n counts) are presented i n Table 9-2. One finds that except for Formulation 5 which requires one i t e r a t i o n less than the others for system DA, a l l the formulations give exactly the same performance. This p a r i t y i n performance i s not s u r p r i s i n g because a printout of intermediate r e s u l t s revealed that tem-perature convergence was generally attained before flow convergence. For i t s superior showing with system DA, and because i t i s also r e l a -t i v e l y l i g h t i n computation requirement, Formulation 5 was adopted. This point s i g n i f i e s the end of Stage 1 of the one-step Newton-i t e r a t i o n method of temperature update. Just as was done for adiabatic f l a s h , the development i s taken two stages further. For Stage 2, after the temperature update, the equilibrium r a t i o s are updated, i n l i k e manner to the a d i a b a t i c - f l a s h case [see Equation (8-35)], from the r e l a t i o n s h i p 9K K ^ 1 = K ^ - e x p f T ^ l - T ^ + 1 } g ^ / K ^ ] ( j = 0,1,...,^ + 1) (9 726) These updated K values are employed i n the next composition-profile update. Stage 3 e n t a i l s avoiding a d i r e c t computation of the K-J_ d e r i -vatives a f t e r the f i r s t I t e r a t i o n . Equation (8-20) i s applicable, i t now assuming the form Table 9-2 Iteration counts for one-step Newton-iteration temperature-updating schemes System Scheme Scheme Scheme Scheme Scheme Scheme 1 2 3 4 5 6 DA 7 7 7 7 6 7 DC 10 10 10 10 10 10 DE 26 26 26 26 26 26 DF 9 9 9 9 9 9 -359-9K. K. (H. - h ) ^ i = j i _ j i j i _ ( i = l,2,...,N; j = 0,1,...,N + 1) (9-27) 9 T j RT 2 * J 9-5 BP Solution Methods — Updating the Composition Profiles In t h i s section, a quick look i s taken at the best of the conventional methods for updating the composition p r o f i l e s i n the BP solution method, with appropriate references provided i n the i n t e r e s t of readers who might desire a more detai l e d treatment of the method. An a l t e r n a t i v e method — u t i l i z i n g the nested component-mass balances — has also been developed. 9-5-1 The Modified Thomas Algorithm with the 8 Method of Convergence The stagewise balances of Section 9-1-2 are employed. Substituting the equilibrium r e l a t i o n s h i p s into the component-mass balances, u t i l i z i n g the d e f i n i t i o n of mole fr a c t i o n s and introducing the s t r i p p i n g factor, S defined by V.K.. c _ J J i s a - v we have (for i = 1,2,...,N): " ( S o i + ^ o i + hihi " °» W - <SJI + + W W • 0 ( j = 1 . 2 . - « > W " ( s f i + m f ± + W W = _ z i ' ( 9 " 2 8 ) V I . I - ( 8 J I + 1 ) 1 J I + W V i . i - 0 < J - * " - - . V -360-The c o e f f i c i e n t s of 1 (j = 0,1,..., Nfc + 1) i n the above equations form a t r i d i a g o n a l matrix for each i , and the equations lend themselves to solution by the Thomas algorithm (Wang and Henke, 1966). Because of the s u s c e p t i b i l i t y of the Thomas recurrence formula to round-off errors — leading to i n s t a b i l i t y for some columns and systems — , the modification proposed by Boston and S u l l i v a n (1972) has been adopted i n this work. I t w i l l henceforth be referred to as the MTA (Modified Thomas Algorithm). Using 1 determined from Equation (9-28), corresponding vapour flows are computed from V j i = S j i 1 j i ( ± = 1> 2'-"> N ; J = l> 2>'~> N t + !) < 9 _ 2 9> where v = A o i i Before computing the mole-fraction p r o f i l e s , the component flow quantities obtained above are improved through the 6 method of convergence. Using the subscript 'c' to denote any of the component flows computed above, then the 6 method of Lyster and co-workers (1959a) requires that d = *=- (9-30) 1 b i 1 + 9 ^ > o d^ c where 6 s a t i s f i e s N g(9) = I d - D (9-31) i=l 1 Equation (9-31) i s solved for 9 using Newton's method. Lyster and co-workers employed an approach whereby, using the solutions of Equations (9-28) through (9-31), they updated the composition p r o f i l e s from - 3 6 1 -X j i N i c i=l i c ( j = 0,l,...,N t + 1) and y j i N 1 c ( j = 0,l,...,N t + 1) (9-32) Seppala and Luus (1972), taking advantage of the s t a b i l i z i n g e f f e c t which the feed stream supposedly has on the composition of the feed stage and adjacent stages, have proposed two methods of nonuniform 9-correction that reportedly show improvement over the above method. Adopting the simpler of the two methods (the other has nothing to o f f e r for i t s added complexity as i t i s , on the average, only as fast as the simpler one), we have and x <Ve'1 + W r - 1 ' 1 i c i c (9-33) -362-where =- (f - j ) / f ( j = 1,2,...,f - 1) _ ( j - f ) / ( N t + 1 - f ) ( j = f, f + 1,.., N t + 1) Y j " 9-5-2 A l t e r n a t i v e Composition-updating Schemes This method employs the nested component-mass balances presented i n Section 9-1-1, i n a manner s i m i l a r to those presented by Holland (1975). For the r e c t i f y i n g section, l e t us introduce the absorption factor L . A „ = j i V .K J J i Then, i f we eliminate the l i q u i d component flows from the component-mass balances and e f f e c t some rearrangement, we would have the recurrence formula V j i = V l . i V l , ! + 1 ( i - 1.2..-.N; j = l,2 , . . . f ) (9-34) where V j i " d f < 9" 3 5> In the above equations, v . = d. and v = 1 o i i o i For the s t r i p p i n g section, l e t us introduce the s t r i p p i n g factor as defined i n Equation (9-28). Eliminating v from the component-mass balances followed by rearrangement and the introduction of the term 1. " J i 1 - ^ t - 3 6 3 -leads to 13i = S j + l , i 1 j + l , i + 1 ( i = i.Z.-'-.N; j = N t,N t - l , . . . , f ) (9-36) with 1 = 1 N t + l , i or At the feed plate, we have the equilibrium r e l a t i o n X f i " A f i V f i 1 b = A v d f9-37') f i i f i f i i ^ J / ; From an o v e r a l l component-mass balance, b ± + d ± = Z ± (9-38) I f we eliminate b^ between Equations (9-37) and (9-38) and solve for d., we have l T z d ± — ( i = 1,2,...,N) (9-39) T f i + A f i V f i With d_ obtained from Equation (9-39) and normalized to y i e l d a sum equal to the s p e c i f i e d D, b^ can be computed from Equation (9-38). The question then arises as to the best scheme for updating the composition p r o f i l e s . Two schemes were investigated. Scheme 1 This scheme involves the following steps: (1) Compute y from d and x„ ,, from b — —N+l — t (2) For ( j = 1,2,...,f), compute v = v d j i j i i -364-1. , = v - d j i 1 N y = v / y v y j i J i ^ j i N and x j - i , i = 1j-i,±/ J L V i , i (3) For ( j = f,f+l,...,N ), compute 1.. = l . . b . J i J i i VM" V " b i N x-. = 1../ I 1... J 1 J i ±ti J i N and Scheme 2 The following steps are involved. (1) Compute y from d and x ,, from b —o — —N +1 — t (2) For ( j = 0,l,...,f ~ 1), compute x - V^Kit = 1.2,...,N) and normalize compute y = ( L . x ^ + d ±)/V j + 1 ( i = 1 , 2 , . . . ,N) and normalize ^ j + l ' (3) For ( j = Nfc + 1, Nt,...,f+1), compute y.. - K.. x., ( i = 1,2,.. . ,N) and normalize y ; J i J i J i J compute x ± = W .J .± + V / L j-1- <* = 1>2.-"N> and normalize x. . -J-1 -365-When the two schemes were applied to systems DB, DC and DH, scheme 1 gave very poor performance. Scheme 2 performed much better and was therefore chosen. Two convergence methods, for f o r c i n g the d_ obtained from Equation (9-39) to s a t i s f y were next considered. Convergence Scheme 1 The nonsatisfaction of the D s p e c i f i c a t i o n would be due to d i s p a r i t i e s between the current values of the L/V and T p r o f i l e s and t h e i r equilibrium values. These e f f e c t s would be embodied i n the terms 1^, for the s t r i p p i n g section, and A ^ v ^ , f ° r t n e r e c t i f y i n g section. Assume that the correct values of 1. and A„ v that would y i e l d f i f i f i 3 T and L/V p r o f i l e s s a t i s f y i n g the D constraint are a l ^ a n ^ ir-respectively, where a and 3 are p o s i t i v e correction f a c t o r s . Then N I d = D, i=l. d i a l f i or d (9-40) i where e = g/a -36,6-Thus we have, i n Equation (9-40), a r e l a t i o n s h i p which i s quite s i m i l a r to that of the 8 method of Lyster and co-workers. In this scheme, the value of 9 i s obtained by applying the Newton method i t e r a t i v e l y to the check function N T f i Z i 8(6) = I — D (9-41) 1 = 1 T f i + 6 A f i ^ f i Figure 9-4 shows some t y p i c a l p r o f i l e s of g ( 9 ) . Convergence Scheme 2 This scheme also employs Equation (9-41). However, instead of solving i t i t e r a t i v e l y for the exact value of 9, an approximate check value of 9 i s obtained through a two-term truncation of i t s Taylor expansion about the point 9 = 1 . The r e s u l t i s 9 = 1 + g(9 = l ) / g ' ( 9 = 1) (9-42) where g' = |f Since the d_ r e s u l t i n g from this scheme does not necessary sum up to D, i t has to be normalized before being employed i n composition-profiles updating. Figure 9-5 compares this scheme with the f i r s t one i n terms of the v a r i a t i o n of 9 with i t e r a t i o n . (The method employed i n i n i t i a l i z i n g the composition p r o f i l e s i s discussed l a t e r i n this section). Table 9-3 shows i t e r a t i o n counts obtained by applying the schemes to systems DB, DC and DF. To have a quantitative measure of the effectiveness of the convergence schemes, r e s u l t s have also been presented for the case where the d^ values obtained from Equation (9-39) were made to sum up to D through a simple weighting. The r e s u l t s show that Scheme 2, which i s -367-50.0 -30.0H -40.0-1 1 1 1 1 1 1 1 -i 1 1 1.0 2 0 3.0 4.0 5.0 6 0 7.0 8.0 9.0 10.0 ~6 Fig 9- 4i Profiles of check function represented by Eq. (9-41) of first iteration - 3 6 8 -5.0-4 . 0 H 3 .0 CD -DC Legend: Convergence Scheme 1 Convergence Scheme 2 DC 2.0-DB 1.0- DF DF" •DC . — i 1 i 1 — — i 1 ' ' 77~ 1 2 3 4 5 6 8 10 — i 1 1 — 12 14 •iteration count Fig 9-5: Variation of 6 with iteration for Convergence Schemes 1 and Table 9-3 Iteration counts for alternative-composition-updating convergence schemes System Scheme 1 Scheme 2 Simple Weighting DB 13 12 12 DC 10 10 15 DF 9 9 28 -370-noniterative, i s i n fact better than Scheme 1 i n terms of i t e r a t i o n requirements. One thing which the a l t e r n a t i v e composition-updating scheme, with the accompanying convergence method, has not done i s compare the r e l a t i v e e f f i c i e n c i e s of the nested-mass-balance formulation and the tridiagonal-matrix formulation. To do t h i s would require computing and d^ from the tridiagonal-matrix formulation, correcting them by means of the single-step 8 method proposed above, and updating the rest of the x_ and y_ p r o f i l e s from the scheme (Scheme 2) discussed i n t h i s section. The method i s outlined below. A l t e r n a t i v e Composition-profile updating, Based on the Tridiagonal-matrix Formulation In order to develop the method, l e t us take a quick look at the modified Thomas algorithm (MTA). For every component, i ( i = 1,2,...,N), l e t us define three vectors P_, 0^ and II with elements numbered from 0 to (N^ + 1) such that: ' P o = S o i ' p i = V J - I / ( 1 + VD <; = 1>2>--->NT + 1> Q j = V i , i / ( 1 + V ( J = °* 1"--' Nt ) 0 ( j = 0,1,..,,f - 1) Z ± / ( l + P,) ( j = f) R ^ / a + P..) ( j = f+l,f+2,...,N t + 1 ) . T H E N ' " V W J H . I ( j = V N t " 1 " - 0 ) ' and v., = S. 1 ( j = 0,1,....N + 1 ) j i j i j i t and R. = J - 3 7 1 -In Implementing the MTA presented above, a l l elements of vectors Q and R are stored for the purpose of the back-substitution to determine l . . ( j = N ....,0). R need not be stored as a vector, j i t — To employ the MTA i n the al t e r n a t i v e composition-profile updating, the following steps are required. (1) Generate P_ and R without storing the elements, so that at the end, only P^ + ^ R^ + ^ are i n storage. Q i s not computed at a l l (2) Set b i , c " *N +1 and d. = Z. - b. i , c i i , c (3) Compute N ( i = 1,2,...,N) 9 = 1 + I d i c " D i = l 1 , C N b. d, y i ^ c i , c 1-1 Z i and d i c Z i d i = d +~0b ( i = 1,2,...,N) i , c i , c Normalize d to sum up to D, and set b i = Z i * d i ( i = 1»2,...,N) (4) Update the composition p r o f i l e s according to the scheme proposed e a r l i e r i n this section. When the above method was compared to the o r i g i n a l a l t e r n a t i v e scheme based on nested-balances, the two were found to require exactly - 3 7 2 -the same number of i t e r a t i o n s i n a l l applications (Systems DA, DB, DC, DE and DF were used). Because the nested-balance form requires less computation, at least for conventional d i s t i l l a t i o n , i t has been chosen for the purpose of comparison against other methods. 9-6 SR-type Solution Methods The SR-type sol u t i o n methods treated i n th i s section have t h e i r foundation on the algorithm of the same name that was developed for adiabatic f l a s h c a l c u l a t i o n . The e f f o r t i s meant to y i e l d a s p e c i a l i z e d algorithm that could not only complement the BP-algorithm i n d i s t i l l a t i o n but also serve as a useful t o o l for handling absorption and st r i p p i n g — two separation techniques that involve wide-boiling systems. 9-6-1 A General Algorithm The following are the basic steps of the algorithm: ( 1 ) I n i t i a l i z e the temperature, total-flow and composition p r o f i l e s . (2) Compute the equilibrium-ratio p r o f i l e or the s t r i p p i n g - f a c t o r p r o f i l e , depending on which method i s employed for updating flow and composition p r o f i l e s (Section 9-6-3). (3) Update V, L, v_, _1, x and y_ p r o f i l e s . (4) Update the T p r o f i l e from enthalpy r e l a t i o n s h i p s (Section 9-6-2). (5) Test for convergence. I f the outcome i s po s i t i v e then terminate the i t e r a t i o n . Otherwise go to Step 2. 9-6-2 Updating the Temperature P r o f i l e In the updating of the temperature p r o f i l e from the enthalpy balances, the stagewise balances of Equation (9-8) are employed. -373-Following the problem s p e c i f i c a t i o n assumed i n this work, Q and c Q are unknown. The f i r s t and l a s t enthalpy balances are therefore u t i l i z e d for determining these two quantities (they need not be evaluated u n t i l a f t e r the f i n a l s o l u t i o n has been obtained), leaving us with N^ enthalpy balances. The approach adopted here was to update the temperatures for the condenser and the r e b o i l e r by the one-step Newton-iteration method of Section 9—4—3. The remaining N tem-perature terms are then updated from the a v a i l a b l e N enthalpy balances. The development that follows adopts the approach of embodying the temperature-dependence of the check functions In only the ideal-gas terms. This approach i s j u s t i f i e d by the r e s u l t s of the a d i a b a t i c - f l a s h study. Let us rearrange the enthalpy balances of Equation (9-8) and express them i n the general form - ! v i , i ( v i , i - h 3 « , I ' + + v H 3 i - i v , ! " ? - ! . ! where C . = J H F for j - f 0 for j * f -374-For convenience l e t us define N H . = I v..(H. - H° ), vj ^ J i v J i J i " N H ° . = I v H° vj ± ^ J i J i HT° . = I 1 ..H° , LJ J J i J i To „o . „o and B. = C. + rL + H — H - H -- L, v \i ~ H v j + V . + rL + H — H - 2 V i v J+I S -J Then Equation (9-43) y i e l d s the check functions In the above equations, H^.^. and H° are polynominal functions of T and T j + - ^ r e s p e c t i v e l y . For example, -375-The above equation i s based on a reference temperature of absolute zero. If for the (n+l)th i t e r a t i o n we apply a Taylor expansion to Equation (9-44) and ignore the terms greater than the f i r s t order i n T, we would have " °1,J-1 A TJ-1 + a2,iMj ~ a3,j+lAVl = D j ^ . V - V (9"46) where X j - l 3H" V l 8 T i - l Vl a 2 , j 3T, 9HC 3,j+l Vj+1 3T j+l 3+1 A m m n+l m 1 1 AT . = T . ~ T . , J 3 3 D . = B . + HJ (T n . ) - H° .(T n) + H° <T* ) J J j-1 2 2 2 Vj+1 J and AT = AT = 0 V l The derivative terms are evaluated a n a l y t i c a l l y from relationships of the type represented by Equation (9-45). -376-The c o e f f i c i e n t matrix of Equations (9-46) i s t r i d i a g o n a l . The equations are therefore solved for AT^ ( j = l,2,...,N f c) by the Thomas algorithm (for a general treatment of the Thomas algorithm, see Holland, 1975). 9-6-3 Updating the Flow and Composition P r o f i l e s Four d i f f e r e n t schemes for updating the flow and composition p r o f i l e s were studied. Scheme 1 This scheme i s based on the MTA, converged with the 6 method (see Section 9-5-1). I t involves the following steps: (a) Compute the 1^ p r o f i l e according to the MTA, applied to Equations (9-28). (b) Compute the v_ p r o f i l e from Equations (9-29). (c) Apply the 9 method of convergence to d^ a n d normalize the v_ p r o f i l e , using the m u l t i p l i c a t i v e weighting factor d^/d^ c . Compute y_ from the v_ p r o f i l e by summation and the y_ p r o f i l e by d i v i s i o n . Determine b^ from an o v e r a l l component-mass balance and compute B and + ^ (d) Compute the 1^ and L p r o f i l e s from (j = 0 , l , . . . , f - l ) 1 = v , - d~ j i j + l , i i L. = V... - D 3 J+l and V Vi.± +bi L j = V + B ( j = f , f + l Nfc) Determine the x p r o f i l e by d i v i s i o n . - 3 7 7 -Scheme 2 This scheme derives from the composition-updating method of Section 9-5-2. I t consists of the following steps: (a) Determine d_ according to the method proposed i n Section 9-5-2. Compute y^. Determine b_ from o v e r a l l component-mass balance and X , from the r e s u l t . -N+1 (b) S t a r t i n g with the condenser and working stage-by-stage to the r e b o i l e r , compute the flow and composition p r o f i l e s as follows (i=l,2,...,N): N L. = L. I x J 3 ± = l J i (j=l,2,...,N t) j+l L. - B J ( j = l , 2 , . . . , f - l ) (j=f,f+l,...,N t) Normalize x., - J 1. = L.x., J i J J i j + l , i 1 - 1 j l + d i (J=0,l,...,f-1) 1 i i " b i ( J = f > f + 1 . - - - > N t ) v = v /V y j + l , i j + l , i ' j+l Scheme 3. This scheme updates the p r o f i l e s according to the f i r s t of the composition-updating schemes presented i n Section 9-5-2. The equations presented i n that section apply without modification for the updating of the v^ , 1^, x and y_ p r o f i l e s . The L and V p r o f i l e s are simply computed from the 1 and p r o f i l e s by summation. -ays-Scheme^. This scheme attempts to obtain improved flow and composition p r o f i l e s by treating each tray as i f i t were an isothermal f l a s h drum and obtaining the vapour product from t h i s hypothetical unit through an absorption-factor formulation. The applicable r e l a t i o n s h i p , which r e s u l t s from performing a component-mass balance about the stage, i s V j i = Z j l L < 9" 4 7> J J i where Z i s the t o t a l flow of component i to stage j and i s as defined i n Equation (9-23). 1..^ i s then computed from 1 = Z - v j i j i j i The t o t a l flow and composition p r o f i l e s are i n turn determined from _v and 1^ by summation and by d i v i s i o n r e s p e c t i v e l y . The scheme i s implemented i n a top-down fashion so that the computation of Z_ for any tray except the zero tray (the condenser) u t i l i z e s the updated l i q u i d flow from the tray immediatley above i t . 9-7 Boiling—range—unlimited Methods The two classes of methods presented i n the preceding sections of t h i s chapter possess the unattractive property of being s p e c i a l i z e d , i n that t h e i r respective a p p l i c a b i l i t y i s li m i t e d to one of two approximately-complementary bands i n the boiling-range spectrum. Friday and Smith (1964), i n t h e i r exposition, have proposed guidelines for determining where the one's domain ends and the other's begin. However, as to be expected, there i s an intermediate region where both methods could encounter problems. This makes i t imperative to seek other solution methods to f i l l the void. -379-Over the years, a number of 'all-purpose' algorithms have been developed — ranging from the 2N Newton-Raphson method of Tomich (1970) to the simultaneous convergence (SC) methods of Goldstein and S t a n f i e l d (1970) and of Naphtali and Sandholm (1971). While the SC methods are the most stable, they involve a very high number of function evaluations per i t e r a t i o n . The 2N Newton-Raphson method i s generally more t i m e - e f f i c i e n t and, except for highly nonideal systems, has been known to be quite r e l i a b l e (King, 1980). The 2N Newton-Raphson method has been implemented here (Section 9-7-1). In addition a new method, which i s a multistage extension of the 'modified Newton-Raphson method' proposed for adiabatic f l a s h c a l c u l a t i o n , has been developed (Section 9-7-2). 9-7-1 Tomich's 2N Newton-Raphson Method This method treats V and T_ as the check va r i a b l e s , x and y_ are determined using the MTA as i n Section 9-5-1 but without 6 convergence. The check variables are updated by applying Broyden's method to solve the enthalpy-balance and composition-balance equations simultaneously. In Tomich's t r e a t i s e , the composition-balance r e l a t i o n s for stage j are combined to give the check function N N I y., - I x.. = o i-1 J i i-1 J 1 However, i n this work, th i s r e l a t i o n s h i p has been modified i n the manner suggested by King (1980) to give N I (K - 1)1 = 0 (j=0,l,...,N +1) (9-48) i= l 2 2 where 1 denotes the l i q u i d component-flow rates as obtained by the MTA. -380-Tomich, i n his work, modelled a column without either a r e b o i l e r or a condenser (Hence the appellation '2N Newton-Raphson' given to the method, N here denoting the number of t r a y s ) . A modification i s therefore necessary i n order to apply the method to the model being considered here. Since and D (or V Q ) are known here, there are Nfc flow variables and (N^+2) temperature v a r i a b l e s . Thus, the t o t a l number of check variables i s (2Nfc+2). A l l the (Nfc+2) check functions r e s u l t i n g from the composition-balance r e l a t i o n s [Equations (9-48)] are u t i l i z e d . The remaining Nfc check functions which are needed are obtained from stagewise enthalpy balances about stages 1 through N t« As i n the previous cases, the enthalpy balances about the condenser and the r e b o i l e r are reserved for the determination of Q £ and r e s p e c t i v e l y . I f we denote the check-variable vector by X and the check function vector by F_, then X. = and F . J "V j + 1 (j=l,2,...,N t) T . j-N f c-l (j=Nt+l,Nt+2,...,2Nt+2) N I (K 1=1 H j - l . i ~ i n j - l , i (J=l»2,...,N t +2) v„ + H L 0 _ ^ " \ ' *-J - V 2 (*-1.2,...,f-l) H V£+l L l - l * v l USL H + H - H VA+1 T-JUi v i (9-49) (9-50) H , £=j- N -2 (*=f+l,f+2,...,N ) - 3 8 1 -where N H . = y v H v j ^ J i J i N and LJ ^ J i j i To ensure a well-conditioned Jacobian matrix, the check functions are not employed i n the above form but are normalized by dividing that deriving from the composition balance about stage j by and that res u l t i n g from an enthalpy balance about any stage j by N F y y H N + l , i N t+l,i. This normalization factor for the enthalpy func-tions was found to perform better than the factor (H . , + H . „ ) used v,j+l L,j-1 by Holland (1981). The Broyden method involves searching for a value of t i n X n + 1 = X n + t W 1 (9-51) such that ( F n + 1 ) T ( F n + 1 ) < ( F n ) T ( F n ) (9-52) where H° i s the negative of the inverse of the Jacobian of I? with respect to X_ at X°, and H i s updated after every i t e r a t i o n by n + 1 n [ S N ( F N + I - F N ) + t N H N F N ] ( H r V n ) V (H'VVHV 1 1 * 1 - F N ) H u , i = H" -= (9-53) — — " ,n. T„n,„n+1 „nx v ' In this work, a value of t sat i s f y i n g Equation (9-52) i s obtained through a unidimensional search that updates t by means of a quadratic f i t applied to three known values of t and 4> where <t> = F T * F (9-54) -382-<Kt=0) corresponds to the value from the previous i t e r a t i o n . <|>(t=l) i s evaluated. I f i t i s less than <|>(t=0), the search i s terminated; otherwise <J>(t=-l) Is evaluated to give a t h i r d value of <|>. I f at any stage during the search, the current value of <|> does not y i e l d an improvement, the worst of the three known points i s replaced by the current point and a new t computed from «t> 1(t 2-t 3)(t 2 +t 3) + ,|, 2(t3-t 1)(t3 +t 1) + ^ 3 ( t f t 2 ) ( t 1 + t 2 ) FC 2 L * 1 < t 2 - t 3 ) + + * 3 ( t r t 2 ) j ( 9 " 5 5 ) H° i s evaluated using a f i n i t e - d i f f e r e n c e technique. For example, , o F.(X°+6X.) - F,(X°) h ' i j 6X. where 6X^ i s a small change i n X^. Since a l l elements of column j of the Jacobian matrix are derivatives with respect to X^, the whole column i s fixed by determining the change i n the vector _F that r e s u l t s from a single perturbation of X^. This of course requires updating a l l mole fr a c t i o n s and using the updated values to compute a new set of equilibrium r a t i o s and enthalpy terms for use i n the check functions. The main steps of the algorithm are: ( 1 ) I n i t i a l i z e T_, V, L, x and y. (2) Determine 1^, x and y_ by solving the t r i d i a g o n a l component-mass balance matrix using the MTA. Compute F_. (3) Determine the Jacobian matrix of F_ with respect to X by means of the f i n i t e - d i f f e r e n c e scheme. This involves (2N^ +2) perturbations, each of which requires the execution of Step 2. -383-(4) Invert the Jacobian matrix and set the negative of the inverse equal to H°. (5) Solve Equation (9-51) for an improved value of X by searching for a value of t between -1 and 1 that s a t i s f i e s Equation (9-52). (6) Perform a convergence t e s t . Terminate the i t e r a t i o n i f the outcome i s p o s i t i v e ; otherwise go to Step 7. (7) Update H according to Equation (9-53) and go to Step 5. 9-7-2 A Stagewise Two-dimensional Newton-Raphson Approach This i s an attempt to develop a method that reduces computation time by eliminating any matrix inversion. I t involves only a 2x2 matrix. For stage (j+l) {j=l,2 N }, l e t us define, from component-mass balance about stage j , a check function N Z F (V T = y — *M, j + l ^ 3+1, j+l) ;L F, + ( K ^ - l ) V . - 1 (9-56) 1=1 jwhere Z and F are as defined i n Equation (9-23). From an enthalpy balance about a control surface enclosing the condenser and stage j , l e t us define another check function F (V T ) = H, j+l j + l , j+l N N J + l ^ i 3 » 1 J+ 1' 1 J+ 1. 1 J 1 ± t i J - DlLj - Q c ( j = l , 2 , . . . , f - l ) J i (9-57) N V-LJ_I I K-_i.i 4Xij.i -.(H-J-I . ~ h..) - B I x^.h.., 3 + 1 i = 1 J+ 1. 1 J + 1»i J 1 i=l * i J l ' + ^ - DrLj - Q c (j=f,f+l,...,N t) V j + ^ and are updated by applying a two-dimensional Newton-Raphson i t e r a t i o n step to Equations (9-56) and (9-57). This i s -384-done i n a s u c c e s s i v e manner from stage 2 to the r e b o i l e r . The a p p r o p r i a t e d e r i v a t i v e s are 9 F M , j + l = y K j + l , i X j + l ' , i " X j i r 9 _ 5 8 x 9 v - x i / . . F . + (K - 1 ) V . ' ^ D ° } j+1 i = l j j j i j 9 F » N j + l , i 3 T . . . M » J + 1 = V J — — (9-59) V j + l / . F . + (K - 1 ) V . ' ^ i = l j j i j 3 V i 3F N -*vf= iLv -i( V i .i - v (9-60) 9F N 9K , 9H , The above f o r m u l a t i o n , whereby the updat ing of V and T f o r any stage i s based on balances f o r the stage immediately above i t , has a number of advantages: (1) Most of the parameters f e a t u r i n g i n the check f u n c t i o n s and the d e r i v a t i v e terms f o r any stage w i l l bave been updated i n the p r e c e d i n g step of the s u c c e s s i v e u p d a t i n g scheme. (2) The F^ d e r i v a t i v e s are h i g h l y s i m p l i f i e d s i n c e the denominator i n E q u a t i o n (9-56) c o n t a i n s no f u n c t i o n of the check temperature and only an a d d i t i v e term i n the check V w i t h a s imple c o e f f i c i e n t of 1. (3) The d e r i v a t i v e of F R w i t h respect to T i n v o l v e s l e s s computat ion s i n c e no d e r i v a t i v e of l i q u i d enthalpy w i t h respect to T i s i n v o l v e d . -385-So far we have discussed the updating of V and T for stages 2 through N^+l (the r e b o i l e r ) . In view of the s p e c i f i c a t i o n adopted here, a n d V Q (that i s , D) are f i x e d . However, there are three check variables that are not yet accounted for : Q , T and T, . c o 1 The approach adopted for the determination of T q i s to apply a single-step Newton-iteration method to the check function N F(T ) = I K x - 1 (9-62) o o i o i with x treated as constant at i t s current value. —o As for the updating of and T^, two schemes were tested. In each of the two schemes, presented below, i t was considered neater to replace Q c with a new variable, q, defined by q = T>% + Q c This saves on computation by eliminating the independent evaluation of V Scheme 1: This scheme involves the following steps : (a) Using the newly-computed T update K^. (b) Update T t^ through a single-step Newton-iteration method from the function N K x F(T ) = v y 1 1 1 1 - 1 K lJ 1 / , V, + (K - 1)D i = l 1 o i (c) Update K and compute q from the r e l a t i o n q = V x K l i x u ( H l i - h Q i ) + D x ^ -386-Scheme 2 This scheme involves using the check functions represented by Equations (9-56) and (9-57) with j = 0 and with q replacing V^ ^ as the check v a r i a b l e . Since Equation (9-56) does not contain q, i t i s simply solved for T^ as done i n Scheme 1. In implementing the scheme, q i s — for convenience — always assigned the value of zero before updating. The steps involved are: (a) Setting q = 0 and employing the current values of T^ and 9F 3F M 1 H 1 the updated value of T , evaluate F , F_ , , and — o M,l H,l 1 1 3F H I ( — — i s a constant equal to -1). (b) Compute 3F A T 1 " and set T = T + A ^ (c) Compute 3F * " FH,1 + 3 T 7 1 A T 1 The two schemes were compared by applying them to systems DB and DE and they were found to y i e l d the same i t e r a t i o n requirements. The f i r s t scheme, which i s the simpler of the two, was therefore chosen. (Note: The r e l a t i v e performance could d i f f e r for wide-boiling systems). To summarize, the main steps of the V- and T-updating algorithm are as follows: (1) Update T q from Equation (9-62). Compute a new K^. (2) Update T and q. -387-(3) For every j from 1 through N^, s t a r t i n g with j = 1 and using an increment of 1, perform the following: 3K _ 8H (a) Compute h J ± , K . ^ , WT^' V l,i' S T T ^ ' (b) Compute the check functions and the derivatives from Equations (9-56) through (9-61). (c) Update V and T^ + 1 through the Newton-Raphson technique. In the implementation of the method, two schemes for updating the composition p r o f i l e were subjected to empirical consideration: Scheme 1 This scheme simply employs the method developed i n Section 9-5-2. Scheme 2 This scheme was aimed at updating the composition p r o f i l e s simultaneously with the V and T p r o f i l e s . For the f i r s t i t e r a t i o n , Scheme 1 i s employed. For a l l subsequent i t e r a t i o n s , the following steps are involved: (1) Update T , T, and q and compute K and K, from o 1 —o —1 Equation (9-26). (2) Update and as outlined i n Steps 3(a) through 3(d) below. (3) For ( j = 1,2 N f c), update V ^ + 1 and T j + 1 - Compute L. from a total-mass balance [Equation (9-2)] and Kj+i from Equation (9-26). Then update jc. a n d y. thus: 3 J (a) v = Z /(1+ L /V K N with Z based on updated K' , V» J i j i j J J i ) j i - s s and L* . s -388-(b) 1 = Z - v W j i j i j i N <« *» • V I, V (4) Af t e r VXT ,, , T and K ,, have been updated, compute y„ and N^+l N^+l —N^+l +1 x^ + ^ according to Steps 3(a) through 3(d) above. When the two schemes were compared, the second one was found to require far more i t e r a t i o n s than the f i r s t . Scheme 1 was therefore chosen. The stagewise two-dimensional Newton-Raphson method can be summarized i n the following steps: (1) I n i t i a l i z e the T, V, L, x, y and K p r o f i l e s . (2) Update the composition p r o f i l e s through the method proposed i n Section 9-5-2. (3) Update the T and V p r o f i l e s as discussed i n this section, and compute the L p r o f i l e from Equation (9-2). (4) Compute the p r o f i l e from V j i = V / j i ( 1 = 1 > 2 ' " - » N ; J = 0,1,...,Nt + 1) and test for convergence. If the outcome i s p o s i t i v e , then terminate the i t e r a t i o n ; otherwise go to Step 2. Versions of the above algorithm that employ Equation (9-26) for estimating K required for composition-profile update, and Equation (9-27) for estimating K-T de r i v a t i v e s , have also been implemented. In the case of the derivatives, the estimate i s for stages 2 through -389-(N f c+l) and i t necessitates an extra liquid-enthalpy computation, so that i t i s a question of a trade-off between t h i s extra c a l c u l a t i o n and the gain r e s u l t i n g from the elimination of one K computation. 9-8 Applications The materials presented i n the preceding sections of t h i s chapter have been synthesized into 17 algorithms. A b r i e f d e s c r i p t i o n of the methods and the name by which each method w i l l be addressed i n the comparison are contained i n Table 9-4. The methods with s e r i a l numbers 12 and 17 deserve s p e c i a l comment. In a preliminary test, a printout of intermediate r e s u l t s revealed that the temperature p r o f i l e often converged long before the flow p r o f i l e s did. These two programs were therefore developed to take advantage of t h i s . In the BP version (Algorithm number 12), the temperature-updating block i s simply skipped a f t e r the temperature constraint has been s a t i s f i e d . For the stagewise two-dimensional Newton-Raphson method, af t e r the temperature constraint has been s a t i s f i e d , only the enthalpy check function and i t s derivative with respect to V are computed. The V p r o f i l e i s then simply updated from 3F v n + 1 = v n - F H 3 3 H,j 3Vj 9-8-1 I n i t i a l i z a t i o n Schemes and Convergence C r i t e r i a For a l l the algorithms presented i n t h i s chapter, i t i s necessary that a l l the p r o f i l e s — T, V, L, x and y_ — be assigned i n i t i a l values i n order for the c a l c u l a t i o n to take o f f . The methods used are discussed below. Table 9-4 Code names and descriptions of the distillation-unit computational algorithms BP — Lyster BP — Holland BP — Seppala-Luus Description Based on the algorithm of Section 9-2, with temperature-profile update by bubble-point calculation and composition update by the MTA, using the 9 method according to Lyster et a l . Same as 5 but with T profile update by the K b me thod. Same as 6 except that the 9 method as proposed by Seppala and Luus is employed. BP — Proposed 1 Same as 5 but with T profile update by the one-step Newton-iteration approach. BP — Proposed 2 Same as 8 but with estimation of K profile (for composition update) from Equation (9-26). 10 11 BP — Proposed 3 Same as 9 but with^f values estimated from Equation (9-27). BP — Proposed 4 Same as 10 except that the proposed composition-updating method of Section 9-5-2 is employed. 12 BP — Proposed 5 Same as 11 except that the temperature-updating block is skipped after the T constraint has been satisfied. 13 2N Newton-Raphson Employs Tomich's 2N Newton-Raphson method presented in Section 9-7-1. 14 Stagewise N-R 1 Employs the stagewise two-dimensional Newton-Raphson method proposed in Section 9-7-2; Equations (9-26) and (9-27) are not used. 15 Stagewise N-R 3 Same as 14 but with application of Equation (9-26). 16 Stagewise N-R 3 Same as 15 but with application of Equation (9-27). 17 Stagewise N-R 4 Same as 16 except that T updating is eliminated as soon as T constraint is satisfied. -391-Composition P r o f i l e s The composition p r o f i l e s are simply i n i t i a l i z e d according to the r e l a t i o n s h i p . x = y = z± ( i = 1,2,...,N; J = 0,1,..., N t+1) Total-flow P r o f i l e s The total-flow p r o f i l e s are i n i t i a l i z e d based on the assumption of constant molal overflow. With respect to the s p l i t of the feed at the feed plate, two schemes were tested. Scheme 1 This i s based on' the assumption that the feed flashes with a vapour f r a c t i o n of 0.5. The following flow p r o f i l e s r e s u l t : and V . = 3 L = i L q + D ( j - 1,2,...,f) L q + D - 0.5F (j = f+1, f+2,...,N +1) (j = 0 , l , . . . , f - l ) L + 0.5F (j = f,f+l,...N ) o t Scheme 2 This scheme assumes that the feed flashes at the feed plate to y i e l d a vapour mass equal to D. With this assumption, we have the p r o f i l e s : and V . = L j = L q + D (j = 1,2,...f) L q (j = f+l,f+2,...,N t+l) L q (j = 0 , l , . . . , f - l ) L q + F - D (j = f,f+l,...,N t) For both schemes we, of course, have V = D and L„ , = B = F - D o Nfc+1 When the two schemes were applied to some of the systems, they -392-were found to show no difference i n terms of i t e r a t i o n requirement. A l l the algorithms have been based on Scheme 1. Temperature P r o f i l e The method conventionally used for temperature i n i t i a l i z a t i o n e n t a i l s assuming a l i n e a r p r o f i l e with the condenser and r e b o i l e r temperatures set respectively equal to the bubble and dew points of the feed mixture at the column operating pressure. In addition to t h i s method, four other schemes have been studied i n t h i s work. With the conventional scheme designated as 'Scheme 1', Schemes 2 through 5 are as follows. Scheme 2 (a) Determine T as for T° i n saturation-point c a l c u l a t i o n (Scheme 3 of Section 7-9). (b) Set x^ = y^ = z^ ( i = 1,2,...,N) and compute K ( i = 1,2,...,N). Perturb T and compute 3K ( i = 1,2,...,N), 8T (c) Determine T from o N y K z - 1 i=l 1 1 T = T -o N 9K. i=l 1 3T (d) Determine T ,, from N^+l N 1 - I z /K -393-(e) Determine other stage temperatures by l i n e a r i n t e r p o l a t i o n between T and T„ ,, o N +1. t Scheme 3 (a) Determine T, and T, . as for Scheme 1 of Section 7-9. bmax bmin (b) Set T = 0.75T, . + 0.25T\ o bmin bmax (c) Set T = 0.25T, , + 0.75T, N^+l bmin bmax (d) Determine other stage temperatures by l i n e a r i n t e r p o l a t i o n . Scheme 4 This scheme i s s i m i l a r to Scheme 3 except that T i s set o equal to T, ^ while T , , i s equated to T, bmin Nfc + 1 bmax Scheme 5 This scheme assumes a constant temperature p r o f i l e based on the T obtained i n Step a of Scheme 2. In comparing the f i v e schemes, a parameter x m was defined according to N +1 t XT " (N + 2) E |T° - T j | t j=0 X m i s a measure of the proximity of the i n i t i a l p r o f i l e to the so l u t i o n p r o f i l e . The values of r e s u l t i n g from applying the schemes to systems DA through DF are presented i n Table 9-5. From the r e s u l t s , i t is not possible to choose a 'best method', since the r e l a t i v e q u a l i t y of the r e s u l t s depends on the system under consideration. However, there i s enough information i n favour of r e j e c t i n g the conventional approach (Scheme 1), for while i t yi e l d s i n i t i a l p r o f i l e s that are s i m i l a r to those r e s u l t i n g from Scheme 2, i t not only gives a s l i g h t l y worse Table 9-5 X™ values for the different temperature i n i t i a l i z a t i o n schemes System Scheme 1 Scheme 2 Scheme 3 Scheme 4 Scheme 5 DA 3.352 3.089 4.852 4.852 2.103 DB 4.373 4.388 4.850 4.850 4.460 DC 1.877 1.853 6.389 7.032 1.308 DD 5.280 5.355 3.676 2.647 4.606 DE 1.433 1.653 12.143 12.143 6.783 DF 6.536 6.498 2.464 2.652 4.476 -395-average x^, value than the l a t t e r but also requires far more computational e f f o r t than Scheme 2 and any of the other schemes. In order to see how much e f f e c t the differences i n the x^, values for any system have on i t s i t e r a t i o n requirement, systems DC through DE were chosen for a f i n a l comparison of Schemes 2 through 5. These systems include the 'worst case' as well as the 'best case' for each of the i n i t i a l i z a t i o n schemes. The r e s u l t s are presented i n Table 9-6. In l i g h t of these r e s u l t s , and considering the r e l a t i v e amount of c a l c u l a t i o n involved i n each of the i n i t i a l i z a t i o n schemes, Scheme 5 was f i n a l l y chosen. (Note: This may not be the preferred scheme for d i s t i l l a t i o n involving wide-boiling mixtures). Convergence C r i t e r i a The convergence c r i t e r i a used here are s i m i l a r to those employed for a d i a b a t i c - f l a s h c a l c u l a t i o n , and t h e i r choice was based on a s i m i l a r reasoning. Thus, l e t us define a temperature tolerance, T by Nfc+1 T t o l = (N + 2) E |Tj - T j | v t j=0 Let us s i m i l a r l y define a vapour component-flow tolerance, v by t o l N +1 . t N . n _ 1 r Y I n n-1 t o l N(N + 2) / r t ^ V j i " V j i t j=0 i=l J Then, convergence i s said to have been attained and the i t e r a t i o n terminated a f t e r the nth i t e r a t i o n i f n . , . -4 \ o l < 1 0 subject to T n , < 0.001 t o l — Table 9-6 Iteration counts for different temperature In i t i a l i z a t i o n schemes System Scheme Scheme Scheme Scheme 2 3 4 5 DC 10 10 11 10 DD 20 20 20 20 DE 25 25 26 25 - 3 9 7 -9-8-2 Results The applications were designed to consist of two parts. The f i r s t part was meant to deal with narrow-boiling systems while the second part was supposed to involve wide-boiling systems. Narrow-Boiling Systems Systems DA through DF were used and the comparison involved the algorithms with s e r i a l numbers 5 through 17 i n Table 9-4. The r e s u l t s are i n Table 9-7. Both computation times and i t e r a t i o n counts are presented, for reasons — having to do with a computer bug — discussed i n Section 1-1-2 and supported by the starred r e s u l t s i n Table 9-7. The following are the main observations: (1) The BP method based on bubble-point c a l c u l a t i o n (Lyster) and that u t i l i z i n g the method (Holland) require exactly the same number of i t e r a t i o n s . (2) The Seppala-Luus modification of the 9 method i s , on the average, les s e f f i c i e n t than the o r i g i n a l form by Lyster et a l . (3) The proposed one-step Newton-iteration method of temperature update i s s l i g h t l y more e f f i c i e n t , iterationwise, than the K, method. b (4) For both the BP method (proposed versions) and the stagewise Newton-Raphson method, while updating K values from Equation (9-26) has no e f f e c t on i t e r a t i o n requirements and thus leads to a s i g n i f i c a n t time-gain, the introduction of Equation (9-27) for the update of K-T derivatives r e s u l t s i n s l i g h t l y more i t e r a t i o n s but s u f f i c i e n t time-saving per i t e r a t i o n to more than o f f s e t the extra time due to i t e r a t i o n increase. (5) The a l t e r n a t i v e composition-profile-updating scheme implemented i n 'BP-Proposed 4' i s more e f f i c i e n t than the conventional form. Table 9-7 Computation times (CPU seconds) and iteration count (ln parenthesis) for narrow-boiling systems Bl 3 2N Stagew Ise N-R System Lyster Holland Seppala-Luus Proposed 1 Proposed 2 Proposed 3 Proposed 4 Proposed 5 Newton-Raphson 1 2 3 4 DA 1.4376 (7) 0.8561 (7) 0.8625 (7) 0.7579 (6) 0.6159 (6) 0.5575 (7) 0.4907 (6) 0.5118* (6) 1.4519 (6) 0.7888 (6) 0.6887 (6) 0.8364* (7) 0.9854* (7) DB 5.8205 (14) 4.5985 (14) 4.6564 (14) 4.6727* (13) 3.3514 (13) 2.3342 (13) 2.1314 (12) 1.9144 (U) 9.5598 (17) 3.1096 (12) 2.6545 (12) 2.5832 (12) 2.4201 (12) DC 5.5439 (9) 4.0394 (9) 5.3019 (10) 4.1546 (9) 3.4383 (9) 2.1905 (10) 2.6193* (10) 2.3169 (9) 8.6690 (9) 5.5483 (10) 4.6535 (10) 4.0429 (10) 3.6966 (10) DD 9.3859 (20) 7.0975 (20) 6.7960 (19) 7.7183* (20) 5.4175 (20) 3.5066 (19) 3.5002 (20) 3.4483 (21) 9.6001 (13) 5.4549 (20) 4.5613 (20) 4.2630 (20) 3.5362 (20) DE 7.2649 (26) 4.0678 (26) 5.7497* (26) 4.2634* (26) 3.6845 (26) 2.1873 (25) 2.0516 (24) 2.0721 (25) 5.5271 (16) 3.8700 (25) 3.2781 (25) 3.0820 (24) 2.7964 (25) DF 5.0229 (9) 3.7360 (9) 3.9256* (13) 3.7637 (9) 2.0744 (9) 2.3784 (11) 2.1254 (10) 2.0623 (10) 6.3707 (12) 3.4484 (9) 2.9329 (9) 3.1663 (11) 2.5863 (11) I 34.4757 (85) 24.3953 (85) 27.2921* (89) 25.3306* (83) 18.5820 (83) 13.1545 (85) 12.9186* (82) 12.3258 (82) 41.1786 (73) 22.2200 (82) 18.7690 (82) 17.9738 (84) 16.0210* (85) * Definitely bugged. -399-(6) Eliminating T updating after the s a t i s f a c t i o n of the T constraint reduces computation times while producing l i t t l e or no change i n i t e r a t i o n counts. (7) The Stagewise Newton-Raphson algorithms require approximately the same number of iterations as the corresponding BP algorithms (which thus require less computation times) and are, on the average, some 2.5 times faster than the 2N Newton-Raphson method. Wide-boiling Systems Algorithms with s e r i a l numbers 1 through 4 and 13 through 17 were designed with wide-boiling systems i n mind. Unfortunately, a l l e f forts to find wide-boiling d i s t i l l a t i o n systems to which the algorithms could be applied were unsuccessful. The f i r s t of these efforts involved determining by t r i a l and error, guided by the results for adiabatic flash calculation, the combination of T , P , P, N , f, D and L that has a physically meaning-F F t o f u l solution for any of the wide-boiling mixtures code-named VL through VP i n Table 3-1. While this approach was easily used to f i x problems for the narrow-boiling systems, i t was always unsuccessful for the wide-boiling systems, no matter which one of the relevant algorithms was used. This negative outcome could be due to one of two causes: (a) I t may be that none of the many spec i f i c a t i o n combinations tested i s a feasible combination. (b) I t i s possible that the algorithms do i n fact encounter problems of convergence with the wide-boiling systems at the l e v e l of nonideality involved here. The next effort made at obtaining feasible problems entailed -400-implementing a 2N Newton-Raphson algorithm which i s based on the s p e c i f i c a t i o n of T q and T. N+1 instead of D and L o This program was used to generate the T and V p r o f i l e s i t e r a t i o n by i t e r a t i o n . New p r o f i l e s . Various combinations of these s p e c i f i c a t i o n s were t r i e d — without luck. F i n a l l y , a thorough search of the l i t e r a t u r e was undertaken i n the hope that this would reveal some wide-boiling d i s t i l l a t i o n problems which have been studied by previous workers. The outcome was quite disappointing. In most cases, i n s u f f i c i e n t information i s supplied by the authors as to the i d e n t i t y of the systems investigated. Where s u f f i c i e n t information do e x i s t , the studies turn out to have been founded on si m p l i f y i n g assumptions regarding the degree of i d e a l i t y of the systems. Such assumptions have the e f f e c t of expanding the range of a p p l i c a b i l i t y of the algorithms and thus i n v a l i d a t e any comparisons based on them. 9-9 Conclusions (1) The proposed BP algorithm s e r i a l l y numbered 12 i n Table 9-4 gives the o v e r a l l best performance with narrow-boiling systems, i t being about twice as good as the currently-employed form of the BP method (algorithm with s e r i a l number 6 i n Table 9-4). (2) The stagewise Newton-Raphson method performs quite well with narrow-boiling systems. (On the average, about 2.5 times as fast as the 2N Newton-Raphson method.) Because i t has not been possible here to carry out a comparison involving wide-boiling systems, i t i s not known just how well i t w i l l fare with such systems. choices of N , f, T and T. N+1 were guided by the form of these CHAPTER TEN GENERAL CONCLUSIONS AND RECOMMENDATIONS In formulating computational algorithms based on methods which involve an inner-level dependence between some of the variables in a given problem, i t is common practice to introduce inner iterations which supposedly improve the stability of such algorithms and, by so doing, make for better convergence behaviour. In this work, such dependencies are typified by the following: (1) The dependence of K values on phase compositions — in flash calculations. (2) The relationship between the bubble- or dew-point function and temperature — in the BP methods for handling adiabatic-flash and distillation-unit calculations. (3) The dependence of the overhead composition on 6 — in the 6 method of converging the d i s t i l l a t i o n unit composition profiles. The results obtained in this study are generally in favour of substituting single-step updating schemes for such inner iterations. (A notable exception is in saturation-point calculations, where up to four inner iterations are required.) Such a substitution might c a l l for a more elegant i n i t i a l i z a t i o n scheme, as is the case with the univariate vapour-liquid flash algorithms. Or i t might necessitate a reformulation of the problem (compare the 'Modified Newton-Raphson method' for adiabatic-flash calculations with the other two versions of the Newton-Raphson method). Experience gained from this study supports the conclusion that the elimination of the inner loops, with suitable -401--402-i n i t i a l i z a t i o n or problem reformulation where necessary, not only saves on computation time but could i n fact lead to a reduction i n i t e r a t i o n requirement — as exemplified by the single-step 6 method of convergence (Section 9-5-2) and the one-step Newton-iteration methods of temperature update as applied to adiabatic-flash and d i s t i l l a t i o n - u n i t BP algorithms. This study has revealed that the free-energy minimization methods for phase e q u i l i b r i a , i n the form i n which they are conventionally applied, generally perform much less e f f i c i e n t l y than the mass-balance methods — given a good i n i t i a l i z a t i o n scheme. However, the geometric-programming formulation proposed i n this work, which involves the simultaneous solution of a set of nonlinear equations instead of an optimization approach, has displayed generally good performance — i t i s d i s t i n c t l y superior to any of the mass-balance algorithms for l i q u i d -l i q u i d e q u i l i b r i a — when accelerated by the vector-projection methods proposed i n Section 3-3-8. While the vector-projection methods have been applied to only phase e q u i l i b r i a i n this work, there i s no reason not to expect them to be applicable to other classes of problems. Their main beauty l i e s i n their s i m p l i c i t y and their non-involvement of matrices and time-consuming matrix inversions. They could therefore serve as a good substitute for the time-honoured Newton-Raphson acceleration method. The f i r s t step to any application of the vector-projection methods is a suitable formulation of the problem to y i e l d a r e l i a b l e successive-substitution step. The independent variables w i l l have to be appropriately matched with the check functions i n such a way as to -403-ensure convergence. Where the check functions cannot be easily re-arranged to give the corresponding check variables explicitly, the method adopted in this work, whereby the Newton method is applied successively to a set of pseudo-univariate check functions, should be suitable. As for the matching of the variables with the check functions, one way to achieve this would be to determine, in a preliminary study, the Jacobian matrix of the check functions with respect to the check variables for a typical problem and to use the relative magnitudes of i t s elements as a guide. The significant effect of problem formulation on the performance of the vector-projection methods is borne out by the results for the various GP arrangements in Section 3-3-6 and for both the GP and the 'Alternative' formulations in Chapter 6. The study of Chapter 4 reveals that the sensitivity—analysis technique, based on the perturbation theorem of geometric programming, for accounting for changes in the state variables incurs large errors i n applications to nonideal systems unless changes in temperature are quite small. While the results can be improved through partitioning and by the use of the mean-value theorem, the errors are s t i l l generally signi-ficant, and eliminating them through a predictor-corrector approach completely robs the method of i t s speed advantage. An isothermal-flash algorithm that is founded on the principles of perturbation theory performs poorly for a l l but vapour-liquid equilibria. The study on saturation-point calculations (Chapter 7) has shown that the nongradient methods — especially the regula f a l s i method implemented in the form with the 'quasi-Newton' appellation — are -404-superior to the generally-used Newton method or the third-order Richmond method. These nongradient methods give best results when the f i r s t iteration employs the Newton acceleration method. In spite of this improvement in the saturation-point calculation, adiabatic-flash and distillation-unit algorithms that update the temperature profile through a saturation-point calculation are not recommended because, as the results in Chapters 8 and 9 show, any iterative saturation-point method, no matter how efficient, w i l l be outperformed by a noniterative method of temperature update since the former has no advantage over the latter in terms of iteration requirements. In the study of adiabatic-flash algorithms (Chapter 8), the number of K evaluations per iteration has been successfully reduced to one for both the BP method and the Newton-Raphson algorithm — with appreciable savings in computation times. A comparison of the different classes of algorithms in their most efficient forms leads to the conclusion that the specialized methods ('BP' for narrow-boiling systems and 'SR' for wide-boiling systems) are generally faster than the all-purpose (Newton-Raphson and regula f a l s i ) methods and should therefore be used when i t is safe to do so. The conclusions above regarding the reduction of K evaluations to once per iteration (this time, per tray) and the relative speeds of specialized and all-purpose algorithms also hold true for narrow-boiling d i s t i l l a t i o n (Chapter 9). An attempt to obtain similar conclusive information for wide-boiling d i s t i l l a t i o n has been stymied by the lack of suitable information. The lack of data has le f t two holes unplugged at the point of termination of this study. One of these has to do with the case of -405-wide-boiling d i s t i l l a t i o n mentioned above and i t emphasizes the need for published data on REAL systems i n this area. The other gap involves phase e q u i l i b r i a i n which a s o l i d phase e x i s t s , and i t c a l l s for a s h i f t i n emphasis i n experimentation on phase e q u i l i b r i a . I t i s hoped that i n the near future, s u f f i c i e n t information w i l l be available to enable the algorithms presented here on these two types of problems to be f u l l y tested. The r e s u l t s of the study on multiphase e q u i l i b r i a and on d i s t i l l a -t i o n have not been as conclusive as one would have l i k e d them to be, due to the compiler problem reported i n Section 1 - 1 - 2 . Since the problem was f i r s t encountered, some published r e s u l t s of comparative studies of computational algorithms, based on compilers other than the PL/1, have been s c r u t i n i z e d . A c a r e f u l comparison of the i t e r a t i o n counts and computation times i n such r e s u l t s leaves one with the f e e l i n g that the problem may not be r e s t r i c t e d to the PL/1 (F - version 5.5) compiler used i n this work. BIBLIOGRAPHY Abrams, D.S. and J.M. Prausnitz (1975): AIChE J., 21(1):116. Anderson, T.F. and J.M. Prausnitz (1978): Ind. Eng. Chem. Process Des. Dev., 17(4): 552. Barreto, G.F. and I.H. Farina (1979): Chem. Eng. Sci., 34: 63 Beightler, C S . and D.T. P h i l l i p s (1976): "Applied Geometric Programming", John Wiley & Sons, Inc., N.Y. Boston, J.F. and S.L. S u l l i v a n (1972): Can. J. Chem. Eng., 50: 663. Broyden, C.G. (1965): Mathematics of Computations, 19_: 577. Bruin, S. (1970): Ind. Eng. Chem. Fundam., 9(3): 305. Clasen, R.J. (1965): The Numerical so l u t i o n of the Chemical Equilibrium Problem, i n "The RAND Corp. RM-4345-PR", January. Deam, J.R. and R.N. Maddox (1969): Hydrocarbon Processing, July: 163. Dinkel, J . J . and R. Lakshmanan (1975): J . Eng. Math., _9: 343. Dinkel, J . J . and R. Lakshmanan (1977): Computers and Chem. Eng., 1: 41. Dluzniewski, J.H. and S.B. Adler (1972): I. Chem. E. Symposium Series, 3_5: 4-21. Dojcansky, J . and J . Surovy (1975): Chem. Zvesti, 29(2): 184. Donnelly, H.G. and D.L. Katz (1954): Ind. Eng. Chem., 46(3): 511. Duff i n , R.J., E.L. Peterson, and C. Zener. (1967): "Geometric Program-ming — Theory and Application", John Wiley & Sons, Inc., N.Y. Eckert, E. and V. Hlavacek (1978): Scientific Papers of the Prague Institute of Chemical Technology, K13: 79. Edwards, T.J., G. Maurer, J . Newman, J.M. Prausnitz. (1978): AIChE J. , 24(6): 966. Erbar, J.H. (1973): Natural Gas Processors Association, _52_: 62. Eriksson, G. (1975): Chemica Scripta, 8: 100. Eriksson, G. and E. Rosen (1973): Chemica Scripta, 4_: 193. Fernando, R., B. Rodrigo, and J.D. Seader. (1975): AIChE J., 21^(5): 885. -406--407-Fike, C.T. (1970): "PL/1 for S c i e n t i f i c Programmers", Pre n t i c e - H a l l , Inc., N.J. Friday, J.R. and B.D. Smith (1964): AIChE J., 10(5): 698. Gautam, R. and W.D. Seider (1979): AIChE J., 25(6): 991. George, B., L.T. Brown, CH. Farmer, P. Buthod, and F.S. Menning. (1976): Ind. Eng. Chem. Process Des. Dev., 15(3): 372. Gmehling, J . , and U. Onken. (1977); "Vapour-liquid Equilibrium Data C o l l e c t i o n " , Vol. 1 (Parts 6A, 6B & 7), DECHEMA, Frankfurt. Goldstein, R.P. and R.B. S t a n f i e l d (1970): Ind. Eng. Chem. Process Des. Dev., 9_(1):78. Guffey, C.G. and A.H. Wehe (1972): AIChE J., 18/5): 913. Gupta, B.R. and V.R. Radhakrishnan (1978): Indian Chem. Eng., 20(2): 17. Heidemann, R.A. and J.M. Mandhane (1973): Chem. Eng. Sci., 28_: 21. Hendry, J.E. and R.R. Hughes (1972): Chem. Eng. Prog., 68_(6): 71. Henley, E.J. and E.M. Rosen (1969): "Material and Energy Balance Computations", John Wiley & Sons, Inc., N.Y. Henley, E.J. and J.D. Seader (1981): "Equilibrium Stage Separation Operations i n Chemical Engineering", John Wiley & Sons, N.Y. Himmelblau, D.M. (1972): "Applied Nonlinear Programming", McGraw-Hill Book Co, N.Y. Hirose, Y., Y. Kawase, and M. Kudoh. (1978): J . Chem. Eng. Japan, r i ( 2 ) : 150. Holland, CD. (1963): "Multicomponent D i s t i l l a t i o n " , P r e n t i c e - H a l l , Inc., N.J. Holland, CD. (1975): "Fundamentals and Modeling of Separation Processes — Absorption, D i s t i l l a t i o n , Evaporation, and Extraction", P r e n t i c e - H a l l , Inc., N.J. Holland, CD. (1981): "Fundamentals of Multicomponent D i s t i l l a t i o n " , McGraw-Hill Book Co, N.Y. Hudson, J.W. and M. Van Winkle (1969): J . Chem. Eng. Data, 14_(3): 310. Hughes, J.K. (1973): "PL/1 Structured Programming", 2nd Ed., John Wiley & Sons, N.Y. Jeli n e k , J . and V. Hlavacek (1971): Hydrocarbon Processing, August: 135. -408-Jenson, V.G. and G.V. Jeffr e y s (1963): "Mathematical Methods i n Chemical Engineering", Academic Press, London. Ketchum, R.G. (1978): Chem. Eng. Sci., 33: 1285. King, C.J. (1980): "Separation Processes", 2nd Ed., McGraw-Hill, N.Y. La Fara, R.L. (1973): "Computer Methods for Science and Engineering", Hayden Book Co, Inc., N.J. Lapidus, L. (1962): " D i g i t a l Computation for Chemical Engineers", McGraw-Hill, N.Y. • Leach, M.J. (1977): Chem. Eng., May 23: 137. Lidor, G. and D.J. Wilde (1978): Journal of Optimization Theory and Applications, 26(1): 77. Lu, B.C. -Y., P. Yu.and A.H. Sugie. (1974): Chem. Eng. Sci., 29(2): 321. Lyster, W.N., S.L. Su l l i v a n , J r . , D.S. B i l l i n g s l e y , CD. Holland. (1959a): Petroleum Refiner, June: 221. Lyster, W.N., S.L. Su l l i v a n , J r . , D.S. B i l l i n g s l e y , CD. Holland. (1959b): Petroleum Refiner, July: 151. Lyster, W.N., S.L. S u l l i v a n , J r . , D..S. B i l l i n g s l e y , CD. Holland. (1959c): Petroleum Refiner, October: 139. Ma, Y.H. and C.W. Shipman (1972): AIChE J., 18(2): 299. Marina, J.M. and D.P. Tassios (1973): Ind. Eng. Chem. Process Des. Dev., 12(1): 67. Mauri, C. (1980): Ind. Eng. Chem. Process Des. Dev., _19(3): 482. Mert l , I. (1972): Collection Czechoslov Chem. Commun., 37_: 375. Mukhopadhyay, P.K. and S.P. Singh (1975): Indian Chem. Engr., 17_(4): 52 Nagata, I. (1973): J . Chem. Eng. Japan, 6(1): 18. Nagata, I. and K. Gotoh (1975): Ind. Eng. Chem. Process Des. Dev., 14(1): 98. Nagata, I., M. Nagashima, and M. Ogura. (1975a): J . Chem. Eng. Japan, 8(5): 406. Nagata, I., M. Ogura, and M. Nagashima. (1975b): Ind. Eng. Chem. Process Des. Dev., 14_(4): 500. Naphtali, L.M. and D.P. Sandholm (1971): AIChE J., 17_(1): 148 - 4 0 9 -Newman, J . (1968): I. & B.C. Fundamentals, 7/3): 514. Nishida, N. and G.J. Powers (1978): J . Chem. Eng. Japan, 11/5): 396. Novak, J.P., J . Suska, and J . Matous. (1974a): Collection Czechoslov. Chem. Commun., 39_: 1,943. Novak, J.P., J . Suska, and J . Matous. (1974b): Ind. Eng. Chem. Process Des. Dev., 13/2): 197. Osborne, A. (1964): Chem. Eng., December 21:97. O s t r o v s k i i , G.M. and A.L. Shevchenko (1979): Chem. Eng. Sci., 34: 1243. Passy, U. and D.J. Wilde (1968): Siam J. Appl. Math., 16(2): 363. Peng, Ding-Yu and D.B. Robinson (1976): Ind. Eng. Chem. Fundam., 15(1):59. Perry, R.H. and C H . Chilton (editors) (1973): "Chemical Engineers' Handbook", 5th Ed., McGraw-Hill, N.Y. Petryschuk, W.F. and A.I. Johnson (1965): Can. J. Chem. Eng., August: 209. Prausnitz, J.M. (1969): "Molecular Thermodynamics of Fluid-Phase E q u i l i b r i a " , P r e n t i c e - H a l l , Inc., N.J. Prausnitz, J.M., CA. Eckert, R.V. Orye, and J.P. O'Connell. (1967): "Computer Calculations for Multicomponent Vapor-Liquid E q u i l i b r i a " , ' P r e n t i c e - H a l l , Inc., N.J. Prausnitz, J.M., T.F. Anderson, E.A. Grens, C A . Eckert, R. Hsieh, and J.P. O'Connell. (1980): "Computer Calculations for m u l t i -component Vapor-Liquid and Liq u i d - L i q u i d E q u i l i b r i a " , Prentice-H a l l , Inc., N.J. Rachford, H.H., J r . and J.D. Rice (1952): J . Petrol. Technol., Section 1 (October): 19. Reid, R.C, J.M. Prausnitz, and T.K. Sherwood. (1977): "The Properties of Gases and Liquids", 3rd Ed.", McGraw-Hill, N.Y. Renon, H. and J.M. Prausnitz (1968): AIChE J., 14(1): 135. Rohl, J.S. and N. Sudall (1967): I. Chem. E. Symposium Series, 23: 71. Sanderson, R.V. and Chien, H.H.Y. (1973): Ind. Eng. Chem. Process Des. Dev., 12(1): 81. Seppala, R.E. and R. Luus (1972): J . Franklin Inst., 293: 325. -410-Shapley, M. and L. Cutler (1970): "Rand's Chemical Composition Program: A Manual", R-495-PR. Smith, B.D. (1963): "Design of Equilibrium Stage Processes", McGraw-H i l l , N.Y. Smith, J.M. and H.C. Van Ness (1959): "Introduction to Chemical Engineering Thermodynamics", 2nd Ed., McGraw-Hill, N.Y. Sobolev, O.B., L.V. Andreeva, and V.M. Platonov. (1975): Teoreticheskie Osnovy Khimicheskoi Tekhnologii, 9/1): 116. Th i e l e , E.W. and R.L. Geddes (1933): Ind. Eng. Chem., 25(3): 289. Thompson, R.W. and C.J. King (1972): AIChE J., 18(5): 941. Tomich, J.F. (1970): AIChE J., 16/2): 229. T r i p a t h i , R.P. and S. Krishna (1976): J . Inst. Eng., India, Part CH., 56/2): 64 Tsuboka, T. and T. Katayama (1975): J . Chem. Eng. Japan, 8/3): 181. Van Winkle, M. (1967): " D i s t i l l a t i o n " , McGraw-Hill, N.Y. Von Rosenberg, D.U. (1963): Chem. Eng. Sci., 18_: 219. Von Rosenberg, D.U. (1977): Chem. Eng. Sci., 32: 1546. Wang, J.C. and G.E. Henke (1966): Hydrocarbon Processing, 45(8): 155. Washburn, E.W. (ed.) (1929): "International C r i t i c a l Tables of Numerical Data, Physics, Chemistry and Technology", V o l . 5, McGraw-Hill, N.Y. Weatherford, R.M. and M. Van Winkle (1970): J . Chem. Eng. Data, 15(3): 386. Wegstein, J.H. (1958): Commun. A.C.M., 9/6): 9. Westerberg, A.W. and G. Stephanopoulos (1975): Chem. Eng. Sci., 30_: 963. White, W.B., S.M. Johnson, and G.B. Dantzig. (1958): J . Chem. Phys., 28(5): 751. Willock, J.M. and M. Van Winkle (1970): J . Chem. Eng. Data, 15/2): 281. Wilson, G.M. (1964): J . Amer. Chem. Soc, 86_: 127. Zeleznik, F.J. and S. Gordon (1968): Ind. & Eng. Chem., 60: 27. - 4 1 1 -APPENDIX A GENERAL NOTES ON PROGRAMMING The programming design employed i n th i s work was geared towards s a t i s f y i n g the following objectives: (1) An authentic comparison of a l l algorithms that serve the same purpose. (2) Minimum e f f o r t , on the part of the user, i n problem preparation. (3) A minimal chance of errors i n problem preparation and data input. (4) Easy expansion of the system of programs to handle other design problems that have not been studied i n t h i s work. (5) An e f f o r t l e s s replacement of one property-estimation method by another, as might be dictated either by the dependence of the r e l a t i v e merits of two competing estimation methods on operating conditions or by new advances i n the technology of property estimation. (6) Optimization of the use of storage to the extent that i t does not undermine the speed of execution. (7) Elimination of a l l redundant c a l c u l a t i o n s . The steps taken to ensure that the above objectives are met are outlined under the f i v e subheadings below. Functions Common to A l l Main Programs To s a t i s f y Objective 1 and p a r t l y meet Objective 6, a l l main programs have the following functions i n common: (a) Data input through a common routine (PROPE). (b) A l l o c a t i o n of storage for a l l arrays which are common to any -412-two routines that are external to each other, i f such allocation has not already been done in the routine PROPE. (c) Time readings, and the handling of a l l operations which are common to a l l the algorithms that are applicable to the particular problem-type for which the main program is de-signed. The same main program is used for a l l algorithms that handle the same problem-type and the entire structure is designed such that the solution paths for a l l such algorithms differ only in the iteration routine. Property-estimation Programs In order to satisfy Objectives 4 and 5, a separate routine is used for the estimation of each property that is required in this study. Where more than one estimation method has been implemented for the same property and where two of such methods are not required in any execution of a given program, the same routine name is used for the various versions and the compiled form of the appropriate version made available as need demands. In this way, no modifications of any of the programs is necessary in switching from one estimation method to another. Data Input The data-input format adopted here is aimed at meeting Objectives 2 and 3. The following are the key points of the format: (1) Two data f i l e s are used in the solution of any problem. The f i r s t data f i l e contains a l l properties of components of the system as well as component-pair interaction parameters for activity coefficients. These are read in through the routine PROPE. The second data f i l e is read by the main program and i t contains - 4 1 3 -informatlon on feed composition, flow rate, temperature and pressure, and on the configuration (where necessary) and the known operating variables of the operation u n i t . For a l l mixtures with the same constituents, the contents of the f i r s t f i l e are the same and are invariant while those of the second f i l e can e a s i l y be modified to suit a given purpose. (2) The routine PROPE assigns i d e n t i f i c a t i o n subscripts to the various components at the f i r s t occurrence of t h e i r names. At any other point where new data need to be assigned to the components, the programs do these automatically by matching the names of the components against the i d e n t i f i c a t i o n subscripts I n i t i a l l y assigned. This way, the user does not have to arrange the input data i n any component-order. Storage Management In p a r t i a l s a t i s f a c t i o n of Objective 6, f u l l advantage i s taken of the adjustable-dimension and dynamic-allocation f a c i l i t i e s a v a i l a b l e i n the PL/1 language (see Fike, 1970; Hughes, 1973). Quite frequently, the same storage i s used for two or more variabl e s , so long as no loss of information r e s u l t s . Handling of Constants and Arrays The PL/1 language has a number of b u i l t - i n functions for array operations. These are invoked as much as possible to make for simpler and shorter programs. Whenever any of these i s invoked or whenever a Do-loop i s used, i t i s ensured that a l l constants i n a given expression are replaced with a single constant. In the case of a Do-loop, t h i s composite constant i s defined outside the loop. The same approach i s used whenever products and quotients of variables with multiple -414-occurrence retain the same values over more than one occurrence. This is one of the main steps aimed at satisfying Objective 7. APPENDIX B AVAILABILITY OF PROGRAMS AND SOME SPECIFIC PROGRAM DETAILS The enormous volume of programs involved in this study has made their inclusion in this report impossible. Many of the programs have been stored on tape and deposited with the Data Library of the University of British Columbia. Table B-l contains a l i s t of these programs. The programs that have not been included in the collection are those that can easily be obtained from one of those included — using information contained in the main body of this report — with l i t t l e change in program structure. The remaining part of this appendix contains outlines of some fine details that were not mentioned in the main discussion of some of the algorithms — details which in some cases bear significantly on the performance of such algorithms. B-l General Auxiliary Programs ENTHA (For calculating enthalpy departures) A fixed-number variable (HFLAG) set by the calling program, determines which enthalpy departure terms are to be computed. If HFLAG is 1, only vapour-phase enthalpy departures are computed; i f i t is 2, computation is for liquid phase only; i f HFLAG is 3, the enthalpy departures are computed for both vapour and liquid phases. PROPE (For input and calculation of data) Data are input from the f i r s t data f i l e in the following order (All data not required for a given computation must be assigned zero values): (1) Input, componentwise, a l l data that are required for a l l Table B-l Information on Accessible Programs Class Tape Name Program Name & Heading Function or Description PROPERTY ESTIMATION PROP (1) FUGAC /* FUGAC-V */ f°k & with saturation <f> values from the truncated v i r i a l EOS. PROP (2) FUGAC /* FUGAC-RK */ f o I j with saturation <|> values from R-K EOS (Wilson) i f T r < 0.9. PROP (3) VIRIAL /* VIRIAL */ Second v i r i a l coefficients PROP (4) ZCALC /* ZCALC */ Vapour compressibility ratio and molar volume from Redlich-Kwong EOS (a/t Wilson) PROP (5) PHI /* PHI-V */ Fugacity coefficients, vapour compressi-b i l i t y ratios and molar volume from v i r i a l EOS • PROP (6) PHI /* PHI-RK */ Fugacity coefficients from the R-K EOS (Wilson version) PROP (7) GAMMA /* WILSON */ Liquid activity coefficients from the Wilson model PROP (8) GAMMAN /* NRTL */ Liquid activity coefficients from the NRTL model PROP (9) GAMMAN /* UNIQUAC */ Liquid activity coefficients from the UNIQUAC model PROP (10) ENTHA /* ENTHA-DEP */ Vapour and liquid enthalpy departures GENERAL AUXILIARY PROGRAMS AUX (1) PROPE /* DATA */ Data (input as well as calculation) AUX (2) INVER /* MATRIX INVERSION */ General matrix inversion (continued) Table B-l continued Class Tape Name Program Name & Heading Function or Description AUX (3) TBUBB /* BUBBLE PT. */ Bubble point used in adiabatic flash and d i s t i l l a t i o n AUX (4) TDEW /* DEW PT. */ Dew point used in adiabatic flash and d i s t i l l a t i o n ISOTHERMAL VAPOUR-LIQUID FLASH VLFLASH (1) SYSTEM /* V-L FLASH */ Main program VLFLASH (2) ITERA /* TRI. PROJ. */ GP algorithm with triangular projection VLFLASH (3) ITERA /* TETRA PROJ */ GP algorithm with tetrahedral projection VLFLASH (4) ITERA /* HYPERPLANE. */ GP algorithm with hyperplane linearization VLFLASH (5) ACCEL /* HYPERPLANE */ Routine for hyperplane linearization VLFLASH (6) ITERA /* SENSIT. */ The flash algorithm based on sensitivity analysis VLFLASH (7) ITERA /* MOD. RAND */ The modified RAND algorithm VLFLASH (8) ITERA /* MOD. MOD. RAND */ The Broyden-modified RAND algorithm VLFLASH (9) ITERA /* SLU: R.R.+WEG.+RICH. */ Single-loop univariate: Wegstein-projected, Richmond-accelerated Rachford-Rice VLFLASH (10) ITERA /* SLU: St.+WEG.+RICH.*/ Single-loop univariate: Wegstein-projected Richmond-accelerated standard VLFLASH (11) ITERA /* SLU: WEG.+<l>-Norm. */ Single-loop univariate: Wegstein-projected ^-normalized method 2 (continued) Table B-l continued Class Tape Name Program Name & Heading Function or Description VLFLASH (12) ITERA /* SLU: R.R.+WEG.+MVT */ Single-loop u n i v a r i a t e : Wegstein-projected MVT-accelerated Rachford-Rice VLFLASH (13) ITERA /* SLU: WEG + l y */ Single-loop u n i v a r i a t e : Wegstein-projec-ti o n with J,y weighting VLFLASH (14) ITERA /* SLU: R.R+QUAD. WEG+MVT */ Single-loop u n i v a r i a t e : Quadratic-Wegstein-projected MVT-accelerated Rachford-Rice VLFLASH (15) ITERA /* DLU: R.R. + RICH. */ Double-loop un i v a r i a t e : Richmond-accelerated Rachford-Rice VLFLASH (16) ITERA /* SENSIT.+TETRA.PROJ. */ S e n s i t i v i t y algorithm with tetrahedral projection VLFLASH (17) RESULT /* VL RESULT */ Pri n t s d e t a i l e d f i n a l r e s u l t s SENSITIVITY ANALYSIS SENSIT (1) SYSTEM /* SENSIT. */ Main Program SENSIT (2) SITERA /* BEST VERSION */ Best version of s e n s i t i v i t y without r e -solution. SENSIT (3) SITERA /* PRED-CORR 1 */ Predictor-Corrector algorithm 1 SENSIT (4) SITERA /* PRED-CORR 2 */ Predictor-Corrector algorithm 2 SENSIT (5) SITERA /* PRED-CORR 3 */ Predictor-Corrector algorithm 3 LIQUID-LIQUID FLASH LLFLASH (1) ITERA /* TETRA. PROJ. */ GP with tetrahedral projection LLFLASH (2) ITERA /* PRAUSNITZ—NEW */ The Algorithm of Prausnitz et a l with the i n i t i a l i z a t i o n scheme recommended here LLFLASH (3) ITERA /* PRAUSNITZ—ORIGINAL */ The Algorithm of Prausnitz et a l with o r i g i n a l i n i t i a l i z a t i o n scheme (continued) Table B-l continued Class Tape Name Program Name & Heading Function or Description LIQUID-SOLID FLASH LSFLASH ITERA /* TETRA. PROJ. */ GP with tetrahedral projection MULTIPHASE FLASH MPFLASH (1) SYSTEM /* MPFLASH */ The main program MPFLASH (2) RESULT /* MPFLASH */ Prin t s d e t a i l e d f i n a l r e s u l t s MPFLASH (3) ITERA /* 9 — N-R */ Phase-fraction approach with Newton-Raphson MPFLASH (4) ITERA /* 6 — QUASI-NEWTON */ Phase-fraction approach with quasi-Newton acce l e r a t i o n MPFLASH (5) ITERA /* 6+MVT+TETRA.PROJ. */ Pa r t i t i o n e d phase-fraction approach with MVT and tetrahedral projection MPFLASH (6) ITERA /* GP — TRI. PROJ. */ GP method with tri a n g u l a r p r o j e c t i o n MPFLASH (7) ITERA /* GP — TETRA PROJ. */ GP method with tetrahedral p r o j e c t i o n MPFLASH (8) TETRA /* SENSIT. */ S e n s i t i v i t y method MPFLASH (9) ITERA /* ALT. 1—REDUCED */ Alt e r n a t i v e formulation 1 with reduced dimension MPFLASH (10) ITERA /* ALT. 1—UNREDUCED */ Al t e r n a t i v e formulation 1 with GP dimension MPFLASH (11) ITERA /* ALT. 2—REDUCED */ Al t e r n a t i v e formulation 2 with reduced dimension MPFLASH (12) ITERA /* ALT. 2—UNREDUCED */ Alt e r n a t i v e formulation 2 with GP ^ dimension (continued) Table B-l continued Class Tape Name Program Name & Heading Function or Description BUBBLE-POINT CALCULATION TBUB (1) TBUBB /* REGULA FALSI */ Regula f a l s i i n t e r p o l a t i o n method TBUB (2) TBUBB /* QUADRATIC */ Quadratic i n t e r p o l a t i o n method TBUB (3) TBUBB /* LAGRANGE */ Lagrange i n t e r p o l a t i o n method TBUB (4) TBUBB /* NEWTON */ Newton's Method TBUB (5) TBUBB /* RICHMOND */ The Richmond Method TBUB (6) TBUBB /* QUASI-NEWTON */ The quasi-Newton method DEW-POINT CALCULATION TDEW TDEW /* QUASI-NEWTON */ The quasi-Newton method ADIABATIC FLASH CALCULATION ADFLASH (1) HITERA /* CONV. N-R. 1 */ Conventional Newton-Raphson with corrected K values ADFLASH (2) HITERA /* BARNES-FLORES N-R 1 */ Barnes-Flores form of Newton-Raphson with corrected K values ADFLASH (3) HITERA /* MOD. N-R 1 */ Modified Newton-Raphson 1 ADFLASH (4) HITERA /* MOD. N-R 2 */ Modified Newton-Raphson 2 ADFLASH (5) HITERA /* MOD. N-R 3 */ Modified Newton-Raphson 3 ADFLASH (6) HITERA /* D-I REGULA FALSI */ Double-iteration R e g u l a - f a l s i ADFLASH (7) HITERA /* SR 3 */ SR 3 ADFLASH (8) HITERA /* PROPOSED BP 1 */ Proposed BP 1 (continued) Table B-l continued Class Tape Name Program Name & Heading Function or Description ADFLASH (9) HITERA /* PROPOSED BP 2 */ Proposed BP 2 ADFLASH (10) HITERA /* PROPOSED BP 3 */ Proposed BP 3 ADFLASH (11) GEOMH /* ADFLASH */ Main program DISTILLA-TION DISTIL (1) TDISTIL /* MAIN */ Main program DISTIL (2) TDITERA /* SR 1 */ SR — 1 DISTIL (3) TDITERA /* SR 2 */ SR -- 2 DISTIL (4) TDITERA /* SR 3 */ SR — 3 DISTIL (5) TDITERA /* SR 4 */ SR — 4 DISTIL (6) TDITERA /* LYSTER */ BP — Lyster DISTIL (7) TDITERA /* HOLLAND */ BP — Holland DISTIL (8) TDITERA /* SEPPALA-LUUS */ BP — Seppala-Luus DISTIL (9) TDITERA /* PROPOSED 1 */ BP — Proposed 1 DISTIL (10) TDITERA /* PROPOSED 2 */ BP — Proposed 2 DISTIL (11) TDITERA /* PROPOSED 3 */ BP — Proposed 3 DISTIL (12) TDITERA /* PROPOSED 4 */ BP — Proposed 4 DISTIL (13) TDITERA /* PROPOSED 5 */ BP — Proposed 5 DISTIL (14) TDITERA /* 2N N-R */ 2N Newton-Raphson (continued) Table B-l cotinued Class Tape Name Program Name & Heading Function or Description DISTIL (15) TDITERA /* 2-DI N-R 1 */ Stagewise N-R 1 DISTIL (16) TDITERA /* 2-DI N-R 2 */ Stagewise N-R 2 DISTIL (17) TDITERA /* 2-DI N-R 3 */ Stagewise N-R 3 DISTIL (18) TDITERA /* 2-DI N-R 4 */ Stagewise N-R 4 I N3 f O I -423-components: name, class (subcritical, hypothetical-liquid or supercritical), c r i t i c a l constants (T , p , v ), c' c' c'' acentric factors (co, u> ), dipole moment (y), association r l constant (n). ideal-gas heat capacity constants, normal boiling and melting points, enthalpy of fusion, and surface and volume parameters required in UNIQUAC model. (2) For components that are not supercritical, input vapour-pressure constants and molar volumes at 3 temperatures (each volume is preceded by its corresponding temperature). (3) For components that are not supercritical, input activity parameters. For supercritical components input activity parameters as well as Henry's constant and infinite-dilution partial molar volume — both as functions of temperature. In addition to the above data input, PROPE computes binary-interaction c r i t i c a l constants, temperature coefficients for molar volumes (nonsupercritical components) and Henry's constant and infinite-dilution partial molar volumes (supercritical components), enthalpy of vaporization, c r i t i c a l compressibility ratio, and some enthalpy terms that depend only on acentric factor and c r i t i c a l properties. TBUB and TDEW (For bubble- and dew-point calculation): When TBUB on TDEW is called by any adiabatic-flash or d i s t i l l a t i o n programs, temperature, T, is assigned a value greater than 100,000 by the calling program i f no reasonable estimate is available. In such a case, TBUB (or TDEW) does temperature i n i t i a l i z a t i o n . Where T is not assigned such an unreasonable value (such as in between iterations) TBUB or TDEW uses the value of T at entry as the i n i t i a l value. -424-B—2 Isothermal Vapour—liquid Flash ACCEL (For accelerating hyperplane l i n e a r i z a t i o n ) I t i s programmed to be able to handle the o r i g i n a l version as well as the a l t e r n a t i v e versions of the acceleration method. The vectors and matrices involved i n the method are computed i n t h e i r e n t i r e t y or merely updated depending on whether a f l a g (NFLAG) has the value of '0' or '1'. S e n s i t i v i t y algorithm The product v ± i - ± / z i l n E q - (3-76) i s m u l t i p l i e d by 1.1. This i s found to improve the algorithm's convergence s l i g h t l y . GP Algorithms In the implementation of the various algorithms based on the GP formulation, the following constraints are imposed on the V and L r e s u l t i n g from acceleration: (1) For V < 0.1, i f i t s value before acceleration i s greater than 0.01 then set v^ ^ = Z ±/(1.0 + 9.0/K^) ( i = 1,2,...,N); otherwise terminate the i t e r a t i o n . (2) For L < 0.1, i f i t s value before acceleration i s greater than 0.01 then set = Z /(1.0 + 0.111/K^) ( i = 1,2,...,N); else terminate the i t e r a t i o n . These constraints were merely introduced as an extra safeguard and seem not to r e a l l y make any difference. B-3 Multiphase Flash Main Program I t uses a four-character b i t s t r i n g to i d e n t i f y phases, with the characters denoting s o l i d - l i q u i d - l i q u i d - v a p o u r i n that order from l e f t -425-to r i g h t . A value of '1* implies the corresponding phase presumably exi s t s while '0' implies the phase does not e x i s t . Thus, '1010' denotes a s o l i d - l i q u i d combination while '0111' denotes a liqui d - l i q u i d - v a p o u r combination. This b i t s t r i n g i s used to assign values to fixed numbers (VBAR, LBAR and SBAR) thus: (1) I f vapour i s assumed present then VBAR = 1; else VBAR = 0. (2) I f l i q u i d phase 2 i s present then set LBAR equal to (VBAR +1), else set LBAR = 0. (3) If s o l i d phase i s present then set SBAR equal to (VBAR + 1) i f LBAR = 0 or to (LBAR + 1) i f LBAR > 0; else set SBAR = 0. The fixed numbers determine whether any given phase i s to be considered i n the c a l c u l a t i o n s . The main program also defines another fixed number, PLBAR, which i s set equal to the i n i t i a l value of LBAR i n the i t e r a t i o n programs. A c t i v i t y c o e f f i c i e n t s are determined from the UNIQUAC model i f PLBAR > 0; otherwise, they are estimated from the Wilson model. I t e r a t i o n Programs The f i x e d numbers VBAR, LBAR and SBAR define a phase dimension. A l l independent-variable arrays have this extra dimension (over and above what obtains for two-phase systems). Thus, we have an (N -P l)-element vector for phase-fraction formulation and an N x (N - 1) P matrix for the GP formulation. For methods using vector projection, the d i s p a r i t y functions are s i m i l a r l y defined with a phase dimension. At every phase elimination, the dimensions of a l l the arrays are appropriately reduced. -426-B-4 D i s t i l l a t i o n The following points apply to the 2N Newton-Raphson method: (1) To obtain the i n i t i a l matrix, the vapour-flow elements i n the independent-variable vector are perturbed by 0.1 moles while the temperature elements are perturbed by 0.01K. For every V perturbation ( j = 2,3,..., Nfc+1), i s correspondingly incremented by 0.1 moles to ensure mass balance. (2) In the unidimensional search for a value of the parameter t that y i e l d s an improvement, the search i s terminated i f either the objective function i s reduced or the absolute change i n t i s le s s than 0.01. (3) In the i n i t i a l matrix determination, the MTA i s modified to reduce computation. When V ( j = 2,3,...,Nt+l) i s perturbed, the forward s u b s t i t u t i o n i n the MTA i s done only from (j-2) to (N +1). For the perturbation of T. ( j = 1,2, N+1), the t j t forward s u b s t i t u t i o n i s from (j-1) to (N^+l). -427-APPKNDIX C THE GEOMETRIC PROGRAMMING CONCEPT (ref. Duffin et a l , 1967). C-l Primal and Dual Programs The Primal Program Find the minimum value of a function g Q(t) subject to the constraints t > 0 (j = 1,2 m) (C-l) and g i(t) < 1 ( i = 1,2,...,p) (C-2) with m a. t (t) = I c n t J (k - o.i P ) (c-3) ieJ(K) 1 j-1 where and J(k) = {m^, n y r l , iyr-2,..., (k = 0,1,...,p) (C-4) m = 1, n = n, m. = n. . + 1 ( i = 1,2,...,p) (C-5) o p I I—1 n is the total number of terms in the p+1 functions. The exponents a are arbitrary real numbers, but the coefficients C^ are assumed to be positive [implying the functions g^(0 are 'posynomials' ]. g Q ( 0 is the primal function; t^ , defined vectorially by t_ = ^ 1 ' fc2» *••' ^ s t b e P1*1113! variable vector; {a-jjl i s an n x m matrix called 'the exponent matrix'; Inequations (C-l) and (C-2) constitute 'natural' and 'forced' constraints respectively, the two together making up 'the primal constraints'. -428-The Dual Program Find the maximum value of a product function n w. p W, (w) W i=i 1 1 k = i fc where W (w) I w (k = 1,2 ,p) (C-7) fc i e J ( k ) 1 with J(k) = {in^, m^+1, n^+2 , 1 ^ } (k = 0,1,...,p) (C-8) where m =1, n = n, m. = n. , + 1 (A = 1,2 ,p) (C-9) o p * x—I and the vector w = {w, , w_, ..., w } i s subject to the l i n e a r — 1 1 2 n constraints w± > 0 ( i - 1,2 ,n), (C-10) I w = 1, ( C - l l ) i e j ( 0 ) and n I a , , w , = 0 (J = 1,2 ,*) (C-12) i=l 1 J 1 v(w) i s the dual function; w i s the dual variable vector; Relations (C-10), ( C - l l ) and (C-12) are ' p o s i t i v i t y ' , 'normality' and 'orthogonality' conditions re s p e c t i v e l y — the three together c o n s t i t u t i n g 'the dual constraints'. In evaluating Equation (C-6), i t i s to be understood that x = x =1 for x = 0/. Through some matrix manipulation of the exponent matrix, a set of vectors, _b^°^ — c a l l e d the normality vector — and t / ~ ^ ( j = 1,2,...,n-m-l) — c a l l e d n u l l i t y vectors — , which are orthogonal complements to the columns of { a „ } , could be obtained. The general s o l u t i o n to the dual program then becomes -429-f . (n-m-1) w = b ( 0 ) + I r . b ( j ) J-l J" (C-13) where b^ 0^ s a t i s f i e s Equations ( C - l l ) and (C-12), and the basic va r i a b l e vector r, given by r = |r. ,r« r -, } . — — 1' / ' n—m—1 ' consists of r e a l numbers chosen such that 3 a ( r ) = 0 ( j = 1,2, ,n-m-1) (C-14) o r . J and w^ >^ 0 ( i = 1,2, n) for maximum v. C-2 Perturbation Theorem Let the exponent matrix have rank m and assume n-m-1 > 0. If for some c o e f f i c i e n t vector C° the dual program has a maximizing vector w* > 0, and i f the matrix J(w*) with elements a n D- b„ p W._ W, J^Cw > = I * I * ( i . J - 1.2 n-m-1) C-15) £=1 w 4 k-1 Wk f.\ (n-m-1) . . i s nonsingular [w£ ; i s defined by Wk = W° + I *^yT (k = 1,2, p)]» then the functions that give the optimized parameters w* and v* = v(w*,C_) i n terras of the variable vector £ are d i f f e r e n t i a b l e i n an open neighborhood of C°, and we have, i n t e r a l i a : o (n-m-1) (n-m-1) n dC 0 dw = I [ b ( j ) I {j (w ) £ b • — — } ] (1-1,2....n) (C-16) j - l 1 k-1 j k 1=1 * C£ -430-APPENDIX D THE SOLID—PHASE REFERENCE FUGACITY In an attempt to correlate the normally Ignored term of the solid-phase reference-fugaclty correlation [compare Equations (2-9) and (2-10)], let us treat Ah^, the enthalpy of fusion for a substance I, as a function of temperature, T, and pressure, P . This leads to the differential 9h 3h 3h 3h dK> - 3lHp d T +W^\ndp- 3lH P d T " SF^V ^ where and h g i are the molar enthalpies of i in the liquid and solid states respectively. Equation (D-l) In turn leads to 3Ahf 3h. 3h Sh. 3h . i . = _ L i _ i s i . r " L i , s i . i 3P ^3T }a 3T |p ~ 3T |p + L3P |T " 3P | T J (3 T ' O t 0 - 2 ) where the subscript a denotes a gradient taken along the liquid-solid saturation line. According to Clapeyron (Reid et a l , 1977): & - 4 h' 3T'o L s N ! T(v - v ) where v denotes molar volume. Substituting this and the Maxwellian relation, l dV 3p" T = V " ^ If p' into Equation (D-2) and introducing the basic definitions of liquid and solid heat capacities, we have -431-f 9 V i 3 V i v mi v - v where AC , and T . are as defined in Section (2-4). If we make pi mi the not too far-fetched assumption that i L a e 3T |p 3T "|p» then Equation (D-3) becomes 3hf Ah* <*r>o- A C P i + T7 < d" 4 ) v mi Attempts by various investigators to correlate Ah^ as a function of temperature have been quite unsuccessful (Reid et a l , 1977). For the purpose of this study, a Watson-type relationship (Reid et a l , 1977) was assumed, thus Ah* = Ah*°(l - T r ±) 1 (D-5) Equation (D-5) normally applies to the latent heat of vaporization with a approximately equal to 0.38 for most compounds. For the fusion process, assuming that the model is valid, one would expect a to assume a more complex form, In view of the nature of the forces involved in destroying the solid structure. From Equation (D-5) we have dhf a Ah* (—-±) = J L — ± (D-6) V3T 'a T - T J V Y c i mi Substituting Equation (D-6) into Equation (D-4) and rearranging, we have - 4 3 2 -<x AC . = -Ahf [= — + (D-7) pi i L T - T , T . J v ' c i mi mi Combining Equations (2-9) and (D-7) leads us to f° L Ahf , . a. . T , T - T - VtT - r r - <rr=Tn + r->< - "S—> 1 (D-8> r ^ mi c i mi mi The problem now reduces to that of obtaining a suitable value of <*^ . A rearrangement of Equation (D-7) yields AC °i * ( Tmi " Tcl> ^ + f T > ( D " 9 ) Ah^ mi The following steps were taken to correlate as a function of the reduced normal melting-point, T , and Pitzer's acentric mri factor, o)^. Step 1 A thorough search of the literature was conducted for systems L s whose values of C and C are known at or close to the normal melting P P point. As i f i t was not bad enough that only very scanty data exist on g 0^, the existing data were burdened with large error factors. Making the best of a bad situation, information on some 23 compounds was fin a l l y put together. Step 2 Data on T . , T . , u>. and Ah^ were collected for the 23 c — c i mi i i compounds. In some cases, empirical values of some of these parameters were not available and have had to be predicted from the best correlations available (Perry and Chilton, 1973; Reid et a l , 1977). Step 3 This step involved performing a non linear f i t on the available data with a view to obtaining a working mathematical relationship for a -433-as a function of OJ and T . Because there i s n ' t the crudest mr knowledge of how a might r e l a t e to OJ and T a rather cumbersome mr 42-parameter r e l a t i o n s h i p was employed as a ' f i r s t guess' . This equation took the form 6 . = I A.CBJ.T 3 7 + A-W-)-lnT . (D-10) i 3 3 m r i 7 — 7 mri where 3 1 i 0 i 2 2 - 3 - 3 2 w 33 i 34 i ]5 v i j 6 i The 3's are the parameters whose values are to be determined. Equations (D-9), y i e l d i n g expected a a n d (D-10), y i e l d i n g estimated <*±t were employed i n an optimization scheme to determine the set of 3's that minimize the objective function F(B_) = I <«! - «?) ( D - l l ) i=l e o where and are the expected and observed values of a, and denotes the number of data points employed. One of the optimization routines of the computing centre (The Univ e r s i t y of B r i t i s h Columbia) was u t i l i z e d . The optimization was c a r r i e d out i n a number of successive stages. At each stage the optimal values of the parameters are used i n evaluating the contribution of each of the terms i n Equation (D-10). The contribution of a given term, k, to the r e s i d u a l sum of squares Is then obtained from N d e k = J / k i ^ K - ^ - fcki] where t i s the contribution of term k to a 0 for the data point i . -434-The terms with very small values of e are dropped out and a new optimization performed based on the remaining terms. Through this successive-optimization scheme, the number of para-meters was gradually reduced to 15 and the fin a l 'best f i t ' obtained in the form 2 „ , coo,-,, 140.065851 354.389745 2 2 7 • 5 1 2 8 4 7 T m r i o ± = 213.592534 i W i u ± , l r „, 10.528959 621.8192327 r, . , + » [-97.103698 + • + = 423.7367151Anw. J T L to 2 i J mri i 1 r o , 26.6634689 74.2574967 , , o n , c i o o n n o n + 1-3.6764290). + ; + 329.1518209 Jlnui, T 2 1 «°i co2 1 mri i i n M O M K A C 1 711.46316797£nT . + 1 [0-333633645 _ 5 9 . 2 9 8 8 9 5 4 £ ] + mri T 3 / " l 1 to2 mri i Out of the 23 compounds for which data were collected, 20 were used in the parameter f i t while three were reserved for the purpose of testing the correlation. oL To test the developed method, values of — — were generated for 11 systems using the three methods: Equation (2-9), Equation (2-10), and Equation (D-8) with a computed from Equation (D-12). The 11 systems included eight of the compounds that were used in obtaining the a-correlation as well as the three that were not used. The results for each compound were generated over a temperature-range of 160K symmetri-cal about the normal melting point. The results from Equations (2-10) and (D-8) were analyzed to yield their fractional deviations from those - 4 3 5 -of Equation (2-9), according to the relationship. - „, . , . „, f° ratio for Eq.(2-10) or (D-8) . fractional deviation = a—^ i ' - 1 f° ratio for Eq.(2-9) Two out of the eight compounds involved in the parameter f i t were found to give worse results with the proposed equation than with the truncated equation. Of the three newly-Introduced compounds, one was worse with the proposed method - and i t was terribly so. A graphical presentation of the results for three compounds drawn from the f i r s t class of compounds is shown in Figure (D-l). The abscissa is a temperature-deviation scale referred to the normal melting point. The compound for which the proposed equation performed the worst in this class is included. A similar presentation is made in Figure (D-2) for the three compounds in the second class. There i s , of course, no doubt that the poor quality of the data employed in this study has seriously impaired the results, not only by affecting the a-correlation but also by yielding very faulty 'true' a values from Equation (2-9). Be that as It may, the proposed equation i s the ultimate loser, for there Is no sound basis for commending i t to would-be patrons. So much for an unsuccessful effort. »• Deviation of Temp from normal melting point f ° Fig D-1:Comparison of errors in for three systems included in a correlation fit f s 0.4 c g g '> CD T J O C o '£ - 0 . 2 o - 0 . 4 -0.6 -0.8 •80 -70 -60 — i — -50 Legend: Truncated equation Proposed equation Roman numerals denote compounds -40 -30 -20 -10 0 10 20 30 40 50 Deviation of Temp.from normal melting point 60 70 f° Fig D-2: Comparison of errors in - r j - for three systems not included in a correction fit 80 -438-APPEHDIX E SOURCES OF DATA Table E-l below contains the source references for the various data employed in this work. Table E - l : Source references for data employed In this study Data types Data sources Acentric factors; Constants for vapour-pressure relation; C r i t i c a l constants; Dipole moment; molar volume. Perry and Chilton (1973); Prausnitz et a l . (1967); Reid et a l . (1977). Association Constant. Prausnitz et a l . (1967). Ideal-gas heat capacity constants; Normal boiling point; Normal melting point. Perry and Chilton (1973); Reid et a l . (1977); Washburn (1929). Heat of fusion. Perry and Chilton (1973); Washburn (1929). UNIQUAC surface and volume parameters. Prausnitz et a l . (1980). Wilson parameters Gmehling et a l . (1977); Hudson and Van Winkle (1969); Nagata (1973); Prausnitz et a l . (1967); Sanderson and Chien (1973); Weatherford and Van Winkle (1970); Willock and Van Winkle (1970). NRTL parameters Guffey and Wehe (1972); Mertl (1972); Nagata (1973). UNIQUAC energy parameters Anderson and Prausnitz (1978); Prausnitz et a l . (1980). Solid-liquid equilibrium information. Donnelly and Katz (1954). Distillation-unit specifications for system DB. Eckert and Hlavacek (1978). Equilibrium information on Water-Benzene-Ethanol system. Mauri (1980).
- Library Home /
- Search Collections /
- Open Collections /
- Browse Collections /
- UBC Theses and Dissertations /
- Computational algorithms for multicomponent phase equilibria...
Open Collections
UBC Theses and Dissertations
Featured Collection
UBC Theses and Dissertations
Computational algorithms for multicomponent phase equilibria and distillation Ohanomah, Matthew Ochukoh 1981
pdf
Notice for Google Chrome users:
If you are having trouble viewing or searching the PDF with Google Chrome, please download it here instead.
If you are having trouble viewing or searching the PDF with Google Chrome, please download it here instead.
Page Metadata
Item Metadata
Title | Computational algorithms for multicomponent phase equilibria and distillation |
Creator |
Ohanomah, Matthew Ochukoh |
Publisher | University of British Columbia |
Date Issued | 1981 |
Description | This work has two major objectives: (1) To develop reliable, stable, easily-programmable and fast computational algorithms that would apply to process operation and design. (2) To determine the best algorithms for specific operations through comparative studies. The study covers the following areas: (1) Isothermal phase equilibria in up to four phases — one vapour, two liquid and one solid — with emphasis on vapour-liquid, liquid-liquid, liquid-solid and vapour-liquid-liquid systems. (2) Sensitivity analysis in vapour-liquid equilibria. (3) Saturation-point calculation methods. (4) Adiabatic vapour-liquid equilibria. (5) Conventional equilibrium-stage distillation-unit calculations. The study deals with multicomponent systems and, except where constrained by lack of information, all nonidealities are rigorously accounted for. The phase-equilibria studies embody both mass-balance and free-energy-minimization methods and some of the algorithms are, like the sensitivity-analysis study, based on geometric programming. Vector projection methods, for accelerating multivariate successive-substitution iteration, and a quadratic form of Wegstein's projection method have been developed and successfully applied. The saturation-points study includes three interpolation methods — regula falsi and quadratic interpolations and a dynamic form of Lagrange interpolation — a quasi-Newton formulation and the generally applied Newton and Richmond methods. The results favour the interpolation methods. For adiabatic-flash and distillation-unit calculations, algorithms employing two-dimensional Newton-Raphson, BP-partitioning and SR-partitioning methods have been developed. Methods for reducing equilibrium-ratio calculation to once per iteration per stage in the first two classes and for reducing enthalpy evaluation In the third class, have also been developed. For every problem-type, relevant algorithms have been applied to a wide class of systems and compared. However, the lack of data excluded any applications on solid-liquid-liquid-vapour equilibria and on wide-boiling distillation. |
Subject |
Phase rule and equilibrium Algorithms |
Genre |
Thesis/Dissertation |
Type |
Text |
Language | eng |
Date Available | 2010-04-15 |
Provider | Vancouver : University of British Columbia Library |
Rights | For non-commercial purposes only, such as research, private study and education. Additional conditions apply, see Terms of Use https://open.library.ubc.ca/terms_of_use. |
DOI | 10.14288/1.0058997 |
URI | http://hdl.handle.net/2429/23665 |
Degree |
Doctor of Philosophy - PhD |
Program |
Chemical and Biological Engineering |
Affiliation |
Applied Science, Faculty of Chemical and Biological Engineering, Department of |
Degree Grantor | University of British Columbia |
Campus |
UBCV |
Scholarly Level | Graduate |
AggregatedSourceRepository | DSpace |
Download
- Media
- 831-UBC_1982_A1 O52.pdf [ 16.77MB ]
- Metadata
- JSON: 831-1.0058997.json
- JSON-LD: 831-1.0058997-ld.json
- RDF/XML (Pretty): 831-1.0058997-rdf.xml
- RDF/JSON: 831-1.0058997-rdf.json
- Turtle: 831-1.0058997-turtle.txt
- N-Triples: 831-1.0058997-rdf-ntriples.txt
- Original Record: 831-1.0058997-source.json
- Full Text
- 831-1.0058997-fulltext.txt
- Citation
- 831-1.0058997.ris
Full Text
Cite
Citation Scheme: