CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] snappyHexMesh <-> dynamicMeshDict problem with protected cells

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Billy_16

LinkBack Thread Tools Search this Thread Display Modes
Old   March 30, 2016, 08:51
Default snappyHexMesh <-> dynamicMeshDict problem with protected cells
New Member
Join Date: Mar 2016
Posts: 1
Rep Power: 0
Billy_16 is on a distinguished road
since this is my first post, please be patient if my question is already answered in another thread.

My Test-case:
1. blockMesh simple cubic domain
2. snappyHexMesh a stl geometry (circle) and substract it from mesh
3. run the flow with dynamicMeshDict for adaptive refinement, based on vorticity.

This works as expected with one problem:

dynamicMeshDict reports:

Detected 172 cells that are protected from refinement. Writing these to cellSet protectedCells.
These cells are 2 to 4 cells away from the solid. So refinement of the solid with snappyHexMesh is working

checkMesh (before running the solver) reports:

Time = 0

Mesh stats
points: 2020
faces: 3828
internal faces: 1940
cells: 948
faces per cell: 6.08439
boundary patches: 6
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 896
prisms: 16
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 36
Breakdown of polyhedra by number of faces:
faces number of cells
6 12
9 16
12 8

Checking topology...
Boundary definition OK.
***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.
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
frontWall 40 82 ok (non-closed singly connected)
backWall 40 82 ok (non-closed singly connected)
inlet 20 42 ok (non-closed singly connected)
outlet 20 42 ok (non-closed singly connected)
topAndBottom 1704 1880 ok (non-closed singly connected)
cylinder 64 96 ok (non-closed singly connected)
Maybe there is some setting in SnappyhexMesh, to generate only hexahedrons.
As the sum of (front+back+inlet+outlet) + non-hexahedra = 120 + 52 = 172
It seems to me that the problem are the non-hexahedra cells.

In the attached file, red cells are refined, blue not.
Yellow cells should be refined, but are protected.

Thanks for a hint, where the problem is. ( except in front of the monitor )

Attached Images
File Type: png screenshot.png (11.5 KB, 84 views)
ahparvin likes this.
Billy_16 is offline   Reply With Quote

Old   November 21, 2016, 09:33
Join Date: Nov 2015
Location: Hamburg, Germany
Posts: 57
Rep Power: 10
potentialFoam is on a distinguished road
Dear William,

did you find a solution for the problem that Adaptive Mesh Refinement is not working for non-pure-hex cells?

I also faced this problem here
But I didn't find a solution until now... Although is should work, see e.g. what T. Holzmann achieved:

potentialFoam is offline   Reply With Quote

Old   November 21, 2020, 03:34
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
I just tested to use AMR on a flow around a sphere where the mesh is generated by snappyhexMesh and it worked. I used OF2006. In this version (maybe also earlier) cells which cannot be refined are shielded in the beginning of the simulation. The only drawback is that one cannot use wall layers. A mesh generated with snappyhexMesh with wall layers produces the following error:

cell 29599 of level 5 uses more than 8 points of equal or lower level
Points so far:8(14554 25760 25761 28967 35727 35732 35737 35742)
mAlletto is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[ICEM] Error in mesh writing helios ANSYS Meshing & Geometry 21 August 19, 2021 14:18
[snappyHexMesh] Problem with decomposePar, snappyHexMesh luca1992 OpenFOAM Meshing & Mesh Conversion 12 August 23, 2017 19:06
[snappyHexMesh] Problem airfoil snappyhexmesh add layer bye bye my blue OpenFOAM Meshing & Mesh Conversion 1 May 5, 2017 05:56
[Netgen] Import netgen mesh to OpenFOAM hsieh OpenFOAM Meshing & Mesh Conversion 32 September 13, 2011 05:50
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 21:11

All times are GMT -4. The time now is 12:41.