Submitted:
12 January 2024
Posted:
14 January 2024
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Materials and Methods
2.1. CFD Model
2.2. Artificial Neural Networks (NN) and Multilayer Perceptrons (MLP)
2.3. Training Database
2.3. Model Training
2.4. Implementation of the NN Models in OpenFOAM
- In the initialization stage, fields are read from dictionaries and values are used to infer each property of the flow through the Python-trained NN models via NNICE.
- Then, as shown in the flow-chart in Figure 8, at the beginning of a time-step, the continuity equation is first solved, and the PIMPLE iteration begins with the momentum predictor step.
- With entering the PISO loop the specie and the energy equations are solved. Then the thermodynamic properties, inferred through the Python-trained NN models with NNICE, replace the original thermo.correct() OpenFOAM function call. More in detail, temperature is first retrieved after the enthalpy equation is solved using information; then all other properties (density , viscosity , thermal diffusivity , and compressibility ) are updated using most recent values of .
- Other inferences are then needed inside each PISO loop. Density is first updated with the corresponding NN model before the pressure equation is solved (details of the pressure equation can be found in Figure 8.b). Afterwards, density is explicitly updated solving the continuity equation, and, after checking the continuity error, the velocity field is updated.
- The last step with the PISO loop concerns a new recalculation of the density field via its NN model.
- Outside the PISO loop turbulence equations are solved, but no additional inferences are needed there. In addition, in this paper we do not include a turbulence model and assume a laminar flow, to show the application of the machine learning method in OpenFOAM.
2.5. CFD Case Setup
3. Results and Discussion
- The second CFD model is referred to as realFluidReactingNNFoam_1 which adopts a neural network approach (here referred to as NN_1 variant) wherein Python-trained NN models and NNICE inference are used to replace original calculations through the RFM.
- The third CFD solver is referred to as realFluidReactingNNFoam_2 which is similar to the second model, but incorporates log transformations for density, compressibility, viscosity, and thermal diffusivity to achieve target accuracy criteria (here referred to as NN_2 variant).
- The last model is referred to as realFluidReactingNNFoam. It is like the previous one, but using the adapted data range, which means that the data range for training is chosen to be as close as possible to the case study needs, to improve networks accuracy (here referred to as NN variant).
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- He Z, Shen Y, Wang C, Zhang Y, Wang Q, Gavaises M. Thermophysical properties of n-dodecane over a wide temperature and pressure range via molecular dynamics simulations with modification methods. J Mol Liq [Internet]. 2023 Feb;371:121102. Available from: https://linkinghub.elsevier.com/retrieve/pii/S0167732222026411.
- Rahantamialisoa, F.N., Pandal, A., Ningegowda, B.M., Zembi, J., Sahranavardfard, N., Jasak, H., Im, H.G. and Battistoni, M., 2021, August. Assessment of an open-source pressure-based real fluid model for transcritical jet flows. In International Conference on Liquid Atomization and Spray Systems (ICLASS) (Vol. 1, No. 1).
- Qiu L, Reitz RD. An investigation of thermodynamic states during high-pressure fuel injection using equilibrium thermodynamics. International Journ10al of Multiphase Flow. 2015 Jun;72:24–38. [CrossRef]
- Kiran E, Sengers JMHL, editors. Supercritical Fluids. Dordrecht: Springer Netherlands; 1994.
- Wagner W, Kurzeja N, Pieperbeck B. The thermal behaviour of pure fluid substances in the critical region — experiences from recent pϱT measurements on SF6 with a multi-cell apparatus. Fluid Phase Equilib. 1992 Nov 25;79(C):151–74. [CrossRef]
- Poling BE, Prausnitz JM, O’connell JP, York N, San C, Lisbon F, et al. the properties of gases and liquids, Fifth Edition McGRAW-HILL. 2001.
- Puissant C, Glogowski MJ. experimental characterization of shear coaxial injectors using liquid/gaseous nitrogen. Atomization and Sprays. 1997;7(5):467–78.
- Mayer W, Tamura H. Propellant injection in a liquid oxygen/gaseous hydrogen rocket engine. J Propuls Power. 1996;12(6):1137–47. [CrossRef]
- Habiballah M, Orain M, Grisch F, Vingert L, Gicquel P. Experimental studies of high-pressure cryogenic flames on the mascotte facility. Combustion Science and Technology. 2006 Jan 1;178(1–3):101–28. [CrossRef]
- Rahantamialisoa, F.N.Z., Zembi, J., Miliozzi, A., Sahranavardfard, N. and Battistoni, M., 2022, December. CFD simulations of under-expanded hydrogen jets under high-pressure injection conditions. In Journal of Physics: Conference Series (Vol. 2385, No. 1, p. 012051). IOP Publishing. [CrossRef]
- Oschwald M, Smith JJ, Branam R, Hussong J, Schik A, Chehroudi B, et al. injection of fluids into supercritical environments. Combustion Science and Technology. 2006 Jan;178(1–3):49–100. [CrossRef]
- Koukouvinis P, Rodriguez C, Hwang J, Karathanassis I, Gavaises M, Pickett L. Machine Learning and transcritical sprays: A demonstration study of their potential in ECN Spray-A. International Journal of Engine Research. 2022 Sep 1;23(9):1556–72. [CrossRef]
- Jafari S, Gaballa H, Habchi C, de Hemptinne JC. Towards understanding the structure of subcritical and transcritical liquid–gas interfaces using a tabulated real fluid modeling approach. Energies (Basel). 2021 Sep 1;14(18). [CrossRef]
- Jafari S, Gaballa H, Habchi C, Hemptinne JC De, Mougin P. Exploring the interaction between phase separation and turbulent fluid dynamics in multi-species supercritical jets using a tabulated real-fluid model. Journal of Supercritical Fluids. 2022 May 1;184. [CrossRef]
- Brunton SL, Noack BR, Koumoutsakos P. Downloaded from www.annualreviews.org Access provided by 109.114.54.139 on 09/27/23. For personal use only. Annu Rev Fluid Mech 2020 [Internet]. 2019; 52:477–508. . Available from: https://doi.org/10.1146/annurev-fluid-010719-.
- Rodriguez S, Cardiff P. A general approach for running Python codes in OpenFOAM using an embedded pybind11 Python interpreter. 2022 Mar 30; Available from: http://arxiv.org/abs/2203.16394.
- Maulik R, Fytanidis D, Lusch B, Vishwanath V, Patel S. PythonFOAM: In-situ data analyses with OpenFOAM and Python. 2021 Mar 16; Available from: http://arxiv.org/abs/2103.09389.
- Maulik R, Patel SS, Lusch B, Jennings E. Deploying deep learning in OpenFOAM with TensorFlow Machine Learning and Dynamical Systems View project Open Source Code for Spectral Element Discontinuous Galerkin Lattice Boltzmann Method (NEKLBM) View project [Internet]. Available from: https://github.com/argonne-lcf/TensorFlowFoam.
- Rahantamialisoa F.N.Z., Madana Gopal J.V., Tretola G., Sahranavardfard N., Vogiatzaki K., Battistoni M., Analyzing single and multicomponent supercritical jets using volume-based and mass-based numerical approaches. Physics of Fluids, Volume 35, Issue 61, Article number 067123, (2023). [CrossRef]
- Ningegowda, B.M.; Rahantamialisoa, F.N.Z.; Pandal, A.; Jasak, H.; Im, H.G.; Battistoni, M. Numerical Modeling of Transcritical and Supercritical Fuel Injections Using a Multi-Component Two-Phase Flow Model. Energies 2020, 13, 5676. [CrossRef]
- Chung, T. H., Ajlan, M., Lee, L. L., and Starling, K. E., 1988. “Generalized multiparameter correlation for nonpolar and polar fluid transport properties”. Industrial & Engineering Chemistry Research, 27(4), pp. 671–679. [CrossRef]
- Ding T, Readshaw T, Rigopoulos S, Jones WP. Machine learning tabulation of thermochemistry in turbulent combustion: An approach based on hybrid flamelet/random data and multiple multilayer perceptrons. Combust Flame. 2021 Sep 1;231. [CrossRef]
- Gardner MW, Dorling SR. artificial neural networks (the multilayer perceptron)-a review of applications in the atmospheric sciences. Vol. 32, Atmospheric Environment. 1998. [CrossRef]
- Bishop CM. Neural Networks for Pattern Recognition Clarendon Press • Oxford 1995.
- Watt, J., Borhani, R. and Katsaggelos, A.K., 2020. Machine learning refined: Foundations, algorithms, and applications. Cambridge University Press.
- Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G.S., Davis, A., Dean, J., Devin, M. and Ghemawat, S., 2016. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467.
- Delhom B, Faney T, Mcginn P, Habchi C, Bohbot J. Development of a multi-species real fluid modelling approach using a machine learning method, ILASS Europe 2023, 32 nd European Conference on Liquid Atomization & Spray Systems.
- Anzanello MJ, Fogliatto FS. Learning curve models and applications: Literature review and research directions. Vol. 41, International Journal of Industrial Ergonomics. 2011. p. 573–83. [CrossRef]
- Witten, Daniela, and Gareth James. An introduction to statistical learning with applications in R. springer publication, 2013., Goodfellow I, Bengio Y, Courville A. Deep learning. MIT press; 2016 Nov 10.
- Chen, X., Mehl, C., Faney, T. and Di Meglio, F., 2023. Clustering-Enhanced Deep Learning Method for Computation of Full Detailed Thermochemical States via Solver-Based Adaptive Sampling. Energy & Fuels, 37(18), pp.14222-14239. [CrossRef]
- Aubagnac-Karkar, D., & Mehl, C. (2023). NNICE: Neural Network Inference in C made Easy (Version 1.0.0) [Computer software]. [CrossRef]
- Zong N, Yang V. Near-field flow and flame dynamics of LOX/methane shear-coaxial injector under supercritical conditions. Proceedings of the Combustion Institute. 2007 Jan 1;31(2):2309–17. [CrossRef]
- Zong N, Yang V. Cryogenic fluid jets and mixing layers in transcritical and supercritical environments. Combustion Science and Technology. 2006 Jan;178(1–3):193–227. [CrossRef]
- Oefelein JC. mixing and combustion of cryogenic oxygen-hydrogen shear-coaxial jet flames at supercritical pressure. Combustion Science and Technology. 2006 Jan;178(1–3):229–52. [CrossRef]
- Oefelein JC. Thermophysical characteristics of shear-coaxial LOX–H2 flames at supercritical pressure. Proceedings of the Combustion Institute. 2005 Jan 1;30(2):2929–37. [CrossRef]
- Oefelein JC, Yang V. Modeling High-Pressure Mixing and Combustion Processes in Liquid Rocket Engines. J Propuls Power. 1998 Sep;14(5):843–57. [CrossRef]
- Ruiz AM, Lacaze G, Oefelein JC, Mari R, Cuenot B, Selle L, et al. Numerical benchmark for high-reynolds-number supercritical flows with large density gradients. AIAA Journal. 2016;54(5):1445–60. [CrossRef]
- Ningegowda BM, Rahantamialisoa F, Zembi J, Pandal A, Im HG, Battistoni M. Large Eddy Simulations of Supercritical and Transcritical Jet Flows Using Real Fluid Thermophysical Properties. SAE Technical Paper 2020-01-1153, 2020.













