ENH: snappyHexMesh: early exit of leak detection. See #2403

Changed behaviour to make it the default
This commit is contained in:
mattijs
2022-06-09 11:16:10 +01:00
parent 4f0166397e
commit c5cede38aa
6 changed files with 22 additions and 20 deletions

View File

@ -1,6 +1,7 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
mkdir -p constant
@ -9,26 +10,23 @@ cp -rf \
"$FOAM_TUTORIALS"/resources/geometry/motorBike_leakDetection \
constant/triSurface
# Alternative decomposeParDict name:
decompDict="-decomposeParDict system/decomposeParDict.6"
## Standard decomposeParDict name:
# unset decompDict
runApplication surfaceFeatureExtract
runApplication blockMesh
runApplication $decompDict decomposePar
runApplication decomposePar
# Using distributedTriSurfaceMesh?
if foamDictionary -entry geometry -value system/snappyHexMeshDict | \
grep -q distributedTriSurfaceMesh
then
runParallel $decompDict surfaceRedistributePar motorBike.obj independent
fi
#- Run with leak-detection (writes postProcessing/leakPath) but no closure
foamDictionary system/snappyHexMeshDict \
-entry castellatedMeshControls.useLeakClosure -set false
runParallel -s leak snappyHexMesh
runParallel -s leak checkMesh
cleanTimeDirectories
runParallel $decompDict snappyHexMesh -overwrite
runParallel $decompDict checkMesh -writeFields '(nonOrthoAngle)' -constant
#- Run with leak-detection (writes postProcessing/leakPath) and closure
foamDictionary system/snappyHexMeshDict \
-entry castellatedMeshControls.useLeakClosure -set true
runParallel -s leak_and_closure snappyHexMesh
runParallel -s leak_and_closure checkMesh
#------------------------------------------------------------------------------

View File

@ -175,6 +175,10 @@ castellatedMeshControls
// are only on the boundary of corresponding cellZones or also allow
// free-standing zone faces. Not used if there are no faceZones.
allowFreeStandingZoneFaces true;
// Enable automatic leak closure (default is exit immediately)
useLeakClosure true;
}