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] snappyhexmesh does not remove cells (https://www.cfd-online.com/Forums/openfoam-meshing/243135-snappyhexmesh-does-not-remove-cells.html)

Ahyar May 31, 2022 09:03

snappyhexmesh does not remove cells
 
3 Attachment(s)
I want to generate mesh from this geometry that i create using freecad and its format is .obj

https://www.cfd-online.com/Forums/at...1&d=1654001880

but when i tried to generate using snappyhexmesh utility, the mesh doesn't come out as i expected, the background mesh outside the geometry still exists and are not removed by snappyhexmesh.

https://www.cfd-online.com/Forums/at...1&d=1654001888

this is my snappyHexMeshDict

Code:

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

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

castellatedMesh true;
snap            true;
addLayers      false;

geometry
{
    inlet.obj
    {
        type triSurfaceMesh;
        name inlet;
    }
    outletBawah.obj
    {
        type triSurfaceMesh;
        name outlet;
    }
    outletAtas.obj
    {
        type triSurfaceMesh;
        name outlet;
    }
    walls.obj
    {
        type triSurfaceMesh;
        name walls;
    }
}


castellatedMeshControls
{

    maxLocalCells 1000000;

    maxGlobalCells 2000000;

    minRefinementCells 0;

    nCellsBetweenLevels 2;

    maxLoadUnbalance 0.10;

    features
    (
        {
            file "inlet.eMesh";
            level 3;
        }

        {
            file "walls.eMesh";
            level 1;
        }
        {
            file "outletBawah.eMesh";
            level 0;
        }
        {
            file "outletAtas.eMesh";
            level 0;
        }
       
    );

    resolveFeatureAngle 30;

    refinementSurfaces
    {
        inlet
        {
            level (2 2);
        }
        walls
        {
            level (1 1);
        }
        outletBawah
        {
            level (0 0);
        }
        outletAtas
        {
            level (0 0);
        }
    }

    refinementRegions
    {
    }

    locationInMesh (0.0 0.0 0.0); // Inside point

    allowFreeStandingZoneFaces true;
}

// Settings for the snapping.
snapControls
{

    nSmoothPatch 3;

    tolerance 1.0;

    nSolveIter 300;

    nRelaxIter 10;

    nFeatureSnapIter 10;

    implicitFeatureSnap true;

    explicitFeatureSnap false;

    multiRegionFeatureSnap true;
}

// Settings for the layer addition.
addLayersControls
{

    relativeSizes true;

    layers
    {
    }

    expansionRatio 1.0;

    finalLayerThickness 0.3;

    minThickness 0.25;

    nGrow 0;

    featureAngle 30;

    nRelaxIter 5;

    nSmoothSurfaceNormals 1;

    nSmoothNormals 3;

    nSmoothThickness 10;

    maxFaceThicknessRatio 0.5;

    maxThicknessToMedialRatio 0.3;

    minMedianAxisAngle 90;

    nBufferCellsNoExtrude 0;

    nLayerIter 50;

    nRelaxedIter 20;
}

meshQualityControls
{
    #include "meshQualityDict"

    relaxed
    {
        maxNonOrtho 150;
    }
}

writeFlags
(
);

mergeTolerance 1E-6;


// ************************************************************************* //

, what should i change?
and below is my case

Attachment 90078

AtoHM June 2, 2022 01:00

At first look I am not sure, if thats whats happening. Maybe, rather than removing the outside part, snappy removed the inner part (hard to tell from the images). Review the position of locationInMesh. It should be inside your geometry and tell snappy what part to keep or remove. If it coincides with a face or node, it might cause confusion for snappy, try moving it well within your geomety.

Ahyar June 2, 2022 23:20

Quote:

Originally Posted by AtoHM (Post 829111)
At first look I am not sure, if thats whats happening. Maybe, rather than removing the outside part, snappy removed the inner part (hard to tell from the images). Review the position of locationInMesh. It should be inside your geometry and tell snappy what part to keep or remove. If it coincides with a face or node, it might cause confusion for snappy, try moving it well within your geomety.

yes you're right air, I've reviewed the position of locationInMesh by preview my geometry model on paraview and then i adjust the min max value of each axis using the range from the model that i viewed on paraview and it works well, thanks


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