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

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

# Mesh
runApplication blockMesh -dict $FOAM_TUTORIALS/resources/blockMesh/ballValve
runApplication createZones
runApplication transformPoints -pointZone ball "Rz=-45"

# Create couples
runApplication createNonConformalCouples pipeNonCouple ballNonCouple

# Decompose
runApplication decomposePar -cellProc

# Run
runParallel foamRun

# Reconstruct
runApplication reconstructPar -newTimes

# Plot the flow rates
./createGraphs

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