db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
32 lines
786 B
Bash
Executable file
32 lines
786 B
Bash
Executable file
#!/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 .
|