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

[snappyHexMesh] Get rid of snap artifacts?

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

Like Tree4Likes
  • 3 Post By KTG
  • 1 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 27, 2018, 01:15
Default Get rid of snap artifacts?
  #1
KTG
Senior Member
 
Abe
Join Date: May 2016
Posts: 119
Rep Power: 9
KTG is on a distinguished road
Hi Foamers,


I am using snappyHexMesh on a very simple, repetitive geometry - essentially just an array of boxes. The snapping process causes these tetrahedral areas that sort of propagate out from the snapped geometry, as seen in the before and after photos. I have been adjusting a lot of settings in an effort to get rid of them, but it generally just moves them around and I can't really justify the changes I made. Does anyone know the mechanism behind this, and how to fix it without massive refinement? I was considering making a really complicated blockMesh to get around things, but would rather just get better at general mesh design. The mesh is for DES, so I would rather opt for layers than more refinement levels, and I think the small tetrahedra outside the boundary layers are really jacking up my Co.


Thanks
Attached Images
File Type: jpg before_snap.jpg (126.1 KB, 79 views)
File Type: jpg after_snap.jpg (129.2 KB, 84 views)
KTG is offline   Reply With Quote

Old   March 12, 2019, 05:44
Default
  #2
New Member
 
shantanu mandhane
Join Date: Jun 2018
Posts: 10
Rep Power: 7
shantanumandhane is on a distinguished road
Did you find the solution for it?
__________________
Regards!
Shantanu
shantanumandhane is offline   Reply With Quote

Old   November 1, 2019, 16:01
Default
  #3
KTG
Senior Member
 
Abe
Join Date: May 2016
Posts: 119
Rep Power: 9
KTG is on a distinguished road
Sorry for the delay - I never found a solution. CFmesh doesn't seem to have the issue, but I don't know how to use it...
KTG is offline   Reply With Quote

Old   August 16, 2021, 04:47
Default
  #4
New Member
 
Andres
Join Date: Aug 2021
Posts: 3
Rep Power: 4
andresLearns is on a distinguished road
Quote:
Originally Posted by KTG View Post
Sorry for the delay - I never found a solution. CFmesh doesn't seem to have the issue, but I don't know how to use it...

Before moving on to learning CFmesh... Has anyone found a solution for these artifacts yet?
andresLearns is offline   Reply With Quote

Old   August 16, 2021, 18:02
Default
  #5
KTG
Senior Member
 
Abe
Join Date: May 2016
Posts: 119
Rep Power: 9
KTG is on a distinguished road
So I have come to learn that these are actually not a problem. What is happening is that when you snap or add layers, it morphs the mesh around the object. So when you slice it in paraview, it will cut through different cell boundaries, because the corners of the cells are no longer at 90 degree angles. Paraview automatically triangulates things, so if you look at those cells in the spreadsheet view, they might be tetrahedral in paraview, but really are hexes in the mesh, which is confusing.



So the take home is that you don't need to worry about those artifacts. You may choose to invest your time in CFMesh for a few other reasons though...
Yann, andresLearns and oryx like this.
KTG is offline   Reply With Quote

Old   August 17, 2021, 05:03
Default
  #6
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,016
Rep Power: 25
Yann will become famous soon enough
Abe is right about the artifacts being just a representation matter in paraView.

I will just add a tip: when slicing your mesh in paraView, you can tick the "crinkle slice" option to display the whole cells in the slicing plane and get rid of the artifacts.

Cheers,
Yann
andresLearns likes this.
Yann is offline   Reply With Quote

Old   August 22, 2021, 09:25
Default
  #7
New Member
 
Andres
Join Date: Aug 2021
Posts: 3
Rep Power: 4
andresLearns is on a distinguished road
Abe, thanks a lot for the very clear explanation, it is always great to know exactly what is happening!


Yann, thanks for the additional tip, the "Crinkle slice" option really helps to visualize the issue.



Abe, about CFMesh, could you please quickly comment on its benefits over snappyHexMesh? It'd be great to get an experience-based perspective about when a given tool may be more suitable than the other.
andresLearns is offline   Reply With Quote

Old   August 23, 2021, 15:07
Default
  #8
KTG
Senior Member
 
Abe
Join Date: May 2016
Posts: 119
Rep Power: 9
KTG is on a distinguished road
Honestly, I just started using CFmesh, but it generally requires less imput from the user to make a usable mesh. It can be very difficult to get a decent mesh out of snappy, especially when it comes to layers. I am rarely successful in keeping layers from collapsing for complex geometries. Run a few of the tutorials and see what you think. You might also have a look at Gmsh. I have not learned it, but it seems like it might be the strongest option for a free and open-source mesher. I just haven't learned it yet because I have no time...


Maybe someone else with more experience can comment on the state of meshing softaware for those of us who cannot afford software...
KTG is offline   Reply With Quote

Old   August 28, 2021, 14:17
Default
  #9
New Member
 
Join Date: Aug 2021
Posts: 7
Rep Power: 4
oryx is on a distinguished road
Quote:
Originally Posted by KTG View Post
Honestly, I just started using CFmesh, but it generally requires less imput from the user to make a usable mesh. It can be very difficult to get a decent mesh out of snappy, especially when it comes to layers. I am rarely successful in keeping layers from collapsing for complex geometries. Run a few of the tutorials and see what you think. You might also have a look at Gmsh. I have not learned it, but it seems like it might be the strongest option for a free and open-source mesher. I just haven't learned it yet because I have no time...


Maybe someone else with more experience can comment on the state of meshing softaware for those of us who cannot afford software...
Hi KTG!
What about SALOME? today I was experimenting with layer generation in SALOME for a simple L-duct geometry, I've managed to create up to 50 layer , of course checkMesh complained about the aspect ratio but I was just pushing SALOME's ability to generate a decent tetrahedral mesh with lots of layers, on the other hand I was struggling to not collapse only 3 layers in a sharp corner with snappyHexMesh (while also being very slow).

Check the attached picture, a 10 layer generated using SALOME, and passed checkMesh.

Planning to check out cfMesh though!
Attached Images
File Type: jpg layers.jpg (67.6 KB, 20 views)
oryx is offline   Reply With Quote

Reply

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] Failed Edge Snap with box geometry and correct feature capture thiagomarinho OpenFOAM Meshing & Mesh Conversion 7 May 7, 2022 10:19
[snappyHexMesh] problems with sHM: it doesn't snap! Claudio87 OpenFOAM Meshing & Mesh Conversion 25 July 10, 2020 09:06
[snappyHexMesh] snappyHexMesh doesnt snap staustrahltriebwerk OpenFOAM Meshing & Mesh Conversion 47 March 18, 2018 15:19
[snappyHexMesh] snappyHexMesh failure to snap to geometry Yadasol OpenFOAM Meshing & Mesh Conversion 1 November 17, 2014 06:00
[snappyHexMesh] bad snap phase with high cell count Tensian OpenFOAM Meshing & Mesh Conversion 10 May 13, 2014 11:37


All times are GMT -4. The time now is 07:24.