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

[snappyHexMesh] snappyhexmesh does not remove cells

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2022, 09:03
Default snappyhexmesh does not remove cells
  #1
Member
 
Muhammad Ahyar
Join Date: Mar 2020
Posts: 30
Rep Power: 6
Ahyar is on a distinguished road
I want to generate mesh from this geometry that i create using freecad and its format is .obj



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.



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

tankiFlotation.zip
Attached Images
File Type: png freecad.png (49.2 KB, 24 views)
File Type: jpg paraview.jpg (88.1 KB, 25 views)
Ahyar is offline   Reply With Quote

Old   June 2, 2022, 01:00
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 643
Rep Power: 12
AtoHM is on a distinguished road
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.
AtoHM is offline   Reply With Quote

Old   June 2, 2022, 23:20
Default
  #3
Member
 
Muhammad Ahyar
Join Date: Mar 2020
Posts: 30
Rep Power: 6
Ahyar is on a distinguished road
Quote:
Originally Posted by AtoHM View Post
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
Ahyar 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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 91 December 21, 2022 04:50
chtMultiRegionFoam speed up qwertz OpenFOAM Running, Solving & CFD 8 September 18, 2021 06:16
[snappyHexMesh] snappyHexMesh stuck when snap is turned on yukuns OpenFOAM Meshing & Mesh Conversion 3 February 2, 2021 13:05
[snappyHexMesh] SnappyHexMesh for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 08:54
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 21:11


All times are GMT -4. The time now is 09:03.