#!/bin/sh

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

application=`getApplication`

# create mesh
runApplication blockMesh

# create sets
setSet -batch system/sets.setSet >& log.setSet1

# convert sets to zones
setsToZones -noFlipMap >& log.setsToZones

# create the first cyclic - lhs of porous zone
unset FOAM_SETNAN
createBaffles cycLeft cycLeft -overwrite >& log.createBaffles1

# create the second cyclic - rhs of porous zone
createBaffles cycRight cycRight -overwrite >& log.createBaffles2

runApplication $application
