ENH: snappyHexMesh: early exit of leak detection. See #2403
Changed behaviour to make it the default
This commit is contained in:
parent
4f0166397e
commit
c5cede38aa
@ -487,8 +487,8 @@ castellatedMeshControls
|
||||
// Optional: same but in absolute number of cells. Default is 0.
|
||||
//nMinCells 100;
|
||||
|
||||
// Optional: disable of automatic leak closure and exit immediately
|
||||
//useLeakClosure false;
|
||||
// Optional: enable automatic leak closure (default is exit immediately)
|
||||
//useLeakClosure true;
|
||||
}
|
||||
|
||||
// Settings for the snapping.
|
||||
|
@ -74,7 +74,7 @@ Foam::refinementParameters::refinementParameters
|
||||
pointField(0)
|
||||
)
|
||||
),
|
||||
useLeakClosure_(dict.getOrDefault<bool>("useLeakClosure", true)),
|
||||
useLeakClosure_(dict.getOrDefault<bool>("useLeakClosure", false)),
|
||||
faceZoneControls_(dict.subOrEmptyDict("faceZoneControls")),
|
||||
allowFreeStandingZoneFaces_
|
||||
(
|
||||
|
@ -199,8 +199,8 @@ public:
|
||||
}
|
||||
|
||||
//- Whether to attempt to close any 'leak' between
|
||||
// locationsInsideMesh and locationsOutsideMesh or exit with
|
||||
// error. Default is true.
|
||||
// locationsInsideMesh and locationsOutsideMesh. Default is
|
||||
// false (dump path and exit with error)
|
||||
// (see also refinementSurfaces::leakLevel to force surfaces to
|
||||
// be checked for leaks early-on in the refinement)
|
||||
bool useLeakClosure() const
|
||||
|
@ -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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user