CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] snappyHexMesh does not detect highly skewed faces?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By Ship Designer

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 31, 2021, 12:16
Default snappyHexMesh does not detect highly skewed faces?
  #1
New Member
 
Pedro Pacheco
Join Date: Dec 2019
Location: Portugal
Posts: 10
Rep Power: 6
ptpacheco is on a distinguished road
Hello all,

I'm doing LES of a gas-solid cyclone, and have been meshing with snappyHexMesh for some time now. I can usually wrestle it into behaving properly. This time, however, I was generating the second mesh for a grid convergence study and am having some issues.

As you can see in the snappyHexMesh output below (truncated due to character limit), the mesh generation is completed with apparently good mesh quality statistics:

Code:
Moving mesh ...

Iteration 0
Moving mesh using displacement scaling : min:1  max:1
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 7
    faces with face-decomposition tet quality < 1e-15      : 104
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 4
    faces on cells with determinant < 0.001                : 0

Iteration 1
Moving mesh using displacement scaling : min:0.75  max:1
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 1
    faces with face-decomposition tet quality < 1e-15      : 80
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 6
    faces on cells with determinant < 0.001                : 0

Iteration 2
Moving mesh using displacement scaling : min:0.5625  max:1
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 71
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 8
    faces on cells with determinant < 0.001                : 0

Iteration 3
Moving mesh using displacement scaling : min:0.421875  max:1
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 63
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 8
    faces on cells with determinant < 0.001                : 0

Iteration 4
Moving mesh using displacement scaling : min:0.3164062  max:1
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 52
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 9
    faces on cells with determinant < 0.001                : 0

Iteration 5
Moving mesh using displacement scaling : min:0.2373047  max:1
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 50
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 5
    faces on cells with determinant < 0.001                : 0

Iteration 6
Moving mesh using displacement scaling : min:0.1779785  max:1
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 42
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 5
    faces on cells with determinant < 0.001                : 0

Iteration 7
Moving mesh using displacement scaling : min:0.1334839  max:1
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 34
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 3
    faces on cells with determinant < 0.001                : 0

Iteration 8
Moving mesh using displacement scaling : min:0.1001129  max:1
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 31
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 2
    faces on cells with determinant < 0.001                : 0

Iteration 9
Moving mesh using displacement scaling : min:0.07508469  max:1
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 26
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 1
    faces on cells with determinant < 0.001                : 0

Iteration 10
Displacement scaling for error reduction set to 0.
Moving mesh using displacement scaling : min:0.05631351  max:1
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 21
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 2
    faces on cells with determinant < 0.001                : 0

Iteration 11
Moving mesh using displacement scaling : min:0  max:1
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 0
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces on cells with determinant < 0.001                : 0
Successfully moved mesh
Moved mesh in = 1.85 s


Repatching faces according to nearest surface ...
Repatched 44 faces in = 0.12 s


Edge intersection testing:
    Number of edges             : 8061436
    Number of edges to retest   : 1315605
    Number of intersected edges : 245918
Merging 68024 sets of faces.

Edge intersection testing:
    Number of edges             : 7987025
    Number of edges to retest   : 273906
    Number of intersected edges : 171508

Undo iteration 0
----------------
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 0
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces on cells with determinant < 0.001                : 0

Merging all points on surface that
- are used by only two boundary faces and
- make an angle with a cosine of more than 0.8660254.

Removing 62645 straight edge points ...

Edge intersection testing:
    Number of edges             : 7987025
    Number of edges to retest   : 268859
    Number of intersected edges : 171507

Undo iteration 0
----------------
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 1
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces on cells with determinant < 0.001                : 0
Detected 0 error faces on boundaries that have been merged. These will be restored to their original faces.

Detected 1 error faces in mesh. Restoring neighbours of faces in error.

Edge intersection testing:
    Number of edges             : 7987025
    Number of edges to retest   : 46
    Number of intersected edges : 171507

Removing zero-sized patches:
    defaultFaces type patch at position 0

Snapped mesh : cells:2632320  faces:7987025  points:2730382
Cells per refinement level:
    0    10816
    1    1102847
    2    1518657
Writing mesh to time 2e-06
Wrote mesh in = 2.95 s.
Mesh snapped in = 24.06 s.
Checking final mesh ...
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 0
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces on cells with determinant < 0.001                : 0
Finished meshing without any errors
Finished meshing in = 95.09 s.
End

 Finalising parallel run
