|
[Sponsors] |
[snappyHexMesh] Little troubles with the nFeatureSnapIter |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 12, 2012, 06:27 |
Little troubles with the nFeatureSnapIter
|
#1 |
New Member
Join Date: Mar 2009
Posts: 29
Rep Power: 17 |
Hi everyone,
When using snappyHexMesh, I try to increase the nFeatureSnapIter parameter. But if I set nFeatureSnapIter to 10 (for example), the snapping phase gives up most of the time after around 8 iterations (often because of one cell staying out of the quality criteria). This results in poor surface and feature lines quality. Did one of you manage to increase the nFeatureSnapIter parameter without giving up the snapping ? Thanks, Ayoros |
|
March 11, 2014, 12:39 |
|
#2 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
OK this is an old question, but if someone is still interested I 'd like to share my trial and error way to handle the snapping. I work with dirty .stl surfaces from laser-scanned mountain torrents with hole filling in meshLab. But still the .stl surface is not always waterproof so I have to work with mode distance in refinementRegions, and I have to take care of the memory use of SHM.
I do a three stepp procedure. First I refine my mesh, then copy the refined mesh into the constant/polmesh folder and run a second slightly different snappyHexMeshDict for snapping. Finally I delete cells that have bad quality. The first snappyHexMesh used for refinement has the settings addLayers false and doLayers false but castellatedMesh and snap true. At castellatedMeshControls I put as much maxGlobalCells as memory may handle. To get sufficient cell refinements close to the .stl surface I use nCellsBetweenLevels 1, so the mesh gets rapidly finer. Then I use refinementSurfaces { 'nameOfSTL' { level (2 3); faceZone 'nameOfSTL'; faceType baffle; } } and refinementRegions { 'nameOfSTL' { mode distance; levels (('fineRefinementDistanceInMeters' 2) ('coarseRefinementDistanceInMeters' 3)); } } After snappyHexMesh has finished, I take the mesh from the last timeFolder and paste it into constant/polymesh. Then I delete the empty zone files and in the file boundary the empty master and slave boundaries, and adjust the number of boundaries at the beginning of the boundary file. Now I change the snappyHexMeshDict and use refinementSurfaces { 'nameOfSTL' { level (2 3); } } Within the snapControls I use implicitFeatureSnap true, and I use nFeatureSnapIter 20 but look at the progress at which morph iteration the snapping fails. Dependent on the failure I eighther reduce the settings at meshQualityControls or reduce the nFeatureSnapIter to an interation that was still OK. Increasing nRelaxIter, nSmoothScale and sometimes errorReduction can help here to let snappyHexMesh try longer to move the mesh within each morph iteration. Finally I use the setSet and subsetMesh cellsToDelete -overwrite approach to yust turn bad cells into boundaries as described in the master thesis of Alexander Ivchenko "Incorporation of OpenFOAM software into Computational Fluid Dynamics process in Volvo Technology", (I think someone really helpful posted a link to the thesis here on the Forum before), but this only works as long as your mesh does not get subdivided in unreachable sections. Last edited by vonboett; March 12, 2014 at 07:03. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Some troubles about TestCases | codezy | SU2 | 2 | March 26, 2014 05:10 |
Having troubles in understanding the correction term in pressure equation | kaifu | OpenFOAM | 1 | October 8, 2012 06:19 |
Install troubles on fedora | yoshimitsuspeed | OpenFOAM | 1 | July 20, 2011 03:49 |
Interface troubles | Samu | CFX | 2 | December 8, 2009 03:38 |
some video troubles... | giosue | Siemens | 2 | February 19, 2003 11:03 |