54 lines
1.7 KiB
Bash
Executable file
54 lines
1.7 KiB
Bash
Executable file
#!/bin/bash
|
|
#
|
|
#set -x
|
|
|
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
|
|
|
# Load additional RunFunctions
|
|
. ./RunFunctionsSupplemental
|
|
|
|
export caseName=`basename $PWD`
|
|
|
|
#We stop this script when we encounter a problem
|
|
#trap "exit -1" ERR
|
|
|
|
echo "$caseName: Running blockMesh"
|
|
runApplicationAndReportOnError blockMesh
|
|
|
|
echo "$caseName: Updating the boundary file"
|
|
# 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 \
|
|
--shadowPatch mixpRightIn \
|
|
--assembly both \
|
|
--orientation dirZ_spanY \
|
|
--coordinateSystemType coordinateSystem \
|
|
--coordinateSystemOrigin "(0 0 0.005)" \
|
|
--coordinateSystemE1 "(1 0 0)" \
|
|
--coordinateSystemE3 "(0 0 1)"
|
|
|
|
pyFoamChangeMixingPlaneBoundary.py . mixpRightIn \
|
|
--shadowPatch mixpLeftOut \
|
|
--assembly both \
|
|
--orientation dirZ_spanY \
|
|
--coordinateSystemType coordinateSystem \
|
|
--coordinateSystemOrigin "(0 0 0.005)" \
|
|
--coordinateSystemE1 "(1 0 0)" \
|
|
--coordinateSystemE3 "(0 0 1)"
|
|
else
|
|
echo "pyFoamChangeMixingPlaneBoundary.py is missing. Using the file constant/polyMesh/boundary.preconfigured"
|
|
cp constant/polyMesh/boundary.preconfigured constant/polyMesh/boundary
|
|
fi
|
|
|
|
|
|
echo "$caseName: Creating the starting time directory"
|
|
cp -r 0_orig 0
|
|
|
|
echo "$caseName: Running icoFoam"
|
|
runApplicationAndReportOnError icoFoam
|
|
|
|
|
|
|