From 141f89ae3009d701536cd53fa5a816bb1f527b9d Mon Sep 17 00:00:00 2001 From: Teng Zhang Date: Fri, 9 Jan 2026 16:37:46 +0800 Subject: [PATCH 01/10] Add support for the localBlended scheme. Fix #575. - The `UBlend` volScalarField should be exist in the 0 folder. This field can be initialized using setFields or funkySetFields. - Although we only support the localBlended scheme for div(phi,U), it can be easily extent to other variables. --- .../solvers/dfLowMachFoam/createFields.H | 4 +- .../solvers/dfLowMachFoam/createLocalBlend.H | 67 +++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 applications/solvers/dfLowMachFoam/createLocalBlend.H diff --git a/applications/solvers/dfLowMachFoam/createFields.H b/applications/solvers/dfLowMachFoam/createFields.H index 32c8cd2ce..c1c9d7d9b 100644 --- a/applications/solvers/dfLowMachFoam/createFields.H +++ b/applications/solvers/dfLowMachFoam/createFields.H @@ -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::fieldTable fields; #include "createMRF.H" @@ -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 \ No newline at end of file diff --git a/applications/solvers/dfLowMachFoam/createLocalBlend.H b/applications/solvers/dfLowMachFoam/createLocalBlend.H new file mode 100644 index 000000000..a4ea8f0b9 --- /dev/null +++ b/applications/solvers/dfLowMachFoam/createLocalBlend.H @@ -0,0 +1,67 @@ +/*---------------------------------------------------------------------------*\ +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; + } +} + +// 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 + surfaceScalarField UBlendingFactor + ( + IOobject + ( + "UBlendingFactor", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + fvc::interpolate(UBlend) + ); +} From 5acca7a5e3526d2143e1930dcfc69be1c8ddacd0 Mon Sep 17 00:00:00 2001 From: Teng Zhang Date: Mon, 12 Jan 2026 12:45:00 +0800 Subject: [PATCH 02/10] Fix errors in createLocalBlend. --- .../solvers/dfLowMachFoam/createLocalBlend.H | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/applications/solvers/dfLowMachFoam/createLocalBlend.H b/applications/solvers/dfLowMachFoam/createLocalBlend.H index a4ea8f0b9..80b5a47d0 100644 --- a/applications/solvers/dfLowMachFoam/createLocalBlend.H +++ b/applications/solvers/dfLowMachFoam/createLocalBlend.H @@ -31,6 +31,9 @@ forAll(keys, i) } } +// Declare pointer for UBlendingFactor +autoPtr UBlendingFactorPtr; + // Create the localBlendingFactor field only if localBlended scheme is found if (foundLocalBlended) { @@ -48,20 +51,23 @@ if (foundLocalBlended) IOobject::NO_WRITE ), mesh - ) + ); // Construct the surfaceScalarField UBlendingFactor by interpolating UBlend to cell faces - surfaceScalarField UBlendingFactor + UBlendingFactorPtr.reset ( - IOobject + new surfaceScalarField ( - "UBlendingFactor", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - fvc::interpolate(UBlend) + IOobject + ( + "UBlendingFactor", + mesh.time().timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE, + true + ), + fvc::interpolate(UBlend) + ) ); } From d761c37c2afd0164008e3049698a26217538382a Mon Sep 17 00:00:00 2001 From: Teng Zhang Date: Sun, 25 Jan 2026 17:02:47 +0800 Subject: [PATCH 03/10] Update dfode-kit and agents description. --- README.md | 2 +- agents/DFODE-kit-Trainer.md | 5 +++++ agents/FlamePilot.md | 5 +++++ docs/source/citation.rst | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 agents/DFODE-kit-Trainer.md create mode 100644 agents/FlamePilot.md diff --git a/README.md b/README.md index ef94d809c..eabd8c38f 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ 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. -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 your own DNN models, 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). diff --git a/agents/DFODE-kit-Trainer.md b/agents/DFODE-kit-Trainer.md new file mode 100644 index 000000000..0351f8272 --- /dev/null +++ b/agents/DFODE-kit-Trainer.md @@ -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 training parameters, initiate training runs, and analyze results. + +To try DFODE-kit Trainer, visit https://github.com/deepflame-ai/DFODE-kit/blob/main/agent_user_guide_zh.md for more details. \ No newline at end of file diff --git a/agents/FlamePilot.md b/agents/FlamePilot.md new file mode 100644 index 000000000..84e67bac2 --- /dev/null +++ b/agents/FlamePilot.md @@ -0,0 +1,5 @@ +FlamePilot +========== +FlamePilot is an AI-powered CFD agent that leverages DeepFlame to assist users in setting up, running, and analyzing combustion simulations. It provides an intuitive interface for both novice and experienced users to interact with complex CFD tasks using natural language commands. + +To try FlamePilot, visit this Bohrium App: https://www.bohrium.com/apps/deepflame-cfd-agent. \ No newline at end of file diff --git a/docs/source/citation.rst b/docs/source/citation.rst index ede81400c..f5415d297 100644 --- a/docs/source/citation.rst +++ b/docs/source/citation.rst @@ -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 `_ + +**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 `_ \ No newline at end of file From 9e0aeb59ea201d28709f7ffc312780581599c1dd Mon Sep 17 00:00:00 2001 From: Teng Zhang Date: Sun, 25 Jan 2026 17:15:09 +0800 Subject: [PATCH 04/10] Add DFODE-kit tutorial instruction in the documentation. --- docs/source/index.rst | 2 +- docs/source/qs/dnn_models.rst | 11 +++++++++++ docs/source/qs/download_dnn_models.rst | 6 ------ 3 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 docs/source/qs/dnn_models.rst delete mode 100644 docs/source/qs/download_dnn_models.rst diff --git a/docs/source/index.rst b/docs/source/index.rst index 8b15a739a..5fdf5281c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -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 diff --git a/docs/source/qs/dnn_models.rst b/docs/source/qs/dnn_models.rst new file mode 100644 index 000000000..3d740933f --- /dev/null +++ b/docs/source/qs/dnn_models.rst @@ -0,0 +1,11 @@ +DNN Models +====================================== + +Download DNN Models +-------------------------------------- +The neural network models used in the tutorial examples can be found at– `AIS Square `_. +To run DeepFlame with DNN, download the DNN model `dfODENet `_ 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 `_ and check `tutorials `_ for detailed instructions on how to develop and deploy your own neural network models. \ No newline at end of file diff --git a/docs/source/qs/download_dnn_models.rst b/docs/source/qs/download_dnn_models.rst deleted file mode 100644 index b843e8744..000000000 --- a/docs/source/qs/download_dnn_models.rst +++ /dev/null @@ -1,6 +0,0 @@ -Download DNN Models -====================================== -The neural network models used in the tutorial examples can be found at– `AIS Square `_. -To run DeepFlame with DNN, download the DNN model `dfODENet `_ into the case folder you would like to run. - - From 8a7b73ddbcac8b2a0ad7adb1b4730b5463ec9c56 Mon Sep 17 00:00:00 2001 From: Timo Zhang Date: Mon, 26 Jan 2026 11:24:53 +0800 Subject: [PATCH 05/10] Update link to DFODE-kit agent tutorial --- agents/DFODE-kit-Trainer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agents/DFODE-kit-Trainer.md b/agents/DFODE-kit-Trainer.md index 0351f8272..9b6ed1fed 100644 --- a/agents/DFODE-kit-Trainer.md +++ b/agents/DFODE-kit-Trainer.md @@ -2,4 +2,4 @@ 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 training parameters, initiate training runs, and analyze results. -To try DFODE-kit Trainer, visit https://github.com/deepflame-ai/DFODE-kit/blob/main/agent_user_guide_zh.md for more details. \ No newline at end of file +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. From 5f7750f9574c6b6a17087f7f869c3f611c485913 Mon Sep 17 00:00:00 2001 From: Timo Zhang Date: Mon, 26 Jan 2026 12:13:59 +0800 Subject: [PATCH 06/10] Update DFODE-kit Trainer description --- agents/DFODE-kit-Trainer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agents/DFODE-kit-Trainer.md b/agents/DFODE-kit-Trainer.md index 9b6ed1fed..b15ec6cb5 100644 --- a/agents/DFODE-kit-Trainer.md +++ b/agents/DFODE-kit-Trainer.md @@ -1,5 +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 training parameters, initiate training runs, and analyze results. +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. From e8c2d6f9c8101eb6e16469c6788db1ffc3b99457 Mon Sep 17 00:00:00 2001 From: xiao312 Date: Tue, 27 Jan 2026 14:02:55 +0800 Subject: [PATCH 07/10] Enhance FlamePilot documentation with new features Updated the description of FlamePilot to highlight its features and capabilities as a CFD agent. Added an image and improved the introduction for clarity. --- agents/FlamePilot.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/agents/FlamePilot.md b/agents/FlamePilot.md index 84e67bac2..e9fb7a9c6 100644 --- a/agents/FlamePilot.md +++ b/agents/FlamePilot.md @@ -1,5 +1,12 @@ FlamePilot ========== -FlamePilot is an AI-powered CFD agent that leverages DeepFlame to assist users in setting up, running, and analyzing combustion simulations. It provides an intuitive interface for both novice and experienced users to interact with complex CFD tasks using natural language commands. -To try FlamePilot, visit this Bohrium App: https://www.bohrium.com/apps/deepflame-cfd-agent. \ No newline at end of file +
+ FlamePilot logo +
+ +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 project repository. From 19194b7c16216da3c1a6a4287cf502ded8049047 Mon Sep 17 00:00:00 2001 From: xiao312 Date: Wed, 28 Jan 2026 11:13:05 +0800 Subject: [PATCH 08/10] Update project repository link for FlamePilot --- agents/FlamePilot.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agents/FlamePilot.md b/agents/FlamePilot.md index e9fb7a9c6..66c255e2f 100644 --- a/agents/FlamePilot.md +++ b/agents/FlamePilot.md @@ -9,4 +9,4 @@ FlamePilot is an **agentic runner for combustion CFD workflows**, designed to au 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 project repository. +To try FlamePilot, visit the project repository. From 19a4350ff0d8576c4e3afaccb04d3d669ca8fb2c Mon Sep 17 00:00:00 2001 From: Timo Zhang Date: Wed, 28 Jan 2026 16:53:09 +0800 Subject: [PATCH 09/10] Update README with new features for v2.0 --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index eabd8c38f..2b8fb1abc 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,17 @@ The neural network models used in the tutorial examples can be found at– [AIS 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. From a8ff195aad0493aca7aaefd547ad395390e2ec92 Mon Sep 17 00:00:00 2001 From: Timo Zhang Date: Wed, 28 Jan 2026 17:53:43 +0800 Subject: [PATCH 10/10] Update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2b8fb1abc..4a6ae88c3 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@

-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. To train your own DNN models, please use the [DFODE-kit](https://github.com/deepflame-ai/DFODE-kit) package developed by the DeepFlame team. +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).