diff --git a/tutorials/combustion/XiFoam/RAS/Allclean b/tutorials/combustion/XiFoam/RAS/Allclean index edc01a252b..ce160ffd9a 100755 --- a/tutorials/combustion/XiFoam/RAS/Allclean +++ b/tutorials/combustion/XiFoam/RAS/Allclean @@ -4,21 +4,8 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -keepCases="moriyoshiHomogeneous" -loseCases="moriyoshiHomogeneousPart2 moriyoshiHomogeneousHydrogen" +(cd moriyoshiHomogeneous && foamCleanTutorials) -for caseName in $keepCases -do -( - cd $caseName || exit - - foamCleanTutorials -) -done - -for caseName in $loseCases -do - removeCase $caseName -done +removeCase moriyoshiHomogeneousHydrogen #------------------------------------------------------------------------------ diff --git a/tutorials/combustion/XiFoam/RAS/Allrun b/tutorials/combustion/XiFoam/RAS/Allrun index b3d0e3bf1d..d06d947b1f 100755 --- a/tutorials/combustion/XiFoam/RAS/Allrun +++ b/tutorials/combustion/XiFoam/RAS/Allrun @@ -4,57 +4,43 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -setControlDict() -{ - 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 +# Clone the propane case and set it up for hydrogen +cloneCase moriyoshiHomogeneous moriyoshiHomogeneousHydrogen ( - cd moriyoshiHomogeneousPart2 || exit + cd moriyoshiHomogeneousHydrogen || exit 1 - # The following 2 command lines are a generic implementation of the - # following command: - # cp -r ../moriyoshiHomogeneous/0.005 . + mv constant/thermophysicalProperties \ + constant/thermophysicalProperties.propane + mv constant/thermophysicalProperties.hydrogen \ + constant/thermophysicalProperties - lastTimeStep=$(foamListTimes -case ../moriyoshiHomogeneous -latestTime) - cp -r ../moriyoshiHomogeneous/$lastTimeStep . - - setControlDict - runApplication $(getApplication) + mv constant/combustionPropertiesInclude \ + constant/combustionPropertiesInclude.propane + mv constant/combustionPropertiesInclude.hydrogen \ + constant/combustionPropertiesInclude ) -# Clone case for hydrogen -cloneCase moriyoshiHomogeneous moriyoshiHomogeneousHydrogen - -# Modify and execute +# Run the propane case ( - cd moriyoshiHomogeneousHydrogen || exit + cd moriyoshiHomogeneous || exit 1 - setCombustionProperties - mv constant/thermophysicalProperties \ - constant/thermophysicalProperties.propane - mv constant/thermophysicalProperties.hydrogen \ - constant/thermophysicalProperties - runApplication $(getApplication) + 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 ) #------------------------------------------------------------------------------ diff --git a/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/combustionProperties b/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/combustionProperties index efeb72583a..022dc76de3 100644 --- a/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/combustionProperties +++ b/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/combustionProperties @@ -15,9 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -laminarFlameSpeedCorrelation Gulders; - -fuel Propane; +#include "combustionPropertiesInclude" Su Su [0 1 -1 0 0 0 0] 0.434; @@ -73,28 +71,28 @@ RaviPetersenCoeffs HydrogenInAir { TRef 320; - pPoints ( 1.0e05 5.0e05 1.0e06 2.0e06 3.0e06 ); - EqRPoints (0.5 2.0 5.0); - alpha ( ( (-0.03 -2.347 9.984 -6.734 1.361) - ( 1.61 -9.708 19.026 -11.117 2.098) - ( 2.329 -12.287 21.317 -11.973 2.207) - ( 2.593 -12.813 20.815 -11.471 2.095) - ( 2.728 -13.164 20.794 -11.418 2.086) ) - ( ( 3.558 0.162 -0.247 0.0253 0 ) - ( 4.818 -0.872 -0.053 0.0138 0 ) - ( 3.789 -0.312 -0.208 0.028 0 ) - ( 4.925 -1.841 0.211 -0.0059 0 ) - ( 4.505 -1.906 0.259 -0.0105 0 ) ) ); - beta ( ( ( 5.07 -6.42 3.87 -0.767) - ( 5.52 -6.73 3.88 -0.728) - ( 5.76 -6.92 3.92 -0.715) - ( 6.02 -7.44 4.37 -0.825) - ( 7.84 -11.55 7.14 -1.399) ) - ( ( 1.405 0.053 0.022 0 ) - ( 1.091 0.317 0 0 ) - ( 1.64 -0.03 0.07 0 ) - ( 0.84 0.56 0 0 ) - ( 0.81 0.64 0 0 ) ) ); + pPoints (1e5 5e5 1e6 2e6 3e6); + EqRPoints (0.5 2 5); + alpha ((( -0.03 -2.347 9.984 -6.734 1.361) + ( 1.61 -9.708 19.026 -11.117 2.098) + ( 2.329 -12.287 21.317 -11.973 2.207) + ( 2.593 -12.813 20.815 -11.471 2.095) + ( 2.728 -13.164 20.794 -11.418 2.086)) + (( 3.558 0.162 -0.247 0.0253 0 ) + ( 4.818 -0.872 -0.053 0.0138 0 ) + ( 3.789 -0.312 -0.208 0.028 0 ) + ( 4.925 -1.841 0.211 -0.0059 0 ) + ( 4.505 -1.906 0.259 -0.0105 0 ))); + beta ((( 5.07 -6.42 3.87 -0.767) + ( 5.52 -6.73 3.88 -0.728) + ( 5.76 -6.92 3.92 -0.715) + ( 6.02 -7.44 4.37 -0.825) + ( 7.84 -11.55 7.14 -1.399)) + (( 1.405 0.053 0.022 0 ) + ( 1.091 0.317 0 0 ) + ( 1.64 -0.03 0.07 0 ) + ( 0.84 0.56 0 0 ) + ( 0.81 0.64 0 0 ))); } } diff --git a/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/combustionPropertiesInclude b/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/combustionPropertiesInclude new file mode 100644 index 0000000000..01cac5eb9c --- /dev/null +++ b/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/combustionPropertiesInclude @@ -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; + + +// ************************************************************************* // diff --git a/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/combustionPropertiesInclude.hydrogen b/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/combustionPropertiesInclude.hydrogen new file mode 100644 index 0000000000..9cd8a91ce6 --- /dev/null +++ b/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/combustionPropertiesInclude.hydrogen @@ -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; + + +// ************************************************************************* // diff --git a/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/thermophysicalProperties b/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/thermophysicalProperties index 4ecc1d0b88..7a2d12add5 100644 --- a/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/thermophysicalProperties +++ b/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/thermophysicalProperties @@ -26,8 +26,7 @@ thermoType energy absoluteEnthalpy; } -stoichiometricAirFuelMassRatio - stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 15.675; +stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 15.675; reactants { @@ -40,24 +39,13 @@ reactants Tlow 200; Thigh 6000; Tcommon 1000; - 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 - ); + 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); } transport { mu 1e-5; Pr 1; - - As 1.67212e-06; - Ts 170.672; } } @@ -72,24 +60,13 @@ products Tlow 200; Thigh 6000; Tcommon 1000; - 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 - ); + 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); } transport { mu 1e-5; Pr 1; - - As 1.67212e-06; - Ts 170.672; } } diff --git a/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/thermophysicalProperties.hydrogen b/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/thermophysicalProperties.hydrogen index ed0335aae7..646b5cb2f5 100644 --- a/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/thermophysicalProperties.hydrogen +++ b/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/constant/thermophysicalProperties.hydrogen @@ -39,8 +39,8 @@ reactants Tlow 200; Thigh 5000; Tcommon 1000; - 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 ); + 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); } transport { @@ -60,8 +60,8 @@ products Tlow 200; Thigh 5000; Tcommon 1000; - 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 ); + 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); } transport { diff --git a/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/system/controlDict b/tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/system/controlDict.orig similarity index 100% rename from tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/system/controlDict rename to tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous/system/controlDict.orig