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

Need help to improve my snappyHexMesh mesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 6, 2014, 04:10
Default Need help to improve my snappyHexMesh mesh
  #1
Member
 
amine
Join Date: Jan 2014
Location: FRANCE
Posts: 72
Rep Power: 4
aminem is on a distinguished road
Hi
I created mesh with snappyHexMesh but I have some
problem to have good mesh (see picture). Can anyone help me to ameliorate my mesh.
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

FoamFile
{
    version 2.0;
    format ascii;
    class dictionary;
    location system;
    object snappyHexMeshDict;
}

    castellatedMesh true;
    snap true;
    addLayers true;
    geometry
    {
        cuve1.stl
        {
            type triSurfaceMesh;
            name cuve1;
        }

        cuve2.stl
        {
            type triSurfaceMesh;
            name cuve2;
        }

        cuve3.stl
        {
            type triSurfaceMesh;
            name cuve3;
        }

        P3.stl
        {
            type triSurfaceMesh;
            name P3;
        }

        P4.stl
        {
            type triSurfaceMesh;
            name P4;
        }

        shaft.stl
        {
            type triSurfaceMesh;
            name shaft;
        }

        P4MRF
        {
            type searchableCylinder;
            point1 ( 0.0 -0.0035 0.0 );
            point2 ( 0.0 0.0465 0.0 );
            radius 0.05;
        }

        P3MRF
        {
            type searchableCylinder;
            point1 ( 0.0 0.135 0.0 );
            point2 ( 0.0 0.185 0.0 );
            radius 0.05;
        }

    }

    castellatedMeshControls
    {
        features
        (
        );
        refinementSurfaces
        {
            cuve1
            {
                level ( 0 0 );
            }

            cuve2
            {
                level ( 0 0);
            }

            cuve3
            {
                level ( 0 0 );
            }

            P3
            {
                level ( 0 2 );
            }

            P4
            {
                level ( 0 2 );
            }

            shaft
            {
                level ( 0 2 );
            }

            P4MRF
            {
                faceType internal;
                faceZone MRFP4;
                cellZoneInside inside;
                cellZone MRFP4;
                level ( 0 0 );
            }

            P3MRF
            {
                faceType internal;
                faceZone MRFP3;
                cellZoneInside inside;
                cellZone MRFP3;
                level ( 0 0 );
            }

        }

        refinementRegions
        {
            P4MRF
            {
                mode inside;
                levels (( 1E5 2 ));
            }

            P3MRF
            {
                mode inside;
                levels (( 1E5 2 ));
            }

        }

        locationInMesh ( 0.0 0.0 0.05 );
        maxLocalCells 100000;
        maxGlobalCells 2000000;
        minRefinementCells 0;
        nCellsBetweenLevels 1;
        resolveFeatureAngle 30;
        allowFreeStandingZoneFaces true;
        planarAngle 30;
        maxLoadUnbalance 0.10;
    }

    snapControls
    {
        nSolveIter 30;
        nSmoothPatch 3;
        tolerance 2.0;
        nRelaxIter 5;
        nFeatureSnapIter 10;
        implicitFeatureSnap true;
        explicitFeatureSnap true;
        multiRegionFeatureSnap true;
    }

    addLayersControls
    {
        layers
        {
            cuve2
            {
                nSurfaceLayers 3;
            }

            cuve3
            {
                nSurfaceLayers 3;
            }

            P3
            {
                nSurfaceLayers 3;
            }

            P4
            {
                nSurfaceLayers 3;
            }

            shaft
            {
                nSurfaceLayers 3;
            }

        }

        relativeSizes true;
        expansionRatio 1.2;
        finalLayerThickness 0.3;
        minThickness 0.25;
        nGrow 0;
        featureAngle 130;
        slipFeatureAngle 30;
        nRelaxIter 5;
        nSmoothSurfaceNormals 1;
        nSmoothNormals 3;
        nSmoothThickness 10;
        maxFaceThicknessRatio 0.5;
        maxThicknessToMedialRatio 0.3;
        minMedianAxisAngle 90;
        nBufferCellsNoExtrude 0;
        nLayerIter 50;
        nRelaxedIter 20;
        writeVTK false;
        noErrors false;
        layerRecovery 1;
        growZoneLayers false;
        projectGrownUp 0.0;
    }

    meshQualityControls
    {
        maxNonOrtho 65;
        maxBoundarySkewness 20;
        maxInternalSkewness 4;
        maxConcave 80;
        minFlatness 0.5;
        minVol 1.00E-13;
        minTetQuality 1e-15;
        minArea -1;
        minTwist 0.02;
        minDeterminant 0.001;
        minFaceWeight 0.05;
        minVolRatio 0.01;
        minTriangleTwist -1;
        nSmoothScale 4;
        errorReduction 0.75;
    }

    debug 0;
    mergeTolerance 1E-6;
    autoBlockMesh true;
Thanks
Attached Images
File Type: jpg mesh1.jpg (37.3 KB, 39 views)
File Type: jpg mesh4.jpg (31.5 KB, 34 views)
File Type: jpg mesh5.jpg (51.9 KB, 35 views)
File Type: jpg mesh6.jpg (23.1 KB, 33 views)
File Type: jpg mesh7.jpg (26.6 KB, 35 views)
aminem is online now   Reply With Quote

Old   October 8, 2014, 03:47
Default
  #2
Member
 
amine
Join Date: Jan 2014
Location: FRANCE
Posts: 72
Rep Power: 4
aminem is on a distinguished road
Any ideas???
aminem is online now   Reply With Quote

Old   October 11, 2014, 09:59
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,531
Blog Entries: 39
Rep Power: 97
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings aminem,

You could have been a bit more specific regarding what exactly you want to improve. Either way, the one thing I say that needs work is related to this dictionary block:
Code:
        features
        (
        );
You're missing feature edges, therefore the edges are not snapped into place.

You can find a lot of reading material on this and other topics regarding snappyHexMesh, meshing strategies and visual diagnosis in this wiki page: http://openfoamwiki.net/index.php/SnappyHexMesh

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
snappyHexMesh Boundary Layer at Corner panpanzhong OpenFOAM Native Meshers: snappyHexMesh and Others 4 October 27, 2014 05:31
[ICEM] Generating Mesh for STL Car in Windtunnel Simulation tommymoose ANSYS Meshing & Geometry 48 April 15, 2013 04:24
Layers:problem with curvature giulio.topazio OpenFOAM Native Meshers: snappyHexMesh and Others 10 August 22, 2012 09:03
2D Mesh Generation Tutorial for GMSH aeroslacker Open Source Meshers: Gmsh, Netgen, CGNS, ... 12 January 19, 2012 04:52
external flow with snappyHexMesh chelvistero OpenFOAM 11 January 15, 2010 20:43


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