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

Inflation layers in OpenFOAM

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

Like Tree1Likes
  • 1 Post By Alczem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 29, 2025, 04:50
Default Inflation layers in OpenFOAM
  #1
New Member
 
Cortex Shedding
Join Date: Jan 2025
Posts: 2
Rep Power: 0
CortexShedding is on a distinguished road
I know this question has been asked a million times but I just wanted to ask again in case there have been any new developments. I do external aerodynamics of complex geometries that need me to resolve the boundary layer and I have found it impossible to generate a satisfactory mesh with inflation layers.

I have tried snappyhexmesh which invariably collapses the inflation layers with even slightly complex curves. I have tried the approach of adding one layer at a time after the snapping step and that suffers the same fate. I have also tried modifying the meshqualitydict to make the mesh quality parameters less stringent but that leads to horrible quality meshes with negative volume cells.

I have also tried cfmesh. It is able to generate an inflation layer but the mesh quality is really bad. Also, the prism cells it generates are very thin compared to the outer mesh.

I have played around with the SHM and cfmesh parameters for a while now and I am just not able to make a good quality mesh with inflation layers.

So, the following are my questions:

1. Have there been any new developments or are there any alternate tools I could try that could help me generate a good quality mesh (preferably hex dominant) with inflation layers?

2. For those who have had success using SHM and/or cfmesh for external aerodynamics, could you tell me the parameters you used? I get that these could be case dependent, but it will help me get an idea.
CortexShedding is offline   Reply With Quote

Old   January 29, 2025, 10:17
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 809
Rep Power: 15
Tobermory will become famous soon enough
Have you checked out Joel's YT library (https://www.youtube.com/@wolfdynamicsCFD) - he has some excellent videos that walk through the SHM settings, and provide some useful hints that I hadn't come across before.
Tobermory is offline   Reply With Quote

Old   January 31, 2025, 05:02
Default
  #3
Senior Member
 
Join Date: Dec 2021
Posts: 273
Rep Power: 6
Alczem is on a distinguished road
Hey!


I personally think snappy is increasingly reliable, even with its prismatic layers although we have to be reasonable about how many layers we want don't go and try to get 25 good layers in one go. But I have found that it can create 5 layers reliably with good coverage on most geometries. Provided that the surrounding mesh is fine enough near the walls, it might be sufficient to have a decent solution in the boundary layer.


Anyway, here is my latest snappyHexMeshDict:


Code:
addLayersControls
{
    relativeSizes true;
    layers
    {    
        ".*"
        {
            nSurfaceLayers          5;
        }   
    }
    expansionRatio 1.2;
    //finalLayerThickness 0.8;
    minThickness 0.1;
    thickness    0.8;
    nGrow 0;
    featureAngle 180;
    nRelaxIter 10;
    nSmoothSurfaceNormals 2;
    nSmoothNormals 3;
    nSmoothThickness 5;
    maxFaceThicknessRatio 0.5; //0.8 to get last layer as thick as first surrounding cell
    maxThicknessToMedialRatio 0.5; //0.9 to get last layer as thick as first surrounding cell
    minMedialAxisAngle 90;
    nBufferCellsNoExtrude 0;
    nLayerIter 10;
    
    nOuterIter      5;
    
    // Do not extrude around sharp edge if not both faces are extruded.
    // Default is 0.5*featureAngle. Set to -180 always attempt extrusion
    //layerTerminationAngle -180;

    // Optional: do not extrude any point where
    // (false) : all surrounding faces are not fully extruded
    // (true) : all surrounding points are not extruded
    // Default is false.
    // detectExtrusionIsland true;
    
    
    //- Use displacementMotionSolver to shrink mesh
    meshShrinker displacementMotionSolver;

    //- Use laplacian for shrinking
    solver displacementLaplacian;

    displacementLaplacianCoeffs
    {
        diffusivity quadratic inverseDistance 1(wall);
    }
    
    
}
And the meshQQualityControls:
Code:
meshQualityControls
{

    //- Maximum non-orthogonality allowed. Set to 180 to disable.
    maxNonOrtho 70;

    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave      80;
    minVol          1e-15;
    minTetQuality   -1e15;
    minArea         1e-30; // -1;
    minTwist        0.01; // 0.05;
    minDeterminant  0.001;
    minFaceWeight   0.01; // 0.05;
    minVolRatio     0.01;
    minTriangleTwist 0.6;


    nSmoothScale   4;

    errorReduction 0.75;


}

Layers are still added to sharp corners and the mesh quality is decent enough. The big change was to set the featureAngle to 180. nOuterIter is also really nice to improve robustness.
Tobermory likes this.
Alczem is offline   Reply With Quote

Old   February 13, 2025, 02:49
Default
  #4
New Member
 
Patrick King
Join Date: Feb 2025
Posts: 1
Rep Power: 0
PatrickKing is on a distinguished road
You might try Pointwise or Ansys ICEM CFD for better inflation layers. If sticking with SHM, tweak minThickness, featureAngle, and relaxationFactor. Refining the surface mesh before snapping can also help. What specific geometry issues are you facing? My company deals with architectural renderings and CAD files, which are often too big for email. We started using Filemail, and it has been a game-changer. The transfer speed is impressive, and there’s no need to split files into multiple emails. The fact that we can send files securely is also a huge plus for handling confidential projects.

Last edited by PatrickKing; February 24, 2025 at 07:48.
PatrickKing is offline   Reply With Quote

Reply

Tags
boundary layer, cfmesh, inflation layer, meshing, snappyhexmesh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] How to specify inflation layers around a curved surface in ICEM CFD? murali666 ANSYS Meshing & Geometry 0 August 31, 2022 06:34
Inflation layers for multiphase flow Bdew8556 Main CFD Forum 0 April 27, 2022 09:27
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 16:54
[ANSYS Meshing] Inflation layers problem frossi ANSYS Meshing & Geometry 0 July 2, 2016 19:41
Fluent diverges when using inflation layers ziggo FLUENT 4 August 9, 2013 13:11


All times are GMT -4. The time now is 02:14.