CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] snappyHexMesh surface refinement bugs (https://www.cfd-online.com/Forums/openfoam-meshing/109124-snappyhexmesh-surface-refinement-bugs.html)

wc34071209 November 9, 2012 13:50

snappyHexMesh surface refinement bugs
 
1 Attachment(s)
Hi everyone,

I found that something wrong with the surface refinement. I wanted to refine a surface and it got refined, but another surface very close to this surface also got refined. Details can be seen from the figure.

In the figure, I only wanted to refine the surface of duct but the surface of box close to the duct also got refined. It is really strange.

Anyone knows why ?

Thank you in advance !

wc34071209 November 10, 2012 18:22

no body takes interest?

wyldckat November 10, 2012 20:18

Greetings Cong and welcome to the forum!

I can only guess what the problem is - since the surfaces are too close, the one you don't want as refined as the other one is still getting caught thanks to the number of cells between each level... namely this parameter:
Code:

nCellsBetweenLevels
For more information, see "A Comprehensive Tour of snappyHexMesh - 7th OpenFOAM Workshop (25 June 2012)", accessible through here: http://openfoamwiki.net/index.php/Sn...als_and_Guides

Best regards,
Bruno

wc34071209 November 11, 2012 09:44

Hi,
Thank you so much !

I am using default setting for nCellsBetweenLevels --- 2. According to you, I should decrease this value ?

wc34071209 November 11, 2012 09:46

Hi Bruno,

Could you give me some hints about how to avoid concave cells?

The following attached is the output after I run checkMesh. It seems my mesh is really bad.


Mesh stats
points: 5640879
faces: 15861281
internal faces: 15183609
cells: 5116777
boundary patches: 15
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 4884773
prisms: 47139
wedges: 23
pyramids: 16
tet wedges: 987
tetrahedra: 0
polyhedra: 183839

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 geometry...
Overall domain bounding box (-3 -3.049999952 -0.03999999911) (3.440000057 3.049999952 2.160000095)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (-4.370968924e-15 -3.928455669e-19 1.96277524e-15) OK.
Max cell openness = 1.095394505e-15 OK.
Max aspect ratio = 64.0748539 OK.
Minimum face area = 1.548521309e-09. Maximum face area = 0.381110741. Face area magnitudes OK.
Min volume = 4.377205473e-13. Max volume = 0.1300759831. Total volume = 74.34968174. Cell volumes OK.
Mesh non-orthogonality Max: 64.98871264 average: 5.814950331
Non-orthogonality check OK.
Face pyramids OK.
***Max skewness = 4.476212227, 745 highly skew faces detected which may impair the quality of the results
<<Writing 745 skew faces to set skewFaces
Coupled point location match (average 0) OK.
***Error in face tets: 74 faces with low quality or negative volume decomposition tets.
<<Writing 70 faces with low quality or negative volume decomposition tets to set lowQualityTetFaces
*Edges too small, min/max edge length = 0 0.8384450559, number too small: 4
<<Writing 4 points on short edges to set shortEdges
*There are 1390 faces with concave angles between consecutive edges. Max concave angle = 53.12549247 degrees.
<<Writing 1390 faces with concave angles to set concaveFaces
Face flatness (1 = flat, 0 = butterfly) : average = 0.9999261207 min = 0.7680335307
*There are 8 faces with ratio between projected and actual area < 0.8
Minimum ratio (minimum flatness, maximum warpage) = 0.7680335307
<<Writing 8 warped faces to set warpedFaces
Cell determinant (wellposedness) : minimum: 0 average: 6.956499987
***Cells with small determinant found, number of cells: 4768
<<Writing 4768 under-determined cells to set underdeterminedCells
***Concave cells (using face planes) found, number of cells: 36302
<<Writing 36302 concave cells to set concaveCells

Failed 4 mesh checks.

End

wyldckat November 11, 2012 15:41

Hi Cong,

Quote:

Originally Posted by wc34071209 (Post 391493)
Could you give me some hints about how to avoid concave cells?

Sorry but I haven't figured out how concave cells can be avoided. All I know is that sometimes it's just a warning and those cells are OK.

Nonetheless, I believe that you might be able to find the solution if you read the tutorials referred to in the link I posted.

Good luck!
Bruno

sail November 11, 2012 17:28

with so many errors, chances are that sHM have not produced a mesh witt your quality criterion before the maximum snapping phases and it gave up.

try to take a look at the sHM log to find if there have been any error messages.

Doug68 November 11, 2012 21:07

Hi wc34071209,

From my point of view if the mesh finishes at the boundary surface and its what's going on side the mesh that is important.
I think it's easy to get fixated on getting a perfect representation of the surface at the edge of the mesh but if you un-refine immediately away from the surface then the chances of getting good results about what's happening close to and then onto the surface are surely diminished?

In the case of your box close to the surface, if its not going to have real effect on the flow i.e. it represents a probe or something that shouldn't have a major effect on the simulation then remove it from the model. If on the other hand it is important then you should refine around it also I would have thought?

viraj20feb October 5, 2018 13:27

Is there a bug in snappyHexMesh such that only for a particular combination of refinement levels in both blockMesh and snappyHexMesh, the mesh will be created where the locationInMesh point lies, otherwise outside the geometry and inside the far fields?

wyldckat October 7, 2018 06:53

Quote:

Originally Posted by viraj20feb (Post 709021)
Is there a bug in snappyHexMesh such that only for a particular combination of refinement levels in both blockMesh and snappyHexMesh, the mesh will be created where the locationInMesh point lies, otherwise outside the geometry and inside the far fields?

Quick answer: I suspect that may happen only in the following situations and in those cases it would not be a bug:
  1. If there are overlapping surfaces... in other words, if a surface is duplicated on itself, that makes it really hard to figure out which side is which.
  2. With a coarse mesh, the relation between surfaces and location in mesh is lost. What I mean is that snappyHexMesh can only see what the mesh allows to see... so if the cell edges do not cross through a surface, then that surface cannot be seen.


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