## Publications

### REFEREED PUBLICATIONS IN JOURNALS

7. | A.M.M. Leal, D.A. Kulik, W.R. Smith, M.O. Saar An overview of computational methods for chemical equilibrium and kinetic calculations for geochemical and reactive transport modeling, Pure and Applied Chemistry, 89/5, pp. 597-643, 2017. Abstract We present an overview of novel numerical methods for chemical equilibrium and kinetic calculations for complex non-ideal multiphase systems. The methods we present for equilibrium calculations are based either on Gibbs energy minimization (GEM) calculations or on solving the system of extended law of mass-action (xLMA) equations. In both methods, no a posteriori phase stability tests, and thus no tentative addition or removal of phases during or at the end of the calculations, are necessary. All potentially stable phases are considered from the beginning of the calculation, and stability indices are immediately available at the end of the computation to determine which phases are actually stable at equilibrium. Both GEM and xLMA equilibrium methods are tailored for computationally demanding applications that require many rapid local equilibrium calculations, such as reactive transport modeling. The numerical method for chemical kinetic calculations we present supports both closed and open systems, and it considers a partial equilibrium simplification for fast reactions. The method employs an implicit integration scheme that improves stability and speed when solving the often stiff differential equations in kinetic calculations. As such, it requires compositional derivatives of the reaction rates to assemble the Jacobian matrix of the resultant implicit algebraic equations that are solved at every time step. We present a detailed procedure to calculate these derivatives, and we show how the partial equilibrium assumption affects their computation. These numerical methods have been implemented in Reaktoro (reaktoro.org), an open-source software for modeling chemically reactive systems. We finish with a discussion on the comparison of these methods with others in the literature. / Download |

6. | A.M.M. Leal, D. Kulik, G. Kosakowski, M.O. Saar Computational methods for reactive transport modeling: An extended law of mass-action, xLMA, method for multiphase equilibrium calculations, Advances in Water Resources, 96, pp. 405-422, 2016. Abstract We present a numerical method for multiphase chemical equilibrium calculations based on a Gibbs energy minimization approach. The method can accurately and efficiently determine the stable phase assemblage at equilibrium independently of the type of phases and species that constitute the chemical system. We have successfully applied our chemical equilibrium algorithm in reactive transport simulations to demonstrate its effective use in computationally intensive applications. We used FEniCS to solve the governing partial differential equations of mass transport in porous media using finite element methods in unstructured meshes. Our equilibrium calculations were benchmarked with GEMS3K, the numerical kernel of the geochemical package GEMS. This allowed us to compare our results with a well-established Gibbs energy minimization algorithm, as well as their performance on every mesh node, at every time step of the transport simulation. The benchmark shows that our novel chemical equilibrium algorithm is accurate, robust, and efficient for reactive transport applications, and it is an improvement over the Gibbs energy minimization algorithm used in GEMS3K. The proposed chemical equilibrium method has been implemented in Reaktoro, a unified framework for modeling chemically reactive systems, which is now used as an alternative numerical kernel of GEMS. / Download |

5. | A.M.M. Leal, D.A. Kulik, M.O. Saar Enabling Gibbs energy minimization algorithms to use equilibrium constants of reactions in multiphase equilibrium calculations, Chemical Geology, 437, pp. 170-181, 2016. Abstract The geochemical literature provides numerous thermodynamic databases compiled from equilibrium constants of reactions. These databases are typically used in speciation calculations based on the law of mass action (LMA) approach. Unfortunately, such LMA databases cannot be directly used in equilibrium speciation methods based on the Gibbs energy minimization (GEM) approach because of their lack of standard chemical potentials of species. Therefore, we present in this work a simple conversion approach that calculates apparent standard chemical potentials of species from equilibrium constants of reactions. We assess the consistency and accuracy of the use of apparent standard chemical potentials in GEM algorithms by benchmarking equilibrium speciation calculations using GEM and LMA methods with the same LMA database. In all cases, we use PHREEQC to perform the LMA calculations, and we use its LMA databases to calculate the equilibrium constants of reactions. GEM calculations are performed using a Gibbs energy minimization method of Reaktoro — a unified open-source framework for numerical modeling of chemically reactive systems. By comparing the GEM and LMA results, we show that the use of apparent standard chemical potentials in GEM methods produces consistent and accurate equilibrium speciation results, thus validating our new, practical conversion technique that enables GEM algorithms to take advantage of many existing LMA databases, consequently extending and diversifying their range of applicability. / Download |

