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

[snappyHexMesh] Layer Mesh Either Too Thin or Produces Error Cells

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 24, 2020, 17:03
Red face Layer Mesh Either Too Thin or Produces Error Cells
  #1
New Member
 
Nian
Join Date: Jun 2019
Posts: 15
Rep Power: 6
noodleluvmay is on a distinguished road
Hello,

I have been encountering some problems when it comes to adding layers to mesh, I wonder if you would be able to help. I am using version 18.10.

My problem is that a lot error cells appear when I tried to increase the layer cell thicknesses. The reason I want to do that was because I thought having a very big size/thickness difference between 2 adjacent cells might result in inaccurate results (image as attached, layers are really thin comparing to neighbouring cells).

So ideally I would want the layers to expand gradually till the thickness reaches the adjacent cell size.

As far as I understand, basically all the cells snappyHexMesh meshes are cubic cells, so it seems to be impossible to have surrounding cells to have a higher aspect ratio (flatter). And so this is also why I would like to have final layer cells to be quite thick.

But snappyHexMesh does not seem to like that, once the setting for thickness had gone past a certain value, number of erroneous cells would increase dramatically. I have tried to alter some of the other values in the control dictionary, but have not found one that seemed to be solving the issue. (Meshing error attached)

Below is my code for layering in snappyHexMesh in the dictionary:
Code:
addLayersControls
{
    // Are the thickness parameters below relative to the undistorted
    // size of the refined cell outside layer (true) or absolute sizes (false).
    relativeSizes false;

    // Per final patch (so not geometry!) the layer information
    layers
    {
        surface1
        {
            nSurfaceLayers 5;
        }
    }

    // Expansion factor for layer mesh
		expansionRatio 1.15;

		finalLayerThickness 0.0001;
		minThickness 0.00002;

    nGrow 0;
    featureAngle 130; 
    slipFeatureAngle 30;
    nRelaxIter 5;

    // Number of smoothing iterations of surface normals
    nSmoothSurfaceNormals 10;

    // Number of smoothing iterations of interior mesh movement direction
    nSmoothNormals 10;

    // Smooth layer thickness over surface patches
    nSmoothThickness 10;
    maxFaceThicknessRatio 0.5;
    maxThicknessToMedialRatio 0.3; 
    minMedianAxisAngle 80; 
    nBufferCellsNoExtrude 0;
    nLayerIter 50;
}
If anyone would have any suggestions in solving this, I would very much appreciate it! Thank you!

Nian
Attached Images
File Type: jpg thin layer mesh.JPG (179.0 KB, 30 views)
File Type: png layer mesh error.png (57.5 KB, 17 views)
noodleluvmay is offline   Reply With Quote

Old   February 25, 2020, 06:56
Default
  #2
Member
 
Join Date: Sep 2018
Location: France
Posts: 62
Rep Power: 7
john myce is on a distinguished road
Hi Nian,

In addLayers control you have a lot of combination :

Expansion ratio + finalLayerThickness
Expansion ratio + firstLayerThickness
thickness (overall) + firstLayerThickness
thickness (overall) + finalLayerThickness
Expansion ratio + thickness (overall)

maybe in your case you can try to specify the last & the overall thickness

Also by default, minThickness is set to 1% (relativeSize) to the cell near the layer. Does your absolute size verify this value (1%) ?
Cheers,
john myce is offline   Reply With Quote

Reply

Tags
layer addition, snappyhesmeshdict


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
y+ = 1 boundary layer mesh with snappyHexMesh Arzed23 OpenFOAM Running, Solving & CFD 6 November 23, 2022 15:15
[snappyHexMesh] Meshing a very thin meatus with SnappyHexMesh enginpower OpenFOAM Meshing & Mesh Conversion 29 September 9, 2017 03:46
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
[snappyHexMesh] Improving prism mesh me3840 OpenFOAM Meshing & Mesh Conversion 2 April 2, 2014 04:37
[snappyHexMesh] Layers:problem with curvature giulio.topazio OpenFOAM Meshing & Mesh Conversion 10 August 22, 2012 09:03


All times are GMT -4. The time now is 06:20.