tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous: Simplification

Re-scripted the tutorials to take advantage of foamDictionary and .orig
This commit is contained in:
Will Bainbridge
2019-11-28 12:14:01 +00:00
parent c28eab7318
commit a2bb959e23
8 changed files with 110 additions and 116 deletions

View File

@ -4,21 +4,8 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
keepCases="moriyoshiHomogeneous" (cd moriyoshiHomogeneous && foamCleanTutorials)
loseCases="moriyoshiHomogeneousPart2 moriyoshiHomogeneousHydrogen"
for caseName in $keepCases removeCase moriyoshiHomogeneousHydrogen
do
(
cd $caseName || exit
foamCleanTutorials
)
done
for caseName in $loseCases
do
removeCase $caseName
done
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -4,57 +4,43 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
setControlDict() # Clone the propane case and set it up for hydrogen
{
sed \
-e "s/\(deltaT[ \t]*\) 5e-06;/\1 1e-05;/g" \
-e "s/\(endTime[ \t]*\) 0.005;/\1 0.015;/g" \
-e "s/\(writeInterval[ \t]*\) 10;/\1 50;/g" \
-i system/controlDict
}
setCombustionProperties()
{
sed \
-e "s/\(laminarFlameSpeedCorrelation[ \t]*\) Gulders;/\1 RaviPetersen;/g" \
-e "s/\(fuel[ \t]*\) Propane;/\1 HydrogenInAir;/g" \
-i constant/combustionProperties
}
# Do moriyoshiHomogeneous
( cd moriyoshiHomogeneous && foamRunTutorials )
# Clone case for second phase
cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2
# Modify and execute
(
cd moriyoshiHomogeneousPart2 || exit
# The following 2 command lines are a generic implementation of the
# following command:
# cp -r ../moriyoshiHomogeneous/0.005 .
lastTimeStep=$(foamListTimes -case ../moriyoshiHomogeneous -latestTime)
cp -r ../moriyoshiHomogeneous/$lastTimeStep .
setControlDict
runApplication $(getApplication)
)
# Clone case for hydrogen
cloneCase moriyoshiHomogeneous moriyoshiHomogeneousHydrogen cloneCase moriyoshiHomogeneous moriyoshiHomogeneousHydrogen
# Modify and execute
( (
cd moriyoshiHomogeneousHydrogen || exit cd moriyoshiHomogeneousHydrogen || exit 1
setCombustionProperties
mv constant/thermophysicalProperties \ mv constant/thermophysicalProperties \
constant/thermophysicalProperties.propane constant/thermophysicalProperties.propane
mv constant/thermophysicalProperties.hydrogen \ mv constant/thermophysicalProperties.hydrogen \
constant/thermophysicalProperties constant/thermophysicalProperties
runApplication $(getApplication)
mv constant/combustionPropertiesInclude \
constant/combustionPropertiesInclude.propane
mv constant/combustionPropertiesInclude.hydrogen \
constant/combustionPropertiesInclude
)
# Run the propane case
(
cd moriyoshiHomogeneous || exit 1
foamRunTutorials
if ! isTest $@
then
foamDictionary system/controlDict -entry deltaT -set 1e-05
foamDictionary system/controlDict -entry endTime -set 0.015
foamDictionary system/controlDict -entry writeInterval -set 50
runApplication -a XiFoam
fi
)
# Run the hydrogen case
(
cd moriyoshiHomogeneousHydrogen || exit 1
foamRunTutorials
) )
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -15,9 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
laminarFlameSpeedCorrelation Gulders; #include "combustionPropertiesInclude"
fuel Propane;
Su Su [0 1 -1 0 0 0 0] 0.434; Su Su [0 1 -1 0 0 0 0] 0.434;
@ -73,28 +71,28 @@ RaviPetersenCoeffs
HydrogenInAir HydrogenInAir
{ {
TRef 320; TRef 320;
pPoints ( 1.0e05 5.0e05 1.0e06 2.0e06 3.0e06 ); pPoints (1e5 5e5 1e6 2e6 3e6);
EqRPoints (0.5 2.0 5.0); EqRPoints (0.5 2 5);
alpha ( ( (-0.03 -2.347 9.984 -6.734 1.361) alpha ((( -0.03 -2.347 9.984 -6.734 1.361)
( 1.61 -9.708 19.026 -11.117 2.098) ( 1.61 -9.708 19.026 -11.117 2.098)
( 2.329 -12.287 21.317 -11.973 2.207) ( 2.329 -12.287 21.317 -11.973 2.207)
( 2.593 -12.813 20.815 -11.471 2.095) ( 2.593 -12.813 20.815 -11.471 2.095)
( 2.728 -13.164 20.794 -11.418 2.086) ) ( 2.728 -13.164 20.794 -11.418 2.086))
( ( 3.558 0.162 -0.247 0.0253 0 ) (( 3.558 0.162 -0.247 0.0253 0 )
( 4.818 -0.872 -0.053 0.0138 0 ) ( 4.818 -0.872 -0.053 0.0138 0 )
( 3.789 -0.312 -0.208 0.028 0 ) ( 3.789 -0.312 -0.208 0.028 0 )
( 4.925 -1.841 0.211 -0.0059 0 ) ( 4.925 -1.841 0.211 -0.0059 0 )
( 4.505 -1.906 0.259 -0.0105 0 ) ) ); ( 4.505 -1.906 0.259 -0.0105 0 )));
beta ( ( ( 5.07 -6.42 3.87 -0.767) beta ((( 5.07 -6.42 3.87 -0.767)
( 5.52 -6.73 3.88 -0.728) ( 5.52 -6.73 3.88 -0.728)
( 5.76 -6.92 3.92 -0.715) ( 5.76 -6.92 3.92 -0.715)
( 6.02 -7.44 4.37 -0.825) ( 6.02 -7.44 4.37 -0.825)
( 7.84 -11.55 7.14 -1.399) ) ( 7.84 -11.55 7.14 -1.399))
( ( 1.405 0.053 0.022 0 ) (( 1.405 0.053 0.022 0 )
( 1.091 0.317 0 0 ) ( 1.091 0.317 0 0 )
( 1.64 -0.03 0.07 0 ) ( 1.64 -0.03 0.07 0 )
( 0.84 0.56 0 0 ) ( 0.84 0.56 0 0 )
( 0.81 0.64 0 0 ) ) ); ( 0.81 0.64 0 0 )));
} }
} }

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object combustionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
laminarFlameSpeedCorrelation Gulders;
fuel Propane;
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object combustionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
laminarFlameSpeedCorrelation RaviPetersen;
fuel HydrogenInAir;
// ************************************************************************* //

