1991 - an efficient implementation of newton's method for complex nonideal chemical equilibria (h....

Upload: telomares-san

Post on 06-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 1991 - An Efficient Implementation of Newton's Method for Complex Nonideal Chemical Equilibria (H. Greiner)

    1/9

    Comp uler s th em . En gng, Vol. 15, No. 2 , pp. 115-123, 1991P r i n t e d i n G r e a t B r i t a i n .All r i g h t s e se rv ed 0098-1354/91 $3.00 + 0.00C o p y r i g h t0 1991 P e r g a m o nP r e s sp lc

    AN EFFICIENT IMPLEMENTATION OF NEWTONSMETHOD FOR COMPLEX NONIDEAL CHEMICAL

    EQUILIBRIAH . G R R I N E R

    P h i li p s F o r s c h u n g s l a b o r G m b I -I , We i s s h a u s s t r a h e , D -5 1 A a c h e n . G e r m a n y(Received 250ctober 1989;f ina f rev is ion received 29 Au gus t 1990; r e c e i v e d f o r p u b l i c a t i o n ISOcrober 1990)Ah s t r a e t -An ex ac t Newt o n met h o d fo r t h e ca l cu l a t i o n o f ch em i ca l eq u i l ib r i a i n v o l v i n g n o n i d ea l so lu t i o np h a s e s is d e r i v e d . It g e n e r a l iz e s t h e c la s s i c a l B r i n k l e y -N a s a -R a n d a p p r o a c h f or s y s t e m s w i t h i d e a l s o lu t i o np h a s e s . Co m p a r e d t o e xi s t in g a lg o r i t h m s i t o ff e r s g u a r a n t e e d l oc a l q u a d r a t i c c o n v e r g e n c e t o n o n -d e g e n e r a t e e q u i l ib r i a a n d c o m p u t a t i o n a l e f fi c ie n c y f or c o m p l e x s y s t e m s w i t h m a n y s p e c i e s .

    1 . INTRODUCTIONT h e m o d e l l in g o f c o m p l e x m u l t ip h a s e c h e m i c a l e q u i -l ib r i a i s f u n d a m e n t a l t o t h e u n d e r s t a n d i n g of m a n yn a t u r a l a n d t e c h n o l o g ic a l p r o c e s s e s [ a g e n e r a l i n t r o -d u c t i o n i s g i v en in S mi t h an d M i ssen (19 82 ) an dGau t am an d S e i d e r (1 97 9) ]. Th e s i mu l a t i o n of suchsy s tems r eq u i r e s e ff ic i en t an d r e l i ab le a lg o r i th m s f ort h e co m p u t a t i o n o f t h e i r e q u i l ib r i u m s t a t e s , w h i c ho ccu r a s th e min imu m o f th e sy s t ems f r ee en e r g y . Fo rc o m p l ex s y s t e m s , w h i c h m a y i n v o lv e a l a r g e n u m b e ro f ch emica l sp ec ie s ( ma in ly d u e to th e g as p h ase ) an da c or r e s p o n d i n g ly l a r g e n u m b e r o f co n d e n s e d p h a s e s( in c lu d in g so lu t io n p h a ses ) , co mp u ta t io n a l p r o b lemsa r i s e fr o m t h e s h e e r n u m b e r o f v a r i a b le s , t h e n e c e ss i t yt o d e t e r m i n e t h e s t a b l e p h a s e s e t ou t o f a m u l t i t u d eo f p os s i b le p h a s e co m b i n a t i o n s a n d t h e n o n i d e a ln a t u r e o f t h e s o lu t i o n p h a s e s (s e e e .g . S m i t h a n dMissen , 1982). In Gre iner (1988b) w e ha ve pr esen teda n a l go r i t h m w h i c h a l l o w s t o o b t a i n a c l o se e s t i m a t eo f t h e f r e e e n e r g y m i n i m u m (i n c lu d i n g t h e s t a b l ep h ase se t ) e ff ec t iv e ly . On ce th i s e s t ima te i s av a i l ab le ,i t can b e r e f in ed b y th e ap p l i ca t io n o f Newto n sm e t h o d , w h i c h i s k n o w n t o c on v e r g e q u a d r a t i c a ll y t oth e ex ac t so lu t io n . B u t f o r co mp lex sy s t e ms th ea p p l i ca t i o n o f N e w t o n s m e t h o d i s h a m p e r e d b y t h efo l lowing fac ts :1 . Th e ex ac t Newto n co r r ec t io n h a s to b eo b ta in ed f r o m a sy s t em o f (n -t m) l in ea r eq u a t io n s(t h e N e w t o n e q u a t i o n s ) , w h i c h a r i s e fr o m t h el in e a r i za t i o n o f t h e n o n l in e a r e q u a t i o n s d e f in i n g t h ee q u i li b r i u m (h e r e n i s t h e t o t a l n u m b e r o f c om p o n e n ts p e c i es a n d I )? i s t h e n u m b e r o f c h e m i c a l e l e m e n t sd e f in i n g t h e s y s t e m ). T h e i r s o l u t i on m a y b e c om p u t a -t io n a l ly ex p en s iv e o r p r ac t i ca l ly imp o ss ib le f o r co m-p lex sys t em s in v o lv in g m an y sp e c ie s .2 . I n t h e c a s e t h a t o n l y i d e a l s o lu t i o n p h a s e s a r ein v o lved , th i s co mp u ta t io n a l p r o b lem can b e av o id edb y e l imin a t in g th e co r r ec t io n s o f t h e sp ec ie s mo len u m b e r s f r o m t h e N e w t o n e q u a t i o n s . T h e Ne w t o nc o r r e c t io n c a n t h e n b e ob t a i n e d fr o m t h e s ol u t i o n o f

    (m +p ) l in e a r e q u a t i o n s fo r t h e i n c r e m e n t s o f t h eL a g r a n g e m u l t i p li e r s a n d t h e t o t a l m o le n u m b e r s f o re a c h p h a s e ( p i s t h e n u m b e r o f s o lu t i o n p h a s e sp r e s e n t a t e q u i li b r i u m ) . T h i s m e t h o d i s t h e b a s i s fo rth e so ca l l ed B r in k ley -Nasa - R an d ap p r o ach [ seeSmi th an d Missen ( 19 82 ) C h ap . 6 1 to th e co mp u ta t io no f eq u i lib r i a wi th id ea l p h ases . To ex ten d th i s me t h o dt o s y s t e m s w it h n o n i d e a l p h a s e s on e a p p r o x i m a t e sth e ma t r ix o f seco n d d e r iv a t iv es o f th e fr ee en e r g ie sb y t h e i r i d e a l p a r t s a n d p r o c e ed s a s i n t h e B r i n l c le y -Nasa - R an d a lg o r i th m ( fo r th e f ir s t d e r iv a t iv es th en o n i d e a l v a l u e s a r e u s e d ) . T h i s in t e r m e d i a t e ap p r o ach [ cf . Smi th an d Missen , ( 19 82 ) C h ap . 7 j h a sb e e n a d o p t e d i n a n u m b e r o f e q u i l i b r i u m c o d e s( Er ik sso n an d R o sen , 1 97 3; E r ik sso n an d Hack , 1 99 0;Gau t am an d Se id e r , 1 97 9) . B u t a l r ea d y s imp lee x a m p l e s fr o m t h e r m o d y n a m i c s d e m o n s t r a t e t h a tt h i s m e t h o d s u f fe r s fr o m s e v e r e c o n v e r g e n c e p r o b -l e m s fo r s y s t e m s w i t h n o n i d e a l p h a s e s e v e n i f a v e r yc lo se e s t ima te o f t h e t r u e so lu t io n i s av a i lab le [ cf . f orinst an ce Michelsen (1982) p . 291 . The pr oblem of( p r ac t i ca l ) n o n co n v er g en ce o f th e id ea l ap p r o x i -m a t i o n m e t h o d i s a k i n t o t h e w e ll -k n o w n c o n v er -g e n c e p r o b le m s fo r s t e e p e s t d e s c e n t m e t h o d s (G i llan d Wright , 1981).I n t h i s p a p e r w e s h o w t h a t i t i s p o s s ib l e t o i m -p l e m e n t t h e B r i n k l e y-N a s a -R a n d a l g or i t h m f o r n o n -i d e a l s y s t e m s a s a n e x a c t Ne w t o n m e t h o d i n w h i c ht h e s e c o n d d e r i v a t i ve s o f t h e f r e e e n e r g i e s a r e t a k e nin to acco u n t wi th o u t ap p r o x ima t io n . Sp ec i fi ca l lyw e p r o v e t h a t t h e e x a c t N e w t o n e q u a t i o n s c a n b er e d u c e d t o ( m +p ) l in e a r eq u a t i o n s p r o v i d e d w e a r ed e a l i n g w i t h a n o n d e g e n e r a t e e q u i l i b r i u m ( f o rd e g e n e r a t e e q u i l i b r i a , s p e c i a l m e a s u r e s w h i c h a r ed e s c r i b e d i n S e c t io n 5 h a v e t o b e t a k e n ) . T h e a r g u -m e n t i s b a s e d o n t h e ob s e r v a t i on t h a t t h e m a t r i x ofseco n d d e r iv a t iv es o f th e mo d i f i ed f r ee en e r g ie s :

    d (n ,,..., n ,)=G(n,,..11 5

  • 8/3/2019 1991 - An Efficient Implementation of Newton's Method for Complex Nonideal Chemical Equilibria (H. Greiner)

    2/9

    116 H. GA

    o f a s t a b l e p h a s e w i t h c om p o n e n t m o l e n u m b e r s(n,, . . . , n,) an d f r ee en e r g y G( n ,, . _ , n,) m u s t b ep o s i t iv e - d e f in i t e f o r r easo n s o f th e r mo d y n amics tab i l i t y .

    T h e a d v a n t a g e s o f t h e s ch e m e a r e o b v io u s : a s w ea p p l y N e w t o n s m e t h o d e x a c t ly w e h a v e gu a r a n t e e dq u a d r a t i c l o c a l co n v e r g e n c e . Ye t t h e co m p u t a t i o n a le ffo r t r e m a i n s m a n a g e a b l e e v e n fo r t h e m o st c o m p l e xs y s t e m s .Th e p r esen ta t io n i s o r g an ized a s fo l lo ws : in Sec t io n 2w e g iv e t h e m a t h e m a t i c a l f or m u l a t i on o f t h e p r o b -l em. Sec t io n 3 d i scu sses th e ap p l i ca t io n o f Newto n sm e t h o d t o t h e s o lu t i o n o f t h e n o n l i n e a r e q u i l ib r i u meq u a t io n s . A mo d i f i ed f o r m o f th e eq u i l ib r iu me q u a t i o n s i s i n t r o d u c e d a n d i t i s d e m o n s t r a t e d t h a tt h e i n c r e m e n t s o f t h e m o le n u m b e r s o f e a c h s o lu t i o np h a s e c a n b e e l im i n a t e d f r o m t h e c or r e s p o n d i n gNewto n eq u a t io n s . Var io u s s t r a t eg ie s f or th e so lu t io no f t h e l i n e a r i z e d e q u a t i o n s a r e d i s c u s s ed .Q u e s t i o n s r e l a t e d t o t h e n u m e r i c a l i m p l e m e n t a t i o no f ou r m e th o d a r e co n s id e r ed in Sec t io n 4. F in a l lyt h e r e i s a c on c l u s i on a n d Ap p e n d i c es g iv in g t h em a t h e m a t i c a l p r o o fs a n d a n e x a m p l e h i g h li g h t i n g t h ew e a k n e s s e s o f t h e i d e a l a p p r o x im a t i o n m e t h o d .

    2. MATHEMATICAL FORMULATIONC h e m i c a l e q u i li b r i a a r e d e fi n e d b y t h e m i n i m u m o f

    th e ch em ica l sy s t em s f r ee en e r g y , wh ich d ep en d s o nt h e m o l e n u m b e r s o f e a c h i n d i v id u a l c h e m i c a l s p e c i e si n t h e s y s t e m .

    I n a sy s t em w i th p d i ff e r en t p h ases ( i = 1 , . . . , p)t h e c h e m i c a l e q u il ib r i u m p r o b l e m c a n b e fo r m u l a t e das fo l lows:

    G(d, . . . , n ) = k G(n/) = m in , ( la)i= 1s u b j e c t t o t h e r e s t r i c t io n s (m a s s b a l a n c e s ) :

    Rn= kRd=b d>O, j=l,..., p. ( lb)i=,H e r e t h e fo ll ow i n g n o t a t i o n i s a s s u m e d :

    n = (n I ] . I t i s expr essed as:

    G(n,, . . , n,) = 2 q{pp + ln[ai(x)]}.i= I3.

    T h e m a t r i x (RI, . . . , Rp) h a s m a xi m a l r a n k .Th e f u n c t io n s C J i = 1 , . . . ,p a r e h o m o g e n e o u sa n d c a n b e w r i t t e n a s:

    G-i@,..., n ,) =H e r e G j i s t h e m o la r fr e e e n e r g y o f t h e jt h p h a s e(j = 1 ...,P ).T h e f u n c t i o n s :

  • 8/3/2019 1991 - An Efficient Implementation of Newton's Method for Complex Nonideal Chemical Equilibria (H. Greiner)

    3/9

    I mp lem en t a t io n f Newt o n s me t h o d fo r ch em ica leq u i l ib r i a 11 7a r e s t r i c t ly co n v ex ( i .e . t h e p h a ses Gi a r e s t ab le )o r e q u i v a l e n t l y t h e m a t r i c es V21?J a r e p o s i t iv e -d e f in i t e w h e n r e s t r i c t e d t o t h e s u b s p a c e s :

    -ttinvp= v.ER~~)( c oi=~ _i= 1 1

    As a c o n s e q u e n c e o f t h e s e a s s u m p t i o n s t h e f o ll ow -i n g s t a t e m e n t s o b t a i n :L e m m a 1

    (a) V*Q(ni)n j = 0 for j = 1, . . ,p ;(b ) t h e m a t r i c e s V2GJ(nJ) a r e p o s it iv e semid e f in i t e

    forj=l,...,p.A f or m a l p r o o f o f Lemm a 1 i s p r o v id ed in Lemm a

    A2 in Ap p en d ix A. We r em ar k th a t ( a ) i s a d i r ec tc o n s e q u e n c e o f t h e h o m o g e n e i t y o f t h e G i a n d i sk n o w n a s t h e G i b b s-D u h e m r e l a t i o n i n t h e c h e m i c a ll i t e r a t u r e .T h e o p t i m a l i t y c o n d i t i on s fo r a m i n i m u m o f p r o b -l em ( 1 ) a r e :

    VG(n) + Rw = 0 or VGj(n j) + &w = 0forj=l,...,p (2a)

    RN-b=0 or k RJnJ-b=O. C=)j=l

    H e r e R d e n o t e s t h e t r a n s p o s e o f t h e m a t r i x R.I n th i s in v es t ig a t io n we wan t to a n a ly ze Newto n s

    me t h o d f or t h e so lu t io n o f n o n l in ea r eq u a t io n s ( 2) .As e x p la i n e d a b o v e w e m a y s u p p o s e t h a t a g o o des t ima te o f th e so lu t io n i s a l r ea d y av a i l ab le . I np a r t i c u la r w e a s s u m e t h a t t h e p h a s e s oc cu r r i n g a te q u i li b r iu m a r e k n o w n a n d t h a t t h e p u r e p h a s e s h a v eb e e n e l im i n a t e d fr o m t h e p r o b l e m . H e n c e a l l t h eph as es G(j = 1, . . . ,p ) i n p r o b lem ( 1) a r e so lu t io np h a s e s .

    L e t n = (n, _ . ,nP) an d w=(w,,. .. ,w,, ,) de no tean e s t ima te f or t h e so lu t io n o f eq u a t io n s ( 2) . Toi m p r o v e t h i s e s t im a t e o n e l in e a r i ze s e q u a t i o n s (2 )w i t h r e s p e ct t o n a n d w

    OC

    V2G(n)An+aAw= -VG(n)-%%a, Pa)

    VGJ (aJ )AnJ + f@Aw = - VGJ(nJ ) - fiwfor j=l,...,p

    a n dRAn-b-Rn or 2 RJAnJ= b - i R Jn J . (3b)j- 1 j=lI n o r d e r fo r Newto n s me t h o d t o b e ap p l i cab le th el in e a r e q u a t i o n s m u s t h a v e a u n i q u e s o lu t i o n . T h ef ol lo w i n g p r o p o s i t io n s t a t e s t h a t t h i s i s a l w a y s t r u ef or n o n d eg en e r a te eq u i l ib r i a , f or wh ich th e to t a lm o l e n u m b e r s a n d c om p o s i t i on o f t h e p h a s e s a r e

    u n i q u e l y d e t e r m i n e d .

    Pro p o s i t i o n IForGjj=l,... . .p s t r i c t ly co n v ex , th e f ol lo win g

    s t a t e m e n t s a r e e q u i v a l e n t :1 . Th e l in ea r eq u a t io n s ( 3 ) h a v e a u n iq u e so lu t io n

    An a n d A w .2. Th e vector s Rjn j( j = 1, . . . , p ) a r e l in e a r l y i n d e -p e n d e n t .

    3 . Th e eq u i l ib r iu m i s n o n d e g en e r a te , i .e .AfiV*G(n)An > 0 for a l l An # 0 wi t h RAn = 0.Fo r p r o o f see Pr o p o s i t io n Al in Ap p en d ix A.

    P r o p o s it i o n 1 e s t a b l i sh e s t h a t a m i n i m u m i s n o n -d eg en e r a te i f an d o n ly if Newto n s eq u a t io n s f o r th i sm i n i m u m a r e n o n s in g u l a r .

    I f t h e in i t i a l it e r a t e n f or th e so lu t io n o f eq u a t io n s(3) i s feasib le ( i.e . i f it sa t isf ies th e con st r a in ts Rn = b),t h e s a m e i s t r u e fo r a l l su b s e q u e n t i t e r a t e s . I n p a r t i c u -l a r , i f we s t a r t w i th a f eas ib le it e r a t e n t h e c o r r e c t i onAn m a y b e v ie w e d a s t h e s o lu t i o n o f t h e q u a d r a t i cm i n i m i z a t i o n p r o b l e m :

    $ &aV2G (n)An + VG(n)An + G(n) = m i n ,s u b j e c t t o

    RAn = 0.C o n s e q u e n t l y A n m a y b e c o n s id e r e d a s a d e s c e n t

    d i r e c t i on f or p r o b le m ( 1) b a s e d o n a q u a d r a t i c a p -p r o x ima t io n . Th e r e f or e Newto n s me th o d fo r th es o lu t i o n o f e q u a t i o n s ( 2) c a n b e r e g a r d e d a s a m i n i -m i z a t i on m e t h o d w i t h fi x ed s t e p s i z e 1. B u t a s w e a r eo n ly in t e r e s t ed in loca l co n v e r g en ce , t h e d i s t in c t io n i si r r e l ev an t ( fo r Newto n s min im iza t io n me th o d th es t ep s ize co n v e r g es t o 1 ).

    3. SOLUTION STRATEGIES FOR NEWTO NSEQUATIONS

    To ap p ly Newto n s me t h o d t o th e ca lcu la t io n o fn o n d e g e n e r a t e e q u i l ib r i a o n e h a s t o s o lv e t h e s y s t e mo f l in ea r eq u a t io n s :

    (V:;)(;;)=(-;:R:), (4)w i t h ( n + m ) u n k n o w n s . B u t fo r l a r g e s y s t e m s t h ed i r ec t so lu t io n o f th ese eq u a t io n s i s co mp le te ly im -p r a c t i c a l a n d m e t h o d s w h i c h t a k e a d v a n t a g e o f t h esp ec ia l s t r u c t u r e o f th e co e ff ic i en t ma t r ix ( 4 ) a r e ca l l edf or . B as ica l ly th e r e a r e two p o ss ib le ap p r o ach es [ seeGil l an d Wright (1981) Hea th (1978) an d Nash(1985)].NUN s p a c e m e l h o &

    R e p r e s e n t t h e a f fi n e s u b s p a c e :{AnIRAn=b-Rn}

    a s{An = nS + Zd ld n R-},

  • 8/3/2019 1991 - An Efficient Implementation of Newton's Method for Complex Nonideal Chemical Equilibria (H. Greiner)

    4/9

    1 1 8 H. GREINERw h e r e R n = b-RRn a n d Z i s a ( n ,n - m ) m a t r i x . i n A p p e n d i x A ). O u r p a r t i c u l a r c h o i c e h a s t h eM u l t ip l y i n g e q u a t i o n ( 3a ) fr o m t h e le f t w i t h Z a n d a d v a n t a g e t h a t t h e H e s s ia n m a t r i x f o r a n i d e a l p h a s ei n t r o d u c i n g An = n3+ Zd l e a d s t o : i s t r a n s f o r m e d t o d i a g o n a l fo r m ( cf . b e l o w a n d

    @V G)Zd = z[ - VG - (V2 G)n=]. (5a) A p p e n d i x C ).W i t h t h e s t i p u l a t io n t h a t :( N B . Z g = 0 ). A s e q u a t i o n s ( 4 ) a r e a s s u m e d t o b en o n d e g e n e r a t e , t h e m a t r i x aVG)Z i s p o s i t i v e - N =@. j=l , . . . , p , (7 )d e f in i t e ( cf . t h e p r o o f o f P r o p o s i t i o n 1 i n Ap p e n d i xA ). H e n c e ( 5 a ) c a n b e s o l v e d fo r d, w h i c h g iv e s e q u a t i o n s (3 ) c a n n o w b e w r i t t e n a s :An =n+Zd a n d V&(ni) + @W - E j [ l + i0g(Nj) l = 0 ,

    irAw = - (VG)Zd - VG - fiw - (VZG)nJ , (5b) j=l,...,p, @a )(N B . a s Z a n n u l s t h e r i g h t -h a n d s i d e o f t h i s e q u a t i o n ,A w i s w e l l -d e f i n e d .) & r = 5 R = h , ( 8 b )F o r l a r g e s y s t e m s n u l l s p a c e m e t h o d s a r e n o t j - Ip r a c t i c a l a s t h e y r e q u i r e t h e s o lu t i o n o f n -m l in e a r E J n N j = O f o r j = 1 ,...,P* (8~)e q u a t i o n s w i t h a d e n s e m a t r i x . S u c h s y s t e m s c a n o n l yb e s o lv e d i t e r a t i v e l y ( G i ll a n d W r i g h t , 1 9 8 1; N a s h , H e r e Ej d e n o t e s t h e [ s ( j ), I ] m a t r i x w i t h c o n s t a n t1 98 5 ). I n c h e m i c a l e n g i n e e r i n g l i t e r a t u r e n u l l-s p a c e e n t r y 1 ,m e t h o d s a r e t e r m e d s t o i c h i o m e t r i c ( S m i t h a n d E= (1,. . . , ijTEHj).M i s s e n , 1 98 2 ). T h e s e a u t h o r s a l s o d i s c u s s m e t h o d sfo r i d e a l s y s t e m s , w h i ch a r e b a s e d o n s p a r s e a p p r o x i- L i n e a r i za t i o n o f e q u a t i o n s ( 8) le a d s t o t h em a t i o n s t o e q u a t i o n s ( 5 ). e q u a t i o n s :Ra nge spac e m e th oci s

    ANV 2 @( n j ) A n j + i@Aw - Ej 7NJ = -V&i(&) _ aiwT h e s e m e t h o d s r e q u i r e t h a t V 2G i s n o n s i n g u l a r , i .e .i n o u r i n s t a n c e p o s i t iv e -d e f in i t e . I n t h i s c a s e o n e c a nr e w r i t e e q u a t i o n s ( 3 a ) a s :

    + E[l + lo g(N )] j = 1 , . . . ,p . ( 9 a )RAn= -Rn+b, (9b)

    An = (V2G)-L[ - VG(n) - g w - RA W]. (6 4 i?jAB-ANi= - ihj+Nj, j= l , . . ., p . ( 9 c )I n t r o d u c i n g t h i s e x p r e s s i o n in t o (3 b ) g i v e s m E q u a t i o n s ( S C ) s h o w t h a t r e q u i r e m e n t ( 7 ) fo r t h e

    e q u a t i o n s f o r A w : i n i t ia l i t e r a t e is p a s s e d o n t o t h e s u b s e q u e n t i t e r a t e s .T h u s g r a n t i n g ( 7) t h e it e r a t e s fo r e q u a t i o n s ( 9) a n d ( 3 )a r e i d e n t i c a l .

    = -b + Rn - R(V 2G)-[VG(n) + irw]. ( 6 b ) A s t h e m a t r i c e s V 2& a r e p o s i t iv e -d e f in i t e ,A s t h e c o e K i c i e n t m a t r i x o f t h i s s y s t e m i s p o s i t i v e - e q u a t i o n s (9 a ) c a n b e s o lv e d f o r t h e An-kd e f i n i t e , it c a n b e s o l v e d v e r y e f fi c i e n t l y f o r A w . A n j = _ H j @A w _ E j A N JAn c a n t h e n b e o b t a in e d f r o m ( 6 a ). F + c i ,>As a c c o r d i n g t o L e m m a 1 t h e H e s s ia n m a t r i x V2 Gf o r p r o b l e m ( 1) i s o n l y p o s i t i v e , s e m i -d e f i n i t e r a n g e j = 1 , . . . ,p _ ( 1 0 )s p a c e m e t h o d s c a n n o t d i r e c t l y b e a p p l i e d t o t h e H e r e t h e a b b r e v i a t i on s :s o l u t i o n o f e q u a t i o n s ( 3) . T h i s d i ff ic u l t y c a n b ec i r c u m v e n t e d , h o w e v e r , i f w e i n t r o d u c e t h e t o ta l m o l e c j = V & ( n j ) + & w - Ej[ 1 + l o g ( N i ) ] , j = 1 , . . . , p ,n u m b e r s Nj, j = 1 , _ , p o f t h e p h a s e s a s a d d i t io n a l c = ( c . . . , CP),i n d e p e n d e n t v a r i a b le s a n d d e f i n e m o d i fi e d f r e ee n e r g i e s : HI= V2 G(nj)- j = 1 , . . . .p ,

    ~ j ( n j ) = G n + ( ~ n !) l o g ( ~ n :) .H = d i a g o n a l m a t r i x w i t h b l o c k s HI,. . . , HP, a r e

    u s e d . I n t r o d u c i n g e x p r e s s io n (1 0 ) i n t o e q u a t i o n s ( 9b )a n d ( S C ) l e a d s t o a s y s t e m o f (m + p ) l i n e a r e q u a t i on sT h e f u n c t i o n s & h a v e t h e f o l l o w i n g r e m a r k a b l e i n t h e u n k n o w n s A w a n d AN:

    p r o p e r t y , w h o s e p r o o f i s g i v e n i n P r o p o s i t i o n A 2 i nA p p e n d i x A. (R I& )Aw - 5 R HEZj= IPropos i t i on 2

    T h e H e s s ia n m a t r i c e s V2 d-(nJ ),j = 1 , . . . , p a r ep o s i t i v e - d e f i n i t e .

    A s a m a t t e r o f fa c t t h e a d d i t io n o f a n y f u n c t i o n+(Zj= , ni) w i t h a p o s i t iv e s e c o n d d e r i v a t iv e t u r n s G ji n t o a p o s i t i v e -d e f in i t e f u n c t i o n ( se e P r o p o s i t i o n A 2

    = -b+RRn- 5 WWd, Ulct)j -I@H j f i i ) A w _ ( & f i i E / _ N j ) $

    = - -N+ E U - E H j= l , . . ., p . ( l l b )

  • 8/3/2019 1991 - An Efficient Implementation of Newton's Method for Complex Nonideal Chemical Equilibria (H. Greiner)

    5/9

    I mp lem en t a t io n f Newt o n s me t h o d f or ch em ica leq u i l ib r i a 11 9Eq u a t io n s ( 11 ) can n o w b e so lv ed f or t h e Aw an d

    ANj,j = 1,. . . ,p. The c o r r e c t i on s t o t h e m o l en u mb er s An/,j= l , .. . ,p a r e t h e n o b t a i n e d fr o meq u a t io n s ( 1 0 ) .T h e i d e a l a p p r o x im a t i o n m e t h o d p r o c e e d s i n t h es a m e w a y b u t n e g le c t s t h e e x ce s s c o n t r i b u t i o n G fi t oth e f u n c t io n s & . Th u s :

    &(d ) = c n { lo g(?z {)i=lan d t h e r e f o r e th e V*& j - 1 .., p a r e d i a g o n a lma tr ices wi th e n t r ies l /n ! , i = ; ,. . . , s(j) w h i c h c a nr e a d i l y b e i n v e r t e d .

    Def in in g th e (m,p) m a t r i x :B = (RHE, . . . , R PHPW) ,

    t h e (p. p ) - ma t r ixF = d i a g o n a l m a t r i x w i t h e n t r i e s

    s(i)F,=&fi%~--NJ= c Hi ,/-Nj, j-l ,..., p ,j,l=l

    t h e v e c t o r sN=(N,...,NJ ) a n d

    a n dg=(-Nf@n-EHc,...,

    -N + &np - f?PH W),e q u a t i o n s ( 11 ) c a n b e w r i t t e n i n a m o r e c o m p a c t fo r ma s

    T h e e l i m i n a t i o n p r o c e d u r e d o e s n o t n e c e s s a r i l yh a v e to b e ap p l i ed to a l l so lu t io n p h ases . I f f ore x a m p l e o n l y t h e i n c r e m e n t s o f t h e f ir s t t p h a s e sAd, j = 1,. . . , t a r e e l im i n a t e d f r o m e q u a t i o n s ( 9) b ymea n s o f fo r m u la ( 10 ) th e fo l lo win g sy s t em o fe q u a t i on s fo r t h e u n k n o w n s Aw, ANJ, j = 1, . . . , ta n d An+,..., AnP i s o b t a i n e d :

    -j-k 1RJ AaJ = - b + Rn + i R J H J c J , (134J -1 = -b+Rn- k RjHJcJ, fl4a)

    ( i?J HJ RJ )Aw - (@~~Ej - NJ) $ (&Hjgi)Aw + @RJEj _ Nj)=- NJ + fhJ - EJHJd, (13b)

    forj=l,...,tand@Aw + V2GJ(nJ )AnJ = - VGJ (nJ) - f@w, (13~)

    forj=t+l,...,p.On ce t h e va r i ab le s Aw, AN/, j = 1, . . . , t a n d

    AnJ, j = I + 1,. . . ,p h a v e b e e n c a l c u l a t e d f r o mequ at ions (13), th e re ma in in g An, j = 1 , . . . , t a r ed e te r min ed b y eq u a t io n s ( 1 0 ) .

    = -NJ+@nJ-ftJH J cJ, j = 1,. . ..p. (14b)As th e l in ea r sys t em ( 14 ) h a s a sy mmet r i c w-e f fi c i en t ma t r ix , i t c an b e so lved b y a sp ec ia l r o u t in ew h i c h co m p a r e d t o G a u s s i a n e l i m i n a t i o n h a l v e s t h eco mp u ta t io n a l co s t (c f. Do n g ar r a , 1 97 9) . Nu m er ica ld i f fi cu l t i e s a r i se i f t h e co e ff ic i en t ma t r ix in eq u a t io n s

    (14) i s n ea r ly s in g u la r . Acco r d in g to Pr o p o s i t io n 1th i s o ccu r s i f t h e v ec to r s RJnJ, j = 1, . . . ,p b eco me

    As a n e x a m p l e fo r p a r t i a l el im i n a t i o n c o n s i d e r as y s t e m co n s i s t in g o f a g a s p h a s e w i t h m a n y s p e c i esa n d s e v e r a l c o n d e n s e d s o lu t i o n p h a s e s . T h e f r e ee n e r g y G o f t h e g a s p h a s e h a s a d e n s e m a t r i x o fs e c o n d p a r t i a l d e r i v a t i v e s , w h e r e a s t h e m a t r i x o fseco n d p a r t i a l d e r iv a t iv es o f th e mo d i f ied f r ee en e r g yd i s d i ag o n a l ( c f. Ap p en d ix C ) . I n th i s ca se th ee l im i n a t i o n o f t h e g a s p h a s e v a r i a b l e s a lr e a d y l e a d s t oa c o n s i d e r a b l e r e d u c t i o n i n co m p u t i n g c o st fo r t h eso lu t io n o f eq u a t io n s ( 4 ) .

    I n Ap p e n d i x C w e p r e s e n t t h e o p e r a t i on c o u n t sfo r t h e v a r i o u s m e t h o d s fo r s o lv i n g t h e N e w t o neq u a t io n s ( 4 ). To d e te r min e th e mo s t eco n o m ica lm e t h o d f o r a g i v e n p r o b l e m o n e s i m p l y h a s t oe v a l u a t e a n d c o m p a r e t h e op e r a t i on c o u n t s . F o r t h en u l I s p a c e m e t h o d t h e co s t o f p r o v i d in g t h e m a t r i x Z,w h i c h h a s t o b e f or m e d o n l y o n c e , i s d i s r e g a r d e d . Ones h o u l d a l s o b e a r i n m i n d t h e s t o r a g e r e q u i r e m e n t s o ft h e d i r e c t a n d n u l l s p a c e m e t h o d .

    T h e a n a l y s i s s h o w s t h a t f o r n m u c h l a r g e r t h a n mt h e r a n g e s p a c e m e t h o d i s b y f a r t h e m o s t e c on o m i c a lo n e , i n p a r t i c u la r f or s y s t e m s w i t h a l a r g e i d e a l g a sp h a s e . F o r s y s t e m s w i t h n a b o u t e q u a l t o m t h e n u l ls p a c e m e t h o d i s t o b e p r e f e r r e d . I n g e n e r a l t h e c os to f a so lu t i o n m e t h o d d e p e n d s o n n , m,p a n dS(j),j = 1,. . . ,p a n d m o r e d e t a i l s a r e g iv e n i nAp p e n d i x C . F o r s y s t e m s w i t h o n l y a s m a l l n u m b e ro f co mp o n en t sp ec ie s n th e d i f fe r en ce in co s t b e tw eent h e d i r e c t , n u l l s p a c e a n d r a n g e sp a c e m e t h o d i s on l ym a r g i n a l a n d f o r r e a s o n s o f n u m e r i c a l s t a b i l i t y t h ed i r e c t s o lu t i o n m e t h o d i s r e c o m m e n d e d ( cf. H e a t h ,1978).

    4. NUMERI CAL IM PLEMENTATIONT o c a l c u l a t e t h e N ew t o n c o r r e c t io n A w a n dANjfNj, j = 1,. . . ,p one fi r s t h a s t o i n v e r t t h ep o s i t iv e -d e f in i t e ma t r i ces V2 6j f or ea ch p h ase

    j=l,... ,p. T h i s c a n b e r e a d i l y a c c o m p l is h e d b yf ac to r in g each b lo ck b y C h o lesk y s m e th o d . On e t h enh a s t o c o m p u t e t h e c o e ffi c ie n t s of t h e l in e a r e q u a t i o n sf o r Aw an d - ANJ/NJ:

    (RH&Aw + 2 RJ HJ EJj-l

    j = 1

  • 8/3/2019 1991 - An Efficient Implementation of Newton's Method for Complex Nonideal Chemical Equilibria (H. Greiner)

    6/9

    120 H . GREINERn e a r l y l in e a r l y d e p e n d e n t . I n t h i s c a s e on e s h o u l d t r yt o d e t e r m i n e p h a s e s j i, . . . , jr s u c h t h a t t h e v e c t or s :

    R &I ,..., R ir i r 3f or m a we l l-co n d i t io n ed b as i s o f th e l in ea r sp aced e te r min e d b y th e R n j , j = 1 , . . . ,p _ T h e e q u i l ib r i u mo f t h e s e p h a s e s t h e n f u r n i s h e s L a g r a n g e m u l t i p l ie r s w ,f r o m w h i c h t h e c o m p o s it i o n s o f t h e r e m a i n i n g p h a s e sc a n b e c a l c u la t e d fr o m t h e e q u a t i o n s :

    V@(n i) + Ri w = 0.F u r t h e r m o r e i t is a d v i s a b le t o u s e a r e p r e s e n t a t i o n

    o f eq u a t i o n s (l b ) i n w h i c h t h e c o lu m n v e ct o r s i n t h ec o n s t r a i n t m a t r i x R c o r r e s p o n d i n g t o t h e m o s t a b u n -d a n t s p e c i e s b e c om e u n i t v e c t or s ( Sm i t h a n d M is s e n ,1982; Schnedler , 1984).C o m p u t a t i o n a l e x p e r i e n c e h a s a ls o d e m o n s t r a t e dt h a t f o r n e a r l y d e g e n e r a t e m i n i m a t h e g e n e r a l i z edl in e a r p r o g r a m m i n g a l g or i t h m d e s c r i b e d i n Gr e i n e r( 19 88 b ) can f u r n i sh a ve r y accu r a te e s t ima te o f th es o lu t i o n , w h i c h c a n e i t h e r b e co n s i d e r e d a s s u f -f ic i en t ly p r ec i se o r f u r t h e r im p r o v ed b y Newto n sm e t h o d .T h e m a t r i c e s V2 GJ (n ) c a n b e c a l c u l a t e d f r o m t h eHess ian ma t r i ces o f th e mo la r f r ee en e r g ie s V2Gj wi thth e h e lp o f th e f or m u la g iv en in Lemma Al inAp p en d ix A. Th e seco n d d e r iv a t iv es o f th e mo la r f r eee n e r g i e s c a n b e o b t a i n e d e i t h e r a n a l y t i ca l ly o r fr o mf ir s t - o r seco n d - o r d e r f in i t e d i f fe r en ces f r o m th e an a -ly t i ca l d e r iv a t iv es o r th e f u n c t io n v a lu es , r e sp ec t iv e ly .

    5. CONCLUSIONSWe h a v e p r e s e n t e d a n e f fi c ie n t a n d r e l i a b le n u m e r i -ca l imp lem en ta t io n o f th e B r in k ley -Nasa - R an d

    a l g or i t h m fo r t h e c a lc u l a t i on o f g e n e r a l m u l t ip h a s ech emica l eq u i l ib r i a in v o lv in g n o n id ea l p h ases . I to v e r c om e s t h e c o n v e r g e n c e p r o b l e m s a s s o c ia t e d w i t ht h e i d e a l a p p r o x im a t i o n m e t h o d a n d c a n h a n d l en o n id ea l sy s t em s o f an y co mp lex i ty e f fec t iv e ly . Asa n y N e w t o n m e t h o d , o u r a l g o r i t h m r e q u i r e s a g o odi n i t ia l e s t i m a t e o f t h e s o l u t i o n a s a s t a r t i n g p o in t .T h i s e s t im a t e c a n b e o b t a i n e d b y a n a l g or i t h m b a s e do n g e n e r a l i z e d l i n e a r p r o g r a m m i n g .O u r c o m p u t a t i o n a l e x p e r i e n c e h a s s o fa r v in d i -c a t e d o u r t h e o r e t i ca l cl a im t h a t t h i s a p p r o a c h c a nd ea l wi th t h e mo s t co mp lex sy s t ems e ff ic i en t ly an dr e l i ab ly [c f. Ap p en d ix B an d Gr e in e r a n d Sch n ed le r(1991)].A c k n o w l e d g e m e n t s - T h e a u t h o r w o u l d l i k e t o t h a n k B e m dR i b b e r a n d t h e r e f e r e e s f or h e l p fu l s u g g e s t i on s .

    NOMENCLATUREh , - M o le n u m b e r o f t h e i t h c h e m i c a le l e m e n tp r e s e n t nt h e s y s t e m (i = I, . . . , m)~~t%~&~?lL~-Wp +log(ivj)],j= i,....pc=(c'.....cP)

    W = Di ag o n a l [ s (j ), su ) ] ma t r i x wi t h en t r i e s n {,j=l.._..p

    E i = [ s (j ). l ] ma t r i x w i t h co n s t a n t en t ry 1 ,j = 1, . . . .pGJ ,=F r eeex cessen erg y o f j t h p h ase , j =l ,. .. ,pG/=Mohufreeenergyof j thphaae, j=l , . . . ,pGj=Freeenergyof j thphase, j=l , . . . ,pG = To t a l f r ee en e rg y& = &(nJ ) = G(n ) + (XT:), n {)log (X$$, n :).j = 1,. . ,pH = Matr ix inve r se o f V*&,j = 1 , . . . ,pH = Block d ia gona l ma tr ix wi t h b locks H, j = 1 , . . . ,pi = S u b s c r i p t n u m b e r i n g c om p o n e n t s p e c i e sI = I d e n t i t y m a t r i xj = S u p e r s c r i p t n u m b e r i n g s o l u t i o n p h a s e sm = N u m b e r o f c h e m i c a l e le m e n t sn = 3=, s(j) t o t a l n u m b e r o f s p e c i e sh r j = To t a l mo l e n u m b er o f j t h p h ase , j = I , . . ,p

    n ; = M o le n u m b e r o f i t h s p e c i e s i n j t h p h a s en j=(n {,..., n &, ) v ec t o r o f sp ec i es mo l e n u m b er s i n j t hp h a s ep = N u m b e r o f s o lu t i o n p h a s e s9 = L og(n)R { = C o lu m n v e c t o r w i t h m co m p o n e n t s . T h e k t h c o m -p o n e n t g i ve s t h e n u m b e r o f m o l e s o f e l e m e n t k i n o n emo l e o f sp ec i es i i n p h a s e jR =(R ,,..., R&,), [m s(i)1R=(R,. . . .RP)(m,n)matrixr ( j) = N u m b e r o f c o m p o n e n t s p e c i e s i n j t h p h a s e ,

    j=l,...,p- = M at r i x t r an sp o s i t i o nV;={vER J IZj=,u i=O}w = (w, , . _ , w,) L a g r a n g e m u l t i p l i e r sx = (x, , _ , x,) m o l e f r a c t i o n sX = ( s, s ) m a t r i x wi t h i d en t i ca l r o ws (x 1, . . , x,)Z = (n, n -m) m a t r i x d e s c r i b i n g t h e n u l l s p a c e o f t h em a t r i x R

    G r e e k s y m b o l s6 , , = Kro n e ck er s sy mb o lVf = g rad i en t o f fu n c t i o n fV2f = M at r i x o f seco n d d e r i v a t i v es o ffp = C h e m i c a l p o t e n t i a l o f a p u r e s u b s t a n c e

    R E F E R E N C E SD e n n i s J . E . J r a n d R . B . S c h n a b e l , N u m e r i c a l Me t h 4 f o r

    Un c o n s t r a i n e d O p t i m i z a t i o n a n d N on l i n e a r E q u a t i o n s .P r en t i ce Ha l l , E n g l ewo o d C l i ff s , New J e r sey (19 83 ).Do n g ar r a J . J ., J . R . Bu n ch , C . B . M o le r an d G . W. S t ewa r t ,L i n p u c k W s e r s G u i d e . SIAM P hi la delp h ia (1979).E r i k s s o n G . a n d K . H a c k , C h e m S a g e a c o m p u t e r p r o g r a mfo r t h e ca l cu l a t i o n o f co mp l ex ch em i ca l eq u i l i b r i a . M eru Z1 .Trans . (1990) . I n P r e s s .E r i k s s o n G . a n d E . R o se n , T h e r m o d y n a m i c s t u d i e s o f h i g ht e m p e r a t u r e e q u i l ib r i a VI I I . G e n e r a l e q u a t i o n s f or t h ec a l c u la t i o n o f e q u i li b r i a i n m u l t i p h a s e s y s t e m s . C h e m .Scripta 4, 193-194 (1973).G a u t a m R . a n d W. D . S e i d e r , C o m p u t a t i o n o f p h a s e a n dc h e m i c a l e q u i l i b r i u m . AlChE JI 2 !5 , 99 1-1015 (19 79 ).Gil l P . E . and M. H . Wrigh t , P r a c t i c a l O p t i m i z a t i o n .Acad emi c P r es s , New Yo rk (19 81 ).

    G o lu b H . G . a n d C . v a n L oa n , M a t r i x C o m p u t a t i o n s . J o h n sHo p k i n s Un i v er s i t y P res s (1 98 4) .G r e i n e r H . , T h e c h e m i c a l e q u i li b r i u m p r o b l em f or am u l t i p h a s e s y s t e m f o r m u l a t e d a s a c on v e x p r o g r a m .CALPHAD 12 , 15 5-170 (1988a).G r e i n e r H . , C o m p u t i n g c o m p l e x c h e m i c a l e q u i l ib r i a b yg e n e r a l i z e d l i n e a r p r o g r a m m i n g . Mathf Morl e l l i ng 10 ,5 2 9 -5 5 0 (1988b).G r e i n e r H . a n d E . S c h n e d l e r , M o d e ll in g h i g h t e m p e r a t u r et r a n s p o r t r e a c t i o n s . Pr o c . 6 t h Z n t . Co & o n H ig h T e m -pera t ures-Chem bt ry o f Inorgan i c Mater ia l s , Gai thers -b u r g (1 99 1) . I n p r es s .H e a t h M. T. , Nu mer i ca l a l g o r i t h ms fo r n o r & n e a r l yco n -s t r a in ed o p t imiza t io n . R ep o r t S tan -C S-7 8-6 56 , Dep a r t -

  • 8/3/2019 1991 - An Efficient Implementation of Newton's Method for Complex Nonideal Chemical Equilibria (H. Greiner)

    7/9

    I m p l e m e n t a t i o n o f N e w t o n s m e t h o d f or c h e m i c a l e q u i l ib r i a 12 1men t o f Co mp u t e r S c i en ce , S t an fo rd Un i v er s i t y , Ca l i f .(1978).M i ch e l sen M . L ., Th e iso t h e r ma l f la sh p r o b l em, P ar t I I .Flui d Ph ase Equ il. 9, 21-40 (1982).N a s h S . G ., S o l v in g n o n l in e a r p r o g r a m m i n g p r o b l e m s u s i n gt r u n c a t e d Ne w t o n t e c h n i q u e s. N umer ica l Op t im iz a t ion(p . T. Boggs, Ed .) , pp . 119-136 . SIAM, Ph i lade lph ia(1985).S ch n e d l e r E ., Th e ca l cu l a t i o n o f co mp l ex ch emi ca l eq u i -l i b r i a . CAL PHA D 8, 265-279 (1984).Smit h W. R . an d R. W. Missen , C hemica l R eac t ion E qu i -I ib r ium A na ly s i s. Wiley New Yor k (1982).

    AP P ENDIX A

    L e m m a A IMar hemar ica i P r oo f s

    T h e H e s s i a n m a t r i c e s o f t h e Gi b b s f r e e e n e r g y G a n d t h em o l a r f r e e e n e r g y G of a p h a s e a r e r e l a t e d b y:NV:G(n) = (I - X)VzG(x)fl- a ),

    w h e r e X d e n o t e s t h e ( s , s ) m a t r i x w i t h i d e n t i c a l r o w v e c t o r s(Xl...., x , ) and N =Z:=,n ,.P m o f . Di f f e r en t i a t i n g :

    g i v e s t h e r e l a t i o n s

    w h i c h w i l l b e u s e d r e p e a t e d l y .F r o m t h e d e fi n i t io n o f G w e h a v e :3 afTax.. . ..x.)+N c----i_,~xic%

    =G(x,,..., xx)- 2 Ex,+E.i_, xi kH e n c e :

    PC 3 a c a x ,- =an,an, c i x. a2Gaxji _ , axi an, ii= t 8axi axj an,H e r e t h e fi r s t a n d t h i r d t e r m o n t h e r i g h t -h a n d s i d e c a n c e l .I n t r o d u c t i o n o f t h e e x p r e s s i o n (Al ) i n t o t h e r e m a i n i n g t e r m sa n d r e a r r a n g e m e n t o f t h e s u m s t h e n l e a d s t o:N a% a 2 G a wan ,&, -p+ 2a x , x , u =, xi a -5

    w h i c h e x p r e s s e d i n m a t r i x n o t a t i o n g i v e s t h e r e s u l t .L e m m a A 2

    T h e m a t r i x o p e r a t o r 1 -a : R +R h as t h e fo l l o wi n geas i l y v e r i f iab l e p ro p er t i e s : l e t v = ( I - x )w wi t h v ec t o r s v , wf ro m R. Then :(1) v E Vi, i.e. EC ;, r, = 0;(2) v = 0 i f an d o n l y i f w = In fo r so m e sca l a r 1 .

    P r o o f. Th i s fo l lo ws i mm ed i a t e l y fro m :q = w,-x, ki, wi ,L > i = 1, . . . ,s.

    As a c o n s e q u e n c e o f L e m m a s Al a n d A2 w e ob t a i n :L e m m a A 3

    T h e f r e e e n e r g y G o f a p h a s e i s p o s i t iv e s e m i -d e f in i t e a n d+V2 G(n )w = 0 i f an d o n l y i f w = In fo r so m e sca l a r 1 .Proof . T h i s f ol lo w s f r o m t h e r e p r e s e n t a t i o n :

    *NV: G (n)w = fr(l- X)V; G(x) fl - x)wa n d t h e a s s u m p t i o n s o n G .P r oposi t ion A I

    P r o o f o f P r o p o s i t i o n 1 : t o e s t ab l i sh t h e eq u i v a l en ce o fs t a t e m e n t s 1 a n d 3 c o n s i d e r t h e m i n i m i z a t i on p r o b l e m :f(An)V2~(n)~ = re in sub ject to IcAn = 0,

    w h e r e G i s t h e t ot a l f r e e e n e r g y . As V2G i s p o s i t i v e sem i -d e f in i t e t h i s p r o b l e m i s w e l l -d e f in e d a n d t h e n e c e s s a r y a n ds u f h c i en t c on d i t i o n f or a m i n i m u m An i s t h e e x is t e n c e o fm u l t i p l ie r s w s u c h t h a t :[vG(n )]An + Iw = 0 a n d RAn = 0.

    H e n c e t h e s e e q u a t i o n s h a v e t h e u n i q u e s ol u t i o n A n = 0an d w = 0 i f an d o n l y i f V2G i s p o s i t i v e -d e f i n i t e o n t h es u b s p a c e :W = {AnIR An=O).

    T o s h o w t h a t s t a t e m e n t s 2 a n d 3 a r e e q u i v a le n t a s s u m et h a t t h e r e e x i st s a A n # 0 s a t i s fy i n g :n

    a n dAnTC(n = 2 Anj~Gj(nj)Ad = 0,=I

    RAn= i Rj&rj=O.,=1As t h e V2Gj a r e p o s i t i v e sem i -d ef i n i t e w e h av e :

    AdV2Q(n)Ad = 0 3 j = 1 . . ..Pa n d h e n c e (l - xdj))An j = 0. T h i s e n t a i l s Ad = rZd fo rj= l , . . . ,p a n d t h e r e f or e t h e ve c t o r s R %j a r e l &ear l yd e p e n d e n t :

    RAn = $ ,$Rhj = 0.j= L(An # 0 r eq u i r es t h a t A i # 0 fo r a t l eas t o n e j !) . Rev er s i n g t h ea r g u m e n t g i v e s t h e c o n v e r s e i m p l i c a t i on .P r opos i t ion A 2

    A s s u m e t h a t G(x, , . . . , x,) i s s t r i c t l y co n v ex . Def i n e :G(n ,, , n ,) = G(n,, . . . , n ,) + F(n ,, . . . , n,)

    w h e r e 4 i s a r e a l f u n c t i on w i t h a s t r i c t l y p o s i t iv e s e c o n dd er i v a t i v e . Th en V2d i s p o s i t i v e -d e f i n i t e .Proof. VZF i s a m a t r i x w i t h c o n s t a n t e n t r y :

    an d t h e r e fo re p o s i t i v e -d e f i n i t e . Th e ma t r i x Vrd = V2G +V2F b e i n g t h e su m o f t wo p o s i t i v e semi -d ef in i t e ma t r i ces i sc l ea r l y p o s i t i v e semi -d ef in i t e . To p r o v e t h a t i t i s i n f ac tp o s i t i v e -d e f i n i t e a s su me t h a t 8 VrGw = 0 wi t h w # 0 an dh en ce w = r l n wi t h I I # 0 . I t f o l l ows :tW2F w =I.a 5 n ,n,= A2aI,*=,

  • 8/3/2019 1991 - An Efficient Implementation of Newton's Method for Complex Nonideal Chemical Equilibria (H. Greiner)

    8/9

    122 H. GREM ERAPPENDIX B

    Converg knc e Problems of the I&al A p p r o x i m a r i o n M e t h o dT h e f ol lo w i n g e x a m p l e s a r e m e a n t t o e x h i b i t t h e c on v e r -g e n c e p r o b l e m s o f t h e id e a l a p p r o x im a t i o n m e t h o d . F o ri ll u s t r a t i v e p u r p o s e s w e h a v e c h o s e n a p a r t i c u la r l y s i m p l es y s t e m i n v o lv i n g t w o b i n a r y s o l u t i o n p h a s e s . It c a n b ec a l c u la t e d b y t h e n u l l-s p a c e m e t h o d a n d c l e a r l y d e m o n -s t r a t e s t h e d e f ic i e n c i e s o f t h e i d e a l a p p r o x i m a t i o n m e t h o d ,

    w h i c h o c c u r f o r t h e n u l l -s p a c e a n d t h e r a n g e - sp a c e m e t h o da l i k e . F or m o r e c o m p l e x s y s t e m s f or w h i c h w e h a v e e x p e r i -e n c e d s i m i l a r c o n v e r g e n c e p r o b le m s s e e G r e i n e r a n dSchnedler (1991) .T h e e q u i li b r iu m m o l e n u m b e r s h a v e b e e n o b t a in e d b yf ir s t d e t e r m i n i n g a c l os e s t a r t i n g p o i n t f o r N e w t o n s m e t h o db y t h e ge n e r a l iz e d l in e a r p r o g r a m m i n g m e t h o d d e s c r i b e d i nGre i n e r (19 88 b ) . We t h en ap p l i ed t h e r a n g e- sp ace met h o da s d e v e l o p e d i n t h i s p a p e r . W h e n n o t e x p l ic i t ly st a t e d w e d i dn o t p e r fo rm l i n e sea rch [see e .g . Den n i s a n d S ch n a b e l ( l9 83 )Ch ap . 6 1 .We c o n s i d e r a s ys t e m c on s i s t i n g of t w o c om p o u n d s A a n dB w h i c h e x i st in t h e g a s e o u s a n d l iq u i d s t a t e . We s t i p u l a t et h a t t h e id e a l g a s p h a s e A (g ) a n d B (g ) e x is t s a t a p r e s s u r eo f 1 b a r an d t h a t A( 1) an d B( 1 ) fo rm a r e g u l a r so l u t i o n w i t ha n i n t e r a c t i o n p a r a m e t e r ( in u n i t s o f R T) o f - 3. T h ec h e m i c a l p o t e n t i a l s o f t h e s p e c i e s ( in u n i t s o f R T ) a r ea s s u m e d a t f o l l o w s :p Act i= - 53.54926553, pBcs, - 54.33693060,,u~(,,= -54.25814819, /+,) = -51.50413543.

    Th e sy s t e m co n t a i n s 0.37 2 49 mo l o f co mp o u n d A an d0 .12749 mol o f com pou nd B.T h e e x a c t e q u i li b r i u m s o lu t i o n f or t h i s s ys t e m i s g i ve n b y :I IA(8) 0.0085794521, n BcB ) 0.0175663182,n A = 0.3647111606, +,(,) = 0.1100225333.

    c o n v e r g e n c e w a s a c h i e v e d in t h r e e i t e r a t i o n s . Wi t h t h e s a m es t a r t i n g p o i n t t h e id e a l a p p r o x im a t i o n m e t h o d d i d n o tc o n v e r g e a t a l l, b u t r a n i n i t i a l ly a w a y f r o m t h e s o lu t i o n a n dt h e n e x h i b i t e d o s c il la t o r y b e h a v i ou r . W h e n t h e i d e a l a p -p r o x i m a t i o n m e t h o d w a s u s e d in c o n j u n c t i on w i t h a l in es e a r c h p r o c e d u r e c o n v e r g e n c e w a s a c h i e v e d , b u t w a s e x -t r e mel y s l o w (ab o u t 3 0 i t e r a t i o n s ) .I n a n o t h e r t e s t w e c h a n g e d t h e r e g u la r i n t e r a c t io n p a r -am ete r to - 2 an d ps( , ) to - 52 .15704744. For t h i s s y s t e m t h ee x a c t e q u i l ib r i u m m o l e n u m b e r s a r e :n A(g1 0.0069858134, n Bcg ) 0.0134531341,n ,(,, = 0.3655141871, n ,

  • 8/3/2019 1991 - An Efficient Implementation of Newton's Method for Complex Nonideal Chemical Equilibria (H. Greiner)

    9/9

    I m p l e m e n t a t i o n o f N e w t o n m e t h o d fo r c h e m i c a l e q u i l ib r i a 1 2 3o g $ i ; ~ ~ l ,T f i . e ,P m a ; i c e s J V H j g i = 1 , . . . .P an d F i n a l ly t h e fa c t o r i z a t i o n o f m a t r i x (1 1 ) n e e d s :

    (m + PSmp i$ , s (i ) an d 2 WI , -7 6/= I

    o p e r a t i o n s , r e s p e c t i v e l y . o p e r a t i o n s .