CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] SnappyHexMesh Displacement at mesh point...points through the surrounding patch faces

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 2 Post By pbalz
  • 1 Post By pizzaspinate
  • 2 Post By pbalz
  • 1 Post By pbalz

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 3, 2015, 05:52
Default SnappyHexMesh Displacement at mesh point...points through the surrounding patch faces
  #1
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
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
Attached Images
File Type: jpg Screenshot from 2015-01-22 10:34:25.jpg (42.8 KB, 386 views)
pizzaspinate is offline   Reply With Quote

Old   March 4, 2015, 11:45
Default
  #2
Member
 
Pascal Balz
Join Date: Feb 2015
Location: Germany
Posts: 44
Rep Power: 11
pbalz is on a distinguished road
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
Binglian Hu and SimonStar like this.
pbalz is offline   Reply With Quote

Old   March 4, 2015, 12:07
Default
  #3
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
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.
Attached Images
File Type: jpg 1.jpg (82.5 KB, 652 views)
File Type: jpg 2.jpg (81.3 KB, 578 views)
File Type: jpg 3.jpg (70.1 KB, 586 views)
Attached Files
File Type: txt snappyHexMeshDict.txt (13.8 KB, 123 views)
File Type: txt blockMeshDict.txt (6.7 KB, 42 views)
mapp98 likes this.
pizzaspinate is offline   Reply With Quote

Old   March 4, 2015, 12:42
Default
  #4
Member
 
Pascal Balz
Join Date: Feb 2015
Location: Germany
Posts: 44
Rep Power: 11
pbalz is on a distinguished road
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
pbalz is offline   Reply With Quote

Old   March 4, 2015, 13:12
Default
  #5
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
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!
pizzaspinate is offline   Reply With Quote

Old   March 4, 2015, 14:34
Default
  #6
Member
 
Pascal Balz
Join Date: Feb 2015
Location: Germany
Posts: 44
Rep Power: 11
pbalz is on a distinguished road
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
pbalz is offline   Reply With Quote

Old   March 4, 2015, 14:45
Default
  #7
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
ok thats strange. I will send you an email
pizzaspinate is offline   Reply With Quote

Old   March 4, 2015, 14:51
Default
  #8
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
I have sent it to you via WeTransfer because the file is too big for an email
pizzaspinate is offline   Reply With Quote

Old   March 6, 2015, 03:13
Default
  #9
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
Hi,
I have compressed them separately here. Hope it works and you can help out.
Thanks a lot again!
Attached Files
File Type: gz UCAV.stl.tar.gz (45.4 KB, 17 views)
File Type: gz blockMeshDict.tar.gz (1.6 KB, 20 views)
File Type: gz system.tar.gz (14.9 KB, 41 views)
pizzaspinate is offline   Reply With Quote

Old   March 6, 2015, 13:11
Default
  #10
Member
 
Pascal Balz
Join Date: Feb 2015
Location: Germany
Posts: 44
Rep Power: 11
pbalz is on a distinguished road
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.
pbalz is offline   Reply With Quote

Old   March 7, 2015, 03:55
Default
  #11
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
Hi,

cool, thank you :-) Tried to solve it myself by chnging some shm parameters but without success so far :-/
pizzaspinate is offline   Reply With Quote

Old   March 7, 2015, 08:08
Default
  #12
Member
 
Pascal Balz
Join Date: Feb 2015
Location: Germany
Posts: 44
Rep Power: 11
pbalz is on a distinguished road
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
pbalz is offline   Reply With Quote

Old   March 7, 2015, 10:22
Default
  #13
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
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!!!
pizzaspinate is offline   Reply With Quote

Old   March 7, 2015, 11:55
Default
  #14
Member
 
Pascal Balz
Join Date: Feb 2015
Location: Germany
Posts: 44
Rep Power: 11
pbalz is on a distinguished road
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
Attached Images
File Type: jpg boundaryLayers.jpg (71.8 KB, 444 views)
File Type: jpg ProblemCells.jpg (90.3 KB, 381 views)
Attached Files
File Type: gz Wing-3D.tar.gz (50.5 KB, 136 views)
Dipsomaniac and Binglian Hu like this.
pbalz is offline   Reply With Quote

Old   March 9, 2015, 08:45
Default
  #15
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
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 is offline   Reply With Quote

Old   March 9, 2015, 12:17
Default
  #16
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
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?
pizzaspinate is offline   Reply With Quote

Old   March 9, 2015, 14:52
Default
  #17
Member
 
Pascal Balz
Join Date: Feb 2015
Location: Germany
Posts: 44
Rep Power: 11
pbalz is on a distinguished road
Quote:
Originally Posted by pizzaspinate View Post
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.
Binglian Hu likes this.
__________________
Regards,
Pascal
pbalz is offline   Reply With Quote

Reply


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] SHM Layer Addition Phase dickcruz OpenFOAM Meshing & Mesh Conversion 4 November 1, 2018 08:05
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
[OpenFOAM.org] OF2.3.1 + OS13.2 - Trying to use the dummy Pstream library aylalisa OpenFOAM Installation 23 June 15, 2015 15:49
SigFpe when running ANY application in parallel Pj. OpenFOAM Running, Solving & CFD 3 April 23, 2015 15:53
[snappyHexMesh] determining displacement for added points CFDnewbie147 OpenFOAM Meshing & Mesh Conversion 1 October 22, 2013 10:53


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