View File

@ -26,8 +26,7 @@ thermoType
energy absoluteEnthalpy; energy absoluteEnthalpy;
} }
stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 15.675;
stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 15.675;
reactants reactants
{ {
@ -40,24 +39,13 @@ reactants
Tlow 200; Tlow 200;
Thigh 6000; Thigh 6000;
Tcommon 1000; Tcommon 1000;
highCpCoeffs highCpCoeffs (3.24515 0.00202212 -6.98806e-07 1.11477e-10 -6.60444e-15 -1601.58 4.60831);
( lowCpCoeffs (3.60909 -0.000628822 4.45105e-06 -3.81328e-09 1.0553e-12 -1587.86 3.21309);
3.24515 0.00202212 -6.98806e-07 1.11477e-10
-6.60444e-15 -1601.58 4.60831
);
lowCpCoeffs
(
3.60909 -0.000628822 4.45105e-06 -3.81328e-09
1.0553e-12 -1587.86 3.21309
);
} }
transport transport
{ {
mu 1e-5; mu 1e-5;
Pr 1; Pr 1;
As 1.67212e-06;
Ts 170.672;
} }
} }
@ -72,24 +60,13 @@ products
Tlow 200; Tlow 200;
Thigh 6000; Thigh 6000;
Tcommon 1000; Tcommon 1000;
highCpCoeffs highCpCoeffs (3.10561 0.00179748 -5.94701e-07 9.05612e-11 -5.08447e-15 -11003.6 5.12109);
( lowCpCoeffs (3.498 0.000638554 -1.83885e-07 1.20991e-09 -7.68702e-13 -11080.6 3.1819);
3.10561 0.00179748 -5.94701e-07 9.05612e-11
-5.08447e-15 -11003.6 5.12109
);
lowCpCoeffs
(
3.498 0.000638554 -1.83885e-07 1.20991e-09
-7.68702e-13 -11080.6 3.1819
);
} }
transport transport
{ {
mu 1e-5; mu 1e-5;
Pr 1; Pr 1;
As 1.67212e-06;
Ts 170.672;
} }
} }

View File

@ -39,8 +39,8 @@ reactants
Tlow 200; Tlow 200;
Thigh 5000; Thigh 5000;
Tcommon 1000; Tcommon 1000;
highCpCoeffs ( 3.02082 0.00104314 -2.88613e-07 4.20369e-11 -2.37182e-15 -902.964 2.3064 ); highCpCoeffs (3.02082 0.00104314 -2.88613e-07 4.20369e-11 -2.37182e-15 -902.964 2.3064);
lowCpCoeffs ( 2.99138 0.00343493 -8.43792e-06 9.57755e-09 -3.75097e-12 -987.16 1.95123 ); lowCpCoeffs (2.99138 0.00343493 -8.43792e-06 9.57755e-09 -3.75097e-12 -987.16 1.95123);
} }
transport transport
{ {
@ -60,8 +60,8 @@ products
Tlow 200; Tlow 200;
Thigh 5000; Thigh 5000;
Tcommon 1000; Tcommon 1000;
highCpCoeffs ( 2.879 0.00161934 -4.61257e-07 6.41382e-11 -3.3855e-15 -8023.54 4.11691 ); highCpCoeffs (2.879 0.00161934 -4.61257e-07 6.41382e-11 -3.3855e-15 -8023.54 4.11691);
lowCpCoeffs ( 3.3506 0.00176018 -4.28718e-06 5.63372e-09 -2.35948e-12 -8211.42 1.36387 ); lowCpCoeffs (3.3506 0.00176018 -4.28718e-06 5.63372e-09 -2.35948e-12 -8211.42 1.36387);
} }
transport transport
{ {