CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] Chaotic sHM layering (https://www.cfd-online.com/Forums/openfoam-meshing/184779-chaotic-shm-layering.html)

badoumba March 10, 2017 15:46

Chaotic sHM layering
 
2 Attachment(s)
Hi people!

I am struggling to get my layers properly meshed in a complex geometry.

- picture a shows some weird bridges in the middle of...nothing.
- picture b shows no creation of layers at corners all even with featureAngle set to 180.

Here are my sHM settings

Code:

castellatedMeshControls
{
    maxLocalCells 10000000;
    maxGlobalCells 2000000;
    minRefinementCells 10;
    maxLoadUnbalance 0.10;
    nCellsBetweenLevels 5;

    features
    (
        {
            file "verso.eMesh";
            level 8;
        }
    );

    refinementSurfaces
    {
        verso_wall
        {
            level (6 7);
            patchInfo
            {
                type wall;
            }
        }
    }
    resolveFeatureAngle 60;


    refinementRegions
    {
        verso_wall
        {
            mode distance;
            levels ((0.1 6)(0.25 5));
        }

...
       
    }

Code:

addLayersControls
{
    relativeSizes false;
    layers
    {
        verso_wall
        {
            nSurfaceLayers 10;
        }
    }
    expansionRatio                  1.3;
    firstLayerThickness            0.0002;
    //finalLayerThickness            0.5;
    //thickness                      0.01;
   
    minThickness                    0.0002;
    nGrow                            0;

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

}

Thanks for any suggestion!

jherb March 15, 2017 17:59

Are you sure, that what you see are not artifacts of paraview? In the settings before actually reading the file, uncheck the split polyhedral setting.

me3840 March 15, 2017 20:01

I'm not really sure about the bridge, that looks odd, never seen anything like that.

However I would highly recommend these two things:
1. Use relative sizes for the prism mesh. They are much more robust.
2. Avoid changing surface sizes on a single surface - if you can force the surface to be all one size or over 2 sizes snappy has an easier time making prisms.

badoumba March 16, 2017 07:02

@jherb

I don't have the screenshot here but I double checked the view settings in paraView. Didn't change anything.

@me3840
I like to have absolute size for the layers to keep a very precise control as I am running a Low-Re simulation (the layers covering the boundary layer and the first layer according to the targeted y+)

I agree for the consistent size over a surface. cfMesh is working this way and the layers are now perfect.

KateEisenhower suggested gmsh to be even more accurate. But I have very dense stl files and the GUI of gmsh can hardly support it on my laptop.

KateEisenhower March 16, 2017 07:08

Hi all,

Just for the record, I didn't say that gmsh is more accurate than cfMesh. Only for the models I am simulating, I think it's easier to create a structured mesh with gmsh than deal with the layers in cfMesh.

Sorry if there was a misunderstanding in our PMs.

Best regards;

Kate

badoumba March 16, 2017 07:14

No problem, my apologies.


All times are GMT -4. The time now is 06:35.