CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

Little troubles with the nFeatureSnapIter

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 12, 2012, 05:27
Default Little troubles with the nFeatureSnapIter
  #1
New Member
 
Join Date: Mar 2009
Posts: 26
Rep Power: 8
ayoros is on a distinguished road
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
ayoros is offline   Reply With Quote

Old   March 11, 2014, 12:39
Default
  #2
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 178
Rep Power: 6
vonboett is on a distinguished road
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.
vonboett is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having troubles in understanding the correction term in pressure equation kaifu OpenFOAM 1 October 8, 2012 05:19
Install troubles on fedora yoshimitsuspeed OpenFOAM 1 July 20, 2011 02:49
Interface troubles Samu CFX 2 December 8, 2009 03:38
some video troubles... giosue CD-adapco 2 February 19, 2003 11:03
Troubles modelling flow through a grid Hans Klaufus CFX 1 June 28, 2000 16:43


All times are GMT -4. The time now is 17:21.