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

foamyHexMesh boundary layers

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

Like Tree1Likes
  • 1 Post By zordiack

Reply
 
LinkBack Thread Tools Display Modes
Old   March 3, 2014, 04:04
Default foamyHexMesh boundary layers
  #1
New Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 29
Rep Power: 4
zordiack is on a distinguished road
Hello everyone, I'm sure some of you have also started to play around with the new meshing utility foamyHexMesh. Since the documentation of this new tool is somewhat let's say vague, I thought I'd share what I have found out about it so far.

The first thing I noticed when running the tutorials that the meshes created with foamyHexMesh were not as nice as the meshes in the announcement pictures, because there were "holes" in the surface. I played around with the settings and noticed that I can get rid of the holes is I tune the following parameter in the file system/collapseDict:

Code:
collapseFacesCoeffs
{
    // The initial face length factor
    initialFaceLengthFactor                 0.2 // changed from the default 0.5;
Changing the value from 0.5 -> 0.2 for example for blob tutorial seems to fix the "holes" problem. There's also tons of other parameters to tune and I tested most of them but only changing this one helped (most likely pure luck, understanding of the inner workings is still missing).

Anyway, I'm currently trying to create a viscous boundary layer for my test case, which is a simple cylinder representing a small piece of pipe. So far I've managed to create boundary layer which is one cell size thick, by setting the parameter surfaceCellSizeCoeff in the file system/foamyHexMeshDict:

Code:
  shapeControlFunctions
    {
        blob
        {
            type                    searchableSurfaceControl;
            priority                1;
            mode                    bothSides;

            surfaceCellSizeFunction uniformValue;
            uniformValueCoeffs
            {
                surfaceCellSizeCoeff 0.5; //first surface layer cell size (relative)

            cellSizeFunction        surfaceOffsetLinearDistance;
            surfaceOffsetLinearDistanceCoeffs
                {
                distanceCellSizeCoeff 10; //ratio between surface and far field?
                surfaceOffsetCoeff   5; //distance from the surface?
                linearDistanceCoeff 5; //distance from the surface?
                }
        }
This however refines the surface cells in all directions, which is not feasible for viscous boundary layers. I'm trying to create refinement only in the surface normal direction, has anyone managed to do that yet? Also, it seems that surfaceCellSizeCoeff affect the density of whole mesh and not just the surface layer, pictures with settings 1 and 0.5 are attached.

Also, where is the utility foamyHexMeshBackGroundMesh? There seems to be source code and documentation for it, but it doesn't get compiled. I'm using the latest git 2.3.x. I'm guessing this utility is needed in order to run foamyHexMesh in parallel, so it's kind of important.

I'm inviting people to share their knowledge of this new promising meshing tool, because there is no documentation for majority of the parameters. I must say the method of foamyHexMesh mesh creation seems ingenious and I'm really looking forward to using it in real cases The mesh it creates for the test case seems nice apart from the missing boundary layers.

PS: Does anyone know the meaning of these in the file system/foamyHexMeshDict:

Code:
backgroundMeshDecomposition
{
    minLevels           0;
    sampleResolution    4;
    spanScale           20;
    maxCellWeightCoeff  20;
}
Attached Images
File Type: jpg foamyhexmesh1.jpg (60.8 KB, 218 views)
File Type: jpg foamyhexmesh2.jpg (64.1 KB, 196 views)
cutter likes this.

Last edited by zordiack; March 3, 2014 at 04:53. Reason: added another picture
zordiack is offline   Reply With Quote

Old   March 3, 2014, 05:09
Default
  #2
New Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 29
Rep Power: 4
zordiack is on a distinguished road
And just now I found these.. I'll post a solution to create boundary layers if I manage to find one.

EDIT, no additional information about the use of surface cellSizeFunctions :/

https://github.com/OpenFOAM/OpenFOAM...amyHexMeshDict

https://github.com/OpenFOAM/OpenFOAM...s/collapseDict
zordiack is offline   Reply With Quote

Old   March 6, 2014, 08:57
Default
  #3
New Member
 
Zeliang Xu
Join Date: Apr 2013
Posts: 5
Rep Power: 3
douglasx is on a distinguished road
Hi Pekka,

Thank you for sharing your experience with foamyHexMesh. I am also new to this new meshing utility and I have been playing around with it. The thing that bothers me the most right now is how does it generate background mesh around geometry? I see there is blockMeshDict file defined, but I do not see where it is displayed, cause the result from meshing is only the geometry surface.

Currently I am trying to do something similar to mixerVessel case to build a bounding box to my ship hull, and I am not sure if this is the right thing to do.
Do you have any idea how this can be done? Any idea will be appreciated.

Thank you very much!

Zeliang
douglasx is offline   Reply With Quote

Old   March 7, 2014, 04:00
Default
  #4
New Member
 
Quentin Coispeau
Join Date: Nov 2013
Posts: 15
Rep Power: 2
Quentin is on a distinguished road
Hi douglasx,

foamyHexMesh only mesh closed geometry

"The main limitation of foamyHexMesh, particularly compared to snappyHexMesh, is that it is a requirement that surface geometry is perfectly closed" on the 2.3.0 release, s you need to construc your block outside. You will find some piece of information here on how to do it with blender.
Quentin is offline   Reply With Quote

Old   March 7, 2014, 08:41
Default
  #5
New Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 29
Rep Power: 4
zordiack is on a distinguished road
Well, the I think the background mesh should be constructed using the application foamyHexMeshBackgroundMesh, which is not ready yet. I've filed a bug report about it here. It's intentionally commented out in the makefile, so I'm guessing it's not quite ready yet. The tutorials have background meshes already in place and that's why they are working in parallel.

Regarding the first post I made, I did some test runs with the meshes and I have to say they didn't quite work. There are some bad polygons in the mesh and if I leave the "holes" they generate errors in the flow field so they really are holes in the mesh and not just errors in ParaView, even pushing initialFaceLengthFactor to 0.1 didn't solve all the problems.

As for the boundary layer problem, I haven't figured out a way to generate refinement only in the wall normal direction with foamyHexMesh. Refinement in all directions is possible though. Boundary layers could be generated with refineWallLayer, but I'm sceptical about it's abilities with difficult geometries.

I guess we all have to wait for better documentation and improvements, I still think that foamyHexMesh is going to kick ass in the future
zordiack is offline   Reply With Quote

Old   March 7, 2014, 09:07
Default
  #6
New Member
 
Zeliang Xu
Join Date: Apr 2013
Posts: 5
Rep Power: 3
douglasx is on a distinguished road
Hi Quentin,

Thank you very much for your kind reply. Yes now I am using a box geometry to bound my ship hull and the meshing part works, but the mesh quality is not very high. I guess I will need to look more into the mesh quality controls to try to improve the quality.

Zeliang
douglasx is offline   Reply With Quote

Old   March 7, 2014, 09:18
Default
  #7
New Member
 
Zeliang Xu
Join Date: Apr 2013
Posts: 5
Rep Power: 3
douglasx is on a distinguished road
Hi Pekka,

Thank you for the reply. I was also wondering what openfoam is doing with foamyHexMeshBackgroundMesh because it is not even visible in paraview and changing blockMeshDict does not seem to change anything.

I also believe foamyHexMesh is really promising yet we will have to wait for it to be completed.

Zeliang
douglasx is offline   Reply With Quote

Old   March 7, 2014, 09:28
Default
  #8
New Member
 
Quentin Coispeau
Join Date: Nov 2013
Posts: 15
Rep Power: 2
Quentin is on a distinguished road
I'm also working on ship hull and begin to get reasonnably good result with snappyHexMesh, except for the boundary layer part in which i'm still working (but makig progress). The main problem i encounter is that for water the first cell height should be very thin even for y+ = 30+ (10^-5 to 10^-4 m) and Snappy don't like that. I just gave a small look at foamyHexMesh and I find nothing which would be a boundary layer subdict.

the utility refineWallBoundary give me a very good visually result but create strongly non-ortho cells ( up to 179 ) from an original mesh with maxOrtho = 65, and I'm trying to smooth the mesh created with refineWallBoundary (presently by running again the snapping part of snappyHexMesh) but maybe there is an other utility made to "clean" a mesh" ?
Quentin is offline   Reply With Quote

Old   March 11, 2014, 17:20
Default
  #9
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 64
Rep Power: 4
laurent98 is on a distinguished road
Hi Foamers,
could it be that Boundary layers are not need anymore???

@quentin, i found that BL with SHM are not add were the surface .stl are not smooth enough , for example, if very small long triangles (quality close to 0),make big angle >120deg . the application surfaceFeatureExtract detect them...
so i try to use surfaceClean but it crash often (triangle equilateral quality=1)
i would like to make stl file like the DTCHull in multiphase/LTSInterFoam tutorial.
hope this help LL
laurent98 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
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 04:05
[ICEM] Problem with boundary layers for cylinder in channel nik ANSYS Meshing & Geometry 0 October 27, 2009 07:01
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 15:55
Boundary layers problem carlos ortiz FLUENT 0 September 20, 2004 20:55


All times are GMT -4. The time now is 10:18.