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/validationAndVerificationSuite/validation/overset/NACA4412-airfoil/implicitConservativeOverset/Allrun
2018-02-28 13:37:33 +01:00

49 lines
1.9 KiB
Bash
Executable file

#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application1="potentialOversetFoam"
application2="simpleOversetFoam"
# Copy background grid
\cp -r ../oversetMeshes/backgroundMesh/constant/polyMesh constant/.
# Merge meshes and clean up
runApplication mergeMeshes .. explicitOverset . ../oversetMeshes/middleMesh
\rm -rf constant/polyMesh
\mv 1/polyMesh constant
rm -rf 1
\rm -f constant/polyMesh/pointZones constant/polyMesh/pointZones.gz constant/polyMesh/faceZones constant/polyMesh/faceZones.gz constant/polyMesh/cellZones constant/polyMesh/cellZones.gz
\mv log.mergeMeshes log.mergeMeshes-backgroundMiddle
runApplication mergeMeshes .. explicitOverset . ../oversetMeshes/frontMesh
\rm -rf constant/polyMesh
\mv 1/polyMesh constant
rm -rf 1
\rm -f constant/polyMesh/pointZones constant/polyMesh/pointZones.gz constant/polyMesh/faceZones constant/polyMesh/faceZones.gz constant/polyMesh/cellZones constant/polyMesh/cellZones.gz
\mv log.mergeMeshes log.mergeMeshes-backgroundMiddleFront
# Make cell zones for all regions and clean up
runApplication regionCellSets
runApplication setSet -batch setBatch.batch
\rm -f log.setSet
\rm -f constant/polyMesh/sets/*_old constant/polyMesh/sets/*_old.gz
\rm -f constant/polyMesh/sets/cellRegion0 constant/polyMesh/sets/cellRegion0.gz constant/polyMesh/sets/cellRegion1 constant/polyMesh/sets/cellRegion1.gz
runApplication setsToZones
# Scale x and y directions to have the same setup as the case from
# foam-extend-4.0 validationSuite
transformPoints -scale "(0.901 1 0.905512)" > log.transformPoints
# Set up boundary patches
\cp -f boundary constant/polyMesh/boundary
# Run serial
runApplication $application1
runApplication $application2
# Perform sampling
runApplication sample -latestTime
timeStep=$(grep "^endTime" system/controlDict | awk '{ print $2 }' | sed 's/;//g')
cp -v surfaces/$timeStep/p_solidWall.raw .