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

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

runApplication blockMesh
runApplication setFields
runApplication foamRun
runApplication foamPostProcess  -time 0: -func "
    graphCell
    (
        name=graph-blending,
        start=( 0.075 -0.01 0.05),
        end=  ( 0.075  0.51 0.05),
        axis=y,
        fields=
        (
            dragModel.K:f1D2.airD_water
            dragModel.K:f1D2.airD_oil
            dragModel.K:fG.oil_water
        ),
        setFormat=csv,
        separator=\" \"
    )"

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

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