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 Displacement at mesh point...points through the surrounding patch faces (https://www.cfd-online.com/Forums/openfoam-meshing/149358-snappyhexmesh-displacement-mesh-point-points-through-surrounding-patch-faces.html)

pizzaspinate March 3, 2015 04:52

SnappyHexMesh Displacement at mesh point...points through the surrounding patch faces
 
1 Attachment(s)
Hi FOAMers.

when I am using SHM and run it I receive the following warning

Code:

--> FOAM Warning : Displacement (-6.68027e-06 -2.56825e-07 -1.16867e-05) at mesh point 326884 coord (0.000462189 -6.66163e-06 -0.49958) points through the surrounding patch faces
I am not sure what causes this problem or how to solve it.
Do I have to change sth in my SHM Dict or in the blockMeshDict or is eventually my geometry causing the problem?

I simulate a 3D straight wing. I model only half of it and use a symmetry plane BC. The coordinates in the warning message seem to be on the LE of the aerofoil which is at 0,0,0.

Hope someone can help me out. Many thanks in advance!

P.S.: let me know if you require the snappyHexMeshDict or anything else

pbalz March 4, 2015 10:45

Hi,

this warning is due to incorrect snapping of your hex mesh to the geometry, which simply means that the mesh points do not capture the feature edges/surfs correctly.
In general, these warnings are not critical, thus do not affect the SHM process itself. But you should visually inspect the generated mesh for geometrical correctness, especially at the leading edge of your airfoil.

I recently got this message when I tried to mesh small feature edges with a relatively coarse background grid.

A few questions:
- Did you use refinement boxes around the airfoil to decrease the background grid size?
- Do you use any surfaceRefinement on the airfoil surface during snappyHexMesh?

If not, then you should try... Especially the surfaceRefinement works great for me and ensures a better snapping.


Regards,
Pascal

pizzaspinate March 4, 2015 11:07

5 Attachment(s)
Hi Pascal,
thank you very much for the quick reply.

I already made my blockMesh quite fine and as quadratic as possible.

I have done both (see attached Dict).

I took some screen shots. I can see that picture 1 and 2 are due to bad snapping. But with the third one I am not sure if the deformed cells on the surface (the triangles) are due to that warning and if I could somehow get rid of them.

pbalz March 4, 2015 11:42

Hi pizzaspinate,

I do not have a direct answer to your problem yet. The tetras in the third picture could be due to your pretty high MinTetQuality. Another guess: SurfaceFeatureExtract doesn't work as intended, which would also explain the partially non-refined edges.

Are you able to upload your case directory with the geometry file?

Regards,
Pascal

pizzaspinate March 4, 2015 12:12

ok, I have changed the angle in the surfaceFeatureExtractDict to 180 because I couldn't get the triangles away and I hoped it would fix it.

I have attached my case. I am really grateful for your help as I dont seem to get nice layers around it!

pbalz March 4, 2015 13:34

Sorry, I can't find any attachments.
If the file is too large to upload on the forums (.tar.gz?), you can also send me an email: pascal_balz@web.de

pizzaspinate March 4, 2015 13:45

ok thats strange. I will send you an email

pizzaspinate March 4, 2015 13:51

I have sent it to you via WeTransfer because the file is too big for an email

pizzaspinate March 6, 2015 02:13

3 Attachment(s)
Hi,
I have compressed them separately here. Hope it works and you can help out.
Thanks a lot again! :)

pbalz March 6, 2015 12:11

Hi,

I did receive your mail, but, unfortunately I did not have time to have a look at it yesterday.
As soon as I get some answers regarding your problem, I'll tell you.

pizzaspinate March 7, 2015 02:55

Hi,

cool, thank you :-) Tried to solve it myself by chnging some shm parameters but without success so far :-/

pbalz March 7, 2015 07:08

Hi,

the major problem obviously is the MaxGlobalCell value of 4 mio. Your background grid already has about 2.4 mio cells, so you're limiting SHM in the surface/edge refinement process, which causes the partially not refined edges. A value of about 10 Mio should be ok, as your grid is going to be really fine (do you need it this fine?)

The surfaceFeatureExtract angle of 180 is too high, as this won't write out only the major feature edges, but also the triangle edges of your stl. Guess thats my fault.
Your stl file was some kind of weird, because it contained every triangle as a single patch(solid). I changed that.

Currently, I'm building the mesh with the settings I used on other projects. Sorry for that, as this will result in a slightly changed structure of the case folder. I'll provide you the case as soon as the meshing process ends with some nice results.