4. | A.M.M. Leal, D.A. Kulik, G. Koskowski Computational methods for reactive transport modeling: A Gibbs energy minimization approach for multiphase equilibrium calculations, Advances in Water Resources, 88, pp. 231-240, 2016. Abstract We present a numerical method for multiphase chemical equilibrium calculations based on a Gibbs energy minimization approach. The method can accurately and efficiently determine the stable phase assemblage at equilibrium independently of the type of phases and species that constitute the chemical system. We have successfully applied our chemical equilibrium algorithm in reactive transport simulations to demonstrate its effective use in computationally intensive applications. We used FEniCS to solve the governing partial differential equations of mass transport in porous media using finite element methods in unstructured meshes. Our equilibrium calculations were benchmarked with GEMS3K, the numerical kernel of the geochemical package GEMS. This allowed us to compare our results with a well-established Gibbs energy minimization algorithm, as well as their performance on every mesh node, at every time step of the transport simulation. The benchmark shows that our novel chemical equilibrium algorithm is accurate, robust, and efficient for reactive transport applications, and it is an improvement over the Gibbs energy minimization algorithm used in GEMS3K. The proposed chemical equilibrium method has been implemented in Reaktoro, a unified framework for modeling chemically reactive systems, which is now used as an alternative numerical kernel of GEMS. / Download |

3. | A.M.M. Leal, M.J. Blunt, T.C. LaForce A chemical kinetics algorithm for geochemical modelling, Applied Geochemistry, 55, pp. 46-61, 2015. Abstract A chemical kinetics algorithm is presented for geochemical applications. The algorithm is capable of handling both equilibrium- and kinetically-controlled reactions in multiphase systems. The ordinary differential equations (ODEs) are solved using an implicit multistep backward differentiation formula (BDF) algorithm to ensure efficiency and stability when integrating stiff ODEs. An adaptive control scheme of the time step is adopted to guarantee small steps in steeper regions and large steps in smoother regions of the integration. Analytical derivatives of the reaction rates and species activities are used to permit the use of larger time steps, and to increase the robustness of the calculations. The chemical equilibrium calculations are performed using a Gibbs free energy minimisation algorithm, which is based on a trust-region interior-point method adapted with a watchdog strategy that yields quadratic rates of convergence near the solution. The chemical kinetics algorithm is applied to geochemical problems relevant to carbon storage in saline aquifers. The calculations assume aqueous, gaseous and mineral phases, where the kinetics of the waterâ€“gasâ€“rock interactions are investigated. The results allow us to estimate the time frames at which brine of different salinities and supercritical CO2 attains equilibrium with a carbonate rock, as well as the amount of carbon dioxide trapped by solubility and mineralisation mechanisms. / Download |

2. | A.M.M. Leal, M.J. Blunt, T.C. LaForce Efficient chemical equilibrium calculations for geochemical speciation and reactive,transport modelling, Geochimica et Cosmochimica Acta, 131, pp. 301-322, 2014. Abstract Chemical equilibrium calculations are essential for many environmental problems. It is also a fundamental tool for chemical kinetics and reactive transport modelling, since these applications may require hundreds to billions equilibrium calculations in a single simulation. Therefore, an equilibrium method for such critical applications must be very efficient, robust and accurate. In this work we demonstrate the potential effectiveness of a novel Gibbs energy minimisation algorithm for reactive transport simulations. The algorithm includes strategies to converge from poor initial guesses; capabilities to specify non-linear equilibrium constraints such as pH of an aqueous solution and activity or fugacity of a species; a rigorous phase stability test to determine the unstable phases; and a strategy to boost the convergence speed of the calculations to quadratic rates, requiring only few iterations to converge. We use this equilibrium method to solve geochemical problems relevant to carbon storage in saline aquifers, where aqueous, gaseous and minerals phases are present. The problems are formulated to mimic the ones found in kinetics and transport simulations, where a sequence of equilibrium calculations are performed, each one using the previous solution as the initial guess. The efficiency and convergence rates of the calculations are presented, which require an average of 1â€“2 iterations. These results indicate that critical applications such as chemical kinetics and reactive transport modelling can potentially benefit by using this multiphase equilibrium algorithm. / Download |

1. | A.M.M. Leal, M.J. Blunt, T.C. LaForce A robust and efficient numerical method for multiphase equilibrium calculations: Application to CO2-brine-rock systems at high temperatures, pressures and salinities, Advances in Water Resources, 62(Part C), pp. 409-430, 2013. Abstract We present a robust and efficient method for calculating chemical equilibria of general multiphase systems. The method is based on a stoichiometric approach, which uses Newtonâ€™s method to solve a system of mass-action equations coupled with a system of equilibrium constraints. A stabilisation procedure is developed to promote convergence of the calculation when a presupposed phase in the chemical system is absent in the equilibrium state. The formulation of the chemical equilibrium problem is developed by presuming no specific details of the involved phases and species. As a consequence, the method is flexible and general enough so that the calculation can be customised with a combination of thermodynamic models that are appropriate for the problem of interest. Finally, we show the use of the method to solve relevant geochemical equilibrium problems for modelling carbon storage in highly saline aquifers. / Download |

