openfoam/tutorials/sonicTurbFoam/Allrun
2008-06-12 19:32:10 +01:00

39 lines
817 B
Bash
Executable File

#!/bin/sh
# Get application name from directory
application=`basename $PWD`
# Find and source additional functions
tutorialPath=$PWD
while [ ! -f $tutorialPath/RunFunctions ]
do
tutorialPath="$tutorialPath/.."
done
. $tutorialPath/RunFunctions
runStarToFoam ()
{
if [ -f log.starToFoam ] ; then
echo "starToFoam already run on $PWD: remove log file to run"
else
echo "starToFoam: converting mesh $1"
starToFoam $1 > log.starToFoam 2>&1
fi
}
# Do prism
(cd prism && $tutorialPath/runAll)
# Special handling for nacaAirFoil
cd nacaAirFoil
runStarToFoam prostar/nacaAirFoil
mv constant/polyMesh/boundary temp
sed -e s/"\([\t ]*type[\t ]*\)symmetryPlane"/"\1empty"/g \
temp > constant/polyMesh/boundary
rm temp
runApplication $application
cd ..