modifications for non-gui mode operation
[OpenFOAM-1.5.x.git] / tutorials / rhoCentralFoam / Allrun
blobe41004597b2e32473c15083e72c0624df6c613bc
1 #!/bin/sh
3 # Source tutorial run functions
4 . $WM_PROJECT_DIR/bin/tools/RunFunctions
6 # Get application name from directory
7 application=`basename $PWD`
9 cases=" \
10 shockTube \
11 wedge15Ma5 \
12 obliqueShock \
13 forwardStep \
14 LadenburgJet60psi \
15 biconic25-55Run35 \
18 moveTimeMeshToConstant () {
19 DT=`foamInfoExec -times | tail -1`
20 if [ $DT != 0 ] ; then
21 mv ${DT}/polyMesh/* constant/polyMesh
22 rm -rf ${DT}
26 for case in $cases
28 (cd $case && runApplication blockMesh)
30 if [ "$case" = "shockTube" ] ; then
31 (cd $case && runApplication setFields)
34 if [ "$case" = "biconic25-55Run35" ] ; then
35 cd $case
37 wmake datToFoam
38 runApplication datToFoam grid256.dat
40 CONST="constant"
41 cat $CONST/pointsHeader $CONST/points.tmp > $CONST/polyMesh/points
42 runApplication collapseEdges "2e-07" 5
43 moveTimeMeshToConstant
45 echo "Changing patch type to wedge type in boundary file"
46 mv $CONST/polyMesh/boundary $CONST/polyMesh/boundary.bak
47 sed -f $CONST/wedgeScr $CONST/polyMesh/boundary.bak > $CONST/polyMesh/boundary
48 rm $CONST/polyMesh/boundary.bak
50 cd ..
53 (cd $case && runApplication $application)
54 done