[Paper Review] DeepFlame: A deep learning empowered open-source platform for reacting flow simulations
DeepFlame is an open-source C++ platform integrating OpenFOAM, Cantera, and PyTorch to accelerate reacting flow simulations using deep learning. It achieves up to a 100x speed-up in chemical kinetics evaluation on GPU/DCU hardware by replacing traditional ODE solvers with a DNN-based chemistry solver, demonstrating high accuracy and strong parallel scalability in canonical test cases.
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.
Motivation & Objective
- To address the computational bottleneck in reacting flow simulations caused by expensive chemical source term evaluation.
- To develop a unified, maintainable, and extensible framework that integrates CFD, chemical kinetics, and machine learning.
- To enable high-performance, accurate simulations of complex reacting flows using deep learning-accelerated chemistry solvers.
- To evaluate the performance and scalability of the platform on modern heterogeneous architectures, including CPUs, GPUs, and AI-specific DCUs.
- To provide a foundation for future extensions to multi-phase flows and distributed DNN inference across multiple GPUs/nodes.
Proposed method
- DeepFlame integrates OpenFOAM for flow solvers, Cantera for detailed thermodynamics and chemical kinetics, and PyTorch for deep learning inference.
- The platform replaces traditional ODE solvers for chemical source terms with a pre-trained deep neural network (DNN) model to accelerate computation.
- It employs a modular design where thermo-physicochemical properties are fully managed by Cantera through custom mixture and chemistry objects.
- Dynamic load balancing (DLB) is implemented to optimize work distribution across MPI processes during chemistry solves.
- Adaptive mesh refinement (AMR) is integrated to improve resolution in critical regions while reducing overall computational cost.
- The code is implemented in C++ with optimized memory access and vectorization to leverage CPU and GPU/DCU parallelism.
Experimental results
Research questions
- RQ1Can a deep learning-based chemistry solver achieve significant speed-up in reacting flow simulations without sacrificing accuracy?
- RQ2How does the integration of OpenFOAM, Cantera, and PyTorch enable efficient and maintainable cross-library workflows for scientific computing?
- RQ3What is the performance scaling behavior of DeepFlame on large-scale CPU and GPU/DCU clusters?
- RQ4To what extent can dynamic load balancing and adaptive mesh refinement improve simulation efficiency in reacting flow problems?
- RQ5How does the platform perform across diverse canonical test cases, from 0D ignition to 3D turbulent vortices?
Key findings
- The DNN-based chemistry solver achieved a 100x speed-up in a 1D hydrogen ignition case when executed on a medium-end GPU or DCU, compared to traditional ODE solvers.
- On CPU, the DNN solver provided a 30–50% speed-up due to data and operation vectorization, even without GPU acceleration.
- The platform demonstrated robust accuracy across a wide range of canonical cases, including 0D ignition, 1D planar flames, 2D jet flames, and 3D reactive Taylor-Green vortices.
- Dynamic load balancing reduced chemistry solve time by ~30% on up to 1000 CPU cores, though performance degraded beyond 16,000 cells per core due to communication overhead.
- The simulation of a 1D detonation case was 10 times faster when combining AMR and DLB, highlighting the effectiveness of hybrid optimization strategies.
- Strong parallel scaling was observed on up to tens of thousands of CPU cores, with good performance relative to state-of-the-art reacting flow codes.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.