NNPred: A Predictor Library to Deploy Neural Networks in Computational Fluid Dynamics software

Weishuo Liu, Ziming Song, Jian Fang
9/25/2022
physics.flu-dyn

Official code: Weishuo93/NN_Pred (36 stars, C++, MIT, last commit 2025-01-15).

Abstract

A neural-networks predictor library has been developed to deploy machine learning (ML) models into computational fluid dynamics (CFD) codes. The pointer-to-implementation strategy is adopted to isolate the implementation details in order to simplify the implementation to CFD solvers.

Show full abstract

The library provides simplified model-managing functions by encapsulating the TensorFlow C library, and it maintains self-belonging data containers to deal with data type casting and memory layouts in the input/output (I/O) functions interfacing with CFD solvers. On the language level, the library provides application programming interfaces (APIs) for C++ and Fortran, the two commonly used programming languages in the CFD community. High-level customized modules are developed for two open-source CFD codes, OpenFOAM and CFL3D, written with C++ and Fortran, respectively. The basic usage of the predictor is demonstrated in a simple data-driven heat transfer problem as the first tutorial case. Another tutorial case of modeling the effect of turbulence in channel flow using the library is implemented in both OpenFOAM and CFL3D codes. The developed ML predictor library provides a powerful tool for the deployment of ML models in CFD solvers.

View on arXivView PDF

Code Implementations(1)

Weishuo93/NN_PredOfficial100%
MIT

An interfacing library to deploy machine-learning models in CFD codes easily

368C++, FortranSep 24, 20221 years agoMIT
cfdmachine-learningrans

Similar Papers

Cite this paper

@article{liu2022nnpred,
  title  = {NNPred: A Predictor Library to Deploy Neural Networks in Computational Fluid Dynamics software},
  author = {Weishuo Liu and Ziming Song and Jian Fang},
  year   = {2022},
  eprint = {2209.12339},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2209.12339}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2209.12339.svg)](https://codeofpaper.com/paper/2209.12339)

Discussion