Abstract:
A method for designing acid treatments provides for the selection of optimal treatment for well stimulation wherein reservoir characteristics are obtained to further select the reaction kinetic data on the minerals of interests, the treatment to the reservoir is scaled up using a mathematical model and real time damage are computed based on bottomhole pressure and injection rate and compared to that predicted by the mathematical model to adjust the treatment. The model generated facilitates optimization of matrix treatments by providing a rapid quantitative evaluation of various treatment strategies for a formation. Stimulation with non-traditional fluid recipes containing mixtures of inorganic and organic acids, and chelating agents can be readily computed. The computed values can then be used in an economic model to justify the additional costs associated with the use of the non-traditional fluids. Apart from optimizing matrix treatments, the method can be used as a development tool for new fluid systems, as a tool for prediction and removal of inorganic scale and for fluid compatibility testing such as that required in water flooding projects.

Description:
This patent application is a non-provisional application of provisional application Ser. No. 60/269,656 filed Feb. 16, 2001. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention is generally related to hydrocarbon well stimulation, and is more particularly directed to a method for designing matrix treatment, or generally any treatment with a fluid that will react with the reservoir minerals or with chemicals resulting for instance from a previous treatment. The invention is particularly useful for designing acid treatment such as for instance mud acid treatments in sandstone reservoirs. 
     2. Discussion of the Prior Art 
     Matrix acidizing is among the oldest well stimulation techniques. It is applied to sandstone formations to remove near-wellbore damage, which may have been caused by drilling, completion, production, or workover operations. Matrix acidizing is accomplished by injecting a mixture of aids (typically hydrofluoric and hydrochloric acids) to dissolve materials that impair well production, as a rule designated as near-wellbore damages. 
     Matrix treatments ma sandstone reservoirs have evolved considerably since the first mud acid treatment in the 1930s. Treatment fluid recipes have become increasingly complex. Several additives are now routinely used and organic acids are frequently used in high temperature formations to avoid precipitation reactions. Chelating agents are often added to avoid precipitation in formations with high carbonate content. 
     Substantial production improvements can be achieved by this type of well stimulation technique if treatments are engineered properly. However, matrix treatments are also often a main contributor to reservoir damages. Indeed, the side reactions that occur in almost all mud acid treatments, lead to the formation of precipitates. Precipitates plug pore spaces and reduce permeability and can therefore adversely affect acid treatments if precipitates deposit near the wellbore. Far from the well precipitates are considered to have negligible effect. Moreover, recent studies have made the industry wary of damage due to secondary and tertiary reactions. Accurate prediction of the effectiveness of a matrix treatment involves calculation of the rates of the dissolution and re-precipitation reactions of minerals because the rates dictate where precipitates will be deposited in the reservoir. 
     Moreover, sandstone mineralogy is quite complex and acid/mineral compatibility as well as acid/crude oil compatibility is often an issue. At present, there is a lack of tools that can predict accurately the reactivity of acids with clays, and consequently, there are treatments currently in practice that use empirical rules—or at the opposite extreme, rely on extensive costly and time-consuming laboratory testing. 
     Beyond the treatment fluid selection, the pumping schedule is also a crucial parameter. In The  Stimulation Treatment Pressure Record - An Overlooked Formation Evaluation Tool,  by H. O. McLeod and A. W. Coulter, JPT, 1969, p. 952-960, a technique is described wherein each injection stage or shut-in during the treatment is considered as a short individual well test. The transient reservoir pressure response to the injection of fluids is analyzed and interpreted to determine the conditions of the wellbore skin and formation transmissibility. 
     In  New Method Proves Value of Stimulation Planning,  Oil &amp; Gas Journal, V 77, NO 47, PP 154-160, Nov. 19, 1979, G. Paccaloni proposes a method based on the instantaneous pressure and injection rate values to compute the skin factor at any given time during the treatment. Comparison is made with standard curves calculated for fixed values of skin effect to evaluate skin effect evolution during treatment. Standard curves are generated using Darcy&#39;s equations for steady state, single phase and radial horizontal flow in reservoirs. 
     A technique presented by Prouvost and Economides enables continuous calculation of the skin effect factor during the course of the treatment and accounts for transient response, see  Real - time Evaluation of Matrix Acidizing,  Pet. Sci, and Eng., 1987, p.145-154, and  Applications of Real - time Matrix Acidizing Evaluation Method,  SPE 17156, SPE Production Engineering, 1987, 4, No. 6, 401-407. This technique is based on a continuous comparison of the measured and presumed good reservoir description including the type of model and well and reservoir variables of the subject well. 
     It is also known from U.S. Pat. No. 5,431,227 to provide a method for matrix stimulation field monitoring, optimization and post-job evaluation of matrix treatments based on calculated and measured bottom hole pressure used in a step rate test to estimate the damage skin. 
     A number of sandstone acidizing models have been presented in the literature aiming at computing changes in porosity resulting from the dissolution and precipitation of minerals. 
     In the lumped mineral models, the complex sandstone mineralogy is lumped into characteristic minerals and an average reaction rate for these minerals is determined from core tests. In two mineral models the sandstone minerals are lumped into fast- and slow-reacting groups on the basis of their reactivity with HF. Two mineral models do not account for precipitation reactions. A three mineral lumped model has also been proposed in S. L. Bryant, SPE 22855, An Improved Model of Mud Acid/Sandstone Acidizing, in SPE Annual Technical Conference and Exhibition, 1991, Dallas. The third mineral accounts for the precipitation of amorphous silica. Disadvantages of lumped mineral models are that they do not allow for equilibrium reactions to be modeled and need to be carefully calibrated to the treatment condition and formation of interest. Therefore, these models are not applicable to fluids systems containing weak acids (e.g. most organic acids) and chelating agents and are not reliable outside the calibrated region. 
     The equilibrium approximation is another approximation that is frequently used for the design of matrix treatments. This model has been presented in Walsh, M. P., L. W. Lake, and R. S. Schechter, SPE 10625, A Description of Chemical Precipitation Mechanisms and Their Role in Formation Damage During Stimulation by Hydrofluoric Acid, in SPE International Symposium on Oilfield and Geothermal Chemistry, 1982, Dallas. In the equilibrium approximation it is assumed that the reactions are much faster than the contact time of the minerals with the acids. The equilibrium constants for the reactions are usually better known than the rate constants, so large reaction sets can be included and complex sandstone mineralogy can be accounted for without speculating on the reactions and rate laws as is necessary in the lumped mineral approach. Unfortunately, the assumption that the reactions are much faster than the contact time is not valid for the injection rates used in most acid treatments and thus the equilibrium approach is useful only as an indicator for precipitation. The question that must be answered for a successful design is not if but where precipitation will occur. An equilibrium model alone with no time dependence cannot answer this question. 
     To address this discrepancy in the equilibrium models, partial local equilibrium models have been proposed and first described in Sevougian, S. D., L. W. Lake, and R. S. Schechter, KGEOFLOW: A New Reactive Transport Simulator for Sandstone Matrix Acidizing, SPE Production &amp; Facilities, 1995: p. 13-19 and in Li, Y., J. D. Fambrough, and C. T. Montgomery, SPE 39420, Mathematical Modeling of Secondary Precipitation from Sandstone Acidizing, SPE International Symposium on Formation Damage Control, 1998, Lafayette. The partial equilibrium approach combines the kinetic and equilibrium approaches. Slow reactions are modeled with a kinetic model, and an equilibrium model is used for fast reactions. This computation scheme enables comprehensive and flexible modeling of sandstone acidizing, but traditionally suffered from several disadvantages. First, accurate computation of the activity coefficients for high acidic and high ionic strength solutions is difficult. Second, due to inefficient numerical algorithms numerical convergence was a frequent problem. Therefore, only 1-2 precipitated mineral species could be practically simulated. Third, only a limited thermodynamic data was available. Hence, simulations for hot reservoirs and with nontraditional fluid systems were not possible. 
     The previous models are applicable to a limited range of temperatures, injection rates and mineral composition. So yet, despite the important risk of damaging a reservoir, no satisfactory method for modeling matrix treatments over a much broader range of these variables, to make the model more reliable for extrapolating laboratory data to field conditions. 
     This failure of the existing models is all the more critical that treatment fluid recipes have become increasingly complex. Several additives are now routinely added, organic acids are frequently used in high temperature formations to avoid precipitation reactions and chelating agents are often added to avoid precipitation in formations with high carbonate content. 
     SUMMARY OF THE INVENTION 
     The subject invention is directed to a method for designing matrix treatments, and more particularly, for stimulation with reactive fluid in sandstone formations, even though the invention extends to other areas such as carbonate acidizing, scale inhibition and related fields. In particular, according to a first embodiment, the invention relates to a method for selecting the optimal treatment wherein reservoir characteristics including reservoir minerals are obtained and a treatment fluid comprising a mixture of chemical species is designed to further select a subset of chemical reactions that can occur between the reservoir minerals and the treatment fluid the reaction kinetic and equilibrium data on the minerals and chemical species of interests, and depending on the predicted damages consecutive to those reactions, the stimulation treatment is adjusted to optimize the results. In other words, the invention proposes a virtual chemical laboratory that makes it possible to simulate a large number of laboratory tests. 
     In a second embodiment of the invention, the method further includes modeling a reservoir core having a length, a diameter and a permeability so that the invention makes it possible to simulate core tests. The invention also provides a way to simulate sequential treatments where successions of treatment fluids are injected at specific rates. 
     In a third embodiment of the invention, the method further includes scaling up the treatment to a reservoir using a mathematical model to predict damages resulting from the treatment. In a most preferred embodiment, the invention includes selecting a treatment, carrying out the treatment on a well while real time damage are computed based on bottomhole pressure and injection rate and simultaneously, performing a simulation scaled up to the reservoir to compare the predicted damages and the computed damages and adjusting the treatment if required. 
     In the preferred embodiments of the invention, the three flow geometries have been implemented: (1) batch, (2) core and (3) reservoir geometries. The batch flow geometry approximates the reactions occurring in a flask or a beaker, the core flow geometry approximates linear flow in cores such as that in laboratory core flooding experiments, and the reservoir flow geometry approximates flow in a single layer, radially symmetric reservoir. The batch and core flow geometries provide a means for validating the mathematical model, so that the predictions for the reservoir can be made with more confidence. 
     The model generated by the method of the subject invention can facilitate optimization of matrix treatments by providing a rapid quantitative evaluation of various treatment strategies for a formation. Stimulation with non-traditional fluid recipes containing mixtures of inorganic and organic acids, and chelating agents can be readily computed. The computed values can then be used in an economic model to justify the additional costs associated with the use of the non-traditional fluids. Apart from optimizing matrix treatments, the method of the subject invention can also be used as a development tool for new fluid systems, as a tool for prediction and removal of inorganic scale and for fluid compatibility testing such as that required in waterflooding projects. 
     The method of the subject invention combines a geochemical simulator to an extensive database of thermodynamic properties of aqueous chemical species and minerals. The subject invention overcomes many limitations of previous simulators. Chemical equilibrium calculations can be performed between any number of minerals and aqueous solutions, whereas previous simulators were limited to only one or two precipitated minerals. Additionally, any number of kinetically controlled reactions can be simulated with user-defined kinetics. 
     The modeling method of the subject invention is a finite-difference geochemical simulator capable of modeling kinetic and/or equilibrium controlled reactions in various flow geometries. The mathematical formulation provides the capability to model an arbitrary combination of equilibrium and kinetic reactions involving an arbitrary combination of equilibrium and kinetic reactions involving an arbitrary number of chemical species. This flexibility allows the simulation model to act as a pure kinetic model if no equilibrium are specified or as a pure equilibrium model if both kinetic and equilibrium reactions are specified. A semi-implicit numerical scheme is used for integration in time for kinetic reactions. This scheme provides greater numerical stability compared to explicit schemes, especially at high temperature. A Gibbs free energy minimization algorithm with optimized stoichiometry is used in computing chemical equilibrium between aqueous species and minerals. Base specie switching is implemented to improve convergence. The resulting algorithm for chemical equilibrium calculation is of greater numerical stability and is more efficient than prior art algorithms based on a non-stoichiometric approach. 
     The treatment design preferably includes variables such as fluid type, composition, volume, pumping sequence and injection rates. A database is used to get the reaction kinetics data. If insufficient data is available, laboratory experiments may be conducted, preferably using multiple linear core flow tests for a range of injection rates. 
     The reservoir characteristics typically include mineralogy data, permeability and preferably, an estimate of the quantity and depth of damage such as scales, fines migration or drilling-related damages including the initial damage skin. This estimate can be made for instance based on nodal analysis or available mud and resistivity logs. The reservoir characteristics may be stored in a database and if not already available, are obtained by geochemical logging or from core analysis and further stored in the database for further use. 
     The model is preferably calibrated with data including effluent analysis and permeability evolution (including predicted damages). Sensitivity analysis may be also performed to optimize the design variables and select improved treatment design. 
     Once an optimized design has been selected, the execution of the treatment can begin and damage skin can be computed on a real time basis. This allows a comparison with the predicted damages and, if appropriate, adjustment of the treatment. 
     Specifically, the invention comprises data collection, design optimization, execution and evaluation. In the execution phase, the damage is computed in real time from either calculated or measured values of bottomhole pressure and injection rate. It can then be compared to the computed damage skin with that predicted by the mathematical model. The model can thereafter be refined by better estimates for type, quantity and depth of damage to match the measured values and, if needed, appropriate changes to the treatment design are performed. 
     Post treatment data, such as flowback analysis, production data and production logs, are used to further refine the mathematical model and the estimates of damage depth and quantity. The treatment data can finally be uploaded into the database so it can be used in improving future treatment designs. 
     The method of the subject invention facilitates treatment design with the methodology described above. This can be implemented with a mathematical model and databases. The mathematical model may comprise the following components: 
     1. Algorithm for automatic selection of the various applicable chemical reactions for the defined system of fluids and minerals 
     2. Modeling of organic acids and chelating agent chemistry for sandstone acidizing 
     3. Algorithm for scale up from core to reservoir 
     4. Modeling of multiple precipitates 
     The mathematical model can be extended later to other processes such as carbonate acidizing, scale inhibition, or other mechanisms that involve fluid/reservoir interaction. 
     According to a preferred embodiment, the method of the subject invention incorporates extensive databases of minerals, chemical reactions, fluids and reservoirs in order to feed the mathematical model with accurate geological, physical and reactivity data, thereby ensuring the success of the process. Users preferably have the ability to create new components (fluids, minerals, reactions) and add them to the database for future use. This allows continued expansion of the methodology of the subject invention to new systems and new processes. In accordance with the teachings of the subject invention, chemical equilibrium calculations can be performed between any number of minerals and aqueous solutions. 
     In the preferred embodiment of the invention, the essential steps are stored on a CD-ROM device. In another preferred embodiment, the method/process is downloadable from a network server, or an internet web page. Moreover, the present invention can be subsumed using a software developed to assist acid treatments. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows a comparison of the measured effluent concentration of HF, Al, and Si with those predicted by the model of the present invention. 
     FIG. 2 are graphs providing a snapshot of the reservoir at the end of the mud acid stage. 
     FIG. 3 compares the results for different injection rates and a different mud acid formulation. 
     FIG. 4 shows the result of the treatment if the reservoir had been damaged with a mineral similar to kaolinite. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The methods of the subject invention provide a virtual laboratory geochemical simulator for well simulating by permitting and supporting scaled laboratory modeling to be scaled to reservoir adaptability. The laboratory experiments validate the model and permit scaling up to reservoir level with precision and efficiency. The fundamental tools provide: (1) a reaction model, (2) analysis of the model, (3) testing at the model level, (4) validation, and (5) scale-up to reservoir. This permits laboratory review and modeling of formation damage with predictabilaty, accurate confirmation and ready and efficient adjustability. Specifically, the methods of the subject invention permit laboratory design, execution and evaluation prior to reservoir application greatly increasing the efficiency of the process. 
     The numerical model of the present invention is a finite-difference geochemical simulator capable of modeling kinetic and/or equilibrium controlled reactions (i.e. partial local equilibrium reaction model) in various flow geometries. The mathematical formulation provides the capability to model an arbitrary combination of equilibrium and kinetic reactions involving an arbitrary number of chemical species. This flexibility in the mathematical formulation allows it to act as a pure kinetic model if no equilibrium reactions are specified, or a pure equilibrium model if no kinetic reactions are specified, or as a partial equilibrium model if both kinetic an equilibrium reactions are specified. A semi-implicit numerical scheme is used for integration in time for kinetic reactions. This scheme provided greater numerical stability compared to explicit schemes, especially at high temperature. A Gibbs free energy minimization algorithm with optimized stoichiometry is used in computing chemical equilibrium between aqueous species and minerals. Base specie switching is preferably implemented to improve convergence. The resulting algorithm for chemical equilibrium calculation was found to be much more numerically stable and computationally efficient than algorithms based on the non-stoichiometric approach. 
     In this embodiment, three flow geometries are implemented in the simulator. These are batch, core and reservoir flow geometries. The batch flow geometry approximates reactions occurring in a flask or a beaker, the core flow geometry approximates linear flow in cores such as that in laboratory core flooding experiments, and the reservoir flow geometry approximates flow in a single layer, radially symmetric reservoir. The batch and core flow geometries provide a means for validating the mathematical model, so that the predictions for the reservoir can be made we more confidence. For example, the geochemical simulator can be validated with measured effluent ion concentrations and the permeability evolution from laboratory core flow experiments, prior to making predictions for the reservoir. 
     Typical matrix stimulation fluids are extremely non-ideal. The ideal solution assumption usually breaks down for salt concentrations higher than that of fresh water. Activity coefficients capture deviations from ideal solution behavior, and are therefore crucial for accurate modeling of kinetic and equilibrium reactions in concentrated electrolyte solutions (e.g. matrix treatment fluids containing acids and brines). 
     The following symbols and their definitions are used throughout this application and the appended claims: 
     A γ =electrostatic Debye-Hückel parameter 
     A j, s =specific reactive surface area of mineral j (m 2 /kg) 
     A A , A B , A C , A W =activity of aqueous species A, B, C and water (kgmole/m3) 
     a i  (P, T), a i, P     t     T     t   =ionic diameter, ionic diameter at reference temperature and pressure (Å) 
     a i, 1-4 =parameter in Helgeson EOS for aqueous species 
     b i =salting-out parameter for specie i (kg/mol) 
     B γ =electrostatic Debye-Hückel parameter 
     {dot over (B)}(T)=deviation function describing the departure of the mean ionic activity coefficient of an electrolyte from that predicted by Debye-Hückel expression (kg/mol) 
     b NaCl =electrostatic salvation parameter for NaCl (kg/J) 
     b Na+Cl− =short-range interaction parameter for NaCl (kg/mol) 
     C p, i =heat capacity of specie i at constant pressure (J/mol-K) 
     C 1-2 =parameter in variable reaction order kinetic model (1/K) 
     c i, 1-2 =parameters in Helgeson EOS for aqueous species 
     E a , E′ a =activation energy (J/mol) 
     f(T)=temperature function in variable reaction order kinetic model 
     G i, P, T     t     o G i, P     t     , T     t     o =standard molal Gibbs free energy of formation at subscripted temperature and pressure (J/mol) 
     g(P, T)=pressure and temperature dependent solvent function (Å) 
     H i   o =standard molal enthalpy of formation (J/mol) 
     I=ionic strength of solution (mol/kg) 
     K=equilibrium constant 
     K″ 0 , k″ 0 =pre-exponential factors 
     k 0 , k=initial and final permeability (mD) 
     M j, 0 , M j =initial and final volume fraction of mineral j (m3/m3) 
     M j, W =molecular weight of mineral j (g/mol) 
     [M j ]=concentration of mineral j (kgmol/m 3 ) 
     m i , {right arrow over (m)}=molality of specie i and vector of molalities (mol/kg solvent) 
     P, P r =pressure (bar) and standard pressure (1 bar) 
     P inj =bottomhole injection pressure (bar) 
     P res =reservoir pressure at out boundary (bar) 
     R=gas constant (=8.314 J/mol-K) 
     rate=volumetric reaction rate (kg mole mineral/m 3  sec) 
     S i, P     r     , T     r     o =standard molal entropy of formation at P r  and T r  (J/mol-K) 
     T, T r =temperature (K) and standard temperature (298.15 K) 
     V P     r,      T     r     o =standard molal volume at P r  and T r  (m 3 /mol) 
     x, y, z=reaction order with respect to species A, B and C 
     Y P     r     , T     r   =electrostatic Born function at P r  and T r    
     Z, Z P     r     , T     r   =electrostatic Born function at P and T, and at P r  and T r    
     z i =ionic charge of specie i 
     β i, 0-7 =heat capacity parameter for specie i 
     γ i =activity coefficient for specie i 
     δ j =Labrid parameter for mineral j 
     ξ i, 1-5 =chemical potential parameters for specie i 
     η=constant (=694630.393 ÅJ/mol) 
     Θ=constant (=298 K) 
     θ i, 1-3 =Maier-Kelly heat capacity coefficients 
     μ i , μ j   0 =chemical potential and standard chemical potential of specie i (J/mol) 
     μ w , μ w   0 =chemical potential and standard chemical potential of water (J/mol) 
     ν i =stoechiometric coefficient of specie i (positive for products, negative for reactants) 
     φ 0 =initial porosity 
     Ψ=constant (=2600 bars) 
     Ω=moles of water/kg 
     ω i,  ω i, Pr, Tr =Born coefficient of specie i at P and T, and at P r  and T r  (J/mol) 
     Activity coefficient models available in a typical prior art version of the simulator are shown in Table 1: 
     
       
         
               
             
               
               
             
           
               
                 TABLE 1 
               
               
                   
               
               
                 Activity Coefficient Models 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                 Extended Debye- Hückel 
                 
                   
                     
                       
                         
                           log 
                            
                           
                               
                           
                            
                           
                             γ 
                             i 
                           
                         
                         = 
                         
                           
                             ( 
                             
                               
                                 
                                   - 
                                   
                                     z 
                                     i 
                                     2 
                                   
                                 
                                  
                                 
                                   A 
                                   γ 
                                 
                                  
                                 
                                   I 
                                 
                               
                               
                                 1 
                                 + 
                                 
                                   
                                     B 
                                     γ 
                                   
                                    
                                   
                                     a 
                                     i 
                                   
                                    
                                   
                                     I 
                                   
                                 
                               
                             
                             ) 
                           
                           + 
                           Γ 
                         
                       
                     
                             
                     
                         
                     
                   
                 
               
               
                   
               
               
                 Davies 
                 
                   
                     
                       
                         
                           log 
                            
                           
                               
                           
                            
                           
                             γ 
                             i 
                           
                         
                         = 
                         
                           
                             - 
                             
                               z 
                               i 
                               2 
                             
                           
                            
                           
                             
                               A 
                               γ 
                             
                              
                             
                               ( 
                               
                                 
                                   
                                     I 
                                   
                                   
                                     1 
                                     + 
                                     
                                       I 
                                     
                                   
                                 
                                 - 
                                 
                                   0.3 
                                    
                                   I 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                             
                     
                         
                     
                   
                 
               
               
                   
               
               
                 B-Dot 
                 
                   
                     
                       
                         
                           
                             
                               
                                 
                                   log 
                                    
                                   
                                       
                                   
                                    
                                   
                                     γ 
                                     i 
                                   
                                 
                                 = 
                                 
                                   
                                     ( 
                                     
                                       
                                         
                                           - 
                                           
                                             z 
                                             i 
                                             2 
                                           
                                         
                                          
                                         
                                           A 
                                           γ 
                                         
                                          
                                         
                                           I 
                                         
                                       
                                       
                                         1 
                                         + 
                                         
                                           
                                             B 
                                             γ 
                                           
                                            
                                           
                                             
                                               a 
                                               i 
                                             
                                              
                                             
                                               ( 
                                               
                                                 P 
                                                 , 
                                                 T 
                                               
                                               ) 
                                             
                                           
                                            
                                           
                                             I 
                                           
                                         
                                       
                                     
                                     ) 
                                   
                                   + 
                                   Γ 
                                   + 
                                   
                                     
                                       
                                         B 
                                         . 
                                       
                                        
                                       
                                         ( 
                                         T 
                                         ) 
                                       
                                     
                                      
                                     I 
                                   
                                 
                               
                             
                           
                           
                             
                               
                                 
                                   
                                     a 
                                     i 
                                   
                                    
                                   
                                     ( 
                                     
                                       P 
                                       , 
                                       T 
                                     
                                     ) 
                                   
                                 
                                 = 
                                 
                                   
                                     a 
                                     
                                       i 
                                       , 
                                       Pr 
                                       , 
                                       Tr 
                                     
                                   
                                   + 
                                   
                                     2 
                                      
                                     
                                        
                                       
                                         z 
                                         i 
                                       
                                        
                                     
                                      
                                     
                                       g 
                                        
                                       
                                         ( 
                                         
                                           P 
                                           , 
                                           T 
                                         
                                         ) 
                                       
                                     
                                   
                                 
                               
                             
                           
                         
                          
                       
                     
                             
                     
                         
                     
                   
                 
               
               
                   
               
               
                 HFK 
                 
                   
                     
                       
                         
                           
                             
                               
                                 
                                   log 
                                    
                                   
                                       
                                   
                                    
                                   
                                     γ 
                                     i 
                                   
                                 
                                 = 
                                 
                                   
                                     ( 
                                     
                                       
                                         
                                           - 
                                           
                                             z 
                                             i 
                                             2 
                                           
                                         
                                          
                                         
                                           A 
                                           γ 
                                         
                                          
                                         
                                           I 
                                         
                                       
                                       
                                         1 
                                         + 
                                         
                                           
                                             B 
                                             γ 
                                           
                                            
                                           
                                             
                                               a 
                                               i 
                                             
                                              
                                             
                                               ( 
                                               
                                                 P 
                                                 , 
                                                 T 
                                               
                                               ) 
                                             
                                           
                                            
                                           
                                             I 
                                           
                                         
                                       
                                     
                                     ) 
                                   
                                   + 
                                   Γ 
                                   + 
                                 
                               
                             
                           
                           
                             
                               
                                 
                                     
                                 
                                  
                                 
                                   
                                     ( 
                                     
                                       
                                         
                                           
                                             2 
                                              
                                             η 
                                              
                                             
                                                 
                                             
                                              
                                             
                                               z 
                                               i 
                                               2 
                                             
                                           
                                           
                                             
                                               a 
                                               i 
                                             
                                              
                                             
                                               ( 
                                               
                                                 P 
                                                 , 
                                                 T 
                                               
                                               ) 
                                             
                                           
                                         
                                          
                                         
                                           b 
                                           NaCl 
                                         
                                       
                                       + 
                                       
                                         b 
                                         
                                           
                                             Na 
                                             + 
                                           
                                            
                                           
                                             Cl 
                                             - 
                                           
                                         
                                       
                                       - 
                                       
                                         0.19 
                                          
                                         
                                           ( 
                                           
                                             
                                                
                                               
                                                 z 
                                                 i 
                                               
                                                
                                             
                                             - 
                                             1 
                                           
                                           ) 
                                         
                                       
                                     
                                     ) 
                                   
                                    
                                   I 
                                 
                               
                             
                           
                           
                             
                               
                                 
                                   
                                     a 
                                     i 
                                   
                                    
                                   
                                     ( 
                                     
                                       P 
                                       , 
                                       T 
                                     
                                     ) 
                                   
                                 
                                 = 
                                 
                                   
                                     a 
                                     
                                       i 
                                       , 
                                       Pr 
                                       , 
                                       Tr 
                                     
                                   
                                   + 
                                   
                                     2 
                                      
                                     
                                        
                                       
                                         z 
                                         i 
                                       
                                        
                                     
                                      
                                     
                                       g 
                                        
                                       
                                         ( 
                                         
                                           P 
                                           , 
                                           T 
                                         
                                         ) 
                                       
                                     
                                   
                                 
                               
                             
                           
                         
                          
                       
                     
                             
                     
                         
                     
                   
                 
               
               
                   
               
               
                 Neutral species 
                 log γ i  = b i I 
               
               
                   
               
               
                 Water 
                 
                   
                     
                       
                         
                           log 
                            
                           
                               
                           
                            
                           
                             A 
                             w 
                           
                         
                         = 
                         
                           
                             1 
                             Ω 
                           
                            
                           
                             ( 
                             
                               
                                 
                                   - 
                                   
                                     ∑ 
                                     
                                       m 
                                       i 
                                     
                                   
                                 
                                 
                                   ln 
                                    
                                   
                                       
                                   
                                    
                                   10 
                                 
                               
                               + 
                               
                                 
                                   2 
                                   3 
                                 
                                  
                                 
                                   A 
                                   γ 
                                 
                                  
                                 
                                   I 
                                   1.5 
                                 
                                  
                                 σ 
                               
                               - 
                               
                                 
                                   
                                     B 
                                     . 
                                   
                                    
                                   
                                     ( 
                                     T 
                                     ) 
                                   
                                 
                                  
                                 
                                   I 
                                   2 
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                             
                     
                         
                     
                   
                 
               
               
                   
               
               
                   
                 
                   
                     
                       
                         σ 
                         = 
                         
                           
                             3 
                             
                               
                                 ( 
                                 
                                   4 
                                    
                                   
                                     B 
                                     γ 
                                   
                                    
                                   
                                     I 
                                   
                                 
                                 ) 
                               
                               3 
                             
                           
                            
                           
                             ( 
                             
                               1 
                               + 
                               
                                 4 
                                  
                                 
                                   B 
                                   γ 
                                 
                                  
                                 
                                   I 
                                 
                               
                               - 
                               
                                 1 
                                 
                                   1 
                                   + 
                                   
                                     4 
                                      
                                     
                                       B 
                                       γ 
                                     
                                      
                                     
                                       I 
                                     
                                   
                                 
                               
                               - 
                               
                                 2 
                                  
                                 ln 
                                  
                                 
                                     
                                 
                                  
                                 
                                   ( 
                                   
                                     1 
                                     + 
                                     
                                       4 
                                        
                                       
                                         B 
                                         γ 
                                       
                                        
                                       
                                         I 
                                       
                                     
                                   
                                   ) 
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                             
                     
                         
                     
                   
                 
               
               
                   
               
             
          
         
       
     
     The Extended Debye-Hückel uses a species dependent ionic size. The Davies model (in Davies, C. W., Ion Association. 1962, London: Butterworths) uses a constant ionic size and requires only the specie charge. The B-Dot model (in Helgeson, H. C., Thermodynamic of Hydrothermal Systems at Elevated Temperatures and Pressures, American Journal of Science, 1969. 267 (Summer): p. 729-804) captures the temperature dependence of activity coefficients. The HKF model is described in Helgeson, H. C., D. H. Kirham, and G. Flowers, Theoretical Prediction of the Thermodynamic Behavior of Aqueous Electrolytes at High Pressures and Temperatures: IV. Calculation of Activity Coefficients, Osmotic Coefficients, and Apparent Molal and Standard and Relative Partial Molal Properties to 600° C. and 5 KB, Amer. J. Sci., 1981. 281: p. 1249-1516. Activity coefficients in this model are computed by specifying the specie charge and ion-size under standard conditions. All other parameters in the equation are computed internally in the simulator. For aqueous species for which ion-size data is not available, an estimate for ion-size from species with similar charge and atomic structure and use of the HKF model gives a reasonable representation for most stimulation. 
     For neutral species in aqueous solutions the salting out model is used. The value of b i  in this model is typically zero or very close to zero for most species. Therefore for species for which this parameter is not known a value of zero is usually accurate enough for most simulations. 
     Once the mineralogy and treatment fluids are specified, the system may automatically select the applicable kinetic reactions and presents them to the user for review. The user may then accept the default reactions, add new reactions or modify the kinetics of the default reactions. The standard database provided with the program contains data for common matrix reactions. New reactions may be added by specifying the reaction stoichiometry and kinetic rate law parameters. Table 2 lists kinetic rate laws preferably implemented: 
     
       
         
               
             
               
               
               
             
           
               
                 TABLE 2 
               
             
             
               
                   
               
               
                 Reaction Rate Law Models 
               
             
          
           
               
                   
                 Reaction Rate Law 
                 Equation 
               
               
                   
                   
               
               
                   
                 Arrhenius Surface 
                 rate = A j,s M j,w [M j ]k 0 ″e −E     a     /RT   
               
               
                   
                   
                 A A   x A B   y A C   z   
               
               
                   
                 Catalytic 
                 rate = A j,s M j,w [M j ]k 0 ″e −E     a     /RT   
               
               
                   
                   
                 [1 + K 0 ″e −E     a       40 /RT   A A   x ]A B   y   
               
               
                   
                 Variable Reaction Order 
                 rate = A j,s M j,w [M j ]k 0 ″e −E     a     /RT A A   ƒ(T)   
               
               
                   
                   
                 ƒ(T) = C 1 T/(1 − C 2 T) 
               
               
                   
                   
               
             
          
         
       
     
     The reaction rate laws are formulated in pseudo-homogeneous form i.e. the heterogeneous (surface) reaction between the aqueous phase and the mineral is multiplied by the factor A j, s M j, w [M j ] to compute a volumetric reaction rate. Any number of kinetic reactions can be specified for a simulation. 
     As for kinetically controlled reactions, the appropriate aqueous species and minerals, and corresponding thermodynamic data are automatically selected from the database and presented to the user for review, once the mineralogy and treatment fluids are specified. The user may then accept the default selections, add new species or minerals or modify the default properties. A brief description of the calculation procedure is presented below to assist in adding to or modifying thermodynamic data for aqueous species and minerals. 
     Standard partial molal free energy (standard chemical potential) at simulation temperature and pressure, μ i   0 (T, P), is required for each chemical specie that must be added to the equilibrium calculation. The value of μ i   0 (T, P) may be entered directly for each specie, or a model to compute μ i   0 (T, P) must be selected. Table 3 gives a list of available models for computing: 
     
       
         
               
             
               
               
             
           
               
                 TABLE 3 
               
             
             
               
                   
               
               
                 Models for Calculating Standard Chemical Potential 
               
             
          
           
               
                 Model 
                 Equation 
               
               
                   
               
               
                 Helgeson EOS (for aqueous species) 
                 
                   
                     
                       
                         
                           
                             
                               
                                 
                                   
                                     μ 
                                     i 
                                     o 
                                   
                                    
                                   
                                     ( 
                                     
                                       T 
                                       , 
                                       P 
                                     
                                     ) 
                                   
                                 
                                 = 
                                 
                                     
                                 
                                  
                                 
                                   
                                     G 
                                     
                                       i 
                                       , 
                                       
                                         P 
                                         r 
                                       
                                       , 
                                       
                                         T 
                                         r 
                                       
                                     
                                     o 
                                   
                                   - 
                                   
                                     
                                       S 
                                       
                                         i 
                                         , 
                                         
                                           P 
                                           r 
                                         
                                         , 
                                         
                                           T 
                                           r 
                                         
                                       
                                       o 
                                     
                                      
                                     
                                       ( 
                                       
                                         T 
                                         - 
                                         
                                           T 
                                           r 
                                         
                                       
                                       ) 
                                     
                                   
                                   + 
                                   
                                     
                                       c 
                                       
                                         i 
                                         , 
                                         1 
                                       
                                     
                                      
                                     
                                       [ 
                                       
                                         
                                           T 
                                            
                                           
                                               
                                           
                                            
                                           ln 
                                            
                                           
                                               
                                           
                                            
                                           
                                             T 
                                             
                                               T 
                                               r 
                                             
                                           
                                         
                                         - 
                                         T 
                                         + 
                                         
                                           T 
                                           r 
                                         
                                       
                                       ] 
                                     
                                   
                                   - 
                                 
                               
                             
                           
                           
                             
                               
                                 
                                     
                                 
                                  
                                 
                                   
                                     
                                       c 
                                       
                                         i 
                                         , 
                                         2 
                                       
                                     
                                      
                                     
                                       { 
                                       
                                         
                                           
                                             [ 
                                             
                                               
                                                 ( 
                                                 
                                                   1 
                                                   
                                                     T 
                                                     - 
                                                     Θ 
                                                   
                                                 
                                                 ) 
                                               
                                               - 
                                               
                                                 ( 
                                                 
                                                   1 
                                                   
                                                     
                                                       T 
                                                       r 
                                                     
                                                     - 
                                                     Θ 
                                                   
                                                 
                                                 ) 
                                               
                                             
                                             ] 
                                           
                                            
                                           
                                               
                                           
                                           [ 
                                           
                                             
                                               Θ 
                                               - 
                                               T 
                                             
                                             Θ 
                                           
                                           ] 
                                         
                                         - 
                                         
                                           
                                             T 
                                             
                                               Θ 
                                               2 
                                             
                                           
                                            
                                           ln 
                                            
                                           
                                               
                                           
                                            
                                           
                                             ( 
                                             
                                               
                                                 
                                                   T 
                                                   r 
                                                 
                                                  
                                                 
                                                   ( 
                                                   
                                                     T 
                                                     - 
                                                     Θ 
                                                   
                                                   ) 
                                                 
                                               
                                               
                                                 T 
                                                  
                                                 
                                                   ( 
                                                   
                                                     
                                                       T 
                                                       r 
                                                     
                                                     - 
                                                     Θ 
                                                   
                                                   ) 
                                                 
                                               
                                             
                                             ) 
                                           
                                         
                                       
                                       } 
                                     
                                   
                                   + 
                                 
                               
                             
                           
                           
                             
                               
                                 
                                     
                                 
                                  
                                 
                                   
                                     
                                       a 
                                       
                                         i 
                                         , 
                                         1 
                                       
                                     
                                      
                                     
                                       ( 
                                       
                                         P 
                                         - 
                                         
                                           P 
                                           r 
                                         
                                       
                                       ) 
                                     
                                   
                                   + 
                                   
                                     
                                       a 
                                       
                                         i 
                                         , 
                                         2 
                                       
                                     
                                      
                                     ln 
                                      
                                     
                                         
                                     
                                      
                                     
                                       ( 
                                       
                                         
                                           Ψ 
                                           + 
                                           P 
                                         
                                         
                                           Ψ 
                                           + 
                                           
                                             P 
                                             r 
                                           
                                         
                                       
                                       ) 
                                     
                                   
                                   + 
                                   
                                     
                                       ( 
                                       
                                         1 
                                         
                                           T 
                                           - 
                                           Θ 
                                         
                                       
                                       ) 
                                     
                                      
                                     
                                       [ 
                                       
                                         
                                           
                                             a 
                                             
                                               i 
                                               , 
                                               3 
                                             
                                           
                                            
                                           
                                             ( 
                                             
                                               P 
                                               - 
                                               
                                                 P 
                                                 r 
                                               
                                             
                                             ) 
                                           
                                         
                                         + 
                                         
                                           
                                             a 
                                             
                                               i 
                                               , 
                                               4 
                                             
                                           
                                            
                                           
                                             ln 
                                              
                                             
                                               ( 
                                               
                                                 
                                                   Ψ 
                                                   + 
                                                   P 
                                                 
                                                 
                                                   Ψ 
                                                   + 
                                                   
                                                     P 
                                                     r 
                                                   
                                                 
                                               
                                               ) 
                                             
                                           
                                         
                                       
                                       ] 
                                     
                                   
                                   - 
                                 
                               
                             
                           
                           
                             
                               
                                 
                                     
                                 
                                  
                                 
                                   
                                     
                                       ω 
                                       i 
                                     
                                      
                                     
                                       ( 
                                       
                                         Z 
                                         + 
                                         1 
                                       
                                       ) 
                                     
                                   
                                   + 
                                   
                                     
                                       ω 
                                       
                                         i 
                                         , 
                                         
                                           P 
                                           r 
                                         
                                         , 
                                         
                                           T 
                                           r 
                                         
                                       
                                     
                                      
                                     
                                       ( 
                                       
                                         
                                           Z 
                                           
                                             
                                               P 
                                               r 
                                             
                                             , 
                                             
                                               T 
                                               r 
                                             
                                           
                                         
                                         + 
                                         1 
                                       
                                       ) 
                                     
                                   
                                   + 
                                   
                                     
                                       ω 
                                       
                                         i 
                                         , 
                                         
                                           P 
                                           r 
                                         
                                         , 
                                         
                                           T 
                                           r 
                                         
                                       
                                     
                                      
                                     
                                       
                                         Y 
                                         
                                           
                                             P 
                                             r 
                                           
                                           , 
                                           
                                             T 
                                             r 
                                           
                                         
                                       
                                        
                                       
                                         ( 
                                         
                                           T 
                                           - 
                                           
                                             T 
                                             r 
                                           
                                         
                                         ) 
                                       
                                     
                                   
                                 
                               
                             
                           
                         
                          
                       
                     
                             
                     
                         
                     
                   
                 
               
               
                   
               
               
                 Helgeson EOS (for minerals) 
                 
                   
                     
                       
                         
                           
                             
                               
                                 
                                   
                                     μ 
                                     i 
                                     o 
                                   
                                    
                                   
                                     ( 
                                     
                                       T 
                                       , 
                                       P 
                                     
                                     ) 
                                   
                                 
                                 = 
                                 
                                     
                                 
                                  
                                 
                                   
                                     G 
                                     
                                       i 
                                       , 
                                       
                                         P 
                                         r 
                                       
                                       , 
                                       
                                         T 
                                         r 
                                       
                                     
                                     o 
                                   
                                   - 
                                   
                                     
                                       S 
                                       
                                         i 
                                         , 
                                         
                                           P 
                                           r 
                                         
                                         , 
                                         
                                           T 
                                           r 
                                         
                                       
                                       o 
                                     
                                      
                                     
                                       ( 
                                       
                                         T 
                                         - 
                                         
                                           T 
                                           r 
                                         
                                       
                                       ) 
                                     
                                   
                                   + 
                                   
                                     
                                       ∫ 
                                       
                                         T 
                                         r 
                                       
                                       T 
                                     
                                      
                                     
                                       
                                         ( 
                                         
                                           
                                             θ 
                                             
                                               i 
                                               , 
                                               1 
                                             
                                           
                                           + 
                                           
                                             
                                               θ 
                                               
                                                 i 
                                                 , 
                                                 2 
                                               
                                             
                                              
                                             T 
                                           
                                           + 
                                           
                                             
                                               θ 
                                               
                                                 i 
                                                 , 
                                                 3 
                                               
                                             
                                              
                                             
                                               T 
                                               
                                                 - 
                                                 2 
                                               
                                             
                                           
                                         
                                         ) 
                                       
                                        
                                       
                                          
                                         T 
                                       
                                     
                                   
                                   - 
                                 
                               
                             
                           
                           
                             
                               
                                 
                                     
                                 
                                  
                                 
                                   
                                     T 
                                      
                                     
                                       
                                         ∫ 
                                         
                                           T 
                                           r 
                                         
                                         T 
                                       
                                        
                                       
                                         
                                           ( 
                                           
                                             
                                               θ 
                                               
                                                 i 
                                                 , 
                                                 1 
                                               
                                             
                                             + 
                                             
                                               
                                                 θ 
                                                 
                                                   i 
                                                   , 
                                                   2 
                                                 
                                               
                                                
                                               T 
                                             
                                             + 
                                             
                                               
                                                 θ 
                                                 
                                                   i 
                                                   , 
                                                   3 
                                                 
                                               
                                                
                                               
                                                 T 
                                                 
                                                   - 
                                                   2 
                                                 
                                               
                                             
                                           
                                           ) 
                                         
                                          
                                         
                                            
                                           ln 
                                         
                                          
                                         
                                             
                                         
                                          
                                         T 
                                       
                                     
                                   
                                   + 
                                   
                                     
                                       V 
                                       
                                         
                                           P 
                                           r 
                                         
                                         , 
                                         
                                           T 
                                           r 
                                         
                                       
                                       o 
                                     
                                      
                                     
                                       ( 
                                       
                                         P 
                                         - 
                                         
                                           P 
                                           r 
                                         
                                       
                                       ) 
                                     
                                   
                                 
                               
                             
                           
                         
                          
                       
                     
                             
                     
                         
                     
                   
                 
               
               
                   
               
               
                 CpModel (for aqueous species and minerals) 
                 
                   
                     
                       
                         
                           C 
                           
                             p 
                             , 
                             i 
                           
                         
                         = 
                         
                           
                             β 
                             
                               i 
                               , 
                               0 
                             
                           
                           + 
                           
                             
                               β 
                               
                                 i 
                                 , 
                                 1 
                               
                             
                              
                             
                               T 
                               
                                 - 
                                 0.5 
                               
                             
                           
                           + 
                           
                             
                               β 
                               
                                 i 
                                 , 
                                 2 
                               
                             
                              
                             
                               T 
                               0.5 
                             
                           
                           + 
                           
                             
                               β 
                               
                                 i 
                                 , 
                                 3 
                               
                             
                              
                             
                               T 
                               
                                 - 
                                 1 
                               
                             
                           
                           + 
                           
                             
                               β 
                               
                                 i 
                                 , 
                                 4 
                               
                             
                              
                             T 
                           
                           + 
                           
                             
                               β 
                               
                                 i 
                                 , 
                                 5 
                               
                             
                              
                             
                               T 
                               
                                 - 
                                 2 
                               
                             
                           
                           + 
                           
                             
                               β 
                               
                                 i 
                                 , 
                                 6 
                               
                             
                              
                             
                               T 
                               2 
                             
                           
                           + 
                           
                             
                               β 
                               
                                 i 
                                 , 
                                 7 
                               
                             
                              
                             
                               T 
                               
                                 - 
                                 3 
                               
                             
                           
                         
                       
                     
                             
                     
                         
                     
                   
                 
               
               
                   
               
               
                   
                 
                   
                     
                       
                         
                           
                             C 
                             
                               p 
                               , 
                               i 
                             
                           
                           = 
                           
                             
                               ( 
                               
                                 
                                   δ 
                                    
                                   
                                       
                                   
                                    
                                   
                                     H 
                                     i 
                                     o 
                                   
                                 
                                 
                                   δ 
                                    
                                   
                                       
                                   
                                    
                                   T 
                                 
                               
                               ) 
                             
                             P 
                           
                         
                         , 
                         
                           
                             
                               ( 
                               
                                 
                                   δ 
                                    
                                   
                                     ( 
                                     
                                       
                                         μ 
                                         i 
                                         o 
                                       
                                       / 
                                       T 
                                     
                                     ) 
                                   
                                 
                                 
                                   δ 
                                    
                                   
                                       
                                   
                                    
                                   T 
                                 
                               
                               ) 
                             
                             P 
                           
                           = 
                           
                             - 
                             
                               
                                 H 
                                 i 
                                 o 
                               
                               
                                 T 
                                 2 
                               
                             
                           
                         
                       
                     
                             
                     
                         
                     
                   
                 
               
               
                   
               
               
                 Polynomial Model (for aqueous species and minerals) 
                 
                   
                     
                       
                         
                           
                             μ 
                             i 
                             o 
                           
                            
                           
                             ( 
                             
                               T 
                               , 
                               P 
                             
                             ) 
                           
                         
                         = 
                         
                           
                             G 
                             
                               i 
                               , 
                               P 
                               , 
                               
                                 T 
                                 r 
                               
                             
                             o 
                           
                           + 
                           
                             
                               ξ 
                               
                                 i 
                                 , 
                                 1 
                               
                             
                              
                             T 
                           
                           + 
                           
                             
                               ξ 
                               
                                 i 
                                 , 
                                 2 
                               
                             
                              
                             
                               T 
                               2 
                             
                           
                           + 
                           
                             
                               ξ 
                               
                                 i 
                                 , 
                                 3 
                               
                             
                              
                             
                               T 
                               3 
                             
                           
                           + 
                           
                             
                               ξ 
                               
                                 i 
                                 , 
                                 4 
                               
                             
                              
                             
                               T 
                               4 
                             
                           
                           + 
                           
                             
                               ξ 
                               
                                 i 
                                 , 
                                 5 
                               
                             
                              
                             
                               T 
                               5 
                             
                           
                         
                       
                     
                             
                     
                         
                     
                   
                 
               
               
                   
               
             
          
         
       
     
     Helgeson equation of state (EOS) (in Helgeson, H. C., et al., Summary and Critique of the Thermodynamic Properties of Rock-forming Minerals. American Journal of Science, 1978. 278-A: p. 229 and Tanger, J. C. and H. C. Helgeson, Calculation of the Thermodynamic and Transport Properties of Aqueous Species at High Pressures and Temperatures: Revised Equation of State for the Standard Partial Molal Properties of Ions and Electrolytes. Amer. J. Sci, 1988. 288: p. 19-98.) is the preferred model for both aqueous species and minerals, and majority of data provided with the program is in this form. Chemical species for which data is not available in Helgeson EOS form, the CP model or the polynomial model may be used to estimate μ i   0 (T, P). For chemical species for which data is only available in equilibrium constant form, μ i   0 (T, P) for the specie can be calculated from the following thermodynamic identity            ln        (   K   )       =       -     ∑       υ   i          μ   i   o           RT       ,                          
     provided the values of μ i   0 (T, P) for all the other chemical species in the reaction are known. In a preferred embodiment of the present invention, a graphical tool can be provided to assist in the conversion of equilibrium constant data to free energy form. 
     Once μ i   0 (T, P) for aqueous species i is computed at simulation temperature and pressure, the chemical potential of the aqueous species in solution is then computed internally in the simulator from the following equation 
     
       
         μ i ( T, P, {right arrow over (m)} )=μ i   0 ( T, P )+ RTlnγ   i ( T, P, {right arrow over (m)} ) m   i    
       
     
     For solvent (water) the following equation is used 
     
       
         μ w ( T, P, {right arrow over (m)} )=μ w   0 ( T, P )+ RTlna   w ( T, P, {right arrow over (m)} )  
       
     
     For minerals that are equilibrated with the aqueous phase species, a separate pure solid phase for that mineral is assumed (i.e. no solid solutions). The equation for the chemical potential for the solid phase specie than simplifies to 
     
       
         μ s ( T, P )=μ s   0 ( T, P )  
       
     
     The numerical algorithm then computes the value of {right arrow over (m)} for which the system Gibbs free energy is a minimum and the element abundance constraint is satisfied. 
     The kinetic and equilibrium models described above compute changes in porosity due to dissolution and precision of minerals. A porosity-permeability relation is then needed to compute the permeability and hence the skin for the treatment. Several porosity-permeability models have been proposed in the literature including the Labrid Model (in Labrid, J. C., Thermodynamic and Kinetic Aspects of Argillaceous Sandstone Acidizing. SPEJ, April 1975: p. 117-128). According to the invention, the following modified Labrid is preferably used:          k     k   o       =       ∏   j            [         φ   0     +     M     o   ,   j       -     M   j         φ   0       ]       δ   j                                
     The modified Labrid model allows each mineral to uniquely impact the permeability, whereas in most other models, permeability changes are completely determined by net changes in porosity without accounting for the identities of the dissolved or precipitated minerals. The parameter δ j  in the modified Labrid model is specific to each mineral and allows the mineral identity to impact the permeability. The higher the value of δ j  the stronger the impact. 
     APPLICATION EXAMPLE 
     The main features of the invention are illustrated in this section by means of a simple application example. The example is based on core test data reported by Hsi et al (IN Hsi, C. D., S. L. Bryant, and R. D. Neira, SPE 25212 Experimental Validation of Sandstone Acidization Models, in SPE International Symposium on Oilfield Chemistry. 1993. New Orleans) for the Endicott Kediktuk sandstone formation in Alaska. The core tests were conducted on damaged cores at 80° C. with 12/3 Mud acid. The length and diameter of the core plugs were 7.6 and 2.54 cm, respectively. An inductively coupled plasma (ICP) spectrophotometer was used to measure effluent Al and Si concentrations. The HF concentration in the effluent was measured gravimetrically using the weight-loss method with pre-weighted glass slides. The mineralogy of the Kekiktut formation is 98% Quartz and 2% kaolinite. 
     FIG. 1 shows a comparison of the measured effluent concentration of HF, Al, and Si with those predicted by the model of the present invention. The solid lines represent the modeling results, the triangles in FIGS. 1A,  1 C and  1 E indicate experimental data for the normalized HF concentration (the normalized HF concentration is the ratio of the HF in the effluent to the injected HF concentration. In FIGS. 1B,  1 D and  1 F, the squares represent the Al concentration and the circles the concentration of Si. The tests were performed at 80° C., with 12-3 mud acid, at a flow rate of 0.033 cm/s (FIGS.  1 A and  1 B), with 12-3 mud acid and a flow rate of 0.0099 cm/s (FIGS. 1C and 1D) and with 6-1.5 mud acid at a flow rate of 0.0099 cm/s (FIGS.  1 E and  1 F). The model provides a reasonable match to the experimental data even with an order of magnitude change in the flow rate. The match with experimental data was obtained using the default selections of kinetic and thermodynamic data. The match can further be improved by fine tuning the default values. 
     On the geochemical model is validated, it can be used to scaleup the results to the reservoir. With the present invention, this requires only a simply switch in the flow geometry from the core to reservoir flow geometry. The pay zone height was assumed to be 3.05 m (10 ft) and the wellbore diameter was assumed to be 0.2032 m (8 in). A preflush volume of 1.24 m 3 /m (100 gal/ft) of 5 wt % HCl was used, followed by a main stage of 2.48 m 3 /m (200 gal/ft) of 12/3 mud acid. The treatment fluids were pumped at 2.65×10 −3  m 3 /sec (1 bbl/min). The graphs in FIG. 2 are a snapshot of the reservoir at the end of the mud acid stage. FIG. 2A shows the mineral profile in the reservoir (in FIG. 2A, the left axis is used for the quartz volume fraction and the right axis for the kaolinite and the colloidal silica). As shown in FIG. 2B, some colloidal silica precipitation did occur, but the amount was not significant enough to impact the permeability appreciably. No AlF 3  or Al(OH) 4  precipitation was observed. FIGS. 2C and 2D show the profile of the dominant aqueous species in the reservoir. HF penetration of about 0.75 m in the formation was achieved at the end of the mud acid stage. FIG. 2D shows the concentration of aluminum fluoride AlF +2  (left axis) and AlF 2   +  (right axis) and the concentration of silicon fluoride SiF 6   2−  (left axis) and H 2 SiF 6 . This Figure shows that AlF +2  was the dominant aluminum fluoride. Higher fluorides of aluminum than AlF 2   + , such as AlF 3 , AlF 4   − , AlF 5   2−  and AlF 6   3−  were present in negligible concentrations. SiF 6   2−  was the dominant silicon fluoride. Other silicon fluorides were present in negligible concentrations. The aluminum and silicon species Al(OH) 2+ , Al(OH) 2   + , Al(OH) 4   − , H 3 SiO 4   − , H 2 SiO 4   2−  and AlO 2   −  were also present in negligible concentrations. 
     The sensitivity analysis tool facilitates optimization against any of the treatment design parameters. FIGS. 3A and 3B compare the results for the permeability (FIG. 3A) and for the HF concentration (FIG. 3B) for different injection rates and for a different mud acid formulation (9/1 mud acid) against the previous base case examined. The total injection volume was kept constant for all cases shown. At slower injection rates mineral near the sandface are preferentially dissolved, and therefore most of the permeability improvement occurs close to the wellbore. However, at extremely slow injection rates of about 0.1 bbl/min to complete shut-in (not shown), colloidal silica precipitation inhibits permeability improvement. The use of 9/1 mud acid system results in a smaller permeability improvement because the stoichiometric dissolving power of the 9/1 mud acid system is much less than that of the 12/1 mud acid system. Several variations in treatment design parameters may be similarly examined to select the optimum strategy for the final design recommendation. 
     In the cases examined herein, the reservoir was considered to be undamaged initially; i.e. the skin before the treatment was zero. FIG. 4 shows the result of the treatment if the reservoir had been damaged with a mineral similar to kaolinite. More precisely, FIG. 4A shows the permeability profile, FIG. 4B the HF concentration profile and FIG. 4C the profile of the differential of pressure between the bottomhole injection pressure P inj  and the reservoir pressure at out boundary P res . 
     The damage penetration was assumed to be 0.3048 m (1 ft) and the initial skin value was assumed to be 5. All other design parameters were the same as the previous base case. If post-treatment data such as flowback analysis, post-treatment skin and injection pressure data are available, they can be compared against the predictions from the simulator, to assist in diagnosing the type, quantity and depth of damage. The information can be used to optimize future treatments for the reservoir. 
     While certain features and embodiments of the invention have been described in detail herein it will be understood that the invention includes all modifications and enhancements within the scope and spirit for the following claims.