#!/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

# Agglomerate patch faces and generate view factors
for i in bottomAir topAir
do
    runApplication -s $i faceAgglomerate -region $i -dict \
        constant/viewFactorsDict
    runApplication -s $i viewFactorsGen -region $i
done

runApplication $(getApplication)

paraFoam -touchAll

#------------------------------------------------------------------------------
