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] Not all entries in refinementSurfaces dictionary were used (https://www.cfd-online.com/Forums/openfoam-meshing/147101-not-all-entries-refinementsurfaces-dictionary-were-used.html)

will_ca January 13, 2015 06:08

Not all entries in refinementSurfaces dictionary were used
 
Hi everyone,
I'm trying to learn how to use snappyHexMesh.
I'm trying to mesh the quarter of a cylinder. I build that geometry in Salome and saved it as stl files.
I saved the different parts (wall, two symmetryplanes, inlet and outlet) as separate files and changed the file so that every surface has its name like this:
solid wall
<facet ….>
endsolid wall


when I try to run snappyHexMesh I get the warning:

Code:

Reading refinement surfaces.
 --> FOAM Warning : 
    From function refinementSurfaces::refinementSurfaces(..)
    in file autoHexMesh/refinementSurfaces/refinementSurfaces.C at line 226
    Reading "/home/cw591/OpenFOAM/cw591-2.3.0/run/testmesh2/system/snappyHexMeshDict.castellatedMeshControls.refinementSurfaces" from line 150 to line 154
    Not all entries in refinementSurfaces dictionary were used. The following entries were not used : 
 4
 (
 SymPlane1
 inlet
 outlet
 wall
 )

so it looks as if only the stl file that I use last in the geometry part of my snappyHexMeshDict (see below) is used.


I also tried making one stl file (vol.stl) that includes all surfaces with their names and then using just that, adding regions like in the part commented geometry part in the snappyHexMeshDict below. When I run that I get the same warning, but now none of the patches are used:

Code:

Not all entries in refinementSurfaces dictionary were used. The following entries were not used : 
 5
 (
 SymPlane1
 SymPlane2
 inlet
 outlet
 wall
 )

Does anyone know what I'm doing wrong?
I'd apreciate any help
C

My snappyHexMeshDict:
Code:

castellatedMesh true;
 snap            true;
 addLayers      false;
 
 
 geometry
 {
    inlet.stl {type triSurfaceMesh; name inlet}
    outlet.stl {type triSurfaceMesh; name outlet}
    wall.stl {type triSurfaceMesh; name wall}
    SymPlane1.stl {type triSurfaceMesh; name SymPlane1}
    SymPlane2.stl {type triSurfaceMesh; name SymPlane2}
 
  /*  vol.stl 
    {
        type triSurfaceMesh; 
        name volume;
        /*regions
        {
            inlet
            { name inlet;}
            outlet
            {name outlet;}
            wall
            { name wall;}
            SymPlane1
            { name SymPlane1;}
            SymPlane2
            { name SymPlane2;}
        }
    }*/
 
    // Analytical shape; cylinder, sphere
    refinementBox
    {
        type searchableBox;
        min (-0.01 -0.01 -0.5);
        max ( 0.55 0.55 1.4);
    }
 };
 
 
 
 // Settings for the castellatedMesh generation.
 castellatedMeshControls
 {
 
    maxLocalCells 1000000;
 
    maxGlobalCells 7000000;
 
    minRefinementCells 10;
 
    maxLoadUnbalance 0.10;
 
    nCellsBetweenLevels 1;
 
 
    features
    (
        {
            file "inlet.eMesh";
        level 3;
        }
        {
            file "outlet.eMesh";
        level 3;
        }
 
        {
            file "wall.eMesh";
        level 3;
        }
        {
            file "SymPlane1.eMesh";
        level 3;
        }
        {
            file "SymPlane2.eMesh";
        level 3;
        }
    );
 
 
 
    refinementSurfaces
    {
                    // Surface-wise min and max refinement level
            inlet {level (1 1);}
            outlet {level (1 1);}
            wall {level (5 6);}
            SymPlane1 {level (5 6);}
            SymPlane2 {level (5 6);}       
    }
 
    // Resolve sharp angles
    resolveFeatureAngle 80;
 
 
 
    refinementRegions
    {
        refinementBox 
        {
            mode inside;
            levels ((1E15 5));
        }
 
    }
 
 
    locationInMesh (0.01 0.01 0.01);
 
 
    allowFreeStandingZoneFaces true; 
 }
 
 
 
 // Settings for the snapping.
 snapControls
 {
 
    nSmoothPatch 3;
 
    tolerance 4.0;
 
    nSolveIter 30;
 
    nRelaxIter 5;
 }
 
 
 
 // Settings for the layer addition.
 addLayersControls
 {
 
    relativeSizes true;
 
      layers
    {
        wall 
    {
            nSurfaceLayers 3;
        }
    }
 
 
    expansionRatio 1.1;
 
    finalLayerThickness 0.003;
 
    minThickness 0.003;
 
    nGrow 0;
 
 
    // Advanced settings
 
    featureAngle 60;
 
    nRelaxIter 3;
 
    nSmoothSurfaceNormals 1;
 
    nSmoothNormals 3;
 
    nSmoothThickness 2;
 
    maxFaceThicknessRatio 0.5;
 
    maxThicknessToMedialRatio 0.3;
 
    minMedianAxisAngle 130;
 
    nBufferCellsNoExtrude 0;
 
    nLayerIter 50;
 }
 
 
 
 meshQualityControls
 {
 
    maxNonOrtho 65;
 
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
 
    maxConcave 80;
 
    minFlatness 0.5;
 
    minVol 1e-13;
    minTetQuality 1e-30;
 
    minArea -1;
 
    minTwist 0.02;
 
    minDeterminant 0.001;
 
    minFaceWeight 0.02;
 
    minVolRatio 0.01;
 
    minTriangleTwist -1;
 
 
    // Advanced
 
    nSmoothScale 4;
 
    errorReduction 0.75;
 }
 
 
 // Advanced
 
 debug 0;
 
 // Merge tolerance. Is fraction of overall bounding box of initial mesh.
 // Note: the write tolerance needs to be higher than this.
 mergeTolerance 1E-6;


peravali July 29, 2015 05:27

Not all entries in refinement Surfaces dictionary were used
 
hello,
I am meshing a propeller case. I didn't have a problem in model scale but when i am remeshing in full scale i am having the same error for one particular region. I am guessing it has something to do with the refinement parameters. Did u able to solve it later?

derekm April 29, 2016 04:35

Quote:

Originally Posted by will_ca (Post 527281)
Hi everyone,
I'm trying to learn how to use snappyHexMesh.
I'm trying to mesh the quarter of a cylinder. I build that geometry in Salome and saved it as stl files.
I saved the different parts (wall, two symmetryplanes, inlet and outlet) as separate files and changed the file so that every surface has its name like this:
solid wall
<facet ….>
endsolid wall


when I try to run snappyHexMesh I get the warning:

[CODE]Reading refinement surfaces.
--> FOAM Warning :
From function refinementSurfaces::refinementSurfaces(..)
in file autoHexMesh/refinementSurfaces/refinementSurfaces.C at line 226
Reading "/home/cw591/OpenFOAM/cw591-2.3.0/run/testmesh2/system/snappyHexMeshDict.castellatedMeshControls.refineme ntSurfaces" from line 150 to line 154
Not all entries in refinementSurfaces dictionary were used. The following entries were not used :
...

My snappyHexMeshDict:
Code:

castellatedMesh true;
 snap            true;
 addLayers      false;
 
 
 geometry
 {
...
    // Analytical shape; cylinder, sphere
    refinementBox
    {
        type searchableBox;
        min (-0.01 -0.01 -0.5);
        max ( 0.55 0.55 1.4);
    }
 };
 
  ..



the error is in the geometry section you missed out the name of the refinement section it should be as below

Code:


 
 geometry
 {
...
    // Analytical shape; cylinder, sphere
    refinementBox
    {  name    refinementBox ;
        type searchableBox;
        min (-0.01 -0.01 -0.5);
        max ( 0.55 0.55 1.4);
    }
 };
 
  ..

I ran into this problem today and found the fix.. perhaps the error message should be a little more informative like
Code:

cannot find refinement region "refinementbox"

user007 December 5, 2019 07:11

Quote:

Originally Posted by will_ca (Post 527281)
Hi everyone,
...


I also tried making one stl file (vol.stl) that includes all surfaces with their names and then using just that, adding regions like in the part commented geometry part in the snappyHexMeshDict below. When I run that I get the same warning, but now none of the patches are used:

Code:

Not all entries in refinementSurfaces dictionary were used. The following entries were not used : 
 5
 (
 SymPlane1
 SymPlane2
 inlet
 outlet
 wall
 )


...


I'm experiencing exactly the same problem, have you found a solution to refers the surfaces inside an multi solid stl to refine them?

ahmetcanilhan January 7, 2021 13:04

I guess
 
I know this is an old thread but I solved this problem with increasing levels


Code:

    refinementSurfaces
    {
        domain
        {
            level (0 0);
            regions
            {
                inlet        { level (1 1); patchInfo { type patch; } }
                outlet        { level (1 1); patchInfo { type patch; } }
                solidExternal    { level (1 1); patchInfo { type wall;  } }
            }
        }

    fluidToSolid
        {
            level (1 1);
            faceZone fluidToSolid;
            cellZone steel;
            cellZoneInside insidePoint;
            insidePoint (-0.005 0.01 0.045);
        }

    steelToAluminum
        {
            level (1 1);
            faceZone steelToAluminum;
            cellZone aluminum;
            cellZoneInside insidePoint;
            insidePoint (-0.005 0.01 0.005);
        }





    }


I got the "Not all entries in refinementSurfaces dictionary were used. The following entries were not used :" message and change below code to



Code:


    refinementSurfaces
    {
        domain
        {
            level (0 0);
            regions
            {
                inlet        { level (1 1); patchInfo { type patch; } }
                outlet        { level (1 1); patchInfo { type patch; } }
                solidExternal    { level (1 1); patchInfo { type wall;  } }
            }
        }

    fluidToSolid
        {
            level (1 2);
            faceZone fluidToSolid;
            cellZone steel;
            cellZoneInside insidePoint;
            insidePoint (-0.005 0.01 0.045);
        }

    steelToAluminum
        {
            level (1 2);
            faceZone steelToAluminum;
            cellZone aluminum;
            cellZoneInside insidePoint;
            insidePoint (-0.005 0.01 0.005);
        }





    }


and problem solved. I hope its helpful.

XJ_Wang November 4, 2021 21:04

I hope no one is encountering this problem. But if you do , there might be some problem with the syntax. I am not sure which version of OpenFOAM Caro was using. But I believe there was some syntax error in his/her code.
Code:

inlet.stl {type triSurfaceMesh; name inlet}
[/QUOTE]
There missed an ";" after 'name inlet'

If you are encountering this problem, please check whether there is some other warning ahead of this warning. You might have some syntax problem.


Quote:

Originally Posted by will_ca (Post 527281)
Hi everyone,
I'm trying to learn how to use snappyHexMesh.
I'm trying to mesh the quarter of a cylinder. I build that geometry in Salome and saved it as stl files.
I saved the different parts (wall, two symmetryplanes, inlet and outlet) as separate files and changed the file so that every surface has its name like this:
solid wall
<facet ….>
endsolid wall


when I try to run snappyHexMesh I get the warning:

Code:

Reading refinement surfaces.
 --> FOAM Warning : 
    From function refinementSurfaces::refinementSurfaces(..)
    in file autoHexMesh/refinementSurfaces/refinementSurfaces.C at line 226
    Reading "/home/cw591/OpenFOAM/cw591-2.3.0/run/testmesh2/system/snappyHexMeshDict.castellatedMeshControls.refinementSurfaces" from line 150 to line 154
    Not all entries in refinementSurfaces dictionary were used. The following entries were not used : 
 4
 (
 SymPlane1
 inlet
 outlet
 wall
 )

so it looks as if only the stl file that I use last in the geometry part of my snappyHexMeshDict (see below) is used.


I also tried making one stl file (vol.stl) that includes all surfaces with their names and then using just that, adding regions like in the part commented geometry part in the snappyHexMeshDict below. When I run that I get the same warning, but now none of the patches are used:

Code:

Not all entries in refinementSurfaces dictionary were used. The following entries were not used : 
 5
 (
 SymPlane1
 SymPlane2
 inlet
 outlet
 wall
 )

Does anyone know what I'm doing wrong?
I'd apreciate any help
C

My snappyHexMeshDict:
Code:

castellatedMesh true;
 snap            true;
 addLayers      false;
 
 
 geometry
 {
    inlet.stl {type triSurfaceMesh; name inlet}
    outlet.stl {type triSurfaceMesh; name outlet}
    wall.stl {type triSurfaceMesh; name wall}
    SymPlane1.stl {type triSurfaceMesh; name SymPlane1}
    SymPlane2.stl {type triSurfaceMesh; name SymPlane2}
 
  /*  vol.stl 
    {
        type triSurfaceMesh; 
        name volume;
        /*regions
        {
            inlet
            { name inlet;}
            outlet
            {name outlet;}
            wall
            { name wall;}
            SymPlane1
            { name SymPlane1;}
            SymPlane2
            { name SymPlane2;}
        }
    }*/
 
    // Analytical shape; cylinder, sphere
    refinementBox
    {
        type searchableBox;
        min (-0.01 -0.01 -0.5);
        max ( 0.55 0.55 1.4);
    }
 };
 
 
 
 // Settings for the castellatedMesh generation.
 castellatedMeshControls
 {
 
    maxLocalCells 1000000;
 
    maxGlobalCells 7000000;
 
    minRefinementCells 10;
 
    maxLoadUnbalance 0.10;
 
    nCellsBetweenLevels 1;
 
 
    features
    (
        {
            file "inlet.eMesh";
        level 3;
        }
        {
            file "outlet.eMesh";
        level 3;
        }
 
        {
            file "wall.eMesh";
        level 3;
        }
        {
            file "SymPlane1.eMesh";
        level 3;
        }
        {
            file "SymPlane2.eMesh";
        level 3;
        }
    );
 
 
 
    refinementSurfaces
    {
                    // Surface-wise min and max refinement level
            inlet {level (1 1);}
            outlet {level (1 1);}
            wall {level (5 6);}
            SymPlane1 {level (5 6);}
            SymPlane2 {level (5 6);}       
    }
 
    // Resolve sharp angles
    resolveFeatureAngle 80;
 
 
 
    refinementRegions
    {
        refinementBox 
        {
            mode inside;
            levels ((1E15 5));
        }
 
    }
 
 
    locationInMesh (0.01 0.01 0.01);
 
 
    allowFreeStandingZoneFaces true; 
 }
 
 
 
 // Settings for the snapping.
 snapControls
 {
 
    nSmoothPatch 3;
 
    tolerance 4.0;
 
    nSolveIter 30;
 
    nRelaxIter 5;
 }
 
 
 
 // Settings for the layer addition.
 addLayersControls
 {
 
    relativeSizes true;
 
      layers
    {
        wall 
    {
            nSurfaceLayers 3;
        }
    }
 
 
    expansionRatio 1.1;
 
    finalLayerThickness 0.003;
 
    minThickness 0.003;
 
    nGrow 0;
 
 
    // Advanced settings
 
    featureAngle 60;
 
    nRelaxIter 3;
 
    nSmoothSurfaceNormals 1;
 
    nSmoothNormals 3;
 
    nSmoothThickness 2;
 
    maxFaceThicknessRatio 0.5;
 
    maxThicknessToMedialRatio 0.3;
 
    minMedianAxisAngle 130;
 
    nBufferCellsNoExtrude 0;
 
    nLayerIter 50;
 }
 
 
 
 meshQualityControls
 {
 
    maxNonOrtho 65;
 
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
 
    maxConcave 80;
 
    minFlatness 0.5;
 
    minVol 1e-13;
    minTetQuality 1e-30;
 
    minArea -1;
 
    minTwist 0.02;
 
    minDeterminant 0.001;
 
    minFaceWeight 0.02;
 
    minVolRatio 0.01;
 
    minTriangleTwist -1;
 
 
    // Advanced
 
    nSmoothScale 4;
 
    errorReduction 0.75;
 }
 
 
 // Advanced
 
 debug 0;
 
 // Merge tolerance. Is fraction of overall bounding box of initial mesh.
 // Note: the write tolerance needs to be higher than this.
 mergeTolerance 1E-6;




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