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

[snappyHexMesh] Openfoam snappyhexmesh addLayersControls - non uniform layer

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 19, 2016, 15:37
Default Openfoam snappyhexmesh addLayersControls - non uniform layer
  #1
Member
 
Almond Wong
Join Date: May 2016
Posts: 68
Rep Power: 10
BakedAlmonds is on a distinguished road
Hi,

I am learning to add layers so as to improve y+ for the use of wall functions. I am using the windaroundbuildings file in the OF tutorials as a base case.
I followed this thread closely: http://www.cfd-online.com/Forums/ope...defined-2.html

I used both the feature and split angle speficied. But explicit feature snap was used instead in this case.
Quote:
Originally Posted by LVDH View Post
featureAngle 330;
slipFeatureAngle 330;
After generating sHM, the layers generated was not uniform, it is good in some areas and bad in some. I have attached a picture to show the good (circled in green) and bad (circled in red).

Can anyone explain why does this happen?
Also, what is the slipFeatureAngle used for?
Attached Images
File Type: jpg different layer qualities.jpg (161.8 KB, 96 views)
BakedAlmonds is offline   Reply With Quote

Old   July 19, 2016, 15:39
Default
  #2
Member
 
Almond Wong
Join Date: May 2016
Posts: 68
Rep Power: 10
BakedAlmonds is on a distinguished road
this is the sHMD used:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.4.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#includeEtc "caseDicts/mesh/generation/snappyHexMeshDict.cfg"

castellatedMesh true;
snap            true;
addLayers       true;

geometry
{
    buildings.obj
    {
        type triSurfaceMesh;
        name buildings;
    }

    refinementBox
    {
        type searchableBox;
        min  (  0   0   0);
        max  (250 180  90);
    }
};

castellatedMeshControls
{
    features
    (
      { file  "buildings.eMesh"; level 1; }
    );

    refinementSurfaces
    {
        buildings
        {
            level (3 3);
            patchInfo { type wall; }
        }
    }

    refinementRegions
    {
        refinementBox
        {
            mode inside;
            levels ((1E15 2));
        }
    }

    locationInMesh (1 1 1);
}

snapControls
{
    explicitFeatureSnap    true;
    implicitFeatureSnap    false;
}

addLayersControls
{
    layers
    {
        "buildings.*"
        {
            nSurfaceLayers 8;
        }
    }

    relativeSizes       false;
    expansionRatio      1.1;

    // Wanted thickness of final added cell layer. If multiple layers
    // is the
    // thickness of the layer furthest away from the wall.
    // Relative to undistorted size of cell outside layer.
    // is the thickness of the layer furthest away from the wall.
    // See relativeSizes parameter.
    // firstLayerThickness 0.05; can use first as well
    finalLayerThickness 0.3;

    // Minimum thickness of cell layer. If for any reason layer
    // cannot be above minThickness do not add layer.
    // Relative to undistorted size of cell outside layer.
    minThickness        0;
    nGrow 0; // was 1 


    // Advanced settings

    featureAngle 330; // was 70 //- When not to extrude surface. 0 is flat, 90 is right angle.
    // At non-patched sides allow mesh to slip if extrusion direction makes
    // angle larger than slipFeatureAngle.
    slipFeatureAngle 5;//fix

    nRelaxIter 3;  //- Max# of snapping relaxation iter. Should stop before upon reaching a correct mesh.
    nSmoothSurfaceNormals 1;  // Number of smoothing iterations of surface normals
    nSmoothNormals 3; // Number of smoothing iterations of interior mesh movement direction
    nSmoothThickness 10;  // Smooth layer thickness over surface patches
    maxFaceThicknessRatio 0.5; // Stop layer growth on highly warped cells
    maxThicknessToMedialRatio 0.3; // Reduce layer growth where ratio thickness to medial distance is large
    minMedianAxisAngle 130;  // Angle used to pick up medial axis points
    nBufferCellsNoExtrude 0;   // Create buffer region for new layer terminations
    nLayerIter 50; // Overall max number of layer addition iterations

}

meshQualityControls
{
}

writeFlags
(
    scalarLevels
    layerSets
    layerFields
);

mergeTolerance 1e-6;

// ************************************************************************* //
BakedAlmonds 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] Error defining boundary layer around cube snappyHexMesh crizpi21 OpenFOAM Meshing & Mesh Conversion 5 October 16, 2021 11:56
rSF: p divergence in combustor (wt negative value) zonda OpenFOAM Pre-Processing 4 April 10, 2018 07:59
Too high omega and k values in vortex flow simulation thomas. OpenFOAM Running, Solving & CFD 9 March 30, 2016 07:45
T Junction Stability ignacio OpenFOAM Running, Solving & CFD 5 May 2, 2013 11:44
errors Fahad Main CFD Forum 0 March 23, 2004 14:20


All times are GMT -4. The time now is 16:22.