CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

SHM error: inside mesh not possible

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 9, 2015, 04:50
Default SHM error: inside mesh not possible
  #1
Member
 
Naresh Yathuru
Join Date: Feb 2015
Posts: 54
Rep Power: 2
Naresh yathuru is on a distinguished road
Hi foamers,

I m new to sHM. I have room geometry with two person ,and a object on the floor . there are inlet,outlet and window on the room surface. stl files are generated from salome.
i guess i did everything right then i created blockmesh,surfaceFeatureExtract,decomposed for parallel computing everything worked,

now when i specify the snappyHexmesh it says an error: inside mesh not possible. probably the geometry is not closed. but when i reopened the geometry stl files in other software they look closed. and location of mesh is also correct.

Then i tried with out any mode in refinement regions .
Code:
refinementRegions{}
then the meshing was done but the cell removal did not work. that is the cells from block mesh are still there .

i tried all possible ways but i couldnt find a solution. could come body please help me . I m lost. am i missing some thing??
Code:
// Which of the steps to run
castellatedMesh true;    // make basic mesh ?
snap            true;    // decide to snap back to surface ?
addLayers       false;   // decide to add viscous layers ?


geometry // Load in STL files here
{
    inlet.stl {type triSurfaceMesh; name inlet;}
    outlet.stl {type triSurfaceMesh; name outlet;}
    heater.stl {type triSurfaceMesh; name heater;}
    roomwall.stl {type triSurfaceMesh; name roomwall;}
        roof.stl {type triSurfaceMesh; name roof;}
        floor.stl {type triSurfaceMesh; name floor;}
        window.stl {type triSurfaceMesh; name window;}
        table.stl {type triSurfaceMesh; name table;}
        man1.stl {type triSurfaceMesh; name man1;}
        man2.stl {type triSurfaceMesh; name man2;}
    mergedtest.stl {type triSurfaceMesh; name mergedtest;}
    //refinementBox {type searchableBox; min (-2 -2 6); max (7 5 -2);}
};

castellatedMeshControls
{
    maxLocalCells 3000000;  //max cells per CPU core
    maxGlobalCells 16000000; //max cells to use before mesh deletion step
    minRefinementCells 50;  //was 0 - zero means no bad cells are allowed during refinement stages
    maxLoadUnbalance 0.10;
    nCellsBetweenLevels 3;  // expansion factor between each high & low refinement zone

    // Explicit feature edge refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    features // taken from STL from each .eMesh file created by "SurfaceFeatureExtract" command
    (
        {file "inlet.eMesh"; level 0;} 
        {file "outlet.eMesh"; level 0;} 
        {file "roomwall.eMesh"; level 0;} 
        {file "heater.eMesh"; level 3;}
        {file "roof.eMesh"; level 0;}  
        {file "floor.eMesh"; level 0;}
        {file "window.eMesh"; level 0;}
        {file "table.eMesh"; level 0;}
        {file "man1.eMesh"; level 3;}
        {file "man2.eMesh"; level 3;}
        //{file "mergedfull.eMesh"; level 3;} 
    );

    // Surface based refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~

    refinementSurfaces // Surface-wise min and max refinement level
    {
    inlet {
        level (0 0);//faceZone inlet;cellZone inlet;cellZoneInside inside;
        } // was 0 0
        outlet1 {
         level (0 0);//faceZone outlet;cellZone outlet;cellZoneInside inside;
         }
    roomwall {
        level (0 0);//faceZone roomwall;cellZone roomwall;cellZoneInside inside;
        }  //was 3 3
    heater {
        level (1 2);//faceZone heater;cellZone heater;cellZoneInside inside;
        } // was 4 4
        roof {
        level (0 0);///faceZone roof;cellZone roof;cellZoneInside inside;
         }
        floor {
        level (0 0);//faceZone floor;cellZone floor;cellZoneInside inside;
        }
        window {
        level (0 0);//faceZone window;cellZone window;cellZoneInside inside;
        }
        table {
        level (0 0);//faceZone table;cellZone table;cellZoneInside inside;
        }
        man1 {
        level (1 2);//faceZone man1;cellZone man1;cellZoneInside inside;
        }
        man2 {
        level (1 2);//faceZone  man2;cellZone man2;cellZoneInside inside;
        }
        mergedtest {level (2 2);}
    }  


    resolveFeatureAngle 80;  // (before 80) .Resolve sharp angles // Default 30
    refinementRegions        // In descending levels of fine-ness
    {mergedtest {mode inside;levels ((0.3 3));}}
     //{mode distance; levels ((0.01 4) (0.3 3) (1 2));}} // was ((0.001 4) (0.003 3) (0.01 2))
    locationInMesh (1 2 1);  //to decide which side of mesh to keep **
    allowFreeStandingZoneFaces false; // before true
}


// Settings for the snapping.
snapControls
{
    nSmoothPatch 3;
    tolerance 2.0;
    nSolveIter 30;
    nRelaxIter 5;
    nFeatureSnapIter 15; // default is 10
    
// New settings from openfoam 2.2 onwards for SHMesh

implicitFeatureSnap false; // default is false - detects without doing surfaceFeatureExtract
explicitFeatureSnap true; // default is true
multiRegionFeatureSnap false; // deafault is false - detects features between multiple surfaces

}



// Settings for the layer addition.
addLayersControls //add the PATCH names from inside the STL file so STLpatchName_insideSTLName 
{
    relativeSizes false; // was true
    layers
    {
    visc_main
             {nSurfaceLayers 3;} // was 3
    visc_refine_1 
        {nSurfaceLayers 3;} // was 3
    visc_refine_2
        {nSurfaceLayers 3;} // was 3
    }

    expansionRatio 1.3;
    finalLayerThickness 0.00016; //was 0.00016
    minThickness 0.00008; //was 0.00008
    nGrow 0; // was 1 


    // Advanced settings

    featureAngle 80; // was 70 //- When not to extrude surface. 0 is flat, 90 is right angle.
    nRelaxIter 3;  //- Max# of snapping relaxation iter. Should stop before upon reaching a correct mesh.
    nSmoothSurfaceNormals 1;  // Number of smoothing iterations of surface normals
    nSmoothNormals 3; // Number of smoothing iterations of interior mesh movement direction
    nSmoothThickness 10;  // Smooth layer thickness over surface patches
    maxFaceThicknessRatio 0.5; // Stop layer growth on highly warped cells
    maxThicknessToMedialRatio 0.3; // Reduce layer growth where ratio thickness to medial distance is large
    minMedianAxisAngle 130;  // Angle used to pick up medial axis points
    nBufferCellsNoExtrude 0;   // Create buffer region for new layer terminations
    nLayerIter 50; // Overall max number of layer addition iterations
}



// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
    
    maxNonOrtho 65;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave 80;
    minFlatness 0.5;
    minVol 1e-13;
    minTetQuality 1e-9;
    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;
Thank you

regards,
Naresh
Naresh yathuru 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
problems generating clean mesh Christian_tt OpenFOAM Native Meshers: snappyHexMesh and Others 0 May 16, 2014 10:58
Problems with multi-region mesh in sHM Artur OpenFOAM Meshing & Mesh Conversion 0 July 16, 2013 08:52
[ICEM] surface mesh merging problem everest ANSYS Meshing & Geometry 39 June 5, 2013 19:02
Add Mesh Layers doesnt work on the whole surface Kryo OpenFOAM Native Meshers: snappyHexMesh and Others 8 September 13, 2012 09:28
Mesh becoming coarser during addLayers in sHM Arnoldinho OpenFOAM Native Meshers: snappyHexMesh and Others 4 April 6, 2011 12:20


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