Xuxiang Sun , Wenbo Cao , Xianglin Shan , Yilang Liu , Weiwei Zhang
{"title":"A generalized framework for integrating machine learning into computational fluid dynamics","authors":"Xuxiang Sun , Wenbo Cao , Xianglin Shan , Yilang Liu , Weiwei Zhang","doi":"10.1016/j.jocs.2024.102404","DOIUrl":null,"url":null,"abstract":"<div><p>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.</p></div>","PeriodicalId":48907,"journal":{"name":"Journal of Computational Science","volume":"82 ","pages":"Article 102404"},"PeriodicalIF":3.1000,"publicationDate":"2024-08-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Computational Science","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S1877750324001972","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
引用次数: 0
Abstract
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.
期刊介绍:
Computational Science is a rapidly growing multi- and interdisciplinary field that uses advanced computing and data analysis to understand and solve complex problems. It has reached a level of predictive capability that now firmly complements the traditional pillars of experimentation and theory.
The recent advances in experimental techniques such as detectors, on-line sensor networks and high-resolution imaging techniques, have opened up new windows into physical and biological processes at many levels of detail. The resulting data explosion allows for detailed data driven modeling and simulation.
This new discipline in science combines computational thinking, modern computational methods, devices and collateral technologies to address problems far beyond the scope of traditional numerical methods.
Computational science typically unifies three distinct elements:
• Modeling, Algorithms and Simulations (e.g. numerical and non-numerical, discrete and continuous);
• Software developed to solve science (e.g., biological, physical, and social), engineering, medicine, and humanities problems;
• Computer and information science that develops and optimizes the advanced system hardware, software, networking, and data management components (e.g. problem solving environments).