TY - JOUR
T1 - A generalized framework for integrating machine learning into computational fluid dynamics
AU - Sun, Xuxiang
AU - Cao, Wenbo
AU - Shan, Xianglin
AU - Liu, Yilang
AU - Zhang, Weiwei
N1 - Publisher Copyright:
© 2024 Elsevier B.V.
PY - 2024/10
Y1 - 2024/10
N2 - The amalgamation of machine learning algorithms (ML) with computational fluid dynamics (CFD) represents a promising frontier for the advancement of fluid dynamics research. However, the practical integration of CFD with ML algorithms frequently faces challenges related to data transfer and computational efficiency. While CFD programs are conventionally scripted in Fortran or C/C++, the prevalence of Python in the machine learning domain complicates their seamless integration. To tackle these obstacles, this paper proposes a comprehensive solution. Our devised framework primarily leverages Python modules CFFI and dynamic linking library technology to seamlessly integrate ML algorithms with CFD programs, facilitating efficient data interchange between them. Distinguished by its simplicity, efficiency, flexibility, and scalability, our framework is adaptable across various CFD programs, scalable to multi-node parallelism, and compatible with heterogeneous computing systems. In this paper, we showcase a spectrum of CFD+ML algorithms based on this framework, including stability analysis of ML Reynolds stress models, bidirectional coupling between ML turbulence models and CFD programs, and online dimension reduction optimization techniques tailored for resolving unstable steady flow solutions. In addition, our framework has been successfully tested on supercomputer clusters, demonstrating its compatibility with distributed computing architectures and its ability to leverage heterogeneous computing resources for efficient computational tasks.
AB - The amalgamation of machine learning algorithms (ML) with computational fluid dynamics (CFD) represents a promising frontier for the advancement of fluid dynamics research. However, the practical integration of CFD with ML algorithms frequently faces challenges related to data transfer and computational efficiency. While CFD programs are conventionally scripted in Fortran or C/C++, the prevalence of Python in the machine learning domain complicates their seamless integration. To tackle these obstacles, this paper proposes a comprehensive solution. Our devised framework primarily leverages Python modules CFFI and dynamic linking library technology to seamlessly integrate ML algorithms with CFD programs, facilitating efficient data interchange between them. Distinguished by its simplicity, efficiency, flexibility, and scalability, our framework is adaptable across various CFD programs, scalable to multi-node parallelism, and compatible with heterogeneous computing systems. In this paper, we showcase a spectrum of CFD+ML algorithms based on this framework, including stability analysis of ML Reynolds stress models, bidirectional coupling between ML turbulence models and CFD programs, and online dimension reduction optimization techniques tailored for resolving unstable steady flow solutions. In addition, our framework has been successfully tested on supercomputer clusters, demonstrating its compatibility with distributed computing architectures and its ability to leverage heterogeneous computing resources for efficient computational tasks.
KW - Computational Fluid Dynamics
KW - Machine Learning
KW - Mixed-language Programming
KW - Workflow
UR - http://www.scopus.com/inward/record.url?scp=85200971511&partnerID=8YFLogxK
U2 - 10.1016/j.jocs.2024.102404
DO - 10.1016/j.jocs.2024.102404
M3 - 文章
AN - SCOPUS:85200971511
SN - 1877-7503
VL - 82
JO - Journal of Computational Science
JF - Journal of Computational Science
M1 - 102404
ER -