Merge branch 'master' of ssh://opencfd@repo.or.cz/srv/git/OpenFOAM-1.5.x
[OpenFOAM-1.5.x.git] / tutorials / interFoam / Allrun
blob3e7961c94b8266035c8420985ef5b7e3ddabd4f8
1 #!/bin/sh
2 # Source tutorial run functions
3 . $WM_PROJECT_DIR/bin/tools/RunFunctions
5 # Get application name from directory
6 application=`basename $PWD`
8 setDamBreakFine ()
10 blockMeshDict="constant/polyMesh/blockMeshDict"
11 controlDict="system/controlDict"
12 sed \
13 -e s/"23 8"/"46 10"/g \
14 -e s/"19 8"/"40 10"/g \
15 -e s/"23 42\(.*\) 1 1)"/"46 76\1 2 1)"/g \
16 -e s/"4 42\(.*\) 1 1)"/"4 76\1 2 1)"/g \
17 -e s/"19 42\(.*\) 1 1)"/"40 76\1 2 1)"/g \
18 $blockMeshDict > temp.$$
19 mv temp.$$ $blockMeshDict
20 sed \
21 -e s/"\(deltaT[ \t]*\) 0.001;"/"\1 5e-04;"/g \
22 -e s/"\(endTime[ \t]*\) 1;"/"\1 0.4;"/g \
23 $controlDict > temp.$$
24 mv temp.$$ $controlDict
27 # Do damBreak
28 cd damBreak
29 runApplication blockMesh
30 runApplication setFields
31 runApplication $application
32 cd ..
34 # Clone case
35 cloneCase damBreak damBreakFine
37 cd damBreakFine
38 # Modify case
39 setDamBreakFine
40 cp ../damBreak/0/gamma.org 0/gamma
41 # And execute
42 runApplication blockMesh
43 runApplication setFields
44 runApplication decomposePar
45 hostname > system/machines
46 runParallel $application 4 system/machines
47 runApplication reconstructPar
48 cd ..