Skip to main content
QUICK REVIEW

[论文解读] DeepFlame: A deep learning empowered open-source platform for reacting flow simulations

Runze Mao, Minqi Lin|arXiv (Cornell University)|Oct 13, 2022
Advanced Combustion Engine Technologies被引用 4
一句话总结

DeepFlame 是一个开源的 C++ 平台,整合了 OpenFOAM、Cantera 和 PyTorch,利用深度学习加速反应流模拟。通过用基于深度神经网络(DNN)的化学求解器替代传统 ODE 求解器,该平台在 GPU/DCU 硬件上实现了化学动力学计算高达 100 倍的加速,且在典型测试案例中表现出高精度和强大的并行可扩展性。

ABSTRACT

In this work, we introduce DeepFlame, an open-source C++ platform with the capabilities of utilising machine learning algorithms and pre-trained models to solve for reactive flows. We combine the individual strengths of the computational fluid dynamics library OpenFOAM, machine learning framework Torch, and chemical kinetics program Cantera. The complexity of cross-library function and data interfacing (the core of DeepFlame) is minimised to achieve a simple and clear workflow for code maintenance, extension and upgrading. As a demonstration, we apply our recent work on deep learning for predicting chemical kinetics (Zhang et al. Combust. Flame vol. 245 pp. 112319, 2022) to highlight the potential of machine learning in accelerating reacting flow simulation. A thorough code validation is conducted via a broad range of canonical cases to assess its accuracy and efficiency. The results demonstrate that the convection-diffusion-reaction algorithms implemented in DeepFlame are robust and accurate for both steady-state and transient processes. In addition, a number of methods aiming to further improve the computational efficiency, e.g. dynamic load balancing and adaptive mesh refinement, are explored. Their performances are also evaluated and reported. With the deep learning method implemented in this work, a speed-up of two orders of magnitude is achieved in a simple hydrogen ignition case when performed on a medium-end graphics processing unit (GPU). Further gain in computational efficiency is expected for hydrocarbon and other complex fuels. A similar level of acceleration is obtained on an AI-specific chip - deep computing unit (DCU), highlighting the potential of DeepFlame in leveraging the next-generation computing architecture and hardware.

研究动机与目标

  • 解决由于昂贵的化学源项计算导致的反应流模拟中的计算瓶颈问题。
  • 开发一个统一、可维护且可扩展的框架,集成计算流体动力学(CFD)、化学动力学和机器学习。
  • 利用基于深度学习的化学求解器,实现高性能、高精度的复杂反应流模拟。
  • 评估该平台在现代异构计算架构(包括 CPU、GPU 和 AI 专用 DCU)上的性能和可扩展性。
  • 为未来扩展至多相流以及跨多个 GPU/节点的分布式 DNN 推理提供基础。

提出的方法

  • DeepFlame 集成了 OpenFOAM 用于流动求解,Cantera 用于详细热力学和化学动力学,PyTorch 用于深度学习推理。
  • 平台将传统用于化学源项的 ODE 求解器替换为预训练的深度神经网络(DNN)模型,以加速计算。
  • 采用模块化设计,其中热物理化学性质完全由 Cantera 通过自定义混合物和化学对象进行管理。
  • 实施动态负载均衡(DLB),以在 MPI 进程间优化化学求解期间的工作分配。
  • 集成自适应网格加密(AMR),以在关键区域提高分辨率,同时降低整体计算成本。
  • 代码使用 C++ 实现,通过优化内存访问和向量化操作,充分利用 CPU 和 GPU/DCU 的并行性。

实验结果

研究问题

  • RQ1基于深度学习的化学求解器是否能在不牺牲精度的前提下,在反应流模拟中实现显著的加速?
  • RQ2OpenFOAM、Cantera 和 PyTorch 的集成如何实现科学计算中高效且可维护的跨库工作流?
  • RQ3DeepFlame 在大规模 CPU 和 GPU/DCU 集群上的性能扩展行为如何?
  • RQ4动态负载均衡和自适应网格加密在多大程度上能提升反应流问题的模拟效率?
  • RQ5该平台在从 0D 点燃到 3D 湍流涡旋等多样化典型测试案例中的表现如何?

主要发现

  • 在中端 GPU 或 DCU 上执行时,基于 DNN 的化学求解器在 1D 氢气点火案例中相比传统 ODE 求解器实现了 100 倍的加速。
  • 在 CPU 上,由于数据和操作的向量化处理,DNN 求解器实现了 30% 至 50% 的加速,即使没有 GPU 加速。
  • 该平台在广泛范围的典型案例中表现出稳健的精度,包括 0D 点燃、1D 平面火焰、2D 射流火焰和 3D 反应性 Taylor-Green 涡旋。
  • 动态负载均衡在最多 1000 个 CPU 核心上将化学求解时间减少了约 30%,但当每个核心的单元数超过 16,000 时,性能因通信开销而下降。
  • 结合 AMR 和 DLB 后,1D 爆炸波案例的模拟速度提高了 10 倍,凸显了混合优化策略的有效性。
  • 在数万个 CPU 核心规模上观察到良好的并行可扩展性,其性能相对于最先进的反应流代码表现优异。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。