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

[snappyHexMesh] 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 Search this Thread 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: 23
Rep Power: 13
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, 86 views)
File Type: jpg layer-inner-view.jpg (41.7 KB, 79 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: 113
Rep Power: 13
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 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
[snappyHexMesh] snappyHexMesh Parallel bad size error andrewpomeroy OpenFOAM Meshing & Mesh Conversion 2 April 2, 2018 01:08
SnappyHexMesh... Domain boundaries are uneven Blue8655 OpenFOAM Pre-Processing 0 January 20, 2016 11:43
[snappyHexMesh] snappyHexMesh matches wrong cells to CellZone Siegunn OpenFOAM Meshing & Mesh Conversion 4 July 31, 2015 05:10
[snappyHexMesh] SnappyHexMesh segmentation Fault nithishgupta OpenFOAM Meshing & Mesh Conversion 1 December 18, 2014 04:03
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20


All times are GMT -4. The time now is 04:58.