diff --git a/etc/caseDicts/annotated/foamyHexMeshDict b/etc/caseDicts/annotated/foamyHexMeshDict index 975fd099d7..64a6f989cf 100644 --- a/etc/caseDicts/annotated/foamyHexMeshDict +++ b/etc/caseDicts/annotated/foamyHexMeshDict @@ -433,8 +433,8 @@ meshQualityControls // Set to 180 to disable. maxConcave 80; - //- Minimum pyramid volume. Is absolute volume of cell pyramid. - // Set to a sensible fraction of the smallest cell volume expected. + //- Minimum cell pyramid volume relative to min bounding box length^3 + // Set to a fraction of the smallest cell volume expected. // Set to very negative number (e.g. -1e30) to disable. minVol -1e30; @@ -449,9 +449,6 @@ meshQualityControls // 1 = regular tet minTetQuality 1e-30; - //- Minimum absolute face area. Set to <0 to disable. - minArea -1; - //- Minimum face twist. Set to <-1 to disable. dot product of face normal // and face centre triangles normal minTwist 0.02; @@ -465,9 +462,6 @@ meshQualityControls //- minVolRatio (0 -> 1) minVolRatio 0.01; - - // must be >0 for Fluent compatibility - minTriangleTwist -1; } diff --git a/etc/caseDicts/mesh/generation/meshQualityDict b/etc/caseDicts/mesh/generation/meshQualityDict index 3d2b18a6e9..cfe837b340 100644 --- a/etc/caseDicts/mesh/generation/meshQualityDict +++ b/etc/caseDicts/mesh/generation/meshQualityDict @@ -25,10 +25,10 @@ maxInternalSkewness 4; // Set to 180 to disable. maxConcave 80; -//- Minimum pyramid volume. Is absolute volume of cell pyramid. -// Set to a sensible fraction of the smallest cell volume expected. +//- Minimum cell pyramid volume relative to min bounding box length^3 +// Set to a fraction of the smallest cell volume expected. // Set to very negative number (e.g. -1e30) to disable. -minVol 1e-13; +minVol 1e-10; //- Minimum quality of the tet formed by the face-centre // and variable base point minimum decomposition triangles and @@ -39,9 +39,6 @@ minVol 1e-13; // 1 = regular tet minTetQuality 1e-15; -//- Minimum face area. Set to <0 to disable. -minArea -1; - //- Minimum face twist. Set to <-1 to disable. dot product of face normal // and face centre triangles normal minTwist 0.02; @@ -61,20 +58,9 @@ minFaceWeight 0.05; //- Volume ratio of neighbouring cells (0 -> 1) minVolRatio 0.01; -//- Per triangle normal compared to average normal. Like face twist -// but now per (face-centre decomposition) triangle. Must be >0 for Fluent -// compatibility -minTriangleTwist -1; - nSmoothScale 4; errorReduction 0.75; -//- If >0 : preserve cells with all points on the surface if the -// resulting volume after snapping (by approximation) is larger than -// minVolCollapseRatio times old volume (i.e. not collapsed to flat cell). -// If <0 : delete always. -//minVolCollapseRatio 0.1; - // ************************************************************************* // diff --git a/etc/caseDicts/mesh/generation/meshQualityDict.cfg b/etc/caseDicts/mesh/generation/meshQualityDict.cfg index b8a1f8f6a7..df7b2610b5 100644 --- a/etc/caseDicts/mesh/generation/meshQualityDict.cfg +++ b/etc/caseDicts/mesh/generation/meshQualityDict.cfg @@ -14,19 +14,10 @@ maxInternalSkewness 4; maxConcave 80; -// Minimum cell pyramid volume; case dependent -minVol 1e-13; +minVol 1e-10; minTetQuality -1e30; -// if >0 : preserve single cells with all points on the surface if the -// resulting volume after snapping (by approximation) is larger than -// minVolCollapseRatio times old volume (i.e. not collapsed to flat cell). -// If <0 : delete always. -//minVolCollapseRatio 0.5; - -minArea -1; - minTwist 0.02; minDeterminant 0.001; @@ -35,8 +26,6 @@ minFaceWeight 0.05; minVolRatio 0.01; -minTriangleTwist -1; - nSmoothScale 4; errorReduction 0.75; diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C index d002c35953..b8386e5112 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,10 +76,6 @@ bool Foam::motionSmootherAlgo::checkMesh ( dict.lookup("maxConcave", true) ); - const scalar minArea - ( - dict.lookup("minArea", true) - ); const scalar maxIntSkew ( dict.lookup("maxInternalSkewness", true) @@ -100,10 +96,6 @@ bool Foam::motionSmootherAlgo::checkMesh ( dict.lookup("minTwist", true) ); - const scalar minTriangleTwist - ( - dict.lookup("minTriangleTwist", true) - ); scalar minFaceFlatness = -1.0; dict.readIfPresent("minFaceFlatness", minFaceFlatness, true); const scalar minDet @@ -141,10 +133,12 @@ bool Foam::motionSmootherAlgo::checkMesh if (minVol > -great) { + const scalar refVol = pow3(mesh.bounds().minDim()); + polyMeshCheck::checkFacePyramids ( report, - minVol, + minVol*refVol, mesh, mesh.cellCentres(), mesh.points(), @@ -209,28 +203,6 @@ bool Foam::motionSmootherAlgo::checkMesh nWrongFaces = nNewWrongFaces; } - if (minArea > -small) - { - polyMeshCheck::checkFaceArea - ( - report, - minArea, - mesh, - mesh.faceAreas(), - checkFaces, - &wrongFaces - ); - - label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp