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

[snappyHexMesh] snappyHexMesh, complex geometry

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2012, 12:47
Default snappyHexMesh, complex geometry
  #1
New Member
 
Romain
Join Date: Jun 2010
Location: Lyon
Posts: 28
Rep Power: 16
nakor is on a distinguished road
Hello,
since a few days I was using snappyHexMesh without any problem, but since I tried to switch to a more complex geometry it is not working anymore. I have an error when I use splitMeshRegion -cellZonesOnly.

My error is the following one :
Code:
--> FOAM FATAL ERROR: 
Face 20096 fc:(-0.0031125 -0.0015 -0.027975) in zone solid1 is in patch air_out and in patch solid1
If I check in my geometry, this point should be inside of the cell zone Air_out.

I do not understand how a cell could be outside a cell zone since the air outside of the other solids is obtained by cutting all of the solid from a box which is of the domain of calculation size.
If I do not use the option cellZonesOnly, I something like 500 domains, which is not acceptable.

I use the Allrun from snappyMultiRegionHeater
Code:
runApplication blockMesh

runApplication surfaceFeatureExtract -includedAngle 150 constant/triSurface/Region1.stl Region1
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.Region
runApplication surfaceFeatureExtract -includedAngle 150 constant/triSurface/Region2.stl Region2
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.Region2
runApplication surfaceFeatureExtract -includedAngle 150 constant/triSurface/Region3.stl Region3
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.Region3
runApplication surfaceFeatureExtract -includedAngle 150 constant/triSurface/Region4.stl Region4
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.Region4


runApplication snappyHexMesh -overwrite
runApplication splitMeshRegions -cellZonesOnly -overwrite
and the following snappyHexMeshDict
Code:
FoamFile
{
    version 2.0;
    format ascii;
    class dictionary;
    location system;
    object snappyHexMeshDict;
}

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

        Region2.stl
        {
            type triSurfaceMesh;
            name Region2;
        }

        Region3.stl
        {
            type triSurfaceMesh;
            name Region3;
        }

        Region4.stl
        {
            type triSurfaceMesh;
            name Region4;
        }

        

    }

    castellatedMeshControls
    {
        features (
    {
            file "Region1.eMesh";
            level 1;
        }
        {
            file "Region2.eMesh";
            level 1;
        }
        {
            file "Region3.eMesh";
            level 1;
        }
        {
            file "Region4.eMesh";
            level 1;
        }
        
	{
            file "air_out.eMesh";
            level 1;
        }
);
        refinementSurfaces
        {
            Region1
            {
                cellZoneInside inside;
                cellZone Region1;
                level (3 3 );
                faceZone Region1;
            }
 		air_out
            {
                cellZoneInside inside;
                cellZone air_out;
                level (1 1 );
                faceZone air_out;
            }

            Region2
            {
                level (3 3 );
                cellZoneInside inside;
                cellZone Region2;
                faceZone Region3;
            }

            Region3
            {
                level (3 3 );
                cellZoneInside inside;
                cellZone Region3;
                faceZone Region3;
            }

            Region4
            {
                cellZoneInside Region4;
                cellZone Region4;
                level (1 1 );
                faceZone Region4;
            }

          

        }

        refinementRegions
        {
        }

        locationInMesh (0 0 0);
        maxLocalCells 10000000;
        maxGlobalCells 20000000;
        minRefinementCells 1;
        nCellsBetweenLevels 2;
        resolveFeatureAngle 30;
        allowFreeStandingZoneFaces false;
    }

    snapControls
    {
        nSolveIter 30;
        nSmoothPatch 3;
        tolerance 4.0;
        nRelaxIter 5;
        nFeatureSnapIter 10;
    }

    addLayersControls
    {
        layers
        {
        }

        relativeSizes true;
        expansionRatio 1.0;
        finalLayerThickness 0.3;
        minThickness 0.2;
        nGrow 1;
        featureAngle 60;
        nRelaxIter 5;
        nSmoothSurfaceNormals 1;
        nSmoothNormals 3;
        nSmoothThickness 10;
        maxFaceThicknessRatio 0.5;
        maxThicknessToMedialRatio 0.3;
        minMedianAxisAngle 130;
        nBufferCellsNoExtrude 0;
        nLayerIter 50;
        nRelaxedIter 20;
    }

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

    debug 0;
    mergeTolerance 1E-6;
My resulting boundary file is the following one :
Quote:
ffminx
{
type patch;
nFaces 10000;
startFace 13030914;
}
ffmaxx
{
type patch;
nFaces 10000;
startFace 13040914;
}
ffmaxy
{
type wall;
nFaces 10000;
startFace 13050914;
}
ffminy
{
type wall;
nFaces 10000;
startFace 13060914;
}
ffmaxz
{
type wall;
nFaces 10000;
startFace 13070914;
}
ffminz
{
type wall;
nFaces 10000;
startFace 13080914;
}
air_out_air_out
{
type wall;
nFaces 0;
startFace 13090914;
}
region1_region1
{
type wall;
nFaces 0;
startFace 13090914;
}
region2_region2
{
type wall;
nFaces 0;
startFace 13090914;
}
region3_region3
{
type wall;
nFaces 0;
startFace 13090914;
}
region4_region4
{
type wall;
nFaces 0;
startFace 13090914;
}

If someone could spot what I am doing wrong it will be greatly appreciated.
Thanks for you help,
Romain

Last edited by nakor; October 14, 2012 at 15:49.
nakor is offline   Reply With Quote

Old   June 7, 2013, 02:35
Default
  #2
Senior Member
 
JR22's Avatar
 
Jose Rey
Join Date: Oct 2012
Posts: 134
Rep Power: 18
JR22 will become famous soon enough
Hi Nakor,

Did you solve the problem here?

Thanks
JR22 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
[snappyHexMesh] Refinement regions with complex geometry federicabi OpenFOAM Meshing & Mesh Conversion 6 July 7, 2016 06:03
[mesh manipulation] Create patches from a very complex geometry CoSponge OpenFOAM Meshing & Mesh Conversion 4 October 9, 2015 13:32
[mesh manipulation] Create patches from a very complex geometry CoSponge OpenFOAM Meshing & Mesh Conversion 5 June 9, 2015 09:51
[GAMBIT] About creating complex geometry cdoferreira ANSYS Meshing & Geometry 16 September 17, 2012 03:29
How to construct complex 3D geometry using GAMBIT? Feng FLUENT 5 October 11, 2005 05:13


All times are GMT -4. The time now is 16:46.