论文标题

NNPred:在计算流体动力学软件中部署神经网络的预测库

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

论文作者

Liu, Weishuo, Song, Ziming, Fang, Jian

论文摘要

已经开发了一个神经网络预测库来将机器学习(ML)模型部署到计算流体动力学(CFD)代码中。采用指针到实施策略来隔离实现详细信息,以简化对CFD求解器的实现。该库通过封装TensorFlow C库来提供简化的模型管理功能,并维护自我键入的数据容器,以处理输入/输出(I/O)函数与CFD求解器接口的数据类型铸造和内存布局。在语言层面上,该库为C ++和Fortran提供了应用程序编程接口(API),这是CFD社区中两种常用的编程语言。高级定制模块是针对两个开源CFD代码开发的OpenFOAM和CFL3D,分别用C ++和Fortran编写。预测变量的基本用法在一个简单的数据驱动传热问题中作为第一个教程案例。在OpenFOAM和CFL3D代码中都实现了对使用库通道流中湍流效果进行建模的另一个教程案例。开发的ML预测库为CFD求解器中的ML模型部署提供了强大的工具。

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. 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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源