#!/bin/sh
cd "${0%/*}" || exit                                # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions        # Tutorial run functions
#------------------------------------------------------------------------------

# create the underlying block mesh
m4 system/pachuka.m4 > system/blockMeshDict
runApplication blockMesh

\cp 0/alpha.water.orig 0/alpha.water

# create faceSet for burner inlet and faceZone for coupled wall
runApplication topoSet

# create burner inlet
runApplication createPatch -overwrite

# Set alpha.water
runApplication setFields

# Decompose mesh
decomposePar > log.decomposePar 2>&1

# Run
runParallel $(getApplication)

# Reconstruct case
runApplication reconstructPar

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