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

[snappyHexMesh] Mesh elements disappearing after processing snappyHexMesh (addLayers)

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

LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2015, 09:20
Unhappy Mesh elements disappearing after processing snappyHexMesh (addLayers)
New Member
Join Date: Feb 2015
Posts: 5
Rep Power: 11
maryCFD is on a distinguished road
Hi everyone,

I'm quite a newbie with OpenFOAM so I hope my questions won't be too foolish and that this topic has not been discussed elsewhere. I'm trying to generate a quite simple interior duct mesh equipped with a diaphragm for performing RANS+LES calculation of turbulence. I haven't found too many topics that cover interior problems like that.

I'm declaring a simple blockMesh around my diaphragm STL file. After performing snappyHexMesh with this stl file of the surface mesh of the duct+diaphragm, some of the elements of my mesh are disappearing due to the addLayers part (see image1.png). I have tried several ways to cope with my problem but I still haven't found any solution.

I have succeeded in removing the problem by changing the value of featureAngle. This, unfortunately, adds another problem in the corners of the diaphragm (see image2.png).

I'm a bit stuck there. I have found no tutorials where the geometry that is needed to mesh is interior. I think the way i'm doing must be wrong and I'd like to hear your advices on that case.

Thanks in advance for your help, feel free to ask questions if i'm not being clear.

Attached Images
File Type: png image1.png (34.0 KB, 62 views)
File Type: jpg image2.jpg (99.5 KB, 56 views)

Last edited by maryCFD; June 25, 2015 at 05:43.
maryCFD is offline   Reply With Quote

Old   July 9, 2015, 12:37
Join Date: Jan 2015
Posts: 33
Rep Power: 11
danielpiaget is on a distinguished road
Hello Mary,

I am doing some research regarding the mechanism used by snappyHexMesh to generate boundary layers. This is what I have found out up to now.

Please note that there are two different angles uses in generating the meshes.

1) The resolveFeatureAngle will control the refinement for the Castellated and Snap meshes. In order to be effective, the value needs to be set between 0 and 180. A good value is 30.Otherwise a default value will be be set by snappyHexMesh. This value is used to compute a curvature when Snapping the Castellated mesh on to the STL surface.

2) The featureAngle is used to control if the boundary layer is extruded or not. The following statement controls if the point is selected or not:

inner product (dot product) of the normal vector of face and normal vector of the feature (corner) edge < cosine (featureAngle).

Also, in order for the boundary layer to be extruded, points need to be added to the patch (surface) to construct the new faces.The maximum angle when points are added is half of the featureAngle.The angle is determine between two patches.

In your case, set the featureAngle to 60 (any value less than 90) and the resolveFeatureAngle to 30.


danielpiaget is offline   Reply With Quote

Old   July 10, 2015, 03:28
Default Problem solved
New Member
Join Date: Feb 2015
Posts: 5
Rep Power: 11
maryCFD is on a distinguished road
Thank you Daniel for your answer. Actually, I discovered that it was the "snap part" that was causing problems instead of the layers part. From there, a finer stl mesh was apparently all that was required to avoid the disappearance of elements.

Thank you very much !

maryCFD is offline   Reply With Quote

Old   July 15, 2015, 05:24
Thumbs down Mesh parts still disappear !!
New Member
Join Date: Jul 2015
Posts: 21
Rep Power: 10
iy-a is on a distinguished road

Nice tips,
I changed the values as follows :

resolvefeatureAngle : 30 .... (tried also 5)
featureAngle : 60 ...............(tried also 10)
slipfeatureAngle : 60 ..........(tried also 10)

My mesh has better quality and it took a few more minutes.
But the problem still exists. The sides of my mesh are gone.
I have this when snappyHexMesh finished :
patch faces layers avg thickness[m]
near-wall overall
------------------ -------------- ------- ------------- -------------
wall_patch0 539508 2 0.00243 0.00527
outlet_patch0 0 2 0 0
inlet_patch0 0 2 0 0

The inlet and outlet were set as patches but now seem empty/ignored.
It looks like they do not manage to link with the rest of my mesh !!!

I tried to increase the resolution (from Swiftsnap) but then blockMesh
crashes (merge list cannot satisfy memory request).
Classic ! As blockMesh can not be run in parallel,
I have to keep this resolution (which is far enough for my needs)

But I am stuck then. Has anyone already experienced this problem ?
Blender screenshot shows the results after clicking 'Detect feature edges' for a featureAngle of 15.
In paraFoam screenshots, I put my mouse where the zones disappeared.

Last edited by iy-a; July 15, 2015 at 08:10. Reason: Put some colors + Add pictures !
iy-a is offline   Reply With Quote

Old   July 17, 2015, 07:59
Default Set Location in Mesh !?
New Member
Join Date: Jul 2015
Posts: 21
Rep Power: 10
iy-a is on a distinguished road
I tried to refine locally, at the limits where the parts disappear, nothing happened.
But when I set location in Mesh on one of the part that disappeared, this part (and only this part !) is rendered.

a) SnappyHexMesh took 1762 s, should the whole geometry be rendered somewhere ?
b) Is it possible to set more than one "location in mesh" ?

Here's an image of what I had :
iy-a is offline   Reply With Quote

Old   December 8, 2016, 13:33
New Member
Join Date: Dec 2016
Posts: 5
Rep Power: 9
GKARIMI is on a distinguished road
I'm new to openfoam, and I have the same problem discussed here, could you please let me know where I can find resolvefeatureAngle, featureAngle, and slipfeatureAngle. Thank you!
GKARIMI is offline   Reply With Quote


addlayers, elements disappearing, snappyhexmesh

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
[snappyHexMesh] Creating very fine, high accuracy mesh with snappyHexMesh JD_Welch OpenFOAM Meshing & Mesh Conversion 10 July 5, 2023 11:50
[snappyHexMesh] snappyHexMesh - geometry does not appear in Mesh czhongrong OpenFOAM Meshing & Mesh Conversion 1 January 20, 2016 05:26
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry pizzaspinate OpenFOAM Meshing & Mesh Conversion 1 February 25, 2015 07:05
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55

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