forked from deepflameCFD/deepflame-dev
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #406 from JX278/master
add a test for torch
- Loading branch information
Showing
34 changed files
with
1,079 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,6 @@ | ||
Download DNN Models | ||
====================================== | ||
The neural network models used in the tutorial examples are indepentently trained | ||
by our collaborators team – `Intelligent Combustion <https://github.com/intelligent-algorithm-team/intelligent-combustion.git>`_. | ||
To run DeepFlame with DNN, first download the DeepCombustion repository into ``deepflame-dev/``: | ||
|
||
.. code-block:: bash | ||
cd $DF_ROOT | ||
git clone https://github.com/intelligent-algorithm-team/intelligent-combustion.git.git | ||
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. | ||
|
||
Then copy the required DNN model into ``mechanisms/``, for example: | ||
|
||
.. code-block:: bash | ||
cp -r intelligent-combustion/DeePCK/Model/HE04_Hydrogen_ESH2_GMS_sub_20221101/ mechanisms/ | ||
.. Note:: Here ``HE04_Hydrogen_ESH2_GMS_sub_20221101`` is the default DNN model for all the tutorial cases in ``$DF_ROOT/examples/``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/*--------------------------------*- 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 volVectorField; | ||
location "0"; | ||
object U; | ||
} | ||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | ||
|
||
dimensions [0 1 -1 0 0 0 0]; | ||
|
||
internalField uniform (5.36 0 0); | ||
|
||
boundaryField | ||
{ | ||
boundary | ||
{ | ||
type empty; | ||
} | ||
inlet | ||
{ | ||
type fixedValue; | ||
value uniform (5.36 0 0); | ||
} | ||
outlet | ||
{ | ||
type zeroGradient; | ||
} | ||
} | ||
|
||
|
||
// ************************************************************************* // |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/*--------------------------------*- 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.0; | ||
|
||
boundaryField | ||
{ | ||
boundary | ||
{ | ||
type empty; | ||
} | ||
inlet | ||
{ | ||
type fixedValue; | ||
value uniform 0.0; | ||
} | ||
outlet | ||
{ | ||
type zeroGradient; | ||
} | ||
} | ||
|
||
|
||
// ************************************************************************* // |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/*--------------------------------*- 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 p; | ||
} | ||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | ||
|
||
dimensions [1 -1 -2 0 0 0 0]; | ||
|
||
internalField uniform 101325; | ||
|
||
boundaryField | ||
{ | ||
boundary | ||
{ | ||
type empty; | ||
} | ||
inlet | ||
{ | ||
type zeroGradient; | ||
} | ||
outlet | ||
{ | ||
type waveTransmissive; | ||
gamma 1.4; | ||
value uniform 101325; | ||
} | ||
} | ||
|
||
|
||
// ************************************************************************* // |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
cd ${0%/*} || exit 1 # Run from this directory | ||
|
||
echo "Cleaning log.*" | ||
rm log.* | ||
echo "Cleaning processor*" | ||
rm -r processor* | ||
echo "Cleaning polyMesh/" | ||
rm -r constant/polyMesh | ||
echo "Cleaning last result" | ||
rm 0.* -r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
cd ${0%/*} || exit 1 # Run from this directory | ||
|
||
# Source tutorial run functions | ||
. $WM_PROJECT_DIR/bin/tools/RunFunctions | ||
|
||
application=dfLowMachFoam | ||
|
||
runApplication blockMesh | ||
runApplication decomposePar | ||
runApplication mpirun -np 4 --allow-run-as-root $application -parallel | ||
reconstructPar | ||
flameSpeed > log.fs | ||
sed -n 's/.*flameSpeed = \([0-9]*\(\.[0-9]*\)\?\).*/\1/p' log.fs > fs | ||
|
||
|
Oops, something went wrong.