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.
翻译:将机器学习与计算流体动力学相结合,为改进技术和自然系统的模拟开辟了众多可能性。然而,CFD+ML算法需要在异构硬件之间进行数据交换、同步和计算,这使得其在大规模问题中的实现极具挑战性。我们提出了一种利用开源软件OpenFOAM和SmartSim开发CFD+ML算法的有效且可扩展的解决方案。SmartSim提供了一种编排器,可显著简化CFD+ML算法的编程,并配备Redis数据库,确保ML与CFD客户端之间可实现高度可扩展的数据交换。我们展示了如何利用SmartSim将OpenFOAM的不同模块(包括前后处理应用程序、求解器、函数对象和网格运动求解器)与ML有效耦合。此外,我们提供了一个包含示例的OpenFOAM子模块,可作为CFD+ML实际应用的起点。