A few general questions:
- Is it possible to use a symmetry plane on both sides of the airfoil? This would improve the mesh quality at the trailing edge of the free standing surface, as a free standing sharp edge likely causes wrong elements in SHM. But this depends on the physical phenomena you want to investigate.
- I would increase the cell size in the far field by using simpleGrading.
- I would also decrease the height of your fluid region.

These suggestions of course all depend on the restrictions/demands you have.

Regards,
Pascal

pizzaspinate March 7, 2015 09:22

Hi,
thank you for the quick response.
Guess figuring that out would have taken me a while as my computer has already a hard time solving 4 million cells.
But I can use a supercomputer now so I will also be able to run for 10 million cells.

- Unfortunately, I need an opening on the other side. Is it generally the case that i will get a better mesh if opposite sides have the same BC? Lets say if I would test an entire wing rather than half a wing would I get a better mesh using Openings on both sides?

- you can increase the cell size in the far field. I was just playing around with it because I hoped it would improve my SHM

- I am afraid I need quite a big box in order to avoid bad results :-/

I have a question regarding the surfaceFeatureExtract angle: How do I know which angle is appropriate? I had it before on 150 but when I plotted only the surfaceFeature edges it seemed like SFE did not recognize the leading edge of the configuration as it was not plotted as a line. This only happened when I changed it to 180 degrees.

Thank you very much again!!!

pbalz March 7, 2015 10:55

3 Attachment(s)
Hi,

please find attached the new case directory. Just use the createMesh script to... well... create the mesh :)

Although the surface refinement on the airfoil is at level 3 at the moment, the boundary layers look pretty decent (see picture). The mesh has about 4.4 mio cells in total after computing it.
You can see in the other picture what I meant with the wrong elements at the free standing side of the trailing edge. You could avoid that by either using a symmetry plane there (~ making your airfoil infinite long) or by increasing the featureEdge refinement from level 5 to 6 or 7 in snappyHexMeshDict. Of course you will get much more cells, so I think the actual settings are a quite good compromise.

Whats left for you to play with:
- I did not change the background grid yet, but thats a fairly easy part.
- Maybe you want a higher airfoil surface resolution and can handle the higher computation time--> surface refinement level 4. I would not go any finer there.
- the feature edge refinement level is set to 5 to get the geometry right. Try using 4 and see if thats acceptable for you.
- Some parameters for the layer addition are not optimal yet: i.e. the medianaxis settings need some adjustment for better boundary layers at the trailing edge.

Regarding your questions:
I think you got me wrong with the idea of using two symmetry planes. It's more about clipping the airfoil on both sides to avoid the cells as seen in the picture.
SurfaceFeatureExtract: Of course it didn't recognize the leading edge, because it is no edge per se. Just a high curvature there. In general, a value between 150 and 170 is good. With 180 degree, you get every single edge of the triangulated surface.

Hope this all helps you out! If you have any questions left, feel free to ask.

Regards,
Pascal

pizzaspinate March 9, 2015 07:45

Hi Pascal,
thank you so much.
Quick questions: did you use the file uploaded to get those results on the pictures or is it for 10,000,000 cells? Because if I run your case as it is I get really poor layers and non for 10,000,000 cells

pizzaspinate March 9, 2015 11:17

Hi,
sorry it was just me being silly :-)
Do you know why I got the displacement warning during the mesh morphing? Because you managed to get rid of it but which change in SHM caused it?

pbalz March 9, 2015 13:52

Quote:

Originally Posted by pizzaspinate (Post 535320)
did you use the file uploaded to get those results on the pictures or is it for 10,000,000 cells?

I got these results using my uploaded files. And I have to admit, the layers are not perfect at all, especially at the transition from airfoil to symmetry plane.
I think this is caused by the difference in edge refinement & surf refinement. snappy builds some nice layers around the surface, but when reaching the edges, the layers strongly decrease in size and therefore collapse.
From my experience: using equal values for edge and surface refinement avoids such effects.

The displacement warning:
I think the two main parameters influencing it were your MaxGlobalCell and MinTetQuality values, although there might be some (less critical) others.
SHM is pretty sensitive to high quality values in general, so my suggestion would be to start off with pretty low values to get a functional mesh and then gradually increase the mesh quality until SHM gives out warnings.
But I would ignore the displacement warnings, as long as they are only a few and your mesh looks qualitatively good.


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