### THESES

2. | A. Leal Computational methods for geochemical modelling: Applications to carbon dioxide sequestration, Theses PhD, 2014. no_download |

1. | A. Leal Four phase equilibrium and partitioning calculations for sequestration of carbon dioxide and hydrogen sulfide in deep saline aquifers, Theses MSc, 2010. no_download |

show/hide list of publications

### REFEREED PUBLICATIONS IN JOURNALS

7. | A.M.M. Leal, D.A. Kulik, W.R. Smith, M.O. Saar An overview of computational methods for chemical equilibrium and kinetic calculations for geochemical and reactive transport modeling, Pure and Applied Chemistry, 89/5, pp. 597-643, 2017. Abstract We present an overview of novel numerical methods for chemical equilibrium and kinetic calculations for complex non-ideal multiphase systems. The methods we present for equilibrium calculations are based either on Gibbs energy minimization (GEM) calculations or on solving the system of extended law of mass-action (xLMA) equations. In both methods, no a posteriori phase stability tests, and thus no tentative addition or removal of phases during or at the end of the calculations, are necessary. All potentially stable phases are considered from the beginning of the calculation, and stability indices are immediately available at the end of the computation to determine which phases are actually stable at equilibrium. Both GEM and xLMA equilibrium methods are tailored for computationally demanding applications that require many rapid local equilibrium calculations, such as reactive transport modeling. The numerical method for chemical kinetic calculations we present supports both closed and open systems, and it considers a partial equilibrium simplification for fast reactions. The method employs an implicit integration scheme that improves stability and speed when solving the often stiff differential equations in kinetic calculations. As such, it requires compositional derivatives of the reaction rates to assemble the Jacobian matrix of the resultant implicit algebraic equations that are solved at every time step. We present a detailed procedure to calculate these derivatives, and we show how the partial equilibrium assumption affects their computation. These numerical methods have been implemented in Reaktoro (reaktoro.org), an open-source software for modeling chemically reactive systems. We finish with a discussion on the comparison of these methods with others in the literature. / Download |

6. | A.M.M. Leal, D. Kulik, G. Kosakowski, M.O. Saar Computational methods for reactive transport modeling: An extended law of mass-action, xLMA, method for multiphase equilibrium calculations, Advances in Water Resources, 96, pp. 405-422, 2016. Abstract We present a numerical method for multiphase chemical equilibrium calculations based on a Gibbs energy minimization approach. The method can accurately and efficiently determine the stable phase assemblage at equilibrium independently of the type of phases and species that constitute the chemical system. We have successfully applied our chemical equilibrium algorithm in reactive transport simulations to demonstrate its effective use in computationally intensive applications. We used FEniCS to solve the governing partial differential equations of mass transport in porous media using finite element methods in unstructured meshes. Our equilibrium calculations were benchmarked with GEMS3K, the numerical kernel of the geochemical package GEMS. This allowed us to compare our results with a well-established Gibbs energy minimization algorithm, as well as their performance on every mesh node, at every time step of the transport simulation. The benchmark shows that our novel chemical equilibrium algorithm is accurate, robust, and efficient for reactive transport applications, and it is an improvement over the Gibbs energy minimization algorithm used in GEMS3K. The proposed chemical equilibrium method has been implemented in Reaktoro, a unified framework for modeling chemically reactive systems, which is now used as an alternative numerical kernel of GEMS. / Download |

5. | A.M.M. Leal, D.A. Kulik, M.O. Saar Enabling Gibbs energy minimization algorithms to use equilibrium constants of reactions in multiphase equilibrium calculations, Chemical Geology, 437, pp. 170-181, 2016. Abstract The geochemical literature provides numerous thermodynamic databases compiled from equilibrium constants of reactions. These databases are typically used in speciation calculations based on the law of mass action (LMA) approach. Unfortunately, such LMA databases cannot be directly used in equilibrium speciation methods based on the Gibbs energy minimization (GEM) approach because of their lack of standard chemical potentials of species. Therefore, we present in this work a simple conversion approach that calculates apparent standard chemical potentials of species from equilibrium constants of reactions. We assess the consistency and accuracy of the use of apparent standard chemical potentials in GEM algorithms by benchmarking equilibrium speciation calculations using GEM and LMA methods with the same LMA database. In all cases, we use PHREEQC to perform the LMA calculations, and we use its LMA databases to calculate the equilibrium constants of reactions. GEM calculations are performed using a Gibbs energy minimization method of Reaktoro — a unified open-source framework for numerical modeling of chemically reactive systems. By comparing the GEM and LMA results, we show that the use of apparent standard chemical potentials in GEM methods produces consistent and accurate equilibrium speciation results, thus validating our new, practical conversion technique that enables GEM algorithms to take advantage of many existing LMA databases, consequently extending and diversifying their range of applicability. / Download |

