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

[snappyHexMesh] Problem with cell removal in SHM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 21, 2012, 08:16
Default Problem with cell removal in SHM
  #1
New Member
 
Join Date: May 2012
Posts: 7
Rep Power: 13
Bercht is on a distinguished road
Hi,

Iam trying to create a mesh for an internal flow with SHM. Everything i tried ended up with the refined background mesh but with no removed cells. I tried different stl's because i wasnt sure if they might have holes.

After that i found this tutorial:
http://www.hydroniumion.de/general/s...mesh-tutorial/

I took his .stl file and tried to run SHM again with the same result:
Code:
Removing mesh beyond surface intersections
------------------------------------------
Found point (0.3 0.3 -0.08) in cell 58028 in global region 0 out of 1 regions.
Keeping all cells in region 0 containing point (0.3 0.3 -0.08)
Selected for keeping : 127807 cells.
Edge intersection testing:
    Number of edges             : 392133
    Number of edges to retest   : 0
    Number of intersected edges : 1063
My snappyHexMeshDict looks like that:
Code:
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  1.6                                  |
|  \\  /    A nd          | Web:      http://www.openfoam.org                |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version        2.0;
    format          ascii;
    root            "/home/penfold/mattijs/foam/mattijs2.1/run/icoFoam";
    case            "cavity";
    instance        "system";
    local          "";
    class          dictionary;
    object          autoHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
castellatedMesh true;
snap            true;
addLayers      true;
mergeTolerance 1e-06;
geometry
{
    wigley.stl
    {
        type triSurfaceMesh;
        name Ofen;
    }
    refinementBox
    {
        type searchableBox;
        min (-10000 -1000 -10000);
        max (10000 11000 10000);
    }
}
castellatedMeshControls
{
    maxLocalCells 1000000;
    maxGlobalCells 5000000;
    minRefinementCells 1;
    nCellsBetweenLevels 2;
    features
    (
    );
    allowFreeStandingZoneFaces true;
    curvature       0.9925;
    maxLoadUnbalance 0.01;
    resolveFeatureAngle 30;
    refinementSurfaces
    {
        "Ofen_*"
        {
            level (1 2);
    faceZone Ofen;
            cellZone Ofen;
            zoneInside true;
        }
    }
    refinementRegions
    {
  
    }
    locationInMesh (0.3 0.3 -0.08);
}
snapControls
{
    nSmoothPatch 3;
    tolerance 4.0;
    nSolveIter 30;
    nRelaxIter 5;
}
addLayersControls
{
    relativeSizes true;
    layers
    {
//flowAirDuctReagent_flowAirDuctReagent
        //{
        //    nSurfaceLayers 1;
        //}
//flowAirDuctReagent_inlet1
        //{
        //    nSurfaceLayers 1;
        //}
//flowAirDuctReagent_inlet2
        //{
        //    nSurfaceLayers 1;
        //}
    }
    expansionRatio 1.0;
    finalLayerThickness 0.3;
    minThickness 0.1;
    nGrow 0;
    featureAngle 30;
    nRelaxIter 3;
    
    nLayerIter 50;
    nSmoothSurfaceNormals 1;
    nSmoothNormals 3;
    nSmoothThickness 10;
    maxFaceThicknessRatio 0.5;
    maxThicknessToMedialRatio 0.3;
    minMedianAxisAngle 130;
    nBufferCellsNoExtrude 0;
}

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

What is wrong with my Dict file? Iam wondering because the defined locationInMesh Vector points to an existing cell (58028) but doesnt remove any cells.
Hope you can help me.
Bercht is offline   Reply With Quote

Old   June 21, 2012, 20:05
Default
  #2
Member
 
Join Date: Nov 2010
Posts: 62
Rep Power: 15
Doug68 is on a distinguished road
A silly question but I made this mistake myself...
Is "Ofen" the name of the solid in the STL file?
Assuming its an ascii STL file this should be in the top line of the file.
Doug68 is offline   Reply With Quote

Old   June 21, 2012, 22:31
Default
  #3
Member
 
Join Date: Nov 2010
Posts: 62
Rep Power: 15
Doug68 is on a distinguished road
Also... by looking at:

refinementBox
{
type searchableBox;
min (-10000 -1000 -10000);
max (10000 11000 10000);
}

I'm guess you think that this is in mm? I found out the hard way the units quoted are m, if the STL file is in mm then it may be way bigger than the blockmesh volume hence no cells are removed.

An easy test for this is to open the mesh in parafoam then open the stl file at the same time and see if it is inside the mesh or not.
Doug68 is offline   Reply With Quote

Old   June 22, 2012, 04:30
Default
  #4
New Member
 
Join Date: May 2012
Posts: 7
Rep Power: 13
Bercht is on a distinguished road
Thank you so much... it works now. Yes, I thought that it is in mm. But i created my stl with Gmsh entering "mm" aswell so this is ok
Bercht is offline   Reply With Quote

Old   June 22, 2012, 06:20
Default
  #5
New Member
 
Join Date: May 2012
Posts: 7
Rep Power: 13
Bercht is on a distinguished road
Now i have another problem. I created the stl with gmsh in which i can define physical groups which i can use as boundaries in OF. But am I right that i cant export those groups with an stl file made by Gmsh? Is it possible with another freeware software like Gmsh?
Bercht is offline   Reply With Quote

Old   June 22, 2012, 08:34
Default
  #6
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
You could just export every region to a different ASCII stl file then open them with a text editor and append them all in an empty file which you'll then save as a .stl
lovecraft22 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
Problem / Misunderstanding with mesh.C() : get the cell centers Edy OpenFOAM Programming & Development 21 June 15, 2020 03:49
Neighboring cells in tetrahedral mesh vishwesh OpenFOAM Programming & Development 9 November 10, 2017 07:06
decomposePar problem: Cell 0contains face labels out of range (Again)) limonegiallo OpenFOAM Pre-Processing 4 August 28, 2017 05:18
problem with PEM fuel cell modeling and I-V curve AmiN.D FLUENT 3 July 24, 2017 01:39
CHT cell layer thickness problem Arnab Siemens 1 March 13, 2005 08:36


All times are GMT -4. The time now is 07:26.