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

43 lines
831 B
Bash
Executable File

#!/bin/sh
# Get application name from directory
parentDir=`dirname $PWD`
application=`basename $parentDir`
# Find and source additional functions
tutorialPath=$PWD
while [ ! -f $tutorialPath/RunFunctions ]
do
tutorialPath="$tutorialPath/.."
done
. $tutorialPath/RunFunctions
runRefineMesh ()
{
echo "Running refineMesh on $PWD"
refineMesh -dict > log.refineMesh 2>&1
}
runApplication blockMesh
i=1
if [ -f log.cellSet ] ; then
i=3
fi
while [ "$i" -lt 3 ] ; do
if [ -f log.cellSet ] ; then
mv log.cellSet log.cellSet.1
fi
cp system/cellSetDict.${i} system/cellSetDict
runApplication cellSet
runRefineMesh
cp -r 1e-08/polyMesh/* constant/polyMesh
rm -rf 1e-08
i=`expr $i + 1`
done
cp constant/polyMesh/boundary.org constant/polyMesh/boundary
runApplication $application