Abstract
In direct numerical simulation of turbulent combustion, the majority of the total simulation time is often spent on evaluating chemical reaction rates from detailed reaction mechanisms. In this work, an optimization method is presented for speeding up the calculation of chemical reaction rates significantly, which has been implemented into the open-source CFD code OpenFOAM. A converter tool has been developed, which translates any input file containing chemical reaction mechanisms into C++ source code. The automatically generated code allows to restructure the reaction mechanisms for efficient computation and enables more compiler optimizations. Additional performance improvements are achieved by generating densely packed data and linear access patterns that can be vectorized in order to exploit the maximum performance on HPC systems. The generated source code compiles to an OpenFOAM library, which can directly be used in simulations through OpenFOAM’s runtime selection mechanism. The optimization concept has been applied to a realistic combustion case simulated on two peta-scale supercomputers, among them the fastest HPC cluster Hazel Hen (Cray XC40) in Germany. The optimized code leads to a decrease of total simulation time of up to 40% and this improvement increases with the complexity of the involved chemical reactions. Moreover, the optimized code yields good parallel performance on up to 28,800 CPU cores.
This is a preview of subscription content, access via your institution.
Buying options








References
BP Energy Outlook, British Petroleum (2016), www.bp.com/energyoutlook
T. Poinsot, D. Veynante, Theoretical and Numerical Combustion (RT Edwards, Toulouse Cedex, 2005)
A. Lipatnikov, Fundamentals of Premixed Turbulent Combustion (CRC, Boca Raton, 2012)
C.K. Law, Combustion Physics (Cambridge University Press, Cambridge, 2010)
J.H. Chen, Petascale direct numerical simulation of turbulent combustion—fundamental insights towards predictive models. Proc. Combust. Inst. 33, 99–123 (2011)
F. Zhang, T. Zirwes, P. Habisreuther, H. Bockhorn, Numerical simulation of turbulent combustion with a multi-regional approach, in High Performance Computing in Science and Engineering ’15, ed. by W.E. Nagel, D.B. Kröner, M.M. Resch (Springer, Berlin, Heidelberg, 2015), pp. 267–280
G.P. Smith, D.M. Golden, M. Frenklach, N.W. Moriarty, B. Eiteneer, M. Goldenberg, C.T. Bowman, R.K. Hanson, S. Song, W.C. Gardiner, V.V. Lissianski, Z. Qi, GRI 3.0 reaction mechanism (1999), http://www.me.berkeley.edu/gri_mech
LLNL Heptane Reaction Mechanism (2012), https://combustion.llnl.gov/mechanisms/alkanes/n-heptane-detailed-mechanism-version-3
T. Lu, C.K. Law, Toward accommodating realistic fuel chemistry in large-scale computations. Prog. Energy Combust. Sci. 35(2), 192–215 (2009)
V. Damian, A. Sandu, M. Damian, F. Potra, G.R. Carmichael, The kinetic preprocessor KPP—a software environment for solving chemical kinetics. Comput. Chem. Eng. 26, 1567–1579 (2002)
K.E. Niemeyer, N.J. Curtis, pyJac, Version 1.0.1 (2016), https://github.com/kyleniemeyer/pyJac
H.G. Weller, G. Tabor, H. Jasak, C. Fureby, A tensorial approach to computational continuum mechanics using object-oriented techniques. Comput. Phys. 12, 620–631 (1998)
S. Vo, A. Kronenburg, O.T. Stein, E.R. Hawkes, Direct numerical simulation of non-premixed syngas combustion using OpenFOAM, in High Performance Computing in Science and Engineering ’16, ed. by W.E. Nagel, D.B. Kröner, M.M. Resch (Springer, Heidelberg, 2016)
F. Zhang, H. Bonart, T. Zirwes, P. Habisreuther, H. Bockhorn, N. Zarzalis, Direct numerical simulation of chemically reacting flows with the public domain code OpenFOAM, in High Performance Computing in Science and Engineering ’14, ed. by W.E. Nagel, D.H. Kröner, M.M. Resch (Springer, Berlin, Heidelberg, 2015), pp. 221–236
D.G. Goodwin, H.K. Moffat, R.L. Speth, Cantera: an object-oriented software toolkit for chemical kinetics, thermodynamics, and transport processes. Version 2.3.0b (2016), http://www.cantera.org
T. Zirwes, Weiterentwicklung und Optimierung eines auf OpenFOAM basierten DNS Lösers zur Verbesserung der Effizienz und Handhabung. Bachelor’s thesis, Karlsruhe Institute of Technology, Germany, 2013
R.J. Kee, M.E. Coltrin, P. Glarborg, Chemically Reacting Flow: Theory and Practice (Wiley, Hoboken, 2005)
CHEMKIN 10131, Reaction Design: San Diego (2013)
F. Zhang, T. Zirwes, H. Nawroth, H. Bockhorn, C.O. Paschereit, Combustion generated noise: an environment related issue for future combustion systems. Energy Technol. 5(7), 1045–1054 (2017)
OpenFOAM. The Open Source CFD Toolbox. User Guide (2014)
Cray Inc., Cray XC40 (2016), http://www.hlrs.de/systems/cray-xc40-hazel-hen
ForHLR II (2016), https://www.scc.kit.edu/dienste/forhlr2.php
Acknowledgements
This work was supported by the German Research Council (DFG) through Research Units DFG-BO693/27 “Combustion Noise”. This work was performed on the national supercomputer Cray XC40 Hazel Hen at the High Performance Computing Center Stuttgart (HLRS) under the grant with acronym ‘Cnoise’ and on the computational resource ForHLR II funded by the Ministry of Science, Research and the Arts Baden-Württemberg and DFG (“Deutsche Forschungsgemeinschaft”).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG
About this paper
Cite this paper
Zirwes, T., Zhang, F., Denev, J.A., Habisreuther, P., Bockhorn, H. (2018). Automated Code Generation for Maximizing Performance of Detailed Chemistry Calculations in OpenFOAM. In: Nagel, W., Kröner, D., Resch, M. (eds) High Performance Computing in Science and Engineering ' 17 . Springer, Cham. https://doi.org/10.1007/978-3-319-68394-2_11
Download citation
DOI: https://doi.org/10.1007/978-3-319-68394-2_11
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-68393-5
Online ISBN: 978-3-319-68394-2
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)