4. | A.M.M. Leal, D.A. Kulik, G. Koskowski Computational methods for reactive transport modeling: A Gibbs energy minimization approach for multiphase equilibrium calculations, Advances in Water Resources, 88, pp. 231-240, 2016. Abstract |

3. | A.M.M. Leal, M.J. Blunt, T.C. LaForce A chemical kinetics algorithm for geochemical modelling, Applied Geochemistry, 55, pp. 46-61, 2015. Abstract A chemical kinetics algorithm is presented for geochemical applications. The algorithm is capable of handling both equilibrium- and kinetically-controlled reactions in multiphase systems. The ordinary differential equations (ODEs) are solved using an implicit multistep backward differentiation formula (BDF) algorithm to ensure efficiency and stability when integrating stiff ODEs. An adaptive control scheme of the time step is adopted to guarantee small steps in steeper regions and large steps in smoother regions of the integration. Analytical derivatives of the reaction rates and species activities are used to permit the use of larger time steps, and to increase the robustness of the calculations. The chemical equilibrium calculations are performed using a Gibbs free energy minimisation algorithm, which is based on a trust-region interior-point method adapted with a watchdog strategy that yields quadratic rates of convergence near the solution. The chemical kinetics algorithm is applied to geochemical problems relevant to carbon storage in saline aquifers. The calculations assume aqueous, gaseous and mineral phases, where the kinetics of the waterâ€“gasâ€“rock interactions are investigated. The results allow us to estimate the time frames at which brine of different salinities and supercritical CO2 attains equilibrium with a carbonate rock, as well as the amount of carbon dioxide trapped by solubility and mineralisation mechanisms. / Download |

2. | A.M.M. Leal, M.J. Blunt, T.C. LaForce Efficient chemical equilibrium calculations for geochemical speciation and reactive,transport modelling, Geochimica et Cosmochimica Acta, 131, pp. 301-322, 2014. Abstract Chemical equilibrium calculations are essential for many environmental problems. It is also a fundamental tool for chemical kinetics and reactive transport modelling, since these applications may require hundreds to billions equilibrium calculations in a single simulation. Therefore, an equilibrium method for such critical applications must be very efficient, robust and accurate. In this work we demonstrate the potential effectiveness of a novel Gibbs energy minimisation algorithm for reactive transport simulations. The algorithm includes strategies to converge from poor initial guesses; capabilities to specify non-linear equilibrium constraints such as pH of an aqueous solution and activity or fugacity of a species; a rigorous phase stability test to determine the unstable phases; and a strategy to boost the convergence speed of the calculations to quadratic rates, requiring only few iterations to converge. We use this equilibrium method to solve geochemical problems relevant to carbon storage in saline aquifers, where aqueous, gaseous and minerals phases are present. The problems are formulated to mimic the ones found in kinetics and transport simulations, where a sequence of equilibrium calculations are performed, each one using the previous solution as the initial guess. The efficiency and convergence rates of the calculations are presented, which require an average of 1â€“2 iterations. These results indicate that critical applications such as chemical kinetics and reactive transport modelling can potentially benefit by using this multiphase equilibrium algorithm. / Download |

1. | A.M.M. Leal, M.J. Blunt, T.C. LaForce A robust and efficient numerical method for multiphase equilibrium calculations: Application to CO2-brine-rock systems at high temperatures, pressures and salinities, Advances in Water Resources, 62(Part C), pp. 409-430, 2013. Abstract We present a robust and efficient method for calculating chemical equilibria of general multiphase systems. The method is based on a stoichiometric approach, which uses Newtonâ€™s method to solve a system of mass-action equations coupled with a system of equilibrium constraints. A stabilisation procedure is developed to promote convergence of the calculation when a presupposed phase in the chemical system is absent in the equilibrium state. The formulation of the chemical equilibrium problem is developed by presuming no specific details of the involved phases and species. As a consequence, the method is flexible and general enough so that the calculation can be customised with a combination of thermodynamic models that are appropriate for the problem of interest. Finally, we show the use of the method to solve relevant geochemical equilibrium problems for modelling carbon storage in highly saline aquifers. / Download |

### THESES

2. | A. Leal Computational methods for geochemical modelling: Applications to carbon dioxide sequestration, Theses PhD, 2014. no_download |

1. | A. Leal Four phase equilibrium and partitioning calculations for sequestration of carbon dioxide and hydrogen sulfide in deep saline aquifers, Theses MSc, 2010. no_download |