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

[snappyHexMesh] adding layers with snappyHexMesh at small curved surface

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By kreidi
  • 1 Post By edomalley1

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 23, 2018, 02:32
Default adding layers with snappyHexMesh at small curved surface
  #1
New Member
 
Diana Kreitmayer
Join Date: Oct 2018
Posts: 2
Rep Power: 0
kreidi is on a distinguished road
Hello everybody,
I'm having trouble adding layers at the edge of a helicoidal impeller with snappyHexMesh. I have tried different refinement levels and layer thickness but never get good coverage. Since the impeller edge is the region with highest velocity but worst mesh quality I would be very happy if anyone can help.
Attached Images
File Type: jpg layercoverage.jpg (90.4 KB, 137 views)
Attached Files
File Type: zip meshingFiles.zip (22.7 KB, 5 views)
Bashar likes this.
kreidi is offline   Reply With Quote

Old   November 23, 2018, 13:24
Default
  #2
Member
 
Ed O'Malley
Join Date: Nov 2017
Posts: 30
Rep Power: 8
edomalley1 is on a distinguished road
I've been working for a while now to get good layer addition on a complex geometry with lots of edges and sharp curves. Here's the layer portion of my SHMDict file. I'm now getting 97% of the layers added and I'm pretty happy with it. Two of the most important things that helped me were turning off minTetQuality by setting it to -1e30 and setting a high feature angle. 310 seemed to give me the best results, though I know many say that anything over 180 does not make a difference. Fine tuning number of layers, expansion ratio and min and final thickness helped too.

Code:
addLayersControls
{
    // Are the thickness parameters below relative to the undistorted
    // size of the refined cell outside layer (true) or absolute sizes (false).
    relativeSizes true;

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

    // Expansion factor for layer mesh
    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.
    // See relativeSizes parameter.
    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.1;

    // If points get not extruded do nGrow layers of connected faces that are
    // also not grown. This helps convergence of the layer addition process
    // close to features.
    nGrow 0;


    // Advanced settings

    // When not to extrude surface. 0 is flat surface, 90 is when two faces
    // are perpendicular
    featureAngle 310;

    // Maximum number of snapping relaxation iterations. Should stop
    // before upon reaching a correct mesh.
    nRelaxIter 40;

    // Number of smoothing iterations of surface normals
    nSmoothSurfaceNormals 20;

    // Number of smoothing iterations of interior mesh movement direction
    nSmoothNormals 30;

    // Smooth layer thickness over surface patches
    nSmoothThickness 20;

    // Stop layer growth on highly warped cells
    maxFaceThicknessRatio 0.5;

    // Reduce layer growth where ratio thickness to medial
    // distance is large
    maxThicknessToMedialRatio 0.3;

    // Angle used to pick up medial axis points
    minMedianAxisAngle 90;

    // Create buffer region for new layer terminations
    nBufferCellsNoExtrude 0;

    // Overall max number of layer addition iterations
    nLayerIter 50;
}



// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
    //- Maximum non-orthogonality allowed. Set to 180 to disable.
    maxNonOrtho 65;

    //- Max skewness allowed. Set to <0 to disable.
    maxBoundarySkewness 20;
    maxInternalSkewness 4;

    //- Max concaveness allowed. Is angle (in degrees) below which concavity
    //  is allowed. 0 is straight face, <0 would be convex face.
    //  Set to 180 to disable.
    maxConcave 80;

    //- Minimum projected area v.s. actual area. Set to -1 to disable.
    minFlatness 0.5;

    //- Minimum pyramid volume. Is absolute volume of cell pyramid.
    //  Set to a sensible fraction of the smallest cell volume expected.
    //  Set to very negative number (e.g. -1E30) to disable.
    minVol 1e-13;
    minTetQuality -1e30;

    //- Minimum face area. Set to <0 to disable.
    minArea -1;

    //- Minimum face twist. Set to <-1 to disable. dot product of face normal
    //  and face centre triangles normal
    minTwist 0.02;

    //- Minimum normalised cell determinant
    //  1 = hex, <= 0 = folded or flattened illegal cell
    minDeterminant 0.001;

    //- minFaceWeight (0 -> 0.5)
    minFaceWeight 0.02;

    //- minVolRatio (0 -> 1)
    minVolRatio 0.01;

    // must be >0 for Fluent compatibility
    minTriangleTwist -1;


    // Advanced

    //- Number of error distribution iterations
    nSmoothScale 6;
    //- Amount to scale back displacement at error points
    errorReduction 0.75;
}


// Advanced

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


// ************************************************************************* //
Bashar likes this.
edomalley1 is offline   Reply With Quote

Old   December 25, 2018, 15:09
Default
  #3
Member
 
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 10
Bashar is on a distinguished road
Quote:
Originally Posted by kreidi View Post
Hello everybody,
I'm having trouble adding layers at the edge of a helicoidal impeller with snappyHexMesh. I have tried different refinement levels and layer thickness but never get good coverage. Since the impeller edge is the region with highest velocity but worst mesh quality I would be very happy if anyone can help.
Hi,


Did you manage to solve this issue? I am facing some problems in doing BL for kaplan turbine.
Bashar is offline   Reply With Quote

Old   January 4, 2019, 15:26
Default
  #4
New Member
 
Diana Kreitmayer
Join Date: Oct 2018
Posts: 2
Rep Power: 0
kreidi is on a distinguished road
Hi,
no not yet. The tip with reducing the quality constraints kind of works, but you get a bad quality mesh that didn't work for me. I didn't take the time to test each of the quality settings individually.
I guess your having your turbine in some rotating frame (MRF/sliding mesh) and since adding layers needs cells to shrink you could try increasing the number of cells in your rotating frame, play with the size of the rotating mesh region and play with the layer thickness.
You can also try changing the mesh shrinking options just add the following in the layers section of snappyHexMeshDict:

meshShrinker displacementMotionSolver;
solver displacementLaplacian;
displacementLaplacianCoeffs
{
diffusivity quadratic inverseDistance 1(wall);
}

But still no solution. Please let me know if you find a good way to fix it.
kreidi 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] Add Mesh Layers doesnt work on the whole surface Kryo OpenFOAM Meshing & Mesh Conversion 13 February 17, 2022 07:34
multiRegionHeater error ordinary OpenFOAM Running, Solving & CFD 2 June 9, 2020 17:43
[snappyHexMesh] snappyHexMesh fails adding layers biscarri OpenFOAM Meshing & Mesh Conversion 13 March 21, 2020 12:40
[snappyHexMesh] SHM addLayers doesnt work on the small surface handicraft OpenFOAM Meshing & Mesh Conversion 4 October 5, 2018 03:50
conjugateHeatFoam + interFoam farhagim OpenFOAM Programming & Development 15 July 19, 2016 07:55


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