| Inputs | Outputs | |
|---|---|---|
| Variable symbol (code name) | Definition [units] | |
| Fuel mass fraction [-] | all output variables (except ) | |
| Temperature [K] | all variables (except ) | |
| Pressure [Pa] | all variables (except ) | |
| Enthalpy [J/kg] | ||
| Variable symbol (code name) |
Definition [units] |
|---|---|
| Density [ | |
| Viscosity | |
| Thermal diffusivity [] | |
| Specific enthalpy: [] | |
| Compressibility | |
| Temperature |
| Output (applied min-max-scalar) |
Inputs (applied min-max-scalar) | Hidden layer size | Activation function | Solver | Learning-rate-init | Loss metrics | Epochs | batch-size |
|---|---|---|---|---|---|---|---|---|
| , ,,e,, | 100 × 100 | ReLU | ADAM | 0.0015 | MSE | 1000 | 256 | |
| 100 × 100 | ReLU | ADAM | 0.0015 | MSE | 1000 | 256 |
| Solver | Total execution | Iteration | |||
|---|---|---|---|---|---|
| Time (s) | Speed-up | Total number of Iterations | Time/Iter (s/Iter) |
Speed-up | |
| realFluidReactingFoam | 511096 | 1 | 200550 | 2.548 | 1 |
| realFluidReactingNNFoam | 179317 | 2.850 | 523200 | 0.343 | 7.5 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).