2012-04-15 17:43:52 +00:00
|
|
|
#!/bin/bash
|
2013-10-09 10:00:52 +00:00
|
|
|
# Source tutorial run functions
|
2012-04-15 17:43:52 +00:00
|
|
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
|
|
|
|
|
|
|
echo "$caseName: Creating the file blockMeshDict using m4"
|
|
|
|
(cd constant/polyMesh; m4 -P blockMeshDict.m4 > blockMeshDict)
|
|
|
|
|
2013-10-09 10:00:52 +00:00
|
|
|
runApplication blockMesh
|
2012-04-15 17:43:52 +00:00
|
|
|
|
|
|
|
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 . upstreamMixingPlanePatch \
|
2013-07-18 01:43:15 +00:00
|
|
|
--shadowPatch downstreamMixingPlanePatch \
|
2013-08-19 21:17:41 +00:00
|
|
|
--zone upstreamMixingPlaneZone \
|
|
|
|
--ribbonPatchDiscretisation bothPatches \
|
|
|
|
--ribbonPatchStackAxis Z \
|
|
|
|
--ribbonPatchSweepAxis Theta \
|
2013-07-18 01:43:15 +00:00
|
|
|
--coordinateSystemType cylindrical \
|
|
|
|
--coordinateSystemOrigin "(0 0 0)" \
|
|
|
|
--coordinateSystemE1 "(1 0 0)" \
|
|
|
|
--coordinateSystemE3 "(0 0 1)"
|
2012-04-23 15:18:22 +00:00
|
|
|
|
|
|
|
pyFoamChangeMixingPlaneBoundary.py . downstreamMixingPlanePatch \
|
2013-07-18 01:43:15 +00:00
|
|
|
--shadowPatch upstreamMixingPlanePatch \
|
2013-08-19 21:17:41 +00:00
|
|
|
--zone downstreamMixingPlaneZone \
|
|
|
|
--ribbonPatchDiscretisation bothPatches \
|
|
|
|
--ribbonPatchStackAxis Z \
|
|
|
|
--ribbonPatchSweepAxis Theta \
|
2013-07-18 01:43:15 +00:00
|
|
|
--coordinateSystemType cylindrical \
|
|
|
|
--coordinateSystemOrigin "(0 0 0)" \
|
|
|
|
--coordinateSystemE1 "(1 0 0)" \
|
|
|
|
--coordinateSystemE3 "(0 0 1)"
|
2012-04-23 15:18:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
echo "Using pyFoamChangeGGIBoundary.py"
|
|
|
|
pyFoamChangeGGIBoundary.py . upstreamPerio1 \
|
|
|
|
--shadowPatch upstreamPerio2 \
|
|
|
|
--rotationAxis "(0 0 1)" \
|
|
|
|
--rotationAngle 36 \
|
|
|
|
--zone upstreamPerio1Zone
|
|
|
|
|
|
|
|
pyFoamChangeGGIBoundary.py . upstreamPerio2 \
|
|
|
|
--shadowPatch upstreamPerio1 \
|
|
|
|
--rotationAxis "(0 0 1)" \
|
|
|
|
--rotationAngle -36 \
|
|
|
|
--zone upstreamPerio2Zone
|
|
|
|
|
|
|
|
pyFoamChangeGGIBoundary.py . downstreamPerio1 \
|
|
|
|
--shadowPatch downstreamPerio2 \
|
|
|
|
--rotationAxis "(0 0 1)" \
|
|
|
|
--rotationAngle 90 \
|
|
|
|
--zone downstreamPerio1Zone
|
|
|
|
|
|
|
|
pyFoamChangeGGIBoundary.py . downstreamPerio2 \
|
|
|
|
--shadowPatch downstreamPerio1 \
|
|
|
|
--rotationAxis "(0 0 1)" \
|
|
|
|
--rotationAngle -90 \
|
|
|
|
--zone downstreamPerio2Zone
|
|
|
|
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"
|
2013-10-09 10:00:52 +00:00
|
|
|
cp -r save 0
|
2013-08-19 21:17:41 +00:00
|
|
|
echo "$caseName: Creating zones for the mixingPlane"
|
2013-10-09 10:00:52 +00:00
|
|
|
runApplication setSet -batch setBatch.batch
|
|
|
|
runApplication setsToZones -noFlipMap
|
2012-04-15 17:43:52 +00:00
|
|
|
|
|
|
|
echo "$caseName: Running potentialFoam"
|
2013-10-09 10:00:52 +00:00
|
|
|
runApplication potentialFoam
|
2012-04-15 17:43:52 +00:00
|
|
|
|
|
|
|
echo "$caseName: Running simpleFoam"
|
2013-10-09 10:00:52 +00:00
|
|
|
runApplication simpleFoam
|
2012-04-15 17:43:52 +00:00
|
|
|
|
|
|
|
|