Combining machine learning (ML) with computational fluid dynamics (CFD) opens many possibilities for improving simulations of technical and natural systems. However, CFD+ML algorithms require exchange of data, synchronization, and calculation on heterogeneous hardware, making their implementation for large-scale problems exceptionally challenging. We provide an effective and scalable solution to developing CFD+ML algorithms using open source software OpenFOAM and SmartSim. SmartSim provides an Orchestrator that significantly simplifies the programming of CFD+ML algorithms and a Redis database that ensures highly scalable data exchange between ML and CFD clients. We show how to leverage SmartSim to effectively couple different segments of OpenFOAM with ML, including pre/post-processing applications, solvers, function objects, and mesh motion solvers. We additionally provide an OpenFOAM sub-module with examples that can be used as starting points for real-world applications in CFD+ML.
翻译:将机器学习(ML)与计算流体力学(CFD)相结合,为改进技术和自然系统的模拟开辟了许多可能性。然而,CFD+ML算法需要在异构硬件上进行数据交换、同步和计算,这使得其在大规模问题中的实现极具挑战性。我们提出了一种利用开源软件OpenFOAM和SmartSim开发CFD+ML算法的有效且可扩展方案。SmartSim提供的编排器(Orchestrator)显著简化了CFD+ML算法的编程工作,而其内置的Redis数据库则确保了ML客户端与CFD客户端之间高度可扩展的数据交换。我们展示了如何利用SmartSim将OpenFOAM的不同模块(包括前后处理应用程序、求解器、函数对象和网格运动求解器)与ML有效耦合。此外,我们还提供了一个包含示例的OpenFOAM子模块,可作为实际CFD+ML应用的参考起点。