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 " 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. diff --git a/examples/dfLowMachFoam/fgm/twoD_SandiaD_flareFGM/Allrun b/examples/dfLowMachFoam/fgm/twoD_SandiaD_flareFGM/Allrun index fcb5cef9..34d91d2a 100755 --- a/examples/dfLowMachFoam/fgm/twoD_SandiaD_flareFGM/Allrun +++ b/examples/dfLowMachFoam/fgm/twoD_SandiaD_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/fgm/twoD_SandiaD_flareFGM/ReadMe b/examples/dfLowMachFoam/fgm/twoD_SandiaD_flareFGM/ReadMe deleted file mode 100644 index 3a7a725c..00000000 --- a/examples/dfLowMachFoam/fgm/twoD_SandiaD_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 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 \ 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() diff --git a/test/dfLowMachFoam/2DSandiaD_flareFGM b/test/dfLowMachFoam/2DSandiaD_flareFGM deleted file mode 120000 index c4280a96..00000000 --- a/test/dfLowMachFoam/2DSandiaD_flareFGM +++ /dev/null @@ -1 +0,0 @@ -../../examples/dfLowMachFoam/2DSandiaD_flareFGM/ \ No newline at end of file diff --git a/test/dfLowMachFoam/twoD_SandiaD_flareFGM b/test/dfLowMachFoam/twoD_SandiaD_flareFGM new file mode 120000 index 00000000..02a676d3 --- /dev/null +++ b/test/dfLowMachFoam/twoD_SandiaD_flareFGM @@ -0,0 +1 @@ +../../examples/dfLowMachFoam/fgm/twoD_SandiaD_flareFGM/ \ No newline at end of file