From d01adb74e30d85561a6f021e5b7162ad613e877a Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 26 Mar 2010 13:39:51 +0000 Subject: [PATCH] ENH: Added tet volume check to checkMesh and snappyHexMesh --- .../snappyHexMesh/snappyHexMeshDict | 9 +- .../manipulation/checkMesh/checkGeometry.C | 19 ++ .../meshes/primitiveMesh/primitiveMesh.H | 9 +- .../primitiveMeshCheck/primitiveMeshCheck.C | 111 ++++++++- .../motionSmoother/motionSmootherCheck.C | 54 ++++- .../polyMeshGeometry/polyMeshGeometry.C | 212 ++++++++++++++++++ .../polyMeshGeometry/polyMeshGeometry.H | 37 +++ .../iglooWithFridges/system/snappyHexMeshDict | 9 +- .../system/snappyHexMeshDict | 9 +- .../motorBike/system/snappyHexMeshDict | 9 +- .../cavitatingBullet/system/snappyHexMeshDict | 9 +- 11 files changed, 469 insertions(+), 18 deletions(-) diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index dab2d1d064..31a841b80f 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -327,14 +327,17 @@ meshQualityControls // Set to 180 to disable. maxConcave 80; - //- Minimum projected area v.s. actual area. Set to -1 to disable. - minFlatness 0.5; - //- Minimum pyramid volume. Is absolute volume of cell pyramid. // Set to a sensible fraction of the smallest cell volume expected. // Set to very negative number (e.g. -1E30) to disable. minVol 1e-13; + //- Minimum tet volume. Is absolute volume of the tet formed by the + // face-centre decomposition triangle and the cell centre. + // Set to a sensible fraction of the smallest cell volume expected. + // Set to very negative number (e.g. -1E30) to disable. + minTetVol 1e-20; + //- Minimum face area. Set to <0 to disable. minArea -1; diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index 44ad601a02..e16d90bbbd 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -159,6 +159,25 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry) } } + { + faceSet faces(mesh, "wrongOrientedTriangleFaces", mesh.nFaces()/100 + 1); + if (mesh.checkFaceTets(true, 0, &faces)) + { + noFailedChecks++; + + label nFaces = returnReduce(faces.size(), sumOp