Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
4aa14af
Update README.md
xiao312 Feb 13, 2023
1f03758
Update examples.rst
xiao312 Feb 13, 2023
c2d9d8b
Merge pull request #196 from xiao312/master
JX278 Feb 13, 2023
37092ec
fix bugs in updating solution buffer
maorz1998 Feb 15, 2023
d4b7d20
Update CanteraTorchProperties
maorz1998 Feb 15, 2023
34cdfa9
Update corrtest.cpp
maorz1998 Feb 15, 2023
0344435
Update dfChemistryModel.C
maorz1998 Feb 15, 2023
640ae80
Merge pull request #199 from maorz1998/master
JX278 Feb 15, 2023
a0c414b
Create README.md
zhixchen Feb 16, 2023
7ac1d1f
Update README.md
xiao312 Feb 16, 2023
418f934
Merge pull request #201 from xiao312/master
OpenFOAMFans Feb 19, 2023
4bfd09f
refactor dfChemistryModel
Feb 19, 2023
c47a8d8
Merge pull request #204 from OpenFOAMFans/master
maorz1998 Feb 21, 2023
0afc60d
add new loadBalancing algorithm
maorz1998 Feb 21, 2023
20df5e3
modify compile options of dfCombustionModel
maorz1998 Feb 22, 2023
4d0c0cd
modity test
maorz1998 Feb 23, 2023
319db08
Merge pull request #205 from maorz1998/master
JX278 Feb 23, 2023
0c3adb3
compile DNNInferencer.so via install.sh
maorz1998 Feb 23, 2023
4a7348c
Merge pull request #206 from maorz1998/master
JX278 Feb 23, 2023
1849571
remove mpi communications in DNN solving procedure when use pure GPU
maorz1998 Feb 23, 2023
d3417b8
add flareFGM case
minzhang0929 Feb 24, 2023
c8d230d
Update baseFGM.C
minzhang0929 Feb 24, 2023
5ae660c
Merge pull request #207 from maorz1998/Archer
JX278 Feb 24, 2023
5c76d1c
Merge pull request #208 from minzhang0929/master
maorz1998 Feb 24, 2023
71346ab
fix a minor problem in install.sh
JX278 Feb 24, 2023
697e7fa
Merge pull request #209 from JX278/master
maorz1998 Feb 24, 2023
7e022c8
remove mpi communications in DNN solving procedure when use pure CPU
maorz1998 Feb 24, 2023
7016614
Merge pull request #211 from maorz1998/Archer
JX278 Feb 24, 2023
a68430d
Update README.md
xiao312 Mar 1, 2023
77aa2d0
Merge pull request #213 from xiao312/master
JX278 Mar 1, 2023
9fe6504
Update tableSolver.C
haixiao-stack Mar 9, 2023
3b425fd
Update CPU_inferencce_validation.yml
JX278 Mar 9, 2023
2305e99
Add TCI test (#217)
JX278 Mar 10, 2023
a9d6347
Merge pull request #218 from haixiao-stack/master
maorz1998 Mar 13, 2023
79ba6b4
add GPU-compatible linear solver amgx
maorz1998 Mar 17, 2023
a1f9660
remove redundant .gitignore
maorz1998 Mar 17, 2023
61ba214
Delete PaSR.C
minzhang0929 Mar 22, 2023
e83da82
Delete PaSR.H
minzhang0929 Mar 22, 2023
1063571
Merge branch 'deepmodeling:master' into master
minzhang0929 Mar 22, 2023
b946e55
update PaSR model
minzhang0929 Mar 22, 2023
9e1610f
Merge pull request #223 from minzhang0929/master
OpenFOAMFans Mar 22, 2023
354b7c8
Merge pull request #222 from maorz1998/master
maorz1998 Mar 22, 2023
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
29 changes: 19 additions & 10 deletions .github/workflows/CPU_inferencce_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,36 +26,45 @@ jobs:
sudo apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get -y install openfoam7
git clone https://github.com/deepmodeling/deepflame-dev.git
cd deepflame-dev
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
wget https://mirrors.edge.kernel.org/ubuntu/pool/main/libf/libffi/libffi7_3.3-4_amd64.deb
bash Miniconda3-latest-Linux-x86_64.sh -b
. ~/miniconda3/etc/profile.d/conda.sh
conda create -n libcantera python=3.8
conda activate libcantera
conda install -c cantera libcantera-devel
conda install pytorch
conda install pybind11
conda install --channel https://conda.anaconda.org/zhaofeng-shu33 easydict
cd /github/home/miniconda3/envs/libcantera/lib
conda install pytorch pybind11
conda install --channel https://conda.anaconda.org/zhaofeng-shu33 easydict
git clone https://github.com/deepmodeling/deepflame-dev.git
cd deepflame-dev


- name: build and validation with CPU inference
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_btl_vader_single_copy_mechanism: none
run:
/bin/bash -c "git clone https://github.com/deepcombustion/deepcombustion.git && cp -r deepcombustion/DeePCK/Model/HE04_Hydrogen_ESH2_GMS_sub_20221101/ mechanisms/ && source ~/miniconda3/etc/profile.d/conda.sh && conda activate libcantera && source /opt/openfoam7/etc/bashrc
/bin/bash -c " echo $PWD && ls $PWD
&& wget https://github.com/JX278/DeepFlame-flareFGM-table/raw/main/flareFGM_Table_Download.zip
&& unzip flareFGM_Table_Download.zip
&& ls $PWD
&& ls flareFGM_Table_Download
&& cp -r flareFGM_Table_Download/SandiaD/flare.tbl examples/dfLowMachFoam/2DSandiaD_flareFGM/
&& git clone https://github.com/deepcombustion/deepcombustion.git
&& cp -r deepcombustion/DeePCK/Model/HE04_Hydrogen_ESH2_GMS_sub_20221101/ mechanisms/ && source ~/miniconda3/etc/profile.d/conda.sh && conda activate libcantera && source /opt/openfoam7/etc/bashrc
&& . configure.sh --use_pytorch && source ./bashrc && . install.sh
&& cd test && ./Allrun && conda deactivate "

- name: test
run: |
cd test
cmake -B build
cmake --build build
cd build
ctest
ctest






1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ libtorch*.zip*
__pycache__/
lib/
bin/
.vscode/
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
# DeepFlame v1.0.0
<p align="center">
<a href="https://github.com/deepmodeling/deepflame-dev">
<img src="https://user-images.githubusercontent.com/121787251/218061666-eb9e4188-d368-41d0-8ed6-fe5121699efe.jpg">
</a>
<a href="https://github.com/deepmodeling/deepflame-dev/releases">
<img src="https://img.shields.io/github/v/release/deepmodeling/deepflame-dev?include_prereleases&label=latest%20release&style=for-the-badge">
</a>
<a href="https://github.com/deepmodeling/deepflame-dev/pulls">
<img src="https://img.shields.io/badge/contributions-welcome-red.svg?style=for-the-badge">
</a>
<a href="https://github.com/deepmodeling/deepflame-dev/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/deepmodeling/deepflame-dev?color=yellow&logo=GitHub&style=for-the-badge">
</a>
<a href="https://deepflame.deepmodeling.com/en/latest/">
<img src="https://img.shields.io/website?label=Documentation%20HomePage&style=for-the-badge&up_message=online&url=https%3A%2F%2Fdeepflame.deepmodeling.com%2Fen%2Flatest%2F">
</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.

The deep learning algorithms and models used in the DeepFlame tutorial examples are developed and trained independently by our collaborators team – [DeepCombustion](https://github.com/deepcombustion/deepcombustion). Please refer to their website for detailed information.
Expand All @@ -7,8 +24,15 @@ The deep learning algorithms and models used in the DeepFlame tutorial examples
Detailed guide for installation and tutorials is available on [our documentation website](https://deepflame.deepmodeling.com).

## Features
New in v0.6.0 (2022/11/14):
New features as of 2023/03/01:
- New load balancing algorithm
- Add support for solving chemical source term simultaneously on GPU (DNN) and CPU (CVODE)
- Add FGM model
- Reconstruct dfChemistryModel

New in v1.0.0 (2022/11/15):
- Add support for the parallel computation of DNN using libtorch on multiple GPUs
- Add TCI model

New in v0.5.0 (2022/10/15):
- Add support for the parallel computation of DNN via single and multiple GPUs
Expand Down
2 changes: 1 addition & 1 deletion docs/source/qs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ If the case is successfully run, the result can be found in ``/postProcessing/pr

.. code-block:: bash

gunplot
gnuplot
plot "/your/path/to/postProcessing/probes/0/T"

You will get a graph:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ loadbalancing
{
active true;
log false;
algorithm allAverage;//headTail;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ loadbalancing
{
active true;
log false;
algorithm allAverage;//headTail;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ loadbalancing
{
active true;
log false;
algorithm allAverage;//headTail;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ splittingStrategy off;

TorchSettings
{
torch off;
torch on;
GPU off;
log on;
torchModel "HE04_Hydrogen_ESH2_GMS_sub_20221101";
Expand All @@ -49,6 +49,7 @@ loadbalancing
{
active true;
log false;
algorithm allAverage;//headTail;
}


Expand Down
2 changes: 1 addition & 1 deletion examples/dfHighSpeedFoam/oneD_detonationH2/Allrun
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ cp -r 0_orig/ 0/
runApplication blockMesh
runApplication setFields
runApplication decomposePar
runApplication mpirun --oversubscribe -np 8 $application -parallel
runApplication mpirun -np 8 $application -parallel
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ loadbalancing
{
active true;
log false;
algorithm allAverage;//headTail;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ loadbalancing
{
active true;
log false;
algorithm allAverage;//headTail;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ loadbalancing
{
active true;
log false;
algorithm allAverage;//headTail;
}


Expand Down
Binary file added examples/dfLowMachFoam/2DSandiaD_flareFGM/0/G.gz
Binary file not shown.
75 changes: 75 additions & 0 deletions examples/dfLowMachFoam/2DSandiaD_flareFGM/0/He
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object c;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 1907;

boundaryField
{
wallTube
{
type zeroGradient;
}

outlet
{
type zeroGradient;
}

inletPilot
{
type fixedValue;
value uniform -170863.69815950916;
}

inletAir
{
type fixedValue;
value uniform 35298.7;
}

wallOutside
{
type zeroGradient;
}

inletCH4
{
type fixedValue;
value uniform -714081.00107;
}

axis
{
type empty;
}

frontAndBack_pos
{
type wedge;
}
frontAndBack_neg
{
type wedge;
}


}


// ************************************************************************* //
69 changes: 69 additions & 0 deletions examples/dfLowMachFoam/2DSandiaD_flareFGM/0/N2
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object N2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0.77;

boundaryField
{
inletCH4
{
type fixedValue;
value uniform 0.6473;
}

wallOutside
{
type zeroGradient;
}

wallTube
{
type zeroGradient;
}

inletPilot
{
type fixedValue;
value uniform 0.7342;
}

inletAir
{
type fixedValue;
value uniform 0.77;
}

outlet
{
type zeroGradient;
}

frontAndBack_pos
{
type wedge;
}

frontAndBack_neg
{
type wedge;
}
}


// ************************************************************************* //
69 changes: 69 additions & 0 deletions examples/dfLowMachFoam/2DSandiaD_flareFGM/0/T
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 1 0 0 0];

internalField uniform 300;

boundaryField
{
inletCH4
{
type fixedValue;
value uniform 294;
}

wallOutside
{
type zeroGradient;
}

wallTube
{
type zeroGradient;
}

inletPilot
{
type fixedValue;
value uniform 1880;
}

inletAir
{
type fixedValue;
value uniform 291;
}

outlet
{
type zeroGradient;
}

frontAndBack_pos
{
type wedge;
}

frontAndBack_neg
{
type wedge;
}
}


// ************************************************************************* //
Binary file added examples/dfLowMachFoam/2DSandiaD_flareFGM/0/U.gz
Binary file not shown.
Binary file not shown.
Loading