2012-04-15 17:43:52 +00:00
|
|
|
#!/bin/bash
|
2013-07-18 01:02:34 +00:00
|
|
|
#
|
2012-04-15 17:43:52 +00:00
|
|
|
#set -x
|
|
|
|
|
|
|
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
|
|
|
|
2013-07-18 01:02:34 +00:00
|
|
|
# Load additional RunFunctions
|
2012-04-15 17:43:52 +00:00
|
|
|
. ./RunFunctionsSupplemental
|
|
|
|
|
|
|
|
export caseName=`basename $PWD`
|
|
|
|
|
|
|
|
#We stop this script when we encounter a problem
|
2012-04-23 15:18:22 +00:00
|
|
|
#trap "exit -1" ERR
|
2012-04-15 17:43:52 +00:00
|
|
|
|
|
|
|
echo "$caseName: Running blockMesh"
|
|
|
|
runApplicationAndReportOnError blockMesh
|
|
|
|
|
|
|
|
echo "$caseName: Updating the boundary file"
|
2012-04-23 15:18:22 +00:00
|
|
|
# Let's see if pyFoamChangeMixingPlaneBoundary.py is available
|
|
|
|
command -v pyFoamChangeMixingPlaneBoundary.py >/dev/null
|
|
|
|
if [ $? -eq 0 ];
|
|
|
|
then
|
|
|
|
echo "Using pyFoamChangeMixingPlaneBoundary.py"
|
|
|
|
pyFoamChangeMixingPlaneBoundary.py . mixpLeftOut \
|
2013-07-18 01:43:15 +00:00
|
|
|
--shadowPatch mixpRightIn \
|
|
|
|
--assembly both \
|
|
|
|
--orientation dirY_spanZ \
|
|
|
|
--coordinateSystemType coordinateSystem \
|
|
|
|
--coordinateSystemOrigin "(0 0 0.005)" \
|
|
|
|
--coordinateSystemE1 "(1 0 0)" \
|
|
|
|
--coordinateSystemE3 "(0 0 1)"
|
2012-04-23 15:18:22 +00:00
|
|
|
|
|
|
|
pyFoamChangeMixingPlaneBoundary.py . mixpRightIn \
|
2013-07-18 01:43:15 +00:00
|
|
|
--shadowPatch mixpLeftOut \
|
|
|
|
--assembly both \
|
|
|
|
--orientation dirY_spanZ \
|
|
|
|
--coordinateSystemType coordinateSystem \
|
|
|
|
--coordinateSystemOrigin "(0 0 0.005)" \
|
|
|
|
--coordinateSystemE1 "(1 0 0)" \
|
|
|
|
--coordinateSystemE3 "(0 0 1)"
|
2012-04-23 15:18:22 +00:00
|
|
|
else
|
|
|
|
echo "pyFoamChangeMixingPlaneBoundary.py is missing. Using the file constant/polyMesh/boundary.preconfigured"
|
|
|
|
cp constant/polyMesh/boundary.preconfigured constant/polyMesh/boundary
|
|
|
|
fi
|
|
|
|
|
2012-04-15 17:43:52 +00:00
|
|
|
|
|
|
|
echo "$caseName: Creating the starting time directory"
|
|
|
|
cp -r 0_orig 0
|
|
|
|
|
|
|
|
echo "$caseName: Running icoFoam"
|
|
|
|
runApplicationAndReportOnError icoFoam
|
|
|
|
|
|
|
|
|
|
|
|
|