Fluids (Feb 2024)

Computation of Real-Fluid Thermophysical Properties Using a Neural Network Approach Implemented in OpenFOAM

  • Nasrin Sahranavardfard,
  • Damien Aubagnac-Karkar,
  • Gabriele Costante,
  • Faniry N. Z. Rahantamialisoa,
  • Chaouki Habchi,
  • Michele Battistoni

DOI
https://doi.org/10.3390/fluids9030056
Journal volume & issue
Vol. 9, no. 3
p. 56

Abstract

Read online

Machine learning based on neural networks facilitates data-driven techniques for handling large amounts of data, either obtained through experiments or simulations at multiple spatio-temporal scales, thereby finding the hidden patterns underlying these data and promoting efficient research methods. The main purpose of this paper is to extend the capabilities of a new solver called realFluidReactingNNFoam, under development at the University of Perugia, in OpenFOAM with a neural network algorithm for replacing complex real-fluid thermophysical property evaluations, using the approach of coupling OpenFOAM and Python-trained neural network models. Currently, neural network models are trained against data generated using the Peng–Robinson equation of state assuming a mixture’s frozen temperature. The OpenFOAM solver, where needed, calls the neural network models in each grid cell with appropriate inputs, and the returned results are used and stored in suitable OpenFOAM data structures. Such inference for thermophysical properties is achieved via the “Neural Network Inference in C made Easy (NNICE)” library, which proved to be very efficient and robust. The overall model is validated considering a liquid-rocket benchmark comprised of liquid-oxygen (LOX) and gaseous-hydrogen (GH2) streams. The model accounts for real-fluid thermodynamics and transport properties, making use of the Peng–Robinson equation of state and the Chung transport model. First, the development of a real-fluid model with an artificial neural network is described in detail. Then, the numerical results of the transcritical mixing layer (LOX/GH2) benchmark are presented and analyzed in terms of accuracy and computational efficiency. The results of the overall implementation indicate that the combined OpenFOAM and machine learning approach provides a speed-up factor higher than seven, while preserving the original solver accuracy.

Keywords