#!/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 2>&1

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

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

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

runApplication $application
