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

[snappyHexMesh] Resolving High Concave Cells After SnappyHexMesh and Question about checkMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By tomf
  • 1 Post By tomf
  • 1 Post By dachs

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 12, 2024, 09:04
Question Resolving High Concave Cells After SnappyHexMesh and Question about checkMesh
  #1
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road
Hello Foamers,


I have the following problem with my mesh after using snappyHexMesh. The code gives me as last line:


Code:

Writing mesh to time constant
Wrote mesh in = 122.927 s.
Mesh snapped in = 8220.96 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                     : 8
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.05        : 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 with 8 illegal faces (concave, zero area or negative cell pyramid volume)
Finished meshing in = 10389.5 s.
End

I thought 8 cells is not so bad but to be on the safe side I run checkMesh -allGeometry -allTopology, here I get the following message:


Code:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Enabling all (cell, face, edge, point) topology checks.

Enabling all geometry checks.

Time = 0s

Mesh stats
    points:           5843473
    faces:            14176371
    internal faces:   12508532
    cells:            4213063
    faces per cell:   6.33385
    boundary patches: 27
    point zones:      0
    face zones:       1
    cell zones:       1

Overall number of cells of each type:
    hexahedra:     3380166
    prisms:        191350
    wedges:        0
    pyramids:      0
    tet wedges:    5540
    tetrahedra:    0
    polyhedra:     636007
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            4   4208
            5   35807
            6   170363
            7   21992
            8   1028
            9   293064
           10   3729
           11   580
           12   74129
           13   135
           14   113
           15   28269
           17   2
           18   2588

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Topological cell zip-up check OK.
    Face-face connectivity OK.
  <<Writing 5 cells with two non-boundary faces to set twoInternalFacesCells
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
                   Patch    Faces   Points                  Surface topology Bounding box
               frontWall    69024    80320  ok (non-closed singly connected) (-0.09615 -0.09615 0.029) (0.09615 0.09615 0.029)
                backWall    69024    80320  ok (non-closed singly connected) (-0.09615 -0.09615 -0.029) (0.09615 0.09615 -0.029)
                innerGap    49141    61077  ok (non-closed singly connected) (-0.0705896 -0.0705895 -0.0201288) (0.0705896 0.0705914 0.0200236)
                outerGap    61387    73589  ok (non-closed singly connected) (-0.0961502 -0.0961502 -0.0200004) (0.0961502 0.0961502 0.0200004)
               middleGap    58933    69921  ok (non-closed singly connected) (-0.083599 -0.083599 -0.0200014) (0.083599 0.083599 0.0200014)
               innerRing   262903   286859  ok (non-closed singly connected) (-0.0701587 -0.0701534 -0.029) (0.0701555 0.0701596 0.029)
               outerRing   244359   267563  ok (non-closed singly connected) (-0.0961587 -0.0961587 -0.029) (0.0961687 0.0961687 0.029)
                roller01    41893    46165  ok (non-closed singly connected) (-0.0130047 0.0701492 -0.0204491) (0.0130046 0.0956182 0.0204491)
                roller02    43252    47563  ok (non-closed singly connected) (0.0126893 0.0660956 -0.0204491) (0.038693 0.0920837 0.0204491)
                roller03    43261    47723  ok (non-closed singly connected) (0.0358861 0.0542839 -0.0204491) (0.0618779 0.0802708 0.0204491)
                roller04    42780    47085  ok (non-closed singly connected) (0.0542843 0.0358858 -0.0204491) (0.0802722 0.0618784 0.0204491)
                roller05    42733    47091  ok (non-closed singly connected) (0.0660951 0.0126893 -0.0204491) (0.0920939 0.038693 0.0204491)
                roller06    41456    45729  ok (non-closed singly connected) (0.0701473 -0.0130047 -0.0204491) (0.0956182 0.0130047 0.0204491)
                roller07    42405    46646  ok (non-closed singly connected) (0.0660956 -0.038693 -0.0204491) (0.0920944 -0.0126893 0.0204491)
                roller08    43786    48146  ok (non-closed singly connected) (0.0542836 -0.0618784 -0.0204491) (0.0802722 -0.0358861 0.0204491)
                roller09    42890    47216  ok (non-closed singly connected) (0.0358858 -0.0802722 -0.0204491) (0.0618784 -0.0542843 0.0204491)
                roller10    42241    46483  ok (non-closed singly connected) (0.0126893 -0.092094 -0.0204491) (0.038693 -0.0660951 0.0204491)
                roller11    41553    45815  ok (non-closed singly connected) (-0.0130047 -0.0956182 -0.0204491) (0.0130047 -0.070148 0.0204491)
                roller12    42401    46641  ok (non-closed singly connected) (-0.038693 -0.0920944 -0.0204491) (-0.0126893 -0.0660956 0.0204491)
                roller13    43782    48143  ok (non-closed singly connected) (-0.0618784 -0.0802722 -0.0204491) (-0.0358861 -0.0542836 0.0204491)
                roller14    42893    47221  ok (non-closed singly connected) (-0.0802722 -0.0618784 -0.0204491) (-0.0542843 -0.0358858 0.0204491)
                roller15    42302    46544  ok (non-closed singly connected) (-0.0920844 -0.038693 -0.0204491) (-0.0660951 -0.0126893 0.0204491)
                roller16    41552    45814  ok (non-closed singly connected) (-0.0956182 -0.0130047 -0.0204491) (-0.0701494 0.0130047 0.0204491)
                roller17    43548    47776  ok (non-closed singly connected) (-0.0920941 0.0126893 -0.0204491) (-0.0660956 0.038693 0.0204491)
                roller18    42755    47094  ok (non-closed singly connected) (-0.0802722 0.0358861 -0.0204491) (-0.0542836 0.0618784 0.0204491)
                roller19    42780    47083  ok (non-closed singly connected) (-0.0618784 0.0542843 -0.0204491) (-0.0358858 0.0802722 0.0204491)
                roller20    42805    47161  ok (non-closed singly connected) (-0.038693 0.0660951 -0.0204491) (-0.0126893 0.0920843 0.0204491)

