1

Previous: Test case geometry description Up: Test case: multiRegionHeater Next: Test case: roomWithRadiator

This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.

Script Allrun

  • Let us walk through the script Allrun:
#!/bin/sh
cd ${0%/*} || exit 1    # run from this directory


# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

runApplication blockMesh
runApplication topoSet
runApplication splitMeshRegions -cellZones -overwrite

# remove fluid fields from solid regions (important for post-processing)
for i in heater leftSolid rightSolid
do
   rm -f 0*/$i/{nut,alphat,epsilon,k,U,p_rgh}
done


for i in bottomWater topAir heater leftSolid rightSolid
do
   runApplication -s $i changeDictionary -region $i
done


#-- Run on single processor
#runApplication `getApplication`

# Decompose
runApplication decomposePar -allRegions

# Run
runParallel `getApplication`

# Reconstruct
runApplication reconstructPar -allRegions


echo
echo "creating files for paraview post-processing"
echo
paraFoam -touchAll

# ----------------------------------------------------------------- end-of-file

  • Line 6 in file Allrun includes system functions from file
    $WM_PROJECT_DIR/bin/tools/RunFunctions , e.g. getApplication reads name of the solver from file controlDict
  • Line 8 in file Allrun runs application blockMesh and standard output is redirected to file log.blockMeshblockMesh creates computational mesh, regions not yet specified.
  • line 9 in file Allrun runs application topoSet, which creates cell zones. Regions are later created from cell zones. Application topoSet reads settings from file system/topoSetDict.

  • Line 10 in file Allrun divides mesh to (regions) using splitMeshRegions, where using switches -cellZones -overwrite divides to (regions) according to (cellZones) overwriting original mesh
  • Lines 12 – 16 in file Allrun delete useless files because of postprocessing
  • Lines 19 – 22 in file Allrun using utility changeDictionary sets boundary conditions. Utility changeDictionary reads from system/changeDictionaryDict
  • Line 29 in file Allrun using decomposePar decomposes computational mesh between processors reading system/decomposeParDict
  • Line 32 in file Allrun runs the test case in parallel
  • Line 35 in file Allrun using utility reconstructPar for reconstructing data from processor directories
  • Lines 38 – 41 in file Allrun using utility paraFoam with switch -touch creating files .OpenFOAM for postprocessing
  • Run the test case:

    # ./Allrun

  • 43 When finished, view results. Multi-region cases must be opened each part separately. Or using paraFoam with switch -region :

    # paraFoam -region heater

  • 44 When finished, view results. Multi-region case can be opened by loading file multiRegionHeater.foam in ParaView or by using command paraFoam.

    # paraFoam

heater3

Figure: multiRegionHeater

#./4adE.tex#