Computational Geosciences

, Volume 21, Issue 1, pp 131–150 | Cite as

Comparison of linear solvers for equilibrium geochemistry computations

  • Hela Machat
  • Jérôme Carrayrou
Original Paper


Equilibrium chemistry computations and reactive transport modelling require the intensive use of a linear solver under very specific conditions. The systems to be solved are small or very small (4 × 4 to 20 × 20, occasionally larger) and are very ill-conditioned (condition number up to 10100). These specific conditions have never been investigated in terms of the robustness, accuracy, and efficiency of the linear solver. In this work, we present the specificity of the linear system to be solved. Several direct and iterative solvers are compared using a panel of chemical systems, including or excluding the formation of mineral species. We show that direct and iterative solvers can be used for these problems and propose computational keys to improve the chemical solvers.


Geochemical modelling Instantaneous equilibrium chemistry Linear system inversion Linear solver Small matrix Ill-conditioned matrix Newton-Raphson algorithm 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Supplementary material

10596_2016_9600_MOESM1_ESM.xlsx (228 kb)
(XLSX 228 KB)
10596_2016_9600_MOESM2_ESM.docx (310 kb)
(DOCX 309 KB)
10596_2016_9600_MOESM3_ESM.docx (1.8 mb)
(DOCX 1.76 MB)
10596_2016_9600_MOESM4_ESM.docx (2.7 mb)
(DOCX 2.72 MB)
10596_2016_9600_MOESM5_ESM.docx (3.2 mb)
(DOCX 3.15 MB)
10596_2016_9600_MOESM6_ESM.docx (2.9 mb)
(DOCX 2.87 MB)
10596_2016_9600_MOESM7_ESM.docx (815 kb)
(DOCX 814 KB)


  1. 1.
    Walter, A.L., et al.: Modeling of multicomponent reactive transport in groundwater. 2. Metal mobility in aquifers impacted by acidic mine tailings discharge. Water Resour. Res. 30(11), 3149–3158 (1994)CrossRefGoogle Scholar
  2. 2.
    Arora, B., et al.: A reactive transport benchmark on heavy metal cycling in lake sediments Computational Geosciences (2014)Google Scholar
  3. 3.
    De Windt, L., Leclercq, S., Van der Lee, J.: Assessing the durability of nuclear glass with respect to silica controlling processes in a clayey underground disposal. In: 29th International Symposium on the Scientific Basis for Nuclear Waste Management XXIX. Materials Research Society Symposium Proceedings, Ghent; Belgium (2005)Google Scholar
  4. 4.
    Hoteit, H., Ackerer, P., Mose, R.: Nuclear waste disposal simulations: Couplex test cases. Comput. Geosci. 8(2), 99–124 (2004)CrossRefGoogle Scholar
  5. 5.
    Tompson, A.F.B., et al.: On the evaluation of groundwater contamination from underground nuclear tests. Environ. Geol. 42(2-3), 235–247 (2002)CrossRefGoogle Scholar
  6. 6.
    Andre, L., et al.: Numerical modeling of fluid-rock chemical interactions at the supercritical CO2-liquid interface during CO2 injection into a carbonate reservoir, the Dogger aquifer (Paris Basin, France). Energy Convers. Manag. 48(6), 1782–1797 (2007)CrossRefGoogle Scholar
  7. 7.
    Kang, Q., et al.: Pore scale modeling of reactive transport involved in geologic CO2 sequestration. Transp. Porous Media 82(1), 197–213 (2010)CrossRefGoogle Scholar
  8. 8.
    Navarre-Sitchler, A.K., et al.: Elucidating geochemical response of shallow heterogeneous aquifers to CO2 leakage using high-performance computing: implications for monitoring of CO2 sequestration. Adv. Water Resour. 53(0), 45–55 (2013)CrossRefGoogle Scholar
  9. 9.
    Pruess, K., et al.: Code intercomparison builds confidence in numerical simulation models for geologic disposal of CO2. Energy 29(9-10), 1431–1444 (2004)CrossRefGoogle Scholar
  10. 10.
    Regnault, O., et al.: Etude experimentale de la reactivite du CO2 supercritique vis-a-vis de phases minerales pures. Implications pour la sequestration geologique de CO2. Compt. Rendus Geosci. 337(15), 1331–1339 (2005)CrossRefGoogle Scholar
  11. 11.
    Valocchi, A.J., Street, R.L., Roberts, P.V.: Transport of ion-exchanging solutes in groundwater: chromatographic theory and field simulation. Water Resour. Res. 17, 1517–1527 (1981)CrossRefGoogle Scholar
  12. 12.
    Lichtner, P.C.: Continuum model for simultaneous chemical reactions and mass transport in hydrothermal systems. Geochim. Cosmochim. Acta 49(3), 779–800 (1985)CrossRefGoogle Scholar
  13. 13.
    Appelo, C.A.J.: Hydrogeochemical transport modelling. Proceed. Inf.—Comm. Hydrol. Res. TNO 43, 81–104 (1990)Google Scholar
  14. 14.
    Yeh, G.T., Tripathi, V.S.: A critical evaluation of recent developments in hydrogeochemical transport models of reactive multichemical components. Water Resour. Res. 25, 93–108 (1989)CrossRefGoogle Scholar
  15. 15.
    Carrayrou, J., et al.: Comparison of numerical methods for simulating strongly nonlinear and heterogeneous reactive transport problems—the MoMaS benchmark case. Computational Geosciences 14(3), 483–502 (2010)CrossRefGoogle Scholar
  16. 16.
    Hammond, G.E., Valocchi, A.J., Lichtner, P.C.: Modeling multicomponent reactive transport on parallel computers using Jacobian-Free Newton Krylov with operator-split preconditioning. In: Hassanizadeh, S.M. (ed.) Developments in water science, computational methods in water resources, Proceedings of the XIVth International Conference on Computational Methods in Water Resources (CMWR XIV), pp 727–734. Elsevier (2002)Google Scholar
  17. 17.
    Carrayrou, J., Mosé, R., Behra, P.: New efficient algorithm for solving thermodynamic chemistry. AIChE J. 48(4), 894–904 (2002)CrossRefGoogle Scholar
  18. 18.
    Amir, L., Kern, M.: A global method for coupling transport with chemistry in heterogeneous porous media. Comput. Geosci. 14(3), 465–481 (2010)CrossRefGoogle Scholar
  19. 19.
    Quarteroni, A., Sacco, R., Saleri, F.: Numerical mathematics. In: Marsden, J.E., Sirovich, L., Antman. S.S. (eds.) Texts in Applied Mathematics. 2nd edn. Springer, Heidelberg (2007)Google Scholar
  20. 20.
    Axelsson, O., et al.: Direct solution and incomplete factorization preconditioned conjugate gradient methods. Comparison of algebraic solution methods on a set of benchmark problems in linear elasticity, in STW report. 2000, Department of Mathematics, Catholic University of Nijmegen: Nijmegen, The Netherlands. pp. 1-36Google Scholar
  21. 21.
    Barrett, R., Berry, M., Chan, T.F., Demmel, J., Donato, J., Dongarra, J., Eijkhout, V., Pozo, R., Romine, C., Van Der Vorst, H.: Templates for the solution of linear systems: building blocks for iterative methods, 2nd edn. SIAM, Philadelphia (1994)CrossRefGoogle Scholar
  22. 22.
    Gould, N.I.M., Hu, Y., Scott, J.A.: A numerical evaluation of sparse direct solvers for the solution of large sparse, symmetric linear systems of equations. 2005, Council for the Central Laboratory of the Research CouncilsGoogle Scholar
  23. 23.
    Allaire, G., Kaber, S.M. In: Marsden, J.E., Sirovich, L., Antman, S.S. (eds.) : Numerical linear algebra. Texts in applied mathematics. Springer, New York (2008)Google Scholar
  24. 24.
    Baldwin, C., et al.: Iterative linear solvers in a 2D radiation-hydrodynamics code: methods and performance. J. Comput. Phys. 154(1), 1–40 (1999)CrossRefGoogle Scholar
  25. 25.
    Chao B.T., L.H.L., Scott, E.J.: On the solution of ill-conditioned, simultaneous, linear, algebraic equations by machine computation, in University of Illinois Bulletin. 1961, University of IllinoisGoogle Scholar
  26. 26.
    Hadjidimos, A.: Successive overrelaxation (SOR) and related methods. J. Comput. Appl. Math. 123(1-2), 177–199 (2000)CrossRefGoogle Scholar
  27. 27.
    Kalambi, I.B.: A comparison of three iterative methods for the solution of linear equations. J. Appl. Sci. Environ. Manag. 12(4), 53–55 (2008)Google Scholar
  28. 28.
    Klisinski, M., Runesson, K.: Improved symmetric and non-symmetric solvers for FE calculations. Adv. Eng. Softw. 18(1), 41–51 (1993)CrossRefGoogle Scholar
  29. 29.
    Schenk, O., Gartner, K.: Solving unsymmetric sparse systems of linear equations with PARDISO. Fut. Gener. Comput. Syst. 20(3), 475–487 (2004)CrossRefGoogle Scholar
  30. 30.
    Xue, X.J., et al.: A direct algorithm for solving ill-conditioned linear algebraic systems. JCPDS-Int. Centre Diffract. Data Adv. X-ray Anal. 42, 629–633 (2000)Google Scholar
  31. 31.
    Pyzara, A., Bylina, B., Bylina, J.: The influence of a matrix condition number on iterative methods’ convergence (2011)Google Scholar
  32. 32.
    Hoffmann, J., Kras̈utle, S., Knabner, P.: A parallel global-implicit 2-D solver for reactive transport problems in porous media based on a reduction scheme and its application to the MoMaS benchmark problem. Comput. Geosci. 14(3), 421–433 (2010)CrossRefGoogle Scholar
  33. 33.
    Soleymani, F.: A new method for solving ill-conditioned linear systems. Opuscula Math. 33(2), 337–344 (2013)CrossRefGoogle Scholar
  34. 34.
    Morel, F., Morgan, J.: A numerical method for computing equilibria in aqueous chemical systems. Environ. Sci. Technol. 6(1), 58–67 (1972)CrossRefGoogle Scholar
  35. 35.
    Morel, F.M.M.: Principles of aquatic chemistry. Wiley Interscience, New York (1983)Google Scholar
  36. 36.
    De Windt, L., et al.: Intercomparison of reactive transport models applied to UO2 oxidative dissolution and uranium migration. J. Contam. Hydrol. 61(1-4), 303–312 (2003)CrossRefGoogle Scholar
  37. 37.
    Jauzein, M., et al.: A flexible computer code for modelling transport in porous media: impact. Geoderma 44(2–3), 95– 113 (1989)CrossRefGoogle Scholar
  38. 38.
    Parkhurst, D.L., Appelo, C.A.J.: User’s guide to PHREEQC (version 2)—a computer program for speciation, batch-reaction, one-dimensional transport, and inverse geochemical calculations. Water Resour. Invest., Editor. 1999: Denver. p. 312Google Scholar
  39. 39.
    Van der Lee, J.: CHESS another speciation and surface complexation computer code. E.d.M.d. Paris, Editor. 1993: Fontainebleau. p. 85Google Scholar
  40. 40.
    Westall, J.C.: MICROQL: a chemical equilibrium program in BASIC. Computation of adsorption equilibria in BASIC. S.F.I.o.T. EAWAG, Editor. 1979: Dübandorf. p. 42Google Scholar
  41. 41.
    Westall, J.C.: FITEQL ver. 2.1. 1982: CorvallisGoogle Scholar
  42. 42.
    Westall, J.C., Zachary, J.L., Morel, F.M.M.: MINEQL: a computer program for the calculation of chemical equilibrium composition of aqueous system. R.M.P. Laboratory, Editor. 1976: Cambridge. p. 91Google Scholar
  43. 43.
    Walter, L.J., Wolery, T.J.: A monotone-sequences algorithm and FORTRAN IV program for calculation of equilibrium distributions of chemical species. Comput. Geosci. 1, 57–63 (1975)CrossRefGoogle Scholar
  44. 44.
    Wigley, T.M.L.: WATSPEC: a computer program for determining the equilibrium speciation of aqueous solutions. B.G.R.G. Tech. Bull., Editor. 1977. p. 49Google Scholar
  45. 45.
    Jennings, A.A., Kirkner, D.J., Theis, T.L.: Multicomponent equilibrium chemistry in groundwater quality models. Water Resour. Res. 18, 1089–1096 (1982)CrossRefGoogle Scholar
  46. 46.
    Cederberg, A., Street, R.L., Leckie, J.O.: A groundwater mass transport and equilibrium chemistry model for multicomponent systems. Water Resour Res. 21, 1095–1104 (1985)CrossRefGoogle Scholar
  47. 47.
    Yeh, G.T., Tripathi, V.S.: A model for simulating transport of reactive multispecies components: model development and demonstration. Water Resour. Res. 27(12), 3075–3094 (1991)CrossRefGoogle Scholar
  48. 48.
    Carrayrou, J.: Looking for some reference solutions for the reactive transport benchmark of MoMaS with SPECY. Comput. Geosci. 14(3), 393–403 (2010)CrossRefGoogle Scholar
  49. 49.
    Brassard, P., Bodurtha, P.: A feasible set for chemical speciation problems. Comput. Geosci. 26(3), 277–291 (2000)CrossRefGoogle Scholar
  50. 50.
    Carrayrou, J., Kern, M., Knabner, P.: Reactive transport benchmark of MoMaS. Comput. Geosci. 14 (3), 385–392 (2010)CrossRefGoogle Scholar
  51. 51.
    Fendorf, S.E., Li, G.: Kinetics of chromate reduction by ferrous iron. Environ. Sci. Technol. 30(5), 1614–1617 (1996)CrossRefGoogle Scholar
  52. 52.
    Chilakapati, A., et al.: Groundwater flow, multicomponent transport and biogeochemistry: development and application of a coupled process model. J. Contam. Hydrol. 43(3-4), 303–325 (2000)CrossRefGoogle Scholar
  53. 53.
    Knight, P., Ruiz, D., Ucar, B.: A symmetry preserving algorithm for matrix scaling. SIAM J. Matrix Anal. Appl. 35(3), 931–955 (2014)CrossRefGoogle Scholar
  54. 54.
    Golub, H.V., Van Loan, C.F.: Matrix computations. 3rd ed. The Johns Hopkins University Press, Baltimore (1996)Google Scholar
  55. 55.
    Davis, T.A., Duff, I.S.: A combined unifrontal/multifrontal method for unsymmetric sparse matrices. ACM Trans. Math. Softw. 25(1), 1–20 (1999)CrossRefGoogle Scholar
  56. 56.
    Woźnicki, Z.: On performance of SOR method for solving nonsymmetric linear systems. J. Comput. Appl. Math. 137(1), 145–176 (2001)CrossRefGoogle Scholar
  57. 57.
    Saad, Y., Van Der Vorst, H.A.: Iterative solution of linear systems in the 20th century. J. Comput. Appl. Math. 123(1-2), 1–33 (2000)CrossRefGoogle Scholar
  58. 58.
    Diersch, H.J.G.: FEFLOW reference manual. DHI-WASY GmbH, Berlin (2009)Google Scholar
  59. 59.
    Van der Lee, J., et al.: Presentation and application of the reactive transport code HYTEC. In: Hassanizadeh, S.M. (ed.) Developments in Water Science, Computational Methods in Water Resources, Proceedings of the XIVth International Conference on Computational Methods in Water Resources (CMWR XIV), pp 599–606. Elsevier (2002)Google Scholar
  60. 60.
    Press, W.H., S.A.T., Vettering, W.T., Flannery, B.P.: Numerical recipes in FORTRAN: the art of scientific computation, 2nd edn., pp 123–124. Cambridge University Press, New Yor (1992)Google Scholar
  61. 61.
    The Linear Algebra Package (LAPACK) can be obtained free of charge from the address listed here:
  62. 62.
    Kincaid, D., Cheney, W.: Numerical analysis: mathematics of scientific computing, 3rd edn. American Mathematical Society (2002)Google Scholar
  63. 63.
    HSL: A collection of Fortran codes for large scale scientific computation. (2013)
  64. 64.
    Chapter 8 Systems of nonlinear equations. In: Studies in computational mathematics, Claude, B. Editor. 1997, Elsevier. pp. 287–336Google Scholar
  65. 65.
    Soleymani, F.: A rapid numerical algorithm to compute matrix inversion. Int. J. Math. Math. Sci. 2012 (2012)Google Scholar
  66. 66.
    Soleymani, F.: On a fast iterative method for approximate inverse of matrices. Commun. Korean Math. Soc. 28(2), 407–418 (2013)CrossRefGoogle Scholar
  67. 67.
    Morin, K.A.: Simplified explanations and examples of computerized methods for calculating chemical equilibrium in water. Comput. Geosci. 11, 409–416 (1985)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  1. 1.CNRS, ENGEES, LHyGeS UMR 7517Université de StrasbourgStrasbourgFrance
  2. 2.Ecole Supérieure des Ingénieur de l’Equipement Rural de Medjez el BabUniversité de JendoubaJendoubaTunisia
  3. 3.Université de Monastir, UR13ES63-Chimie Appliquée et EnvironnementMonastirTunisia

Personalised recommendations