This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/tutorials/incompressible/simpleFoam/mixingPlaneAxial/Allrun

82 lines
3.3 KiB
Text
Raw Normal View History

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"
# 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 \
--shadowPatch downstreamMixingPlanePatch \
--zone upstreamMixingPlaneZone \
--ribbonPatchDiscretisation bothPatches \
--ribbonPatchStackAxis Z \
--ribbonPatchSweepAxis Theta \
--coordinateSystemType cylindrical \
--coordinateSystemOrigin "(0 0 0)" \
--coordinateSystemE1 "(1 0 0)" \
--coordinateSystemE3 "(0 0 1)"
pyFoamChangeMixingPlaneBoundary.py . downstreamMixingPlanePatch \
--shadowPatch upstreamMixingPlanePatch \
--zone downstreamMixingPlaneZone \
--ribbonPatchDiscretisation bothPatches \
--ribbonPatchStackAxis Z \
--ribbonPatchSweepAxis Theta \
--coordinateSystemType cylindrical \
--coordinateSystemOrigin "(0 0 0)" \
--coordinateSystemE1 "(1 0 0)" \
--coordinateSystemE3 "(0 0 1)"
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
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