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/sonicTurbFoam/Allrun

29 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 ..