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 - surface is not removed (https://www.cfd-online.com/Forums/openfoam-meshing/215438-snappyhexmesh-surface-not-removed.html)

vmb March 5, 2019 08:24

SnappyHexMesh - surface is not removed
 
Hi,


I have mesh of 25x8x0.1 m. From this mesh, I want to remove the surface dikeprofile.stl and refine around the surface.
I'm running snappyHexMesh and the refinements work fine. However, in the end, the inside of the surface dikeprofile.stl is not removed.


I checked the stl file using surfaceCheck and the stl surface seems fine.
The locationInMesh point is also located inside the part of the mesh I want to keep.

Changing the locationInMesh point does not have an effect.

Does anyone know what my mistake is? I'm using OpenFOAM version 4.
This is my snappyHexMeshDict:


Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  4.x                                  |
|  \\  /    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            false;
addLayers      false;

// Geometry. Definition of all surfaces. All surfaces are of class
// searchableSurface.

geometry
{
    dikeprofile.stl
    {
        type triSurfaceMesh;

    }

};

// Settings for the castellatedMesh generation.
castellatedMeshControls
{

    // Refinement parameters
    maxLocalCells 100000;
    maxGlobalCells 2000000;
    minRefinementCells 0;
    maxLoadUnbalance 0.10;
    nCellsBetweenLevels 1;


    // Explicit feature edge refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    features
    (
        {
            file "dikeprofile.eMesh";
            level 2;

        }
    );


    // Surface based refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~

    refinementSurfaces
    {
      dikeprofile.stl
        {
            // Surface-wise min and max refinement level
            level (2 2);

        }
    }

    // Feature angle:
    resolveFeatureAngle 30;

    //- Optional increment (on top of max level) in small gaps
    //gapLevelIncrement 2;


    // Planar angle:
    planarAngle 30;


    // Region-wise refinement
    // ~~~~~~~~~~~~~~~~~~~~~~

    refinementRegions
    {
        dikeprofile.stl
        {
            mode distance;
            levels ((0.5 8) (1.0 4) (2.0 2));
        }
    }

    // Mesh selection
    // ~~~~~~~~~~~~~~

    // After refinement patches get added for all refinementSurfaces and
    // all cells intersecting the surfaces get put into these patches. The
    // section reachable from the locationInMesh is kept.
    // NOTE: This point should never be on a face, always inside a cell, even
    // after refinement.
    locationInMesh (24.0234 7.3545 0.05);

    allowFreeStandingZoneFaces true;
}

// Settings for the snapping.
snapControls
{
    // Number of patch smoothing iterations before finding correspondence
    // to surface
    nSmoothPatch 3;
    tolerance 2.0;
    nSolveIter 30;
    nRelaxIter 5;

        nFeatureSnapIter 10;
        implicitFeatureSnap false;
        explicitFeatureSnap true;
        multiRegionFeatureSnap false;


    // wip: disable snapping to opposite near surfaces (revert to 22x behaviour)
    // detectNearSurfacesSnap false;
}

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

        expansionRatio 1.0;.
        finalLayerThickness 0.3;


    minThickness 0.25;

    layers
    {
      dikeprofile.stl
        {
            nSurfaceLayers 4;

        }
    }

    nGrow 0;

    // Advanced settings


    // Static analysis of starting mesh

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

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


    // Patch displacement

        nSmoothSurfaceNormals 1;
        nSmoothThickness 10;
        minMedialAxisAngle 90;
        maxThicknessToMedialRatio 0.3;
        nSmoothNormals 3;



    // Mesh shrinking

        slipFeatureAngle 30;
        nRelaxIter 5;
        nBufferCellsNoExtrude 0;
    nLayerIter 50;
        nRelaxedIter 20;
}

// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{

    #include "meshQualityDict"

}

mergeTolerance 1e-6;

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

Best Regards,
Vera


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