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] Mesh elements disappearing after processing snappyHexMesh (addLayers) (https://www.cfd-online.com/Forums/openfoam-meshing/154982-mesh-elements-disappearing-after-processing-snappyhexmesh-addlayers.html)

maryCFD June 23, 2015 09:20

Mesh elements disappearing after processing snappyHexMesh (addLayers)
 
2 Attachment(s)
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 :mad: 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.

Marie

danielpiaget July 9, 2015 12:37

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.

Cheers,

Daniel

maryCFD July 10, 2015 03:28

Problem solved
 
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 !

Marie

iy-a July 15, 2015 05:24

Mesh parts still disappear !!
 
Hi,

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.

http://imageshack.com/a/img910/3086/hgw7pQ.png
http://imageshack.com/a/img537/1575/ZSSWm0.png

http://imageshack.com/a/img912/166/zJxr2V.png

iy-a July 17, 2015 07:59

Set Location in Mesh !?
 
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 :
http://imageshack.com/a/img909/6474/tYideG.png

GKARIMI December 8, 2016 13:33

Hi,
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!


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