#!/bin/sh

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

#------------------------------------------------------------------------------
echo "\n"
./Allclean
cp -r 0.orig/ 0/
# Create mesh:
echo "Creating well mesh"
runApplication wellMeshing
runApplication checkMesh
runApplication topoSet
runApplication setFields
runApplication subsetMesh -overwrite c0_set -patch outlet_region0
runApplication $(getApplication)
sed -i '21s/.*/    fields          ( p_rghc pc thermo:rho.oil thermo:mu.oil U.oil );/' system/dpRegion0_0
sed -i '21s/.*/    fields          ( p_rghc pc thermo:rho.oil thermo:mu.oil U.oil );/' system/dpRegion0_1
runApplication postProcess -funcs '(dpRegion0_0 dpRegion0_1)'
#------------------------------------------------------------------------------
