You are on page 1of 4
Partial Derivatives of Thermodynamic Properties Introduction It is generally recognized that the cost of single- or multi= stage, multicomponent equilibrium calculations is dominated by the requirement for evaluation of thermodynamic properties from rigorous and fairly complex models. This is particularly severe for nonideal mixtures, where conventional simulation, methods based on the assumption of ideal behavior require a substantial number of iterations to converge. Various alternatives have been proposed in order to reduce the cast of simulation and the numberof iterations required, the ‘most important being: 1. The use of Newton's method with either analytical or numerical derivatives (Naphtali and Sandholm, 1971; Fredens- lund et al., 1977; Christiansen etal, 1979; Michelsen, 1982). 2, Quasi-Newcon methods, where information from pas iter- ations is used to bulld approximations to the Jacobian (Boston and Briat, 1978; Gallun and Holland, 1980; Lucia and Mechiei- to, 1983; Westman et al., 1984) 3. Approximation with “local” simple models, in which the parameters are adapted to the rigorous model during the course ‘of calculation (Chimowiteh et al., 1983). In the majority of cases Newlon’s method is superior with regard 10 robustness and the numberof iterations required, but the alternative methods will often be less time-consuming than ‘Newton's method if numerical differentiation is used to obtain the required derivatives, Analytical derivatives are generally not considered a possibility as they are claimed to be unavailable in physical properties subroutines or difficult and expensive 10 evaluate ‘Superfically, these arguments are convincing, ané also in earlier work from this department numerical éifferentiation (Fredenslund etal., 1977) oF fairly complex expressions for na- lytical derivatives (Christiansen et al, 1979) have been pro- posed. Yet, the underlying thermodyaamic structure in all cases ‘we have encountered permits fairly simple and inexpensive eval- uation of the needed derivatives. The aim of this note isto pro- vide methods of evaluation and expressions for the required derivatives, and to demonstrate that their cast for a wide range ‘of currently used models is far smaller than is commonly, assumed, AICHE Journal August 1986 [. L. Michelsen, S¥egen Mollerup ‘notte for Kemitokri« 1DK-2800 Lyngby, Denmark, ‘Thermodynamic Properties for Process Simulation ‘The thermodynamic property routines required depend on whether, as in most low-pressure applications, an activity coefi= cient model is used for the liquid phase, or whether an equation ‘of state is used for both fluid phases ‘When activity coefficient models are used, nonideality in the ‘vapor phase is usually of minor importance, and vapor phase thermodynamics is usually described using the ideal gas law or the virial equation (Prausnitzetal., 1980). The dominant source of nonideality isthe liquid phase, and current activity coefficient models of widespread use comprise the Wilson equation (Wile son, 1964), the NRTL equation (Renon and Prausnitz, 1968), the UNIQUAC equation (Abrams and Prausnitz, 1975), and the UNIFAC group contribution method (Fredenslund et al., 1975, 1977). The partial derivatives of interest are the composi= Hon and temperature derivatives of the activity coefficients Molar excess enthalpies are ia turn obtained from the tempera- ture derivatives of the activity coeficients. For high-pressure calculations, nonideality in both phases is ‘of importance, and most often thermodynamic properties for both fluid phases are obtained from the same equation of state Cubic equations of state like the RKS equation (Soave, 1972) and the Peng-Robinson equation (Peng and Robinson, 1976) are ‘widely used, but newer and much more complex equations like the GC-EOS (Skjold-Igrgensen, 1984) and the random /non- random equation of state (Mollerup, 1985) have recently been posed. For equations of state, Newtonlike methods require partial composition derivatives of component fugacity coet- cients with respect to composition end temperature. Again, the ‘molar residual enthalpies are obtained from the temperature Aerivatives of the fugacity coefficients, Activity Coefficient Derivatives ‘To develop expressions for activity coefficients and their com- position derivatives, we write the model expression for the total excess Gibbs energy, a, replacing mole fractions x, by mole numbers m,, The total excess Gibbs energy must of course be a homogeneous function of degree one in mole numbers. Activity Vol. 32, No.8 1389 coefficients are then found from 2 (na won ,, and theie partial compesition derivatives are found by repeating the differentiation ‘As a simple, illustrative example, take the Wilson (1964) equation, for which v & e tu) ® with 8 ey (7A sy Bel 2) o where vy and Ai ars the parameters ofthe equation We define B= Dmky “ and obiain oe Gr = HE ~ —Somln(Eafn) © Differentiation with respect to m yields = In Ein) ~ LmsulE, ‘and, repeating the differentiation, Ca. Reintroducing mole fractions and defining a « yield the following simple expressions Dew ny-t~ toy, ® and “(2 | st get Davey (10) ny re As far as the effort i concerned, each element requtes rnuliptications fron N-component into (the product yeu it tlready available from the calculation of In). The complete tmatrix thas requires about 0.5? maltipiations, since we ean take advantage of symmetey (3 ,/dn,~ dln ,/@n) Temperature derivatives can te obiained by straightforward 1390 August 1986 differentiation ofthe activity coefficient expressions, i.e on ay wih «a and an Equation of State Models Relations for the fugacity coefficients are derived from the total residual reduced Helmbolz energy, AGT pe a eee f 4) where Vis the totel volume The expression are: a Py. weedume mS) as jain) _(aat af), (SS). and ce a ‘The differentiation of A* at constant total volume is un- problematic, and although compact expressions forthe fugacity coefficient derivatives canrot conveniently be formulated, very rapid evaluation is normally possible. Examples and further details are given by Michelsen (1981). ‘We can finally mention that the fugacity coeficient expres- sion for the virial equation permits very simple composition dif- ferentiation. In the virial equation fugacity coefficients are ziven by Ing ~ 22 bare ~ O° a8) were m-ST hom BOE ay Vol 32, No. ANCA dour ‘Table 1. Execution Time to Caleulate Coeficients and Derivatives* Time, ms Moc! “Aatvity oF Temperatare Compson Equation Fuga Derivatives Derivatives ‘Witkon 5 7 09.0.4)" 16(0.65)"* 5 209 50 (0x8) 2006) RTL 5 20 130485) 25 (050) 5 349 1010 (040), 08) SRK 5 29 09045) 12@60) 5 4 4.40.60) acy Rasdom/nearando 5 120 25(0.20) 540043) is 150. 199025) 50.0 (0.80) “SGaleaason by BM 308), WATFIV compile, ‘Neon epee pve ime fr enuatin of iain lat that fer eit fap nein oly ‘The composition derivatives are (tt) ryan en an, Results ‘Table | gives computation times for activity coefficients and their derivatives for the Wilson equation and the NRTL equa- tion, and, similarly, Fugacity coefficients and derivatives forthe SRK equation and, as an example of a more complex model, the random/aonrandom equation of state, The UNIQUAC equ ton and the UNIFAC equation have also been tested. For UNT- QUAC, results are almost identical to those with the Wilson equation, white times for UNIFAC are comparable to those for NRTL. Conclusion ‘The results given here indicate that analytic derivatives of fugacity and activity coefficients can be evaluated for a fraction of the cost required for aumerical evaluation. The relative ‘expense of evaluating derivatives does not vary greatly with the complexity of the model, although it seems that this relative ‘expense is smallest for the more complex model. ‘When new simulation algorithms are evaluated relative to [Newton's method or other second-order methods, « comparison where one Newton step is equated to N + 1 cals of a simple, physical properties routine is unfair and unrealistic. A more appropriate cost factor to associate with evaluation of deriva- tives seems to be 1.52.5, depending on the number of compo- ‘ents in the mixture Notation AY = reduond residual Heil encrey, Ea. 14 5p = cote of teva equation, By. 18 E> dined in eq (P= lar eet Gibbs eerny tenncain a 3 4} componett of surimation nce, 12D veto of molar aroun fn mito 2 tana amount of eorponent = total amount of molest mixare [NS nomber component in mitre = pres Ro gurconstan, 7 shee temperature 1 parmetr of ison equation AICHE Jounat ‘August 1986 ¥ = tla volume of mintuee s.91 = male fraction of eomposent ( Greek letters “= att cota, component ca fined ing 8 {8\, = parameter of Wikon equation ‘y= defied in Eg. 3 oi deine in Eq 8 3: aga eofcen, component Literature cited ‘Abrams, D.S, and J. M. Prausnit, “Statistica! Thermotynamics of Liquid Mixtures: A New Expression forthe Excess Gibbs Energy of Partly or Completely Misibe Systems." AICAE J. 21,116 (1975), Boston, J. F_and H. 1. Bret, “A Radically Different Formulation ad Solution ofthe Single-Stage Fash Problem,” Comput. Cher. Bag, 109 1978), CChimowitz,E-HL etal, "Local Models for Representing Phase Bgulib~ tia in Multicompencat Nonideat Vapor Liquid and Liguid-Liguid Systems, I: Thermodynamic Approximation Functions Ind. ng Chem. Process Des. ev, 22,211 (1383). ‘Cusiniansen, LJ M. L: Michelsen, and Aa. Fredenshund,"Naphtali- ‘Sandhoin Diniaton Calculations for NGL Mixtures Near the Crit ical Region," Comput, Chem, Eng 3, 535 (1979). Fredeaslnd, Aa, J. Gmebling, and . Rasmssen, Vapor Liguld Eg Tbr Using UNIFAC, Blevier, Amsterdam (197). Fredentlnd, Aa. R.L. Jones, and J. M, Prauseitz, “Group-Contibu- tion Esfisation of Activity Cocficients in Nonideal Lignid Mix tore,” AICHE J. 21, 1,086 (1975). Gallun, Sand C.D. Holland, "A Modification of Broyden's Method for the Solution of Sparse Systems, with Application 10 Dsilation robleris Deeribed by Noaidea! Thermodynamic Functions." Com. ‘put. Chem Eng. 4, 93 (1980). Leia, A, and S. Machietio, “A New Approach othe Approximation ‘of Quantities involving Physical Proprtes Derivatives in Equation- Orietod Process Design,” AICHE J, 28,705 (1983) Micheien, M. I, "Partial Derivatives of Thermodynamic Properties ‘rom Equation af State," Report SEP 5109, Instill for Kemitek- nik, Lyighy, Denmark (1985). "The Isthermal Fash Problem, 1k Phase Split Calculation, Fluid Phate Buti. 8 2 (1982) “Molerup.2, "Correlation of Gas Sotabilites in Water and Methanol at High Pressure" Fluid Phase Equilb, 22, 138 (1983). ‘Naphtai, LM. and D. P. Sandholm. "Multicomponent Seperation Caleulations by Linearization, AICHE 4,1, 148 (1971) eng, D. ¥. an D. B. Robinson, “A New Twe-constant Equation of “Ste” Ind. Eng. Chem, Funda, 15, 39 (1970) Prausnita, 3 £1 aly Computer Calculations for Multicomponent Va (or-Liguid and Liguid-Liguld Equilibria, Prentice-Hall Englewood ims, N5 (1980) ‘Vol. 32, No.8 1391 enon, H., and J. M. Prausnit, “Local Compositions in Thermaay- namie Excass Funciions for Liquid Mistures," AICAE J.. 14, 135, (368) Soave, Gu, “Equilibrium Constents from # Modified Reslich-Kwong Equation of State” Chen. Eng. Sct, 27 1199 (1972) ‘Skjold-Igensen, S., “Gas Solubility Calenlations. : Application of a ‘New Group-Contrbution Equation of State" Fluld Phase Equi 16,317 (0988). 1392 August 1986 Vol, 32,No. 8 Westman, KR A. Lucia, and D. C. Miler, “Pash and Disilaton Calculations by a Newtoalke Method," Comput. Chem Eng. 8 29 Gis8e) ‘Wilton, G. M,“Vapor-Liguid Equilibrium, XI: A New Expeesion for the Beeess Free Energy of Mising," J. Chem Soc, 86 127 (1964). Mansecrpt received Now. 2,198 AICKE Journal

You might also like