CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Native Meshers: snappyHexMesh and Others (
-   -   snappyHexMesh does not snap to corner (

aeroMatze August 29, 2012 10:58

snappyHexMesh does not snap to corner
5 Attachment(s)
Dear all,

apologies for this noob question right away, but I've been working on solving this problems for some days now and I can't come to a solution.
I try to mesh a simple rectangular nozzle and I run into problems on the intersection of the outer shape and the outlet. (--> see attached images)
Strangely enough the intersection of Inlet and outer shape is meshed just fine.

snappyHexMeshDict and blockMeshDict:

Attachment 15455

Attachment 15456

Attachment 15452

Attachment 15453

Attachment 15454

I wonder if anyone can come up with some ideas where my mistake might be.

Thanks in advance for any input.


SirWombat August 30, 2012 06:08

Try to use featureEdges. In case you did you may want to ease/alter your quality settings.

Compared to the rest of the domain your edges seem to have a very high cell resolution. If you use featureEdges you won't need to refine those as much.

aeroMatze August 30, 2012 07:50

1 Attachment(s)
Hi, thanks for the answer.
I'm using surfaceFeatureExtract, but the problem is that not all detected edges are also refined.
For illustration I have added a very simple geometry.

Attachment 15475

When I run featureExtract it finds 8 points and 12 edges. 8 edges are marked 'region', one is marked 'external', three are marked 'internal'. Maybe that's a symptom of the problem, but neither know what that implies nor how to change it...

Any more ideas? Please ignore the high resolution along the edges. I'm aware of the fact that that's not necessary, but I don't believe it is the root of my problem.

Best regards,

SirWombat August 30, 2012 08:51

i see ... have you checked that all your feature edges are there?

to check using paraFoam you will have to convert the eMesh-File to an obj-File like this

  surfaceFeatureConvert /constant/triSurface/YOURFILE.eMesh  featurelines.obj
Then load the " featurelines.obj" in paraFOam and check whether the lines correspond to your edges.

Oh and by the way what version are you using? ... there were problems in 2.0.x so better head for 2.1.x ... i just saw that your files say 2.1.1. so that should be OK.

aeroMatze August 30, 2012 09:03

I'm using OF 2.1.1 ... and yep, all 8 feature lines are visible when importing them in paraview. The eMesh file for this case is very short, so I also checked it in an editors and again: all 12 edges are there...

SirWombat August 30, 2012 09:23

hmm ... too bad ...

There is this thread here, but the issue should have been resolved:

If those feature-edges dont work you can edit them in Blender ( Try to make them longer/shorter. You can even create other feature edges in blender an export them as "obj".

when ready exporting from blender you will have to change the character "f" to an "l" for all eges in the obj-file. (migh be a german issue).


sed -i 's/f /l /' features_from_blender.obj
then convert the obj to an eMesh


surfaceFeatureConvert features_from_blender.obj constant/triSurface/features_from_blender.eMesh

I am using that method quite frequently as for a lot of geometries that i use (mainly ship hulls) i get a lot of feature lines that I don't want. So I delete those unwanted lines using blender. Works quite nicely

G Jan

sda January 26, 2013 12:37


Did you ever solve your edge resolution problem?


Thom June 24, 2013 04:44


when ready exporting from blender you will have to change the character "f" to an "l" for all eges in the obj-file. (migh be a german issue).

Thank you very much for that advice. Been banging my head (literally at times) against a wall all day trying find what the problem was!

All times are GMT -4. The time now is 16:42.