Newer
Older
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
setControlDict()
{
local dict=system/controlDict
foamDictionary $dict -entry deltaT -set 1e-05
foamDictionary $dict -entry endTime -set 0.015
foamDictionary $dict -entry writeInterval -set 50
setCombustionProperties()
{
local dict=constant/combustionProperties
foamDictionary $dict -entry laminarFlameSpeedCorrelation -set RaviPetersen
foamDictionary $dict -entry fuel -set HydrogenInAir
( cd moriyoshiHomogeneous && foamRunTutorials )
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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
#------------------------------------------------------------------------------