#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctionssetControlDict()
{
sed \r
-e “s/(deltaT[ ]*) 5e-06;/1 1e-05;/g” \r
-e “s/(endTime[ ]*) 0.005;/1 0.015;/g” \r
-e “s/(writeInterval[ ]*) 10;/1 50;/g” \r
-i system/controlDict
}setCombustionProperties()
{
sed \r
-e “s/(laminarFlameSpeedCorrelation[ ]*) Gulders;/1 RaviPetersen;/g” \r
-e “s/(fuel[ ]*) Propane;/1 HydrogenInAir;/g” \r
-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# Modify and execute
(
cd moriyoshiHomogeneousHydrogen || exitsetCombustionProperties
mv constant/thermophysicalProperties \r
constant/thermophysicalProperties.propane
mv constant/thermophysicalProperties.hydrogen \r
constant/thermophysicalProperties
runApplication $(getApplication)
)#——————————————————————————
実行年月:05/01/2017