This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/tutorials/engineFoam/kivaTest/Allrun

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 .