#!/bin/bash

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

# Source run functions
. "$WM_PROJECT_SITE/$WM_PROJECT_VERSION/bin/tools/RunFunctions"

runApplication blockMesh
runApplication foamRun

# Create plot
( cd validation && ./createGraphs )

# Compare to reference solution
case=$(basename "$PWD")
runCommand --suffix "${case}.particleVolumeFraction" -- diff -bs \
    postProcessing/probes/0/particleVolumeFraction.gas \
    validation/probes/0/particleVolumeFraction.gas

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