Checking geometry...
    Overall domain bounding box (-0.0961587 -0.0961587 -0.029) (0.0961687 0.0961687 0.029)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (6.41921e-17 -3.93575e-16 1.51684e-15) OK.
    Max cell openness = 4.35747e-16 OK.
    Max aspect ratio = 14.6072 OK.
    Minimum face area = 4.27779e-10. Maximum face area = 1.43632e-06.  Face area magnitudes OK.
    Min volume = 1.33505e-13. Max volume = 1.06963e-09.  Total volume = 0.000353475.  Cell volumes OK.
    Mesh non-orthogonality Max: 65.011 average: 14.5431
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 12.3099, 159 highly skew faces detected which may impair the quality of the results
  <<Writing 159 skew faces to set skewFaces
    Coupled point location match (average 0) OK.
 ***Error in face tets: 83 faces with low quality or negative volume decomposition tets.
  <<Writing 79 faces with low quality or negative volume decomposition tets to set lowQualityTetFaces
   *Edges too small, min/max edge length = 0 0.00150081, number too small: 6
  <<Writing 6 points on short edges to set shortEdges
   *There are 42787 faces with concave angles between consecutive edges. Max concave angle = 83.8282 degrees.
  <<Writing 42787 faces with concave angles to set concaveFaces
    Face flatness (1 = flat, 0 = butterfly) : min = 0.252789  average = 0.999112
   *There are 8484 faces with ratio between projected and actual area < 0.8
    Minimum ratio (minimum flatness, maximum warpage) = 0.252789
  <<Writing 8484 warped faces to set warpedFaces
    Cell determinant (wellposedness) : minimum: 9.11575e-20 average: 11.0895
 ***Cells with small determinant (< 0.001) found, number of cells: 5
  <<Writing 5 under-determined cells to set underdeterminedCells
 ***Concave cells (using face planes) found, number of cells: 323424
  <<Writing 323424 concave cells to set concaveCells
    Face interpolation weight : minimum: 0.0840176 average: 0.454772
    Face interpolation weight check OK.
    Face volume ratio : minimum: 0.0161983 average: 0.776495
    Face volume ratio check OK.

Failed 4 mesh checks.

End

