Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,25 @@
</a>
</p>

DeepFlame is a deep learning empowered computational fluid dynamics package for single or multiphase, laminar or turbulent, reacting flows at all speeds. It aims to provide an open-source platform to combine the individual strengths of [OpenFOAM](https://openfoam.org), [Cantera](https://cantera.org), and [PyTorch](https://pytorch.org/) libraries for deep learning assisted reacting flow simulations. It also has the scope to leverage the next-generation heterogenous supercomputing and AI acceleration infrastructures such as GPU and FPGA.
DeepFlame is a deep learning empowered computational fluid dynamics package for single or multiphase, laminar or turbulent, reacting flows at all speeds. It aims to provide an open-source platform to combine the individual strengths of [OpenFOAM](https://openfoam.org), [Cantera](https://cantera.org), and [PyTorch](https://pytorch.org/) libraries for deep learning assisted reacting flow simulations. It also has the scope to empower the combustion community to pursue scientific innovation by combining the power of heterogeneous acceleration (GPU/FPGA) with autonomous agent-driven workflows.

The neural network models used in the tutorial examples can be found at– [AIS Square](https://www.aissquare.com/). To run DeepFlame with DNN, download the DNN model [DFODE](https://www.aissquare.com/models/detail?pageType=models&name=DF-ODENet_DNNmodel&id=197) into the case folder you would like to run.
The neural network models used in the tutorial examples can be found at– [AIS Square](https://www.aissquare.com/). To run DeepFlame with DNN, download the DNN model [DFODE](https://www.aissquare.com/models/detail?pageType=models&name=DF-ODENet_DNNmodel&id=197) into the case folder you would like to run. To train DNN models for your specific problem, please use the [DFODE-kit](https://github.com/deepflame-ai/DFODE-kit) package developed by the DeepFlame team.

## Documentation
Detailed guide for installation and tutorials is available on [our documentation website](https://deepflame.deepmodeling.com).

## Features
New in v2.0 (2026/1/28):
- Introduce Agent-driven Combustion Scientific Computing as a new research paradigm, extending DeepFlame from pure acceleration to workflow-level automation for CombustionCFD
- Develope [FlamePilot](./agents/FlamePilot.md), a CFD simulation agent for combustion case setup, runtime diagnosis, and iterative optimization via natural language interaction
- Introduce [DFODE-kit](https://github.com/deepflame-ai/DFODE-kit), a deep learning package for accelerating stiff, high-dimensional chemical kinetics ODEs
- Develope [DFODE-Kit Trainer](./agents/DFODE-kit-Trainer.md), an agent-driven workflow for training combustion-chemistry neural-networks
- Improve initialization in `dfChemistryModel`
- Fix bug in `df0DFoam`
- Fix bug in LES `SIGMA` sgs model
- Add support for the localBlended scheme
- Change build-test actions to self-hosted runner

New in v1.6 (2025/5/30):
- Add a new solver, dfSteadyFoam, a steady-state compressible flow solver. It supports turbulence and uses the SIMPLE algorithm to efficiently compute steady solutions
- Extend energy model to support sensible enthalpy (hs) in addition to absolute enthalpy (ha) and internal energy (ea). Furthermore, T, h and cp can now be computed independently of Cantera, improving flexibility and removing external dependencies. `CANTERA_THERMO` is added in bashrc to control method to calculate h, cp and update T. `CANTERA_THERMO=1`(current default) means using Cantera and `CANTERA_THERMO=0` means using deepflame.
Expand Down
5 changes: 5 additions & 0 deletions agents/DFODE-kit-Trainer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DFODE-kit Trainer
=================
DFODE-kit Trainer is a specialized agent designed to facilitate the training of models using the DFODE-kit framework. This agent streamlines the process of setting up, executing, and monitoring training sessions for differential equation-based models. User can interact with the agent through natural language commands to configure the target case settings that the model will apply. The agent can recognize the requirements and automatically complete the data sampling, data enhancement and model training processes. Finally, it returns to the user a directly usable model and a clear task report.

To try DFODE-kit Trainer, visit [DFODE-kit agent tutorial](https://github.com/deepflame-ai/DFODE-kit/blob/agent/agent_user_guide_zh.md) for more details.
12 changes: 12 additions & 0 deletions agents/FlamePilot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FlamePilot
==========

<div align="center">
<img src="https://github.com/xiao312/flamepilot-dev/raw/main/docs/assets/logo.png" alt="FlamePilot logo" width="640" />
</div>

FlamePilot is an **agentic runner for combustion CFD workflows**, designed to automate and assist simulations within the DeepFlame ecosystem. It provides a **CLI-first, tool-aware agent** that translates natural language instructions into executable CFD actions, covering case setup, solver configuration, execution, diagnostics, and iteration.

FlamePilot emphasizes **executability and traceability**: it helps you go from intent → runnable case, while keeping workflows inspectable and compatible with research-grade CFD practices.

To try FlamePilot, visit the <a href="https://github.com/deepflame-ai/flamepilot">project repository</a>.
4 changes: 3 additions & 1 deletion applications/solvers/dfLowMachFoam/createFields.H
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ rho = thermo.rho();
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));

#include "createLocalBlend.H"

multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;

#include "createMRF.H"
Expand Down Expand Up @@ -206,4 +208,4 @@ const Switch splitting = CanteraTorchProperties.lookupOrDefault("splittingStrate
#ifdef USE_LIBTORCH
const Switch log_ = CanteraTorchProperties.subDict("TorchSettings").lookupOrDefault("log", false);
const Switch torch_ = CanteraTorchProperties.subDict("TorchSettings").lookupOrDefault("torch", false);
#endif
#endif
73 changes: 73 additions & 0 deletions applications/solvers/dfLowMachFoam/createLocalBlend.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*---------------------------------------------------------------------------*\
This function is designed to read the UBlendingFactor for localBlended
schemes used by the divSchemes, i.e.:
```
divSchemes
{
div(phi,U) Gauss localBlended linear upwind;
}
```
\*---------------------------------------------------------------------------*/

// Find and parse the divSchemes sub-dictionary
const dictionary& divSchemesDict = mesh.schemesDict().subDict("divSchemes");

Switch foundLocalBlended = false;

// Parse the divSchemes tokens
wordList keys = divSchemesDict.toc();
forAll(keys, i)
{
const word& key = keys[i];
// Convert to string
ITstream& is = divSchemesDict.lookup(key);
OStringStream os;
os << is;
word schemeStr = os.str();

if (schemeStr.find("localBlended") != word::npos)
{
foundLocalBlended = true;
}
}

// Declare pointer for UBlendingFactor
autoPtr<surfaceScalarField> UBlendingFactorPtr;

// Create the localBlendingFactor field only if localBlended scheme is found
if (foundLocalBlended)
{
Info << " Creating UBlendingFactor field for localBlended schemes " << endl;

// Read the scalarField UBlend
volScalarField UBlend
(
IOobject
(
"UBlend",
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
mesh
);

// Construct the surfaceScalarField UBlendingFactor by interpolating UBlend to cell faces
UBlendingFactorPtr.reset
(
new surfaceScalarField
(
IOobject
(
"UBlendingFactor",
mesh.time().timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE,
true
),
fvc::interpolate(UBlend)
)
);
}
3 changes: 3 additions & 0 deletions docs/source/citation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ Runze Mao, Minqi Lin, Yan Zhang, Tianhan Zhang, Zhi-Qin John Xu, Zhi X. Chen. De
**If you have used the DNN model provided from us, please use the citation:**

Han Li, Ruixin Yang, Min Zhang, Runze Mao, Zhi X. Chen. A comprehensive study on the accuracy and generalization of deep learning-generated chemical ODE integrators. `arXiv:2312.16387 <https://arxiv.org/abs/2312.16387>`_

**If you have used the DFODE-kit package to train your own DNN models, please use the citation:**
Han Li, Ke Xiao, Yangchen Xu, Haoze Zhang, Zhenyi Chen, Runze Mao, Zhi X. Chen. DFODE-Kit: Deep learning package for solving flame chemical kinetics with high-dimensional stiff ordinary differential equations. `doi.org/10.1016/j.cpc.2025.110013 <https://www.sciencedirect.com/science/article/abs/pii/S0010465525005144>`_
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The deep learning algorithms and models used in the DeepFlame tutorial examples
:glob:

qs/install
qs/download_dnn_models
qs/dnn_models
qs/examples
qs/input

Expand Down
11 changes: 11 additions & 0 deletions docs/source/qs/dnn_models.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
DNN Models
======================================

Download DNN Models
--------------------------------------
The neural network models used in the tutorial examples can be found at– `AIS Square <https://www.aissquare.com/>`_.
To run DeepFlame with DNN, download the DNN model `dfODENet <https://www.aissquare.com/models/detail?pageType=models&name=dfODENet_DNNmodel_V0.1&id=181>`_ into the case folder you would like to run.

Train DNN models
--------------------------------------
If you would like to train your own models for your specific case, please use `DFODE-kit <https://github.com/deepflame-ai/DFODE-kit>`_ and check `tutorials <https://github.com/deepflame-ai/DFODE-kit/tree/main/tutorials>`_ for detailed instructions on how to develop and deploy your own neural network models.
6 changes: 0 additions & 6 deletions docs/source/qs/download_dnn_models.rst

This file was deleted.