#!/bin/sh
cd ${0%/*} || exit 1    # Run from this directory

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

# Create the underlying block mesh
runApplication blockMesh

# Create the set for the obstacles
runApplication topoSet

# Create the obstacles - add obstacle patches to wallFilm patch
runApplication subsetMesh c0 -patch wallFilm -overwrite -noFields

# Split the obstacle patches into cube[1-6]_patch[1-6]
runApplication ./patchifyObstacles

# Create the wall film region via extrusion
runApplication extrudeToRegionMesh -overwrite

paraFoam -touch
paraFoam -touch -region wallFilmRegion

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