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

snappyHexMesh: No layer at the outer surfaces of the mesh

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 11, 2012, 04:16
Default snappyHexMesh: No layer at the outer surfaces of the mesh
  #1
New Member
 
Jane L
Join Date: May 2012
Posts: 21
Rep Power: 5
Jane L is on a distinguished road
Hi Foamers!

I have a -maybe simple- problem when generating a mesh of a prismatic body in snappyHexMesh. The layers are only produced in the inner part of the mesh while there are no layers on the outside boundaries of the mesh. This kind of mesh results in high values of yPlus close to the outer faces.

I created a very simple mesh of a cylinder to show that problem. I clipped the mesh twice to make the inner part visible (see attached pictures).

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

// Which of the steps to run
castellatedMesh true;
snap            true;
addLayers       true;

geometry
{
    circle.stl
    {
        type triSurfaceMesh;        name circle;
    }

};

// Settings for the castellatedMesh generation.
castellatedMeshControls
{

    // Refinement parameters

    maxLocalCells 15000000;

    maxGlobalCells 30000000;

    minRefinementCells 0;


    nCellsBetweenLevels 3;

    // Explicit feature edge refinement

    features
    (
    );

    // Surface based refinement

    refinementSurfaces
    {
        circle
        {
            level (1 1); // was (2 2) 
        }
    }

    resolveFeatureAngle 180;

    // Region-wise refinement

    refinementRegions
    {
    }

    // Mesh selection

    locationInMesh (0.45 0 0.0005);

    allowFreeStandingZoneFaces true;
}

// Settings for the snapping.
snapControls
{
    nSmoothPatch 3;

    tolerance 4.0;

    nSolveIter 30;

    nRelaxIter 5;
}



// Settings for the layer addition.
addLayersControls
{
    relativeSizes true;

    // Per final patch (so not geometry!) the layer information
    layers
    {
        "circle.*"
    {
        nSurfaceLayers 2;
    }
    }

    expansionRatio 1.25;

    finalLayerThickness 0.8;

    minThickness 0.25;

    nGrow 2;


    // Advanced settings

    featureAngle 180;
    nRelaxIter 5;
    nSmoothSurfaceNormals 1;
    nSmoothNormals 3;
    nSmoothThickness 10; 
    maxFaceThicknessRatio 0.5;
    maxThicknessToMedialRatio 0.3;
    minMedianAxisAngle 90;
    nBufferCellsNoExtrude 0;
    nLayerIter 50;
    nRelaxedIter 20;
}



// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
    maxNonOrtho 65;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave 80;
    minVol 1e-13;
    minTetQuality 1e-30;
    minArea -1;
    minTwist 0.05;
    minDeterminant 0.001;
    minFaceWeight 0.05;
    minVolRatio 0.01;
    minTriangleTwist -1;
    // Advanced
    nSmoothScale 4;
    errorReduction 0.75;
    relaxed
    {
        maxNonOrtho 75; // war nicht hier
    }

}

debug 0;
mergeTolerance 1e-6;


// ************************************************************************* //
Anybody an idea to solve this?

Thanks in advance!
Attached Images
File Type: jpg layer-outer-view.jpg (35.2 KB, 70 views)
File Type: jpg layer-inner-view.jpg (41.7 KB, 61 views)
Jane L is offline   Reply With Quote

Old   September 13, 2012, 08:38
Default
  #2
Senior Member
 
Elo´se
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 103
Rep Power: 5
Eloise is on a distinguished road
Hi,

I've never tried to insert Layers on an outer wall with sHM, but here is what I'd try:

1) in the output of blockMesh utility, you get a message in which you can read the name of your different patches such as:
Code:
----------------
Patches
----------------
  patch 0 (start: 3450365 size: 15060) name: frontAndBack
  patch 1 (start: 3465425 size: 4650) name: outlet
  patch 2 (start: 3470075 size: 4650) name: inlet
  patch 3 (start: 3474725 size: 38905) name: upperWall
  patch 4 (start: 3513630 size: 38905) name: lowerWall
2) Let's say that you want to insert VL in the patch named lowerWall, I'd then adapt the snappyHexMeshDict as follow:
Code:
 layers     {
      "circle.*"  {nSurfaceLayers 2; }
      lowerWall  {nSurfaceLayers 2;}
      }
Let me know if that works, I'm curious to know

Otherwise, I'd already create the layers in the background mesh with blockMesh.

Regards,
Elo´se
Eloise is offline   Reply With Quote

Reply

Tags
layer surface

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
Number of cells in mesh don't match with size of cellLevel colinB OpenFOAM Native Meshers: snappyHexMesh and Others 11 January 13, 2015 12:47
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
SnappyHexMesh AddLayer Control rdrr84 OpenFOAM Native Meshers: snappyHexMesh and Others 28 May 30, 2014 05:32
SnappyHexMesh Internal Flow Example (Diesel Injector) Irish09 OpenFOAM Native Meshers: snappyHexMesh and Others 23 July 15, 2013 07:45
errors Fahad Main CFD Forum 0 March 23, 2004 14:20


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