From 4fca9e6e75c16b4b4a63a2180fc9b548d95005e3 Mon Sep 17 00:00:00 2001 From: JX278 Date: Fri, 29 Dec 2023 16:44:56 +0800 Subject: [PATCH 1/5] update docs --- docs/source/qs/install.rst | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/docs/source/qs/install.rst b/docs/source/qs/install.rst index 5ea4a908..aed71a75 100644 --- a/docs/source/qs/install.rst +++ b/docs/source/qs/install.rst @@ -151,29 +151,9 @@ Finally you can build and install DeepFlame: Other Options ------------------------------- -DeepFlame also provides users with LibTorch and CVODE (no DNN version) options. +DeepFlame also provides users with full GPU version and CVODE (no DNN version) options. -**1. If you choose to use LibTorch (C++ API for Torch), first create the conda env and install** `LibCantera `_: - -.. code-block:: bash - - conda create -n df-libtorch python=3.8 - conda activate df-libtorch - conda install -c conda-forge libcantera-devel - -Then you can pass your own libtorch path to DeepFlame. - -.. code-block:: bash - - cd deepflame-dev - . configure.sh --libtorch_dir /path/to/libtorch/ - source ./bashrc - . install.sh - -.. Note:: Some compiling issues may happen due to system compatability. Instead of using conda installed Cantera C++ lib and the downloaded Torch C++ lib, try to compile your own Cantera and Torch C++ libraries. - - -**2. If you just need DeepFlame's CVODE solver without DNN model, just install LibCantera via** `conda `_. +**1. If you just need DeepFlame's CVODE solver without DNN model, just install LibCantera via** `conda `_. .. code-block:: bash @@ -199,7 +179,7 @@ If ``df-notorch`` not activated (or you have a self-compiled libcantera), specif . install.sh -**3. If you wish to employ dfMatrix and the AMGX library for accelerating PDE solving using GPU:** +**2. If you wish to employ dfMatrix and the AMGX library for accelerating PDE solving using GPU:** .. Note:: This is still under developement. @@ -208,7 +188,7 @@ To begin, you will need to install AMGX. You can find the instructions for insta .. code-block:: bash cd deepflame-dev - . configure.sh --amgx_dir /your/path/to/AMGX/ + . configure.sh --amgx_dir /your/path/to/AMGX/ --libtorch_dir /path/to/libtorch/ source ./bashrc . install.sh @@ -224,7 +204,7 @@ Also, you will need to add configuration files for AMGX for each euqation under = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -**4. If you wish to install DeepFlame with CMake** +**3. If you wish to install DeepFlame with CMake** .. Note:: This is still under developement. From 2dcce8e7b18ea7b58a5cbee6a6bc2007f8de9a13 Mon Sep 17 00:00:00 2001 From: JX278 Date: Fri, 29 Dec 2023 16:56:16 +0800 Subject: [PATCH 2/5] modify the flareFGM case --- examples/dfLowMachFoam/2DSandiaD_flareFGM/Allrun | 11 ++++++++++- examples/dfLowMachFoam/2DSandiaD_flareFGM/ReadMe | 1 - 2 files changed, 10 insertions(+), 2 deletions(-) delete mode 100644 examples/dfLowMachFoam/2DSandiaD_flareFGM/ReadMe diff --git a/examples/dfLowMachFoam/2DSandiaD_flareFGM/Allrun b/examples/dfLowMachFoam/2DSandiaD_flareFGM/Allrun index fcb5cef9..34d91d2a 100755 --- a/examples/dfLowMachFoam/2DSandiaD_flareFGM/Allrun +++ b/examples/dfLowMachFoam/2DSandiaD_flareFGM/Allrun @@ -1,13 +1,22 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory +if [ -e flare_CH4_SandiaD_4D.tbl] +then + echo "flare_CH4_SandiaD_4D.tbl exists. Make sure correct table has been used!" +else + echo "flare_CH4_SandiaD_4D.tbl not exist. Downloading ..." + wget --content-disposition https://aisquare.oss-us-east-1.aliyuncs.com/data/datasets/14b50df5-dbe9-4f1c-bf58-032b8bc40a20 + unzip flare_CH4_SandiaD_4D.zip +fi + + # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name application=$(getApplication) - runApplication blockMesh runApplication decomposePar -force diff --git a/examples/dfLowMachFoam/2DSandiaD_flareFGM/ReadMe b/examples/dfLowMachFoam/2DSandiaD_flareFGM/ReadMe deleted file mode 100644 index 3a7a725c..00000000 --- a/examples/dfLowMachFoam/2DSandiaD_flareFGM/ReadMe +++ /dev/null @@ -1 +0,0 @@ -The FGM table for testing case is avaliable at https://aisquare.oss-us-east-1.aliyuncs.com/data/datasets/14b50df5-dbe9-4f1c-bf58-032b8bc40a20 From 1c1c1fb6a743749e55ac6acf4144d1080bf98909 Mon Sep 17 00:00:00 2001 From: JX278 Date: Fri, 29 Dec 2023 18:50:58 +0800 Subject: [PATCH 3/5] remvoe unexpected error printouts --- src/dfCombustionModels/FGM/baseFGM/baseFGM.C | 10 +++++----- src/dfCombustionModels/FGM/baseFGM/baseFGM.H | 4 ++-- src/dfCombustionModels/Make/options | 1 - 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/dfCombustionModels/FGM/baseFGM/baseFGM.C b/src/dfCombustionModels/FGM/baseFGM/baseFGM.C index d2654eb8..7985b21f 100644 --- a/src/dfCombustionModels/FGM/baseFGM/baseFGM.C +++ b/src/dfCombustionModels/FGM/baseFGM/baseFGM.C @@ -38,7 +38,7 @@ Foam::combustionModels::baseFGM::baseFGM ) : laminar(modelType, thermo, turb, combustionProperties), - fvOptions(fv::options::New(this->mesh())), + // fvOptions(fv::options::New(this->mesh())), buffer_(this->coeffs().lookupOrDefault("buffer", false)), scaledPV_(this->coeffs().lookupOrDefault("scaledPV", false)), incompPref_(this->coeffs().lookupOrDefault("incompPref", -10.0)), @@ -535,11 +535,11 @@ void Foam::combustionModels::baseFGM::transport() ) -fvm::laplacian( mut/Sct_ + mu/Sc_, c_) -omega_c_ - + fvOptions(rho_, c_) + // + fvOptions(rho_, c_) == c_ * S_c ); - fvOptions.correct(c_); + // fvOptions.correct(c_); if(relaxation_) { @@ -609,9 +609,9 @@ void Foam::combustionModels::baseFGM::transport() ) -fvm::laplacian( mut/Sct_ + mu/Sc_, c_) -omega_c_ - + fvOptions(rho_, c_) + // + fvOptions(rho_, c_) ); - fvOptions.correct(c_); + // fvOptions.correct(c_); if(relaxation_) { diff --git a/src/dfCombustionModels/FGM/baseFGM/baseFGM.H b/src/dfCombustionModels/FGM/baseFGM/baseFGM.H index f263d0a3..0831cedd 100644 --- a/src/dfCombustionModels/FGM/baseFGM/baseFGM.H +++ b/src/dfCombustionModels/FGM/baseFGM/baseFGM.H @@ -42,7 +42,7 @@ SourceFiles #include "../laminar/laminar.H" #include "uniformDimensionedFields.H" #include "CanteraMixture.H" -#include "fvOptions.H" +// #include "fvOptions.H" #include "LESfilter.H" //#include "basicThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -63,7 +63,7 @@ class baseFGM { // Protected Data protected: - fv::options& fvOptions; + // fv::options& fvOptions; //- buffer switch Switch buffer_; diff --git a/src/dfCombustionModels/Make/options b/src/dfCombustionModels/Make/options index bd7e2982..8296e02d 100644 --- a/src/dfCombustionModels/Make/options +++ b/src/dfCombustionModels/Make/options @@ -36,7 +36,6 @@ LIB_LIBS = \ -lturbulenceModels \ -llagrangian \ -lfiniteVolume \ - -lfvOptions \ -lmeshTools \ -L$(DF_LIBBIN) \ -ldfCompressibleTurbulenceModels \ From a1657bcdb586082dbef874f0d6d4075d0a71b70a Mon Sep 17 00:00:00 2001 From: JX278 <113102069+JX278@users.noreply.github.com> Date: Fri, 29 Dec 2023 22:24:03 +0800 Subject: [PATCH 4/5] Update CPU_inferencce_validation.yml --- .github/workflows/CPU_inferencce_validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CPU_inferencce_validation.yml b/.github/workflows/CPU_inferencce_validation.yml index d3efd2a4..144f1258 100644 --- a/.github/workflows/CPU_inferencce_validation.yml +++ b/.github/workflows/CPU_inferencce_validation.yml @@ -51,7 +51,7 @@ jobs: && wget --content-disposition https://aisquare.oss-us-east-1.aliyuncs.com/data/datasets/14b50df5-dbe9-4f1c-bf58-032b8bc40a20 && unzip flare_CH4_SandiaD_4D.zip && ls $PWD - && cp -r flare_CH4_SandiaD_4D.tbl examples/dfLowMachFoam/2DSandiaD_flareFGM/ + && cp -r flare_CH4_SandiaD_4D.tbl examples/dfLowMachFoam/fgm/twoD_SandiaD_flareFGM && 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 " From 89dc2fd5c6dc85faa5b018480b0924d8e11f564f Mon Sep 17 00:00:00 2001 From: JX278 <113102069+JX278@users.noreply.github.com> Date: Fri, 29 Dec 2023 22:25:00 +0800 Subject: [PATCH 5/5] Update CMakeLists.txt --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1d8f073e..ff80c105 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -21,7 +21,7 @@ file(COPY ./dfLowMachFoam/twoD_reactingTGV/H2/cvodeSolver/postProcessing/sample/ file(COPY ./dfLowMachFoam/twoD_reactingTGV/H2/cvodeSolver/postProcessing/sample/0.0002/data_T.xy DESTINATION 2DTGV/2) file(COPY ./dfLowMachFoam/twoD_reactingTGV/H2/cvodeSolver/postProcessing/sample/0.0001/data_T.xy DESTINATION 2DTGV/1) -file(COPY ./dfLowMachFoam/2DSandiaD_flareFGM/postProcessing/sample/1.1/data_T.xy DESTINATION 2DSandia) +file(COPY ./dfLowMachFoam/twoD_SandiaD_flareFGM/postProcessing/sample/1.1/data_T.xy DESTINATION 2DSandia) file(COPY ./Tu500K-Phi1/fs DESTINATION flameSpeed) enable_testing()