60 lines
1.7 KiB
Bash
Executable File
60 lines
1.7 KiB
Bash
Executable File
#!/bin/sh
|
|
cd ${0%/*} || exit 1 # Run from this directory
|
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
|
|
|
setControlDict()
|
|
{
|
|
foamDictionary -entry "deltaT" -set "1e-05" system/controlDict
|
|
foamDictionary -entry "endTime" -set "0.015" system/controlDict
|
|
foamDictionary -entry "writeInterval" -set "50" system/controlDict
|
|
}
|
|
|
|
setCombustionProperties()
|
|
{
|
|
foamDictionary -entry "laminarFlameSpeedCorrelation" \
|
|
-set "RaviPetersen" constant/combustionProperties
|
|
foamDictionary -entry "fuel" \
|
|
-set "HydrogenInAir" constant/combustionProperties
|
|
}
|
|
|
|
# Do moriyoshiHomogeneous
|
|
( cd moriyoshiHomogeneous && foamRunTutorials )
|
|
|
|
if ! isTest $@
|
|
then
|
|
# 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
|
|
|
|
# Modify and execute
|
|
(
|
|
cd moriyoshiHomogeneousHydrogen || exit
|
|
|
|
setCombustionProperties
|
|
mv constant/thermophysicalProperties \
|
|
constant/thermophysicalProperties.propane
|
|
mv constant/thermophysicalProperties.hydrogen \
|
|
constant/thermophysicalProperties
|
|
runApplication $(getApplication)
|
|
)
|
|
fi
|
|
|
|
#------------------------------------------------------------------------------
|