openfoam/tutorials/sonicTurbFoam/Allrun

30 lines
710 B
Bash
Executable File

#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name from directory
application=`basename $PWD`
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 && foamRunTutorials)
# 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 ..