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

[snappyHexMesh] Need help to improve my snappyHexMesh mesh

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 6, 2014, 05:10
Default Need help to improve my snappyHexMesh mesh
  #1
Member
 
amine
Join Date: Jan 2014
Location: FRANCE
Posts: 84
Rep Power: 12
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, 82 views)
File Type: jpg mesh4.jpg (31.5 KB, 69 views)
File Type: jpg mesh5.jpg (51.9 KB, 70 views)
File Type: jpg mesh6.jpg (23.1 KB, 65 views)
File Type: jpg mesh7.jpg (26.6 KB, 60 views)
aminem is offline   Reply With Quote

Old   October 8, 2014, 04:47
Default
  #2
Member
 
amine
Join Date: Jan 2014
Location: FRANCE
Posts: 84
Rep Power: 12
aminem is on a distinguished road
Any ideas???
aminem is offline   Reply With Quote

Old   October 11, 2014, 10:59
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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 Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Creating very fine, high accuracy mesh with snappyHexMesh JD_Welch OpenFOAM Meshing & Mesh Conversion 10 July 5, 2023 12:50
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell Arman_N OpenFOAM Meshing & Mesh Conversion 1 May 20, 2019 18:16
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! divergence OpenFOAM Meshing & Mesh Conversion 0 January 23, 2019 05:17
[snappyHexMesh] Snappyhex mesh: poor inlet mesh Swagga5aur OpenFOAM Meshing & Mesh Conversion 1 December 3, 2016 17:59
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 04:52


All times are GMT -4. The time now is 10:20.