What I don't understand at all is why my code tells me that I only have 8 illegal cells and then there is such a big difference. I am also wondering why I only get an error with the normal checkMesh command?


I think my biggest problem is the huge amount of concave cells. I have looked in Paraview where these are located and then tried to give these affected bodies a higher refinement level in snappyhexMeshDict/castellatedMeshControls/refinementSurfaces. Unfortunately without success. Does anyone have any further ideas?
dachs is offline   Reply With Quote

Old   August 13, 2024, 06:16
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 647
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

There is a difference in the mesh quality parameters that are considered by snappyHexMesh and those by checkMesh.

My very simplified experience:
Usually, the output you get from normal checkMesh (so without -allTopology -allGeometry) are the ones to focus on. The additional output you get with -allTopology -allGeometry may be important for some specific solvers. For most single phase solvers they are not needed.

You see that there are some skewed cells from checkMesh, those are probably the boundary skewness cells reported by snappyHexMesh as the worst result (~12) is between the 4 and 20 mentioned at the end of the log.

My advice would be to run your solver with this mesh and if it fails, try to focus on the skewed cells, maybe tighten the boundary value in the meshQualityDict of snappy and rerun snappy.

Regards,
Tom
dachs likes this.
tomf is offline   Reply With Quote

Old   August 13, 2024, 07:38
Default
  #3
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road
Quote:
Originally Posted by tomf View Post
Hi,

There is a difference in the mesh quality parameters that are considered by snappyHexMesh and those by checkMesh.

My very simplified experience:
Usually, the output you get from normal checkMesh (so without -allTopology -allGeometry) are the ones to focus on. The additional output you get with -allTopology -allGeometry may be important for some specific solvers. For most single phase solvers they are not needed.

You see that there are some skewed cells from checkMesh, those are probably the boundary skewness cells reported by snappyHexMesh as the worst result (~12) is between the 4 and 20 mentioned at the end of the log.

My advice would be to run your solver with this mesh and if it fails, try to focus on the skewed cells, maybe tighten the boundary value in the meshQualityDict of snappy and rerun snappy.

Regards,
Tom

Hi tomf,

Thank you very much for your contribution, that explains a lot. Since you mention single-phase solvers, I am trying to run a two-phase simulation but always fail. Should I also focus on checkMesh -allGeometry -allTopology or not for now?
dachs is offline   Reply With Quote

Old   August 13, 2024, 08:53
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 647
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

From the past I have had some issues with particle solvers with meshes that have some of these errors, but I do not remember that being the case with VOF or Euler-Euler solvers. Of course it could depend on other settings, which may be depending on you mesh quality, but there is not enough information to tell this.

Regards,
Tom
dachs likes this.
tomf is offline   Reply With Quote

Old   August 13, 2024, 10:06
Default
  #5
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road
Quote:
Originally Posted by tomf View Post
Hi,

From the past I have had some issues with particle solvers with meshes that have some of these errors, but I do not remember that being the case with VOF or Euler-Euler solvers. Of course it could depend on other settings, which may be depending on you mesh quality, but there is not enough information to tell this.

Regards,
Tom

Hi tomf,

That answers all your questions about the mesh. Thank you very much for your help!
tomf likes this.
dachs is offline   Reply With Quote

Reply

Tags
checkmesh error, snappy hex mesh


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
[snappyHexMesh] snappyHexMesh <-> dynamicMeshDict problem with protected cells Billy_16 OpenFOAM Meshing & Mesh Conversion 2 November 21, 2020 04:34
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! divergence OpenFOAM Meshing & Mesh Conversion 0 January 23, 2019 05:17
[snappyHexMesh] Isn't the "concave cells" really wrong? KeiJun OpenFOAM Meshing & Mesh Conversion 2 March 3, 2016 04:59
[snappyHexMesh] Only hexaedrical Cells with snappyHexMesh possible? smoerebroet OpenFOAM Meshing & Mesh Conversion 2 November 28, 2014 13:52
[snappyHexMesh] snappyHexMesh uses tet cells for internal mesh! sasanghomi OpenFOAM Meshing & Mesh Conversion 2 March 16, 2014 06:41


All times are GMT -4. The time now is 08:06.