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
2013-10-09 11:00:52 +01:00

81 lines
3.3 KiB
Bash
Executable file

#!/bin/bash
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
echo "$caseName: Creating the file blockMeshDict using m4"
(cd constant/polyMesh; m4 -P blockMeshDict.m4 > blockMeshDict)
runApplication 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 . 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
echo "$caseName: Creating the starting time directory"
cp -r save 0
echo "$caseName: Creating zones for the mixingPlane"
runApplication setSet -batch setBatch.batch
runApplication setsToZones -noFlipMap
echo "$caseName: Running potentialFoam"
runApplication potentialFoam
echo "$caseName: Running simpleFoam"
runApplication simpleFoam