Merge branch 'upstream/OpenFOAM' into master
[freefoam.git] / tutorials / heatTransfer / chtMultiRegionFoam / multiRegionHeater / Allrun.in
blob161e211e6be986e712bf123e086fd32ab5ac4760
1 #!/bin/sh
2 # Source tutorial run functions
3 . @FF_DATA_DIR@/shellFunctions/RunFunctions
5 # Alltest changes this to yes...
6 export FREEFOAM_TEST_MODE=no
7 if [ "$FREEFOAM_TEST_MODE" == "yes" ]; then
8 # Alltest changes this to the top test directory...
9 export FREEFOAM_CONFIG_DIR='${TEST_CONFIG_DIR}'
12 rm -rf constant/polyMesh/sets
13 runApplication blockMesh
14 runApplication setSet -batch makeCellSets.setSet
15 rm -f constant/polyMesh/sets/*_old
16 runApplication setsToZones -noFlipMap
17 runApplication splitMeshRegions -cellZones
19 for i in bottomAir topAir heater leftSolid rightSolid
21 runApplication -l log.changeDictionary.$i changeDictionary -region $i
22 done
24 # remove fluid fields from solid regions (important for post-processing)
25 for i in heater leftSolid rightSolid
27 rm -f 0*/$i/{mut,alphat,epsilon,k,p,p,U}
28 done
30 # remove solid fields from fluid regions (important for post-processing)
31 for i in bottomAir topAir
33 rm -f 0*/$i/{cp,K}
34 done
37 #-- Run on single processor
38 #runApplication chtMultiRegionFoam
40 # Decompose
41 for i in bottomAir topAir heater leftSolid rightSolid
43 runApplication -l log.decomposePar.$i decomposePar -region $i
44 done
46 # Run
47 runParallel chtMultiRegionFoam 4
49 # Reconstruct
50 for i in bottomAir topAir heater leftSolid rightSolid
52 runApplication -l log.reconstructPar.$i reconstructPar -region $i
53 done
56 echo
57 echo "creating files for paraview post-processing"
58 echo
59 for i in bottomAir topAir heater leftSolid rightSolid
61 touch "multiRegionHeater{$i}.OpenFOAM"
62 echo "created multiRegionHeater{$i}.OpenFOAM" > log.paraFoam.$i
63 done
65 # -----------------------------------------------------------------------------