|
[Sponsors] |
[snappyHexMesh] Cannot snap correctly to a sphere |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Senior Member
Join Date: Jul 2013
Posts: 124
Rep Power: 13 ![]() |
Hi all,
I am trying to use snappyHexMesh to mesh a volume full of spheres, where resolution is important, but I am stuck because the snapping step does not accurately snap to my spherical stl file, which is effectively very smooth. You can see the results of the snapping step attached. I have tried changing all of the snapping parameters, and no matter what, I get basically the same result, even with huge numbers of iterations. I need better fidelity to the STL than this. Please help! |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Jul 2013
Posts: 124
Rep Power: 13 ![]() |
Update: I have used dozens of different combinations of snapping parameters, and the outcome is almost always nearly indistinguishable. I have used implicit feature snapping, explicit feature snapping, low numbers of iterations, high numbers of iterations, low tolerance value, high tolerance value. In every case the results are practically the same! See attached. Please help, I cannot improve the smoothness of this snapping by any means! The STL surface is far smoother than this mesh.
|
|
![]() |
![]() |
![]() |
![]() |
#3 | |
Senior Member
|
Quote:
A standard tutorial "iglooWithFridges" uses a sphere region with smoother mesh. Have you checked the tutorial? Sharing the simplified case directory will help users to understand your problem. |
||
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Join Date: Jul 2013
Posts: 124
Rep Power: 13 ![]() |
Thanks for the message, I have attached a simplified case. The problem is this, if I use snappyHexMesh to mesh ONLY the inside of the sphere, I get a very nice, smooth looking sphere, as seen in the first image. This can be generated with the attached test case by running:
blockMesh snappyHexMesh -overwrite paraFoam However, what I am really interested in is a multi-region mesh of the inside and outside of the sphere. In this case, with exactly the same problem setup, the results appear as the second attached sphere, with clearly a less smooth surface. This can be generated with the attached case by: First edit the snappyHexMeshDict to uncomment the lines: faceZone fuelFaces; cellZone fuelZone; cellZoneInside inside; This seems to trigger snappyHexMesh to recognize the problem as a multi-region simulation. Then run: blockMesh snappyHexMesh -overwrite splitMeshRegions -cellZones -overwrite paraFoam -touchAll Finally, use paraview to open the meshingTest{fuelZone}.OpenFOAM file. Somehow, with exactly the same snapping parameters and geometry files, the snapping does not work as well for a multi-region case. Please help! |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
|
Hi,
The problem is clear, now. Thank you for the test case. The snapping problem is on the internal face, not the boundary. When we put an additional setting about faceZone, mesh is smoother. I hope that this does not cause a side effect for multi-region setup. Code:
refinementSurfaces { sphere { level (2 2); faceZone fuelFaces; cellZone fuelZone; cellZoneInside inside; //- Optional specification of what to do with faceZone faces: // internal : keep them as internal faces (default) // baffle : create baffles from them. This gives more // freedom in mesh motion // boundary : create free-standing boundary faces (baffles // but without the shared points) faceType boundary; // internal = default, baffle, boundary } } |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Join Date: Jul 2013
Posts: 124
Rep Power: 13 ![]() |
Hi,
Thanks for the message, I wasn't aware of this option. Indeed it does seem to improve the smoothness of the sphere, however, I am worried that this hurts the conformal matching of the cells between the different regions. When I examine the multi-region mesh using this approach, it seems like the cells of the two regions no longer match exactly conformally. Do you know if this is the case? I am not really familiar with the use of baffles. Thanks again! |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Member
Thomas Sprich
Join Date: Mar 2015
Posts: 76
Rep Power: 11 ![]() |
Hi,
Using Code:
facetype baffles This doesn't fix the smoothness however. To try fix smoothness change Code:
maxNonOrtho 80; Good luck. Regards, Thomas |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
Join Date: Jul 2013
Posts: 124
Rep Power: 13 ![]() |
Hi Thomas,
Thank you so much for the reply. Could you please clarify one point for me? If I use facetype baffles, I can get a nice smooth surface with maxNonOrtho 65, so with facetype internal, why do I need to increase maxNonOrtho? Thanks again |
|
![]() |
![]() |
![]() |
![]() |
#10 |
Member
Thomas Sprich
Join Date: Mar 2015
Posts: 76
Rep Power: 11 ![]() |
Hi,
Its a good question that I also thought of only once I had answered. I suspect that it has to do with how the mesh quality is calculated at boundaries against cells that have adjacent cells. My (very limited) understanding is that non-orthogonality is the angle between a line joining cell centers and a face normal. Cells at the boundary, as in the external sphere case, have no adjacent cells whereas when calculating the internal sphere, the same cells would have adjacent cells. You would have to investigate how non-orthogonality is calculated at the boundary. But if non-orthogonality is ignored at the boundary this would explain why it was possible to mesh the external sphere with low non-orthogonality limits. As I said, my understanding of this is limited, so take that for what its worth. Thomas |
|
![]() |
![]() |
![]() |
Tags |
snapping, snappyhexmesh, sphere |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] The snappyMultiRegionHeater tutorial does not snap correctly | wildfire230 | OpenFOAM Meshing & Mesh Conversion | 2 | May 10, 2019 06:19 |
[Other] How to correctly mesh a spherical domain with an .stl objet in it ? | TerenceA | OpenFOAM Meshing & Mesh Conversion | 3 | September 14, 2017 09:00 |
[snappyHexMesh] Sphere in a channel by snappyHexMesh | arsalan.dryi | OpenFOAM Meshing & Mesh Conversion | 0 | November 14, 2016 16:01 |
[ICEM] meshing a sphere - large deviation from perfect sphere | murx | ANSYS Meshing & Geometry | 25 | August 15, 2012 12:37 |
meshing F1 front wing | Steve | FLUENT | 0 | April 17, 2003 12:37 |