UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

A reinvestigation of the theoretical basis for the calculation of isothermal-isobaric mass transfer in.. Perkins, Ernest Henry 1980

You don't seem to have a PDF reader installed, try download the pdf

Item Metadata

Download

Media
[if-you-see-this-DO-NOT-CLICK]
UBC_1980_A6_7 P47.pdf [ 10.38MB ]
[if-you-see-this-DO-NOT-CLICK]
[if-you-see-this-DO-NOT-CLICK]
Metadata
JSON: 1.0052867.json
JSON-LD: 1.0052867+ld.json
RDF/XML (Pretty): 1.0052867.xml
RDF/JSON: 1.0052867+rdf.json
Turtle: 1.0052867+rdf-turtle.txt
N-Triples: 1.0052867+rdf-ntriples.txt
Original Record: 1.0052867 +original-record.json
Full Text
1.0052867.txt
Citation
1.0052867.ris

Full Text

A REINVESTIGATION OF THE THEORETICAL BASIS FOR THE CALCULATION OF ISOTHERMAL-ISOBARIC MASS TRANSFER IN GEOCHEMICAL SYSTEMS INVOLVING AN AQUEOUS PHASE by ERNEST HENRY PERKINS B.Sc,  the U n i v e r s i t y o f B r i t i s h Columbia, 1975  A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE in THE FACULTY OF GRADUATE STUDIES Department o f Geological Sciences we accept t h i s t h e s i s as conforming to the required standard  THE UNIVERSITY OF BRITISH COLUMBIA May 1980  (§) Ernest Henry Perkins, 1980  In presenting this thesis in partial fulfilment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make i t freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the Head of my Department or by his representatives.  It i s understood that copying or publication  of this thesis for financial gain shall not be allowed without my written permission.  Department of G e o l o g i c a l S c i e n c e s  The University of British Columbia 2075 Wesbrook Place Vancouver, Canada V6T 1W5  D  a  t  e  May 16, 1980  ii  ABSTRACT  Many geochemical processes involve the r e a c t i o n o f an aqueous phase with minerals with which the aqueous phase i s not i n e q u i l i b r i u m . P r e d i c t i o n o f the change i n the composition and i n the number o f moles of phases and o f aqueous species as the system proceeds toward o v e r a l l e q u i l i b r i u m i s made p o s s i b l e by d i f f e r e n t i a l equations formed from mass balance, mass a c t i o n , i o n i c strength and a c t i v i t y o f water equations. The equations developed by Helgeson, Brown, N i g r i n i have been examined which  constrain  and Jones  (1970)  and a l t e r n a t e forms o f the d i f f e r e n t i a l equations  reaction  progress have  been  proposed.  These  new  equations include c o r r e c t terms f o r the change i n the mass o f water, the  change i n the a c t i v i t y o f water and the change i n the number o f  moles o f each endmember of the s o l i d s o l u t i o n phases.  The equations  have been formulated to allow a more e f f i c i e n t algorithm f o r numerical evaluation. program  General forms f o r a l l equations are presented. A FORTRAN  f o r the c a l c u l a t i o n o f mass t r a n s f e r  i n an isothermal and  i s o b a r i c system and a d e s c r i p t i o n o f the program are given.  iii  TABLE OF CONTENTS ABSTRACT TABLE OF CONTENTS LIST OF EQUATIONS LIST OF TABLES LIST OF SYMBOLS ACKNOWLEDGEMENTS INTRODUCTION CHOICE AND NUMBER OF COMPONENTS THEORETICAL CONCEPTS Mass Balance Mass Action Activity Coefficients A c t i v i t y Of Water S o l i d S o l u t i o n Minerals THE GENERAL SOLUTION The F i r s t D e r i v a t i v e Higher Order D e r i v a t i v e s I n i t i a l S o l u t i o n Composition P r e d i c t i o n Of Saturation CONCLUDING REMARKS SELECTED REFERENCES APPENDIX 1 Ionic Strength Mass Balance A c t i v i t y Of Water Mass A c t i o n APPENDIX 2 The Program PATH Data Stucture For Unit 3 Data Structure For Unit 5 Restarting PATH Error Messages Example APPENDIX 3  i i i i i iv V vi viii 1 2 6 8 11 13 17 19 25 26 32 33 34 36 37 39 41 42 43 46 52 52 55 63 69 70 72 S3  iv  LIST OF EQUATIONS Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation Equation  (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) (20) (21) (22) (23) (24) (25) (26) (27) (28) (29) (30) (31) (32) (33) (34) (1-A) (1-B) (1-C) (1-D) (1-E) (1-F) (1-G) (1-H) (1-1) (1-J) (1-K) (1-L) (1-M) (1-N) (1-0) (1-P)  4 8 9 9 10 10 11 12 12 14 15 15 15 16 16 18 18 18 20 20 21 21 22 22 23 25 27 30 30 30 30 30 32 33 40 40 41 42 43 44 45 47 48 48 48 48 49 49 50 51  V  LIST OF TABLES Table I Table I I Table I I I  6 46 62  vi  LIST OF SYMBOLS A, B  Molal Debye-Huckel Parameters  a , a ., a ° J i,<j>  Activity of the cth component, of the j t h solid solution species, of the s t h aqueous species and of the i t h endmember of the $ th mineral, respectively  §  Ion size parameter of the s t h aqueous species  s  a  s  c  The derivative of..^ for the s th aqueous species s  e  end  Number of solid solution species of the cbth solid phase  *  I  True ionic strength of the aqueous solution  K  Equilibrium constant for the equilibrium reaction between the s t h aqueous species and the components  s  m n  Molality of the s t h aqueous species  s  Total number of moles of the cth component  c ,T  Ho  Number of moles of the i th endmember of the <j> th mineral, the r t h reactant, the sth aqueous species, and of water in the system, respectively  NC •  Total number of components  NC  Number of components which are described by solid solution species  n  .  ,n ,n r  n  2  p  NC  s  Number of components described by aqueous species  sp  NP  Number of solid system  NR  Number of phases reacting with the system  NS  Number of aqueous species in the system  R  Number of non-component mass action equations  R  Gas Constant  T  Temperature in Kelvins  w e  phases in equilibrium with the  For a charged species, the Deviation function; for a neutral species, a constant which when multiplied by the true ionic strength i s equal to the activity coefficient of the species. Typically modeled using the activity coefficients of carbon dioxide.  vii  WG\, WG  Margules excess energy parameters for the f i r s t and second solid solution species in a binary solid solution, respectively  2  WG , WG N A  O A  1,§  x., x  1  2,cj>  ,x  3  Z  2  2  1  2  Activity coefficients of CO 2 in water at ionic strengths of ij and 1 , respectively 2  Activity coefficient of the sth aqueous species  S  X. '^  Mole fraction of the j'th solid solution species and of the f i r s t and second solid solution species in the <j>th mineral, respectively Charge on the sth aqueous species  s  Jx J •*co ' ^co Y  2  Margules excess energy parameters for the f i r s t and second solid solution species in the <j> th solid phase, respectively  >  5  Activity coefficient of the i t h solid species of the <f>th phase  solution  Reaction progress variable  v. 'V'  Number of moles of the cth component in one mole of the i t h solid solution species of the <pth phase.  v  Number of moles of the cth component in one mole of the rth reactant phase.  1  v  C  r,c  s ,c  Number of moles of the cth component in one mole of the sth aqueous species.  viii  ACKNOWLEIXEMENTS The author wishes t o express h i s sincere thanks t o Dr. T.H. Brown, under whose s u p e r v i s i o n helpful  this  t h e s i s was w r i t t e n .  comments and c r i t i c i s m s  have helped  this  His assistance, thesis  immensely.  Comments by Dr. H.J. Greenwood have a l s o been o f b e n e f i t . The author i s p a r t i c u l a r l y g r a t e f u l to h i s w i f e , L a u r i e , f o r her patience and moral support. This  research  was funded  by Natural  Science  Research Counsel operating grant number A-8842.  and  Engineering  1  INTRODUCTION Any chemical system i n p a r t i a l e q u i l i b r i u m w i l l tend to approach t o t a l e q u i l i b r i u m by t r a n s f e r r i n g mass among the phases i n the system. The t o t a l amount of mass t r a n s f e r r e d at any given stage of the r e a c t i o n is  a  measure  of  the  progress  of  the  reaction.  If  no  kinetic  c o n s t r a i n t s e x i s t , the progress of the system towards e q u i l i b r i u m can be analyzed by e q u i l i b r i u m thermodynamics even though r e a c t i o n progress i s path dependent and i r r e v e r s i b l e . Although the concept of r e a c t i o n progress has been present i n the chemical l i t e r a t u r e f o r many years (De Donder, 1920; De Donder and Van Rysselberghe, 1936; Prigogine and Defay, been applied simulated  to g e o l o g i c a l  the  evaporative  systems.  1954), o n l y r e c e n t l y has i t  Garrels  concentration  of  and  spring  d i s t r i b u t i o n of species method, a non-linear and Unfortunately, t h i s method has events  Mackenzie  (the s a t u r a t i o n and subsequent  water  iterative  the major disadvantage  (1967) by  approach.  that  complete  d i s s o l u t i o n of a phase) may  (Helgeson, 1968;  a  be  overlooked.  Helgeson  Helgeson, Brown, N i g r i n i  and  Jones, 1970)  recognized that the d e r i v a t i v e s of the mass a c t i o n  and  mass balance equations which c o n s t r a i n r e a c t i o n progress form a system of  linear  equations.  Helgeson  modeled  reaction  progress  as  a  continuous function by a power s e r i e s i n the d e r i v a t i v e s , a method that can be solved by l i n e a r techniques. theory  (for example:  Fouillac,  Subsequent work on mass t r a n s f e r  Michard  and  Bocquier,  1976)  has  g e n e r a l l y been based on Helgeson's work although Karpov, Kay'min and Kashik (1973) and Parkhurst, Plummer and Thorstenson methods s i m i l a r to Garrels and  Mackenzie.  (1978) have used  2  A p p l i c a t i o n o f mass t r a n s f e r theory to g e o l o g i c a l systems ( f o r example:  Helgeson, G a r r e l s  and Mackenzie,  1969;  Helgeson, 1970;  F o u i l l a c , Michard and Bocquier, 1976; P f e i f e r , 1977; V i l l a s and Norton, 1977)  has shown that  modeled  by mass  many d i f f e r e n t  transfer  geochemical  calculations,  thus  processes can be  leading  to a  better  understanding o f geochemical systems. The purpose o f t h i s paper i s to supplement and to make c o r r e c t i o n s to the t h e o r e t i c a l basis of isothermal-isobaric mass t r a n s f e r i n v o l v i n g an aqueous phase as presented by Helgeson e t a l (1970).  Modifications  of the mass balance and mass a c t i o n equations to c o r r e c t l y a l l o w f o r the changing mass o f water, a simple method to c a l c u l a t e the changing a c t i v i t y o f water, and improved methods f o r the numerical s o l u t i o n o f the mass t r a n s f e r equations w i l l be presented.  CHOICE AND NUMBER OF COMPONENTS Generally elements, oxides, simple i o n i c species and e l e c t r o n s are used as components although any phase or species, r e a l or imaginary, may be used equally w e l l .  The o n l y c o n s t r a i n t upon the nature and the  number of components i s that the components must form an independent basis f o r the compositional space o f a l l possible phases and species i n the system. The maximum number o f components needed to describe any system i s the number o f elements present i n the system plus one. A reduction i n the number o f components (NC) occurs when there i s a l i n e a r dependence between any two (or more) members o f the component b a s i s o r when a component i s not present i n any o f the phases or species.  3  Even though there independent b a s i s w i l l choice  i s no unique choice  s u f f i c e t o describe the system, a j u d i c i o u s  o f components o f t e n  shortens computations.  o f components and any  simplifies  conceptual  difficulties  and  For example, we have found that computations  are made more e f f i c i e n t i f some or a l l o f the components have f i x e d chemical p o t e n t i a l s .  This w i l l be discussed below.  In any system each s t o i c h i o m e t r i c phase system w i l l  f i x one chemical  potential  1  i n e q u i l i b r i u m with the  a t a given  temperature and  pressure, and each n component s o l i d s o l u t i o n phase w i l l  arbitrarily  f i x n independent chemical p o t e n t i a l s a t a given temperature, and composition. will  pressure  In t h i s paper minerals i n e q u i l i b r i u m with the system  be chosen as part o f the component b a s i s .  Each s t o i c h i o m e t r i c  mineral w i l l be chosen as one o f the components, and each n component s o l i d s o l u t i o n mineral w i l l be chosen as n o f the NC components that describe the system.  For increased accuracy during computations, the  remaining components w i l l be chosen from the most abundant independent aqueous species.  Water w i l l g e n e r a l l y be chosen as a component because  of i t s abundance. When a phase or species i s chosen as a component the component has the same composition and a c t i v i t y as that phase or species. bulk  composition  enclosed  o f the system  by the composition  lies  outside  o f the convex  I f the space  o f the components, the t o t a l number o f  moles o f some o f the components may be negative.  This can occur even  though the phase, species or endmember which describes that component  ^-Throughout this paper the term " s t o i c h i o m e t r i c phase" or " s t o i c h i o m e t r i c mineral" w i l l be used t o i n d i c a t e phases that do not e x h i b i t compositional v a r i a t i o n .  4  i s present i n the system.  When d i s c u s s i n g the p r o p e r t i e s (number of  moles, a c t i v i t y or m o l a l i t y ) of a phase or species chosen to describe a component, the phrase  "component phase  "component species" w i l l  be used.  or  species"  or  the  phrase  A "non-component species" i s any  species or phase that i s not a d e s c r i p t o r of the component b a s i s . Because  a mineral may  only be  i n e q u i l i b r i u m with  the system  during a p o r t i o n of a r e a c t i o n , the component b a s i s w i l l change each time a new mineral becomes saturated with respect to an aqueous phase or  a mineral d i s s o l v e s completely  into  the aqueous phase.  Matrix  operations (Greenwood, 1975) o f f e r a simple method to change from one component b a s i s to another. In any system at e q u i l i b r i u m there are NC mass balance  equations,  one f o r each component, and R independent mass a c t i o n s equations, one for each non-component phase or species i n the system.  R i s defined  by: NP  R = NS  - NC  sp  +  Venc?  Z-j <j, = l  <j>  - NC  m1  p  y)  NS i s the number of aqueous species i n the system and NP is._theL numberz ;  of minerals  i n e q u i l i b r i u m with the system.  and NC  N C S V  are the  number of components that are described by aqueous species and by s o l i d solution  species  respectively, mineral.  end^  of  minerals  in  equilibrium  with  the  system,  i s the number o f s o l i d s o l u t i o n species of the 4>th  I f the <f>th mineral i s s t o i c h i o m e t r i c ,  e n d  ^  i s equal to one;  i f i t i s a binary s o l i d s o l u t i o n , end^ i s equal to two.  Generally NC^  i s equal to the t o t a l number of endmembers o f minerals present, but i t w i l l not be under two c o n d i t i o n s : when any o f the minerals have more  5  s o l i d s o l u t i o n species than s o l i d s o l u t i o n components, or when one o f the s o l i d s o l u t i o n components i s already present as part of the b a s i s . A l l phases, species and endmembers present i n the system can be e a s i l y r e l a t e d t o the components by w r i t i n g format. potassium  the system i n a matrix  Table I i s a simple example i n which the component b a s i s i s f e l d s p a r , quartz, potassium  i o n , hydrogen i o n and water.  These components have been used,to describe a v a r i e t y of non-component aqueous species. In Table I the s t h column i n the matrix contains the c o e f f i c i e n t s of  the components  (v J s  i n the balanced  chemical  equation  which  describes the e q u i l i b r i u m between the component phases and species, and one mole of the s t h species.  These c o e f f i c i e n t s are a l s o c o e f f i c i e n t s  of the components i n the mass a c t i o n equation f o r that species.  The  l a s t R columns i n the matrix are one s e t o f the R independent mass a c t i o n equations.  The c t h row i n the matrix i n Table I contains the  c o e f f i c i e n t s f o r the mass balance equation of the c t h component.  The  s t h p o s i t i o n i n the c t h row i s the number o f moles o f the c t h component i n one mole o f the s t h species  (v^ ^  and t h i s i s m u l t i p l i e d by the  t o t a l number of moles of the s t h species to obtain the t o t a l number of moles o f the c t h component present because o f that species.  6  Table I  3  8  2  2  + 0 0 1 0 0  0 1 0 0 0  0 0 0 1 0  •H cn  •H cn  j-  CM  0 0 0 0 1  CO  CO  A1(0H)  o  + CM  Al(OH)  CM  o  1 0 0 0 0  o  o  •H cn  KAlSi 0 Si0 K+ H+ H0  i j-  A1(0H)  •H cn  KOH  CO O CO  0 0 0 i 1 1 1 1 1 0 -3 -3 -3 -3 0 0 1 -1 -1 -1 -1 4 0 -1 -1 3 2 1 2 2 1 -2 -1 0 1  The components are potassium f e l d s p a r , quartz, potassium i o n , hydrogen ion and water. Phases and species considered include F^SiOit, H3Si0i+, KOH, A l , A1(0H)++, A1(0H)£ and Al(0H)3 as w e l l as the components. + + +  The c o e f f i c i e n t s f o r the mass a c t i o n equation o f one mole o f any phase or species t o the component phases and species can be read from the column o f the matrix corresponding to that phase o r species. For example, the mass a c t i o n equation f o r aluminum ion t o the components can be w r i t t e n from the c o e f f i c i e n t s i n the aluminum column. I t i s In  K  A  ^  1  3  =  -1 I n a -  A  +  1 3 +  1 In a  K  lna +  +  ^  .  4 In a  R +  3 ln  ^  -  -  2 In a  a ^ ^  ^  In a s i m i l a r fashion, the c o e f f i c i e n t s f o r the mass balance equation o f each component i s read across the row corresponding to that component. For example, the t o t a l amount o f water i n the system i s n  H 0,T  =  1  n  2  H 0  +  2  +  1  n  KOH  2  "H^SIO^  +  "  3  2  n  Al+  1  n  H SiO^ 3  The symbol f o r the c o e f f i c i e n t o f the cth component phase o r species i n the mass a c t i o n equation f o r the s t h species i s v . The symbol f o r the c o e f f i c i e n t d e s c r i b i n g the number o f moles o f ' t h e s t h species i n the mass balance equation o f the c t h component i s , c « Because the matrix method has been used to obtain these c o e f f i c i e n t s , t h e i r numerical value i s i d e n t i c a l . cs  v  s  7  THEORETICAL CONCEPTS Helgeson showed that the progress o f a reaction can be modeled as a Taylor's expansion i n the d e r i v a t i v e s o f the mass a c t i o n and mass balance  equations  taken  with  respect  to reaction  progress.  The  progress v a r i a b l e (E) was defined by DeDonder (1920), DeDonder and Van Rysselberghe (1936), and Prigogine and Defay (1954).  The change i n the  number o f moles o f the phases and species (dn/d5)  i s c a l c u l a t e d , and  t h i s change i s added to the t o t a l number o f moles o f each phase and species. using  Various techniques e x i s t to approximate nonlinear equations  their  Runga-Kutta,  derivatives  (Talyor's expansion,  Gear, etc) and the advantages  type i s reviewed  Predictor-Corrector,  and disadvantages o f each  i n many standard numerical t e x t s .  The accuracy o f  these techniques increases with the number o f d e r i v a t i v e s used, but f o r t y p i c a l mass t r a n s f e r c a l c u l a t i o n s ; no more than three d e r i v a t i v e s are u s u a l l y needed. Molalities  and a c t i v i t i e s  systems commonly range from 10" not unusual.  o f aqueous 10  25 0  to 6 are  The d e r i v a t i v e s o f these m o l a l i t i e s and a c t i v i t i e s with  ill-conditioned  logarithmic  i n hydrothermal  t o 3, but ranges o f i d "  respect to r e a c t i o n progress (dm/dK, da/dK) To avoid  species  derivatives.  matrices these The change  w i l l have a s i m i l a r range. derivatives  are solved as  i n the number o f moles o f a  mineral w i t h respect to r e a c t i o n progress  (dn/dQ  can be c a l c u l a t e d  e i t h e r as a "normal" or as a logarithmic d e r i v a t i v e , although under c e r t a i n c o n d i t i o n s which are discussed l a t e r , using 11  n  a  "normal"  dinn = d n  derivative.  By  the  there i s an use  of  the  " the "normal" d e r i v a t i v e can be e a s i l y  advantage identity calculated  8  from the logarithmic d e r i v a t i v e .  Mass Balance The t o t a l  number o f moles o f the c th component (n  J  i n any  C ,T  geochemical system can be expressed as  *=1  +  i=l  V  s=l  v  n  (2)  r=i  • • r  ffiR i s the number o f phases reacting with the system. are  the number o f moles o f the s t h aqueous  n  „ ,n  species,  and  o f the  n r  ith  endmember o f the <f>th mineral  i n e q u i l i b r i u m with the system, and o f the  rth  v  reactant,  respectively,  , v  s ,c  and v. r,c  ±  are the number o f  i,§,c  moles o f the c t h component i n one mole o f the s t h aqueous species, i n one mole endmember  o f the r t h reactant of  respectively.  the  cbth  phase  phase, and i n one mole in  equilibrium  with  o f the i t h the  system,  In a s t o i c h i o m e t r i c phase the number o f endmembers i s  one, and the number o f moles o f that endmember equals the t o t a l number of moles o f that phase. The d e r i v a t i v e o f equation (2) with respect t o r e a c t i o n progress is  9  dn  NP end^ \ ^  _ d?  <j,= l  N  dn .  i= l,  S  ,  dn  dS  s=l  d?  (3) NR  E  dn V  r,c  d5  r=l  In a system closed with respect to mass equation zero.  (3) i s equal to  I f the system i s not closed to some or a l l of the components  (e.g., i f the f l u i d phase flows through the system), then the change of mass of those  components  several  For example,  ways.  must  be  specified.  This  the change of these  can be  done i n  components  can be  defined as a known function of reaction progress, or an equal number of other  variables  in  the  system  can  be  specified.  In  the  third  a l t e r n a t i v e , additional equations which constrain reaction progress i n an open system can be added to the system of equations, and then the change of these components with respect to reaction progress can become unknowns to be calculated. The m o l a l i t y of the sth aqueous species (m^)  i s related  to the  number of moles of the s t h aqueous species and the number of moles of solvent water ( n  J by  n m  55.51  (4)  = H0  n  2  Rearranging  equation  (4) to solve f o r the number  of moles of the  aqueous species and taking the logarithmic derivative with respect to the progress variable, gives  10  dn  Because  n  9  s  din m  compositions  equation  •  s  (5)  m  +  ' dg  55.51  solution  molalities,  m  n„ H0  s d£  n  s  rr  n  E?0  din n  H?0  55.51  (5)  are g e n e r a l l y expressed  can  be  combined  with  i n terms  equation  (3)  of and  rearranged to o b t a i n  Y"  v  5 5  '  r.= l  5 1  d  n  - V  r  d?  H0 2  V  5 5  n  d  l  J  n  d5  2  NS  ^2 "  -  v  5 1  // 0  i = 1  (j)=1  -  Vs  c  m  n  din s  H oO — 6  d£  s=l  9  .C  272  din  Tn  S  S  d5  s=2  (6)  Equation  (6) i s the general d e r i v a t i v e of the mass balance equation  with respect to r e a c t i o n progress. water  i s a constant, and  progress i s zero.  From equation (4) the m o l a l i t y of  i t s derivative  with  respect to  reaction  Therefore, the l a s t summation begins a t s = 2 because  s = l has been reserved f o r water. Equations equations  (61)  (4) to to  (6), i n c l u s i v e ,  (63), i n c l u s i v e ,  of  can  be  directly  Helgeson  et a l  compared  to  (1970).  In  a d d i t i o n to the d i f f e r e n t n o t a t i o n , a conceptual d i f f e r e n c e e x i s t s as well.  Helgeson  et  al  (1970)  references m o l a l i t i e s  minerals to a constant amount of solvent water  and  masses  (1000 grams).  of  Thus,  11  during  any r e a c t i o n which changes  the amount of solvent water, the  number of moles of each component (referenced to 1000 grams of solvent water) must change i n response. solid  phase  The  total  number of moles of each  (both reactant phases and those i n e q u i l i b r i u m with the  system) and the m o l a l i t y of each aqueous species must a l s o change to remain referenced to 1000 grams of solvent water.  The number of moles  of solvent water remains constant which r e s u l t s i n an increase i n the t o t a l number of moles of water i n the system. In c o n t r a s t , the equations  presented  here assume the number of  moles of each component to be constant, and i f solvent water i s removed from the aqueous phase, only the m o l a l i t y of the aqueous species and the number o f moles of solvent water w i l l change i n response.  Mass A c t i o n The a c t i v i t y of any phase, species or endmember can be c a l c u l a t e d from the a c t i v i t y o f the component phases and species using the Law of Mass A c t i o n .  For the s t h aqueous species, the Law of Mass A c t i o n can  be w r i t t e n as NC  ln  ln a  K S  + S  V\  v  / . C . S  lI n a  c  (7)  c=l  where  and a  g  are the a c t i v i t i e s  of the c t h component phase  species and the s t h non-component species, r e s p e c t i v e l y .  V S / C  is  or t n e  r e a c t i o n c o e f f i c i e n t of the c t h component phase or species i n the s t h reaction.  K  S  i s the e q u i l i b r i u m constant f o r the r e a c t i o n between the  12  s t h aqueous species and the component phases and species.  The a c t i v i t y  of a s o l i d phase or of a s o l i d s o l u t i o n species i n a s o l i d phase i s c a l c u l a t e d using an equation i d e n t i c a l subscript  " s " i s replaced  i n form to equation  by the s u b s c r i p t " i , ? " ,  (7). The  where  the new  s u b s c r i p t i n d i c a t e s the i t h endmember o f the 9 t h mineral. The  r e l a t i o n s h i p between the a c t i v i t y  aqueous species i s  a  where Y  and the m o l a l i t y o f an  =  s  y  s  m  (8)  s  i s the a c t i v i t y c o e f f i c i e n t o f the s t h aqueous species.  s  Equation (7) does not d i f f e r e n t i a t e between the d i f f e r e n t types o f components.  However, i t can be r e w r i t t e n such that NP minerals are  part o f the component b a s i s . up the remaining  N  S  aqueous species and water make  ~ 1  C P  p o r t i o n o f the component b a s i s .  Combining equation  (8) with t h i s r e w r i t t e n form of equation (7) and taking the d e r i v a t i v e with respect t o r e a c t i o n progress, gives  din  K  din  * d?  -  din  Y  2dC  +  m  *  dt:  +  HP  end,  <v ^  \.  >  -—f  V  >  <p=l  din  V*  /  a  S  d?  M-  1=1 NC V—> sp  din  +  *H  0 r  s  a  220  +  \  din  v  m c  NC p S  +  yy '  v  *- -  dm - Y °  (9)  The d e r i v a t i v e s o f the m o l a l i t i e s o f the aqueous component species are summed beginning with c=2 to a l l o w the d e r i v a t i v e o f the a c t i v i t y o f  13  water to be treated separately.  I f water i s not a component species,  then the water term i s dropped and summed beginning with c = i .  the aqueous component species are  i f the i t h endmember of the cbth mineral i s  not a component species, then v.  (the c o e f f i c i e n t of  J. CD , r  endmember of the § th mineral  the i t h  S  i n the sth reaction) i s zero.  I f the  number of endmembers o f a s o l i d phase i s greater then the number of components of that phase, then a mass a c t i o n equation s i m i l a r i n form and d e r i v a t i o n to equation  (9) e x i s t s to c a l c u l a t e the d e r i v a t i v e of  the a c t i v i t y of those endmembers. Although advances have been made i n the t h e o r e t i c a l treatment  of  a c t i v i t y c o e f f i c i e n t s of aqueous species as a f u n c t i o n of pressure and temperature  (Helgeson  and  Kirkham,  1976),  considerable  uncertainty  s t i l l e x i s t s about the a c t i v i t y c o e f f i c i e n t s of many aqueous complexes as a f u n c t i o n of pressure and temperature.  Owing to t h i s only i s o b a r i c  isothermal mass t r a n s f e r w i l l be considered.  Thus, the d e r i v a t i v e o f  the e q u i l i b r i u m constant with respect to r e a c t i o n progress i s zero, and equation (9) i s equal to zero. Activity Coefficients The a c t i v i t y c o e f f i c i e n t f o r any aqueous species i s g e n e r a l l y some f u n c t i o n of the i o n i c strength, and as the i o n i c strength changes, the activity  coefficient  of  the  aqueous  species  changes.  In  some  geochemical systems the mass t r a n s f e r between the s o l i d phases and  the  aqueous phase i s l a r g e (for example, r a i n water f a l l i n g on and r e a c t i n g with surface m a t e r i a l ) ; i n others, a s i g n i f i c a n t amount of water may consumed or released during a r e a c t i o n .  In both of these cases  be the  14  i o n i c strength can change s i g n i f i c a n t l y during the r e a c t i o n , and, thus, necessitate  the  calculation  of  the  derivative  of  the  activity  c o e f f i c i e n t with respect to r e a c t i o n progress. In some geochemical systems which involve concentrated b r i n e s , the ionic  strength o f the aqueous phase  consequently, to  be  constant,  the d e r i v a t i v e of the a c t i v i t y c o e f f i c i e n t with  r e a c t i o n progress  still  i s essentially  i s approximately  c a l c u l a t e d , however,  zero.  because  and,  respect  This d e r i v a t i v e should  including i t w i l l  minimize  numerical e r r o r s . Many d i f f e r e n t methods e x i s t to c a l c u l a t e a c t i v i t y c o e f f i c i e n t s , each with t h e i r own merits.  The extended Debye-Huckel model w i l l  be  used as an example, however, any other method could be used e q u a l l y well. Helgeson (1969) proposed that f o r a given temperature the a c t i v i t y c o e f f i c i e n t f o r the s t h aqueous species could be approximated by  -2.303 A  z yjj 2  I n Y«. = s  + 1  +  a  B  2.303 w  y[l  e  I (10)  Where I i s the true i o n i c strength o f the s o l u t i o n (defined below), and A and B are the molal Debye-Huckel  parameters,  a  and z  are the ion  s i z e parameter and the charge on the s t h aqueous species, r e s p e c t i v e l y . For any n e u t r a l aqueous species w  &  i s a f u n c t i o n of the i o n i c strength  of the s o l u t i o n and i s assigned a value such that Y activity  c o e f f i c i e n t of carbon d i o x i d e  species w  e  strength.  i n water.  i s the d e v i a t i o n f u n c t i o n and  s  i s equal to the For any  charged  i s independent o f  ionic  15  The true i o n i c strength o f any aqueous system i s defined as I  =  1/2  NS £ Z,2 m s s  (11)  S=2  Again the summation begins a t s =2 because s = i has been reserved f o r water. The d e r i v a t i v e of equation (10) with respect to r e a c t i o n progress is i  ,2  din ~~dT~  Y  =  V  2.303  dJ  v? [i+ i sVf] /  s  2  2  s  (12)  where  f o r the s t h charged  function.  i s equal  £  For the s t h neutral species C  respect to i o n i c strength. the  species C  s  to the d e v i a t i o n  i s the d e r i v a t i v e o f  w e  with  The nature o f t h i s d e r i v a t i v e depends on  f u n c t i o n a l form representing w . g  Typically, w  from a matrix of values a t d i f f e r e n t  ionic  &  i s interpolated  strengths.  Thus f o r a  n e u t r a l species equation (12) would reduce to  y  din  In  Y  CO 2  In  Y  CO •  d?  dl d5  (13) x  i  2  and y  Y co  2  strengths  i  are known a c t i v i t y c o e f f i c i e n t s of carbon d i o x i d e at i o n i c co  2  j  2  and J  L  , r e s p e c t i v e l y , where  strength o f the s o l u t i o n .  j -  2  and.-cj-j  bound the i o n i c  Usually these c o e f f i c i e n t s are modeled using  16  the a c t i v i t y c o e f f i c i e n t f o r carbon d i o x i d e i n water. Equation  (12) f o r charged species (or (13) f o r n e u t r a l species)  can now be s u b s t i t u t e d f o r the d e r i v a t i v e o f the a c t i v i t y c o e f f i c i e n t of a l l aqueous species i n equation (9). This r e s u l t s i n NC< "^sp l  din 0  din  m  +  =  ~  ;  c —  V  +  din H  2  a  H0 7  0 , s d5  dS  c= 2 NCsp  +  2.303  C  +  s  s  C  +  s  c=2 NCsp  dI  v s  1  WP  +  a  S  s  a  c=2  c  B  ^J  2  dt;  (14)  end<j, din  9=1  c  a. , i , <P  d5  i=l  Thus the d e r i v a t i v e o f the m o l a l i t y o f any non-component species can be w r i t t e n i n terms i n v o l v i n g only the m o l a l i t i e s and a c t i v i t i e s o f the component species and o f the d e r i v a t i v e o f i o n i c strength. The d e r i v a t i v e o f equation (11),. the i o n i c strength equation, with respect t o r e a c t i o n progress i s NS 'o  -*5  /  i  Z^ s  s=2  m  din m s  d£  s  dJ  + (15)  From t h i s i t can be seen that the d e r i v a t i v e o f i o n i c strength with respect to r e a c t i o n progress  i s a f u n c t i o n o f the m o l a l i t i e s o f a l l  aqueous species and not j u s t o f the component species.  17  Equation (15) could now be substituted f o r the d e r i v a t i v e o f i o n i c strength with respect t o r e a c t i o n progress i n equation (14), the mass balance equation.  Rather than make t h i s s u b s t i t u t i o n which r e s u l t s i n  a d e r i v a t i o n s i m i l a r to that o f Helgeson  e t a l (1970), equation (15)  w i l l be introduced as a new c o n s t r a i n i n g equation.  The d e r i v a t i v e o f  i o n i c strength w i t h respect t o r e a c t i o n progress w i l l be t r e a t e d as a new unknown. By avoiding the s u b s t i t u t i o n o f equation (15), the R mass a c t i o n equations (equation (14)) are functions only o f the d e r i v a t i v e s o f the m o l a l i t i e s , of the number o f moles o f the components, and o f the i o n i c strength.  The i m p l i c a t i o n s  of this  will  be discussed  below; but  b r i e f l y , t h i s allows a more e f f i c i e n t algorithm to be used t o p r e d i c t the progress o f the r e a c t i o n .  A c t i v i t y o f Water In many geochemical phases i n the system. essentially  processes a concentrated b r i n e reacts with  During t h i s process the a c t i v i t y o f water i s  constant, and i t s d e r i v a t i v e  progress i s approximately zero.  with  respect t o r e a c t i o n  However, f o r numerical reasons, t h i s  d e r i v a t i v e should s t i l l be considered. In  those  systems where the composition  o f the aqueous phase  changes notably (for example, during the e v o l u t i o n o f a s a l t l a k e ) , the change i n the a c t i v i t y o f water with respect t o r e a c t i o n progress must be known t o adequately p r e d i c t the s o l u t i o n path. The a c t i v i t y o f water i n any system  i s dependent upon the number  of moles o f water and on the number o f moles and a c t i v i t i e s o f a l l  18  other species i n the aqueous phase.  A form of the isothermal  isobaric  Gibbs-Duham equation f o r the aqueous phase can be w r i t t e n to  describe  this: NS  >  n  h i  n  g  and a  species,  0 w  5  5  are the number of moles and respectively.  =  a  din  Solving  the a c t i v i t y of the s t h aqueous  equation  (16)  for  the  logarithmic  d e r i v a t i v e of the a c t i v i t y of water y i e l d s  din  a d C  rr  v  n  +  *2£  Combining equations  NS  >  n  ^ H s=2 n  (8),  2  (4)  din 0  d  a  =  __£  ^  and  (12)  o  (or  (17)  (13). for a  neutral  species) allows the d e r i v a t i v e of the a c t i v i t y of water with respect to r e a c t i o n progress to be w r i t t e n i n the form NS  .0  =  din  a dC  m  s= 2  m  + — 2  I  _  55.51 '  din  m  d  €  A  Z  2  \Trl +  °a  s  B \[l  2  \  dl  J  dZ,  (18)  The d e r i v a t i v e of the a c t i v i t y of water i s a function of the d e r i v a t i v e of i o n i c strength and of the d e r i v a t i v e of the m o l a l i t y of a l l aqueous species.  Equation (18) could be substituted for the d e r i v a t i v e of the  19  a c t i v i t y o f water with respect to r e a c t i o n progress i n equation the mass a c t i o n equation. (18)  will  be  introduced  (14),  Rather than make t h i s s u b s t i t u t i o n , equation as  a  new  c o n s t r a i n i n g equation  and  the  d e r i v a t i v e of the a c t i v i t y o f water with respect to r e a c t i o n progress w i l l be treated as a new unknown.  The arguement f o r t h i s i s the same  as the reason f o r i n c l u d i n g the d e r i v a t i v e of i o n i c strength as a  new  unknown and w i l l be discussed i n d e t a i l below.  S o l i d S o l u t i o n Minerals For the standard s t a t e adopted here, at any given temperature and pressure, the a c t i v i t y o f any phase i n i n t e r n a l e q u i l i b r i u m and e q u i l i b r i u m with the system, i s one. species  1  The  in  a c t i v i t y of the component  d e s c r i b i n g t h i s phase are g e n e r a l l y l e s s than or equal to one.  An exception occurs when one of the components d e s c r i b i n g a phase i s an aqueous species. species permits  In t h i s case, the standard these  activities  to  equal  s t a t e used f o r aqueous or  exceed one.  When a  ?A s o l i d s o l u t i o n endmember i s c o m p o s i t i o n a l l y and c r y s t a l l o g r a p h i c a l l y d i s t i n c t and i s a compositional extreme point i n the set of a l l p o s s i b l e compositions of the s o l i d s o l u t i o n phase. A s o l i d s o l u t i o n species i s compositional d i s t i n c t w i t h a unique s t r u c t u r a l symmetry i n t h i s space. The set of a l l s o l i d s o l u t i o n species includes the set of a l l s o l i d s o l u t i o n endmembers. S o l i d s o l u t i o n components are the set of components used to describe the s o l i d s o l u t i o n phase. T y p i c a l l y , s o l i d s o l u t i o n endmembers are chosen as d e s c r i p t o r s f o r s o l i d s o l u t i o n components. The number of s o l i d s o l u t i o n species or of s o l i d s o l u t i o n endmembers i s always equal to or greater than the number of s o l i d s o l u t i o n components (Brown and Greenwood, i n preparation). In t h i s paper the s o l i d s o l u t i o n components are chosen as component species to describe the e n t i r e system whenever a s o l i d s o l u t i o n phase i s i n e q u i l i b r i u m w i t h the system. The s i t u a t i o n of two or more s o l i d phases i n e q u i l i b r i u m with the system and sharing components w i l l not modify the equations developed. I t w i l l modify the method i n which these equations are solved however, and i s discussed below.  20  component has the same composition as the phase i t describes (as with any s t o i c h i o m e t r i c phase), then the a c t i v i t y o f the component i s equal to one. Rather than solve e x p l i c i t l y f o r the a c t i v i t i e s o f the components i n a s o l i d phase, these a c t i v i t i e s w i l l be related to the mole f r a c t i o n and, u l t i m a t e l y , to the t o t a l number o f moles o f the components i n the s o l i d phase. The  activity  of  the j t h s o l i d  solution  species  (a)  in a  ^-component s o l i d s o l u t i o n mineral i s given by  a. J  X.X.  =  J  >  (19  J  x. and X . are the mole f r a c t i o n and the a c t i v i t y c o e f f i c i e n t o f the i t h J J s o l i d s o l u t i o n species, r e s p e c t i v e l y . The  mole  fraction  of  the j t h s o l i d  solution  species  in a  ^-component s o l i d s o l u t i o n mineral i s r e l a t e d to the number o f moles o f each species i n the s o l i d s o l u t i o n by x.  J  =  n. ^  (20)  The change i n the a c t i v i t y o f the &th s o l i d s o l u t i o n species can be r e l a t e d to the change i n the a c t i v i t y c o e f f i c i e n t o f that species and to the change i n the number o f moles o f a l l s o l i d s o l u t i o n species i n the s o l i d  solution.  f r a c t i o n term i n equation  By s u b s t i t u t i n g equation  (20) f o r the mole  (19) and taking the d e r i v a t i v e with respect  to r e a c t i o n progress, y i e l d s  21  din  a . 2  din  X .  din  2  greater  n . i  (21)  1=1  i s no generally  mineral with  din  2  +  d£  There  n.  accepted  solid  then two s o l i d  solution  solution  model  species,  cases, there i s i n s u f f i c i e n t data t o make such models.  f o r any  and i n most  Data e x i s t s f o r  many binary s o l i d s o l u t i o n minerals and the Margules model (Thompson, 1967)  i s commonly used  Margules model w i l l  t o represent  be used  these  to i l l u s t r a t e  phases.  An asymmetric  the d e r i v a t i o n  o f the  d e r i v a t i v e o f the a c t i v i t y c o e f f i c i e n t taken with respect t o reaction progress. including  Any other those  solution  i n which  model  could  be used  the number o f s o l i d  equally  solution  well,  species i s  greater then the number o f s o l i d s o l u t i o n components. In a binary 80a)  asymmetric s o l i d  r e l a t e s the a c t i v i t y  s o l u t i o n , Thompson (1967, equation  c o e f f i c i e n t and the mole f r a c t i o n o f the  f i r s t s o l i d s o l u t i o n species by a  R T  I n Xi  =  X  2  (WG  +  2  2  (WG  -  2  WGi)  x  T i s the temperature i n K e l v i n s and R i s the gas constant, number o f possible mixing s i t e s .  viG\ and WG  2  (22)  X)  a i s the  are the Margules excess  free energy parameters f o r the f i r s t and second species o f a s o l i d solution, respectively. (22)  and taking  binary  S u b s t i t u t i n g equation (20) into equation  the d e r i v a t i v e with  respect t o the progress v a r i a b l e  allows the d e r i v a t i v e o f the a c t i v i t y c o e f f i c i e n t o f the f i r s t  solid  s o l u t i o n species t o be w r i t t e n i n terms o f the number o f moles o f both  22  component species: din Ax  2 X  Xi  2  din 3  R T  a  +  *x  fVGi  -  IVC?!  3  n2  ~dT~  (23) 2 AT #x a  The equation  R  din  1  2  3  T  Xi  WG  +  2  WG  -  1  3  IVGx  Xx  ni  dC  f o r the second species o f a binary s o l i d  solution i s  i d e n t i c a l i n form to equation (23) with only the s u b s c r i p t s "1" and "2" interchanged. and  S i m p l i f y i n g equation  substituting  equation  (21) f o r a binary s o l i d  solution  (23) f o r the d e r i v a t i v e s o f the a c t i v i t y  c o e f f i c i e n t s allows the d e r i v a t i v e o f the a c t i v i t y o f the f i r s t  solid  s o l u t i o n species with respect to r e a c t i o n progress f o r a binary s o l i d s o l u t i o n to be w r i t t e n as 2  din a X  d5  ~  2  din 72  *x  X  2  a R  3  T  Xi  WG  +  2  3  WGi  Xi  WGi  1  d5  (24) X  2  Equation  -  2X$ 2 a  R  (24)  dlri nr  *1 3  T  can  .Xx  be  WG  2  +  1  ~  WG  substituted  components formed from species o f s o l i d (14).  The  result  i s the general  3  l  X  W  G  l  f o r the a c t i v i t y  of  the  s o l u t i o n phases i n equation  mass  action  equation  f o r any  non-component aqueous species when the component basis i s composed o f s t o i c h i o m e t r i c and binary s o l i d s o l u t i o n minerals, aqueous species and water.  The r e s u l t i n g equation i s  23  m  din  d  +  l  '™  n  c=2  din a -£  dZ  H 0,S  +  £22  V  2  dK  NC  +  2.303  C  +  s  c s  c=2  s  ncSp  +  f  1  iVP  s +  c  dJ  c  d£  B  a s  end  *3-i,4> 9=1  z2  L ^ l a  i=l  3  X•  , WG_  . A  . ,  +  WG.  3-1 3 - i ,9  a  ,9  1,9  , IVG. , 1,9  3 A  1  , 9  X.  WG  i  *  / f  j,  3 X.  •2,9  i? T  din  3 X.  -  1,9  3-1, t)  1  i? T  n  7  U  din i  /  i / 9"  d5  9  . WG 3-1  n  ,9  +•• WG .  1,9  (25) 3-i,9  d5  Equation (25) has been derived using a binary solid solution model. I f the phase being considered i s a stoichiometric phase, then the solid solution term in equation (25) i s zero.  This can be accomplished by  letting end^ equal one, the mole fraction of the f i r s t solid solution  x  24  species (X^ ^ equal one, and the second ( _ x  3  I t i s important  i  ^  equal zero.  to note that when a s o l i d s o l u t i o n phase i s i n  e q u i l i b r i u m with the system a l l s o l i d s o l u t i o n species are needed t o c a l c u l a t e the d e r i v a t i v e of the unknown aqueous species with respect to r e a c t i o n progress.  This i s the case even though only one of the s o l i d  s o l u t i o n species may be involved d i r e c t l y i n the r e a c t i o n forming that aqueous species. Equation  (25) has been derived using the l o g a r i t h m i c d e r i v a t i v e  with respect to r e a c t i o n progress f o r the s o l i d phases.  When the phase  has reached s a t u r a t i o n the logarithmic d e r i v a t i v e of the change i n mass of each component of a s o l i d s o l u t i o n phase i s i n f i n i t e .  I f the normal  d e r i v a t i v e i s used, the s o l i d s o l u t i o n term i s d i v i d e d by the number of moles of that s o l i d s o l u t i o n species present, and infinite coefficient. phase i s assumed to be saturation.  t h i s r e s u l t s i n an  To avoid t h i s d i f f i c u l t y a t r i v i a l amount of the formed when any s o l i d  s o l u t i o n phase reaches  This amount i s subtracted from the t o t a l amount of that  phase when more of that phase has p r e c i p i t a t e d .  The problem does not  e x i s t f o r any s t o i c h i o m e t r i c phase i f the "normal" d e r i v a t i v e i s used because the a c t i v i t y of these phases i s one and  i s not a f u n c t i o n of  composition. Equation  (25) assumes that a l l phases are i n i n t e r n a l e q u i l i b r i u m  and i n e q u i l i b r i u m with the system and that a zoned c r y s t a l can not be present.  This equation could be modified to a l l o w zoning by assuming  each packet o f s o l i d s o l u t i o n phase produced was previous packet.  independent of  the  Then as the phase reacts i t would be d i s s o l v e d i n the  reverse order of the p r e c i p i t a t i o n order.  A  25  THE GENERAL SOLUTION The d e r i v a t i v e o f the number of moles or o f the m o l a l i t y o f a l l phases and species has been treated progress.  A l l other v a r i a b l e s  as only a function  of reaction  (temperature, pressure and t o t a l number  of moles o f the components) have been assumed to be constant.  Thus,  given a known amount o f a phase or species i t i s possible to c a l c u l a t e i t s amount a t any subsequent stage o f reaction by means o f a s e r i e s expansion With  i n the d e r i v a t i v e s with respect to the progress  infinitely  derivatives conditions  precise  computations  the Taylor's i s a serious  Expansion  and  an  infinite  i s exact.  disadvantage  shared  Lack  variable. number  o f these  to some extent  of two  by a l l  methods.  However the c l a r i t y o f the Taylor's Expansion and i t s ease o f  expansion  to any number of d e r i v a t i v e s are the reasons  here.  A Taylor's Expansion  f o r using i t  i n the number o f moles o f a phase a t a  given value o f r e a c t i o n progress can be w r i t t e n as dn r+AF  fl  5  +  = A  n  P  S  +  A  ?  —  CA£)  dn 2  +  +  cU  5  2  2!  cU  +  2  (26) (AO  J  dn J  +  ;  j!  dt  J  n^ i s the t o t a l number o f moles when the reaction progress v a r i a b l e has a value o f 5 ;  n  w i l l  v a r i a b l e has a value o f progress v a r i a b l e .  ——  be the number o f moles when the progress 5 + A£ . Ag  i s equal to the change i n the  i s the j t h d e r i v a t i v e o f the number o f moles  w i t h respect to reaction progress evaluated a t n = n . Once a l l d e r i v a t i v e s are known, the function can be predicted and  26  solved accurately using the Taylor's Expansion. considering  The e r r o r produced by  a f i n i t e number o f terms i s l e s s than the value o f the  f i r s t term not considered.  Therefore when following the f u n c t i o n , an  error l i m i t can be e s t a b l i s h e d , and the s e r i e s evaluated only to the order o f d e r i v a t i v e whose value i s l e s s than that or the e r r o r .  This  w i l l help optimize c a l c u l a t i o n s w i t h i n the error l i m i t s e s t a b l i s h e d .  The F i r s t D e r i v a t i v e The d e r i v a t i v e s of the NC mass balance equations, o f the i o n i c strength equation, of the a c t i v i t y o f water equation and o f the R mass a c t i o n equations (equations 6, 15, 18, 25, respectively) form a system of NC + 2 + R equations.  These equations are l i n e a r with  respect to  the NC d e r i v a t i v e s o f the number o f moles o f the components (or o f the m o l a l i t y o f the components), to the d e r i v a t i v e o f i o n i c strength, to the d e r i v a t i v e o f the a c t i v i t y o f water, and to the R d e r i v a t i v e s o f the m o l a l i t y o f the non-component species. linear  i n the unknown  derivatives,  unknowns can be w r i t t e n and solved  this  Because these equations are system  o f equations and  i n matrix notation.  and the f o l l o w i n g d i s c u s s i o n i n d i c a t e s the format.  Equation (27)  27  c -1-  CM  (27)  +  In matrix A and i n vectors B and C, rows 1 to NC are formed from the d e r i v a t i v e s of the Mass Balance equation  (equation 6 ) .  Row  NC + 1  i s formed from the d e r i v a t i v e of the Gibbs-Duhem equation c o n s t r a i n i n g the a c t i v i t y of water (equation 18). d e r i v a t i v e of the equation aqueous phase (equation 15). derivatives  of  the  Row  NC + 2 i s formed from the  c o n s t r a i n i n g the  ionic  strength of  the  The remaining rows are formed from the R  Mass A c t i o n  equations  for  every  non-component  species (equation 25). Matrix equations  A  contains  the  (6), (18), (15) and  coefficients (25).  of  the  d e r i v a t i v e s from  Columns 1 to NC - l contain the  c o e f f i c i e n t s of the d e r i v a t i v e s i n the number of moles or m o l a l i t y of the  component phases or  species.  Column  NC  i s reserved  for  the  28  c o e f f i c i e n t s of the d e r i v a t i v e of the number of moles of water and i t water i s not a component, then the NC  +  1  i s reserved  a c t i v i t y of water;  f o r the  NCth  component w i l l be here.  c o e f f i c i e n t s of  the  Column  d e r i v a t i v e of  the  column NC + 2 i s reserved f o r the c o e f f i c i e n t s of  the d e r i v a t i v e of i o n i c strength.  The  remaining R columns contain  the  c o e f f i c i e n t s of the d e r i v a t i v e s of the m o l a l i t i e s of the non-component species.  Inspection  dimensioned R by  of  R and  eguation located  (25)  shows  i n lower  left  that  partition  of matrix A,  Y,  is  an  i d e n t i t y matrix. Vector B contains taken with  respect  a l l of the unknown d e r i v a t i v e s that have been  to  the  p o s i t i o n s i n t h i s vector (d l n n/d 0  are  The  water (d l n n  f i r s t NC  -  i  of the component phases  NC + 1 p o s i t i o n i s the d e r i v a t i v e of the a c t i v i t y o f  /d Q .  (di/dE,).  The  The NC + 2 p o s i t i o n i s the d e r i v a t i v e of i o n i c remaining p o s i t i o n s are the d e r i v a t i v e s of  log m o l a l i t i e s of the non-component species Vector C contains f i r s t NC  The  the d e r i v a t i v e s of the number of moles  or of the m o l a l i t i e s (d l n m/dZ)  and species.  strength  progress v a r i a b l e .  positons  are  the  (d l n m/dK).  the  constant terms from each equation.  the  change i n the  moles of  each  component as a r e s u l t of the decrease i n the reactant minerals.  The  remaining p o s i t i o n s are zero.  are  The  number of  The  i n d i v i d u a l terms i n t h i s vector  on the l e f t hand side of the equal sign i n equations (6), (18), and  (15)  (25). If  two  or  more phases  i n equilibrium  with  the  system  share  components or i f a s o l i d s o l u t i o n phase has more s o l i d s o l u t i o n species than s o l i d s o l u t i o n components, p a r t i t i o n Y of matrix A w i l l not be i d e n t i t y matrix.  However, by  s u b s t i t u t i n g equation  (26)  for  the  those  29  p a r t i c u l a r non-component s o l i d  s o l u t i o n species, p a r t i t i o n Y can  recast i n t o an i d e n t i t y matrix.  be  In.general, r e c a s t i n g i s not p o s s i b l e  i f a s o l i d s o l u t i o n phase has two or more non-component species.  Under  these conditions p a r t i t i o n s U, V and W of matrix A must be expanded to include  the  coefficients  of  the  d e r i v a t i v e s of  these  species  and  p a r t i t i o n Y w i l l be correspondingly smaller. The matrix  unknown d e r i v a t i v e s i n vector B can be solved by A  directly  and  m u l t i p l y i n g by  inverting  matrix  A,  vector the  C  (equation  inverse can  be  27).  inverting  Rather  than  c a l c u l a t e d by  a  p a r t i t i o n i n g method which only involves the d i r e c t inverse o f a matrix of dimensions NC + 2. i n v e r t a matrix  Because the  computer time  used to  directly  i s p r o p o r t i o n a l to the cube of the matrix s i z e , a  s u b s t a n t i a l amount of time i s saved. 1  Inversion by p a r t i t i o n i n g  is  discussed  i n most matrix algebra t e x t s (for example: Hadley, 1961).  Equations  (28) to (32), i n c l u s i v e , i n d i c a t e the method of s o l u t i o n .  •'•The inverse of the i d e n t i t y matrix i s the i d e n t i t y matrix and any matrix m u l t i p l i e d by the i d e n t i t y matrix remains unchanged. Due to the i n t r o d u c t i o n of the d e r i v a t i v e s of the a c t i v i t y of water and of the i o n i c strength as unknown d e r i v a t i v e s , p a r t i t i o n Y of matrix A (equation 26) i s the i d e n t i t y matrix. Equations (29) through (32) i n c l u s i v e , take advantage of t h i s . I f p a r t i t i o n Y was not the i d e n t i t y matrix, then each of these equations would have inverse terms, and would r e s u l t i n a method of s o l u t i o n which would involve the inverse of a l l elements of matrix A. There would be no savings of computer processing time i n s o l v i n g the problem.  30  B  A  -l  NC+2  L (28)  where:  and:  ,J  =  (U  L  =  -W  -  V  W)  -1  (29) (30)  J  (31) and:  K  and:  M  -J =  I  V W K  (32)  Where I i s the identity matrix and the superscript "-1" indicates the inverse of the specified matrix. The derivative of the molalities of the non-component species can be independently calculated from equation (25) after the derivative of the molality and the number of moles of the component phases and species, the ionic strength and the a c t i v i t y of water are known. Thus, the derivatives of the molalities of the non-component species computed  31  from equations equation  (28) to (32) can be compared with those c a l c u l a t e d from  (25)  to  allow  an  estimation  of  the  numerical  error.  Appropriate a c t i o n can be taken i f t h i s e r r o r i s too l a r g e . The complete inverse of matrix A does not need to be c a l c u l a t e d because o n l y the d e r i v a t i v e s of the m o l a l i t i e s and the number of moles of the component species and phases, the d e r i v a t i v e of i o n i c strength and  the d e r i v a t i v e of the  completely  determine  the  activity system.  of water need Instead,  to be  i f only  p a r t i t i o n s of the inverse of matrix A are determined, d e r i v a t i v e s can be c a l c u l a t e d from equation (25).  the  known to J  and  K  then a l l other  This i s the same as  the rearrangement and s u b s t i t u t i o n of equation (25) f o r the d e r i v a t i v e s of the m o l a l i t i e s of a l l of the balance, a c t i v i t y of water and 18,  and  15,  respectively).  non-component species  i o n i c strength equations This  reduces  the  i n the mass (equations  system  to NC  +  6, 2  c o n s t r a i n i n g equations and NC + 2 unknown d e r i v a t i v e s . I f t h i s s u b s t i t u t i o n i s made, and because these  N C  + 2  are l i n e a r and share v a r i a b l e s , f u r t h e r rearrangement and can take place t o reduce the number of equations. reduction l e s s  information about the  system  information must be c a l c u l a t e d independently Because information about a l l of the  equations  substitution  With each l e v e l of  i s available,  to  this  whenever i t i s needed.  component phases and  species,  i o n i c strength, and the a c t i v i t y of water are needed at each step to t e s t f o r mineral s a t u r a t i o n and t o determine the s i z e of the next step, no saving i n the number of c a l c u l a t i o n s are obtained by reducing  the  system below NC + 2 equations and unknowns. By  reducing  considerable  the  reduction  system in  to  NC  computer  +  2  equations  storage  is  and  unknowns  realized.  The  32  disadvantage  i n this  reduction i s that the numerical  error  can no  longer be estimated.  Higher Order D e r i v a t i v e s Higher order d e r i v a t i v e s can be obtained by taking the d e r i v a t i v e with respect to r e a c t i o n progress o f the preceding order o f d e r i v a t i v e . For  example, to obtain the second  derivative  equation, the d e r i v a t i v e o f equation progress i s taken. mass a c t i o n ,  mass  o f the mass  action  (25) with respect to r e a c t i o n  The general form f o r any order o f d e r i v a t i v e o f the balance,  ionic  strength and a c t i v i t y  o f water  equations are given i n appendix 1. The equations c o n s t r a i n i n g the higher order o f d e r i v a t i v e s can be solved i n a manner i d e n t i c a l to that f o r the f i r s t d e r i v a t i v e .  I f the  d e r i v a t i v e of equation (27) i s taken and rearranged to solve f o r the second  derivative  o f the number  o f moles  (or m o l a l i t y )  of the  components, the i o n i c s t r e n g t h , the a c t i v i t y o f water and the m o l a l i t y of the component species (contained i n the vector B'), we have  B'  Where  1  (33)  i n d i c a t e s the f i r s t d e r i v a t i v e o f the terms i n that matrix.  The d e r i v a t i v e o f equation for  A1  (33) can be taken and rearranged to solve  the t h i r d d e r i v a t i v e s o f the number o f moles (or m o l a l i t y ) of the  components, the i o n i c s t r e n g t h , the a c t i v i t y o f water and the m o l a l i t y of the non-component species (contained i n the vector B " ) .  It is  33  A  B"  A" B  1  2  +  B  A'  Where " i n d i c a t e s the second d e r i v a t i v e of the terms i n that matrix. Successive d e r i v a t i v e s can be found s i m i l a r l y .  I t i s important to note  that matrix A needs only to be inverted once and  i s used to solve any  order o f the d e r i v a t i v e s . Each successive d e r i v a t i v e of equation introduces  only  derivative  of  computed  or  evaluating  one  the  term  that  terms i n matrix  solved each  new  in  order  the of  must A.  be  calculated:  A l l other  previous  order  derivatives  is  of  the  (27) kth  terms have been  derivatives.  rapid,  and,  Thus  therefore,  s u f f i c i e n t terms can be used to a c c u r a t e l y represent the f u n c t i o n .  I n i t i a l S o l u t i o n Composition Given the t o t a l number of moles or the a c t i v i t y of each of component phases and species  can  equations.  be  species, the m o l a l i t y of each of  c a l c u l a t e d using  Many d i f f e r e n t  the  authors  Mass A c t i o n (Van  Zeggern  aqueous  and  Mass Balance  and  Story,  Ting-Po and Nancollas, 1972; Wolery and Walters, 1975) d i f f e r e n t methods to solve this, type of problem.  the  the  have  1970;  presented  In conjunction with  the mass t r a n s f e r c a l c u l a t i o n s a m o d i f i c a t i o n of the method of Wolery and Walters (1975) has been found to be the most convenient f o r f i n d i n g the d i s t r i b u t i o n of species.  The m o d i f i c a t i o n i s the changing of the  component b a s i s  solid  to  include  phases  in  e q u i l i b r i u m with  s o l u t i o n , to include aqueous species whose a c t i v i t i e s are fixed,  and  to  include c o n s t r a i n t s on  the  activity  of  the  known and  water.  The  34  remaining  components  are given  by a chemical  analysis  and charge  balance r e s t r i c t i o n s . Generally, the i n i t i a l s o l u t i o n composition includes elements from all  phases i n the system even i f the amount i s t r i v i a l .  I f i t does  not, then when the f i r s t amount o f that element i s d i s s o l v e d i n t o the aqueous phase a d i s t r i b u t i o n o f species c a l c u l a t i o n must be performed. This i s necessary because on a d d i t i o n o f a new element to the system, the  function  describing  reaction  progress  i s discontinuous  in  all  d e r i v a t i v e s a t that point. During the mass t r a n s f e r c a l c u l a t i o n s , e r r o r i n the m o l a l i t y o f each aqueous species gradually accumulates even though the t o t a l number of moles o f each component  i s known e x a c t l y .  This  s i g n i f i c a n t i n species present i n low concentration.  error  i s most  When t h i s e r r o r  becomes too l a r g e , a d i s t r i b u t i o n o f species can be done t o c o r r e c t the m o l a l i t y o f each aqueous species.  In a d d i t i o n , when a phase  first  becomes saturated with respect t o the aqueous phase, a d i s t r i b u t i o n o f species can be c a l c u l a t e d with that new phase as part o f the component basis.  This  ensures that  the s o l u t i o n i s i n e q u i l i b r i u m with the  components and that i t i s s t i l l  on the function constrained  by the  reaction.  P r e d i c t i o n o f Saturation The  activity  quotient  o f any s t o i c h i o m e t r i c  phase  can be  c a l c u l a t e d using equation (7). When t h i s a c t i v i t y quotient i s equal to the e q u i l i b r i u m constant,  then the s t o i c h i o m e t r i c phase has saturated  with respect t o the aqueous phase. of  a l l solid  s o l u t i o n species  In a s i m i l a r manner, the a c t i v i t i e s  o f a phase can be c a l c u l a t e d  with  35  equation  (7).  Then by i t e r a t i v e  techniques  the e n t i r e  compositional  range of the s o l i d s o l u t i o n must be checked f o r s a t u r a t i o n . The above technique,  however  Consequently, time.  is  iterative  and  is  required  at  every  step.  t h i s checking consumes considerable computer processing  A l t e r n a t i v e l y , a m o d i f i c a t i o n of the method of Brown and Skinner  (1974) can be used and  i s much more e f f i c i e n t .  phase  respect  saturates  with  to  an  When a s o l i d  aqueous  phase,  the  solution chemical  p o t e n t i a l plane defined by the aqueous phase i s t a n g e n t i a l to the Gibbs free energy surface of the s o l i d s o l u t i o n phase.  Given t h i s , o n l y the  points of the Gibbs free energy surface of the s o l i d which have a p a r a l l e l  s o l u t i o n phase  tangent to the chemical p o t e n t i a l plane of the  aqueous phase need to be tested f o r s a t u r a t i o n . The p o i n t s on the Gibbs f r e e energy surface of the s o l i d s o l u t i o n phase which have tangents p a r a l l e l to the chemical p o t e n t i a l plane of the aqueous phase w i l l change change t h e i r p o s i t i o n on t h i s surface as the composition  of the aqueous phase changes.  However, once  these  points of tangency are known f o r a given value of r e a c t i o n progress, they can be predicted at any future value using a Taylor's s i m i l a r to equation than  iteratively  prog ress  (26).  checking  expansion  This i s a l i n e a r problem and i s much f a s t e r f o r s a t u r a t i o n at  each step of r e a c t i o n  36  CONCLUDING REMARKS The equations developed above t o describe isothermal-isobaric rock water i n t e r a c t i o n have s e v e r a l major advantages over e x i s t i n g methods. The p r i n c i p a l o f these, the c o r r e c t i n c l u s i o n o f the changing  activity  and mass o f water, allows dehydration reactions and evaporation t o be considered c o r r e c t l y .  The speed o f the computational method presented  i s p r o p o r t i o n a l t o the number o f components plus two (NC + 2) and i s relatively system.  independent  o f the number o f species and phases i n the  The method presented by Helgeson e t a l (1970) i s p r o p o r t i o n a l  to the t o t a l number o f species and phases i n the system, which i s o f t e n an  order o f magnitude greater than  computation  method presented  the number o f components.  here allows a s u b s t a n t i a l  The  reduction i n  computer processing time and provides a saving i n computer storage f o r any  given  problem,  thus  allowing  c o n s i d e r a t i o n o f more  complex  problems. A computer program embodying these equations has been w r i t t e n i n the FORTRAN language and i s described i n Appendix 2. program comprises Appendix 3.  A l i s t i n g o f the  37  SELECTED REFERENCES Brown, T.H., and Greenwood, H.J. 1981. S o l i d Solutions. In preparation.  A Reinvestigation  of  Ideal  Brown, T.H., and Skinner, B.J. 1974. Theoretical P r e d i c t i o n of E q u i l i b r i u m Phase Assemblages i n Multicomponent Systems. American Journal of Science, 274, p. 961-986. De Donder, Th. 1920. Lecons de Thermodynamique e t de Chimie-Physique. Gauthier-Viliars. De  Donder, Th., and Van Theory of A f f i n i t y .  Rysselberghe, P. Stanford.  1936.  The  Thermodynamic  F o u i l l a c , C , Michard, G., and Bocquier, G. 1977. Une methode de simulation de 1'evolution des p r o f i l e s d ' a l t e r a t i o n . Geochimica et Cosmochimica Acta, 41, pp. 207-213. G a r r e l s , R.M., and Mackenzie, F.T. 1967. Compositions of Some Springs and Lakes. S e r i e s , 67, pp. 222-242.  O r i g i n of the Chemical In Advances i n Chemistry  Greenwood, H.J. 1975. Thermodynamically V a l i d P r o j e c t i o n s Extensive Phase Relationships. American M i n e r a l o g i s t , 60, 1-8. Hadley, G.  1961.  Linear Algebra.  Addison-Wesley, 290  of pp.  p.  Helgeson, H.C. 1968. Evaluation of I r r e v e r s i b l e Reactions i n Geochemical Processes Involving Minerals and Aqueous S o l u t i o n s — I . Thermodynamic Relations. Geochimica et Cosmochimica Acta, 32, pp. 853-877. Helgeson, H.C. 1969. Thermodynamics of Hydrothermal Systems at Elevated temperatures and Pressures. American Journal of Science, 267, pp. 729-804. Helgeson, H.C. 1970. A Chemical and Thermodynamic Model of Ore Deposition i n Hydrothermal Systems. M i n e r a l o g i c a l Society of America Special Paper 3, pp. 155-186. Helgeson, H.C, Brown, T.H., N i g r i n i , A., and Jones, T.A. 1970. C a l c u l a t i o n of Mass Transfer i n Geochemical Processes Involving Aqueous Solutions. Geochimica et Cosmochimica Acta, 34, pp. 569-592. Helgeson, H.C, G a r r e l s , R.M., and Mackenzie, F.T. 1969. Evaluation of I r r e v e r s i b l e Reactions i n Geochemical Processes Involving Minerals and Aqueous S o l u t i o n s — I I . A p p l i c a t i o n s . Geochemica et Cosmochimica Acta, 33, pp. 455-481.  38  Helgeson, H.C., and Kirkham, D.H. 1976. T h e o r e t i c a l P r e d i c t i o n s of the Thermodynamic P r o p e r t i e s of Aqueous E l e c t r o l y t e s a t High Pressures and Temperatures. III.Equations of State f o r Aqueous Species a t I n f i n i t e D i l u t i o n . American Journal of Science, 276, pp. 97-240. Karpov, I.K., Kaz'min, L.A. And Kashik, S.A. 1973. Optimal Programming f o r Computer C a l c u l a t i o n s of I r r e v e r s i b l e Evolution i n Geochemical Systems. Geochemistry International, 10, pp. 464-470. Parkhurst, D.L., Plummer, L.N., and Thorstenson, D.C. 1978. Chemical Models i n Ground-Water Systems. Geological Society of America A b s t r a c t s , 7, pp. 468. P f e i f e r , H.R. 1977. A Model f o r F l u i d s i n Metamorphosed Ultramafic Rocks. Observations a t Surface and Subsurface Conditions (High pH Spring Waters). Schweiz. Mineral. Petrogr. M i t t . , 57, pp. 361-396. Prigogine, I . , and Defay, R. 1954. Chemical Thermodynamics, t r a n s l a t e d by D.H. Everett. Longmans Green. 543 p. Thompson, J.B. 1967. Thermodynamic Properties o f Simple S o l u t i o n s . In Researches i n Geochemistry, edited by P.H. Abelson, I I , pp. 340-361, John Wiley. Ting-Po, I . , and Nancollas, G.H. 1972. Equil - A General Computational Method For the C a l c u l a t i o n of S o l u t i o n E q u i l i b r i a . A n a l y t i c a l Chemistry, 44, pp. 1940-1950. Van Zeggeren, F., and Storey, S.H., 1970. The Computation o f Chemical E q u i l i b r i u m . Cambridge, England, Cambridge U n i v e r s i t y Press, 176 PV i l l a s , R.N., and Norton, D. 1977. I r r e v e r s i b l e Mass Transfer Between C i r c u l a t i n g Hydrothermal F l u i d s and the Mayflower Stock. Economic Geology, 72, pp. 1471-1504. Wolery, T.J., and Walters, L . J . , J r . 1975. C a l c u l a t i o n o f E q u i l i b r i u m D i s t r i b u t i o n of Chemical Species i n Aqueous Solutions by Means o f Monotone Sequences. Journal of Mathematical Geology, 7, pp. 99-115.  39  APPENDIX 1 The main body o f t h i s t h e s i s has discussed  the developement o f the  f i r s t d e r i v a t i v e o f the mass a c t i o n , mass balance, i o n i c strength and a c t i v i t y o f water equations taken with methods used  f o r the numerical  examination o f the Taylor's  t o reaction progress and the  solution  o f these  equations.  By  expansion (equation (26)), i t i s apparent  that by increasing the number o f d e r i v a t i v e s used i n the expansion, the e r r o r f o r a given step s i z e w i l l be smaller.  A l t e r n a t e l y , a large step  s i z e can be taken w i t h i n a given e r r o r l i m i t i f more d e r i v a t i v e s are used i n c a l c u l a t i n g the expansion. For these reasons, the general form f o r the kth d e r i v a t i v e o f the mass balance,  mass a c t i o n ,  ionic  strength  equations are presented i n t h i s appendix. derived and generalized  and a c t i v i t y  o f water  These equations have been  i n the simplest form p o s s i b l e .  As a r e s u l t o f  t h i s s i m p l i f i c a t i o n , many d e r i v a t i v e s have been expressed as "normal" d e r i v a t i v e s rather than "logarithmic" d e r i v a t i v e s . Some o f the summation signs i n t h i s appendix use an expression t o c a l c u l a t e the upper l i m i t o f the summation.  Integer a r i t h m e t i c must be  used to c a l c u l a t e these l i m i t s . The general form o f many o f the equations i n t h i s appendix have been w r i t t e n as functions o f other equations. reasons o f space and c l a r i t y .  This has been done f o r  Thus, to obtain the f u l l general form,  one equation must be substituted i n t o another. The  first  "normal"  derivative  "logarithmic" d e r i v a t i v e by  can be  related  to the  first  40  Al  A  =  an  n  (  din  1  _  A  )  n  Higher order "normal" derivatives can be related to the corresponding "logarithmic" derivatives by  ,k  d n  \  _____  ,k-i  d  = 7  n  ,i .  d  ln n  (1-B) v  '  (k - i ) ! ( i - 1) !  where  o  d n =  n  .  d  k n  y  and d "in n  are the kth derivative and the  kth logarithmic derivative of n taken with respect to the progress variable, respecively.  41  Ionic Strength The  first  d e r i v a t i v e on  ionic  strength taken with respect to  r e a c t i o n progress i s given i n equation  (15).  The kth  d e r i v a t i v e of  i o n i c strength taken with respect to reaction progress can be w r i t t e n as k  NS  0  The  "normal"  +  derivative  of  the  m o l a l i t i e s taken  (1-C)  with  respect  to  r e a c t i o n progress can be converted to "logarithmic" d e r i v a t i v e s by the s u b s t i t u t i o n of equation (1-B) f o r the "normal" d e r i v a t i v e s .  42  Mass Balance The  f i r s t derivative of the mass balance equation taken with  respect to reaction progress has been presented previously as equation (6).  The general form for the kth derivative of the mass balance  equation taken with respect to reaction progress can be written as  E  k d n  v  55.51  _  -  ^^3ft-  NS  N  S  s  k  1  _  k  ,  9 ,c  n  i , cf>  r  •  i  k-i  k  ~  55.51 v . ,  i=l  _7 • =2  k  = - T^y^ 9=1  dn  (* -  j) ! j !  ___iUP d^" ' 7  d  s  m  • d^'  As before, the "logarithmic" derivative can be substituted "normal" derivative using equation (1-B).  (1-D)  for any  43  A c t i v i t y of Water The  f i r s t derivative of the a c t i v i t y of water taken with respect  to reaction progress has been presented previously  as equation  (18).  The general form for the kth derivative can be writen as d  o  L  n  a  H  O  =  V-  1  A  + dt  d  s  •  m  >  dz  55.51  k  k  s= 2  f JL^  2 .303  ^  55.51  ^ s=2 0  \«  .  ,  Vi = 1  df*( j) corresponds  (Jfc (k V -  - i Cv - i - / ) ! •  to the kth  activity  1) !  d  1) -  U  _  i  )  i77  d£^  s  d  1  d?  1  derivative of the extended  equation  for  coefficients  following  equation describes the  Jcth  in  an  aqueous  f(j) 2  (1-E)  Debye-Huckel  solution.  The  derivative of the Debye-Hiickel  model where k i s l e s s than or equal to four.  The inequality following  each term indicates the lowest order of derivative that the term can be used i n .  44  f  (^)  /  dg(j)\  c  i  d*  + ic  d'g(j)  +  J  d  j  ?  *-j  "  d?  J^i  d£*  J  1  j  7  ""2 d  d  >  QCJ,*-J)  .  J  k-i +  d g(l) 3  d?  ^  f-f  d  I  1  "d  d^  1  j  _  d?  J  i  d*^- 1  d?  J  k >  d'g(x)  W  d ^ J  k-h 3  d  i-  k-h-i 2 j d  d  * - i - i -  h  3  -  +  w  ^  h  ~  ^  ~ d i ^ ^  Q(h,i,'j,k-j-i-h)  (1_ k  +  P  F )  > 4  .....  was discussed and defined i n the text following equation (12). To  be consistent with this d e f i n i t i o n , second and higher order derivatives of C are zero and have not been included. Q(h,i,j,k-j-i-h)  Q  (J, - i), Q (i,j,k-j-i) k  and  are numerical constants and are defined i n table I I .  k —  g (J) represents the leading terms of the derivatives of the extended Debye-Huckel equation.  I t i s defined by  45  k-1 d  k  g ( i )  A  Z'  (~2 ) k  .KCh.Jt)  Fl  +  %  (°a s  B  s  B)  Cl)~  h  h/1  k+l  K(h,i) i s a s e t of numerical constants and i s defined i n t a b l e I I .  (1-G)  46 Table I I  Q(j,k-j) j  i s defined by the f o l l o w i n g . k-j  Q(j,k-j)  1  1 3 4  2  3 Q(i, j,k-j-i) i  j  k-j  Q(j,k-j)  2 4 3  2 1 2  3 5 10  i s defined by the f o l l o w i n g ,  j  k-j-i  1 1  1 2  Q(i , j , k - j - i )  1 6  Q(l,1,1,1) = 1  j  k-j-i  1 2  3 2  Q(l,1,1,1,1) = 1  Q ( l , l l , 2 ) = 10 f  [<( h, i) i s defined i n the f o l l o w i n g matrix. i<( ,D K(0, Kd, K(2, K(3, K(4,  ) ) ) ) )  1 -  -  K(  ,2)  1 3 -  K( ,3) 3 12 15 -  Q(i , j , k - j - i )  K( ,4) 15 75 141 105 -  K( ,5) 105 630 1530 1830 955  10 15  47  Mass Action The  first  derivative  of the mass  action  equation  taken  with  respect to reaction progress has been presented previously as equation (25).  The general form corresponding to the .kth derivative of the mass  action equation can be written as d  0  ln  s  k —  =  v—•».  ui  +  -  NCsp  _  =1  i=A  k +.  V  H 0,s '  2  ln d g  a  '  k  -  2.303 d?*  k  if  d 5  /  h = l\  d k~ h  The derivative o f  +  dC*  end./  d  c  ~  v  ,  m  k  v  —  9  In  L-J c,s l_J r c=2  ^ 2  NP  d  \  * _ 3  i t  h  u-h  d  , d*m  ?  d  * _ ,U 3  JT  c  (i-H)  f ( r ) with respect to reaction progress i s defined i n  equations (1-F) and (1-G).  The general form f o r the kth d e r i v a t i v e o f  the a c t i v i t y c o e f f i c i e n t taken with respect to reaction progress can be written as  48  d  k  l  A  n  ^  ±  d  M  <*-  J  ^X.  ,  ±A  LiA  =  2 d M(*  ,• > • d X. , d d * ~ X. X dX.  k/2 V-A  )  Z  k > 1  J  L,  d5  J  d ^  J-I  J  d?  x  Q ( i . * - »  &  J  k >2 k -m d  3  M  (  i  X  ^ r d  m  d " X.  )  A  d ' X.  £JI j =  d£  7  AC«>  "  3  ?  m  d e  = i  d?  J  3  m  *-J-»  J  A  j  Q(».^. (1-D  and  Q ( j f ^ - j )  Q( i ,  j,k-j-i)  are numerical constants which are defined i n  Table I I . The f i r s t four d e r i v a t i v e s of M(.x ) can be written as d  MU  ) =  1  + 2  (x )  -6  d£  +  8  1  x.  P/G  7  1  6 ( ^  ) Pi7G 2  1  2  -  1  -  6  12  P/G  2 tfS, 1  WG  (1-J)  2  M(x,)  d MU.) 3  ^-LD  5  =  -12  WG  1  +  2  (1-L)  49  0  (1-M)  The derivatives corresponding to the second solid solution species be  obtained  by  derivatives of  interchanging M(-Xj) of order  the  subscripts  "1"  and  four  or greater  are  equal  can  "2".  All  to  zero.  Therefore, equation (1-1) does not need additional terms to  describe  any higher order derivatives. The  first  three derivatives of the mole fraction of the  first  solid solution species in a binary solid solution phase are defined in equations (1-N), (1-0), and  (1-P).  To obtain the derivatives of the  mole fraction of the second solid solution species, the subscripts "1" and "2" should be interchanged.  The f i r s t derivative is  (1-N)  50  The second derivative i s  2 !  (-1) (2-i-j)  1)  ((j+D  !  j !  ( ( 2 - j - i + I ) ! +•  1)  i  +  "2,+] (1-0)  51  The third derivative i s  3-i d  3  x  3  L i  d5'  '  £ i=0  A  d  1  d  n,  ^  n. , 1, 4>  El...  d  n 2  +  >  $  £=0  V  d  n  J  2  A  j= k .,3-k-j-i d dC  ,3-k-j-i d  n  +  3-k-j-i  d5  ! * !  (-1)  ((j +  D ! +  j ! i  1)  (-D  2,<j,  3-k-j-i  3 !  (3-k-j-i)  n  (-1)  ((k+1).!  +  ((3-k-j-i+l) ! +  1)  1)  (1-P)  These derivatives, especially the f i r s t two, would be much simpler i f the expanded form was presented.  However, they have been l e f t i n this  notation to show the difference between each order of derivative and to f a c i l i t a t e the writing of the higher order of derivatives.  52  APPENDIX 2  The Program PATH A computer program based on the equations developed i n the main body o f t h i s t h e s i s has been w r i t t e n  i n the FORTRAN language. The  program PATH c a l c u l a t e s the mass t r a n s f e r between an aqueous s o l u t i o n and minerals which are not i n e q u i l i b r i u m with the s o l u t i o n .  I t uses  three d e r i v a t i v e s i n the Taylor's expansion to p r e d i c t and f o l l o w the mass t r a n s f e r process.  S o l i d s o l u t i o n phases are not considered by the  program. Optionally,  the program  will  perform only  a distribution of  species c a l c u l a t i o n . The program w i l l terminate before the c a l c u l a t i o n s are completed i f the user has s e t time or page l i m i t s that are too small.  It will  also terminate because o f c e r t a i n e r r o r conditions which are discussed below.  I f i t i s necessary t o continue the c a l c u l a t i o n s , the program  can be restarted using the data printed i n the f i n a l execution c y c l e as the input data f o r the f o l l o w i n g run. Approximately 102 pages o f v i r t u a l memory (exclusive o f I/O f i l e s ) are used t o load the program under the MTS (Michigan Terminal System) Operating System executing on an AMDAHL V6 computer. depends on the complexity o f the run but w i l l tens  o f minutes.  following  The program  has been  range from seconds t o  run s u c c e s s f u l l y  computers: AMDAHL 470 V/6, IBM 370/168,  7600, CDC 6600.  The time used  on the  IBM 370/158, CDC  On the /370-type computers, IBM's FORTRAN G and  53  FORTRAN H compilers have been used. To run the program a t the U n i v e r s i t y o f B r i t i s h Columbia under the MTS Operating System, the following command i s used.  $RUN XXXX:PATH.O 3=FDNAME1 5=FDNAME2 6=FDNAME3 19=FDNAME4  where:  PATH.O i s the object code f o r the program PATH and, i n the example, i s stored on the l.D.  XXXX.  Fortran Unit 3 i s assigned t o the f i l e from which the thermodynamic and the compositional data f o r a l l minerals, aqueous species and gases a r e read.  The format o f t h i s f i l e i s described below  and a short example i s given.  Fortran Unit 5 i s assigned t o the f i l e from which the data s p e c i f i c to each run i s read.  I f the program i s executed i n batch mode,  then Unit 5 d e f a u l t s to the card reader.  I f the d e f a u l t i s  allowed t o take place, the data must be punched on cards and must immediately f o l l o w the "$RUN" card.  In t h i s case the  data cards must have as a terminating card, "$ENDFILE".  When  Unit 5 i s assigned to a f i l e , the "$ENDFILE" i s a u t o m a t i c a l l y supplied when a l l o f the data has been read and the end o f the f i l e has been reached.  When executed  from a t e r m i n a l ,  Unit 5 d e f a u l t s t o the terminal keyboard, however no messages prompting  f o r the input  data  are sent  t o the  keyboard  54  printer/display.  The format o f t h i s  file  i s described i n  d e t a i l below and and an example i s given.  Fortran Unit 6 i s assigned to a f i l e or a device t o which the program r e s u l t s are to be d i r e c t e d .  I f the program i s executed i n  batch mode, the u n i t w i l l d e f a u l t such that the r e s u l t s are printed.  I f i t i s run from a t e r m i n a l , the u n i t w i l l d e f a u l t  such that the r e s u l t s w i l l output device.  be d i r e c t e d t o the terminal's  I f a permanent record i s d e s i r e d , the u n i t  should be assigned to a f i l e stored on d i s c or on magnetic tape.  Fortran Unit 19 i s a u t o m a t i c a l l y assigned by the program when running on the MTS system a t the U n i v e r s i t y o f B r i t i s h Columbia but must be assigned t o a f i l e a t other i n s t a l l a t i o n s .  This u n i t  i s used as a "core-to-core" buffer and i s used t o a l t e r the form i n which the character data i s stored.  When assigned to  a f i l e , i t can be thought o f as a one l i n e f i l e on which every "WRITE" i s followed by a "REWIND", then by a "READ" and again by a "REWIND".  55  Data Stucture f o r Unit 3 This f i l e contains a l l o f the compositional and thermodynamic data for  a l l phases, aqueous species and gases that w i l l be considered by  the  program.  Generally t h i s f i l e does not change from run to run and  i s stored on d i s c or magnetic tape. Record 1: The "A" Debye-Huckel term. the 9  One value i s required f o r each o f  temperatures 0.0, 25.0, 50.0, 150.0, 200.0, 250.0, 300.0  C.  FORMAT(8F8.4)  Record 2: The "B" Debye-Huckel term. the  One value i s required f o r each o f  temperatures 0.0, 25.0, 50.0, 150.0, 200.0, 250.0, 300.0  °C. FORMAT(8F8.4)  Record 3: The d e v i a t i o n function (B). One value i s required f o r each of  the temperatures 0.0, 25.0, 50.0, 150.0, 200.0, 250.0,  300.0 °C. FORMAT(8F8.4)  Record 4: The a c t i v i t y c o e f f i c i e n t o f carbon d i o x i d e i n a NaCl s o l u t i o n at  infinite dilution.  I t i s used  c o e f f i c i e n t s o f n e u t r a l species. each  i n calculating  One value i s required f o r  o f the temperatures 0.0, 25.0, 50.0, 150.0,  250.0, 300.0 '°C. FORMAT(8F8.4)  activity  200.0,  56  Record 5:  The a c t i v i t y c o e f f i c i e n t o f carbon d i o x i d e i n a one molal NaCl  aqueous  activity  solution.  coefficients  I t i s used of neutral  i n calculating  species.  One  the  value i s  required f o r each o f the temperatures 0.0, 25.0, 50.0, 150.0, 200.0, 250.0, 300.0 °C. FORMAT(8F8.4)  Record 6: The a c t i v i t y c o e f f i c i e n t o f carbon d i o x i d e i n a two molal NaCl  aqueous  activity  solution.  coefficients  I t i s used of neutral  i n calculating  species.  One  the  value i s  required f o r each o f the temperatures 0.0, 25.0, 50.0, 150.0, 200.0, 250.0, 300.0 °C. FORMAT(8F8.4)  Record 7: The a c t i v i t y c o e f f i c i e n t f o r carbon d i o x i d e i n a three molal NaCl  aqueous  activity  solution.  coefficients  I t i s used of neutral  i n calculating  species.  One  the  value i s  required f o r each o f the temperatures 0.0, 25.0, 50.0, 150.0, 200.0, 250.0, 300.0 °C. FORMAT(8F8.4)  Record 8: The number o f d i f f e r e n t chemical elements i n the data records describing  the atomic  weights (Record m).  symbols  (Record 9) and the atomic  This i s program v a r i a b l e NCTZ.  FORMAT(IX,13)  Record 9: NCTZ atomic symbols.  There i s one f o r each element which i s  57  to be used i n d e s c r i b i n g the composition o f the phases o f the species and o f the gases i n the data f i l e .  Seven symbols per  record: each l e f t j u s t i f i e d i n i t s f i e l d . F0RMAT(7(4A1,4X))  Record  m: NCTZ atomic weights f o r the elements  defined i n Record  They must be i n the same order as the atomic symbols.  9.  Seven  values per record. FORMAT(7F10.5)  Record  n: A c o n t r o l  record which  will  determine  the nature o f the  composition and thermodynamic data following i t .  This data  may be followed i n turn by another c o n t r o l record and more composition  and  thermodynamic  data.  Only  the following  c o n t r o l records are p o s s i b l e : "**MINERAL DATA**", "**AQUEOUS SPECIES**", Control  "**GASES**",  "PREFERENCES**" and  "**STOP**".  records, w i t h the exception o f "**STOP**", can be  used as o f t e n as needed and can occur  i n any order.  The  c o n t r o l records must be e x a c t l y as shown and must s t a r t i n character p o s i t i o n one. These records w i l l be discussed i n turn below. FORMAT(A1,5A4)  **MINERAL DATA** A l l records following t h i s are treated as compositional and thermodynamic data  for solid  record i s encountered.  phases u n t i l  another  control  The data records occur i n p a i r s and  58  have the form NAME FORMULA DELTA H S  ABV A  B  REF # C  V  and use the f o l l o w i n g format statements FORMAT(1A1,25A4) FORMAT(5X.6F10.3) , respectively. For  the record  NAME  FORMULA  ABV  which has the format  REF #  (1A1,25A4),  NAME i s the name o f the mineral and s t a r t s  i n character  p o s i t i o n two. I t can be o f any length but only the f i r s t s i x t e e n characters are used. FORMULA i s the mineral formula and i s w r i t t e n i n the form ZN(5)C(2)0(8)H(2).  Real numbers (up t o 4 f i g u r e s with a  decimal point) can be used alphabetic  characters  instead o f i n t e g e r s .  corresponding  to  The  the atomic  symbols must have been defined by Record 9.  At l e a s t  four blank spaces must separate NAME and FORMULA. ABV i s a abbreviation o f the name and i s used f o r p l o t t i n g purposes.  I t can be any length, but only the f i r s t four  characters are used.  A t l e a s t four blank spaces must  separate FORMULA and ABV. REF. #  i s any alphanumerical  purposes. program.  string  REF. # i s o p t i o n a l  f o r documentation  and i s ignored by the  At l e a s t four blank spaces must separate ABV  and REF. #. NAME, FORMULA and ABV must use l e s s than one hundred and one  59  character p o s i t i o n s .  For the record DELTA H  S  A  B  C  V  which has the format (5X,6F10.3) ,  DELTA H i s the d e l t a enthalpy o f formation from the elements for  the phase.  The u n i t s used  are j o u l e s .  I f the  enthalpy i s greater than 999999., then the phase w i l l not be considered. S i s the t h i r d law entropy, measured i n j o u l e s . A, B and C are the heat c a p a c i t y terms f o r the Kelly-Meyer heat c a p a c i t y f u n c t i o n . V i s the volume i n cubic centimeters.  **AOUEOUS SPECIES** A l l records f o l l o w i n g t h i s are treated as compositional and thermodynamic data  f o r the aqueous species u n t i l  c o n t r o l record i s encountered.  another  Aqueous species data records  must occur i n p a i r s and have the form NAME FORMULA DELTA H S  REF # A a  and use the following format  0  CHARGE  statments  FORMAT(1A1,25A4) FORMAT (5X,6F10.3) , respectively.  The format o f these data records i s e x a c t l y  the same as that f o r the mineral data, except  there i s no  abbreviation o f the name (ABV) and there are no B and C heat  60  capacity terms.  Two new terms have been added:  "a " i s the Debye-Huckel s i z e term f o r each i o n and complex. 5  CHARGE i s the charge on the i o n or species. greater than 9.9, then the charge  I f the charge i s  i s assumed to equal  zero, and an a c t i v i t y c o e f f i c i e n t o f one i s used f o r that species.  **GASES** A l l records f o l l o w i n g t h i s are treated as compositional and thermodynamic data f o r the gas species u n t i l another c o n t r o l record i s encountered.  Gas data records must occur i n p a i r s  and have the form NAME FORMULA DELTA H S  ABV A  REF # B C  and use the following format statements FORMAT(1A1,25A4) FORMAT(5X,6F10.3) , respectively.  The format o f these data records i s e x a c t l y  the same as f o r the mineral data.  Note that there i s no  volume term (V) f o r gases.  PREFERENCES** A l l records f o l l o w i n g t h i s c o n t r o l record are ignored by the program  unless  encountered. III)  a  control  record  or  an  $ENDFILE i s  U s u a l l y , data references (see example i n Table  are l i s t e d  i n this  p o r t i o n o f the f i l e  but any  information, i n c l u d i n g blank l i n e s , can be a part o f t h i s section.  61  **STOP** When t h i s control record i s encountered, reading of the f i l e i s terminated.  This record i s optional and,  a $ENDFILE i s used instead.  data  generally,  62 Table I I I Example o f U n i t 3 Data S t r u c t u r e  0.4884 0.3241 0.0174 1.0000 1.3100 1.6700 2.0600 37  0.5095 0.3284 0.0410 1.0000 1.2700 1.5700 1.9300  0.5471 0.3347 0.0440 1.0000 1.2300 1.4900 1.7800  0. 6019 0. 3425 0. 0460 1. 0000 1. 2000 1. 4400 1. 7400  0. 6915 0. 3536 0. 0470 1. 0000 1. 1900 1. 4000 1. 7000  0.8127 0.3659 0.0470 1.0000 1.2300 1.4700 1.7400  0.9907 0.3807 0.0340 1.0000 1.3400 1.6700 1.8600  1. 2979 0. 4010 0. 0 1. 0000 1. 5000 2. 0000 2. 2900  MN FE CA MG NA H SI HG ZN CU PB AU F K CL AL C S BA CO W NI N P BR I TI SR V U LI 1.00797 22.98981 40. 08000 24.31200 55.84700 54.938 15.99940 28.086 107.87000 196.96700 207.19000 65. 37000 63.53999 200.59 74.92160 32.06400 12.01115 35. 45300 26.98151 39.10201 18.9984 208.980 58.9332 183.85 58.71 14.0067 30.9738 95.94 79.909 126.9044 47.90 87.62 50.942 118.69 238.03 132.905 6.939 **MINERAL DATA** REF. #2 A-QTZ SI (1)0(2) ALPHA-QUARTZ 22.687 0.0076034 -1913257. 63.5060 41.338 -910647. REF. #1 SI(2)FE(1)CA(1)0(6) HED HEDENBERGITE 68.270 -6280182. 170.289 229.3250 0.0341833 -2838826. REF. #1 C-ZO CLINOZOISITE SI(3)AL(3)CA(2)H(1)0(13) 136.200 0.1054953 -11357465. 443.9976 295.558 -6879419. **AQUEOUS DATA** * REF. #3 AL AL(1) 11.7152 9.0C -531326. -321.749 REF. #3 FF(l) -1. 4.00 5200 -13.807 -125. -332615. REF. #3 FE+-HFE(1) 3. 0920 9.00 -315.892 -48539. **GASES** REF. #1 C02 C(l)0(2) CARBON DIOXIDE -861904. 0.0087864 213.685 -393522. H20 44.2249 REF. #1 STEAM H(2)0(l) 0. 0.0102926 -241818. 188.715 30.5432 PREFERENCES** SUPCRIT DATA SET REF. #1 HELGESON 1977 REF. #2 BROWN 1976 CALCULATED REF. #3 HELGESON 1969 A.J.S. VOL. 267, P 729-408  0 AG AS MO SN CS  N  63  A normal data base may c o n s i s t of hundreds of phases, aqueous species and gases but to s i m p l i f y the example i n Table I I I , i t has only three phases, three aqueous species and two gases. The f i r s t eight l i n e images i n the example correspond to program records 1 to 8. elements  The  following l i n e image i s the number of chemical  (NCTZ) and i s followed by s i x l i n e images containing the 37  (NCTZ) atomic symbols.  These are followed by s i x l i n e images of the 37  (NCTZ) atomic weights.  The atomic symbols and the atomic weights are  in the same order and correspond to each other. The data images "**MINERAL DATA**, **AQUEOUS DATA** and ** GASES** and the data images f o l l o w i n g them are s e l f - e x p l a n a t o r y from the data record d e s c r i p t i o n .  The  PREFERENCE** information i s never  even printed by the program.  used  or  In t h i s example, however, the REF.  #  from the data s e c t i o n corresponds to the data sources given i n the PREFERENCE**  data  images  and  is  for  the  investigator's  own  information.  Data Structure f o r Unit 5 This  file  contains a l l of the data  for a specific  execution.  Unlike Unit 3 on which the data i s g e n e r a l l y s t a t i c , the data i n t h i s f i l e w i l l change from one modeling attempt to another.  When executing  t h i s program with a given set of data on t h i s u n i t f o r the f i r s t time, it  i s recommended that the maximum step s i z e be set to one and  r e s u l t s examined f o r correctness.  Record 1: T i t l e card 1  the  64  FORMAT(20A4)  Record 2: T i t l e card 2 FORMAT(20A4)  Record 3: T, P, NRT, AMH20, NDLINC, MAXI, IMX, ISX, IGX FORMAT(2F10.3,I5,F10.3,5I5)  T i s the temperature i n degrees C e l s i u s . P i s the pressure i n bars.  Use 1 bar because the program  does not consider aqueous species a t other pressures. NRT i s the number o f i n i t i a l reactants.  I f NRT i s equal to  0, then only a d i s t r i b u t i o n o f species c a l c u l a t i o n i s done. AMH20 i s c u r r e n t l y not used.  Leave t h i s f i e l d blank.  NDLINC i s the number o f steps  between each p r i n t c y c l e .  There w i l l automatically be a report each quarter o f a log  u n i t once l o g  i s greater then -6.0.  MAXI i s the maximium number o f steps i n the execution.  If  t h i s f i e l d i s blank, i t d e f a u l t s to 10000. IMX, ISX, IGX are the number o f minerals, aqueous s o l u t i o n species and gases, r e s p e c t i v e l y , from Unit 3 that, w i l l not be considered during t h i s run. The names o f the excluded phases and species w i l l be s p e c i f i e d i n Records m, n and o.  Record 4: NION  65  FORMAT(2A4) The name o f the i o n used f o r e l e c t r i c a l balance.  This i o n  must be a charged aqueous species and must be present i n the **AQUEOUS SPECIES** s e c t i o n o f the data  read  from Unit 3.  This i o n must be one o f the component species, and the data for t h i s i o n must be given as a m o l a l i t y . Assigning t h i s i o n as  a  component  discussed Record  species  i n Record p.  p will  subroutine  a given  molality w i l l  be  The m o l a l i t y given by the user on  be v a r i e d  until  balanced.  with  by the d i s t r i b u t i o n  the aqueous  solution  o f species  i s electrically  Thus, the i n i t i a l m o l a l i t y o f t h i s i o n i s used as  a f i r s t guess f o r d e r i v i n g the f i n a l , c a l c u l a t e d m o l a l i t y . I t must be l e f t j u s t i f i e d i n the "A" format f i e l d .  Record 5: RR, AM, NAM FORMAT(F5.3,5X,F10.5,5X,5A4) This record mineral.  i s repeated  NRT times, once f o r each  reactant  I f NRT (see Record 3) i s zero, t h i s record i s not  needed. RR i s the r e a c t i o n rate o f the reactant mineral r e l a t i v e t o the progress v a r i a b l e . Use 1.0 as a d e f a u l t value. AM i s the amount, i n grams, o f the reactant mineral. NAM i s the name o f the reactant mineral as i t appears i n the data records on Unit 3. the "A" format f i e l d .  Record m: IM  NAM must be l e f t j u s t i f i e d i n  66  FORMAT(3(5A4,5X)) Names o f the minerals t o be suppressed.  There must be IMX  (see Record 3) names, 3 per record, l e f t j u s t i f i e d i n the "A" format f i e l d . needed.  I f IMX i s equal t o 0, t h i s  record  i s not  The names must be i d e n t i c a l t o the names as they  appear i n the data records on Unit 3.  Record n: IS FORMAT(4(2A4,12X)) Names o f the aqueous species t o be suppressed.  There must be  ISX (see Record 3) names, 4 per record, l e f t j u s t i f i e d i n the "A" format f i e l d . needed.  I f ISX equal t o i s 0, t h i s record i s not  The names must be i d e n t i c a l  t o the names o f the  aqueous species as they appear on Unit 3.  Record o: IG FORMAT(3(5A4,5X) Names o f the gases t o be suppressed. Record  3) names, 3 per record, l e f t  format f i e l d . needed.  There must be IGX (see justified  I f IGX i s equal t o 0, t h i s  The names must be i d e n t i c a l  i n the "A"  record  i s not  t o the names o f the  gases as they appear on Unit 3. Record p: MOA, NDX, TOTM, NAM, FORM FORMAT(212,E10.3,60A1)  This s e t o f records s p e c i f i e s the s e t o f component phases,  67  species and gases used during calculation system.  and defines  the d i s t r i b u t i o n  the compositional  There are NC - l records, where  components  needed  to describe  N  of species  space  of the  i s the number of  C  the system.  Each  of the  records describes one component i n the system which i s to be constrained.  Water i s automatically added as a constraint by  the program.  In a non-redox system composed o f N elements,  the user must supply N - 1 constraints.  In any redox system  composed of N elements, the user must supply N constraints. All  constraints  (including  water)  must  be  linearly  independent! I f executing "$ENDFILE".  i n batch mode, the l a s t record must be an  I f t h i s data  i s being  read  from a f i l e , the  "$ENDFILE" w i l l be supplied automatically. The variables are described i n an order d i f f e r e n t that required f o r the data  record  i n order  than  to simplify the  explanation. NAM i s the name o f the component phase, species or gas and i s left justified  i n the "A" format f i e l d .  I t must s t a r t  in column 15. The name must be i d e n t i c a l to the name as given on Unit 3. FORM i s the formula  of the component phase, species or gas  and follows the form given for formulas discussed i n the data records for Unit 3 (see Unit 3, **MINERAL DATA**). There must be four blank spaces between NAM and FORM. NDX indicates whether the state of the component i s a aqueous species (NDX = 0), stoichiometric s o l i d phase (NDX = 1),  68  solid not  solution phase used),  (NDX = 2, t h i s code i s currently  or a gas  (NDX = 3).  See below  f o r the  relationship among NDX, TOTM and MOA. TOTM i s the number of grams, the molality, the log a c t i v i t y or  the log fugacity of the component  phase, species or  gas. MOA  indicates  whether  the data  i n TOTM  i s moles/molality  (MOA = 00) or log a c t i v i t y / f u g a c i t y (MOA = 01). If NDX i s 01, indicating a s o l i d phase, then TOTM i s assumed to  equal the t o t a l number of grams of that phase regardless  of  the setting of MOA.  MOA  must  be equal  I f NDX i s 03, indicating a gas, then  to 01 and TOTM w i l l  contain  the log  fugacity of that gas.  The  following example  reaction  of potassium  solution at 25  i s the data  assigned  feldspar with  a  i s saturated with  equilibrium maintain  one molal  C. and one bar t o t a l pressure.  potassium feldpar present i s ten grams. solution  to Unit 5 to model the  with  respect  the s o l u t i o n ) .  electrical  sodium  The i n i t i a l  chloride amount of  The i n i t i a l pH i s 5.5 and the  to quartz  This example  (i.e.,  quartz  uses chloride  n e u t r a l i t y within the solution.  i s in ion to  This data deck  s p e c i f i e s there w i l l be a p r i n t cycle each 100 steps, and that the run will  stop  after  equilibrium. record  10000  The f i r s t  indicating  steps  or sooner  i f the solution  comes to  record i n the example data deck i s the t i t l e  " TEST  RUN  specifying the potassium ion m o l a l i t y .  " and the l a s t  i s the record  69  TEST RUN OF DISSOLUTION OF K-FELDSPAR IN ONE MOLAL NACL SOLUTION AT 25 DEGREES 298.15 1.0 1 10010000 CL1.0 10.0 K-FELDSPAR 00001.0 NA+ NA(1) 00001.0 CLCL(1) 0100-5.5 H+ H(l) 010110.0 ALPHA-QUARTZ SI (1)0(2) 0000 0.5E-10AL+++ AL(1) 00000.05 K+ K(l)  Restarting PATH To r e s t a r t the program, the data  records  used  f o r Unit 5 are  i d e n t i c a l with the i n i t i a l data used with two major exceptions. The amount i n grams o f the reactant phases w i l l have changed, thus i n record 5, AM w i l l be d i f f e r e n t f o r each reactant phase. One or more of the reactants may have been consumed, i n which case NRT must be decreased by one (or more) i n Record 3 and there w i l l be one (or more) l e s s Record 5's required. The m o l a l i t i e s o f the component aqueous species and the number o f grams o f the component phases w i l l have changed. has most l i k e l y the f i n a l records  changed as w e l l .  The component basis  The component b a s i s e x i s t i n g during  p r i n t c y c l e can be read and these components used as data f o r Unit  5.  Use  activities  i n c o n s t r a i n i n g a l l o f the  component aqueous species except f o r the component species chosen f o r charge balance.  I t must be given as a m o l a l i t y .  70  Error Messages The f o l l o w i n g are e r r o r messages commonly encountered while using the program.  P o s s i b l e causes are l i s t e d with the messages.  "SINGULAR MATRIX RETURNED FROM INVERSE ROUTINE. THE COMPONENTS PASSED TO IT FOR THE NEW BASIS MUST NOT BE INDEPENDENT. THESE COMPONENTS ARE Check input data because i n i t i a l are not independent.  components chosen by user  Remember that water i s a u t o m a t i c a l l y  assigned as a component by the system.  "A CONSTRAINING PHASE CONTAINS TWO OXIDATION STATES - BUT THERE IS NO REDOX COUPLE. YOU MUST HAVE A REDOX COUPLE IF YOU HAVE TWO OXIDATION STATES." Check your input data as per e r r o r message.  "IMPROPERLY FORMATED DATA BANK.  LINE IN ERROR IS  "  Error i n the thermodynamic data f i l e on Unit 3.  Line with  e r r o r i s shown. Correct and rerun.  "PHASE BOUNDARY NOT FOUND IN XXXX HALVINGS " This i n d i c a t e s that the program, f o r reasons due to numerical rounding, can not f i n d the exact point a t which the phase has become saturated.  T y p i c a l l y t h i s can solved by r e s t a r t i n g  the program using data from the preceding step.  " THE SPECIES " FOUND "  " CHOSEN AS THE ION TO BE BALANCED ON COULD NOT BE or  71  " COMPONENT " " COULD NOT BE FOUND. CHECK IF COMPONENT IS PRESENT IN DATA DECK AND THAT YOU HAVE SPELLED IT THE SAME AND THAT IT IS LEFT JUSTIFIED IN THE INPUT FIELD." "ALSO CHECK THAT THIS PHASE DOES NOT HAVE TWO OXIDATION STATES IF THE SOLUTION CONSTRAINS ONLY ONE. " Self explanatory.  "CONCENTRATION OF ION ELECTRICAL BALANCE "  DRIVEN  NEGATIVE WHILE  TRYING  TO ACHIEVE  Choose ion with opposite charge to the present one for the charge balance ion.  "IMPOSSIBLE CONSTRAINTS FOR DISTRIBUTION OF SPECIES  "  " DRIVEN  NEGATIVE " or "FAILURE TO CONVERGE ON CONCENTRATION IN 25 CYCLES. " The data defines a solution composition that i s impossible. Reconsider Unit 5 data. "STEP SIZE HAS GONE TO SMALL. " The program can no longer follow the mass transfer function, because the error has gotten too large.  This i s also the  result of numerical rounding techniques.  By restarting the  program at the previous step, this error can be corrected.  "THIS RUN HAS BEEN TERMINATED BECAUSE THE INITIAL SUPERSATURATED WITH RESPECT TO ONE OR MORE PHASES. " Self explanatory.  SOLUTION IS  Examine input data for Unit 5 and lower  some of the activities or molalities of the components.  72  Example This example simulates the r e a c t i o n o f potassium feldspar with an aqueous s o l u t i o n i n e q u i l i b r i u m with quartz.  I t uses the same input  data f o r Unit 5 as was given above. This example was run on an AMDAHL 470 V/6 Model I I computer under the Michigan Terminal System (MTS) and took 2.9 CPU seconds. There may be s l i g h t executed  numerical d i f f e r e n c e s on  another  type  of  between computer  d i f f e r e n c e s i n word length, exponentiation  this  example and the same  because  of  and rounding.  the  possible  ********  DATA ECHO  *********  73  TEST BUN OF DISSOLUTION OF K-F ELES PAB IN ONE J50L&L NACL SOLUTION AT 25 DEGREES ' IEMPEBATUBE (KELVIN) OF THIS BUN I S ......... . 2 9 8 . 15 PBESSUBE (EABS) CF THIS BUN I S 1.00 MAXIMUM NOMBEB OF STEPS I S .................. 10000 NUMBEE OF STEPS BETWEEN EACH EEINT OUT I S ... 100 ION CHOSEN FOB ELECTB.ICAL EA1ANCE I S ........ CLMOLES OF SOLVENT H20 IN SYSTEM I S ........... 55.508250  ************* I N I T I A L BEACTANTS *********** BATIG PIESENT 8-FELDSPAB *************  1.00000  GBAMS PBESENT 10.00000  i H i i i J i SOLUTION CONSTBAINTS ***********  0. 1C00OGCOE+O 1 MOLALITY  NA+  NA(1)  (AQUEOUS SPECIES)  0. 1CO0O00OE+0 1 MOLALITY  CI-  CL(1)  (AQUEOUS SPECIES)  -0.55000COCE+0 1 LOG ACT.  H+  0. 10000000E+0 1 GBAMS  ALPHA- QUABTZ  0.50000000E-1 0. MOLALITY  AI+*+  O.5CO0C000E-0 1 MOLALITY  K+  ******************************  (AQUEOUS SPECIES)  H (1)  AL(1) K(1)  S I (1)0 (2)  (SOLID) (AQUEOUS SPECIES) (AQUEOUS SPECIES)  I EST SUN OF DISSOLUTION SCLUTICN AT 25 DEG'BI IS DISTBIEUTICN OF  OF  K-FELDSPAR  I N ONE  MOLAL NACL  74  SPECIES CALLED AT STEP AQO'EOOS SPECIES  SPECIES AL + + + K+ NA* H4sio4  CLOHH*  B20 AL ( C H ) * • AL (CH) 4H3sioaHCL  .  LOG  MOLALITY 0.17413E-10 0.5000 0E-01 0.10000E+01 0.91812E-04  0. 10.500E + 01  0.49256E-08 0.38596E-05 . 0.55508E+02 0.32490E-10, 0.S62 47E-13 0.55851E-08 0. 1 1 4 6 2 E - 1 1  IONIC STRENGTH =  ACTIVITY  MOL  -10.759 - 1 . 301 0.0 -4.037 0.021 -8.308 -5.413 1.744 -10.488 -13.017 -8.253 - 11. 941  0.13109E-11 0.3G354E-01 0.66147E+00 0.91812E-04 0.6.3744E + 00 0.31317E-08 0.3 1623E-05 0.96287E+00 0.72961E-1 1 0.63665E-13 0.36944E-08 0. 147 29E-1 1  LOG  ACT  - 1 1 . 882 -1.518 -0.179 -4.037 -0.196 -8.504 -5.500 -0.016 - 11.137 - 1 3 . 196 -8.432 -11.832  ACT COEF 0.75284E-01 0.60708E+00 0.6614 7E+0 0 0. 10000E+01 0.60708E+00 0.6358GE+00 0.81932E+00 0.17346E-0 1 0.22456E+00 0.66147E+00 0.66147E+00 0.1285 0E+01  ELECTRICAL BALANCE =  0.105000E*01  LOG K  STEAK. THE LOG K FCS KDSCOVITE LOG K = 10.3095251  1.50517  LOG Q- =  ACTIVITY 0. 30088E-01  LOG ACTIVITY 1.52160  HAS BEEN EXCEEDED AT STEP . 10.7906963  GHAMS/KGP! H20  -1.123 -0.217 -0. 179 0.0 -0.217 -0.197 -0.087 -1.761 -0.649 -0. 179 -0. 179 0. 109  0.46984E-09 0. 19551E + 01 0.22990E+02 0.88246E-02 0. 37226E+02 0.83772E-07 0.38904E-05 0. 10000E+04 0. 14292E-08 0.9144 5E-11 0.53118E-06 0.41792E-10  0.732650E-15  GASES NAME  LG ACT C  1  PPM . 0.000 1840.650 21643.997 8.308 35046.605 0.000 0.004 941460.436 0. 000 0. 000 0.00 1 0.000  LOG PPM -6. 354  3. 265 4. 335 0. 919 4. 545 -4. 103 - 2 . 436 5. 974 - 5 . 871 . - 8 .065 -3. 30 1 - 7 . 405  ****** NEB STEP SOMMABY ******* .DEL X I XI LOG XI  75  = 0.891276E-08 = 0.891276E-08 = -8.050  BEACTANTS  MINERAL K-FELDSPAR  CUMULATIVE GRAM CHANGE -G.248075E-05  LOG CUHDALT GBAM CHANGE -5.60 5  CUMULATIVE MOLE CHANGE -0. 891276E-08  LOG CUHU1AT MOLE CHANGE 8.050  REACTION COEFFICIENT 0. 100000E+.01  LOG OF SOLUBILITY PRODUCT 0.672030E+01  LOG OF ION PRODUCT 0.609356E+01  PRODUCTS  MINERAL ALPHA-C'OABTZ  MINERALS ALPH A-QUAST;Z  ASA1CIBE  ANBALUSITE A—CBISTOEALITE 8 ETA-QUABTZ 8CEHMITE B-CBISTOEALITE COESITE COBUNDUM EEHYJ3BATIC ABALCIHE DIASPOBE'* GIEESITE HALITE HIGH SANIEINE HIGH ALBJTE JACEITE KAL S U I T E K AOL IN H E . K YABITE K-FELDSPAR LOW A I E I T E MUSCOVITE SEEHELINE IA RAGONITE POTASSIUM OXIDE PYBOPfiYLLITE 5ILIIMANITE  CUMULATIVE GB A 8 CHANGE 0. 100000E+01,  LOG  K  0.0 9.809 9.674 0.270 0. 138 4. 150 0.376 0^810 10.490 11.516 3.30 5 2.515 1.432 7.920 .10.941  11.249 S.899 4.532 '9.400 6.720 9.623 10.310 12.664 14.069 8 4.316 6.157 10.033  LOG. CUMUALT . CUMULATIVE GRAM CHANGE MOLE CHANGE .0.00 0  0. 166432E-01  LOG' Q . 0.0 . 7.4154200 4.2324007 0.0 0.0 2. 1079848 0.0 0.0 4.2324007 7.4318511 2.1079848 2.0915537 -0.3750500 6.0935556 7.4318511 7.4318511 6.0935556 4. 1995385 4.2324007 6.0935556 7.4318511 10.3095251 7.4318511 11. 6478206 7.9547105 4.2159696 4.2324007  LOG CUHBLAT MOLE CHANGE -1.77 9  REACTION COEFFICIENT 0.299517E*01  LOG OF SOLUBILITY PRODUCT 0.0  LOG OF ION PRODUCT 0.0  m i n i f i o i i n o o s r v o o t o o o  aa  cn  f - t v i m t T H f i r - ^ . O i v O O O C N *  CM  •s' n «f o * a <M in o i n cn. pi "I i i ii  CT>  o  i-3  M  o CO CN  O  ©  ro  X + + + + O pq m m  o r*. c c t o tn o V O O Y ro• • » o r o CO sr  o o o o  CO  vO  T  m-  in  O  o VO o  o =r vo © o ro © o =r ©  • c•  VO  it C  •  in rn  CN  ©  o o  ©  t  o o vo sr  o  \CN  •  o  © ©  •  © ©  in rn S3 r n •4 t n E  © ©  *  p  sr cn  O  to  p» *— o o l + pa sr (3s! in r- m cn  cn C N C N 00  cc  o  o  33  !C CS  N  CO  C5  u  m  6-"  CN  U  T  o  r~  CN CN CN  O  O CTi  O  IH H r* H H  vo  «CN LO •  O  «~ I  <a  o  o  W  W M CJ  pq  o  CH to  W  CN CO  to  i-3  EJ O  w  '  o  O  ©  o .1 t n un  r - to o  -  ^  sr  f> H IH U  f"* PO c n r— O  .  o  H  u  «*  * •  o  •-3  o .  X  •  M t> . M  o  H  £-1  o  1  O  ©  © o  o  *-  O  o  1 i  o  o  r—  o  1 1  o  o  o  o  o  o  i  1  © r— o o o © © o  o  o  O  o  o  CO  co  •t  in  0"!  1 1  tn o o  cn in t n r - vo r o vo C N p » r o cn o o 00 r o C N PO *— o in in o 00 cn s r oo • • * • « 'v • 00• » o s r o 00 m o 00 1 l 1 1 l 1 1 1 I ;|  • •  o o  sr o o o  o  00 o r~  00 m o o  ©  o  w  w  IM w IM o in m » — r - CN vO ro r * sr r— r n * • *  CO  o  r—  1 1 4- t •4- 1 I + 1 I 1 1  w o corn m  w ca w s r r > CN in s r rn co O vO CM m s O t n  m  w  St o © r». r o St v O 00 C O T —  in  ro CN  r o »•» r— V O V O r o r o cn  . to I • m W  (N CN •3-  |  to I << I t3 I  CN  CO  ©  in  •  Ci>  O  o sn o  »4 .  NJ.  <—  © o  in  rn-  o  o o  ^. o CO (N O  a- Q 1 1 1 1 o  CO  -  •t  vO  co o o  M i-3  «SJ  >A O S  o  «• o O  ro sr oo I  oo o  sr sr  w—  CO  1  I  in  © ro in in =r C N  CN  CN  m  CN  o O  oo o  sr sr  1 o  1  1  1  o  O  ©  •  O  o  O  sr  CN  w  w w sr o © © m m- o CN m o vo s r  vO  in  CN  i-^ 00 CO  CN  ©  T—  *  • o ©  CN o  • O  o m  o o o o  t  o o  o  • f • • • O o o ©. ©  t  o o  t  VO  m  • © o  t—  © !  »  w o o o  w cn cn o ©  +  T—  • oI••  I  t  00 00  O o o o 1 I  o i  O I  T— t—  VO'VO VC  o  ,_  ©  •~  © cn 00 s r r n sO CN i n 00 cn r » s r in- r— t—  o  o  cr. 00 cn vO ro sr cn t h  O  1  CN  00 s r O *— © o CO r— o CO rn o «— vO s r #  o  1  #  o  o  •  1  VO r— sr o o o  o  CCSW  VO r n •sr r n =r CN r o s r sO s r CO O  satin in. tn sr- ro- sr- m  O  o w v. m E.ro cn S5 rn  CN  VO  f  o © "X 1 1. + M  w sr ro «n ro  + +  M vo o vO cn^ vO o tn r o o c n cn vo o cn cn  o '© 1 +  fn w  CN  m rO vo vO  oo  • ©1•  ©  CN vO vO vO CN rn r o VO  w  m~ © o o 1 1 +• pa w w w « * i n © sr c u m rn m ro tn w ss r o t n r o CM CN r o t » . O o o I I I  o o  O o  o o  w  w  pq fcq w r— CN VO rn sr m m tn t o cn m CN CN cn =r 00 CN cn CO oo rn sr sr sr tn » # t * ' O © -Q o o © VI  cn 00 sr tn VO t n » »  o  o o o  CN 00 s r ro o o  cn cn o m  r™  *™ ***  so en cn oo  r—  4-  m  w VO  *—-  in  •  =r  w  E P  fH H  >-1 t * Q i-J O >*•  tn tn  .  .  .  W  S  «* 55  E  to  W  M  «C IM £4  tn  CJ W CL,  to  4> 4>  +  o  .+  N to  •a! 55 33  1  i O as + C N O  33 PC  •3 O  1  sr  ' aaQ  (j H to m U 03 3 3  o  o o  o o o  t  ©  1  '  * » t t o »o • o • o © =r s r  i-l o  i  t  •  •  44» ,.  tn  u  w tn  33  o  4« 1 S5  tj  03  1  *-  sr O  -sr  vo S O  C5  CN  so  -  sr  CN ••'  '©  ©  ©  *  .  »  o  •  o  >  H O  ••  H  ob so m-  33 -*  • O to  M  CN  M  X!  tt  O  <=C CN  *  33  O  M  1-3  <C O  o 4o o  © © o  E  H  .  !23  -  H  O  (t  CC  m.  o  > U  fcH  IM 33  w m  •  H  i-H  EH  tn  M  o  SKS  •  (  m~  X  M  |j  tn  tn  tn pa  E  o  Q  .. E  .o  o  a H3  •  H  O  o  »  1-3  O «*  .to  :  .o o o o  o o  O  H4  6H H  00 " o in  to  in  o  CN CN  o o o o-  EH  O  CN  w  'ft  tn  cn.  •J  CN  •  o 33  \ tn s «s  CKj  O  CN -  ro W*fi  t  sr 33 o  00  +  W-  E  t  VO  O  O h4 4» tn i tn t-l 4. r-3 s r 33 ro 3 3 O «s 33 «a « +•  O H  •-3 O  CN  o  00  so  1  CO  ta  CO  P«3  co o w n cn i n oo » r o oo m m»  <«C E  tn  •  CN 00 t n vo r o  m o r- o  (N  CN O  33  CO s r r - t n t n so ti)  r—  CN  •  o 1  w  + 1  ©  4-  tn  O  o • cn  o  ro so rn «-  sC  cri  in  ,  PH O sr sr  O  o  C3 O O O © o U t t t » • » • • » • •4 © O . © o o s r s r CO oo r n so  ••  4-  O Cu  En O J  o  . o  •  00 r> 00 cn  sr  CN t  1 1 1 1"  •  EH  vO  Pd in ro cn • m  in.fN CN CN sO o o o o O w  »-3  ^ *  CN o VO 00 CO CN o  •o  CM  w  4>  •  i  o 1  1  + + + i  ©  I  vo vO VO .sd. ro ro  1  sO  o  cn  in  VO vO CN CN CO CM i n oo rsj CO oo : Q t • t • * • • m t t • o © © o © • o o O o .© o  1 i  «*  m  (M  sr o  W  CO  H O  00 © - =r  o  o o 4- 4>  in  ro  cn  t  o  m  #  sr  1  ©  O  o 4-  +  SO sO  -»• Pt3 m o o o  1  sr  T—  C5 Cti  ©  o  P<3 rin  • H Ctj  •  © I  sr sr o ©  o o  o  1—  i n ^r o o o o  vO  O  m  ©  rsi  1—  w w r » sr i n ro r - CN r— o vO CN CO I — * cn r~ r - 1—' VO m* vO •—*• r -  o o o o o o O 1 1  •  4>  CN CN  ©  r—•  (M. 00 r— 00  o  ©  in o  CN  VO  *—  + + + + 4. + + 4. + 4- +  l—l w i a r - cn Q i n <— \ C N rn E r- in CO 00  sr  VO  i n CN  © o o o sr  4-  («  P3  CN in rn ro cn  CN o  1  sr sr 00 CN rn  T—  4-  (H  O  o  • © ©  00 o  oo cn 00 i n s r © r n cn o cn © co i n v O C N tn r o o cn oo tn w CTi sr- n m m mm (N  ©  + + + + + + + IM Pd w  1 1 4- 1 + 1 I + 1 1 ) 1 (M w c a w w w m tu w W  VP o un o © o  + + + + +  CN (N cn CN r -  vr>  00 T~  ©  ©  sr ©  »—  o  • t • • * * • • o o o o o O © o O o o o m  sr H O X + a ta v r s in rsj  00 CN CO GO m* 1— rn  T  + + + + + + 4- + + 4w w w  o  o  o  © o + + +  ro  w © cn; cn. tn o o c i n © CN © © m © r— mvO vo rn vO r - vO - (N CD cn 00 w  sr- s r vo VO © o o o o  W m w w w C N vO v O r - r*- o r o s r tn s r s r in t n ro- s r «— 00 C N v O vo C N C N v O V O m~ 00 w  CN  \ C N t n i n i n CO cn VO 00 r> © S3 i n r o o © © sO © r o r o 00 o r o vO cn a tn' cn i n CN s r CN  Q  o  ro cn  o  -  w CO CO cr  ©  o  r- t n cn cn cn cn 00 V O s r r- o CN o r - vC *~  o  o  © ©  o  r-' o  o  o  o  as  p-  o  00 V O  C N s r © r~ © o © CN CN o o 00 C N r o C N 3- v O © vo oo m s r r - ar 00 o in vD r o T— r o 00 r o rsi tn s r  pa FM • w ST 00 o 00 o s r o o 00 CO o C N r~ o P> in in o v O o o r o r - vo v O VO v O  VO  T-  o  VO  + 1 1 CO1 1 W m CH  i  VO  w  O • CJ U «s  sr  w  o  sr o  o o o o o t 4- 4- + + + + 1  Pu  H  vO  CN  o  o  o  KI IM  1 1 i  CH  O  4- 1 + i  in  CO  o o  Jx! + CN  tn  •4-  \  -  H O  Pu  o  tn  w  tn  • i-H  IM  ' «Kj  O  «C  b  O  H O  -  CLi E  u  -4-  <e  CLH• ALPHA-QUARTZ Al(OH) * + K+ H20  0- 1G5000E+01 0,362239E-05 0.918179E-04 0.896216E-08 0.5000GGE-01 0.555084E+02  0.0212 •5.4177 -4.0371 •8.0476 • 1. 3010 1.7444  0.. 350466E + 06 0.3627 31E-01 0.51939 0E+Q2 0.371182E-02 0. 184065E + 05 0.941464E+07 •  0.372258E+02 0.385285E-05 0.5516 86E-02 0.394262E-06 0.195510E+01 0. 100000E+04  TOTAL MASS TRANS FER IN THE  KINEBAL PHASES K-FELDSPAR  AMCUNT OF REACT ANT DESTROYED MOLES ' GRAMS -0.8913E-G8-0.2481E-G5  :• AMOUNT OF REACTANT PRODUCED MOLES GRAMS 0.0  •' AMOUNT OF PRODUCT PRODUCED MOLES GRAMS  0. 105000E + 01  AMOUNT OF PRODUCT DESTROYED MOLES GRAMS  NET AMOUNT I N THE SYSTEM MOLES GRAMS 0.3593E-01  0.0  NUMEEE OF DELXI INCREMENTS FORHARD = IONIC S T R E N G T H S  77  SYSTEM  0.2669E-07 0. 1604E-05  ALPHA-QUARTZ  5.5446 -1.4404 1.7155 -2.4304 4.2650 6.9738  ELECTRICAL BALANCE -  TOTAL NUMBER OF PHASE BOUND ARIES PRESENTLY. BEING CONSIDERED =  1  0.6 534 74E-15  0.0  0.0  0.1000E+02  0. 1664E-0 1 0. 1000E + 01  ****** J J  E W  SUMM SB Y  STEP  *******  DELXI XI LOG X I  78  ..•''• = 0.570417E-06 =0.57933OE-06 = -6.237  BEACT ANTS  MINER AL  CU EOLATIVE GBAK CHANGE  K-FELDSPAB  - 0 . 161249E-03  LOG CUMUALT GBAM CHANGE -3.793  CUMULATIVE MOLE CHANGE -0.579330E-06  LOG CUMULAT REACTION MOLE CHANGE• COEFFICIENT -6.237  0.10000QE+01  LOG OF SOLUBILITY PRODUCT 0.328379E+01  LOG OF ION PRODUCT  0. 26 8674E+01  PRODUCTS  MINERAL ALPHA-QUARTZ 3USCOVITE  MINERALS  USE A- QUARTZ ANALCIME ANDALUSITE A-CBISIOEALITE 3ETA-QUA.ETZ BOEHMITE 3-CBISTOFALITE COESIIE CCBUNEUM CEHYDBATED ANALCIME DIASPOBE  GIEESITE HALITE ' HIGH .SANIDINE HIGH A I B I T E JADEITE SALSILITE KACIINITE KYANITE K-FELDSPAR LOW ALEITE MUSCOVITE NEPHELINE P ABAGONITE POTASSIUM OXIDE EYBOEHYLLIIE  CUMULATIVE GBAM CHANGE 0. 10G007E+01 0.76C'l90E-04  LOG K 0.0 6.372 . 2.801 0.270 0. 138 0.714 0.376 C.810 3.617 1 1.079 -0.131 -0*9 22 1.432 4.483 7.504 7.813 6.463 -2.341 2.526 3.284 6. 186 0.0 9.227 3.760 84.316 -0.716  LOG CUMUALT GBAM CHANGE  CUMULATIVE MOLE CHANGE  '  0. 166443E-01 0, 190852E-06  0.000 -4.119  LOG Q 0.0 4.0085973 •2.6703051 0.0 0.0 •1,3433681 0.0 0.0 •2. 6703051 4.0250284 •1.3433681 •1.3597992 •0.3750500 2.6 867362 4.0250284 4.0250284 2.6867362 •2.7031673 •2.6703051 2.6867362 4.0250284 0. 0 4.0250284 1.3382922 8. 0 4 377 76 -2. 6867362  LOG CUMULAT MOLE CHANGE -1.77 9 -6.719  REACTION COEFFICIENT  0.199495E+01 0.3 346 97E+00  LOG OF SOLUBILITY PRODUCT 0.0 0.0  LOG OF ION PRODUCT  0.0 0. 0  3. 160 67.427 1.223  SILLIMANIT E SODI DM OXIDE SY.LVITE  -2.6703051 10.7203620 -1.7 133422  79  GASES  1. 505 17  SIEAB  LOG ACTIVITY  ACTIVITY  LOG K  NAME  -1.5 2160  0.30088E-G1  AQDEOOS SPECIES SPECIES AL + + + K> NA t H4SIC4 Cl-r  OflH+ H20 AL (CH) +• AL(Ofl)4H3SIC4BCL SPECIES NA-* CLH+ ' K+  .  AL + + * H4SIC4 OHAL<OH) *• AL (CH) 4H3SI04HCL  MOLALITY  LOG MOL  -8.656 0.22065E- 08 0.5000QE- 01 - 1 . 301 0. 10000E+01 - 0 . 000 - 4 . 037 0.91812E- 04 0. 10500E + 01 0. 02 1 0.54SS3E- 0 8 -8.260 0.34567E- 05 ' \ - 5 .461 0.55508E+02 1. 744 -8.338 G.459 70E-08 0.18955E- 10 - 10.722 - 8 . 205 0.623 55E- 08 0. 10265E- 1 1 -11- 98:9 LGG K 0.0 0.0 0.0 0.0 -8,1746 4.00 42 13.9878 -3.4 365 15.0734 13.8996 6.1363  LCG C 0.0 0.0 0.0000 0.0 -8.1746 4.0042 13.9878 -3.4365 15.0734 13.8996 6.1363  ACTIVITY  LOG  0. 166 11E-09 0.30354E-01 0.66147E+00 0.91812E-04 0.63744E+00 0.34964E-08 0.28321E-05 0.96287E+00 0. 10323E-08 0.12538E-10 0.41246E-08 0. 13191E-11  ACT  -9.780 -1.518 -0.179 -4.037 -0.196 -8.456 - 5 . 54 8 -0.016 -8.986 - 10.902 -8.385 - 11.880  ACT COEF 0.75284E-01 0.60708E+00 0.66147E+00 0. 10000E*01 0.60708E+00 0.63580E+00 0.81932E+00 0.17346E-01 0.22456E+00 0.66147E+00 0.66 147E+00 0.12850E+01  N EAB DL N M/DXI D2 M/DXI 0. 15547E-03 0. 15547E-03 - 0 . 17144E+02 0. 16344E-03 0, 15566E-03 -0.18000E+02 - 0 . 65354E+G0 --0.17064E+06 -0.29034E+04 0. 66531E+00 0. 1 33 06E+02 0.40407E+03 0.69551E+03 - 0 , 17665E-02 -0.56881E+06 0.29540E-02 - 0 . 3 3 5 8 4 E - 0 7 .-0.36579E-03 0.29284E+03 0.84703E-03 0. 17064E + 06 -0,39817E+06 0,51869E+03 - 0 . 23251E-02 0.58171E+00 0. 20139E-05 0, 1 1376E+06 0.33205E+03 0. 9604 3E-03 0.17064E+06 - 0 . 19408E-06 -0. 1706 4E+06 -0.86223E-Q3  LG ACT C  GBAMS/KGM H20  PPM  - 1 . 123 -0.217 -0. 179 0. 0 -0.217 -0.197 -0.087 -1.761 -0.649 -0. 179 - 0 . 179 0. 109  0. 59535E-07 0. 19551E+01 0. 22990E+02 0. 88246E-02 0. 37226E+0 2 0. 93528E-07 0. 34842E-05 0.10000E+04 0. 20 222E-06 0. 1801OE-08 0. 593 04E-06 0. 37429E-10  0.000 1840.664 21643.996 8.308 35046.605 0. 000 0.003 941460.423 0.000 0.000 0.001 0.000  D2LN M/DXI -0. 17144E+02 -0. 17143E + 02 -0.29877E+11 0.79044E+04 -0.99589E+11 0.32174E+02 0.29877E+11 -0.697 12E + 1 1 0. 19918E*11 0.29877E+11 -0.29877E+11  D3LN M/DXI D3 M/DXI 0. 14587E + 08 0. 14587E+08 0.15316E+08 0. 14586E+08 0.86284E*09 -0, 10 100E+17 -0.55284E+08 -0.11060E+10 -0.33668E+17 -0.14833E+09 -0.33045E+04 -0.35992E+08 0. 101O0E+17 0, 15072E + 09 -0.23568E+17 -0.19977E+08 0.26561E+06 0. 67336E-H6 0.10100E+17 0. 17090E + 09 0.25624E+03 - 0 . 10100E+17  * TOTAL MOLES H2C  0.0  0.0000  - 0 . 86299E-02  -0. 15547E-G3  0. 95 162E + 03  0. 17144E+02  -0.80968E+09  -0.14587E+08  * ACTIVITIES * H20  0.0  0.0000  - 0 . 17611E-03  •-0.18290E-03  0. 15490E+02  0. 16087E + 02  - 0 . 17328E + 08  -0.17996E+08  DI/DXI IS -0.56516E-G2 TOTAL MOLES OF KATEB IN THE SYSTEM I S COMPONENTS  TOTAL MOLALITY  55.50825020 MOLES LOG TOTAL . TOTAL MOLALITY GBAMS/KGM H20  TOTAL PPM  LOG TOTAL PPM  LOG PPM -4. 251 3. 265 4. 3 35 0. 919 4. 545 - 4 . 055 -2. 484 5. 974 - 3 . 720 -5. 771 -3. 253 - 7 . 453  O,100000E+01 0. 1G5Q00E+01 0. 2 274 15E-G8 0.9181171-04 0.346302E-05 0. 5 0 0 0 0 4 E - 0 1 0.555084E+02  NA* CL-  8USCCVITE A L P H A - C.U A R T Z  B+ K+  H20  0.229898E+02 0.372258E+02 0.905823E-06 0.551649E-02 0.349062E-0 5 0.195512E+01 0, 1 0 0 0 0 0 E + 0 4  •0.0000 0. 0 2 1 2 -8.6432 -4.0371 •5.4605 •1.3010 1. 7 4 4 4  TOTAL  KOEBAI  EH ASES  K-FELDSPAR  ' AMOUNT OF •„• REACTANT DESTROYED MOLES' GRAMS - 0 . 5 7 9 3 E - 0 6 - 0 . 16 1 2 E - C 3  MASS TRANSFER  AMOUNT OF B E A C T A N T PRODUCED MOLES GBAMS 0. 0  MUSCOVITE  I O N I C STRENGTH =  BOUNDARIES. P R E S E N T L Y  80  SYSTEM  AMOUNT OF PRODUCT PRODUCED MOLES • GRAMS  AMOUNT OF PRODUCT DESTROYED MOLES GRAMS  0.1000E+02  0. 1 165E-05. Q . 6 9 9 9 E - 0 4  0.0  0.0  0. 1 6 6 4 E - 0 1 0 . 1 0 0 0 E + 01  0.1909E-06  0.0  0.0  0.1909E-06  E L E C T R I C A L BALANCE = B E I N G CONSIDERED  NET AMOUNT j!N THE SYSTEM MOLES GBAMS 0.3593E-01  0.7602E-04  F0R8ABD =  0. 1 0 5 0 0 0 E + 0 1  T O T A L NUMBEfi OF P H A S E  I N THE  5.3 353 5.5446 -2.0692 1.7155 -1.4833 4.2650 6.9738  0.0  . ALPHA-QUARIZ  SUM EES OF DELXI INCREMENTS  0.216440E+06 0.350466E+06 0.852796E-02 0.519355S+02 0.328628E-01 0.184066S+05 0.941464E+07  =  2  0.740647E-15  0.7602E-04  ****** NEW  STEE SUMMARY  *******  = 0.420670E-06 = 0. 10GQ00E-05 = -6.000  DELXI XI LOG  81  XI  REACTANTS  MINERAL 8—FELDSPAR  CUMULATIVE GRAM CHANGE -0.27S337E-03  LOG CUMU ALT GRAM CHANGE  CUMULATIVE MOLE CHANGE  - 3 . 555  - 0 . 100000E-05  LOG CUMUL AT MOLE CHANGE •6.000  REACTION COEFFICIENT 0.100000E+01  LOG OF SOLUBILITY PRODUCT 0.328379E+01  LOG OF ION PRODUCT 0.27 108 1E+0 1  PRODUCTS  MINERAL ALPHA-QUARTZ MUSCOVITE  MINERALS ALEH A-QUAETZ ANALCIME ANDALUSITE A-CR ISTOB AL.ITE BETA-QUAFTZ BOEBMITE B-CBISTCEALITE GOES H E CCEUNDUM DEHYDRATED ANALCIME D.IAS EG BE GIBBSITE HALITE HIGH S ANIDINE HIGH ALETTE JAEEITE KALSILITE 8 AC U N I T E 8YANITE K-FELDS PAR LOW ALBITE MUSCOVITE NEPHELINE PABAGCNITE POTASSIUM OXIDE EYBO PHY L U T E ,  CUMULATIVE GRAB CHANGE 0. 100012E+01 0. 132050E-03  LOG CUMUALT GRAM CHANGE 0.000 3.879  CUMULATIVE MOLE CHANGE 0. 166451E-01 0.33 1524E-06  LOG K  LOG Q  0.0 6.372 2.801 0.270 0. 138 0.714 0.376 0.810 3.617 1 1.079 -0.131 -0.922 1.432 4.483 7.504 7. 8 13 6.463 - 2 . 341: 2.526 3.284 6. 186 0.0 9.227 3.760 84.316 -0.716  0. 0 4.0326672 •2.6943775 0.0 0.0 • 1. 3554043 0.0 0.0 -2.6943775 4.0490983 •1.3554043 • 1. 3718354 •0.3750500 2.7108086 4.0490983 4.0490983 2.7108086 -2.7 272397 -2.6943775 2.7108086 4.049098 3 0.0 4.0490983 1.3382897 8. 1 159946 •2. 71080 86  LOG CUMULAT MOLE CHANGE -1.779 -6.479  REACTION COEFFICIENT 0.199539E+01 0.334475E+0Q  LOG OF SOLUBILITY PRODUCT 0.0 . 0.0  LOG OF ION PRODUCT 0.0 0.0  S I L L IM AN.ITE SODIUM OXIDE S YLV.ITE  3. 160 67.42 7 1.223  -2.6943775 10.7925741 - 1. 7 133398  82  GASES NAME  LOG K  STEAM  ACTIVITY  1. 505 17  LOG  0.30C88E-01  ACTIVITY -1.52160  AQUEOUS S P E C I E S SPECIES AI+ + + K+  NA + H4S.I04 CLOflH+ H20 AL (OH) • + AL (CH) 4H3SIG4HCL SPECIES NA + CL-  MOLALITY  LOG  0. 16724E-08 0. 50001E-01 0. 100C0E+01 0. 91812E-04 0. 105G0E+01 0. 5S756E-08 0. 31809E-05 0. 55508E+02 0. 378€4E-08 0. 20035E-10 0. 67758E-08 c . S4465E-12 LOG K 0.0 0.0  * TOTAL EC1ES * H20 0.0 * ACTIVITIES * H2C  AL + + + H4SI04 OHAL (OH)+ + AL (OH) 4H3SI04HCL  G.O  0.0 -8.1746 4.0042 13.9878 - 3 . 4365 15,0734 13.8996 6. 1363  0.0  ACTIVITY  -8.777 - 1 . 301 -0.000 -4.037 0.021 -8.224 -5.497 1.744 -8.422 -10.698 - 8 . 169 -12.025  LOG Q 0.0 0.0 0.0000 0.0 - 8 . 1746 4.0042 13.9878 -3.4365 15.0734 13.89 97 6.1363  h* K+  MOL  LOG ACT  0. 12591E-09 0. 3 0 3 5 4 E - 0 1 0.66147E+00 0.9 18 12E-04 0.63744E+GG 0.37994E-08 0.26062E-05 0.96287E+00 0.85027E-09 0. 13253E-10 0.44820E-G8 0.12139E-11  N E AB  - 9 . 900 - 1 . 518 -0. 179 -4. 037 - 0 . 196 -8.420 -5. 584 - 0 . 016 -9. 070 - 10. 878 - 8 . 349 - 1 1 . 916  ACT COEF  LG ACT C  0.75284E-01 0.60708E+00 0.66 147E+00 0. 10000E + 0 1 0.60708E+00 0.63580E+00 0. 8 1932E+0G 0. 17346E-0 1 0.22456E+00 0. 66 147E + 00 0.66147E+00 0.12850E+01  -1.123 -0.217 -0.179 0. 0 -0.217 -0.197 -0.087 -1.761 -0.649 - 0 . 179 -0.179 0. 109  GBAMS/KGM  0.45125E-07 0. 19551E+01 0.22990E+02 0.88246E-02 0.37 226E+0 2 0 . 10 16 3E-06 0.32063E-05 0, 10000E + 04 0. 16656E-06 0. 19036E-08 0.644431-06 0.34443E-10  PPM  0. 14827E-03 0. 15588E-03 •0.65505E + G0 0.66553E+00 0. 13938E-02 •0.32487E-07 0. 1042 1E-02 G.20327E-02 0.23946E-05 0, 118 16E-02 0. 194 5 3E-G6  D2 M/DXI •0.76440E+Q1 •0.80255E+01 -0, 23675E + 04 0.37 239E+03 0.61 128E+03 0.78736E-03 0.39874E+03 0.50626E+03 0. 76498E+0 0 0.45212E+03 •0.70309E-03  0.0000  -0.823G4E-02  -0.14827E-03  0.42431E+O3  0.76440E+01  -0.10606E+10  -0.19106E+08  0.0000  -0.17035E-03  -0.17692E-03  0.41287E+01  0.42879E+0 1  -0.22990E+08  -0.23877E+08  D 2 LN M/DXI •0.76440E+01 -0. 76433E + 0 1 -0 . 36596E+11 0.72705E+04 -0.12199E+12 0.85758E+01 0.365 96E+11 -0. 85391E + 1 1 0.24398E+11 0.36596E+11 -0. 36596E + 1 1  TOTAI CGIES OF W ATEB I N TEE SYSTEM TOTAL MOLALITY  IS  D3 M/DXI 0. 19106E + 08 0.20061E+08 0. 10298E+10 •0.55763E+08 -0. 14586E + 09 -0. 43843E + 04 0.22719E+09 -0. 23685E + 08 0.38564E+06 0.2576 1E+09 0.30583E+03  5 5 . 50825019 MOLES LOG TOTAL MOLALITY  TOTAL GBAMS/KGM H20  TOTAL PPM  LOG TOTAL PPM  LOG PPM  0.000 1840.674 21 643. 996 8.3 08 35046.604 0.000 0. 003 941460.413 0. 000 0.000 0.001 0.000  DLN M/DXI 0. 14827E-03 O.14846E-03 -0. 18950E+06 0. 1331 1E+02 -0.6316 8E+06 -0.35334E-03 0. 18950E+06 -0.44218E+06 0. 126 3 3E+06 0.1895QE+06 -0.18950E+06  DI/DXI I S - 0 . 3 8 3 2 1 E - 0 2  COMPONENTS  H20  D31N M/DXI 0. 19 106E+08 0. 19106E + 08 -0. 13702E+17 -0.11155E+ 10 -0.45674E+17 -0.47753E+08 0. 13702E+17 -0.31971E+17 0.91347E+16 0. 13 702E+17 -0. 13702E + 17  -4. 372 3. 265 4. 335 0. 9 19 4. 545 -4. 019 -2. 520 5. 974 - 3 . 805 - 5 . 747 - 3 . 217 - 7 . 489  0. 100-000 E+0 1 0. 105000E+01 0. 182629E-08 0.9181361-04 0. 3.182 57 E- 05 0.500007E-01 0,555084E+02  NA + CLMUSCOVITE ALPHA-QUOTS H+ K+  H20  0.229893E+02 0.372258E+02 0.727435E-06 0.551660E-02 0.320794E-05 0.1955 13E+0 1 0. 100000E+04  •0.0000 0. 0212 -8.7384 -4.0371 •5.4972 •1.3010 1. 7444  TOTAL  MINERAL K-FELDS PAR  AMOUNT OF SEACTANT DESTROYED MOLES GRAMS  PHASES  -0.10 00E-05-0.2783E-03  5,33 53 5.5446 -2. 1644 1.7155 -1.5200 4.2650 6.97 38  83  MASS TRANSFERRIN THE SYSTEM  AMOUNT OF REACTANT PRODUCED HOLES GRAMS 0.0  0.216440E+06 0.350466E+06 0.684851E-02 0.519366E+02 0,302015E-01 0.184067E+05 0.941464E+07  AMOUNT OF PRODUCT PRODUCED MOLES GRAMS  AMOUNT OF PRODUCT DESTROYED MOLES GRAMS  NET AMOUNT I N THE SYSTEM MOLES GRAMS Q.3593E-0 1 0.1000E+02  0.0  ALPHA-COARTZ  0.2004E-05 0.1204E-03  0.0  0.0  0.1665E-01  MUSCOVITE  0.3315E-Q6 0.1321E-03  0.0  0.0  0.3315E-06 0.1321E-03  NUMBER OF DELXI INCREMENTS IONIC STB £ NGT H •=  FOBWARD =  0. 105000E*01  ELECTRICAL BALANCE =  TOTAL NUMBER OF PHASE ECU NDARIES PRESENTLY BEING CONSIDERED  =  2  0.104628E-14  0.1000E+01  ****** NEW STEP SUMMARY ******* DELXI XI. LOG X I  84 = 0.357609E-06 = 0. 177828E-05 = -5.750  REACTANTS  MINERAL  CUMULATIVE GRAM CHANGE  K-FELDSPAB  -0.494960E-03  LOG CUMUALT GBAM CHANGE -3.30 5  CUMULATIVE MOLE CHANGE -0. 177828E-05  LOG CUMULAT MOLE CHANGE - 5 . 750  REACTION COEFFICIENT 0. 1 00000EJ-01  LOG OF S O L U B I L I T Y PRODUCT 0. 328379E+01  LOG OF ION PRODUCT 0.276151E+01  PRODUCTS  MI  NEB  AL  CUMULATIVE GBAM CHANGE  LOG CUMUALT GRAM CHANGE  CUMULATIVE MOLE CHANGE  LOG CUMULAT MOLE CHANGE  0. 166467E-01 0.591619E^-Q6  -1.779 -6.228  ALPHA—QUAST2 MUSCOVITE  0. 100021E+01 Q.235650E-03  HISEBAIS  ICG K  LOG Q  0.0 6.372 2.801 0. 27 0 0. 138 0.714 0.376 0.810 3,617 1 1.079 -0. 13 1 -0.922 1.432 4.483 7.50 4 7.813 6.463 -2.341 2.526 3.284 6. 186 0.0 9.227 3.760 84.316 -G.716  0.0 4.0833668 -2.7450815 0.0 0. 0 - 1. 3807563 0.0 0.0 -2.74508 15 4. 099797:9 -1.3807563 -1. 3971874 -0.3750500 2.7615 126 4.0997979 4.0997979 2.7615126 -2.7779437 -2.7450815 2.7615126 4.0997S79 0. 0 4.0997979 1. 3 3 8 2 8 5 2 8.2681068 •2.7615126  ALPHA-QUARTZ ANALCIME ANDALUSITE A-C fiISTCE A L I T E BETA-QUARTZ BCEHMITE B-CBISTO E A L I T E CGESITE CORUNDUM CEHYEBATEC ANALCIME DIASPOBE GIBESITE HALITE HIGH SANIDINE HIGH A L B I T E JADEITE KALSILITE KAOLINITE RYANITE K-FELDSPAR LOW A L E I T E MUSCOVITE NEEHELINE PABACONITE POTASSIUM OXIDE P YBOPHYLLITE  0.000 -3.62 8  REACTION COEFFICIENT 0.199578E+01 0.334181E+00  LOG OF S O L U B I L I T Y PRODUCT 0.0 0.0  LOG OF ION PRODUCT  0.0 0. 0  3.160 67.427 1. 223  SILLIMANI1E SODIUM CXIEE SYLVITE  -2.74508 15 10.9446773 -1.7 133353  85  GASES LOG K  EAUE  ACTIVITY  1.50517  STEAM  LOG ACTIVITY -1,52160  0.30088E-01  AQUEOUS SPECIES SPECIES  MOLALITY  AL + + +  0. 932 92.E-09 0.500 01E-0 1 0. 10000E + 01 Q.91812E-04 0. 10500E + 01 0.71187E-08 0.266SSE-05 0.55508E+02 0.25164E-0 8 0.22515E-10 0.80718E-08 0.79290E-12  K+  NA + H4SI04 CLOHB+ H20 AL{0fl)*4  AL (OH) 4H3SI04HCL SPECIES NA*  ICG  K "  0-0.  0.0 . 0.0, 0.0 -6.1746 4.0042 13.9878 -3.4365 15.0734 13.8996 6.1363  CL-  H+  •K*  AL + + + H4SIC4 ORAL (OH) + + AL(CH) 4H3SI04BCl  * TOTAL HOLES * H20 0.0 *  ACTIVITIES  H20  LOG  *  0.0  MOL  ACTIVITY  LOG ACT  -9.030 O.70233E-10 - 1 . 301 0.30355E-01 0.000 0.66 147E+00 -4.037 0.918 12E-04 0.63744E+0 0 0.021 -8.148 0.45261E-08 -5,573 : 0.2 1876E-05 1.74.4 0.96287E + 00 -8.59*9 0.56508E-G9 -10.648 0.14893E-10 -8.093 0.53393E-08 - 1 2 . 101 0. 10189.E-11  -10. 153 - 1 . 518 -0. 179 -4, 037 - 0 . 196 -8. 344 -5. 66 0 - 0 . 016 - 9 . 248 - 10. 827 - 8 . 273 - 1 1 . 992  ACT COEF  GRAMS/KGM H20  LG ACT C  0.75284E-01 0.60708E+00 0.66147E+00 0. 10000E+0 1 0.6G708E+00 0.63580E+Q0 0.81932E+00 0. 17346E-01 0.22456E+00 0. 66 147E+00 0.66 14 7E+00 0. 12850E + 01  - 1 . 123 - 0 . 217 • -0. 179 0. 0 - o . 217 - 0 . 197 -0. 087 - 1 . 761 - 0 . 649 -0. 179 -0. 179 0. 109  .  0.25171E-07 0.19551E+01 0.22990E+02 0.8824 6E-02 0. 37226E+02 0. 12107E-06 0.26912E-05 0. 10000E+04 0.11069E-06 0.21392E-08 0.767691-06 0.28910E-10  0.000 184 0.6 93 21643.996 8. 308 35046.604 0. 000 0.003 941460.3 96 0.000 0.000 0.001 0.000  LOG Q 0,0 0.0 O.00G0 OiO -8.1746 4.00 42 13.9879 -3.4365 15.0734 13.89.97 6.1363  N EAR 0. 149 85E-03 0. 15753E-03 •0.65663E+00 0.66583E+00 •0.93109E-03 •0. 33673 E-07 0. 1479 1E-02 •0. 16158E-02 0.32075E-05 0. 16771E-02 •0.19500E-06  D.LN M/DXI 0.149 85E-03 0. 15003E-03 -0. 22605E+06 0. 13316E + 02 -0.75350E + 06 •0, 36676E-03 0.22605E+06 -0.52745E+06 0.15069E+06 0.22605E*06 -G.22605E+06  D2 M/DXI 0. 13244E + 02 0. 13906E + 02 •0. 13254E+04 0.32540E+03 0.48923E+03 •0, 40521E-02 0.67169E+03 0.48376E+03 0. 12149E + 01 0.76162.E*03 •0.39 36 IE-03  D2 LN M/DXI 0. 13244E+02 0. 13244E+02 •0.51554E+11 0.63305E+04 -0. 171 85E+12 •0.44134E+02 0.51554E+11 -0. 12029E+12 0.34369E*11 0.51554E+11 -0. 51554E*1 1  ' D3 M/DXI 0.32449E+08 0.34071E+08 0. 15159E+10 -0. 55775E + 08 -0. 14290E + 09 -0.75749E+04 G.45412E+09 -0. 30023E + 08 0.72835E+06 0.51491E+09 0.45018E+03  0.0000  -0.83177E-02  -0. 14985E-03  - 0 . 73513E + 03  -0. 13244E + 02  - 0 . 1 80 1 2.E+ 10  0.0000  - 0 . 17657E-03  - 0 . 1 8338E-03  -0.21248E+02  -0.22067E+02  -0.39721E+08  OI/DXI I S - 0 . 1 0 9 2 1 E - 0 2 TOTAL MOLES OF WATER IN THE SYSTEM I S COMPONENTS  PPM  TOTAL MOLALITY  55.50825019 MOLES LOG TOTAL MGLALITY  TOTAL GRAMS/KGM H20  TOTAL PPM  LOG TOTAL P P l  LOG PPM -4. 625 3. 265 4. 3 35 0. 919 4. 545 - 3 . 943 -2. 596 5. 974 . - 3 .982 -5. 696 -3. 141 - 7 . 565  D3LN M/DXI 0.32449E+08 0.32449E+08 •0.22889E+ 17 •0. 1 1 157E+10 -0.76296E+17 •0.8.2504E+08 0.22889E+17 •0. 53407E+17 0.15259E+17 0.22889E+17 -0.22889E+17 -0. 32449E+08 -0.41252E + 08  SC + . B20  0.229898E+02 0.372258E+02 ' 0.460953E-06 0.551680E-Q2 0.268495E-05 0.195515E+01 0. 100000E+04  0.0000 0.0212 - 8 . 9366 -4.0371 •5,. 5 7 4 5 • 1.3010 1.7444  0.100000E+Q1 0. 1C50G0E+01 0. 1 1 5 7 2 6 E - 0 8 0.918169E-Q4 0.266372E-0 5 0. 5000 12E-01 0.555084.E+G2  CLMUSCCVITE ALPHA-QUARTZ H+  TOTAL  MINERAL . PH ASES  AMOUNT OF BEACTANT DESTROYED MOLES GBAMS -0.1778E-05-0.4950E-03  8-FELDSPAB  MASS T R A N S F E B  0.216440E+06 0.350466E+06 0.433969E-02 0.51.9385E + 02 0. 252778E-0.1 0.T84 0 6 9 E + 0 5 0 . 9 4 1 4 6 4 E + 07  86  IN T H E SYSTEM  AMOUNT OF ^PRODUCT PRODUCED MOLES GRAMS  AMOUNT OF REACTANT PRODUCED MOLES GRAMS  5. 3 35 3 5.5446 - 2 . 3625 1.7155 -1.5973 4.2650 6.9738  AMOUNT OF PRODUCT DESTROYED MOLES GRAMS  0. 3 5 9 3 E - 0 1  0.0  0.0  NET AMOUNT I N THE SYSTEM MOLES GRAMS 0. 1 0 0 0 E + 02  ALPHA-QOABTZ  0.3557E-05  0.2138E-03  0.0  0.0  0. 1 6 6 5 E - 0 1 0. 1 0 0 0 E + 01  MUSCOVITE  0.5916E-06  0.2356E-03  0.0  0.0 .  0.5916E-06  NUMEES OF  D E L X I INCREMENTS.FORWARD =  IONIC  STRENGTH =  O.1O5000E+01  TOTAL  NUMBEB. O F P H A S E  EOUNDABIES  E L E C T R I C A L BALANCE  PRESENTLY  BEING  CONSIDERED =  =  2  0.119726E-14  0.2356E-03  ****** NEW STEE SUMMARY *******  87  = 0.9 6 6057E-07 = 0.316228E-05 = -5.500  DELXI XI LOG X I  REACTANTS  MINERAL S-FELDS PAR-  CUMULATIVE GRAM CHANGE -0.880178E-03  LOG CUMUALT GRAM CHANGE  -3.055  CUMULATIVE MOLE CHANGE  LOG CUMULAT MOLE CHANGE  REACTION COEFFICIENT  -0.316228E-05  -5.500  0.100000E+01  LOG OF SOLUBILITY PRODUCT 0.328379E+01  LOG OF ION PRODUCT 0.288200E+01  PRODUCTS  MINERAL ALPHA-QUARTZ MUSCOVITE  MINERALS ALEHA-QU ART2 ANALCIME ANDALUSITE A-CRISTCEALITE BETA-QUARTZ BOEHMITE 8-CR1STOBALITE COESITE COBUNCUM DEHYDRATED ANALCIME DIASPOBE GIBESITE HALITE HIGH SANIDINE HIGH ALEITE J ABEITE KALS1LITE K ACL I NIT E KIANITE 8-FELDSPAR LOW A L B I I E MUSCOVITE NEPHELINE PABAGCNITE POTASSIUM OXIDE EYBOEHYLIITE  CUMULATIVE GRAM CHANGE 0. 100038E + 01 0.4 197 04 E-0 3  LOG CUMUALT GRAM CHANGE 0.000 -3.377  CUMULATIVE MOLE CHANGE  LOG CUMULAT MOLE CHANGE  REACTION COEFFICIENT  0. 166495E-01 0. 105370E-05  -1.779 -5.977  0.199458E+01 0. 33 372 5E + 00  LOG K  LOG Q  0.0 6. 372 2.801 0.27G 0. 138 0.714 0.37 6 0.81G 3.617 11.079 - 0 . 131 -0.922 1.432 4.483 7.504 7.81 3 6.463 -2.341 2.526 3.284 6. 186 0.0 . 9.227 3.760 84.316 -0.716  0.0 4.20384 32 •2.8655660 0.0 0.0 • 1.440S985 0.0 0.0 •2.8655660 4.2202743 •1.4409985 •1.4574296 •0.3750500 2. 8819971 4.2202743 4.2202743 2.88 19971 •2.8984282 •2.8655660 2.8819971 4.2202743 0. 0 4.2202743 1. 3382772 8.6295602 •2.8819971  LOG OF SOLUBILITY PRODUCT 0.0 0.0  LOG OF ION PRODUCT 0.0 0.0  S I L L I M AN H E SODIUM OXIDE SYLVITE  3. 160 67.42 7 1.223  -2.8655660 1 1. 30 61 147 - 1. 7 1 3 3 2 7 3  88  GASES NAME  LOG K  STEAM  ACTIVITY  1. 50517  LOG  0. 30088E-01  ACTIVITY -1.52160  AQUEOUS S P E C I E S PECIES  MOLALITY  AL >••+ + K+ NA + H4SI04 CLGfiH* H20 AL (OE) + + AL(CH)4H3SI0 4HCL  0 .23304E- 09 0 .50002E- 01 0 . 10000E+0 1 0 .91812E- 04 0 . 10500E«-01 0 . 10790E-07 0 . 1 7 6 1 1 E - 05 0 .5550SE+O2 0 .95302E- 09 0 .297G9E- 10 0 . 1223 4E-07 0 . 5 2 3 0 0 1 - 12  PECIES NA + CLH+ K+ AL + + + H4SI04 OHAI (CH) + + AL (OH) 4H3SI04HCL  LOG KOL  ACTIVITY  - 9 . 633 - 1 . 301 0. 000 - 4 . 037 0. 021 - 7 . 967 - 5 . 754 1. 744 - 9 . 021 -10.527 - 7 . 912 - 1 2 . 282  0. 17544E-10 0.3 0355E-01 0.66 147E+00 0.91812E-Q4 0.63744E+00 0.68600E-08 0. 14429E-05 0.96287E+00 0.2 1401E-09 0.19652E-10 0.80925E-08 0.67205E-12  LOG  ACT  -10.756 -1.518 - 0 . 179 - 4 . 0.37 -0. 196 -8.164 -5.841 -0.016 -9. 670 -10.707 -8.092 -12. 173  LG ACT C  ACT COEF 0.75284E-01 0.60708E+00 0. 66 147E+00 0.10000E+01 0.60708E+00 0.63580E+00 0.81932E+00 0. 17346E-01 0.22456E+00 0.66147E+00 0.66147E+00 0. 12850E + 01  - 1 . 123 -0,217 - 0 . 179 0. 0 -0.217 -0.197 -0.087 -1.761 -0.649 -0.179 -0. 179 0. 109  GRAMS/KGM  PPM  H20  0.62878E-08 0, 19552E+01 0. 22990E+02 0. 8 8 2 4 6 E - 0 2 0. 37226E+02 0. 18350E-06 0. 1775 1E-05 0. 10000E+04 0. 41922E-07 0. 28 227E-08 0. 11635E-05 0. 19Q69E-10  LOG PPM  0. ooo 1840.727 21643.995 8.308 35046.603 0.000 0.002 941460.364 0.000 0. 000 • 0.001 0.000  LOG Q 0.0 0.0 0.00 00 0.0 - 8 . 1745 4.0042 13.9880 -3.4365 15.0735 1.3.8998 6.1363  N E AH 0. 24753E-03 0. 2 6 0 1 0 E - 0 3 - 0 . 65560E+00 0.666 29E+00 - 0 . 31402E-03 - 0 . 58238E-07 0. 3 7 4 2 7 E - 0 2 - 0 . 86774E-03 0. 695 16E-05 0. 42437E-02 -o,. 19470.E-06  DLN M/DXI D2 M/DXI 0.24753E-03 0. 140G8E+-03 0.2 477 1E-03 0. 14708E + 03 - 0. 359 35E + 06 0.38302E+04 0. 133 25E + 02 0. 23 704E+0.3 -•0. 1 1978E + 07 0.26514E+03 - 0.6.34 3 2E-03 - 0 . 3 4 0 8 0 E - 0 1 0.35935E+06 0.26680E+04 - 0.83849E+06 0. 42084E+-03 0.23956E+06 0.41229E+01 0.30252E+04 0.35935E+06 - 0.3 59 35E+06 0. 1 1 375E-02  D2LN M/DXI D3 M/DXI 0. 14008E+03 0. 17134E + 09 0. 14008E+03 0. 17991E+09 - 0 . 12703E+12 0.65485EM0 0. 456.30E + 04 -0.48838E+08 -0.42344E+12 - 0 . 12764E+Q9 -0. 371 19E+0 3 -0.40791E+05 0. 12703E+12 0.28153E+10 -0. 2964 1E+12 -0.48427E+08 0.38473E+07 0.84689E+11 0. 12703E+12 0.31922E+10 0.19447E+04 - 0 . 12703E+12  D3LN M/DXI 0. 17 134E+09 0. 17134E+09 -0.86955E+17 -G.97691E+09 -0.28985E+18 -0.44429E+09 0.86955E+17 -0.20290E+18 0.57970E+17 0. 86955E+ 17 -0.86955E+17  TGTAL KGIES * H20 0.0  0.0000  - 0 . 137 40E-01  - 0.2475 3E-03  -0.77754E+04  - 0 . 14008E+03  -0.95109E+-10  - 0 . 17134E + 09  ACTIVITIES * H20  0.0000  -0.30538E-03  - 0.31716E-03  -0. 17870E*03  - 0 . 18560E+03  -0.21390E+09  -0.22214E+09  OI/DXI I S  IOG F 0.0 0.0 0.0 0.0 -8.1746 4.0042 13.9878 -3.4 3 65 15.0734 13.8996 6.1363  0.0  0.64437E-02  TOTAL CCIES OF WATER I N TEE SYSTEM I S COMPONENTS  TOTAL MOLALITY  .55. 508250 17 MOLES LOG TOTAL MOLALITY  TOTAL GR AMS/KGM H.20  TOTAL PPM  LOG TOTAL PPM  - 5 . 228 3. 265 4. 335 0. 919 4. 545 -3. 76 3 - 2 . 777 5. 974 -4. 404 - 5 . 576 - 2 . 960 -7. 746  0.0000 0.0212 -9.3923 -4.0370 •5.7592 •1.3010 1.7444  0. 100-000 E+01 0. 10.50 OOE+0 1 0.405255E-09 0.9 182331-04 0.114106E-05 0.500021E-01 0.5550841+02  NA + CLMUSCOVITE ALPHA-QUARTZ a*.  8+ H20  0.229898E+02 0.372258E+02 0.161419E-06 Q.551718E-02 0. 175493E-05 0.195518E+01 0. 10000GE + 04  0. 216440E+06 0.350466E+06 0.151969E-02 0.51942 1E + 02 0. 165220E-01 0. 184073E+05 0.941463E+07  5.3353 .5. 5446 -2.8182 1.7155 -1.78 19 4.2650 6.9738  89  TOTAL MASS TRANSFEB IN THE SYSTEM  . MINERAL EH ASES K-FELDSPAR  AMOUNT OF . REACTANT DESTROYED MOLES GBAMS  AMOUNT OF BEACTANT PRODUCED MOLES "•' GRAMS  -0.3162E-05-0.8802E-03  0.0  AMOUNT OF PRODUCT PRODUCED MOLES GRAMS  AMOUNT OF PRODUCT DESTROYED MOLES GRAMS  NET AMOUNT IN THE SYSTEM MOLE'S GRAMS 0.3592E-01  0.0  0.9999E+01  ALPHA-QUARTZ  0.6319E-05 0.3797E-03  0. 0  0.0  0. 1665E-0 1 0..1000E + 01  MUSCOVITE  0.1054E-05 0.4 197E-03  0.0  0.0  0. 1054E-05 0.4197E-03  NUMEER OF DELXI INCREMENTS FORWARD = IONIC STBENGTH =  10 ELECTRICAL BALANCE -  0. 10500OE+01  TOTAL NUMBER OF PHASE BOUNDARIES PB ES ENT LY BEING CONSIDERED =  DISTRIBUTION OF SPECIES CALLED AT STEP THE LOG K FOB K-FELDSPAR LGG K 3.283794 2  LOG Q  2  21  HAS BEEN EXCEEDED AT STEP 3.3074076  24  0.981612E-15  EQUILIBRIUM HAS BEEN ATTAINED  AND SOLUTION CHARACTERISTICS  A RE OUTLINED BELOW  90  0. 354948E-07 0. 519635E-05 -5.284  DELXI XI LOG X I  PRODUCTS  MINERAL ALPHA-QUARTZ MUSCOVITE  MINE RAIS ALPHA-QUARTZ ANALCIME ANDALUSITE A-CRISTOEALITE 3ETA-QUARTZ 30EHMITE B-CBISTOEALITE COESITE CORUNDUM DEHYDRATED ANALCIME DIASEOFE GIBBSITE HALITE HIGH SANIDINE HIGH ALBITE JADEITE KALSILITE KACLINITE KYANITE K-FELDSPAR LOW ALEITE MUSCOVITE NEEHELINE P ABAGGNITE PGTASSIUS CXIDE EYBOPHYLLITE SILLIMANITE SODIUM OXIDE S YLVITE  CUMULATIVE GBAM CHANGE 0. 100062E+01 0.689915E-03  LOG CUMUALT GRAM CHANGE 0.000 -3,161  CUMULATIVE MOLE CHANGE 0.166535E-01 0. 173209E-05  LOG K  LOG Q  0.0 6.372 2.801 0.27 0 0. 138 0.714 0.376 C.810 3,617 1 1.079 -0.131 -0.9 22 1.432 4.483 7.504 7.813 6.463 -2.341 2.526 3,284 6. 186 0.0 9.227 3.760 84.316 -0.716 3.160 67.427 1.223  0.0 4.6056286 -3.2673631 0.0 0.0 - 1 . 64 18971 0. 0 0.0 -3.2673631 4.6220597 - 1.6418971 - 1.6583282 -0.3750500 3.2837942 4.6220597 4.6220597 3.2837942 -3.3002253 - 3 . 2673631 3.2837942 4.6220597 0.0 4.6220597 1.3382655 9.8349515 -3,2837942 -3.2673631 12.51 14825 -1.7133155  LOG CUMULAT MOLE CHANGE -1.778 -5.76 1  GASES NAME STEAM  LOG K 1. 50517  ACTIVITY 0.30088E-01  LOG ACTIVITY -1.52160  REACTION COEFFICIENT 0.194284E+01 0.3 3 335 6E+00  LOG  OF  SOLUBILITY  0.0 0.0  PRODUCT  LOG OF ION PRODUCT 0.0 0-. 0  91  AQUEOUS S P E C I E S MOLALITY  SPECIES AL + + + K+ NA + H4S.I0 4 CLCHfi +  H20 A l (CH) + + AL (OH) 4H3SI04HCL  0.22828E-11 G. 50O0 3E-O 1 0. 100 00E+01 C.S1812E-04 0.10500E+01 0. 43237E-07 0.43964E-06 0.555 0 8E+G2 0.37398E-10 0.749491-10 0.2J9O2 5E-07 0. 13 0 56 E-12  LOG MOL  ACTIVITY  • LOG ACT  - 11.642 -1.301 0. 000 -4.037 0.021 ^7.364 -6.357 1.744 -10.427 - 10. 125 -7.310 -12.884  0.17186E-12 0. 3C356E-01 0.66147E+00 0.91812E-04 0.6.3744E+QQ 0.27490E-07 0.36021E-06 0.96287E+0G 0.83982E-11 0.49576E-10 0.3 2429E-07 0.16777E-12  -12.765 -1.518 -0.179 . -4.03 7 -0. 196 -7.561 -6.443 -0.016 - 11.076 - 10.305 -7.489 -12.775  ACT COEF  LG ACT C - 1. 123 -0.217 -0.179 0. 0 -0. 217 -0. 197 -0.087 -1.761 -0,649 - 0 . 179 -0.179 0. 109  0.75.284E-0 1 0.6 0708E+0 0 0. 66147E+00 0. 10000E+01 0.60708E+00 0.63580E+00 0.81932E+00 0. 17346E-0 1 0.22456E+00 0.6.6147E+00 0.66147E+00 0. 12850E+01  GR AMS/KGM H20 0.61594E-10 0. 19552E+01 . 0.22990E+02 0.88246E-02 0.37 22 6E+02 0.73535E-06 0.44315E-06 0.10000E+Q4 0, 16451E-08 0.71209E-08 0.46627E-05 0.47604E-11  PPM 0.00D • 1840.777 21 643,994 8, 308 35046.600 0.001 0.000 . 941460.3 16 0.000 0.000 0.004 0.000  LOG Q 0.0 .0.0 .0.00 00 0.0 -8.1745 4.0042 1 3,9878 -3.4365 15.07 34 13.8996 6.1363  N EAR 0.29687E-02 0.31173E-02 •0.55887E+00 0.66679E+00 0. 107 15E-04 •0.70978E-06 0.50351E-01 •0. 11760E-03 0.59042E-04 0.57O92E-01 •0.16597E-06  DLN M/DXI 0.2 968 7E-0 2 0.2 96 89E-02 -0. 1 2167E+07 0. 13335E+0 2 -0.40557E+07 -0.773 0 8 E-02 0, 12167E+07 -0.28390E + 07 0.81113E+06 0.12167E+0 7 -0, 12167E+07  D2 M/DXI 0.60504E+04 0.63529E+04 0. 21 878 E +06 0.42523E+03 0.34613E+02 •0. 14470E+01 0. 10 281E + 06 0. 23682E+03 0.966142+02 0.11658E+06 0.64973E-01  D2LN M/DXI D3 M/DXI 0.60504E+04 0. 14987E +11 0.60504E+04 0. 15736E+11 -0. 10040E+13 0.54357E+12 0.83262E+04 0.72562E+0 9 -0. 33468E + 1 3 -0.74649E + 08 -0. 15760.E+05 - 0 . 3583 5E + 0 7 0.25435E+12 0. 10040E+1.3 -0. 23428E + 13 - 0 . 1 87 05 E+09 0, 19042E+09 0.66936E+12 0,28841E+12 0. 10040E+13 0. 16143E + 06 -0. 1Q040E+13  * TOTAL BOIES * 0.0 H20  0.0000  - 0 . 16479E + 00  -0.29687E-02  -0. 33585E+06  -0. 60504E + 04  * ACTIVITIES * H2G  0.00 00  -0.37219E-02  SPECIES NA + CLH+ K* AL+ + + H4SI0 4 OHAL(CH)+* AL(CH)4H3SI04HCl  LOG K 0.0 0.0 .0.0 0.0 ' - 8 . 1746 . 4.0042 13.9878 -3.4365 15.0734 13.8996 6. 1363  0.0  -0.38654E-O2  -0.75876E+04  -Q.78802E+04  -0.83187E+ 12 -0.1879 1E+11  •  DI/BX.I I S 0.1 1G47E+00 TOTAL MOLES OF WATER I N THE SYSTEM I S COMPONENTS NA+ CLauscoviTE ALPHA-QUARTZ  a*  K+ H20  55,50825007 MOLES  TOTAL MOLALITY  LOG TOTAL MOLALITY  0. 1GOO0OE+01 0. 105000E+01 0.382099E-10 0.9 18612E-04 0.347425E-06 G.500035E-01 0.555084E+02  0.0000 0. 0212 -10.4 178 -4.0369 -6.4591 -1.3G10 1. 7444  TOTAL. GRAMS/KGM H20 0.229898E+02 0.372258E+02 0. 152195E-07 0.551946E-02 0.350194E-06 0. 195524E + 01 0. 1000.00E + 04  TOTAL PPM 0.216440E+06 0.350466E+06 0.143286E-03 0.519635E+02 0.329694E-02 0. 184078E + 05 0.941463E+07  LOG TOTAL PPM 5.3353 5.5446 -3.843 8 1.7157 -2.4819 4.2650 6.9738  LOG PPM -7.237 3,265 4.3 35 0.919 4.545 -3. 160 -3.380 5. 974 -5. 8 10 -5.174 -2,358 -8.349  D3LN M/DXI 0. 14 987E+11 0.14986S+11 •0.68034E+18 0. 1451 1E+11 -0. 22678E+19 -0.39 0 31E+11 0.68034E+18 -0. 15874E+19 0.45 35 6E+ 18 0.68034E+18 -0.68034E+18 -0. .14987E+1 1 -0.19515E+11  TOTAL MASS TRANSFER. IN THE SYSTEM  KI FERAL EHASES  AMOUNT OF REACT ANT DESTROYED MOLES GRAMS  AMOUNT OF PRODUCT PRODUCED MOLES GRAMS  AMOUNT OF REACTANT PRODUCED MOLES GRAMS  g 2  AMOUNT OP PRODUCT DESTROYED MOLES GRAMS  NET AMOUNT I N THE S Y S T E M MOLES GRAMS  ALPHA-QUARTZ  0.1035E-04 0.6220E-03  0.0  0.0  0.1665E-01 0.1001E+01  MUSCOVITE  0.1732E-05 0.5899E-03  0.0  0. 0  0. 1732E-0.5 0.6899E-03  K-FELDSPAR  0.0  NUMEEB OF DELXI INCREMENTS FORWARD = IONIC STRENGTH =  0.105000E+01  0.0  24 ELECTRICAL BALANCE = 0.283738E-15  TOTAL NUMEES OF PHASE BOUNDARIES PRESENTLY BEING CONSIDERED =  2  -0.5196E-05-0.1446E-02  0.3592E-01 0.9999E+01  93  APPENDIX 3  C C  c c c c c  94  PATH WRI TEN  AND E . H . PERKINS., U N I V E R S I T Y OF B R I T I S H C O L U M B I A VANCOUVER, B.C. 1978 BY M.S. BLOOM TO C O M P I L E AND E X E C U T E ON CDC 6600.  BY T, H. . BROWN  MODIFIED  FEBRUARY,  IK E L I C I T R E A L * 8 (A - H,0 - Z) COMMON /P AT D AT/ NDX ( 2 0 0 , 2 ) , COHPH (20 , 2 0 0 ) , A Z E R O ( 2 0 0 ) , G M I N ( 2 0 0 ) , 1 GSO.L<200), G G A S ( I O ) , COUPS ( 2 0 , 20 0 ) , 7.(200), RF. ( 2 0 ) , 2 COMPG(20, 10) , WGHTM ( 2 0 0 ) , H G H T S ( 2 0 0 ) , W G H T G ( 1 0 ) , GNEUT (4) , 3 P, T , ADH, BDH, B D O T AMH20, ALMH20, NAMEM ( 5 , 200) , 4 NAMES ( 2 , 2 0 0 ) , NAMEG ( 5 , 1 0 ) , NAMES ( 5 , 2 0 ) , MOA ( 2 0 ) , 5 I R E A C T ( 2 0 ) , NHT, N S T , NC, NGAS, N E T , MAXI, N D L I N C , I N I O N , .6 NK COMMON /CONC!/ G ( 2 O 0 ) , A L G ( 2 0 0 ) , ACT ( 2 0 0 ) , ALA ( 2 0 0 ) , C (200) , 1 A L C ( 2 0 0 ) , B ( 2 0 , 2 0 0 ) , TOTM (20) , X P P M ( 2 0 0 ) , T N ( 2 0 0 ) , 2 GSP(200), ALGAS(20), AGAS(20), X I , ELECT, XIPRT, DELXIT COMMON / C A R S A Y / Q M ( 2 0 0 ) , QS (200) , B B { 2 0 , 2 0 0 ) , A ( 2 0 , 2 0 ) , DM (200) , 1 CC ( 2 0 0 , 2 0 ) , X ( 2 0 0 , 4 ) , C V ( 2 0 0 ) , U C V ( 2 0 ) , C S V E ( 2 0 0 ) , DC ( 2 0 0 ) 2 W S ( 2 0 , 2 0 ) , W ( 2 G , 2 0 0 ) , X D { 2 0 0 , 4 ) , A S Y S ( 2 0 0 ) , A MADE (200) t 3 A D E S T ( 2 0 0 ) , A 1 0 , X L , D E L X I , I P R O D ( 2 0 ) , N DEL X I , I S A T , NPT 4 NOD, I F I N , I P B I N T DIMENSION GRMTOT(40) , XTPEM (40) IFIN = 0 D E L X I T = 0.0 EOO DO 10 1 = 1, 2 0 0 AH A DE (I) = 0.0D00 A D E S T ( I ) -= O.ODOO A S Y S ( I ) = O.ODOO 10 C O N T I N U E X I P R T = - 6 . CDOO NPI = 0 NDELXI = 0 C A L L EAT A IN (IGTM) C ALL P R E A D ( E , ASYS) D E L X I = 1.0D-10 KINC = NDLINC NOD = 1 NC1 = NC - 1 NPI = 0 DO 20 I = 1, NC 1 0 .OR. NDX (1,2) . EQ. 3) GO TO 20 IF (NDX (1,2) .EQ NPT = NPT + 1 8 = NDX ( I , 1) I P EG D (NPT) •= K A S Y S ( K ) = TOTM (I) / WGHTM (K) 20 C O N T I N U E IF (NST . L T . 1) GO TO 4 0 DC 3 0 I = 1, NST K = I BE ACT (I) A S Y S ( K ) = A S Y S ( K ) / WGHTM (K) 30 C O N T I N U E 40 C A L L D I S T C A L L SATCHK IPHINT = 1 #  IP (NRT . L T . 1 . AND. . N D E L X I . EQ. 0) .N BT = -2 I F ( N E T . I T . 1 .AND. NDELX.I .EQ..0) GO TO 120 I F ( I S A T . N E . 0 .AND. N D E L X I . EQ. 0) GO TO 110 I F ( N D E L X I .NE. 0) GO TO 60 50 C A L L F I N DC C ALL ACTIV . CALL SETCOL C A L L SETM AT 60 I F ( I S A T . NE. 0) C A L L R E A C T N I F ( I F I N . NE-. 0) GO TO 130 70 C A L L HOVE , NDELXI = NDELXI + 1 C A L L SATCHK C A L L FINMV I F (NINC .EQ. N D E L X I ) I P R I N T = 1 I F ( I S A T .NE. 0): IPO INT = 1 . I F (NINC . EQ. N D E L X I ) NINC = NINC * NDLINC I F i ( N D E L X I .GE. MAXI) GO TO 140 I F ( I P E I N T .EQ... 1) C A L L OUTPUT I F ( I P E I N T . EQ. 1) GO TO 90 DG 8 0 I = 1, NST A T E MP = G S O L ( I ) - Q S ( I ) I F (DABS (ATEMP) . G T . 5.QD-4) GO TO 100 80 C O N T I N U E .90 I P E I N T = 0 GO TO 60 100 C A L L S C L S P 3 (GBMTOT, XTPPM) CALL DIST GO TO 60 .110 C O N T I N U E NET = -1 • • ' 120 C A L L OUTPUT • • STOP • 130 C O N T I N U E NRT = 0 140 CALL. OUTPUT . STOP • END ; SUBROUTINE CIST ;. C C  -  THIS  S U B B O U T I N E C A L C U L A T E S T H E • D I S T R I B U T I O N OF S P E C I E S . • . • v . , I M P L I C I T a E B I * 8 ( A - H,0 - Z )  C  C C C C C  •  TOTM (I) C O N T A I N S T O T A L '-MOLALITY OF COMPONENT OE LOG A C T I V I T Y OF COMPONENT S P E C I E S M O A ( I ) I S T H E SWITCH TO I N D I C A T E MOLALITY OH A C T I V I T Y . 0 = TOTAL MOLALITY " 1 .= LOG A C T I V I T Y . (  DIMENSION CS AVE (200)', ASAVE (200) / C S V (20) , CBG (200) , 1 N D X A L L ( 2 0 Q , 2 ) , 81 ( 2 0 , 2 0 0 ) , ND XSGL ( 2 0 0 , 2 ) , GSOL1 (200) COMMON / P A T B I T / NDX (200>2) , COH.PH (20 , 200) , AZERO (200) GHIH (200) , 1 GSOL (200) , G G A S ( 1 0 ) , COMPS ( 2 0 , 200) , Z ( 2 0 0 ) , E E ( 2 0 ) , 2 COMPG(20,10) , WGHTM(200) , WGHTS (200) , WGHTG (1 0) , G NEUT (4 ) , 3 ' • P, T , ADH, BDH, BDCT, ASH20, AIMH20, NAMEM (5, 200) , 4 . •• . NAMES (2,2,00) , NAMEG ( 5 , 10) , NAMES ( 5 , 2 0 ) , MOA (20) , 5 I S E A C T ( 2 0 ) , N MT, N S T , NC, NGAS, NBT, MAXI, NDLINC,. I N I O N , f  .  6 NK COMMON./CONCI/ G (200) , 'ALG ( 2 0 0 ) , ACT (200), ALA (200), C ( 2 0 0 ) , . 1 ALC ( 2 0 0 ) , E ( 2 0 , 2 0 0 ) , TOTM (20) , XP.PH (200) , T N ( 2 0 0 ) , 2 • G.S.P (200) ., ALGAS(20) , A G A S ( 2 0 ) , X I , ELECT, XIPRT, DELXIT COMMON /CAB-BAY/ QH(20.0)', Q S ( 2 0 0 ) , B B ( 2 0 , 2 0 0 ) , A ( 2 0 , 2 0 ) , DN (200) , 1 C C ( 2 0 0 , 2 0 ) , X (200,4) , CV (200) , UC V (20) , CSVE ( 200) , DC(200) 2 S S ( 2 0 , 2 0 ) , W(20,200) , XD(2O0,4) , A S Y S ( 2 0 0 ) , A MADE (200) , 3 A D E S T { 2 0 0 ) , A 1 0 , X L , D E L X I , I PROD (20) , NDELXI, ISAT, NPT, 4 NOD, I F I N , IPRINT DATA 10 2 /»OXYG •/ NC1 = NC - 1 DBD = 10.ODGO ' A 10 - DLOG (LED) WRITE (6,620) NDEIXI NK2 = NK - 2 I F (NDELXI .LT. 1) GO TO 20 . EC 10 I = 1 , NST CBG (I) = A1C (I) .AS AVE (I) = ALA (I) 10 CONTINUE 20 CONTINUE . IF (NDELXI . GT. 1) GO TO 40 CC 3 0 I = 1, NK 2 IP•=. I I F (.INICN .EQ. NDX (1,1) . AND. NDX (1,2) . EQ. .0) GO TO 110 30 CONTINUE ' '-. 40 I F (NGAS .LT. 1) GO TO 8 0 DO 5 0 I" .'= 1 , NGAS I F (102 . NE. NAMEG (1,1) ) GO TO 50 IQ = I GO TO 60 50 CONTINUE. . ' GO TO 80 60 ATEMP = 1OO.0DO0 DO 70 I = 1, NC1 I F (NDX (1,2) . NE. 0) GO TO 7 0 I F (DABS (CCMPG(I,IQ)) .LT. 1.0D-13) GO TO 70 LL = NDX (1,1) I F (C (LL) .GT. ATEMP) GO TO 70 ATEMP = C ( L L ) K = I 70 CONTINUE NDX (K, 1) = IQ NDX (K ,2) = 3 MOA(K) = 1 IRET = -1 CALL TRANS (E,. IRET) C ALL • ACTIV ' 80 ATEMP = O.ODOO DO 100 I = 1, NC 1 I F (NDX (1,2) . NE. 0) GO TO 90 I F (MOA (I) . EQ. 1) GO TO 100 K = NDX ( I , 1) I F (ATEMP .GT. C (K) . 0.8. DABS (2 (K) ) . LE. 1.0D-5 .OR. Z (K) . GT. 1 9.99) GO TO 100 ATEMP = C (K) IF = I ;  90 100 110  120  130  140  150  160 170  180  INICN = K GO TO 100 I F (NDX (1,2) . EQ. 1) MOA ( I ) = 1 CONTINUE I E AL - I P INITIALIZE I F ( N D E L X I .GT. 1) GO TO 24 0 DO 120 I = 1, NC CSV }I) = O.ODOO CONTINUE DO 1 3 0 1 = 1, NST C S A V E (I) = 0. 0D00 G ( I ) = 1.0D00 ALG (I) •= O.ODOO CONTINUE K = NEX (NC, 1) ACT (K) = 1.0D00 A L A ( K ) = 0.0100 C ( K ) = 1.ODG0 / . G 1 8 0 1 5 3 4 D 0 0 ALC(K) = DLOG10(C(K)) G (K) = . 0 1 8 0 1 5 3 4 0 0 0 ALG (K) = DLOG10 (0 (K) ) DO 170 I = 1, NC 1 IF (NDX (1,2) .GT. 0) GO TO 150 K = NDX ( I , 1) I F (MOA(I) .EQ. 1) GO TO 140 C ( K ) = TOTM ( I ) A L C (K) = DIOG10 (C (K) ) ACT (K) = C (K) ALA (K) = AIC (K) GO TO 17 0 A L C ( K ) = TOTM ( I ) C ( K ) = 10.0D00 * * A L C ( K ) ACT (K) = C ( K ) ALA (K) = ALC (K) GO TO 170 I F (NDX (1,2) . EQ. 1) GO TO 160 R = NDX ( I , 1) ALG AS (K) = TOTM (I) A G A S ( K ) = 10.0D00 * * ( A L G AS (K) ) GO TO 170 CONTINUE CONTINUE I F ( N D E L X I .GT. 0) GO TO 24 0 DO 180 J = 1, NC NDX A L L ( J , 1) = NDX ( J , 1) NDXALL(J,2) = NDX(J,2) CONTINUE CALL F L I P NK2 = NK - 2 NX1 = NK - NC - 2 DO 190 J = 1, NK2 NDXSOL ( J , 1) = NDX ( J , 1) NDXSOL(J 2) = NDX(J,2) CONTINUE DO 2 1 0 J = 1 , NX 1 DO 200 I = 1, NC r  190  200 210 220  2 30  8 1 ( I , J ) = B ( I , J) CONTINUE CONTINUE DO 22 0 3 = 1, NST GSCL1 (J) = GSOL (J) CONTINUE DO 230 J = 1, NC NDX(J,1) = NDXALL (0,1) NDX (3,2) - NDXALL [J ,2) CONTINUE  I E ET  =  -1  CALL TBANS(E, IBET) 240 CONTINUE NIC = 0 NX = NK - NC - 2 I F (NDELXI .LT. 1) GO TO 280 DG 260 J = 1, N.X1 DO 25 0 I = 1 , NC E 1 ( I , J ) = B<I,J) 250 CONTINUE 260 CONTINUE DO 27G K = 1, NK NDXSOL(K, 1) = NDX (K, 1) NDXSOI(K,2) = NDX(K,2) GSCL1 (K) = GSOL (K) 270 CONTINUE 280 CONTINUE I F (NDELXI .GT. 0) GO TO 300 DO 2 9 0 I = 1, SC I F (NDX ( I , 2) .EQ. 1) GO TO 400 290 CONTINUE 300 CONTINUE 310 NSCC = 0 3 20 CONTINUE EO 370 1 = 1 , NCI I F (NDXSOL (1,2) . NE. 0) GO TO 370 K = NDXSOL |I,1) I F (MOA(I) .EQ. 1) GO TO 370 ATEMP = 1.0D00 DC 360 J = 1, NX1 I F (DABS (B1 ( I , J) ) . LT. 1.0D-13) GO TO 360 L = NDXSOL (NC + J , 1) BTEMP = ( E 1 ( I , J ) - 1.0D00) * ALA (K) BTEMP = BTEMP + ALG (K) - GSOL1(L) - ALG(L) LO 350 J J = 1, NC I F ( J J . EQ. I ) GO TO 350 I F (DAES (B1 ( J J , J ) ) . LT. 1.0D-13) GO TO 350 I F (NDXSOL (J J , 2) .GT. 0) GO TO 330 MM = NDXSOL ( J J , 1) BTEMP = BTEMP + B 1 ( J J , J ) * ALA(MM) GO TO 350 330 I F (BDXSOL ( J J , 2) .EQ. 3) GO TO 340 GO TO 350 340 BTEMP = ETEMP * B 1 ( J J , J ) * ALG A S{N D X ( J J , 1 ) ) 350 CONTINUE ATEMP = ATEMP + B 1 ( X , J ) * 10.0 ** BTEMP 360 CONTINUE  98  C ( K ) = TOTM(I) / ATEMP IS = I KI = K I F (C(K) . I T . O.ODOO) GO TO 590 370 CONTINUE 380. XT EST = 1.GE-9 KK = 0 NN - 0 • DO 3 90 I = 1, SCI I F (NDX (1,2) . NE. 0) GO TO 390 I F (MCA (I) . EC. 1) GO TO 390 KK = KK + 1 K = NIX (1,1) ATEMP = DAES ( (CSV (I) - C ( K ) ) / C ( K ) ) .' .I F (ATEMP . I E . XTEST) NN = .NN + 1. ALC (K) = DLOG10(C(K)) CSV (I) = C (K) ALA(K) = ALC (K) + ALG(K) ACT (K) .= 10.0D00 ** ALA (K) 3 90' CONTINUE • •KSGC = NSOC + 1 I F (KK .NE. NN .AND. NSOC .LT. 50) GO.TO 320 C C  •  :  CALCULATE ACTIVITIES,MOLA L I T I E S OF DEPENDENT SPECIES " ... •" " 400 DO 440 I = 1 , NX. L = NDX (NC + I , 1) ATEMP = -GECL (I) • DC 430 J = 1, NC I F (NDX (J,2) .GT. 0) GO TO 410 M = NDX ( J , 1'). , . ATEMP = ATEMP + B (3, T) * ' A LA (M) GO TO 430 410 I F (NDX(J,2) .EQ. 3) -GO TO 420 GO 10 430 420 ATEMP = ATEMP + B ( J , I) * ALG AS (NDX ( J , 1) ) . 430 CONTINUE ALA (L) = ATEMP ACT (L) = 10.OD00 ** ALA (L) ALC (L) = A l A (L) - ALG ( I ) C(L) = 10.ODOO ** A L C ( L ) • 440 CONTINUE CALL X I C A L C ( C , Z, ELECT, NST, XI) CALL GAMMA ( X I , ADA, BDH, BDOT, NST,,NC, AZERO, Z, GNEUT, G, C, 1 ACT, NBX, XL, ALG) ATEMP = O.ODOO CO 460 1 = 1, NC 1 I F (NDX (1,2) .NE. 0) GO TO 460 IF (MOA (I) . EQ. 1) GO TO 450 K = NDX ( I , 1) ALA (K) = AIG (K) + ALC(K) ACT (K) = 10.0 ** ALA (K) ATEMP = ATEMP + C(K) GO TO 460 450 I F . (NDX (1,2) .HE. 0) GO TO 460 K.= NDX (1,1) ALC (K) = ALA (K) - ALG (K)  460  470  480  490 500  510  520 530  540  C (K) = 1 O.ODOO ** ALC (K) ATI HP = ATEMP + C(K) CONTINUE DC 470 I = 1, NX K = NDX (NC + 1,1) AL A (K) = ALC (K) + ALG (K) ACT (K) = .10.0D00 ** ALA (K) AT I B P = A TEMP + C ( K ) CONTINUE COMPUTE, ACTIVITY. OF H20 IF (NDELXI . G l . 1) GO TO 480 I F (ATE MP . GT. 30) ATE MP '== 3 0 . K = NDX (NC , 1) ALA (K) = —ATEMP * .0 18O1534D0O / A10 ACT ( K) - 1O.0D00 ** ALA (K) G(K) = ACT (K) * .Q1801534D0O ALG (K) = DLOG10 (G (K) ) CORRECT CHARGE EALANCE TOTM(IBAL) = TOTM (IBAL) - ELECT / Z(INION) I F (TOTM (IE A l ) .LT. 0.0) GO TO 570 XTES3 = 1 .OD-7 KK = 0 DO 5 00 I = 1, NST I F (C(I)' . EQ. O.ODOO) A TEMP . = CSAVE (I) - C (I) I F ( C ( I ) . EQ. O.ODOO) GO TO 490 ATE ME = (CSAVE (I) - C (I) ) / C (I) I F (DABS (ATEMP) .LT. XTEST) KK = KK .+ 1 CSAVE (I) = C ( I ) CONTINUE NTC  =  NIC  +  1  IF (KK .NE. NST . AND. NTC .LT. 50) GO TO 310 I F (KK .NE. NST .AND. NTC .GE.,50) GO TO 580 CALL SOLSP1 (NST, C, GSP, ¥GHTS, XPPM) CALL ACTIV I I (NDELXI .LT. 1) GO TO 510 CALL FINDC CALL ACTIV CALL SETCOL CALL SETMAT I F (NDELXI .GT. 1) GO TO 550 WRITE (6, 680) DC 530 I = 1, NST XLGM = ALC (I) XLGACT = ALA (I) XLGG = ALG (I) I F (XPPM (I) . EQ. O.ODOO) XLPPM = -1000.0DOO I F (XPPM(I) . EQ. 0,0 D00) GO TO 520 XLPIM = DLOG10 (XPPM (I) ) WRITE (6,690) NAMES ( 1 , 1 ) , NAMES (2,1), C ( I ) , XLGM, ACT (I) , 1 XLG ACT, G (I) , XLGG, GSP (I) , XPPM (I) , XLPPM CONTINUE WRITE (6,700) X I , ELECT IE (NGAS . L T , 1) GO.TO 550 WRITE (6,630) DO 540 J = 1, NGAS WRITE (6,640) (NAMEG ( J J ^ J ) , JJ= 1,5) , G G A S ( J ) , A G A S ( J ) , ALG AS (J) CONTINUE  1 0 0  .  .*  ,  550 560 570 580 590  600  610  DC 5 6 0 I = 1, NC MOA ( I ) = 0 CONTINUE SEIUEN WHITE ( 6 , 6 7 0 ) STOP WHITE ( 6 , 6 6 0 ) STOP I F ( N D E L X I • L T . 1) GO TO 6 1 0 DO 6 0 0 I = 1, NST ALA ( I ) = A S A V E ( I ) ALC ( I ) = C E G ( I ) C ( I ) = 1 0 . 0 D 0 0 ** A L C ( I ) CONTINUE MOA ( I S ) = 1 GO TO 8 0 WHITE ( 6 , 6 5 0 ) N A M E S ( 1 , K I ) , NAMES(2,KI) STOP  C 620 630 640 650 660 670 680  690 700  EG EM AT FORMAT  (» D I S T R I B U T I O N OF S P E C I E S C A L L E D AT S T E P •, 1 5 ) (//, 3 0 X , ' G A S E S ' , / , 3 0 X , ' ', / / , 2 X , 'NAME', 2 4 X , 1 'LOG K', 9 X , ' A C T I V I T Y ' , 8 X , 'LOG A C T I V I T Y ' , //) FORMAT ( I X , 5 A 4 , 5 X , F 1 2 . 5 , 5 1 , E 1 2 . 5 , 5 X , F 1 2 . 5 ) FG5MAT (//• I M P O S S I B L E C O N S T R A I N T S FOR D I S T R I B U T I O N OF S P E C I E S ' / , 1 2 A 4 , ' DRIVEN NEGATIVE•) FORMAT (//• F A I L U E E TO CONVERGE ON C O N C E N T R A T I O N I N 25 C Y C L E S , 1 ») FORMAT (/,/' C O N C E N T R A T I O N OF I O N D R I V E N N E G A T I V E W H I L E T R Y I N G TO A 1 C H I EVE E L E C T R I C A L B A L A N C E ' ) FORMAT (//55X, * AQUEOUS S P E C I E S ' , / / 1 X , ' S P E C I E S ' , 8 X , ' M O L A L I T Y ' , 1 5 X , •LOG MCL* , 4 X , ' A C T I V I T Y * , 5 X , 'LOG A C T ' , 3 X , 2 'ACT OGEE' , 5 X , ' L G ACT C , 2 X , ' GB AMS/KGM H 2 0 ' , 6 X , 'PPM', 3 9 X , M O G PPM'/) FORMAT ( 2 X , 2 A 4 , 4 X , E 1 2 . 5 , 2 X , F 8 . 3 , I X , E 1 2 . 5 , 2 X , F 8 , 3, 2 X , 1 E 1 2 . 5, 2 X , F 8 . 3 , 3 X , E 1 2 . 5 , 2 X , F 1 2 . 3 , 3 X , F 9 . 3 ) FORMAT (//, ' I O N I C STRENGTH = ', E 1 3 . 6 , 1 5 X , 1 ' E L E C T R I C A L B A L A N C E = ', E 1 3 . 6 ) END SUBROUTINE F L I P I M P L I C I T RE A L * 8 ( A - H,0 - Z) COMMON / P A I D AT/ N D X ( 2 0 0 , 2 ) , COMPH (20,200) , A Z E R O ( 2 0 0 ) , G M I N ( 2 0 0 ) , 1 GSOL (200) , G G A S ( I O ) , COMPS ( 2 0 , 2 0 0 ) , Z ( 2 0 0 ) , R R ( 2 0 ) , 2 C O M P G ( 2 0 , 10) , WGHTM ( 2 0 0 ) , S G H T S ( 2 0 0 ) , W G H T G ( I O ) , GNEUT (4) , 3 P, T , ADH, B D H , B D C T , AMH20, A L M H 2 0 , NAMEM ( 5 , 2 0 0 ) , 4 NAMES ( 2 , 2 0 0 ) , NAHEG (5 , 1 0) , N A M E B ( 5 , 2 0 ) , MOA ( 2 0 ) , 5 I R E A C T ( 2 0 ) , NMT, N S T , NC, NGAS, N S T , H A X I , N D L I N C , INION, 6 NK COMMON /CONCT/ €(200), ALG ( 2 0 0 ) , ACT ( 2 0 0 ) , ALA ( 2 0 0 ) , C ( 2 0 0 ) , 1 ALC (200) , E ( 2 0 , 2 0 0 ) , TOTM ( 2 0 ) , XPPM ( 2 0 0 ) , TN ( 2 0 0 ) , 2 G S P ( 2 0 0 ) , A L G A S ( 2 0 ) , AG AS ( 2 0 ) , X I , E L E C T , X I P R T , D E L X I T NC2 = NC • 2 NX = NK - NC2 NC1 = NC - 1 I BET = 1 CONTINUE DG 3 0 1 = 1 , MCI I F (NDX ( 1 , 2 ) .NE. 1) GO TO 3 0 ;  10  101  DO  C  C C C C C  20 J = 1, NX I F (DAES. (B ( I , J ) ) . L T , 1.0D-1O) GO TO 20. K •= NDX (NC + J , 1 ) II = K .. . NDX ( 1 , 1 ) = I I NDX (1,2) = G ' CALL T R A N S ( E , IR ET, 520) GC TO 10 20' CONTINUE . GO TO 30 30 C O N T I N U E RETUSN END S U B R O U T I N E S C L S P 1 ( N S T , C , G S P , W I S P , IP.PM) ' T H I S E O U T I N E C A L C U L A T E S THE GRAMS AND P.PBS OF THE SOLUTION S P E C I E S I M P L I C I T R E A L * 8 (A - H,0 - Z) D I M E N S I O N C (200) , GSP ( 2 0 0 ) , W T S P ( 2 0 0 ) , X P P M ( 2 0 0 ) SGSF = 0 , 0 E 0 0 DC 10 I = 1, NST G S P ( I ) = C ( I ) * WTSP ( I ) 10 SGSP = SGSP * GSP ( I j ARTP = 1. OD06 / (SGSP) DO 2 0 I = 1, NST X P I M ( I ) = G S P ( I ) * ARTP 20 C O N T I N U E RETURN . . . END ' - S U B R O U T I N E G AMM A (XI,< ADH, EDH, BDOT, NST, NC, A Z E R O , Z, GNEUT, G , 1 C, A C T , NDX, X L , ALG)  -  C A L C U L A T E S GARMAS OF AQUEOUS S P E C I E S - NEUTRAL S P E C I E S A P P R O X I M A T E D FRCM KNOWN DATA FOR C02 AT VARIOUS I O N I C STRENGTHS ' H S P I I C I I RE AL*8 (A - H,0 - Z) D I M E N S I O N A Z E E O ( 2 0 0 ) , Z ( 2 0 0 ) , G N E U T ( 4 ) , G (200) , C ( , 2 0 0 ) , ACT (2 00) , 1 NDX ( 2 0 0 , 2 ) , ALG (20 0) MM = 1 I F ( X I , GT. 1.) MM =2 I F ( X I .GT. 2.) MM = 3 I E ( X I .GT. 3.) MM = 4 I F ( X I •GT. 3) GO TO 10 XG = GNEUT (MR) • (GN EUT (MM + 1) - GNEUT (MM)) * ( X I - MM + 1) GO TO 2 0 TO XG = GNEUT (MM) (GNEUT (M M) - GNEUT (SM - 1) ) * ( X I - MM + 1) 20 XL =' DLCG10 (XG) S X I = X I ** 5.0D-01 ADT = A CH * S X I BDT = EDH * S X I ,. DO 5 0 I = 1 , NST ' SXI = Z ( I ) I F (DABS ( S X I ) . LT. 1.0D-5) GO TO 30 I F ( S X I . GT. 9.99) GO TO 40 G ( I ) = 1 0 . * * ( - A D T * S . X I * S X I / ( 1 . + BDT* AZERO (T) ) + BDOT*XI) ALG ( I ) = D I C G 1 0 ( G ( I ) ) GO TO 5 0 30 -CONTINUE '  G(I)  40 50  10  C C  10  20 30  = XG ALG ( I ) = DIOG10 |G ( I ) ) GO TO 5 0 CONTINUE G<I) = 1.. ODOO ALG ( I ) = O.ODOO CONTINUE K = NDX INC, 1) C A L C U L A T E GAEMA OF H20 G ( K ) = ACT (K) * . 0 1 8 0 1 5 3 4 D 0 Q ALG (K) = DLOG10 (G (K) ) EETU.EN END S U B R O U T I N E X I C A L C ( C , Z, E L E C T , NST', X I ) C A L C U L A T E S I O N I C STRENGTH AND E L E C T R I C A L B A L A N C E I M P L I C I T RE AL*8 (A - H,0 - Z) DIMENSION C ( 2 Q 0 ) , Z ( 2 G 0 ) X I = O.ODOO E L E C T = 0. DO 10 I = 1, NST B = Z (I) I F ( D A B S ( B ) . L T . 1.0D-5 . O R . B .GT. 9 . 9 9 ) GO TO 10 A = C<I) * B X I = X I + 5.0D-01 * A * E E L E C T = ELECT + A CONTINUE I F ( X I .GT, 30) X I .= 3 0 I F (DABS ( E L E C T ) , GT. 3 0 . ) E L E C T = ( D A B S ( E L E C T ) / E L E C T ) * 3 0 . RETURN END S U B R O U T I N E S O L S P 3 ( G R M T O T , XTPPM) T H I S R O U T I N E C A L C U L A T E S T H E T O T A L M O L A L I T Y , TOTAL GRAMS, AND T O T A L PPM OF THE E ARE I O N S I N S O L U T I O N I M P L I C I T S E A I * 8 ( A - H,0 - Z) COMMON / P A T D A T / N D X ( 2 0 0 , 2 ) , COMPM ( 2 0 , 2 0 0 ) , AZERO ( 2 0 0 ) , GMIN (200) G S O L ( 2 0 0 ) , G G A S ( 1 0 ) , COMPS ( 2 0 , 200) , Z ( 2 0 0 ) , R R ( 2 0 ) , COMFG ( 2 0 , 10) , WGHTM ( 2 0 0 ) , W G H T S ( 2 0 0 ) . W G H T G ( 1 0 ) , GNEUT (4) P. T, ADH, B D H , BDOT,, AMH20, ALMH2G, N A H E M ( 5 , 2 b 6 ) NAMES ( 2 , 2 0 0 ) N A M E G ( 5 , 1 0 ) , NAMES ( 5 , 2 0 ) , MOA ( 2 0 ) IREACT (20) N.MT, N S T , NC, NGAS, N.BT, MAX.I, N D L I N C , I N I O N NK COMMON /CONCT/ G ( 2 0 0 ) , A L G ( 2 0 0 ) , ACT ( 2 0 0 ) , A^L AM( 2^ 0U0 ), ,, C ( 2 0 0 ) , TTNN((220000)) , ALC ( 2 0 0 ) , B ( 2 0 , 2 0 0 ) , TOTM (20) , X P P H ( 2 0 0 ) , G S P ( 2 0 0 ) , ALGAS(2Q), A G A S ( 2 0 ) , X I , ELECT, X I P R T , DELXIT D I M E N S I O N XTPPM ( 4 0 ) , GRMTOT ( 4 0 ) SGSP = O.ODOO DO 10 J = 1, NC X T E E M ( J ) = O.ODOO T O T M ( J ) = O.ODOO CONTINUE DO 3 0 I = 1, N S I DO 2 0 J = 1, SC I F (DABS (COMPS ( J , I ) ) . L T . 1. Off-13) GO TO 2 0 I F (ALC ( I ) . L T . - 5 0 . ) GO TO 2 0 TOIM(J) = TCTM(J) COMPS ( J , I ) * C ( I ) CONTINUE CONTINUE  103  40 50 60  70  DO 6 0 I = 1 , NC I F (NDX (1,2) m EQ. 0) GO TO 40 GRMTOT (I) = TOTM(I) * WGHTM (NDX ( I , 1)) GO TO 50 GSM TOT (I) = TOTM (I) * WGHTS {NDX (1,1)) SGSF = SGSE + GRMTOT (I) CONTINUE ' ABTP = (1O.0D06) / (SGSP) DO 70 I = 1 , NC XT EEM (I) = GRMTOT ( I ) * ARTP CONTINUE ' • RETURN . ' END  SUBROUTINE OUTPUT THIS SUBROUTINE DOES ALL OF THE OUTPUT FOR THE PROGRAM PATH I M P L I C I T BE AL*8 (A - H,0 - 2) COMMON /PAT DAT/ N B X ( 2 0 Q , 2 ) , COMPM (20 , 20 0) , AZERO ( 2 0 0 ) , G M I N ( 2 0 0 ) , 1 GSOL (200) , G G A S ( 1 0 ) , COMPS (20, 200) , Z (200) , R R ( 2 0 ) , 2 COM EG (20 , 1 0) , WGHTM ( 2 0 0 ) , WGHTS ( 2 0 0 ) , WGHTG{10), GNEUT (4 ) , 3 P, T, ADH, BDH, BOOT, AMH20, ALMH20, N AMEM { 5, 200) , ' 4 NAMES ( 2 , 200) , NAMEG ( 5 , 10) , NABEB. (5 , 2 0 ) , MOA(20), 5 I R E A C T ( 2 0 ) , NMT, NST, NC, NGAS, NET, MAXI, NDLINC, INION, 6 NK COMMON /CONCT/ G (200)i, ALG (200) , ACT (200) , ALA ( 2 0 0 ) , C (200) , 1 ALC (200),, B,(20,200), TOTM (20) , XPPM (200) , TN ( 200) , 2 G S P { 2 0 0 ) , A L G A S { 2 0 ) , AGAS (20) , X I , ELECT, X I P R T , DELXIT COMMON /C ARB AY/ QM(200), O S ( 2 0 0 ) , ' B B ( 2 0 , 2 0 0 ) , A (20, 2 0 ) , DN (200) , 1 CC ( 2 0 0 , 2 0 ) , X ( 2 0 0 , 4 ) , C V ( 2 0 0 ) , O C V ( 2 0 ) , C S V E ( 2 0 0 ) , DC (200) 2 WS (20,20) > W(2G,200) , XD (200,4) , ASYS (200) , A MADE (200) , 3 . •'• ADEST ( 2 0 0 ) , A 1 0 , XL, D E L X I ; IPROD (20) , NDELXI, I S AT, NPT, 4 NOD, I F I N , I P B I N T DIMENSION GRMTOT (40) , XTPPM(40) DATA NHYDSO /«H+ ••/ IE (NRT .GT. Oj WRITE (6,430) I F : (NRT .EQ, 0) WRITE • (6,640) • • ' I F (NRT .LT. 0) GO TO 90 WRITE (6,460) DEL XI XLDEL = DLCG 10 (DEIXIT) WRITE (6,470) DELXIT, XLDEL ' I F (NRT . L T . 1) GO' TO 20 WRITE (6,480) WRITE (6,490) REACTANT SUMMARY DO. 10 I = 1, NRT K = IREACT (I) GMNRL = A BEST (K) * WGHTM (K) X.LMNRL = BIGG 10 (DABS (GMNRL) ) XLDELB = CLOG 10 (DABS (ADEST(K))) 10 WRITE (6,500) (NAMEM ( J ,K) , J= 1 , 5) , GMNRL, XLMNRL, . A D E S T ( K ) , XLDEL R 1RB (I) , GMIN (K) , QM(K) 20 I F (NPT) 9 0 , ,90, 30 30 WRITE (6,520) WRITE (6,490) REACTION PRODUCT SUMMARY DC 80 I = 1, NPT ;  40  50  K = IPEOC (I) GMNBL = ASYS(K) * WGHTM (K) I F (GHNBL . I E . 0. ) GO TO 40 XL'HNBl = D1OG10 (GMNRL) X L B I I P = CLOG 10(AS YS(K) ) GO TO 50 CONTINUE GMNRL = O.ODOO XLMNBL = O.ODOO XLDELP = O.ODOO CONTINUE NC 1 = NC - 1 DO 60 L L = 1, NC1 I F (K ., NE. NDX(LL,1) .OB. NDX ( L L , 2) . NE. 1) GO TO 60 NN = L L  C C C  GC TO 70 60 CONTINUE 70 WRITE (6,500) ( NAM EM (J , K) , J= 1, 5) , GMNBL, XLMN.RL, ASYS (K) , 1 XLDELP, X ( N N , 1 ) , GMIN (K) , QM (K) .. 80 CONTINUE .90 CONTINUE W.BITE (6,510) DO 100 NM = 1, NMT MINERAL K AND Q WRITE (6,530) (NAMEM ( J , NM) , J = 1 , 5) , GMIN(NM), QM (NM) 100 CONTINUE 110 CONTINUE I F (NGAS .LT. 1) GO TO 1.30 WRITE (6,360) DO 120 J = 1, NGAS WRITE (6,370) (NA MEG ( J J , J) , J J= 1,5), GGAS (J) , AGAS (J) , ALGA S (J) 120 CONTINUE 130 I F (NET .LT. 0) GO TO 350 CALL S0.LSP1(NST, C, GSP, HGHTS, XPPM) WRITE (6,540)  C  C C  C C C  SPECIES MOLES A C T I V I T I E S GAMMAS ETC DC 150 I = 1, NST I F (XPPM (I) . EQ. O.ODOO) XLPPM = -1000.0DOO I F (XPPM (I) . EQ. 0,0000) GO TO 140 XLPEM = DLCG10 (XPPM ( I ) ) 140 WBITE (6,5.50) (NAMES (J , I) , J= 1,2) , C (I) , A L C ( I ) , A C T ( I ) , ALA (I) 1 G ( I ) , ALG ( I ) , GSP ( I ) , X F E M ( I ) , XLPPM 150 CONTINUE SPECIES K AND Q AND CEFF DO 160 K = 1, NST IF (N AM ES ( 1 , K) . EQ. NHYDRO) GO TO' 170 160 CONTINUE 170 I H = K WRITE (6,56C) NC 1 = NC - 1 CO 180 K •= 1, NC 1  180  190  200 .210 220 230  240 250  I F (NDX(K,2) . NE. 0) GO 1 0 180 ' I = NDX (K , 1) CZ = Z ( I ) I F (CZ . G L 9.9) C Z =. O.ODOO CL 2 = ALA (I) - CZ * ALA (IH) WRITE (6,570) (KAMES ( J , I) , J = 1 , 2) , GSOL (I) , QS (I) , X ( K , 1 ) , 1 X D ( K , 1 ) , X ( K , 2 ) , XD (K,2) , X (K,3) , XD(K,3) CONTINUE NC3 .= NC •+ 3 DO 190 K = NC3, NK J •= K - 2 I = NDX ( J , 1) CZ = Z ( I ) IF (CZ . GT. 9.9) CZ •= O.ODOO CL2 = ALA (I) - CZ * ALA (IH) WRITE (6,570) (NAMES ( J , I ) , J = 1 , 2 ) , GSOL (I) , . QS (I) , X ( K , 1 ) , 1 XD (K, 1) , X (K, 2) , XD (K, 2) , X ( K , 3 ) , XD(K,3) CONTINUE' NC2 = NC + 2 WRITE (6,39 0) K = NDX (NC, 1) WRITE (6,570). (NAMES (J,K) ,3= 1,2), GSOL (K) , QS (K) , X ( N C , 1 ) , 1XE ( N C , 1 ) , X (KC,2) , XD(NC,2) , X (NC,3) , XD (NC, 3) WRITE ( 6 , 380) WHITE (6,570) (NAMES (J,K) ,J=1,2) , G S O L ( K ) , Q S ( K ) , X ( N C 2 , 1 ) , 1XD(NC2,1), X ( N C 2 , 2 ) , XD (NC2 ,2) , X (NC2 ,3) , XD (NC2, 3) WRITE (€,400) X (NC + 1,1) WRITE ( 6 , 4 1 0 ) . AMH20 ; , WRITE (6,580) C a l l SOLSP3 (GRMTOT, XTPPM) DO 250 J = 1, NC IF (XTPPM.(J) • L E . 0.0) GO TO 200 XLTFPM = DICG10 (XTPPM (J) ) . . GO TO 210 XLTEPM = -100C.QD00 I F (TGTH(J) . I E . 0.0) GO TO 220 XLMTOT = CLOG 10 (TOTM ( J ) i . GO TO 230 XLMTOT = -1000.0D00 I F (NDX(J,2) .NE. 0) GO TO 2 4 0 . WRITE (6,5.90) (NAMES ( J J ,NDX ( J , 1 ) ) , J J = 1 , 2 ) , TOTM (J) , XLMTOT, 1 G R H T O T ( J ) , X T F P M ( J ) , XLTEPM GO TO 2 50 WRITE (6,600) (NAMEM (JJ,NDX ( J , 1 ) ) , J J = 1 , 5 ) , TOTM (J) , XLMTOT, 1 GRMTOT ( J ) , XTPPM ( J ) , XLTPPM CONTINUE  C  C C C C C  MASS TRANSFER SUMMARY WRITE  (6,65G)  EEACT ANTS IF (NRT . LT. 1) GO TO 2 70 DO 26 0 I = 1, NRT J = IREACT (I) GMNRL = ADEST (J) * WGHTM (J)  c  C C  XGMNBL = A MADE (J) * WGHTM (J) CI = ASYS (J) * WGHTM (J) 260 WHITE (6,660) ( RA MEM ( J J , J) , J J = 1, 5) , A D E S T ( J ) , GMNBL, A MADE (J) , 1XGMNBL, ASYS (J) , CL 270 I F ( N I T .EQ. 0) GO TO 290 DO 280 I = 1, NET J = I PROD (I) PRODUCTS EE ING. DESTROYED  GMNRL = AMADE(J) * WGHTM (J) GMNRL A = A LEST (J) * WGHTM (J) GMNRLB = . ASYS (J) * WGHTM (J) WRITE (6,670). (NAMEM ( J J , J ) , JJ=1,5) , A MADE (J) , GMNRL, A D E S T ( J ) , 1 GMNB.LA, A S Y S ( J ) , GMNRLB \-. 280 CONTINUE 290 CONTINUE C •• ' :. • C REACTION PRODUCTS C DC 340 1'=. 1, NMT I F (NRT . LT. 1) GO TO 3 10 . DO 300 I I .= 1, N.BT I F ( I . EQ. ISEACT ( I I ) ) GO TO 340 300 CONTINUE 310 I F (NPT , I T . 1) GO TO 330 DO 320 I I = 1 , NPT . I F ( I . EQ. IPBOD ( I I ) ) GO TO 3 4 0 . 3 20 CONTINUE 3 30 CONTINUE IF (CAES (AMADE (I) ) . L T . 1.0D-20 ..AND. DABS (ADEST (I) ) . LT. 1. 1 0D-2O) GO TO 34.0 GMNBL A = AMADE (I) *. WGHTM (I) GMNRL = ADEST (I) * WGHTM (I) GMNRLB = ASYS (I) * WGHTM (I) WRITE (6,670) (NAMEM ( J J ,1) ,JJ= 1 ,5) , AMADE(I) , GMNRL A, ADEST (I) , 1 GMNRL, A S Y S ( I ) , GMNRLB' ' 340 CONTINUE WRITE (6, 61C) NDELXI •. WRITE (6,620) X I , ELECT WRITE (6,630)'NET • I F (N.8T . EQ. 0) STOP EETU.EN " 350 CONTINUE I F (NET .EQ. - 1) WRITE (6,420) STOP C 360 FOBMAT (//„ 30X, ' G A S E S ' , / , 3 0 X , • ', //, 2X, 'NAME', 24X, 1 * LOG K«, 9X, ' A C T I V I T Y ' , 8X, * LOG ACTIVITY *, /) 370 FORMAT ( 1 X , 5A4, 5X, F 1 2 . 5 , 5X, E 1 2 . 5 , 5X, F12.5) 380 FORMAT (/, • * A C T I V I T I E S *») - 3 9 0 FG EM AT (/, «* TOTAL MOLES *») 400 FORMAT (///, ' DI/CXI I S E12.5) 410 FOBMAT (/, •TOTAL MOLES OF WATEB I N THE SYSTEM I S *, F12.3, 1 • MOLES') 420 FOEMAT, (//, 6X, 'THIS RUN HAS BEEN TERMINATED' BECAUSE THE I N I T I A L ' 1 , /, 'SOLUTION I S SUPERSATURATED WITH RESPECT TO ONE OB MOB :  :  J  :  2E P H A S E S , /) 430 FOEMAT { ' i * * * * * * NEW STEP SUMMARY ********, //) 440 FOBHAT (//, 6X, 'THE ABOVE SOLUTION I S NOW AT EQUILIBRIUM WITH ', 1 2A4, /, 6 X , 'LOG K = », E13.6, « LOG Q = E l 3.6, /, 6X, 2. 'IT WILL BE ADDED TO THE MATRIX') 450 FORMAT {//, 6 X , A4, A4, « HAS BEEN USED UP AT THE ABOVE STEP', /, 1 2 4 X , 'IT WILL BE REMOVED FROM THE MATRIX') 460 FORMAT (16X, • DELXI' , 22X, ' = ', E12. 6) 470 FOEMAT (16X , * X I ' , 2 5 X , *= ', E13.6, /, 16X, 'LOG XI«, 21X, *= •, 1, ',. F7.3) 480 FOEMAT (////, 6 4 X , .*REACTANTS', /, 64X, » - — — - - ' — ' , //) 4 90 FORMAT ( 2 5 X , 'CUMULATIVE*, 3X, * LOG CUMUALT', 2 X , ' •CUMULATIVE•, 1 3X, 'LOG CUMULAT', 2X, 'REACTION', 12X,' '.LOG OF', 12X, 2 - 'LOG GF'/, 4 X , 'MINERAL', 14X, 2 {'GRAM CHANGE',2X) , 2{ 3 'MOLE CHANGE',2X) , 'COEFFICIENT', 4X, 'SOLUBILITY PRODUCT *, 4 4X, 'ION PRODUCT', /) 500 FORMAT ( 1 X , 5A4, 2.X, E13.6, 3X, F 7 . 3 , *4 X, E13.6, 3X, F 7 . 3 , 2X, . 1 E13. 6, 5X, E13.6, 6X, E13.6) 510 FORMAT (///, 3 X , 'MINERALS', 16X, 'LOG K', 12X, 'LOG Q,» , /) 520 FOEMAT {//,• €4X , 'PRODUCTS', / 6 4 X , • — — ' , //) 530 FOEMAT ( 1 X , 5A4, I X , F 1 0 . 3 , 4X, F15.7) . 540 FORMAT {//55X, 'AQUEOUS S P E C I E S • , //1X, 'SPECIES', 8X, 'MOLALITY', • 1 5X, 'LOG MOL', 4X, 'ACTIVITY', 5 X , * LOG ACT', 3X, 2 ' ACT COEF', 5X, 'LG ACT C , 2 X , ' GR AMS/KGM H20', 6X, 'PPM', 3 9X, 'LOG PPM'/) 550 FORMAT (2X, 2A4, 4X, E 1 2 . 5 , 2X, F 8 . 3 , 1X, E12.5, 2X, F8. 3, 2X, 1 E 1 2 . 5 , 2X, F 8 . 3 , 3X, E 1 2 . 5 , 2X, F 12.3, 3X, F9.3) 560 FORMAT {//, 1,X, ' S P E C I E S ' , 9X, ' LOG K •, 5X, ' LOG Q', 7X,.«N BAR', 1 7X, ••BIN M/DXI * , 4 X , • D2 M/DXI', 6X, ' D2L N. M/DXI' , 6X, . 2 *D3 M/DXI', 4X, 'D 31N M/DXI') 570 FORMAT ( 2 X , A4 , A4, 3 X , 2 (2X ,F8. 4) , 6 (2X , E12. 5) ) 580 FOiflAT (//, 3X, 'COMPONENTS', 16X, 'TOTAL', 8X, 'LOG TOTAL', 8X, 1 «TOTAI», 10X, * TOTAI', 11X, 'IOG', 11X, 2X, / , 27X, 2 'MOIALITY', 6 X , •MOLALITY 5X, 'GBAMS/KGM H20», 7X, 'PPM', 3 9X, 'TOTAI PPM', 4X, 5X, /) 590 FORMAT (• ', 2 A 4 , 15X, E13.6, 2X, F1.0.4, 5X, 2 (E13.6 ,3X) , F 1 0 . 4 , 1 5X, F 8 . 4 , 6X, E13. 6) 6 00 FGEM AT {' V, 5A4, 3 X , E 1 3 . 6 , 4.X, F10.4, 5X, 2 (E13. 6, 3X) , F10.4, 1 5X, F8. 4, ; 6X, . E13. 6) 610 FORMAT | / / , 6 X , ' NUMBER OF DELXI INC1EM ENTS FORW AS D = ' , 14) 620 FOEMAT <//, 6X, 'IONIC STRENGTH = ' , E 1 3 . 6 , 15X, 1 'ELECTRICAL BALANCE = ', E13.6) 630 FORMAT (//, 6X, 'TOTAL NUMBER OF PHASE BOUNDABIES PRESENTLY BEING 1C0NS JEERED •= ', 1 2 , ///) 640 FORMAT ( 1 H 1 , 30X, 'EQUILIBRIUM HAS BEEN ATTAINED AND SOLUTION CHAR 1 ACTER.ISTICS ARE OUTLINED BELOW • , /, 3 2 X , • ----2 — : //) 650 FORMAT (////, 50X, 'TOTAL MASS TBANSFER IN THE SYSTEM*, /, 50X, ! i _ _ r ////^ 27X, 2, * AMOUNT OF*, 13X, 'AMOUNT GF *, 15X, 'AMOUNT OF', 13X, .'3 •• 'AMOUNT OF», 10X,. 'NET AMOUNT I N ' , /, 5X, ' MINERAL PHASES', 4 4X, 'REACTANT ', 'DESTROYED', 5X, 'REACTANT PRODUCED', 6 X , 5' 'PRODUCT PRODUCED*, 5X, 'PRODUCT DESTROYED', 9X, 6 'THE SYSTEM', /, 24X, 'MOLES', 6X., 'GRAMS',- 6X, 'MOLES', 7 6X ,• ' GRAMS * , 6 X , 'MOLES', 6X, ' GRAMS' , 6X, 'MOLES', 6X, 8 • * GRAMS', 8X, 'MOLES', 5X, 'GRAMS') 660 FORMAT {/, I X , 5A4, 1X, 2E11.4, 1X, 2E11.4, 43X, 2E11.4) 1  r  f  670 F C E M A I (/, 1X, 5 A 4 , 4 3 X , 2 E 1 1 . 4 , 1X, 2 E 1 1 . 4 , I X , 2 E 1 1 - 4 ) 6 80 FORM AT (//, 21, * S T E P S I Z E HAS GONE TOO S M A L L ' ) FN E SUBROUTINE ACTIV I M P L I C I T RE B L * 8 ( A - H,0 - Z) COMMON /P AT I" AT/ NDX ( 2 0 0 , 2 ) , COMPM ( 2 0 , 2 0 0 ) , A Z E R O ( 2 0 0 ) , G H I N ( 2 0 0 ) , 1 GSOL (200) , G G A S ( 1 G ) , COMPS ( 2 0 , 200) , Z ( 2 0 0 ) , R R ( 2 0 ) , 2 COMPG ( 2 0 , 10) , WGHTM ( 2 0 0 ) , W G H T S ( 2 0 0 ) , W G H T G ( 1 0 ) , GNEOT (4) , 3 P, T, ADH, BDH, BDOT, AMH20, A L M H 2 0 , NAMEM ( 5 , 200) , 4 NAMES ( 2 , 2 0 0 ) , N A M E G ( 5 , 1 0 ) , N AM ER ( 5 , 20) , MOA (20) , 5 I R E A C T ( 2 0 ) , NMT, N S T , NC, N G A S , NRT, M A X I , N D L I N C , I N I O N , 6 NK COMMON /CONCT/ G ( 2 0 G ) , ALG ( 2 0 0 ) , ACT ( 2 0 0 ) , ALA ( 2 0 0 ) , C ( 2 0 0 ) , 1 ALC ( 2 0 0 ) , B ( 2 0 , 2 0 0 ) , TOTM ( 2 0 ) , XPPM ( 2 0 0 ) , T N ( 2 0 0 ) , 2 GSP(2O0), A L G A S ( 2 0 ) , AGAS(20), X I , ELECT, XIPRT, DELXIT COMMON / C A R R A Y / QM ( 2 0 0 ) , QS ( 2 0 0 ) , B B ( 2 0 , 2 0 0 ) , A (20 , 2 0 ) , D N ( 2 0 0 ) , 1 CC(200,20) , X (200,4), C V ( 2 0 0 ) , U C V ( 2 0 ) , C S V E ( 2 0 0 ) , D C ( 2 0 0 ) , 2 W S ( 2 G , 2 0 ) , ¥ ( 2 0 , 2 0 0 ) , X D { 2 0 0 , 4 ) , A S Y S ( 2 0 0 ) , AMADE ( 2 0 0 ) , 3 A D E S T ( 2 0 0 ) , A 1 0 , X L , DEL X I , I P R O D ( 2 0 ) , N D E L X I , I S A T , NPT, 4 NOD, I F I N , I P E I N T COMPUTE HEW A C T I V I T I E S OF AQUEOUS S P E C I E S DO 10 1 = 1, NST ALA ( I ) = ALC ( I ) + ALG ( I ) A C T ( I ) = 1 0 . 0 E 0 0 ** ALA ( I ) 10 C O N T I N U E COMPUTE A C T I V I T Y OF S P E C I E S = 0 DO 3 0 I = 1, NST I F ( C ( I ) . NE. O.ODOO) GO TO 30 ATEMP = - G S O L ( I ) DO 20 J = 1, NC I F ( N D X ( J , 2 ) . NE.. 0) GO TO 20 J J = NDX ( J , 1) ATEMP = ATEMP + COMPS ( J , I ) * A L A ( J J ) 20 CONTINUE ALA ( I ) = ATEMP ALC ( I ) = ALA ( I ) - ALG ( I ) C ( I ) = 10.0D00 ** ALC ( I ) ACT ( I ) = 10.0D00 ** ALA ( I ) 30 C O N T I N U E COMPUTE A C T I V I T Y OF G A S E S DO 7 0 I = 1, NGAS ATEMP = -GGAS ( I ) DO 6 0 J = 1, NC J J = NDX ( J , 1) I F (NDX ( 0 , 2 ) . NE. 0) GO TO 40 ATEMP = ATEMP + COMPG ( J , I ) * ALA ( J J ) GO TO 60 40 I F ( N D X ( J , 2 ) ,.HE, 3) GO TO 50 ATEMP = ATEMP + C O E 3 P G ( J , I ) * A L G A S ( J J ) GO TO 60 50 CONTINUE 60 CONTINUE ALGAS ( I ) = ATEMP A G A S ( I ) = 10. ODOO ** A L G A S ( I ) 70 C O N T I N U E CCMPUTE LOG.Q FOR S O L I D S DO 110 1 = 1, NMT  1 U y  '  80 90 1 CO 1 10  120 130 140 150  QM (I) = O.ODOO. DO 10 0 J — 1, NC 3J = NDX (J , 1) I F (NDX(J,2) , NE. 0) GO TO 80 Qfl(I) = CM ( I ) * CGMPM(J,I) * ALA(JJ) GO TO 10 0 IF (NDX(J,2) , NE. 3) GO TO QM(I) = CM{I) + COMPM(J,I) 90 * ALGAS(JJ) GO TO 100 CONTINUE CONTINUE CONTINUE COMPUTE LOG Q OF AQUEOUS SPECIES DO 150 I = 1, NST QS (IJ = -ALA ( I ) DO 140 J = 1, N 33 •= NDX ( J , 1) I F (NDX ( J , 2) . NE. 0) GO TO 120 QS(I) = C S ( I ) + CCMPS*(J,I) * ALA(JJ) GO TO 140 I F (NDX(J,2) .NE. 3) GO TO QS(I) = Q S ( I ) +. CO MPS ( J , I ) 130 GO TO 14 0 * ALGAS(JJ) CONTINUE CONTINUE CONTINUE RETURN END SUBROUTINE FINDC FIND A NEW SET OF COMPONENTS. FIRST BEHOVE GASES FBOM COMPONENTS THEN SEARCH FOR AQUEOUS SPECIES WITH HIGHEST MOLALITIES SOLID PHASES IN EQOLIBBIOH AND WATER ABE LEFT AS COMPONENTS I M P L I C I T REAL*8 (A - H,0 - ' Z) COMMON /PAT DAT/ N B X ( 2 0 0 , 2 ) , COM PM(20, 20 0) ,. AZERO(200), GM.IN(200) 1 GSOL (200) , G G A S ( 1 G ) , COMPS (20, 200) , Z (200) , R R { 2 0 ) , 2 COMPG ( 2 0 , 10) , WGHTM (200) , WGHTS(200), WGHTG(10), G NE0.T (4) 3 P, T, ADH, BDH, BOOT,. AMH20, ALSH20, NAMEM(5,200) , 4 NAMES (2,200) , NAMEG(5,?0), N.AMEB (.5, 20) , MOA ( 2 0 ) , 5 IBE.ACT(20), NMT, NST, NC, NGAS, NRT, MAXI, NDLINC, INION, 6  NK  COMMON 1 2 COMMON 1 2 3 4  /CONCI/ 6(200)., A L G ( 2 0 0 ) , A C T ( 2 0 0 ) , ALA (200) , C (200) , ALC ( 2 0 0 ) , B ( 2 0 , 2 0 0 ) , TOTM ( 2 0 ) , XP.PM (200) , TN (200) , G S P ( 2 0 0 ) , A L G A S ( 2 0 ) , AGAS (20) , X I , ELECT, X I P R T , DELXIT /C ARB AY/ Q M ( 2 0 0 ) , QS (200) , B B ( 2 0 , 2 0 O ) , A~(20,20), DN(200) , C'C (200,20), X (200, 4) , CV (200) , . UCV (20) , CSVE (200) DC (200) W S ( 2 0 , 2 0 ) , W ( 2 0 , 2 0 0 ) , XD (200, 4) , AS YS (200) , AM ADE (200) , ADEST ( 2 0 0 ) , A.10, XL,. D E L X I , IPSOD (20) , NDELXI, I S A T , NPT NOD, I F I N , I P R I N T  REMOVE GASES NC2 •= NC + 2 NX = NK - NC2 NC1 = NC - 1  (  10  20 30  BC 20 I = 1., NC 1 I F (NDX (1,2) . L I . 3) GO TO 20 ATEMP •= O.ODOO DO 10 J - 1, NX I F (DABS <B (1,0) ) .LT. 1.0D-10) GO TO 10 K = NDX <NC + J , 1) I F (C (K) . L E . ,ATEMP) GO TO 10 ' II = K ATEMP = C(K) CONTINUE NDX ( I , 1) = I I • NDX (1,2) = 0 IB ET = -1 CALL IB AN S (E, IBET) CONTINUE CONTINUE NOW  FIND AQUEOUS SPECIES WITH HIGHEST MOLALITY  EG 50 I = 1, NC1 IGNORE SOLID PHASES I F (NDX ( I , 2) .NE. 0) GO TO 50 LL = NDX (1,1) ATEMP = C ( I I ) I I = LL DO 4 0 J = 1, NX I F (DAES (E ( I , J) ) .LT. 1.0D-1G) GO TO 40 K = NDX(NC + J , 1) IF (C(K) .LT. ATEMP) GO TO 40 II = K ATEMP = C (K) 40 CONTINUE I F ( I I .EQ. L L ) GO TO 50 NDX (1,1) = 1 1 IBET = -1 CALL TRANS ( E , IBET) GO TO 30 50 CONTINUE RETURN END SUEROUTINE MATSOL I M P L I C I T RE AI*8 (A - H,0 - Z) COMMON /P AT DAT/ N D X ( 2 0 0 , 2 ) , COMPM (20, 200) ; AZEBQ (20.0) , G M I N ( 2 0 0 ) , 1 GSOL (200) , G G A S ( 1 0 ) , COMPS (20,200) , Z (200) , RR(20),. 2 COMPG (.20.^ 10) , WGHTM(200), WGHTS(200), WGHTG(IO), GNEUT (4 ) , .3 P, T, ADH, BDH, BDCT, AMH20, A.LMH20, NAMEM (5, 200) , 4 NAMES ( 2 , 200) , N A H E G ( 5 , 1 0 ) , NA JtEB (5 , 20) , MQA(20), 5 IRE ACT (20) , NMT, NST, NC, NGAS, NBT, MAXI, NDLINC, INION, 6 NK , COMMON /CONCT/ G ( 2 0 0 ) , ALG ( 2 0 0 ) , ACT (200) , ALA ( 2 0 0 ) , C (200) , 1 ALC ( 2 0 0 ) , B (20, 200) , TOTM (20) , XPPM (200) , TN(200) , 2 G S P ( 2 0 0 ) , A L G A S { 2 0 ) , AG AS (20) , X I , ELECT, XIP.RT, DELXIT COMMON /C ARRAY/ QM{200), QS ( 2 0 0 ) , BB (20 , 200) , & ( 2 0 , 2 0 ) , DN (200) , 1 CC ( 2 0 0 , 2 0 ) , X ( 2 0 0 , 4 ) , CV (200) , U C V ( 2 0 ) , C S V E ( 2 0 0 ) , DC (200) 2 W S ( 2 0 , 2 0 ) , W (20,200) ,. XD (200,4) , A S Y S ( 2 0 0 ) , AMADE ( 2 0 0 ) ,  C C C C C. C C C C  3 4  ADEST ( 2 0 0 ) , A 1 0 , X L , D E L X I , IPBOD (20) , NDELXI, ISAT, NPT, NOD, I F I N , I P S I N T DIMENSIONS SHOULD BE A (N, N),E (K,M) ,CC (H,N) ,X (N+M) ,CV (N + M) SS (N,N),,W(N,M) WHERE N SHOULD EE ..LARGER THAN NC+2 AND B SHOULD. BE LARGER THAN NK-NC-2 NC ~ NO. OF COMPONENTS NK = NO. OF UNKNOWNS (TOTAL) X I S THE NEAR ARRAY TO BE DETERMINED AND RETURNED  •  MULTIPLY B TIMES CC AND SUBTRACT FROM A NC.2 = NC + 2 NX = NK - NC2 DO 3 0 I - 1 , NC 2 DC 20 J = 1 , NC 2 ATEMP = O.ODOO ' ' CO 10 K = 1, NX ATEMP = ATEMP + BB(.I,K) * CC (K, J) 10 CONTINUE , WS ( I , J) = A ( I , J) - ATEMP 20 CONTINUE 30 CONTINUE C . GET INVERSE OF WS C CALL INVERSE ROUTINE ' CALL INVRT (WS, NC2) CO 60 I = 1 , NC2 CO 50 J = 1, NX ATEMP. = O.ODOO CC 40 K = 1, NC2 ATEMP = ATEMP + WS(I,K) * EE (K, J) 40 CONTINUE W ( I , J ) = —ATEMP 50 CONTINUE . 60 CONTINUE NDS = 1. CALL CVSOLV (NDS) RETURN EN C SUBROUTINE MININ I M P L I C I T ,BEAL*8 (A. - H , 0 > Z) . COMMON /.PATDAT/ NDX ( 2 0 0 , 2) , CCMPM (20 , 200) , A ZERO (200) , G MIN (200) , 1 G S O L ( 2 0 0 ) , G G A S ( 1 0 ) , COMPS (20, 200) , Z (200) , RR (20) , 2 COMFG ( 2 0 , 10) , WGHTM ( 2 0 0 ) , ^ G H T S ( 2 0 0 ) , »GHTG(10), GNEUT (4) , 3 P, T, ADH, BDH, BDCT, AM.H20, ALMH20, NAMEM ( 5 , 200) , 4 NAMES (2,200) , NAMEG (5', 10) , NAMES ( 5 , 20) , MOA(20) ,, ••• 5' IRE ACT (20) , NMT, NST, NC, NGAS, NBT, MAXI, NDLINC, I N I ON, 6 NK COMMON /CONCT/ G.(200), ALG ( 2 0 0 ) , A C T ( 2 0 0 ) , ALA (200) , C (200) , 1 A L C ( 2 O 0 ) , B ( 2 0 , 2 0 0 ) , TOTM(20), XPPH (200) , T N ( 2 0 0 ) , 2 GSP (200) , ALG AS,'(20) , AG AS (20) ,, X I , ELECT, X I P R T , DELXIT COMMON /CARE AY/ Q M ( 2 0 0 ) , Q S { 2 0 0 ) , B B ( 2 0 , 2 0 0 ) , A(20 , 2 0 ) , DN (200) , 1 CC (200,20) , X (200, 4) , C V ( 2 0 0 ) , UCV (20) , CSVE (200) , DC (200) , 2 BS ( 2 0 , 2 0 ) , ¥(20,200), X D ( 2 0 0 , 4 ) , A S Y S ( 2 0 0 ) , AMADE (200) , 3 ADEST (200) , A 10, X L , D E L X I , I PROD (20) , NDELXI, ISAT,. NPT, 4 . NOD, I F I N , .IP-BINT' ' . ' C • FINDS A DELXI CORRESPONDING TO A PHASE BOUNDARY ' NSOC - 100  ' .'  ' ' -  '.  '  '  NC2 = NC + 2 NX = NK - NC2 NC 1 = NC - 1 LOOPS = 0 D E L X I = D E L X I * 0..5D00 DIV = D E L X I 10 C O N T I N U E DIV = D I V *. 0.5DOO C A L L STEP C A L L X I C A L C ( C , Z, E L E C T , NST, X I ) C A L L GAMMA ( X I , ADH, 'BDH, BOOT, N S T , NC, AZERO, 'Z, GNEUT, G, C, 1 . A C T , NDX, X I , A L G ) CALL ACTIV D I F F = G M I N ( I S A T ) - QM ( I S AT) ES = DA ES ( U ' 0 D - 9 * G M I N ( I S A T ) ) I F ( D A E S ( D I F F ) •.LT. ES) RETURN I F ( D I F F . L T . O.ODOO) GO TO 20 D E L X I = D E L X I + DIV GO TO 3 0 20 C O N T I N U E D E L X I = D E L X I - DIV 30 C O N T I N U E LOOPS = LOOPS + 1 . I F (LOOPS . L T . NSOC) GO TO 10 WRITE ( 6 , 4 0 ) NSOC STOP 40  FOBMAT (///, 'PHASE BOUNDARY NOT FOUND I N », .13, ». H A L V I N G S . * ) INE ••• • , S U B R O U T I N E MOVE ". I M P L I C I T S E A L * 8 ( A - H,0 - 2 ) COMMON /PAT DAT/ N D X ( 2 0 0 , 2 ) , COMPM ( 2 0 , 2 0 0) , A Z E R O ( 2 0 Q ) , G M I N ( 2 0 0 ) , 1 GSOL (200) , GGAS (10) , COMPS ( 2 0 , 2 0 0 ) , Z (.200) , RB (20) , 2 COMPG ( 2 0 , 1 0 ) , WGHTM ( 2 0 0 ) , W G H T S ( 2 0 0 ) , SGHTG (10) , GNEUT (4) , '3 P, T, ADH, BDH, BDOT, AMH20, A L M H 2 0 , NAMEM(5,200) , ; 4 NAMES ( 2 , 2 0 0 ) , N A MEG ( 5 , 1 0 ) , N AMER (5 , 20) , MO A (2 0) , 5 . I R E ACT (20) , NMT, NST,.NC, NGAS, NRT, M A X I , N D L I N C , I N I ON-, 6 NK COMMON /CONCT/ G ( 2 0 0 ) , A L G (200) , ACT ( 2 0 0 ) , ALA ( 2 0 0 ) , C (200) , 1 ALC ( 2 0 0 ) , B ( 2 0 , 2 0 0 ) , TOTM ( 2 0 ) , XPPM (200) , T N ( 2 0 0 ) , 2 GSP ( 2 0 0 ) , ALGAS (20) , A G A S ( 2 0 ) , X I , E L E C T , X I P R T , D E L X I T COMMON / C A R S A Y / Q M ( 2 0 0 ) , QS (200) , BB ( 2 0 , 200) , A ( 2 0 , 2 0 ) , D N ( 2 0 0 ) , 1 CC ( 2 0 0 , 2 0 ) 'X (2 0 0 , 4 ) , C V ( 2 0 0 ) , U C V ( 2 0 ) , C S V E ( 2 0 0 ) , DC (20 0) 2 WS (2 0,20) , W ( 2 0 , 2 0 0 ) , X D ( 2 0 0 , 4 ) , A S Y S ( 2 0 0 ) , AMADE (200) , 3 ADEST (20 0) , A 1 0 , X L , ' D E L X I , I P B O D ( 2 0 ) , N D E L X I , I S A T , NPT, NOD, I F I N , I P R I N T 4 NC2 = NC +2 NC 1 = NC - 1 NX = NK NC2 DO 10 1 .= 1, NST 10 C S V E ( I ) = C ( I ) C S V E (NST + 1 ) = ACT (NDX (NC, 1) ) C S V E ( N S T + 2) = AMH20  C  c c  UPDATE M A T R I X CALL  UPDMAT  113  SOLVE  MATRIX  C A L L KATSOL NOD = 3 C A L L SECOND CALL THIRD CALL DEBIV C A L L JUMP RETURN  '  IND .  S U B R O D T I N E RE ACTN 1BEN SATURATED WITH A S O L I D AED I T TO T E E COMPONENTS '  PHASES  I M P L I C I T EE A L * 8 ( A - H O - Z) COMMON / P A T D A T / .NDX ( 2 0 0 , 2) , CGMPM (20 , 2 0 0 ) , A Z E R Q ( 2 0 0 ) , G M I N ( 2 0 0 ) GSOL ( 2 0 0 ) , GGAS (10) , COMPS ( 2 0 , 200) , Z (200) , R R ( 2 0 ) , C G M E G ( 2 0 , 10) , WGHTM ( 2 0 0 ) , WGHTS ( 2 0 0 ) , WGHTG,(10), GNEUT (4) P, I , ADH , BD H, BDQT, AMH20, A L M H 2 0 , NAMEM ( 5 , 2 0 0 ) , NAMES ( 2 , 2 0 0 ) , N A M E G ( 5 , 1 0 ) , N A M E R ( 5 , 2 0 ) , MOA(2.0), IR EACT ( 2 0 ) NMT, N S T , NC, NGAS, N E T , M A X I , N D L I N C , I N I O N , f  NK  ALG ( 2 0 0 ) , ACT ( 2 0 0 ) , ALA ( 2 0 0 ) , C (200) COMMON /CONCT/ G ( 2 0 0 ) A L C ( 2 0 0 ) , B ( 2 0 , 2 0 0 ) , T O T M ( 2 0 ) , XPPM (200) , T N ( 2 0 0 ) , G S P ( 2 0 0 ) , ALG AS ( 2 0 ) , AGAS (20) , X I , E L E C T , X I P R T , D E L X I T COMMON / C A R R A Y / Q M ( 2 0 0 ) , QS ( 2 0 0 ) , BB ( 2 0 , 2 0 0 ) , A (2.0 ,20) , DN (200) , CC ( 2 0 0 , 2 0 ) , X ( 2 0 0 , 4 ) , C V ( 2 0 0 ) , UCV (20) , C S V E ( 2 0 0 ) , DC ( 2 0 0 ) W S ( 2 0 , 2 0 ) , W ( 2 0 , 2 0 0 ) , X D ( 2 0 0 , 4 ) , A S Y S ( 2 0 0 ) , AMADE (200) , ADEST (200) , A 1 0 , X L , D E L X I , I PROD (20) , N D E L X I , I S AT, MPT, NOD, I F I N , X P H I N T . NC1 = NC - 1 NC2 = NC + 2 NX = NK - NC 2 I PROD (NET + 1) = I S A T o NET = NPT + 1 . K = I E R O D (NET) CO 10 I = 1, NC1 I F (NDX (.1,2) .NE. ,0)GO TO 10 I F (DABS (CGMPM ( I ,K) ) . L I . 1.0D-9) 1 . 0 D - 9 ) ' G O T O 10 NDX ( 1 , 1 ) = K NDX ( 1 , 2 ) = 1 GO TO 2 0 10 C O N T I N U E IRET • = -1 20 C A L L T R A N S ( E , I R E T ) CALL FINDC CALL ACTIV CALL SETCOL ISAT = 0 I F ( I F I N . N E . 0) RETURN C A L L SETMAT I E E I NT = 1 RETURN • END S U B R O U T I N E SATCHK  C S U B R O U T I N E TO CEECK FOR S U P E R S A T U B A T I O N OF S O L I D P H A S E S C . I M P L I C I T R E A L * 8 ( A ~ H,0 - Z) COMMON /PAT DAT/ NDX ( 2 0 0 , 2)', COS PM (20 , 20 0) , A Z E E O ( 2 0 0 ) , G H I N ( 2 0 0 ) , 1 GSOL ( 2 0 0 ) , GG AS (10 ) , COMPS (20 , 20 0) , Z (200) , . B E (20) , 2. CGMFG ( 2 0 , 1 0 ) , WGHTM ( 2 0 0 ) , W G H T S ( 2 0 0 ) , WGHTG (10) , GNEUT (4) , . 3 P, T , ADH, BDH, BDOT, AMH20, ALMH20, N A M E M ( 5 , 2 0 0 ) , 4 NAMES (2,20.0) , N A M E G ( 5 , 1 0 ) , N A M E E ( 5 , 2 0 ) , MOA(20), ;. 5 I E FACT {20) , NMT, N S T , NC, NGAS, NRT, M A X I , ND L I N C , ' I N I ON, . '• 6 NK COMMON /CONCT/ G ( 2 0 0 ) , ALG ( 2 0 0 ) , ACT ( 2 0 0 ) , ALA ( 2 0 0 ) , C (200) , 1 A L C ( 2 0 0 ) , B ' ( 2 0 , 2 0 0 ) , TOTM (20) , XPPM (200) , TN (200) , 2 GSP ( 2 0 0 ) , A L G A S ( 2 0 ) , A G A S ( 2 0 ) , X I , E L E C T , X I P R T , D E L X I T COMMON / C A E S AY/ Q M ( 2 0 0 ) , QS (200') , B B ( 2 0 , 2 0 0 ) , A . ( 2 0 , 2 0 ) , DN (200) , 1 C C ( 2 0 0 , 2 0 ) , X ( 2 0 0 , 4 ) , C y ( 2 0 0 ) , U C V ( 2 0 ) , C S V E ( 2 0 0 ) , DC ( 2 0 0 ) , 2 W S ( 2 0 , 2 0 ) , W ( 2 0 , 2 0 0 ) , XD ( 2 0 0 , U) , ASYS ( 2 0 0 ) , AMADE (200) , 3 A D E S T ( 2 0 0 ) , A 1 0 , X L , DEL X I , I P E O D ( 2 0 ) , N D E L X I , I S AT, NPT, 4 NOD, I F I N , I P E I N T 10 I S A T = 0 ILL = 0 DO 8 0 I .= 1, NMT I F (NPT) 4 0 , 40,, 2 0 20 DO 30 J = 1, NPT . • . I F ( I P B O D ( J ) - I ) 3 0 , 8 0 , 30 30 CONTINUE 40 D I F F = GM I N ( I ) - Q M ( I ) ES = CABS ( 1 . 0 D - 9 * G M I N . ( I ) ) I F (C ABS ( E I F F ) - ES) 7 0 , 7 0 , 50 50 I F ( D I F F ) 6 0 , 7 0 , 80 60 'ISAT = 1 N = NDELXI : . WRITE ( 6 , 9 0 ) NAMEM ( 1 , 1 ) , NAMEM (2 , 1 ) , NAMEM (3 , 1 ) , NAMEM ( 4 , 1 ) , 1 NA MEM (5 , 1 ) , N , GMIN ( I ) , Q f l ( I ) I F (N . .'.EQ.' . 0 ) GO TO 7 0 CALL HININ " GO TO 10 70 ISAT = I • I L L = I L L +. 1 •' 80 C O N T I N U E " ' BETURN . 90 FORMAT (//, 6 X , .»T HE LOG K FOE 5A4 , * HAS B E E N E X C E E D E D ' , 1 * AT S T E P V, 1 4 , / , 6 X , LOG K = •, F 1 4 . 7 , 2 X , 2 » LOG Q '= » , F 1 4. 7, /) END SUBROUTINE SETCCL C C UPDATE KNOWN COLUMN VECTOR C I K P L I C I T B E A L * 8 (A - H,.0 - Z) COMMON /PATDAT/. NDX ( 2 0 0 , 2 ) , COMPM ( 2 0 , 2 0 0 ) , . AZERO ( 2 0 0 ) , G H I N ( 2 0 0 ) ' 1 0 3 0 1 ( 2 0 0 ) , GGAS ( 10) , COMPS ( 2 0 , 2 0 0 ) , Z ( 2 0 0 ) , R E ( 2 0 ) , 2 COM EG ( 2 0 , 1 0 ) , WGHTM (20.0) , WGHTS (2 00) , WGHTG (10) , GNEUT (4 ) 3 P, T, ADH, B D H , BDOT, AMH20, A L M H 2 0 , NAMEM ( 5 , 200) , 4 NAMES ( 2 , 200) , NAMEG ( 5, 10) , NAMEB (5 ,20) , MOA (20) , 5 I E E A C T ( 2 0 ) , NMT, N S T , NC, NGAS, N E T , . M A X I , N D L I N C , INTON, 6 NK 1  •.  •  .  (  <  COMMON /CONCI/ G ( 2 0 0 ) , ALG ( 2 0 0 ) , ACT ( 2 0 0 ) , ALA ( 2 0 0 ) , C ( 2 0 0 ) , 1 ALC (200) , B (20,200) , TOTM ( 2 0 ) , X P P M ( 2 0 0 ) , T N ( 2 0 0 ) , 2 GSP(200) , ALGAS (20) , AGAS (20) , X I , ELECT, XIPRT, DELXIT COMMON /CAB.B AY/ QM (200) , QS (200) , B B ( 2 0 , 2 0 0 ) , A ( 2 0 , 2 0 ) , D N ( 2 0 0 ) , 1 CC (200,20)., X ( 2 0 0 , 4 ) , CV ( 2 0 0 ) , UCV(2Q), C S V E ( 2 0 0 ) , DC(200) 2 WS{20,20), W(2C,200), X D (2 00 , 4) , AS ¥S (200) , A MADE (200) , 3 ADEST ( 2 0 0 ) , A10, X L , D E L X I , I P R O D ( 2 0 ) , NDELXI, ISAT, NPT, 4 NOD, I F I N , IPR INT IF (ISAT .EQ. 0) GO TO 30 NNN = NRT ," DO 2 0 I = 1, NNN I F (I RE ACT (I) . NE. ISAT) GO TO 20 NET •= NRT - 1 I F (NRT . EQ. 0) GO TO 60 DO 10 J = I , NET IRE ACT ( J ) = I BE ACT {J + 1) RR (J) = RB ( J + 1) 10 CONTINUE GO TO 30 20 CONTINUE .-, ; 30 DO 50 I = 1, NC IJCV (I) = 0.0 DO 4 0 J = 1, NRT . K = I BE ACT (J) IF (DABS(COMPM(I,K)) .LT. 1.0D-12) GO TO 40 UCV(I) = UCV(I) + COMPM(I,K) * RR (J) 40 CONTINUE 50 CONTINUE GO TO 7 0 60 ' I F I N = 1 ... 70. RETURN END SUBROUTINE S ET M AT SUBROUTINE TO SET UP THE NON—CHANGING PARTS OF A AND B ' ARB AYS ..AFTER CHANGE OF COMPONENT BASE. I M P L I C I T BEAL*8 (A - H,0 - Z) COMMON /PAT CAT/ N D X ( 2 0 0 , 2 ) , COMPM(20,20 0 ) , AZERO(200) , G M I N ( 2 0 0 ) , 1 GSOL (200) , 'GGAS (-10) , COMPS (20, 20 0) , Z (200) , RB (20) , 2. COMPG (20 ,10) , WGHTM (200) , WGHTS (200) , WGHTG(10), GNEUT (4 ) , 3 ' P, T, ADH, BDH, BDOT, AMH20, ALMH20, N AMEM (5, 200) , 4 NAMES ( 2 , 200) , NAMEG(5,10), NAMES ( 5 , 2 0 ) , MOA (20) , 5 IREACT (20) , NMT, NST, NC, NGAS, NRT, MAXI, NDLINC, INION, 6 NK COMMON /CONCT/ G (200) , ALG ( 2 0 0 ) , ACT ( 2 0 0 ) , ALA ( 2 0 0 ) , C (200) , 1 A L C ( 2 O 0 ) , B ( 2 0 , 2 0 0 ) , TOTM (20) , X.PPM (200) , TN(200) , 2 G S P ( 2 0 0 ) , ALGAS ( 2 0 ) , AGAS (20) , X I , ELECT, XIPRT, DELXIT COMMON /CARRAY/ QM(200), Q S ( 2 0 0 ) , B B ( 2 0 , 2 O 0 ) , A ( 2 0 , 2 0 ) , DN (2 00) , 1 C C ( 2 0 0 , 2 0 ) , X (200,4) ,. CV (200) , UCV (20) , CSVE (200)., DC(200) 2 W S ( 2 0 , 2 0 ) , W ( 2 0 , 2 0 0 ) , X D ( 2 0 0 , 4 ) , ASYS (200) , A MADE (200) , '3 ADEST(200) , A l p , X L , D E L X I , IPROD (20) , NDELXI, ISAT, NPT, 4. NOD, I F I N , I P R I N T NC2 = NC * 2 NX = NK - NC2 NCI '•= NC - .1 SET UP CC MATRIX-. DO 2 0 1 = 1, NX  DO  10 J = 1, NC 1 CC ( I , J). = O.ODOO I F (NDX(J,2) ..NE. 0) GO TO 10 CC ( I , J ) = -B ( J , I ) 10 CONTINUE CC (I,NC) = 0. 0 CC(I,NC2) = -B(NC,I) 20 CONTINUE SET UP A MATBIX DO 3 0 I = 1, NC2 DO 30 J = 1, NC2 A (J ,1) = 0. 0 30 CONTINUE A (NC + 1,NC + 1) = 1.0 A(NC2,NC2) = 1.0 RETURN END SUBROUTINE UPDM AT I M P L I C I T HEI1*8(A - H,0 - Z) COMMON /P AT C ST/ NDX(200, 2 ) , COMPM (20 , 20 0) , A Z E R O ( 2 0 0 ) , GMI.N (200) , 1 GSOL (200) , G G A S ( I O ) , COMPS (20, 200) , Z (200) , R.R(.2Q), 2 COM PG (20,10) , WGHTM (200) , WGHTS(200), WGHTG ( 1 0 ) , GNEUT ( 4 ) , 3 P, T, ADH, BDH, BDOT, AMH20, A.LMH20, NAMEM (5,200) , 4 NAMES (2,20 0) , NAMEG(5,10), NAMEB(5,20), MOA(20), 5 I 1 E A C I ( 2 0 ) , NMT, NST, NC, NGAS, NRT, MAXI, NDLINC, INIO.N, 6 NK COMMCN /CONCT/ G(200) , A L G ( 2 0 0 ) , A C T ( 2 0 0 ) , A L A ( 2 0 0 ) , C ( 2 0 0 ) , 1 ALC ( 2 0 0 ) , 8 ( 2 0 , 2 0 0 ) , TOTM ( 2 0 ) , XPPM (200) , TN (200) , 2 GSP ( 2 0 0 ) , A L G A S ( 2 0 ) , A G A S ( 2 0 ) , X I , ELECT, X I P R T , DELXIT CCMMCN /CARSAY/ Q M ( 2 0 0 ) , Q S ( 2 0 0 ) , BB ( 2 0 , 2 0 0 ) , A ( 2 0 , 2 0 ) , DN (200) , 1 C C ( 2 0 0 , 2 0 ) , X { 2 0 0 , 4 ) , C V ( 2 0 0 ) , U C V ( 2 0 ) , C S V E ( 2 0 0 ) , DC(200) 2 WS ( 2 0 , 2 0 ) , W(20,2O0), X.D(200,4), A S Y S ( 2 0 0 ) , AMADE ( 2 0 0 ) , 3 ADEST ( 2 0 0 ) , A 10, X L , DEL X I , I P R O D ( 2 0 ) , N D E L X I , I S AT, NPT, 4 NOD, I F I N , I P B I N T SDEBOUTINE TO PUT I N CHANGES TO MATRIX DUE IN MOLALITIES,NH20,ETC. . NC2 = NC + 2 NCI = NC - 1 NX = NK - NC2 PUT IN CHANGES TO A MATRIX DO 2 0 I = 1, NC1 K = NDX (1,1) I F (NDX (.1,2) . NE. 0) GO TO 10 A (1,1) = C1K) GO TO 20 10 A (1,1) = 1.0 / (.0 1801534D00*AMH2O) 20 CONTINUE DC 6 0 I = 1, NCI K = NDX ( I , 1) I F (NDX (1,2) . NE. 0) GO TO 50 I F (Z (K) .GT. 9.99) GO TO 30 A(NC + 1,1) = -0.5D00 * ( Z ( K ) * * 2 ) * C (K) GO TO 4 0 30 A(NC + 1,1) = 0.0 40 A(NC2,I) = C(K) * . 0180 1534D00  TO CHANGES  00  S3  ra >  CN  d  to  H  un  O CN  —.o tn » *  33  w  0 * 1 H O  u  S3  H  CP O  o o  • (a ss  o  S3  H o NJO  —  (N SB 3 >w  O M £-(  O  + £3  CQ  O  tr>  o vO  II  w  MH H  EH 0> »-3 CTi # • CTi  "i  ca  W  tri r - «!  o r —  II  o  Q  o  S3  EH PC  ia ^ a. P  O  EH tn  S3  o  CO  o •  11 ,—.  S3 S3 U W S3 S CO tr< tH t~! * W S3 M  PH H  et H  Da  x P-4 ss S3 fe  CO  #  U  o  E  o o p u  ti> «C KC S3  to  . o  (N w » H •> • *— o H <G II  jl  > — —^ w II II 4. «. ia  O  Q  •  u  ~  X P Sn  rn  w  o  Ij  M pa p !l S3  H  EH E  O  —»  »  ^—'  to il ra «s a  M  •  — tsi  \  H  o  •tt H H  X \  CO  •  EH  E  o CN S3  ss H  O  HH —  s  u  pa  H"4  E  ia  «a  ro in  <n «s  o  pa O ta P5  CO  S3  o  33 »  +  o  ^  »-  + J II II O ia u u oi o S3  II  fcH M  "  uH O U Q «B tJ3 a  O O  W  H  E  S3 w H EH fcH  « ; ss  o u  O «-  S3  p  US » B T~ U  o  U  P o •  .—.  X  o .4-  H  II  CJ S3  S3 «  .  H  II  II S3 + ~— r X U R S3 O  1!  T  4u  —' * •  X  X  S3  U  N  .—s i£  CJ EH  u  O O C3 O P  *  -^m  o <T\ • o M o u p H fe • ! S3 o O fe fe •mmr cn H X H » II S3 feO — " ra to 03 4EH ia fe II II u u II to  %  H  i-3  CQ CQ  .  U CN U  ^ . ^ . ^  EH  E  M  t  o  •  EH  S3  »CN ~ H> •— * ». *~ T T +  EH  H  I «~  T~ O  H x M 05 S3  S3  ra  #  1  -—-  u o  X  E  u  ro  4-  • u ia S3  H  «S  *-  O  EH  fcH en  p  O  4-  »—»  Csl  u  o  I  EH  fed  O  *—  T —  o  U  =r  u  o  EH  o in  cq  H  o p  *  O  S3  #  u  EH  ta  33  E  o VO  ot a  U S3 l-H *• a, ca ^H S> 3 •• > £3  tu 03 O ia 1 a U fcH O • * P «* * * o — , II II II  *  *  t-l X  h*i  to W •a o  o « CO f* — 33  p  I  — *~' O M P  r» w »— u fa PM u u P H H ca a  «C S3 W a fcH o u «c o cn  o  M  O  o M (H  i n ia  s T—  r-  O  i n tSJ • «c  LTi « O a H I o P IH M U >- 4- P O  o EH  o o p ^  pa  o  u  IH  ca  o  P  -~  Q  EH  X  r»  X  o  Ss  o  H  O  .  «-  4-  S3  ,  S3  .  ,  11 '—' p? H  CQ  «8 i-H ia ». p •> p W 4. u S3 53 C3 u w o r» -—• •"3 S3 H H 53 p S3 pa ia pa H S3 St — || —• S3 vO ««•» H tsj u M S3 feC3 S3 O S3 S3 H o cu ia H4 fc-i — S3 „ C3 H <- PH U fcH CN fcH CN — H *—' ro CTi M H W S3 CD O II — II M M ^ t-> S 3 U < « i - t> EH > EH P <t— U O O PM U fcH o o in S3 a M CJ S3 U S3 EH p U S3 <* t»: U w U u P < O o o o o M Q Q P <* a P u u 53 Q U CH  j q p j z w  «« 33  X  X  »  w  DO  o  U P  to  PM  W  o CN  o ro  O  O  in  o  ID  GO TO 18 0 BB (NC + 1 ,1) = O.ODOO EB(NC2,I) = C(K) * .G1801534D00 CONTINUE RETURN END S U B R O U T I N E FJNMV I f l E L I C I I RE£1*8 (A - H,0 - Z) COMMON /PAT DAT/ N D X ( 2 0 Q , 2 ) , COMPM (20 , 200 ) , AZERO (200) , G H I N ( 2 0 0 ) , G S G L ( 2 0 0 ) , GGAS ( 1 0 ) , COMPS ( 2 0 , 2 0 0 ) , Z ( 2 0 0 ) , R R ( 2 0 ) , COMES (20, 10) WGHTM ( 2 0 0 ) , WGHTS ( 2 0 0 ) , W G H T G ( 1 0 ) , GN EOT (4 ) , P, T, ADH, B D H , BDOT, AMH20, A LMH 2 0 , NAMEM(5, 200) , NAMES ( 2 , 2 0 0 ) , NAHEG ( 5 , 1 0) , NA.MER (5,20) , MO,\ (20) , T R E A C T ( 2 0 ) , NMT, N S T , NC, NGAS, N E T , MAXI ,< N D L I N C , I N I O N , NK COMMON /CONCT/ G ( 2 0 0 ) , A L G ( 2 0 0 ) , ACT ( 2 0 0 ) , A L A ( 2 O 0 ) , C ( 2 0 0 ) , ALC ( 2 0 0 ) , B ( 2 0 , 2 0 0 ) , TOTM (20) , X P P M ( 2 0 0 ) , T N ( 2 0 0 ) , GSP ( 2 0 0 ) , A L G A S ( 2 0 ) , AGAS (20) , X I , E L E C T , X I P R T , D E L X I T COMMON /C ARB AY/ Q M ( 2 0 0 ) , Q S ( 2 0 0 ) , B B ( 2 0 , 2 0 0 ) , A (20 , 2 0 ) , DN (200) , C C { 2 0 0 , 2 0 ) , X ( 2 0 0 , 4 ) , CV (200) , [ J C V ( 2 0 ) , C S V E ( 2 0 0 ) , DC ( 2 0 0 ) W S ( 2 0 , 2 0 ) , W ( 2 0 , 2 0 0 ) , X D ( 2 0 0 , 4 ) , A S Y S ( 2 0 0 ) , A MADE ( 2 0 0 ) , A D E S T ( 2 0 0 ) , A 1 0 , X L , D E L X I , I P R O D (20) , N D E L X I , I S A T , N P T , NOD, I F I N , I P R I N T DO 3 0 1 = 1, NC I F (NDX ( 1 , 2 ) .EQ. 0) GO TO 30 K = NDX ( I , 1) C A L L MO VST (ATEMP , I ) A S Y S ( K ) = A S Y S ( K ) * ATEMP I F ( X D ( I , 1 ) ) 1 0 , 3 0 , 20 ADEST (K) = A D E S T ( K ) + ATEMP 10 GO TO 3 0 AMAEE (K) = AMADE (K) + ATEMP 20 30 C O N T I N U E DO 4 0 I = 1 , NRT K = IREACT(I) ADEST (K) = A D E S T ( K ) - R R ( I ) * D E L X I A SYS (K) = A S Y S ( K ) - BR ( I ) * D E L X I 40 C O N T I N U E DELXIT = D E I X I I + DELXI NC 1 = NC - 1 NC2 = NC + 2 NX = NK - NC 2 NNN = NRT DO 90 I = 1, NNN I F ( I .GT. NRT) GO TO 100 50 K = IREACT (I) I F ( A S Y S ( K ) . L T , 1. OD-12) GO TO 60 GO TO 90 60 NRT = NRT - 1 IPRINT = 1 I F (NRT .EQ. 0) CO TO 110 I F ( I -GT. N R I )GO TO 80 DO 7 0 J = I , NRT IRE ACT(J) = I R E A C T ( J D RE ( J ) = BR ( J + 1) 70 CONTINUE 80 A S Y S ( K ) = O.ODOO  170 180 190  #  119  90 100  110 120 130  140 150  160  170  183 190 200  210 220  230 240 250 260  IF ( I . G T . N S T ) GO TO 1 0 0 GO TO 5 0 CONTINUE I F ( N N N . E Q . N E T ) GO T O 120 CALL SETCOL GO TO 120 IFIN = 1 GO TO 2 60 I F (NPT) 2 6 0 , 2 6 0 , 130 NNN = N P T DO 2 5 0 I = 1, N N N K = I PROD ( I ) co n o J = 1, N C 1 Jl = J IE ( N D X ( J , 2 ) . E Q . 0 ) G O TO 140 IF ( N D X ( J , 1 ) . E Q . K) G O TO 150 CONTINUE I F (XD(JI,1) . GT. O.ODOO) GO TO 2 5 0 IF ( A S Y S ( K ) . L T . 1 . 0 D - 1 2 ) GO TO 160 GO TO 2 50 NPT = NPT - 1 IP8INT = 1 IF (NPT) 2 0 0 , 200, 170 I F ( I . G T . NPT) GO T O 190 CO 1 8 0 J = I , N P T I I B O D ( J ) = I P E O D ( J * 1) CONTINUE CONTINUE • A S Y S ( K ) = O.ODOO C O 2 1 0 J = 1, N C 1 IF ( N D X ( J , 2 ) , E Q . 0 ) GO T O 2 1 0 IF ( N D X ( J , 1 ) > N E . K) GO TO 2 1 0 L = J GO T O 2 2 0 CONTINUE DO ' 2 3 0 J - 1 , N X I F ( D A E S (COMPS ( L , J ) ) . L T . 1.0D-10) GO TO 2 3 0 N D X ( L , 1 ) = N D X ( N C • J , 1) NDX ( L , 2 ) = 0 ' GG T O 240 CONTINUE I E E T = -1 CALL TRANS (E, ISET) CONTINUE C A L L F I N DC CALL ACTIV . CALL SETCOL C A L L S E T MAT y-: ' •' BETUEN • END S U B B C U T I N E S P E C L G (K) I M P L I C I T B E AL * 8 ( A - H,0 - Z) y • COMMON / P A T D A T / N D X ( 2 0 0 , 2 ) , C O M P M ( 2 0 , 2 0 0 ) , A Z E S O ( 2 0 0 ) , G M I N ( 2 0 0 ) , 1 G S O L ( 2 0 0 ) , G G A S ( 1 0 ) , C O M P S (20 , 2 0 0 ) , Z ( 2 0 0 ) , BR (20) , 2 C O M P G ( 2 0 , 10) , W G H T M ( 2 0 0 ) , W G H T S ( 2 0 0 ) , W G H T G ( 1 0 ) , G N E U T (4) , 3 P , T , A D H , B D H, B O O T , A M H 2 0 , A L H H 2 0 , • N A M E M ( 5 , 2 0 0 ) , 4 NAMES (2, 2 0 0 ) , NAMEG ( 5 , 10) , NAMES ( 5 , 20) , M O A . ( 2 0 ) , :  120  5 6  T E E A C T ( 2 0 ) , N M T , N S T , NC, NGAS, NST, M A X I , N D L I N C , I N I O N , NK COMMON /CONCT/ G ( 2 0 0 ) , ALG ( 2 0 0 ) , ACT ( 2 0 0 ) , ALA ( 2 0 0 ) , C (200) , 1 ALC ( 2 0 0 ) , B ( 2 0 , 2 0 0 ) , TOTM ( 2 0 ) , XPPM (200) , TN (200) , 2 G S P ( 2 0 0 ) , ALGAS ( 2 0 ) , AGAS (20) , X I , E L E C T , X I P R T , D E L X I T COMMON / C A E S A Y / QM ( 2 0 0 ) , QS (200) , B B ( 2 0 , 2 0 0 ) , A (20 , 20) , DN (200) , 1 CC ( 2 0 0 , 2 0 ) , X ( 2 0 Q , 4 ) ; C V ( 2 0 0 ) , U C V { 2 0 ) , C S V E ( 2 0 0 ) , DC ( 2 0 0 ) , 2 HS ( 2 0 , 2 0 ) , W ( 2 0 , 2 0 0 ) , X D ( 2 0 Q , 4 ) , ASYS (200) , A MADE (200) , . 3 ADEST ( 2 0 0 ) , A 1 0 , X L , D E L X I , I.PROD (20) , N D E L X I , I S A T , NPT, a NOD, I F I N , I P R I N T ATEMP = - G S O L ( K ) ./ DC 10 J = 1, NC I F ( N D X ( J , 2 ) . NE. 0) GO TO 10 ,. J J = NDX ( 0 , 1 ) ATEMP = ATEMP + CO MPS ( J , K) * A L A ( J J ) 10 C O N T I N U E ALA (K) = ATEMP A L C ( K ) = ALA (K) - ALG (K) C (K) = 10.0 ** ALC (K) RETURN END v . S U B R O U T I N E PR EA D ( B , A S Y S ) '• I M P L I C I T R E A L * 8 (A - H,0 - Z) C C C C  T H I S S U B R O U T I N E READS THE DATA SOURCE FOB " P A T H " AND PUTS I T I N THE COMMON ELOCK "PATI3 AT". ' . -.. EXTERNAL CAICK ' . ; • . . . . . . I N T E G E R * 2 DUMMY ( 1 0 0 ) , . NCOMP (4 ,4 0) , I N P U T ( 6 0 , 2 0 ) , DUMMY2(60) I N T E G E E * 2 • T Y P E ( 4 , 6 ) , WATER ( 6 0 ) , STAR, NSW, BLANK " ' DATA WATER / ' H ' , »2*, * 0 « , 6*» », '«H • , » (• , 2» , •)'» ' ' » '(*» 1 • 1 • , « ) « , 4 3 * ' '/ DATA S T A B /•*•// ELANK /» »/ DATA T Y P E / » M ' , ' I ' , »N', » E V , 'A', • Q» , 'U', ' E* , ' S ' , O » , » L « , 1 ' ' I ' , ' G , 'A'/ ' S ' , ' E « , 'R', ' E ' , 'F», « E » , ' S ' , «T', 'O', 2 . 'P V D I M E N S I O N ANCOM (40) , PHC8P (40) , N AM ECO (5 , 20) , NDUM (5) , B ( 2 0 , 200) D I M E N S I O N WEIGHT (40) , A S Y S (200) , T E M P E R ( 8 ) , ZCOM? (40) COMMON /OOP/ A I N I T (2 0) , I M ( 5 , 2 0 ) , I S ( 2 , 2 0 ) , I G ( 5 , 2 0 ) , N I O N J 2 ) , 1 - I H X , I S X , I G X , INPUT . . COMMON /PAT DAT/ N D X ( 2 0 0 , 2 ) , COMPM ( 2 0 , 200) , AZERO'(200) , GM.IN ( 2 0 0 ) , • 1 G S O L ( 2 0 0 ) , G G A S ( i O ) , COMPS ( 2 0 , 2 0 0 ) , Z ( 2 0 0 ) , RR (20) , 2 COMFG (20,, 10) , WGHTM (200) , W G H T S ( 2 0 0 ) , WGHTG { 1 0) , GNEUT (4) , 3 P, T, ADH, B D H, ' BD CT, AMH20, A L M H 2 0 , N AMEM (5 , 20,0)', 4 . NAMES ( 2 , 2 0 0 ) , N AM EG ( 5 , 1 0) , N AM ER ( 5 , 20) , MO A (20) , 5 I R E A C T (20) ,. NMT, N S T , NC, NGAS, NET, M A X I , N D L I N C , I N I O N , 6 NK • • ; , ."«'.. T H E FOLLOWING C A L L S P E C I F I E S THAT FORTRAN UNIT 19 I S TO BE USE 1  0  f  1  C C C FOR C MEMORY-TG—MEMORY I/O WITH A B U F F E R LENGTH OF 30 B Y T E S . THIS C .ROUTINE .IS C FOUND ONLY AT MTS I N S T A L A T I O N S AND MUST BE REMOVED AND UNIT 19 C ASSIGNED C TO A TEMPEEARY- F I L E . THE REWIND STATEMENTS I N SUBROUTINE DECO , C WILL C HAVE TO HAVE THE 'C* REMOVED.. '  121  c C C C  CALL  FTNCMD (» EU.FFER 19 LENG TH=3 0 • , 19).  BEAD  I N THE  "A" D E B Y E - H U C K E L  BEAD ( 3 , 9 2 0 ) TEMPEB C A L L STB A ( T E M P E R , T, ACH = PAR C C C  READ I N THE  TEEMS  PAR)  E DE E YE- BUCKET TEEMS  (X 10E-8) •  READ ( 3 , 9 2 0 ) TEMPER C A L L S T R A ( T E M P E R , T, BDH = PAR C C C  BEAD I N THE  EDOT  ( D E V I A T I O N FUNCTION)  BEAD ( 3 , 9 2 0 ) TEMPEB C A L L STRA ( T E M P E B , T, E COT = PAR C C C  PAR) TERMS;  PAB)  BEAD I N THE GAMMA OF C 0 2 I N NACL SOLUTIONS ;  DO  10  C C C C C C  10 J = 1 , 4 READ ( 3 , 9 20) TEMPER C A L L STRA (TEMPER, T, PAR) GNEUT ( J ) = PAR CONTINUE N MI = 0 NST = 0 NGAS = 0 READ ( 3 , 9 3 0 ) NCTZ READ  I N THE  READ  (3,960)  (3,970)  '  ,  . ELEMENTS OF THE C O M P O S I T I O N A L ARRAY'S TO DUMMY. ( (NCOMP ( J , I I ) , J = 1 , 4 ) , 1 1 = 1 , NCTZ)  READ THE WEIGHT'S OF BEAD  '  EACH OF THE COMPONENTS  (WEIGHT ( I ) ,1=1,NCTZ)  C DC 20 J = 1, 40 ANCGM ( J ) = 0.0 20 CONTINUE' • NC = NC + 1 DO 30 J = 1, 6 0 I N E U T ( J , N C ) '= WATER ( J ) .30 • C O N T I N U E NDX(NC,2) = 0 '. ' MOA(NC) = 0 DC 7 0 I = 1, NC .. DO 40 J = 1, 60 DUMMY2(J) = I N P U T ( J , I ) .: 40 CONTINUE C A L L DECODE (PHCMP, NDUM, N C T Z , NCOMP, DUMMY2, 60)DO 50 J = 1, NCTZ • " • , A N C O M ( J ) = PHCMP ( J ) + ANCOM(J)  50  60 70  CONTINUE DO 6 0 J = 1, 5 NAM E C O ( J , 1 ) = CONTINUE CONTINUE GO TO 1 5 0  NDUM(J). ~  •  • [.  80 I = 0 90  I = I + 1 IF (DUMMY ( I )  .EQ. STAR)  GO  TO 9 0  1 = 1 - 1 DO  100  1 1 0 J J = 1, 6 DO 1 0 0 J = 1, 4 IF (DBMH3'(I + J ) ' . N E . CONTINUE  NPfiS •= J J  TYPE (J, JJ) )  G O TO/-.I 10  • ' .  GO TO 1 2 0 . ' 1 10 C O N T I N U E • GO T C 1 4 0 120 GO T O ( 1 5 0 / 1 5 0 , 1 5 0 , 1 5 0 , 1 3 0 , 390) , NPWS 1 3 0 C A L L R R E A D ( N S W , D U M M Y , £390) IF (NSW . E Q . S T A R ) G O T O 8 0 . IF (NSW . N E . BLANK) GO T O 1 4 0 GO T O 1 3 0 140 W R I T E ( 6 , 8 8 0 ) NSW, DUMMY STOP 1 5 0 C A L L B R E A D ( N S W , DUMMY, S 3 9 0 ) IF (NSW . E Q . S T A R ) G O T O 8 0 IF (NSW • N E . E L A N K ) GO T O 1 4 0 READ ( 3 , 9 4 0 ) H, S , A , B B , C , V • IF (fl . G T . S 9 9 9 9 9 . ) G O T O 1 5 0 fl = H / 4 . 1 8 4 S = S / 4.184 A = A / 4,184 BE = BB / 4 . 1 8 4 C = C / 4.184 CALL  DECODE (PHCMP,  N DUM,. N C T Z ,  NCOMP, DUMMY,  .,  100)  DG  160 170 180  190  200 210  16G J = 1, NCTZ IF ( P H C M P ( J ) . G l . .'1. O D - 1 0 . A N D . A N C O M ( J ) . L T 1 GO T O 1 5 0 CONTINUE GO T O • ( 1 8 0 , 2 7 0 , 1 7 0 , 3 3 0 ) , NPWS WRITE (6,890) GO T O 1 3 0 I F ( I M X . E Q , 0) GO T O 2 4 0 DO 2 2 0 K = 1 , I M X DO 1 9 0 J = 1 , 5 IF ( I M ( J , K ) . N E . N D U M ( J ) ) GO' T O 2 2 0 CONTINUE IF ( K . E Q . IMX) GO T O 2 3 0 KK = K LOOP; = I M X - 1 : • • " * ' • » DO 2 1 0 J J = K K , L O O P DO 2 0 0 J J J = 1 , 5 I M ( J J J , J J ) = I M ( J J J , J J + 1) CONTINUE CONTINUE . '  1.0D-10)  GO 1 0 2 3 0 CONTINUE GO TO 2 4 0 230 I MX = I M X - 1 GC TO 150 240 NMT = NMT + 1 DO 2 5 0 J = 1, 5 NAMEM ( J , NMI) = NDUM(J) 250 C O N T I N U E WGHTM (NMT) = 0. 0 LOOP = 0 CO 2 6 0 J = 1, NCTZ WGHTM (NMT) = WGHTM (NMT) + PHCMP (J) * WEIGHT ( J ) I F (ANCOM(J) . L T . 1. OD- 1 1 ) GO TO 2 6 0 LOOP = LCOE + 1 COMPM (LQOP.,NHT) = 'PHCMP ( J ) 260 C O N T I N U E GMIN (NMT) = C A L C K ( H , S , A,B.B,C, V,T,P) GC TO 150 270 AZ = EB * 4. 184 ' . 2.7. = C * 4 , 1 8 4 V = 0 • "• I F ( I S X .EQ. 0) GO TO 3 0 0 DC 2 9 0 K = 1, I S X DO 2 8 0 J = 1 , 2 I F ( I S ( J , T ) . NE. N D U M ( J ) ) GO TO 2 9 0 280 CONTINUE GO TO 150 290 C O N T I N U E 300 N S I = NST + 1 DO 3 1 0 J = 1, 2 NAMES ( J , N S T ) = NDUM ( J ) 3 10 C O N T I N U E WGHTS (NST) = 0 . 0 LOOP = 0 CO 3 2 0 J = 1, NCTZ WGHTS (NST) = I G H T S ( N S T ) +'PHCMP(J) * WEIGHT ( J ) I F (ANCOM(O) . L T . 1.0D-11) GO TO 3 2 0 LOOP = LCOE + 1 COMPS (LOOP,NST) = PHCMP (0) 320 C O N T I N U E AZERC (NST) = AZ Z (NST) = ZZ . Z1 = 0.0 GSOL (NST) = C A L C K ( H , S , A , Z l , z i , Z l , T , P ) GO TO 1 5 0 . , /" 330 V = 0. I F ( I G X .EQ. 0) GO TO 3 6 0 DO 3 5 0 K = 1 , I G X . .'• • •„••••••" DO 3 4 0 J = 1, 5 I F ( I G ( 0 , K ) .NE. N D U M ( J ) ) GO TO 3 5 0 340 CONTINUE GO TO 150 350 C O N T I N U E ' 3 6 0 NGAS = NGAS • 1 DO 3 7 0 J = 1 , 5 NAMEG ( J , NGAS) = NDUM ( J )  220  370  CONTINUE WGHTG (NGAS) = 0. 0 LOOP = 0 DO 38 0 J = 1 , NCTZ WGHTG (NGAS) .= WGHTG (NGAS) .+ PHCMP (J) I P (ANCOM(J) . I T . 1.0D-11) GO TO 380 1005 = LOOP + 1 COMPG (LOOP,NGAS) = PHCMP (J) 380 CONTINUE V = 0.0 • GGAS (NGAS) = CALCK (H , S , A , BB ,C , V, T, P) GO TO 150 390 NEEDSW •= -1 400 DO 520 I = 1 , NC IS WIT = NDX (1,2) + 1 GO TO <410, 4 4 0 , 4 4 0 , 4 7 0 ) , ISWIT C AC SECTION 4 10 DO 43 0 K •= 1, NST CO 420 J = 1, 2 I F (NAMES (J,K). . NE, NAMECO ( J , I ) ) 420 CONTINUE . LIP = K GO TO 510 430 CONTINUE WRITE (6,990) (NAMECO {J , I) , J= 1 ,2) GO TO 860 4 40 DO 46 0 K = 1, NMT • DC 450 J = 1, 5 • I F (NAMEM (J,K) . NE. NAMECO(J,I)) 450 CONTINUE LIP = K GG TO 5 10 460 CONTINUE \ WRITE (6,980) (NAMECO ( J , I ) ,J=1 ,5) GO TO 8 60 470 I F jNGAS . I T . 1) GO TO 500 DO 490 K = 1, NGAS DO 480 J = 1 , 5 I F (NAMEG (J,K) . NE. NAMECO ( J , I ) ) 480 CONTINUE ' LIP = K GO TO 510 490 CONTINUE 500 WRITE (6,980) ( NAMECO (J ,1) , J= 1, 5) GO TO 860 5 10 NDX (1,1) = L I P 520 CONTINUE I F (LOOP .EC- NC) GO TO 560 NEEDSW = 1 DC 5 30 I = 1, NMT . CO MEM (NC,1) = 0 . 0 530 CONTINUE DO 54 0 I = 1 , NST COMES (NC, I) = -Z (I) IF (Z (I) . GT. 9.9) COMPS(NC,I) = 0.0 540 CONTINUE IF (NGAS . L T . 1) GO TO 560  * WEIGHT(J)  V  GO TO 430  G O T O 460  GO TO 490  DO 5 5 0 1 = 1 , NGAS CO BIG ( N C , I ) = 0.0 550 C O N T I N U E 560 CONTINUE I SET = -1 CALL TRANS(E, IRET) I F (NEEDSW .GT. 0) GO TO 7 8 0 L I M = NST - 1 .NCI = NC + 1 LOOP = 1 DO 5 7 0 J = 1, NC I F ( N D X ( J , 2 ) . N I . 0) ZCOMP ( J ) = O.OD+00 I F ( N D X ( J , 2 ) . NE. 0) GO TO 5 7 0 Z C C K F ( J ) = Z (NDX ( J , 1) ) I F (DABS (ZCOMP ( J ) ) .GT. 9.9) ZCOMP (J) = 0.0D + 0 0 570 C O N T I N U E DO 6 30 I = 1, NST ATEMP = -Z ( 1 0 0 P ) I F (DABS (Z (LOOP) ) .GT. 9.9) ATEMP = 0.0 DO 5 8 0 J = 1, NC ATEMP = ATEMP + ZCOMP ( J ) * COMPS ( J , LOOP) 580 CONTINUE I F (DABS (ATEMP) . L T . 1.0D-05) GO TO 6 2 0 DO 6 1 0 K = L O O P , L I M Z (K) = 2 (K + 1) GSOL (K) = G S C I (K + 1) AZEBO (K) = A ZERO (K + 1) W G B I S ( K ) = WGHTS (K • 1) DO 5 9 0 J = 1, NC COMPS ( J , K ) = COMPS ( J , K + 1) 590 CONTINUE DO 6 0 0 J = 1 , 2 NAMES ( J , K ) = NAMES ( J , K + 1) 6 00 CONTINUE 610 CONTINUE IIH = LIB - 1 I F ( L I B . L I . 1) GO TO 8 7 0 GO TO 6 3 0 6 20 LOOP = LOOP + 1 630 C O N T I N U E NST = LOOP - 1 L I M = NMT - 1 LOOP = 1 DO 7 0 0 I = 1 , NMT ATEMP = 0.OD+00 DO 6 4 0 J •= 1, NC ATEMP = ATEMP + ZCOMP ( J ) * COMPH ( J , LOOP) 640 CONTINUE I F (CABS (ATEMP) . L T . 1.0D-05) GO TO 6 9 0 650 CONTINUE DO 6 8 0 K = L O O P , L I M GMIN (K) = GMIN (K- + 1) WGHTM (K) = WGHTM (K + 1) DO 6 6 0 J = 1, NC CGMPM <J,K) = COMPM ( J ,K * 1) 6 60 CONTINUE DO 67 0 J = 1, 5  126  NAMEM (J,K) = NAMEM(J,K + 1) CONTINUE CONTINUE LIM = L I M - 1 I F (LIM . LT. 1) GO TO 8 7C GO TO 7 0 0 6 90 LOOP = LOOP + 1 700 CONTINUE N M = LOOP - 1 I F (NGAS .LT. 1) GO TO 770 LIM = NGAS - 1 6 70 680  LOOP = 1  DO 760 1 = 1 , NGAS ATEMP = 0.OD+OO DO 710 J = 1, NC ATEMP = ATEMP + ZCOMP (J) * COMPG (J/LOOP) 710 CONTINUE I F (DABS (ATEMP) . L T . 1.0D-05) GO TO 750 DO 740 K = LOOP, L I M GGAS (K) = GGAS (K + 1) WGHTG (K) = WGHTG (K + .1) DO 720 J = 1, NC COM PG {J , K) = COMPG (J,K + 1 ) 720 CONTINUE DO 730 J = 1 , 5 N AMEG (J,K) = N AMEG { J , K + 1) 730 CONTINUE 740 CONTINUE LIM = L I M - 1 GO TO 7 6 0 . 750 LOOP = LOOP + 1 760 CONTINUE NGAS = LOOP - 1 C 770 LGOP = NC • NEEDSW.=, 1 GO TO 4 00 780 I F (NET . L T . 1) GO TO 820 DO 810 K = 1, NET C DO 800. I = 1 , NMT C DO 7 9 0 J = 1 , 5 I F (N AMEE (J , K) . NE. NAMEM (J ,1) ) -GO TO 800 . 790 CONTINUE C I E E ACT (K) = 1 ASYS (I) = A IN IT (K) GC TO 810 800 CONTINUE WEITE (6,900) ' (NAMES (J,K) ,J=1,5) 'WRITE ( 6 , 1000) WRITE (6,1010) STOP C 810 CONTINUE , 820 DO 840 I = 1,, NST  8 30  DO '83 0 J - 1, 2 I F (NAMES ( J , I ) CONTINUE  INICN = I GO TO 8 5 0 840 C O N T I N U E WRITE ( 6 , 1 0 2 0 ) GC T C 8 6 0 850 RETURN; 860 WRITE ( 6 , 1 0 0 0 ) STO P 8 70 WRITE ( 6 , 9 1 0 ) STOP  128 , NE. N I O N ( J ) ) GO TO 8 4 0  (NION ( J ) , J = 1 , 2 )  (1.X, 5 ( « * * * * * » ) , / , ' I M P R O P E R L Y FORMATED DATA B A N K 1 ' L I N E I N ERROR I S • /, 1 0 1 A 1 , //) S O L I D ' S O L U T I O N I S NOT WORKING I N T 890 FORM AT (//, 5 ( ' * * * * * * * * • ) , 1HIS V E R S I O N ' , / , ' A L L S O L I D S O L U T I O N P H A S E S W I L L 2 5 (.* * •*•****•*•) ) 5A4, •" COULD NOT BE FOUND') . 900 FORMAT (///, ' I N I T I A L REACTANT '" 910 FORMAT ( / / , ' * ' , / , 'A C O N S T R A I N I N G P H A S E ', 'CONTAINS TWO O X I D A T I YOU MUST HAVE A 10N S T A T E S - BUT TEE.RE I S NO REDOX', / , 'COUPLE2BEDOX C O U P L E ' I F YOU HAVE TWO', O X I D A T I O N S T A T E S . ') 9 20 FOEMAT ( 8 F 8 . 4 ) 930 FOEMAT ( 1 X , 2 6 1 3 ) 940 FORMAT ( 5 X , 6 F 1 2 . 3 ) 950 FOEMAT ( 1 X , 150A1) 960 FORMAT ( 7 ( 4 A 1 , 4 X ) ) 970 FORMAT ( 7 F 1 0 . 5 ) 980 FOEMAT (///, •COMPONENT ', 5 A 4 , • COULD NOT BE FOUND!') 990 FORMAT (///, 'COMPONENT ', 2 A 4 , ' COULD NOT BE FOUNDJ ') ' 1000 FORMAT (' CHECK I F COMPONENT I S PRESENT I N DATA DECK AND THAT * YOU HAVE S P E L L E D I T THE SAME AND THAT I T I S L E F T . 1 • J U S T I F I E D I N THE I N P U T F I E L D ! !! ! •) 1010 2 FORMAT ('ALSO CHECK THAT T H I S P H A S E DOES NOT HAVE TWO O X I D A T I O N ' S T A T E S ' , /, ' I F THE S O L U T I O N ONLY C O N S T R A I N S ONE ') 1020 1 FORMAT (///, 'THE S P E C I E S •", 2 A 4 , '» CHOSEN AS THE I O N TO BE ', , ' B A L A N C E D ' , • ON, COULD NOT B E FOUND') 1 END S U B R O U T I N E DECODE (PHCMP, NNDUM, N C T Z , NCOMP, NOUT, I S I Z E ) 880  FO EH AT  1  :  C  c c c c c c c  T H I S R O U T I N E I S C A L L E D BY PREAD AND DECODES T E E FORMULAS. ON SOME S Y S T E M S , THE C A L L S TO RWITE AND REEAD W I L L NOT WOBK, COMMENT T H E S E OUT AND REMOVE THE "C" FROM. I N F R O N T OF T E E R E W I N D S , WRITE AND READS ON UNIT 1 9 . ' I M P L I C I T RE A L * 8 ( A - H,0 - Z) D I M E N S I O N . PHCMP (4 0) , I N D E X ( 4 0 ) , NNDUM (5) NUMBER (10) I N T E G E R * 2 NCOMP ( 4 , 4 0 ) , N O U T ( I S I Z E ) , NDUM(25) P E R I O D , BLANK I N T E G E R * 2 NNCOM ( 5 , 4 0 ) , NFOBH" ( 2 , 4 0 ) , NBRAC (2) DATA E L A N K /• P E R I O D / ' . ' / , NERAC / ' ( ' , V •0'/ •9' DATA NUMBER / • 1 ' , » 2 « , ' 3 ' , '4», «5», ' 6 ' , » •8 !  10  DO 10 I = 1, 25 M.D0M(I) = EIAKK CONTINUE  129  DO 4 0 I = 1, NCTZ PHCMP (I) = 0. 0  C  c  20  DO 20 J = 1 , 2 NFOBM(J,I) = BLANK CONTINUE  30  BO 30 J = 1, 5 NNCGM ( J , I) . = BLANK CONTINUE  40  CONTINUE  DO 50 I = 1 , I S I Z E I E (MOOT ( I ) . EQ. BLANK .AND. NOUT(I + 1) . EQ. BLANK .AND. NOUT ( 1 1 + 2 ) .EQ. BLANK) GO TO 60 I F ( I •GT. 25) GO TC 50 NDUM (I) = MOOT (I) 50 CONTINUE  60 CONTINUE .. REWIND 19 WRITE (19,1)NDUM CALL RWITE (NDUM, 25) C REWIND 19 C READ (19, 2) NNDUM C AIL REEAD (NNDUI? , 5) NN = I 1 = 0 70 NN = NN + 1 I F (NCUT(NN) .EQ. BLANK) GO TO 70 so j = o ; 1 = 1 + 1 90 I F (NCUT(NN) EQ. BLANK .AND. NOUT (NN + 1) 1 NN + 2) . EQ. , BLANK) GO TO 120 I F (NOUT (NN) .EQ. N B R A C ( I ) ) GO TO 100 J = J + 1 NFGRfi ( J , I ) = NOUT (NN) ' Nfi = MN + 1 GO TO 90 100 J = 0 1 10 NN = NN + 1 NSWIT = - 1 I F (NOUT (NN) .EQ. NB.RAC (2) ) NSW.IT = 1 I F (NSWIT .EQ. 1) NN = NN * 1 I F (NSWIT . EQ. 1) GO TO 80 I F (NOUT(NN) .EQ. BLANK) GC TO 110 J = J + 1 NNCOE ( J , I ) = NOUT (NN) GO TO 1 10  C C  120  LI- 0  . EQ. BLANK .AND. NOUT (  EC C  15 0 K = ] 4 0 I E (NFQRM{1r K) .EQ. r  DO  C  140 I =  DO  GO TO  16 0  1, NCTZ  130 J = 1, 2  I F (NFQRM ( J , K ) CONTINUE  130  BLANK)  . NE, N C O M P ( J , I ) )  GO TO  140  C I N D E X (K) = I LI = LI + 1 GO TO 150 CONTINUE  140 ' C 150  CONTINUE  160  DO  C 2 1 0 I = 1, L I JJ = 1 COUNT = 1 0 . 0 D 0 0 I F ( N N C C M ( 2 , I ) . EQ. P E R I O D . OR, N N C O M ( 2 , I ) . EQ. BLANK) 1 COUNT = 1.0D00 170 I F ( N N C O M ( J J / I ) .EQ. B L A N K ) GO TO 2 1 0 , I F ( N N C O M ( J J , I ) .EQ. P E R I O D ) G O T O 2 0 0 C .. .. DG 180 J = 1, 10 I F ( N N C 0 M ( J J , I ) .EQ. NUMBER ( J ) ) GO TO 190 180 -CONTINUE . •' C ' . • ' 190 I F ( J . EQ. 10) J = 0 PHCJSP (INDEX ( I ) ) = -FLOAT (J) ; * COUNT + PHCMP (INDEX ( I ) ) COUNT = COUNT * ..1.D00 200 J J = JJ + 1 I F ( J J '.LT. 6) GO TO 170 • • 210 C O N T I N U E  '  v  '  5  c  •.....  •'''•"  ' RETURN 220' FO EM A3 ( I X , 25A 1) 230 , F0EM.AT',(1X^ 5A4)  END  c C C  '  . • •••  .. " . •  '•' '  L  •• ,  - ' \ • !  :  F U N C T I O N C A L C K ( H , S, A , B , C, V, 1, P) . , ;. • - . • ' • • ' ' . C A L C U L A T E LCG K FROM H , S , A , 3, C , V  '  .  . . ;  I M P L I C I T ' 8 E A L * 8 (A - H,0 - Z) . X = 10. A 10 = DLOG (X) TR = 29 8. 15 R = 1.98726 • X I = A * (T - TR) . + B /'"2 * ( T * * 2 - TR**2) - C * ( 1 / T - 1/TR) X2 = A * (DLOG (T/TR) ) + B * (T - .TH) - C / 2 *' ( T * * ( ^ 2 ) "- T B * * (-2) 1) . . X3 •=.' (H - (T*S) ) + V ,*.. 0 2 3 9 0 0 6 4 * (P - . 1 ) X4 =" X3 + X1 - T * X2 C A L C K = -X4 / ( ( - A 1 0 ) * R * T ) RETURN ... END . S U B R O U T I N E I ATA I N (TOTM) -  . •  131  BEAD DATA I N P U T FOB U N I T 5, DO L I M I T E D EBBOB C H E C K I N G ECHO CN OUTPUT D E V I C E . I M P L I C I T BE AL*8 (A - H,0 - Z) INTEGER*2 INPUT (60,20) : •COMMON /DUP/ A T N I T ( 2 0 ) , I M ( 5 , 2 0 ) , 15 ( 2 , 2 0 ) ' , I G ( 5 , 2 0 ) , NION ( 2 ) , 1 IMX, I S X , I G X , INPUT ' - D I M E N S I O N T I T L E (4 0) , TOTM (20) COMMON / P A T D A T / N D X ( 2 0 0 , 2 ) , COMPM ( 2 0 , 2 0 0) , A Z E R O { 2 0 0 ) , GMIN.(200) 1 G S G L ( 2 0 0 ) , GGAS ( T O ) , COMPS (20 , 2 0 0 ) , Z ( 2 0 0 ) , R S ( 2 0 ) , 2 COMPG (20 , 10) , « G H T M ( 2 0 0 ) , WGHTS ( 2 0 0 ) , WGHTG ( 1 0 ) , GNEUT ( 4 ) , 3 P, T, ADH, BDH, BDOT, A.MH20, A L M H 2 0 , NAMEM ( 5 , 200) , 4 NAMES ( 2 , 200) , N A M E G ( 5 , 1 0 ) , NAMEB ( 5 , 20) , MOA (20) , 5 I R E A C T ( 2 0 ) , NMT, NST, NC, NGAS, NET, M A X I , N D L I N C , I N I O N , '' 6 NK BEAD ( 5 , 2 4 0) ( T I T L E ( I ) ,1= 1,40) . •, EEAD ( 5 , 200) T, P, N R T , A MH 2 0 , N D L I N C , M A X I , I M X , I S X , . I G X I F (A MH 20 . L T . 1,0) AMH20 = 1.0DOO / ,0 18015.34D00 ALMH20 = DLOG10 (AMH20) I F ( M A X I . L T . 1) MAXI = 1 0 0 0 0 0 BEAD ( 5 , 2 1 0 ) (NION ( I ) , 1 = 1 ,2) I F ( N B I . L T . 1) MAXI = 1 I F (NET , L T . , 1 ) N D L I N C = 0 I F (NET . L T , 1) GO TO 10 BEAD ( 5 , 2 2 0 ) (EB ( I ) , A I N I T ( I ) , (NAMEB ( J , I ) ,J=1,5) , 1 = 1 , NET) 10 I F ( I M X . EQ. 0) GO TO 20 BEAD ( 5 , 2 3 0 ) j ( I M (J , I ) , J= 1, 5) , 1= 1 ,IMX). 20 I F ( I S X . EQ. 0) GO TO 30 BEAD ( 5 , 2 5 0 ) ( ( I S ( J , I ) , J= 1, 2) , 1 = 1, I S X ) 30 C O N T I N U E I F ( I G X . L T . 1) GO TO 40 BEAD ( 5 , 2 3 0 ) ( ( I G ( J , I ) , J= 1, 5) ,1=1 ,IGX) 40 C O N T I N U E LIM = 0 50 I = L I M + 1 BEAD ( 5 , 2 6 0 , END=60) M O A ( I ) , NDX ( 1 , 2 ) , TOTM ( I ) , ( I N P U T ( J , I) , J= 1 , 6 0 ) LIM = LIM • 1 GO TO 50 60 C O N T I N U E ' ••" NC = L I M • ' ". ' C C C  I ATA ECHO HEBE  .  WHITE ( 6 , 2 7 0 ) WHITE ( 6 , 2 4 0 ) ( T I T L E ( I ) , 1 = 1 , 4 0 ) WBITE ( 6 , 2 8 0 ) T, P, M A X I , N D L I N C , (NION ( I ) , 1 = 1 , 2 ) , AMH20 • I F (NBT , L T , 1) GO TO 7 0 WBITE ( 6 , 2 9 0 ) W B I T E ( 6 , 3 0 0 ) ( (NAMEB ( J , I ) , J = 1 , 5 ) ,RR ( I ) , A I N I T ( I ) ,1=1 ,NRT) 70 I F (IMX . L T . 1) GO TO 80 WRITE (6 ,,320) WRITE ( 6 , 3 30) WRITE ( 6 , 2 3 0 ) ( ( I M ( J , I ) , J = 1 , 5 ) , 1 = 1 , I M X ) 80 I F ( I S X . L T . 1) GO TO 90 WHITE ( 6 , 320) WRITE ( 6 , 150)  WRITE (6, 250) ( (IS (J , I ) , J= 1 , 2) , 1= 1,1 SX) 90 I E (IGX . LT. 1) GO TO 1.00 WRITE (6,320) WRITE (6,130) WRITE (6,230) ( (IG (J ,1) , J= 1 ,5) ,1= 1, IGX) 100 WRITE (6,310) DG 110 I = 1 , NC I F (HOA(.I) .EQ. 1 .AND. NDX 1 (INPUT (0,1) ,J=1,60) I F (HOA(I) .EQ. 0 .AND. NDX 1 (INPUT ( J , I ) ,J=1,60) I F (NDX ( I , 2) . EQ. 1) WRITE I F (NDX (1,2) .EQ. 3) WRITE 1 10 CONTINUE WRITE  (1,2) ..EQ. 0) WRITE (1,2) . EQ. 0) WRITS  132  (6,160) TOTW(I), (6,170)  TOTM(I),  (6,180) T O T B ( I ) , (I NP UT (0,1) , J= 1 ,6 0 ) (6,190) TOTM (I) , (INPUT ( J , I ) ,J=1,60)  .(6,320)  • 120 WRITE (6,140) (TITLE (I) ,1=1,40) RETURN . 130 FORMAT {/,' «• THE FOLLOWING GAS(ES) HAVE BEEN SUPH ESSED», /) 140 POEHAT (*1», 20A4, / , 2 0 A 4 , //) 150 FORMAT (/, » THE FOLLOWING AQUEOUS SPECIES HAVE BEEN SUPSESSED', / 1 ) "•' 160 FORMAT (» ', D15.8, * LOG ACT.', 5X, 6 0 A 1 , • (AQUEOUS SPECIES) ' , /) 170 FORMAT (' «, D15.8, ' MOLALITY • , 5X, 60 A 1, ' (AQUEOUS S P E C I E S ) ' , /) 180 FOEM AT (' ' , D15.8, ' G:SAMS •', 5X,,60A1, ' ( S O L I D ) ' , /) 190 FORMAT {' «, D15.8., ' LOG ACT. ' , 5X, 5X, 60A1., 60A1., ' (GAS) « , /) 200 FORMAT ( 2 F 1 0 . 3 , 1 5 , F 1 0 . 3 , 5 l 5 ) . 210 FORMAT (2A4) • -."' 220 FORMAT ( F 5 . 3 , 5X, F 1 0 . 5 , 5X, 5A4) 230 FORMAT (3 (5A4,5X) ) ' 240 FORMAT (20A4) 250 FOBMAT (4 (2A4, 12X)) 2 60 FORMAT ( 2 1 2 , E 1 0 . 3 , .60A1) ********* t 2 70 FORMAT ('.,1 ******** D.ATA ECHO 280 FORMAT (//, ' TEMPERATURE (KELVIN) OF THIS B U N T S F8. 2, 1 /, • PRESSURE , (BABS) OF-THIS BUN I S ...... • » » » • * * F3.2, ' 2 //, ' MAXIMUM NUMBER OF. STEPS IS .......... 16, ./ 4 3 , ' NUMBEB•OF STEPS BETWEEN EACH PRINT OUT I S , 16, / / , 4 * ION CHOSEN FOR ELECTBICAL BALANCE IS ...... 1X, 2 A 4 , 5 /, • MOLES OF SOLVENT H20 IN" SYSTEM I S ' , F 10 . 6 , m * .• * 6 //) 290 FOBMAT (/, ************** I N I T I A L BE ACT ANTS ***********», /, 2 6 X , 1 . . '.RATIO PRESENT'., 8X, ' GBAMS PRESENT' , /,) . 300 FOBMAT (/, 1X, 5A4, 5 X , F10..5, 10X, F10.5) 3 10 .FORMAT (//, ' ************* I N I T I A L SOLUTION CONSTRAINTS ********** 1* //) 320 FORMAT {/, • ******************************' •) 330 FOBMAT (/, ' THE FOLLOWING MINE R AL (S) HAVE. BEEN SUPRESSED', /) :  END  SUEBOUTINE BREAD (NNNI, DIP,*) INTEGER N (25) INTEGEE*2' DIP ( TOO) , OU.( 100) , NN NI LOGICAL*! L T P P Y ( 2 0 0 ) , L.LNN(100), ELANK EQUIVALENCE (LLNN (1) , N (1) ) , (LIPPY (1) ,OU (1) ) DATA ELANK /• '/ READ (3,4Q,END=30) NNNI, N  10 1 = J = I * K = I * L I P FY ( J ) L I P P Y (K) 10 C O N T I N U E DO  1 , 100 2 - 1 2 = L L NN ( I ) = E L S NK  C DO 2 0 I = 1 , 1 0 0 D I P ( I ) = OU ( I ) 20 C O N T I N U E  '  '  C RETURN 30 EETUEN 1 40 FOEMAT ( A l , END  C C C  40A4)  S U B R O U T I N E BWITE (NDU M , I S I Z E ) I N T E G E E * 2 N CUM ( I S I Z E ) WRITE { 19, 10) NDUM • , RETURN 10 FOEMAT ( 5 0 A 1 ) ' END S D E R O U T I N E R E E A E (NNDUM, I S I Z E ) INTEGER NNDUM(ISIZE) READ ( 1 9 , 1 0 ) NNDUM EETUEN 10 FORMAT ( 2 0 A 4 ) END S U B R O U T I N E STRA ( T E M P E R , TK,. PAR) I M P L I C I T R E A L * 8 (A - H,0 - Z) . T H I S R O U T I N E ASSUMES A L I N E A R R E L A T I O N BETWEEN TWO POINTS AND FINDS THE P O I N T S P E C I F I E D BETWEEN THEM. ' D I M E N S I O N TEMPER ( 8 ) , T E ( 8 ) LATA TE /O.ODOO, 2 5 . 0 D 0 0 , 6 0 . 0 D 0 0 , 1 0 0 . 0 D 0 0 , 150.0DOO, 200.0DOO, 1 250.ODOG, 3 0 0 . 0 D 0 0 / • T = TK - 2 . 7 3 1 5 0 D + 0 2 IA A = 0 . IBB = 1 0 0 0 I F (T .GT. TE ( 8 ) ) J = 8 I F (T .GT. T E ( 8 ) ) GO TO 20 I F (T . L T . TE ( 1 ) ) J = 1 I F (T . L T . I E ( 1 ) ) GO TO 20 DC 10 J = 1, 8 I F (T .EQ. TE ( J ) ) GO TO 20 I F . (T . GT. T E ( J ) • AND. I A A . L T . J ) IA A = J I F (T . L T . T E ( J ) . AND. I B B .GT. J ) I B B = J 10 C O N T I N U E • S L O P E = '(TEMPER ( I A A ) - TEMPER ( I B B ) ) / ( T E (IAA) - TE ( I B B ) ) ' A I N T E = TEMPEB ( I A A ) . - S L O P E * TE ( I A A ) PAR = T * S L O P E • A I N T E EETUEN " . • • 20 PAR .= TEMPEB (J) RETURN END SUBBOUTINE T R A N S ( B , I B E T , * ) I M P L I C I T R E A I * 8 (A - H,0 - Z)  DIMENSION B ( 2 0 * 2 0 0 ) , BASIS ( 2 0 , 2 0 ) , TEMP(20) COMMON /PATEAT/ NDX (200,2) , COMPM (20 , 200) , AZERO(200), G H I N ( 2 0 0 ) , 1  2 3 4 5 6  GSO.L(200),  DO 80 I = 1, NC ISW = NDX ( 1 , 2 )  10 20 30 40  GGAS ( 1 0 ) ,  COM PS (2 0, 20 0) , Z ( 2 0 0 ) ,  BR ( 2 0 ) ,  COMPG (20 ,10) , WGHTM (200) , ¥GHTS(200) , WGHTG (10) , GNEUT (4) , . P, T, ADH,' BDH, BDCT, AMH.20, ALMH20, N AM EM (5, 200) , NAMES (2, 200) , NAMEG(5,10), NAMES ( 5 , 2 0 ) , MOA ( 2 0 ) , I S E A C T ( 2 0 ) , NMT, NST,- NC, NGAS, .NET, MAXI, NDLINC, I N I O N , NK NCZ - NC + 1  DO 40 J = 1, GO TO ( 10, . EASTS ( J , I ) GO TO 40 EASTS (J,.I) GO TO 4 0 . EASTS (J,.I) CONTINUE  +1  NC 20, 20, 3 0 ) , I S i ; ; =. COMPS ( J , NDX ( I , 1) ) = COMPM (J,NDX (.1,1) ) =. COMPG ( J , NDX (1,1))  ;  GO TO ( 5 0 , 6 0 , 60, 7 0 ) , ISW BASIS (NCZ,I) = GSOI (NDX (1,1) ) GO TO 80 60 BASIS (NCZ, I j •= GMIN (NDX ( 1 , 1 ) ) GO 1 0 80 70 . BASIS (HCZ,I) = GGAS (NDX ( I , 1)) 80 CONTINUE " . 50  DO 9 0 J = 1, NC BASIS (J ,NC2) = 0 . 0 90 CONTINUE EASTS (NCZ,NCZ) = 1. CALL I N V B T ( E A S I S , NCZ, 5330)' c  DO 100 I = 1, NCZ  e  100  c  ' 1.0D-13) B A S I S ( I , J ) = O.ODOO  DO 110 J = 1, NST COMPS(NCZ,J) = GSOI(J) 1 10 CONTINUE .  .•  DO 160 K = 1 , NST  c c  DO 100 J = 1, NCZ IE (DABS (BASIS ( I , J) ) • LT. CONTINUE  120  DO 120 1 = 1 , NCZ TEMP (I) = 0 . 0  •  ,'  DO 1 4 0 1 = 1 , NCZ  c 130  " •  DO 130 J = 1, NCZ T E M P ( J ) = TEMP(J) + BASIS ( J , I) . CONTINUE  * COMPS (I,K)  "'  .  7  1 J 4  o o Q  o ©  Q O o  o o © o  O  t  o  •  Ui  IS) £3  Ui  o  B w  E  I  EH  EH ro  I Q  CO  o  O  H  i  l  a  n  O  o  *  EH  EH  •—» H  cj  H  %  CM S3  ia  EH  II  ta ©  S3 H S3  o U  H ©  in  o Q  tn  03  «»fe  m  %  Q  •w  ia  H  CQ  cn  Q  Ul  B  O  M  u  cn  H  •—  tJ  o in  «—  r j .  —  o  r*  fe  ra  © S3 M  t n EH U) S3 o  o \ o  ©  ©  u 53 E P4  P- E »—  o Q  S3  » T  fe'  o t  ' fe  ca ©  o  S3 H  CN CN  o.EH u S3 Q U  w  fe  T—  H  O H oo **~ CM S  o o  CM S3 o a> E H i a . EH  ta EH  II  ©  o n  O ©  ta ©  S3 o  S3 M  O  EH'  (N  o u  ©  S3  u  H T—  o  EH  to  II  m  —,  EH •—»  HJ Ui «6 Q  >  u S3  H  CP  » ' **""  E f a CM . H E O  «* ©  *—•  CM  u  H  o  o  oo  o  o o  OV  T—  u  C J  o CN  ««•».  UJ 1! S3  <* UJ  S3  •> ©  t  fc3 ( a — © S3 S3 M H  E-i •  UJ S3 Q  fe  fe  i-3  II  II  tn  ©  o  «6 UJ 53 in M •  — pa  ia  ©  I^M  ro B  © S3 H  ©  CN  CN  EH  CN  O  O  ©  UJ O  U  S3 o u © m  CN  CN  CN C J  CO '  o  •  Q  ia  T—  fe •  •  II-  H  1!  11  ©  ©  H  o in  CM  CN  o'  CN  E  ©  ia  O  fcH  ia  D S3  s M r a EH  fcHS3 O  u  ©  o m  CN  CN  u  u  «-  EH  II  cn  ra ©  S3  H  ' ; EH  S3  o CJ  ©  o  ,  •» r a  |l  r—  ©  ^U J*  .  C-3 H U ~" 53 -CM E  fe  S3  II  H  S3  u  ©  II  U  Cu S3 E U  CS3  fe O  IS]  »  o •  to  CO U S3  «—»  u  r»  U> c n u>  fcH  S  w  <•*'  O U> T—  fcH  CO  ©  u  tsi  •  ©  tn  IH  u - S3 •—" CM Cw B E fa  . * fa  II  H  CN  CS)  t-3  ©  O  N  *—*  r—  EH  ,  t fcH  ,—,  CN  •  CM C-3 B u S3 CM t a E  rs © Pa  o a  O  a.  II  II  1!  u  S3  1-3 .—.  H  II  II  CSJ II  u o  B ^5  II  fe  II  o  u S3  EH  EH  E S3  SN CJ  • IS)  ©  T—  I—I  ia  S3  fcH  —>  C-3  S3  c-3 U S3 S3 "-' CM CM E B ia EH »—'  f  ©  ca  O  EH  EH tJ  ©  •  IU  • ^  II  t-3.  .  •  +  .—.  —•» . » « . IS!  S3 CM pa B EH t —  03  o  th «*  «*  »  S3 pa-  (a  H •  o  H  u  B  H  i  cu c  cu  CM  fcH  Q  •UJ  S3  ca  •  © to U  u  ST,  o  O  CU  o o o o  •-  E CU El  U  ra H  o o o ©  o  vO CN  o  rCN  o Q  CQ ©  —  ia  NKQICO •  si. isawaia.wnwixsw a m a  " D ' .D ************************* ****************D H ' L = • » o n oa * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **#*D D •XIBIYH sHi N I aaaoisaa,aaaso N H n i c e aaaoaa I H I H U M HIYB o t D a a N H i i i a u a s ? v HSAQ s a n i S H . si. asaaAST-v, •« a o a s a a A H i a m ' aoa D 3 A I O S G I o a s ? T ao s a s f f S A N i a H i 16 H o i i Y O i T a r i m n i a aauoT D . - i O d .(s3Di.s¥» i v i i i s s f i a j , aaaao o s ¥ H a n o i i i s n I H I a B Y n o o i D a a a e t t ) s o i i i s o d w o D a a D M ? N s a a a o H U B V- X I S I V W 3 0 H O I S B 3 A H T D -  •  •  '  •  •  HI*'H .•  •  •  .  •  .  '  /  :  D  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****D ei-ao u = m n . ( o z l d i Mos'os) ? N o i s s a w i a  ( Z - O'H - ¥) 8 * 1 ? 3 H i i D n a w i  (*'N ' t ' ) i a A N T aNiiQoaans . ONI d. :as¥ siNaso-dHOD'asa-Hi ' * i s ¥ G S 3 d a a s i l a ' i o H i z ' i i s n u - s i s f e . . a a s 3 H £ a o a i r ' o i aasssa S M N 3 R o a w o 3 3 H £ i t S a s i i n o a 3 s a a A s i woaa a a N a n i a a ' X I B I Y H a v i n D N i S i ) £ ¥ w a o a 0 9 E (ir«s) I Y H S O J - O S E dOIS . a i l N I i N O D 0t?E (g'i=rM tt'i)xas'r}f>aii?H> ( o s e ' 9 ) ' S I I B H (e "Da* ( j * i ) x a H ) a i t S ' t =f.M ( t ' I ) XGIf'r) H 3 H Y K ) (ffSE '9) • 3 E I B B (L * 0 3 * ( Z ' l ) x a H ) 3 1 (z'i=r- (Ct' i ) x a . N ' r ) s 3 K v . i i i ) C O S E ' 9 ) a i i H M Co *Da* ( s ' i ) x a K ) a r DN * I - I 0 tre DO (09E'9) ailfffl t •HffD.M.B Co * I O ' I Z B I ) 3 1 O E E N 3 013 3 . WIT +.Z + DS = M i  J  30HIIN0D '02E 0 = (Z ' K I T + D N ) X • M" = (t 'WET + DS) X Q N •.  • •  ansiisoD ( M ' D sdHOD = ( s n ' r ) a DS 'i = r 0 1 E 03  •  , OLz  D L  + WIT = H I T D  OSE  o i o a (o *oa * (zfr)xa'N  •amf • »  SnSIISOD OOE *0s* ( i ' e ) x a s ) a i . . DN 'L = C 0 0 E 0 0 D iSN  * l = M OSE oa D  •  OOGO'O  =  (ZDS)dW3£  .0 = WIT ansiisoD  ,  ( E t -GO *L  'i l *  OBS  aOR'XIKCO 0 8 2 (ZDN)awai; = ( M ) S V O D ( (ZDN) d H I I ) SfffQ) 3 1 . (l)dW3L  D =  (M.'l)DdWOD  OLZ  3  ***********************,****** *********************^  £ * a wax = ( r ' a ) v . 08 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **** * * * * * * * * * * * * * * * * * * ****D D (S'MIV iff jaiAIT 3 D * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *********D . a w a i = ( r ' M) ? oz. ( r ' a ) ? = (r'X¥Ki) v 08 o o ( x o i "Da" >:) a i (r'xvwi) ¥ '= a w a i *******************************************************************3 • '• • 0 x v H i - a m » SEOS a s N V H o a a i N i D  BOS -HI*X  01  ***************************************************************#***3 ooi O L o o (y 'Da* c) ar N *i = r ooi oa D 3 UK I I SOD 09 •£ * (a*i.) \ f - .= (X'I) ? • N ' l = I 09 o a 0  •  o a o * l - = (M*H) V (H'M) v = (x'xvwr)  (H'XVHI) V / * I = I 05 *******************************************************************D D (M'H) ¥ A3 M08 HI*M B C I I A I O " 3 3  *******************************************************************D XtfHI  =  (H)cTI  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *****D D XVHI a s v . a- SMOS; a o M H D a a i o D D * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *:*****************************D t 'SffQias (wnx * n * (xvwvJsevaJ a i ot? * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *******:**D 3 i i i s ' v i Q & N i s cioa L s a i D 3  ***************************** ********************* *****************3 3QNIIN03 0£ I =•• XVWI HTV = xvwe oz Oe OI OS (XYRV " E T M I ¥ ) I I C ( » i ) «) sava = »r« N ' a n = i OE oa D L + M = dM 01 J  •017  O i  OD  (N  *Da •  a)  ai  H = X9RI ( (M'M) s a v a = xsm * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * * 3 3  •  ZDN  ,  'i = a o i  oa  0*0 = a u i M  ZDN ' i = i oe o a INSNOdRDD EOS 3 A 1 0 S I - DN = L D N ZDN - Mtt = X8 Z + D N = ZDR iRiadi ' H i a r ' a o H i? *id.s £ v s i ' i x i a a K ' (oz) aoffdi ' i x i a a ' i x ' o i ¥ * ( o o z ) i s a a v c ' (ooz) a a s f f * '(ooz)sisv. ' ( u ' o o z ) a x ' ( O O Z ' O Z ) M M o z * o z ) s « z '(OOZ)DO ' ( 0 0 Z ) 3 A S 3 *(0Z)AD0 M 0 0 Z ) A D ' ( t r ' O O Z ) X ' ( O Z ' 00 Z ) 3D t ' (ooz)sa M o z ' o z ) ? ' (ooz'oz)aa '(ooz)sD '(ooz)wo /MEMO/ HOHHOD ' £1X130 I H d I X '£3313 ' I X ' ( O Z ) S ¥ D ¥ ' ( O Z ) S Y D l ? ''(OOZ) d S S Z '(ooz)Nt ' (ooz)Rddx Moz) w i o i ' (ooz'ozJa M O O Z l O U I ' ( O O Z ) 3 ' ( O O Z ) Y T Y M O O Z ) £DY . "(o'OZ>9TI ' ( 0 0 Z ) D '/IDKOOA SOHHOD(SNfiOHXHQ  Z 3 R i S d i a ) * D I 3 S8V3N  D  J  J  1  xti  9  'NO I K I  ' DNT1 GN ' I X V K '1HN 'SYDN 'DM ' I S N 'IWN M 0 Z ) l D V Z H T . . ' ' ( o z ) ¥ O K ' (oz*s)-aaH¥« ' ( o i ' S ) D 3 R Y H * (ooz'z) sa»vir +/ ''(obz-s) uauvH ' Q Z H W T V ' O Z H H S *ioaff ' H O C ' H O Y * I 'a e '(f7)£fi3ND ( 0 L ) ' 9 i H 9 M ' ( 0 0 Z ) SSHDM (0.0'Z) HIHDM ' (01 ' 0 Z > S3 HOD Z ' ( O Z ) S S ' ( O O Z ) Z M O O Z ' O Z ) S 3 R 0 D ' (Ot) S ¥ D 9 ' (OOZ) TOSS I ' ( O O Z ) N I W D ' ( o o z ) o a a z v ' M o o z ' o z ) HdHOD ' (z'ooz) xa's / I \ f a i V d / NOHWOD . (Z - O ' H - ¥ ) 8 * T « a a i T D I l d H I . ( S G N ) A T os. AO 3 ' N i i Q o a a n s . ana .Manias J  S  J  D ao'.Hiinoo 091 D -  aONIINOD I :=• (a'D ¥ (a'D ¥ > ( r ' D ¥ (C'D ¥ = I N ' L = I ot? t 0 0 osi  0*71  0£l  o i O D (a *Da * r) a i (a) 3 1 = r oz MM - H = H IWN ' l = MH 0 5 1 o a  D  i  3 - H = tWS ************************* ************************* ************* ****D 3 3 S H 3 A O 3 H £ H I SaQBO -HR(11.03 8 3 3 0 8 3 aa'OXSia D 3 *******************************************************************D 3 0 H I £ NOD O i l D aOSTLHOO 0 0 1 ' D SfiHIINOD 06 (a'l>¥ * d U 3 £ + ( f ' l ) ? = (C'l)¥ 06 0 £ O D (a *03*' I ) a i t  *********************************** 8CT  saoa  aaHio  wo aa  ROE H i * a  U ' i - 'I 06 OQ  sawix  (a'r)¥ i D s a i a a s  D D  10 20 30  40 50  ATEMP = ATEMP + WS ( I , K) •* CV (K) CONTINUE DO 2 0 K = 1, NX AT EBP '•= ATE HP + « (.I,K) * CV (NC2 + K) CONTINUE X D { I , N D S ) = ATEMP CONTINUE S O L V E FOR fiEMAINING UNKNOWNS DO 50 J ,= 1, NX ATEMP = 0.0 > DO 40 I = 1, NC2 • ATEMP = ATEMP + C C ( J , I ) * X D ( I , N D S ) CONTINUE X D { N C 2 + 3 , NDS.) •=. C.V-(H'C2 +.3) - ATEMP CONTINUE ' RETURN ,-. , ' • ' END SUBROUTINE. S T E P T A K E S D E L X I S T E P FOB AQUEOUS S P E C I E S I M P L I C I T R E AL * 8 (A - H,0 - Z) COMMON /PAT DAT/ NDX { 2 0 0 , 2) , COM PM ( 2 0 , 200) , A Z E B O ( 2 0 0 ) , GMIN{200). GSOL ( 2 0 0 ) , GGAS (10). COMPS ( 2 0 , 20 0) , Z ( 2 0 0 ) , SR.(20) , COMPG ( 2 0 , 10) , W G H T M ( 2 0 0 ) , W G H T S { 2 0 0 ) , WGHTG-(IO), GNEUT (4) P , T , ADH, BDH, BDOT, AHH20, A.LBH20, NAMES ( 5 , 2 0 0 ) , NAMES ( 2 , 2 0 0 ) , NAMEG ( 5 , 1 0) , NAMER ( 5 , 20) , MOA (20) , I R E A C T (20) , NMT, NST,. N C N G A S , NRT, M A X I , N D L I N C , I N I O N , NK ' COMMON /CON.CT/ G ( 2 0 0 ) , ALG (200)', A C T ( 2 0 0 ) , ALA ( 2 0 0 ) , C (200) , A L C ( 2 0 0 ) , B ( 2 0 , 2 0 0 ) , TOTM ( 2 0 ) , XPPM (200) , TN (200) , GSP (2 00) , ALGAS (20 ) ., AGAS (20) , X I , ' E L E C T , X I P R T D, E L X I T COMMON / C A R S A Y / Q M ( 2 0 0 ) , QS ( 2 0 0 ) , BB ( 2 0 , 2 0 0 ) ' , A ( 2 0 , 2 0 ) , DN{200) , CC ( 2 0 0 , 2 0 ) , X ( 2 0 0 , 4) , C V { 2 0 0 ) , U C V { 2 0 ) , C S V E (200) ,.'DC (200) W S ( 2 0 , 2 0 ) ' , W ( 2 0 , 2 0 0 ) , X D { 2 0 0 , 4 ) , ASYS.{200) AM ADE (200) ADEST {200) , A 1 G , X L , D E L X I , I P R O D ( 2 0 ) , N D E L X I , I S A T , NPT NOD, I F I N , I P R I N T • NC2 = N C + 2 NC 1 = NC - 1 SX = NK - NC2 DO .20 I = 1 , NC 1 K = NDX ( I , 1) ' IF.' (NDX ( 1 , 2 ) . NE. 0) GO TO 20 CALL. MOVST (ATEMP, J ) C ( K ) '••= C S V E ( K ) + ATEMP I F (C (K) . L T , O.ODOO) GO TO 4 0 A L C (K) = DLOG10 (C (K) ) CONTINUE DO 3 0 I I = 1, NX K = NDX ( I I * NC, 1) I = NC 2 + I I •; -.';.'. C A L L MOVST (ATEMP, I ) C (K) = CSVE (K) + ATEMP I F (C (K) . L I . O.ODOO) G O T O 40 I F ( C ( K ) . I Q . O.ODOO) C A L L SPEC.LG (K) I F ( C ( K ) .GT. O.ODOO) ALC (K) = DLOG10 ( C ( K ) ) CONTINUE C A L L M O V S T ( A T E M P , NC2) ACT (NDX ( N C , 1) ) = C S V E (NST * 1) + ATEMP r  10  20 .  :  30  13 9  I F (ACT (NDX (NC, 1) ) . I T . O.ODOO) GO TO 40 ALA (NDX (NC, 1) ) = D.IOG 1 0 (ACT (NDX (NC, 1) ) ) CALL MOVST (ATEMP, NC) AMH20 = CSVE (NST + 2) + ATEMP I E (AMH20 .LT. O.ODOO) GO TO 40 ALMH20 = DLOG10(AMH2C) EETUEN 40 DELXI = DELXI / 10.0DO0 GO TO 10 END SUBROUTINE DEBIV ROUTINE TO CONVERT LOG DERIV. TO DERIV. I M P L I C I T RE AL*8(A - H,0 - Z) COMMON /PAT DAT/ N C X { 2 0 0 , 2 ) , COMPM (20, 200) , , AZERO (200) , G M I N ( 2 0 0 ) , 1 GSOL(2O0), GGAS ( 1 0 ) , COMPS (20, 200) , Z ( 2 0 0 ) , R R ( 2 0 ) , 2 COMPG (20 , 10) , WGHTM ( 2 0 0 ) , WGHTS(200), WGHTG ( 1 0 ) , GNEUT ( 4 ) , 3 P, T, ADH, 'BDH, BDOT, AMH20, ALMH20, NAflEM (5, 200) , 4 NAMES (2, 200) , NAMEG ( 5, 1 0) , HAHEB(5,20), MOA (20) , 5 I R E A C T ( 2 0 ) , NMT, NST, NC, NGAS, NRT, MAXI, NDLINC, IN ION, 6 NK COMMON /CONCT/ G (200) , ALG (200), ACT (200), ALA ( 2 0 0 ) , C (20.0) , . 1" ALC (200) , B (20,200) , TOTM (20) , X P P M ( 2 0 0 ) , T N ( 2 0 0 ) , 2. G S P ( 2 0 0 ) , A L G A S { 2 0 ) , AGAS (20) , X I , ELECT, XIPRT, DELXIT COMMON /CARRAY/ QM(200), QS (200) , B B { 2 0 , 2 0 0 ) , A ( 2 0 , 2 0 ) , DN (200) , 1 CC(200,20), X(200,,4), CV.(200), U C V ( 2 0 ) , C S V E ( 2 0 0 ) , DC (200) 2 WS(20,20), W(20,2OO), X D ( 2 0 0 , 4 ) , ASYS (200.), A MADE (200) , 3 A D E S T ( 2 0 0 ) , A10, X L , D E L X I , I P B O D ( 2 0 ) , NDELXI, ISAT, NPT, 4 NOD, I J I N , I P R I N T NC2 = NC *• 2 NC1 = NC - 1 NX = NK - NC2 DO 50 J = 1, NOD AJ = J DO 20 I = 1, NC 1 K- •= NDX (1,1) IE (NDX (1,2) .NE. 0) GO TO 10 CALL DTLGD (C (K) , I , J) , GO TO 20 10 X ( I , J) = XD ( I , J ) 20 CONTINUE .. ' DO 30 I I = 1, NX K = NDX (NC * I I , 1) ' , I = NC2 + I I CALL DTLGD (C (K.) , I , J ) 30 CONTINUE X (NC + 1, J) = XD (MC + 1 ,J) I = NC CALL DTLGD(AMH20, I , J ) 40. I = NC 2 C A L L DTLG.D (ACT (NDX (NC,1) ) , I , J) 50 CONTINUE ' EETUEN END ' SUBROUTINE MOVST (ATEMP, I ) I B I L I C I T EE AL*8 (A - H,0 - Z) COMMON /PATEAT/ NDX (200, 2 ) , COMPM (20,200) , AZERO (200) , G M I N ( 2 0 0 ) , 1 GSOL ( 2 0 0 ) , GGAS ( 10) , COM PS (20, 20 0) , Z { 2 0 0 ) , R R ( 2 0 ) , 1  C O M P G { 2 0 , 10} , WGHTM ( 2 0 0 ) , WGHTS ( 2 0 0 ) , WGHTG ( 10) , JNEUT (4) P, T, A D H , B D H , BDOT, AMH20, A.LMH 2 0 , NAMEM ( 5 , 200) NAMES ( 2 , 200) , N A M E G ( 5 , 1 0 ) . NAMES ( 5 , 2 0 ) , MOA{20) I R E A C I ( 2 0 ) , NMT, N S T , NC, NGAS, N R T , M A X I , N D L I N C , I N I O N NK COMMON /CONCT/ G ( 2 0 0 ) , A L G ( 2 0 0 ) , ACT ( 2 0 0 ) , ALA ( 2 0 0 ) , C ( 2 0 0 ) ALC ( 2 0 0 ) , B ( 2 0 , 2 0 0 ) , TOTM (20) , X P P M ( 2 0 0 ) , TN(200) GSP ( 2 0 0 ) , A L G A S ( 2 0 ) , AGAS (20) , X I , E L E C T , X.IPBT, D E L X I T COMMON / C A S E Vi/ Q M ( 2 0 0 ) , QS ( 2 0 0 ) , B B ( 2 0 , 2 0 0 ) A ( 2 0 ,20) , DN (200) , CC ( 2 0 0 , 2 0 ) , X ( 2 0 0 , 4 ) , C V { 2 0 0 ) , 0 C V - ( 2 0 ) , C S V E ( 2 0 0 ) , DC ( 2 0 0 ) , W S ( 2 0 , 2 0 ) , W ( 2 0 , 2 0 0 ) , X D ( 2 0 0 , 4 ) , A S Y S ( 2 0 0 ) , AMADE ( 2 0 0 ) , ADEST (200) , A 1 0 , X L , D E L X I , I P B Q D ( 2 0 ) , N D E L X I , I S A T , N P T , NOD, I f . I N , I P E I N T ATEMP = O.ODOO AN = 1.0DOO DO 2 0 J = 1, NOD AJ = J AN = AN * A J ETEMP = X ( I , J ) DO 10 I I = 1, J ETEMP = ETEMP * D E L X I 10 CONTINUE ATEMP = ATEMP + BTEMP / A N 20 C O N T I N U E RETURN END SUBROUTINE C T L G D J X X X , I , J ) I K E L I C I T R E A L * 8 ( A - H,0 - Z) COMMON / P A T D f l T / NDX ( 2 0 0 , 2 ) , COMPM ( 2 0 , 2 0 0 ) , A Z E E O ( 2 0 0 ) , G M I N ( 2 0 0 ) , 1 GSOL ( 2 0 0 ) , GGAS ( 1 0 ) , COMPS ( 2 0 , 2 0 0 ) , Z ( 2 0 0 ) , BR (20) , 2 COMPG (20 , 10) , WGHTM ( 2 0 0 ) , WGHTS ( 2 0 0 ) , WGHTG ( 1 0 ) , GNEOT (4) , 3 P, T, ADH, B D H , BDOT, AMH20, A L M H 2 0 , NAMEM ( 5 , 2 0 0 ) , 4 NAMES ( 2 , 2 0 0 ) , NAMEG ( 5 , 1 0 ) , NAMES ( 5 , 20) , M O A ( 2 0 ) , 5 I R E A C T ( 2 0 ) , NMT, N S T , NC, NGAS, NRT, M A X I , N D L I N C , I N I O N , 6 NK COMMON /CONCT/ G ( 2 0 0 ) , ALG ( 2 0 0 ) , ACT ( 2 0 0 ) , ALA ( 2 0 0 ) , C ( 2 0 0 ) , 1 ALC ( 2 0 0 ) , B ( 2 0 , 2 0 0 ) , TOTM (20) , X P P M ( 2 0 0 ) , T N ( 2 0 0 ) , 2 GSP ( 2 0 0 ) , A L G A S ( 2 0 ) , A G A S ( 2 0 ) , X I , E L E C T , X I P E T , D E L X I T COMMON / C A R E A Y / Q M ( 2 0 0 ) , QS ( 2 0 0 ) , B B ( 2 O , 2 0 0 ) , 5 ( 2 0 , 2 0 ) , DN (200) , 1 C C ( 2 0 O , 2 O ) , X ( 2 0 0 , 4 ) , CV ( 2 0 0 ) , UCV (20) , C S V E { 2 0 0 ) , D C ( 2 0 0 ) 2 WS ( 2 0 , 2 0 ) , W ( 2 0 , 2 0 0 ) , X D < 2 0 0 , 4 ) , A S Y S ( 2 0 0 ) , AMADE ( 2 0 0 ) , 3 ADEST ( 2 0 0 ) , A 1 0 , X L , D E L X I , I P E O D ( 2 0 ) , N D E L X I , I S A T , N P T , 4 NOB, I F I N , I P E I N T ATEMP = XXX * XD ( I , 1 ) AJ = J I E { ( J - 1) , EQ. 0.0 .AND. X D ( I , 1 ) . EQ. 0.0) GO TO 10 ATEMP = ATEMP * ( X D ( I , 1 ) * * ( J - 1 ) ) 10 X ( . I , J ) = ATEMP I P ( J . L E . 1) GO TO 5 0 ATEMP = XXX * XD ( 1 , 2 ) BTEMP = A J * ( A J - 1.0D00) / 2 . 0 D 0 0 I F ( ( J - 2) .EQ. 0.0 .AND. X D ( I , 1 ) . EQ. 0.0) GO TO 20 ATEMP = ATEMP * ETEMP * ( X D ( I , 1 ) * * ( J - 2 ) ) GO TO 30 20 ATEMP = ATEMP * BTEMP 30 X ( I , J ) = X (I» J) + ATEMP I F ( J . L E . 2) GO TO 5 0  141  ATEMP = XXX *. XD ( 1 / 3 ) I F ( ( J - 3) . EQ. 0.0 ..AND. X D ( I , 1 ) . EQ. 0.0) GO TO 4 0 ATEMP =• ATEMP * (XD { I , 1) * * ( J - 3) ) 40 ETEMP = A J * ( A J - 1.0DOO) * ( A J - 2.OD00) / 6.GD00 X ( I , J ) = X ( I , J ) + BTEM P * ATEMP. I F ( J . L E . 3) GO TO 5 0 AT EM P = ' X X X * XD ( 1 , 2 ) ATEMP = ATEMP * X D ( I , 2 ) BTEMP = A J .* ( A J - 1.0D00) * ( A J - 2 . 0 D 0 0 ) * ( A J - 3.0D00) / 10100 x d , J ) = X ( I , J ) * BTEMP * ATEMP ETEMP = BTEMP / 3 . 0 D 0 0 ATEMP = XXX * XD ( 1 , 4 ) • ' X ( I , J ) = X ( I , J ) + ATEMP * ETEMP 50 EETUFN END S U B R O U T I N E JUMP I M P L I C I T EE AL*8 (A - H,0 " Z) AZERO (200) , G M I N ( 2 0 0 ) , COMMON /P-ATEAT/ NDX ( 2 0 0 , 2 ) COMPM ( 2 0 , 2 0 0 ) 1 AS S( f1 l0 O )) , COMPS COMPS ((2200,,2200 0 ) , Z ( 2 0 0 ) , R R ( 2 0 ) , GG SS OO LL ({ 22 00 00 )) ,, GG G GA 2 COM PG (20 , 1 0) , WGHTM ( 2 0 0 ) , WGHTS ( 2 0 0 ) , WGHTG ( 1 0 ) , GNEUT ( 4 ) , . 3 P, T, ADH, BD H, BOOT, AMH20, A L M H 2 0 , NAMEM ( 5 , 200) , 4 NAMES ( 2 , 200) , N A M E G ( 5 , 1 0 ) , NAMEB ( 5 , 2 0 ) , MOA (20)., 5 I R E A C T ( 2 0 ) , NMT, N S T , NC, NGAS, NBT, M A X I , N D L I N C , I N I O N , 6 NK COMMON /CONCT/ 6 ( 2 0 0 ) , ALG ( 2 0 0 ) , A C T ( 2 0 0 ) , ALA (200) , 'C (200) , 1 A L C ( 2 0 0 ) , B ( 2 0 , 2 0 0 ) , TOTM ( 2 0 ) , X P P M ( 2 0 0 ) , T N { 2 0 0 ) , ,2 G S P ( 2 0 0 ) , A L G A S ( 2 0 ) , AGAS (20) , X I , E L E C T , X I P R T , D E L X I T COMMON /C ARRAY/ QM ( 2 0 0 ) , QS ( 2 0 0 ) , B B ( 2 0 , 2 0 0 ) , A ( 2 0 , 2 0 ) , DN (200) , 1 CC ( 2 0 0 , 2 0 ) ' , X ( 2 0 0 , 4 ) , CV (200) , U C V ( 2 0 ) , C S V E ( 2 0 . 0 ) , DC<200) 2 W S { 2 0 , 2 0 ) , W ( 2 0 , 2 0 0 ) , X D ( 2 0 0 , 4 ) , A S Y S ( 2 0 0 ) , AMADE (200) , 3 ADEST (200):, A 1 0 ^ X L , D E L X I , I PROD (20) , N D E L X I , I S A T , N P T , 4-NOD, I F I N , I P R I N T D I M E N S I O N SK ( 2 0 0 ) NC2 = .NC + 2 NC1 = NC - 1 '; ' . NX = NK - NC2 DO 10 I - 1 , NST SK ( I ) = QS ( I ) 10 C O N T I N U E 20 C A L L S T E P • . C A L L X I C A L C (C, Z, E L E C T , NST, X I ) C A L L GAMMA ( X I , ADH,' BDH, BDOT, NST, NC, AZERO, Z, GNEUT, G, C, 1 ACT, NDX, X L , ALG) CALL ACTIV • II. = 0 , " DO 3.0 !•'=. 1 , NST ATEMP = CAES (QS ( I ) - SK ( I ) ) ' I F (ATEMP .GT. 5..0D-5) GO TO 40 IF', (ATEMP . L T . 5.0D-6) I I =' I I + 1 30 C O N T I N U E GO TO 5 0 40 D E L X I = D E L X I / 10.0DQ0 ' GO TO 20 50 C O N T I N U E I F ( I I .NE. NST) GO TO 60 DELXI = DELXI * 2i0D00 N  :  GO TO 2 0 CONTINUE DC 8 0 1 = 1 , NC1 I F (NDX (1,2) .EQ. 0 . 0 8 . NDX (1/2) . EQ. 3) GO TO 80 K = NDX (1,1) IK = I C A L L MO VST (ATEMP,. I ) I F ( ( A S Y S ( K ) + ATEMP) . I T . O.ODOO) GO. TO 90 80 C O N T I N U E GO TO 1 10 90 D E L X I = D E L X I / 2..0D00 CIV = D E L X I 100 D I V = D I V / 2 i 0 D 0 0 CALL STEP C A L L X I C A L C ( C , Z, E L E C T , NST, X I ) C A L L GAMMA ( X I , ADH, BDH, BDOT, N S T , S C , AZEBO, Z, GNEUT, G-, C, 1 ACT, NDX, X L , A L G ) CALL ACTIV C A L L MOVST ( ATEMP,' I K ) BTEMP = A S Y S ( K ) • ATEMP I F ( L A B S ( B T E M P ) . L T . 1.0D-12 .AND. BTEMP..GT. O.ODOO) 1 GO TO 70 I F (ETEMP . L T . O.ODOO) D E L X I = D E L X I - D I V I F (BTEMP . GT. O.ODOO) D E L X I = D E L X I + D I V GO TO 100 110 C O N T I N U E DO 1 3 0 I = 1, NET. • K = IEEACT (I) BTEMP = A S Y S ( K ) - BS ( I ) * D E L X I I F (BTEMP . L T . 0 . 0 D 0 0 ) GO TO 120 GO TO 130 120 DELXI = ASYS(K) / EE (I) 130 C O N T I N U E BTEMP = DLOG 1 0 ( D E L X I T + D E L X I ) I F (BTEMP .GT. X I P R T ) I P E I N T = 1 I F (ETEMP .GT. X I P E T ) D E L X I = ( 1 0 . 0 D 0 0 * * ( X I P E T ) ) - D E L X I T I F (BTEMP. . GT. X I P E T ) X I P B T = X I P E T + .2 5D00 C A L L STEP C A L L X I C A L C ( C , Z, E L E C T , NST, X I ) C A L L G A M M A ( X I , ADH, BDH, BDOT, NST, NC, AZEEO, Z, GNEUT, 1 A C T , NNDDXX,, X L , A L G ) ACT, C ALL A C T I V EETUEN E KD S U B E O D T I N E D I ( A T E M P , NDT) ' . I M P L I C I T S E A L * 8 ( A - H,0 - Z) COMMON / P AT D AT/ N DX { 20 0 , 2) , COMPM (20 , 20 0) , A Z E E O ( 2 0 0 ) , G M I N ( 2 0 0 ) 1 GSOL (2.00) , GGAS ( 1 0 ) , COM PS (20 , 20 0 ) , Z ( 2 0 0 ) , RB (20) , 2 COMPG ( 2 0 , 10) , WGHTM ( 2 0 0 ) , WGHTS ( 2 0 0 ) , WGHTG ( 1 0 ) , GNEUT (4) 3 P, T, ADH, B D H , BDOT, AMH20, A L M H 2 0 , NAMEM ( 5 , 2 0 0 ) , 4 NAMES ( 2 , 2 0 0 ) , NAMEG ( 5 , 10) , NAMES ( 5 , 2 0 ) , BOA (20),. 5 i a E A C T ( 2 0 ) , NMT, N S T , NC, NGAS, NET, M A X I , N D L I N C , I N I O N , 6 NK COMMON /CONCT/ G ( 2 0 0 ) , ALG ( 2 0 0 ) , ACT ( 2 0 0 ) , ALA ( 2 0 0 ) , C (200) , 1 ALC (200) , E ( 2 0 , 2 0 0 ) , TGTM (20) , X P P M (200) , T N ( 2 0 0 ) , 2 G S P ( 2 0 0 ) , A L G A S (20) , AGAS (20) , X I , E L E C T , X I P E T , D E L X I T COMMON / C A R E AY/ Q M ( 2 0 0 ) , Q S ( 2 0 0 ) , B B ( 2 0 , 2 0 0 ) , 4(20 ,20), D N ( 2 0 0 ) , 60 70  1 2 3 4  10  20  30 40 -  '  50  60  70  0 0 ( 2 0 0 , 2 0 ) , X ( 2 0 0 , 4 ) , CV (200) , U C V ( 2 0 ) , C S V E ( 2 0 0 ) , DC ( 2 0 0 ) WS ( 2 0 , 2 0 ) , W ( 2 0 , 2 0 0 ) , XD ( 2 0 0 , 4 ) , ASYS (200) , AHADE (200)', ADEST ( 2 0 0 ) , A 1 0 , X I , D E L X I , I P E O D ( 2 0 ) , N D E L X I , I S A T , NPT, NOD, I F I N , I P E I N T NC 2 =.NC +2 NX = NK - NC2 NC 1 - NC - 1 A J = NDT A J 1 = A J * ( A J - 1.0D00) / 4.0D00 ATEMP = O.ODOO DO 4 0 I = 1, NC1 I F (NDX (.1,2) '.NE. 0) GO TO 40 K = NDX ( 1 , 1 ) I F ( D A B S ( Z ( K ) ) . L T . 1.0D-5 . OR. Z ( K ) . GT. 9. 99D00) 1 GO TO 40 Z2 = Z (K) * Z (K) * C (K) BTEMP = Z2 * XD ( I , 1) BTEMP = BTEMP * XD ( I , 1) I F ((NDT - 2) .EQ. 0.0 .AND. X D ( I , 1 ) .EQ. 0.0) GO TO.10 BTEMP = BTEMP * (XD ( I , 1) ** (NDT - 2 ) ) ATEMP = ATEMP • BTEMP / 2. 0D00 I F (NDT . L E . 2) GO TO 40 ETEMP = A J 1 * Z2 * X D ( 1 , 2 ) I F ( (NDT — 2) . EQ. 0.0 .AND. XD ( 1 , 1 ) . EQ. 0.0) GO TO 20 BTEMP = BTEMP * (XD ( 1 , 1 ) * * ( N D T - 2 ) ) ATEMP - ATEMP + BTEM E I F (NDT . L F . 3) GO TO 4 0 BTEMP = 2.0DOO * Z 2 *' X D ( I , 3 ) I F ( (NDT - ' 3 ) .EQ: 0.0 .AND. X D ( I , 1) . EQ. 0.0) GO TO 30 , ETEMP = ETEMP •* (XD ( I , 1) ** (NDT - 3 ) ) ATEMP = ATEMP + BTEMP . BTEMP = 3.0.D00 * XD ( 1 , 2 ) * (XD (1,2) *Z2) ATEMP = ATEMP + BTEMP / 2.0D00 CONTINUE DC 8 0 I I = 1, NX , K = NDX ( I I + NC,1) I = I I + NC 2 I F ( D A B S ( Z ( K J ) . L T . 1.0D-5 .OR. Z ( K ) . GT. 9.99D00) 1 GO TO 8 0 /' . • ' ' Z2 = Z (K) * Z (K) * C (K) BTEMP = Z 2 * 'XD ( 1 , 1 ) - ' ' BTEMP = BTEMP * X.D(I,1).. • '. I F ( (NDT - 2) . EQ. 0.0 .AND. X D ( I , 1 ) . EQ,. 0.0) GO TO 5 0 BTEMP = BTEMP * (XD ( 1 , 1 ) ** (NDT - 2 ) ) ' . AT E MP = ATE BP' + BTEMP / 2. 0D00 '. I F (NDT . L E . 2) GO TO 80 BTEMP = A J 1 * Z2 * X D ( I , 2 ) . I F .((NDT ~ 2) .EQ. .0,0 .AND. X D ( I , 1 ) . EQ. 0.0) GO TO 6 0 ETEMP = BTEMP * ( X D ( I , 1 ) * * ( N D T - 2 ) ) . ATEMP = ATEMP + BTEMP I F .(NDT . L E . 3) GO TO 8 0 BTEMP = 2 . 0 D 0 0 * Z 2 * X D ( I , 3 ) I F ((NDT - 3) .EQ. .0.0 .AND. X D ( I , 1 ) . EQ. 0.0) GO TO 7 0 ETEMP = BTEMP * (XD ( I , 1) ** (NDT - 3 ) ) ATEMP = ATEMP + BTEMP ETEMP = 3.0D00 * X D ( I , 2 ) * ( X D ( I , 2 ) * Z 2 ) ATEMP = ATEMP *• BTEMP / 2.OD00  80  c c c  CONTINUE RETURN END SUERCUTTNE SECOND  145 SECOND  DERIVATIVE  I M P L I C I T E E A L * 8 ( A - H,0 - Z) COMMON / P A T D A T / N D X ( 2 0 0 , 2 ) COMPM (20,200) , A Z E R O ( 2 0 0 ) , G M I N ( 2 0 0 ) , COMPS ( 2 0 , 200) , •Z (200) , ER (20) , GSOL ( 2 0 0 ) , GGAS ( 1 0 ) COMPG ( 2 0 , 10) , WGHTM ( 2 0 0 ) , WGHTS ( 2 0 0 ) , WGHTG {1 0') , GNEUT (4) , P, T, ADH, BDH, BDOT, AMH2G, A L M H 2 0 , N A M E M ( 5 , 2 0 0 ) , NAMES ( 2 , 2 0 0 ) , NAMEG ( 5 , 1 0 ) , NAMES ( 5 , 2 0 ) , MOA (20) , I R E A C T ( 2 0 ) , NMT, N S T , NC, NGAS, N E T , M A X I , N D L I N C , I N I O N , NK " ' COMMON /CONCT/ G ( 2 0 0 ) , ALG ( 2 0 0 ) , ACT (200)-, ALA ( 2 0 0 ) , C (200) , ALC ( 2 0 0 ) , B ( 2 0 , 2 0 0 ) , TOTM ( 2 0 ) , XPPM ( 2 0 0 ) , TN (200) , G S P ( 2 0 0 ) , A L G A S ( 2 0 ) , AGAS (20) , X I , E L E C T , X I P E T , D E L X I T COMMON /C ARE AY/ Q M ( 2 0 0 ) , QS ( 2 0 0 ) , B B ( 2 0 , 2 0 0 ) , A (20 , 2 0 ) , DN (200) , C C ( 2 0 0 , 2 0 ) , X ( 2 0 0 , 4 ) , C V ( 2 0 0 ) , U C V ( 2 0 ) , C S V E ( 2 0 0 ) , DC ( 2 0 0 ) , W S ( 2 0 , 2 0 ) , H(20,200), X D { 2 0 0 , 4 ) , ASYS (200)., AMADE (200) , ADEST (200), A 1 0 , X L , D E L X I , I P E O D ( 2 0 ) , N D E L X I , I S A T , N P T , . " NOB, I F I N , I P E I N T NC2 = NC *• 2 NX = NK - NC2 NCI = NC - 1 NDT = 2 C A L L DI (ATEMP, NDT) CV (NC + 1) = ATEMP CTEEM = O.ODOO SECOND D E E I Y . MASS B A L A N C E DC 4 0 J = 1, NC ATEEM = O.ODOO ETEEM = O.ODOO CTEEM = O.ODOO DTEEM = O.ODOO I F ( J .EQ. NC) GO TO 20 K = NDX ( J , 1) I F ( N D X ( J , 2 ) . NE. . 0) GO TO . 10 ATEEM = - (C (K) *XD ( J ,1)) * X D (3 , 1) BTERM = - C ( K ) * X D ( J GO TO 2 0 10 CTEEM = XD ( J , 1) CONTINUE 20 DO 3 0 I I = 1, NX I = I I + NC 2 K = NDX (NC + I I , 1) I F (DABS (B ( J ,11) ) . L T . 1.0D-13) GO TO 30 ATEEM = ATERM - E ( J , I I ) * (C (K) * X D ( I , 1) ) * XD ( I , 1) ETEEM = ETERM - B ( J , I I ) * C (K) * XD ( I , 1) CONTINUE 30 BTERM = BTEEM * X D ( N C , 1 ) CTEBM '= CTEEM * X D ( N C , 1 ) / (. 0 1801 534D00*AMH2O) DTEEM •= -DCV ( J ) * X D ( N C , 1) / (. 0 1 8 0 1534.D00*AMH2O) CV (J) = ATEEM * BTERM + CTEEM + DTEEM. 40 C O N T I N U E DG 5 0 I = 1 , NST  50  60  70  80  90  B.N ( I ) = O.ODOO I F (DABS (Z ( I ) ) . L T . 1.0D-5 . OB. Z ( I ) .GT. 9.99D00) 1 GO TO 5 0 X I D = X I * * ( 1 . 0 D 0 0 / 2 . ODOO) •DN ( I ) = ADH * 2 ( 1 ) * 2 ( 1 ) * ( 1 . OD0 0 + 3. ODOO*AZERO ( I ) * BDH* X I D ) • D N ( I ) = D N ( I ) / ( 4 . ODOO* ( X I * * (3 . 0D0 0/2 . ODOO) ) * ( ( 1. 0 D 0 0 + A Z E B O ( I ) 1 EDH*XID) **3) ) DN ( I ) = A 10 * DN ( I ) CONTINUE ATEEH = O.ODOO BTERM = O.ODOO CTEEM = O.ODOO DC 6 0 1 = 1, NC1 I F (N DX ( 1 , 2 ) . NE. 0) GO TO 6 0 K = NDX ( 1 , 1 ) , ATEEM = ATEEM - C ( K ) , * DN (K), ETEEM = ETEEM - (C (K) *XD ( 1 , 1) ) * X D ( I , 1 ) CTEEM = CTEEM - (C (K) *XD ( 1 , 1) ) * D C ( K ) CONTINUE DC 7 0 I I ' = 1, NX K = NDX (NC + I I , 1) I = NC2 + I I ATEEM = ATERM - C ( K ) * DN (K) BTERM = BTERM - (C (K) *XD ( 1 , 1 ) ) * XD ( I , 1) CTEEM = CTEEM - (C (K) *XD ( 1 , 1) ) * DC (K) CONTINUE ..... ATEEM •= (ATERM*.Q 180 1 5 3 4 D 0 0 * X D (NC ' • 1 , 1 ) ) * X.D(NC + 1,1) ETEEM = BTEBM * . 0 1 8 0 1534D0O CTEEM = CTEEM * .-01801534DGO * XD (NC + 1,1) C V ( N C 2 ) = ATEEM. + BTERM + CTEEM DC 9 0 I I = 1, NX • •-. • K = NDX (NC *> I I , 1) I = NC2 + I I ATEEM = -EN (K) DO 80 J = 1 , NC 1 I F (NDX ( J , 2 ) . NE. 0) GO TO 8 0 L '•= NDX ( J , 1) I F (DAES (B ( J , . I I ) ) . L T , 1.0D-13) GO TO 80 ATEEM = ATEEM • B ( J , I I ) * DN (L) CONTINUE ATEEM = ATEEM * XD (NC + 1,1) * XD(NC•+ 1,1) CV ( I ) = ATEEM CONTINUE NDS = 2 C A L L C V S O L V (NDS) EETUEN . END SDEBOUTINE T E I B D . T H I R D DEE IV A T I V E I M P L I C I T EE AL*8 (A - H,0 - Z) COMMON /P ATE AT/ N D X ( 2 G 0 , 2 ) , COM PM (20 , 20 0) , A Z E E O ( 2 0 0 ) , G M I N ( 2 0 0 ) , 1 GSOL ( 2 0 0 ) , GGAS ( 1 0 ) , COMPS ( 2 0 , 2 0 0 ) , Z (200) , RE ( 2 0 ) , 2 COMPG ( 2 0 , 10) , WGHTM (20 0) , W G H T S ( 2 0 0 ) , WGHTG ( 1 0 ) , GNEUT (4) , 3 P , T, ADH, B D H , BDOT, AMH20, A L M H 2 0 , NAMEM ( 5 , 200) , 4 NAMES ( 2 , 2 0 0 ) , N A M E G ( 5 , 1 0 ) , NAB EB (5 , 20) , M O A ( 2 0 ) ,  I R E A C T - ( 2 0 ) , NMT, N S T , NC, NGAS, N E T , M A X I , N D L I N C , I N I O N , NK COMMON /CGNCT/ G ( 2 0 0 ) , ALG ( 2 0 0 ) , A C T ( 2 0 0 ) , A L A ( 2 0 0 ) , C (200) , ALC ( 2 0 0 ) , E ( 2 0 , 2 0 0 ) , TOTM (20) , X P P M ( 2 0 0 ) , T N ( 2 0 0 ) , G S P ( 2 0 0 ) , ALGAS ( 2 0 ) , AGAS (20) , X I , E L E C T , X I P R T , D E L X I T COMMON /C ARE AY/ Q M ( 2 0 0 ) , QS ( 2 0 0 ) , B B ( 2 0 , 2 0 0 ) , A ( 2 0 , 2 0 ) , DN (200) , C C ( 2 0 0 , 2 0 ) , X ( 2 0 0 , 4 ) , C V ( 2 0 0 ) , D C V ( 2 0 ) , C S V E ( 2 0 0 ) , DC (200) WS ( 2 0 , 2 0 ) , W ( 2 0 , 2 0 0 ) , XD ( 2 0 0 , 4 ) , ASYS ( 2 0 0 ) , A MADE(200) , ADEST (200) A 1 0 , XL, D E L X I , I P R O D ( 2 0 ) , N D E L X I , I S A T , N P T , NOD, I F I N , I P R I N T NC2 = NC + 2 NC1 = NC — 1 NX .= NK - NC2 NET = 3 , C A L L D I ( A T E M P , NDT) C V ( N C + 1) = ATEMP DO 4 0 J = 1 , NO E1 = O.ODOO B2 = 0.0D00 ' B3 O.ODOO B4 = O.ODOO E5 •= 0. 0 D 0 0 . . 86 = O.ODOO B7 = O.ODOO B8 = O.ODOO • I F ( J . EQ.'. NC) GO TO 20 K = NDX ( 0 , 1 ) ' I F (NDX ( 0 , 2 ) . NE. 0) GO TO 10 B1 =;'- (C (K) *XD ( 0 , 1 ) ) * X D ( J , 1 ) * XD ( J , 1) E2 = - ( C ( K ) * X D ( 0 , 1 ) ) * XD ( 0 , 2 ) £3 = - ( C ( K ) *XD ( J , 1) ) E4 = - (C ( K ) * X D ( 0 , 1) ) * XD ( 0 , 1) E5 = -C (K) * XD ( J , 2) GO TO 2 0 10 B6 = 2.0DOO * X D ( J , 2 ) E7 .= XD ( J , 1) - OCV ( J ) E8 = - 8 7 20 CONTINUE DO 30 I I = 1, NX I = I I + NC2 K = NDX (NC + I I , 1,) I F (DABS (B ( 0 , 1 1 ) ) . L T . 1,OD-13) GO TO 30 (C (K) * X D ( I , 1) ) * X D ( I , 1) * XD ( I , 1) B1 B1 B(0,II) £2 (C ( K ) * X D ( I , 1 ) ) * X D ( I , 2 ) B2 E (0,11) B3. (C (K) *XD ( 1 , 1 ) ) •B.3 B (0,11) B».' (C (K) *XD (1,1) ) * X D ( I , 1 ) B4 B (J ,11) B5 . C:(K) * XD (0,2) E5 E (0,11) CONTINUE 30 ATEMP E l • B2 * 3.ODOO ATEMP = ATEMP + B3 * 2.0D00 * X D ( N C , 2 ) ATEM.P ATEMP + B4 * XD (NC, 1) ATEMP ATEMP + B 5 *' XD (NC, 1) ET E EM 1.0D00 / (» 018.01534D00*AMH2O) ATEMP ATEMP • B6 * XD (NC, 1) '* BTERM ATEMP ATEMP + B7 * X D ( N C , 2 ) * BTEEM ATEMP ATEMP • ' B8 *..- XD (NC, 1) * XD (NC,1) * BTERM CV ( J ) ATEMP  40  CONTINUE DO 5 0 I = 1 , NST TN ( I ) =. 0. ODOO • . • . IF (DABS (Z ( I ) )• . L T . 1.0D-5 .OR. Z ( I ) . GT. 9.99D00) 1 GC.TO 50 ,' ' . • X I D = X I ** ( 1. G D 0 0 / 2 . ODOO) . TN ( I ) = ADH * 3.0D00 * Z ( I ) * Z ( I ) / {8.ODOO* ( X I * * ( 5 . 0 D 0 0 / 2 . 1 ODOO) ) ) . . TN ( I ) = T N ( I ) * ( 1 , 0 D 0 0 + 4 . 0DOO*AZERQ ( I ) *BDH*XID 5.0DOO*{( 1 AZF.EO ( I ) *BDH) * * 2 ) ' * X I ) TN ( I ) = T N ( I ) / ' ( ( 1 .ODOO + AZERO ( I ) *BDH*XID) **4) I N (I) = TN (I) * A 1 0 50 C O N T I N U E . E1 = 0.ODOO B2 = O.ODOO E3 = 0.. ODOO 84 = O.ODOO E5 = 0.ODOO B6 = O.ODOO E7 = 'O.ODOO B8 = O.ODOO E9 = 0.ODOO DO 6 0 I = 1 , NC 1 I F (NDX (1,2) . N E . 0) GO TO 60 K •= NDX ( 1 , 1 ) £1 = B1 - C (K) .* DN (K) E2 .= E2 + C (K) * TN (K) S3 = B3 - ( C ( K ) *XD (1,1) ) * X D ( I , 2 ) E4 = E4 - (C ( K ) * X D ( 1 , 1 ) ) * X D ( I , 1 ) * XD ( I , 1) E5 = E5 - ( C ( K ) *XD ( 1 , 1 ) ) * D C ( K ) B6 = B6 - .(C(K) * X D ( I , 1 ) ) * DN (K) B7 = B7 - (C ( K ) * X D ( 1 , 2 ) ) * DC (K) DC (K) - E8 =• Ed - ( C ( K ) * X D ( I , 1 ) ) * X D ( I , 1 ) 60 C O N T I N U E DO 7 0 I I =• 1 , 'NX K = NDX (NC + 1 1 , 1 ) I = NC2 + I I B1 = E1 C (K) * DN'(K) C (X) * TN (K) E2 = B2 E3 = B 3 - ( C ( K ) *XD ( I , 1) ) * XD ( 1 , 2 ) B4 = B4 (C (K) *XD ( 1 , 1 ) ) * X D ( I , 1 ) * XD ( I , 1) E5 •= B5 - (C ( K ) * X D ( 1 , 1 ) ) * DC (K) E6 = E6 ('C(K) *XD ( 1 , 1 ) ) * DN (K) (C (K) *XD ( 1 , 2 ) ) * DC (K) B7 = B7 DC (K) (C (K) *XD ( 1 , 1 ) ) * X D ( I , 1 ) B8 = B8 70 C O N T I N U E ASH = . O 1 8 0 1 5 3 4 D 0 0 B1 * 3.ODOO * AWH * XD(NC + 1,1) * XD(NC + 1,2) E1 (B2*A¥H*XD (NC + 1 , 1) ) * XD (NC + 1, 1) ** 2 E2 B3 B3 * 3.ODOO * AHH E4 E4 * AWIi B5 B5 '* 2. ODOO * AWH •• .XD (NC • 1,2) B6 XD (NC + 1,1) * XD (NC + 1,1) B6 * 2.ODOO * AWH E7 B7 * AKH * XD(NC 1,1) E8 ,E8 * AWH * ' X D ( N C 1,1) A l E R f l •= B1 + B.2 • + B3 + B4 + B5 + E6 • B7 • B8 CV (NC2) = ATERM :  -  -  :  148  80  90  DO 9 0 I I = 1, NX K = NDX {NC + I I , V) . I = NC2 + I I AT EE M = -DN <K) ET EE a = TN (K) DO 80 J = 1, NC1 I E ( N D X ( J , 2 ) . NE. 0) GO TO 80 I = NDX ( J , 1) I F (DABS {B (3 , I I ) } . L T . 1. 0D-T3) GO TO 80 AT E EM = AT EE H * B ( J , I I ) * DN (L) BTEBM = BTEBM - B ( J , I I ) * TN (L) CONTINUE ATEBM' = ATEBM * 3. 0D0O * X D ( N C + 1,1) * XD(NC BTEBM = BTEBM * ( X D ( N C * 1,1) **3) CV ( I ) = ATEBM * BTEBM CONTINUE • NDS =3 CALL CVSOLV(NDS) EETUSN END  149  1/2)  

Cite

Citation Scheme:

    

Usage Statistics

Country Views Downloads
China 32 4
United States 27 1
Japan 4 0
Germany 3 1
Finland 1 0
Ukraine 1 0
Poland 1 0
India 1 0
United Kingdom 1 0
City Views Downloads
Beijing 23 0
Columbus 14 0
Unknown 7 2
Hangzhou 5 0
Tokyo 4 0
Mountain View 3 0
Wilmington 2 0
Ürümqi 2 0
Seattle 2 0
Ashburn 2 0
Chicago 1 0
Jinan 1 0
Helsinki 1 0

{[{ mDataHeader[type] }]} {[{ month[type] }]} {[{ tData[type] }]}
Download Stats

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0052867/manifest

Comment

Related Items