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

[snappyHexMesh] Impossible to add layers in SnappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2019, 11:32
Default Impossible to add layers in SnappyHexMesh
  #1
New Member
 
Join Date: Mar 2019
Posts: 4
Rep Power: 7
knightwalker is on a distinguished road
Hello everyone,


I have a big problem with the function "AddLayer" in SnappyHexMesh. I tried several parameters but the layers don't appear in ParaView, even if the calculation takes them into account. I increased the number of layers, the number of iterations... but nothing work, except a very few layers (picture).



Can someone help me please ? Thank you.


Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.0                                   |
|   \\  /    A nd           | Web:      http://www.openfoam.org               |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version         2.0;
    format          ascii;
    class           dictionary;
    object          snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Which of the steps to run
castellatedMesh true;  // true;
snap            true;  // true;
addLayers    true; // true;

geometry {
    wall.stl {type triSurfaceMesh; name wall;}
    sphere3 {type searchableSphere; centre (0 0 0); radius 500;}
    sphere4 {type searchableSphere; centre (0 0 0); radius 1000;}
};

// Settings for the castellatedMesh generation.
castellatedMeshControls {
maxLocalCells 1000000;
maxGlobalCells 10000000;
minRefinementCells 5;
nCellsBetweenLevels 2; //6
refinementSurfaces {
  wall {
   level (2 3); //level (3 4)
  }
}
refinementRegions {
   sphere3 {
    mode inside;
    levels ((500 3)); 
    }
   sphere4 {
    mode inside;
    levels ((800 2)); 
    }
 }
resolveFeatureAngle 20;
locationInMesh (0 500 0);
features (
  {
    file "wall.eMesh"; level 3;
  }
);
allowFreeStandingZoneFaces false;
}

// Settings for the snapping.
snapControls {
nSmoothPatch 4;
tolerance 10;
nSolveIter 80;
nRelaxIter 8;
}

// Settings for the layer addition.
addLayersControls {
relativeSizes true;
layers{
     wall
        {
            nSurfaceLayers 8;
        }
}
expansionRatio 1.2;
finalLayerThickness 0.3;
//thickness 100;
minThickness 0.005;
nGrow 0;
featureAngle 30;
nRelaxIter 5;
nSmoothSurfaceNormals 1;
nSmoothNormals 3;
nSmoothThickness 10;
maxFaceThicknessRatio 1.0;//0.5
maxThicknessToMedialRatio 1.0;//0.3
minMedianAxisAngle 130;
nBufferCellsNoExtrude 0;
nLayerIter 50;

}

// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls {
maxNonOrtho 70;
maxBoundarySkewness 20;
maxInternalSkewness 4;
maxConcave 80;
minFlatness 0.5;
minVol -1e13;
minArea -1;
minTwist 0.05;
minDeterminant 0.001;
minFaceWeight 0.05;
minVolRatio 0.01;
minTriangleTwist -1;
nSmoothScale 4;
errorReduction 0.75;
minTetQuality 1e-30;
}

// Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;

// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1E-6;

// ************************************************************************* //

Capture du 2019-03-25 15-38-59.jpg


Capture du 2019-03-25 17-31-27.jpg
knightwalker is offline   Reply With Quote

Old   March 25, 2019, 12:01
Default
  #2
New Member
 
Join Date: Mar 2019
Posts: 4
Rep Power: 7
knightwalker is on a distinguished road
Up ^^ guys
knightwalker is offline   Reply With Quote

Old   March 26, 2019, 02:32
Default
  #3
New Member
 
Join Date: Mar 2019
Posts: 4
Rep Power: 7
knightwalker is on a distinguished road
Up the topic
knightwalker is offline   Reply With Quote

Old   March 27, 2019, 17:00
Default
  #4
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
Layers are most easily added in regions where near wall cells have an aspect ratio of unity. It looks like your near surface cells have a really large aspect ratio.
chegdan is offline   Reply With Quote

Old   March 27, 2019, 17:09
Default
  #5
New Member
 
Join Date: Mar 2019
Posts: 4
Rep Power: 7
knightwalker is on a distinguished road
Hi chegdan, you are right, I understood the problem this morning and I fixed it ! Now I have layers around all my surface ^^.
knightwalker is offline   Reply With Quote

Reply


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
[snappyHexMesh] Snappy add layers failed mqsim OpenFOAM Meshing & Mesh Conversion 1 January 24, 2021 15:02
[snappyHexMesh] snappyHexMesh not adding layers to a solid jet_engine OpenFOAM Meshing & Mesh Conversion 0 June 3, 2016 08:25
[snappyHexMesh] snappyHexMesh - layers in 3d pipe bifurcation nihil OpenFOAM Meshing & Mesh Conversion 13 April 9, 2013 08:32
[snappyHexMesh] snappyHexMesh : Layers on patches Nucleophobe OpenFOAM Meshing & Mesh Conversion 0 October 11, 2012 17:34
[snappyHexMesh] Add additional boundary layers to complex stl surface tobijingles OpenFOAM Meshing & Mesh Conversion 1 October 26, 2011 10:45


All times are GMT -4. The time now is 05:25.