View Issue Details

IDProjectCategoryView StatusLast Update
0001493OpenFOAMBugpublic2015-08-17 00:55
Reporterchriss85 Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionunable to reproduce 
PlatformGNU/LinuxOSUbuntuOS Version14.10
Summary0001493: snappyHexMesh creates cells with faces touching each other
DescriptionNote: Same report on the forum at http://www.cfd-online.com/Forums/openfoam-bugs/147344-snappyhexmesh-generating-cells-flat-faces-touching-each-other.html

I've recently run into problems where snappyHexMesh will generate polyhedra cells with a nonzero volume, but two faces directly on top of each other.

This results in problems because the Courant number will be extremely high in these cells, and adaptive time step methods will fail.

This problem is not detected by checkMesh, since common quality measures like non-orthogonality or cell volume are unaffected. I think this issue needs to be considered in the detection of invalid cells during undo stage in snappyHexMesh.

checkMesh output:

Overall domain bounding box (-2.10476e-08 1.47089e-05 1.07802e-05) (0.017315 0.0186159 0.0183828)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (-8.91807e-17 -2.58947e-17 -6.77004e-18) OK.
    Max cell openness = 3.89026e-16 OK.
    Max aspect ratio = 5.73767 OK.
    Minimum face area = 4.2135e-10. Maximum face area = 4.23884e-08. Face area magnitudes OK.
    Min volume = 4.94644e-14. Max volume = 7.47925e-12. Total volume = 3.39481e-07. Cell volumes OK.
    Mesh non-orthogonality Max: 55.4823 average: 10.0927
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.68602 OK.
    Coupled point location match (average 0) OK.

I would suggest adding some detection code for this and probably add it to the undo stage to fix these invalid cells. checkMesh should also report this problem as this is an unusable mesh.
Steps To ReproduceI can't publish my input surface unfortunately.
TagsNo tags attached.

Activities

chriss85

2015-01-19 15:47

reporter  

weirdCell.png (4,348 bytes)   
weirdCell.png (4,348 bytes)   

user4

2015-03-02 10:26

  ~0003937

The line-drawing in report (http://www.cfd-online.com/Forums/openfoam-bugs/147344-snappyhexmesh-generating-cells-flat-faces-touching-each-other.html) looks like a very valid cell - it is only the visualisation using paraview that makes it look as if two faces are on top of each other (from what I can see)

From a cfd point of view there is no direct problem with faces being on top of each other. There might be issues to do with e.g. face weights and this can already be detected by snappyHexMesh. What does

 checkMesh -allGeometry

tell you?

chriss85

2015-03-02 13:59

reporter   ~0003941

Why do you think this is a display issue from paraview?
The two faces on the right are definitely 2-dimensional.

The problem arises when one uses a solver with an adaptive time step based on the courant number, because the Courant number will be extremely high in these cells. Once the flow reaches these cells, the time step size is decreased extremely so that no solution is possible in a reasonable amount of time.

With checkMesh -allGeometry I get some warnings and one failed check:

Checking geometry...
    Overall domain bounding box (-2.10476e-08 1.47089e-05 1.07802e-05) (0.017315 0.0186159 0.0183828)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (-3.15206e-17 -1.35538e-16 -4.42836e-16) OK.
    Max cell openness = 3.89026e-16 OK.
    Max aspect ratio = 5.73767 OK.
    Minimum face area = 4.2135e-10. Maximum face area = 4.23884e-08. Face area magnitudes OK.
    Min volume = 4.94644e-14. Max volume = 7.47925e-12. Total volume = 3.39481e-07. Cell volumes OK.
    Mesh non-orthogonality Max: 55.4823 average: 10.0927
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.68602 OK.
    Coupled point location match (average 0) OK.
    Face tets OK.
    Min/max edge length = 1.09254e-05 0.000237731 OK.
   *There are 164 faces with concave angles between consecutive edges. Max concave angle = 79.7038 degrees.
  <<Writing 164 faces with concave angles to set concaveFaces
    Face flatness (1 = flat, 0 = butterfly) : min = 0.541716 average = 0.999025
   *There are 42 faces with ratio between projected and actual area < 0.8
    Minimum ratio (minimum flatness, maximum warpage) = 0.541716
  <<Writing 42 warped faces to set warpedFaces
    Cell determinant (wellposedness) : minimum: 0.0644933 average: 12.8905
    Cell determinant check OK.
 ***Concave cells (using face planes) found, number of cells: 9011
  <<Writing 9011 concave cells to set concaveCells
    Face interpolation weight : minimum: 0.120757 average: 0.463104
    Face interpolation weight check OK.
    Face volume ratio : minimum: 0.0929185 average: 0.81249
    Face volume ratio check OK.

Failed 1 mesh checks.


Is this line supposed to warn about these cells?
 ***Concave cells (using face planes) found, number of cells: 9011
If so, are there any settings that can be used to reject these cells in snappyHexMesh in an undo step?

user4

2015-03-02 15:20

  ~0003942

>The two faces on the right are definitely 2-dimensional.

From the line picture it seems the face on the right is a single, warped, face that gets visualised by two flat faces, i.e. it is paraview that creates a split to visualise it. I do not see an edge crossing the bottom face in the line picture.

The mesh check that probably best picks up the warpage is the 'Face Flatness'. Use the minTwist setting to specify something similar - the (cos of the) angle between average face normal and individual triangle normals.

wyldckat

2015-08-17 00:55

updater   ~0005246

No test case available for reproducing the error and solution seems to have already been provided, therefore it doesn't seem to even need fixing.

Issue History

Date Modified Username Field Change
2015-01-19 15:47 chriss85 New Issue
2015-01-19 15:47 chriss85 File Added: weirdCell.png
2015-03-02 10:26 user4 Note Added: 0003937
2015-03-02 13:59 chriss85 Note Added: 0003941
2015-03-02 15:20 user4 Note Added: 0003942
2015-08-17 00:55 wyldckat Note Added: 0005246
2015-08-17 00:55 wyldckat Status new => closed
2015-08-17 00:55 wyldckat Resolution open => unable to reproduce