Newer
Older
Chris Greenshields
committed
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
Chris Greenshields
committed
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cases=" \
shockTube \
wedge15Ma5 \
obliqueShock \
forwardStep \
LadenburgJet60psi \
biconic25-55Run35 \
"
moveTimeMeshToConstant()
{
DT=`foamInfoExec -times | tail -1`
if [ "$DT" != 0 ]
then
mv ${DT}/polyMesh/* constant/polyMesh
rm -rf ${DT}
fi
Chris Greenshields
committed
}
for caseName in $cases
Chris Greenshields
committed
do
(
cd $caseName || exit
runApplication blockMesh
Chris Greenshields
committed
case "$caseName" in
shockTube)
runApplication setFields
;;
biconic25-55Run35)
Chris Greenshields
committed
wmake datToFoam
runApplication datToFoam grid256.dat
CONST="constant"
cat $CONST/pointsHeader $CONST/points.tmp > $CONST/polyMesh/points
runApplication collapseEdges "2e-07" 5
moveTimeMeshToConstant
echo "Changing patch type to wedge type in boundary file"
mv $CONST/polyMesh/boundary $CONST/polyMesh/boundary.bak
sed -f $CONST/wedgeScr $CONST/polyMesh/boundary.bak > $CONST/polyMesh/boundary
rm $CONST/polyMesh/boundary.bak
;;
esac
Chris Greenshields
committed
runApplication `getApplication`
# ----------------------------------------------------------------- end-of-file