33 lines
786 B
Text
33 lines
786 B
Text
|
#!/bin/sh
|
||
|
# Source tutorial run functions
|
||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||
|
|
||
|
# Get application name from directory
|
||
|
application="engineFoam"
|
||
|
|
||
|
runKivaToFoam ()
|
||
|
{
|
||
|
if [ -f $1/log.kivaToFoam ] ; then
|
||
|
echo "kivaToFoam already run on $1: remove log file to run"
|
||
|
else
|
||
|
echo "kivaToFoam: converting kiva file"
|
||
|
kivaToFoam -case $1 -file $2 > $1/log.kivaToFoam 2>&1
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
restartApplication ()
|
||
|
{
|
||
|
if [ -f $2/log-2.$1 ] ; then
|
||
|
echo "$1 already run on $2: remove log file to run"
|
||
|
else
|
||
|
echo "Running $1 on $2"
|
||
|
$1 -case $2 > $2/log-2.$1 2>&1
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
runKivaToFoam . otape17
|
||
|
cp system/controlDict.1st system/controlDict
|
||
|
runApplication $application
|
||
|
cp system/controlDict.2nd system/controlDict
|
||
|
restartApplication $application .
|