Abstract
We accelerate reactive transport (RT) simulation by replacing the geochemical solver in the RT code by a surrogate model or emulator, considering either a trained deep neural network (DNN) or a k-nearest neighbor (kNN) regressor. We focus on 2D leaching of hardened cement paste under diffusive or advective-dispersive transport conditions, a solid solution representation of the calcium silicate hydrates and either 4 or 7 chemical components, and use the HPx (coupled Hydrus-PHREEQC model) reactive transport code as baseline. We find that after training, both our DNN-based and kNN-based codes, \(\hbox {HPx}_{\rm{py}}\)-DNN and \(\hbox {HPx}_{\rm{py}}\)-kNN, can make satisfactorily to very accurate predictions while providing either a 3 to 9 speedup factor compared to HPx with parallelized geochemical calculations over 4 cores. Benchmarking against single-threaded HPx, these speedup factors become 8 to 33. Overall, \(\hbox {HPx}_{\rm{py}}\)-DNN and \(\hbox {HPx}_{\rm{py}}\)-kNN are found to achieve a close to optimal speedup when DNN regression and kNN search are performed on a GPU. Importantly, for the more complex 7-components cement system, no emulator that is globally accurate over the full space of possible geochemical conditions could be devised. Instead we therefore build “local” emulators that are only valid over a relevant fraction of the input parameter space. This space is identified by running a coarse and thus computationally cheap full RT simulation, and subsequently explored by kernel density sampling. Future work will focus on improving accuracy for this type of cement systems.
Similar content being viewed by others
Availability of data, code and material
A example code of the approaches presented in this study is available upon request to the authors. An example with the newest version of HYDRUS - HPx will be posted online in September 2022.
References
Cybenko, G.: Approximations by superpositions of sigmoidal functions. Math. Control Signals Syst. 2(4), 303–314 (1989)
De Lucia, M., Kühn, M.: DecTree v1.0—chemistry speedup in reactive transport simulations: purely data-driven and physics-based surrogates. Geosci. Model Dev. 14, 4713–4730 (2021). https://doi.org/10.5194/gmd-14-4713-2021
Goodfellow, I., Bengio, Y., Courville, A.: Deep Learning. MIT Press (2016). http://www.deeplearningbook.org
Guérillot, D., Bruyelle, J.: Geochemical equilibrium determination using an artificial neural network in compositional reservoir flow simulation. Comput. Geosci. 24, 697–707 (2020). https://doi.org/10.1007/s10596-019-09861-4
Hastie, T. Tibshirani, R., Friedman, J.: The Elements of Statistical Learning: Data Mining, Inference, and Prediction, 2nd edn. Springer (2009). ISBN: 978-0-387-84858-7
Hornik, K.: Approximation capabilities of multilayer feedforward networks. Neural Netw. 4(2), 251–257 (1991). https://doi.org/10.1016/0893-6080(91)90009-T
Huang, Y., Shao, H., Wieland, E., Kolditz, O., Kosakowski: A new approach to coupled two-phase reactive transport simulation for long-term degradation of concrete. J. Construct. Build. Mater. 190, 805–829 (2018). https://doi.org/10.1016/j.conbuildmat.2018.09.114
Jacques, D., Šimůnek, J., Mallants, D., van Genuchten, M.T.: The HPx software for multicomponent reactive transport during variably-saturated flow: recent developments and applications. J. Hydrol. Hydromech. 66(2), 211–226 (2018). https://doi.org/10.1515/johh-2017-0049
Jatnieks, J., De Lucia, M., Dransch, D., Sips, M.: Data-driven surrogate model approach for improving the performance of reactive transport simulations. Energy Proc. 97, 447–453 (2016). https://doi.org/10.1016/j.egypro.2016.10.047
Joe, S., Kuo, F.Y.: Remark on Algorithm 659: implementing Sobol’s quasirandom sequence generator. ACM Trans. Math. Softw. 29, 49–57 (2003)
Johnson, J., Douze, M., Jégou, H.: Billion-scale similarity search with GPUs (2017). arXiv preprint arXiv:1702.08734
Kingma, D.P., Ba, J.L.: Adam: a method for stochastic optimization. In: The International Conference on Learning Representations (ICLR), San Diego (2015). arXiv preprint arXiv:1412.6980v9
Klambauer, G., Unterthiner, T., Mayr, A., Hochreiter, S.: Self-normalizing neural networks. In: Advances in Neural Information Processing Systems (NIPS), p. 30 (2017). arXiv preprint arXiv:1706.02515v5
Kulik, D.A.: Improving the structural consistency of C–S–H solid solution thermodynamic models. Cem. Concr. Res. 41, 477–495 (2011)
Leal, A.M., Kulik, D.A., Saar, M.O.: Enabling Gibbs energy minimization algorithms to use equilibrium constants of reactions in multiphase equilibrium calculations. Chem. Geol. 437, 170–181 (2016)
Leal, A.M., Kulik, D.A. and Saar, M.O.: Ultra-fast reactive transport simulations when chemical reactions meet machine learning: chemical equilibrium (2017). arXiv preprint arXiv:1708.04825
Leal, A.M.M., Kyas, S., Kulik, D.A., Saar, M.O.: Accelerating reactive transport modeling: on-demand machine learning algorithm for chemical equilibrium calculations. Transp. Porous Media 133(2), 161–204 (2020). https://doi.org/10.1007/s11242-020-01412-1
Lothenbach, B., Kulik, D.A., Matschei, T., Balonis, M., Baquerizo, L., Dilnesa, B., Miron, G.D., Myers, R.J.: Cemdata18: a chemical thermodynamic database for hydrated Portland cements and alkali-activated materials. Cem. Concr. Res. 115, 472–506 (2019)
Parkhurst, D.L., Appelo, C.A.J.: Description of input and examples for PHREEQC version 3: a computer program for speciation, batch-reaction, one-dimensional transport, and inverse geochemical calculations U.S. Geol. Surv. Techniques and Methods 6-A43. Chapter 43 of Section A: Groundwater in Book 6 Modeling Techniques (2013). https://pubs.er.usgs.gov/publication/tm6A43
Paszke, A., Gross, S., Chintala, S., Chanan, G., Yang, E., De Vito, Z., Lin, Z., Desmaison, A., Antiga, L., Lerer, A.: Automatic differentiation in PyTorch. In: The Annual Conference on Neural Information Processing Systems 31 (NIPS) (2017)
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., Duchesnay, E.: Scikit-learn: machine learning in python. J. Mach. Learn. Res. 12, 2825–2830 (2011)
Prasianakis, N.I., Haller, R., Mahrous, M., Poonoosamy, J., Pfingsten, W., Churakov, S.V.: Neural network based process coupling and parameter upscaling in reactive transport simulations. Geochim. Cosmochim. Acta 291, 126–143 (2020). https://doi.org/10.1016/j.gca.2020.07.019
Šimůnek, J., Sejna, M., Saito, H., Sakai, K., and van Genuchten, M. T.: The Hydrus-1D Software Package for Simulating the Movement of Water, Heat, and Multiple Solutes in Variably Saturated Media, Version 4.17. Department of Environmental Sciences, University of California Riverside, Riverside (2013)
Sobol, I.M.: The distribution of points in a cube and the accurate evaluation of integrals. Zh. Vych. Mat. Mat. Fiz. 7: 784–802 (in Russian). U.S.S.R Comput. Maths. Math. Phys. 7, 86–112 (1967). (in English)
Funding
This work received partial funding from the EU project EURAD WP4-DONUT of the European Union’s Horizon 2020 research and innovation program under grant agreement no. 847593.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix: Details of the Used DNN
Appendix: Details of the Used DNN
Let us denote the input and output space dimensions by \(N_{\rm{in}}\) and \(N_{\rm{out}}\), and a given reference number of hidden neurons as \(NN_{\rm{h}}\). A fully connected layer (FC) with a selu activation function taking a \(N_{\rm{in}}\)-dimensional input and producing a \(N_{\rm{out}}\)-dimensional output using a self-exponential activation function (SELU) is then referred to as \(\left[ FC_{\rm{SELU}}-I_{N_{\rm{in}}}-O_{N_{\rm{out}}}\right]\). We call \(\left[ FC_{\rm{LIN}}-I_{N_{\rm{in}}}-O_{N_{\rm{out}}}\right]\) the same layer but with a linear activation function. From input to output layer, our DNNs are built as follows
-
\(\left[ FC_{\rm{SELU}}-I_{N_{\rm{in}}}-O_{N_{\rm{h}}}\right]\)
-
\(\left[ FC_{\rm{SELU}}-I_{N_{\rm{h}}}-O_{2N_{\rm{h}}}\right]\)
-
\(\left[ FC_{\rm{SELU}}-I_{2N_{\rm{h}}}-O_{4N_{\rm{h}}}\right]\)
-
\(\left[ FC_{\rm{SELU}}-I_{4N_{\rm{h}}}-O_{2N_{\rm{h}}}\right]\)
-
\(\left[ FC_{\rm{SELU}}-I_{2N_{\rm{h}}}-O_{N_{\rm{h}}}\right]\)
-
\(\left[ FC_{\rm{LIN}}-I_{N_{\rm{h}}}-O_{N_{\rm{out}}}\right]\)
We set \(N_{\rm{h}} = 32\) for cement system 1 (\(N_{\rm{in}} = 2\), \(N_{\rm{out}} = 4\)) and \(N_{\rm{h}} = 128\) for cement system 2 (\(N_{\rm{in}} = 5\), \(N_{\rm{out}} = 7\)).
Rights and permissions
About this article
Cite this article
Laloy, E., Jacques, D. Speeding Up Reactive Transport Simulations in Cement Systems by Surrogate Geochemical Modeling: Deep Neural Networks and k-Nearest Neighbors. Transp Porous Med 143, 433–462 (2022). https://doi.org/10.1007/s11242-022-01779-3
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11242-022-01779-3