However, when I checkMesh, the results are quite different:
Code:
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           2730382
    faces:            7987025
    internal faces:   7815514
    cells:            2632320
    faces per cell:   6.003274
    boundary patches: 3
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     2537958
    prisms:        56258
    wedges:        0
    pyramids:      0
    tet wedges:    62
    tetrahedra:    0
    polyhedra:     38042
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            4   6203
            5   5077
            6   7210
            7   120
            8   130
            9   11396
           10   22
           11   126
           12   7512
           13   42
           14   18
           15   178
           16   2
           17   6

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
                   Patch    Faces   Points                  Surface topology
                   inlet      213      238  ok (non-closed singly connected)
                  outlet      190      242  ok (non-closed singly connected)
                    wall   171108   177853  ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (-495.0089 -100.0102 0) (676.3089 100.0104 1249.1)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (-1.944183e-16 2.458072e-16 2.825263e-16) OK.
    Max cell openness = 3.391678e-16 OK.
    Max aspect ratio = 8.192438 OK.
    Minimum face area = 0.02930353. Maximum face area = 26.57967.  Face area magnitudes OK.
    Min volume = 0.1357258. Max volume = 126.0548.  Total volume = 1.653261e+07.  Cell volumes OK.
    Mesh non-orthogonality Max: 59.83755 average: 3.923171
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 14.59115, 6 highly skew faces detected which may impair the quality of the results
  <<Writing 6 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End
As you can see, 6 highly skew faces are detected. I went looking for them with Paraview by writing the skewFaces set, and I did find two of them in the vortex finder of the cyclone, see attached figure.


How can I solve this given that snappyHexMesh does not recognize the problem? I have changed every parameter that I can think of (including maxSkewness), to no avail... Any help?


EDIT: Here's the snappyHexMeshDict, in case you find it useful for diagnosis (truncated due to character limit):


Code:
 castellatedMesh true;
snap            true;
addLayers       false;

(...)

castellatedMeshControls
{
    maxLocalCells 1000000;
    maxGlobalCells 30000000;
    minRefinementCells 0;
    maxLoadUnbalance 0.10;
    nCellsBetweenLevels 2;

    features
    (
    );



    refinementSurfaces
    {

        inlet
        {
            level (0 0);

            patchInfo
            {
                type patch;
            }
        }

        outlet
        {
            level (0 0);

            patchInfo
            {
                type patch;
            }
        }


        wall
        {
            level (1 1);

            patchInfo
            {
                type wall;
            }
        }




    }

    resolveFeatureAngle 30;
    refinementRegions
    {
      box1
      {
          mode inside;
          levels ((1 1));
      }

      box2
      {
          mode inside;
          levels ((1 1));
      }

      cyl
      {
          mode inside;
          levels ((2 2));
      }

/*
      refinementBox_cyc
      {
          mode inside;
          levels ((0.24 3));
      }
*/
    }

    locationInMesh (0 0 10);
    allowFreeStandingZoneFaces false;
}

snapControls
{
    nSmoothPatch 5;
    tolerance 5;
    nSolveIter 50;
    nRelaxIter 10;
        nFeatureSnapIter 10;
        implicitFeatureSnap true;
        explicitFeatureSnap false;
        multiRegionFeatureSnap false;
}


(...)


meshQualityControls
{
    #include "meshQualityDict"

    nSmoothScale 4;
    errorReduction 0.75;

    //maxSkewness 4;
    //maxNonOrtho 65;
}

writeFlags
(
    scalarLevels
    layerSets
    layerFields     // write volScalarField for layer coverage
);

mergeTolerance 1e-6;


// ************************************************************************* //
Attached Images
File Type: jpg skew.jpg (17.0 KB, 81 views)

Last edited by ptpacheco; January 1, 2022 at 07:48. Reason: Added sHMdict
ptpacheco is offline   Reply With Quote

Old   January 4, 2022, 13:37
Default
  #2
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7
Ship Designer is on a distinguished road
I'm experiencing a similar problem, where cells at the edge of the domain get distorted. The opposite case might also be true, as I observe sHM reporting thousands of cells with faces with bad determinant, but then checkMesh reports an error-free grid. I trust checkMesh more than I do sHM. A few things you can try:
  • Make sure the resolution of the geometry mesh (stl or obj) is finer than the grid, i.e. the geometry faces are smaller than the cell faces.
  • If the edge in question is a feature edge, get an obj output of the feature edges and inspect it with ParaView. With the Feature Edges filter of ParaView you can find the proper feature angle of your stl or obj geometry, but remember that this angle is complementary to what you have to set in surfaceFeaturesDict. If ParaView shows the relevant edges at say 30 degrees, you need to specify 150 (180 - 30) in surfaceFeaturesDict.
  • Try various settings of tolerance. The current setting of 5 means that the snapping tolerance is five times the longest local edge length.
  • Often these kinks appear at points where there's a transition in the castellated mesh. Cells with with high aspect ratios might make this more difficult. Try to have cells with cubic proportions if possible.
  • If nothing of the above helps and your grid can tolerate it, try refining the mesh along the edge in question.
Hope this helps. Cheers, Claudio
Ship Designer is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
[snappyHexMesh] Layers not growing at all zonda OpenFOAM Meshing & Mesh Conversion 12 June 6, 2020 12:28
[Other] Mesh Importing Problem cuteapathy ANSYS Meshing & Geometry 2 June 24, 2017 06:29
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 16:03
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 11:52


All times are GMT -4. The time now is 14:45.