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

[snappyHexMesh] Meshing a STL file which has holes

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

Like Tree1Likes
  • 1 Post By simrego

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2019, 03:21
Default Meshing a STL file which has holes
  #1
Member
 
Owais Shabbir
Join Date: May 2019
Posts: 48
Rep Power: 7
Owais Shabbir is on a distinguished road
Dear Forum people,

I am new to meshing on snappyHexMesh. Currently, I am trying to mesh a protecting case of batteries. It contains a lot holes of diameter 7mm.



I have tried changing the level of refinements and also a few other parameters to increase the refinement around the holes to achieve a circular refinement but as you can see the holes in the attached picture, they always have a non-circular shape.


I chose the snappyHexMeshDict file from the snappyMultiRegionHeater meshing tutorial and set the case according to my geometry.



Any help would be appreciated.
Attached Images
File Type: jpg forum.jpg (196.1 KB, 46 views)
Owais Shabbir is offline   Reply With Quote

Old   May 13, 2019, 08:47
Default
  #2
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Hi!


It seems like if you loaded the castellated mesh not the snapped one.

Check how many timesteps do you have. If you have anything else not just a 0 folder, you have to check the last time in paraview or you will see the castellated mesh (by default 0 time is skipped). If you have this problem you can solve it by using the -overwrite switch in snappyHexMesh so you will overwrite your mesh at the 0 time.


If you don't have more timesteps, check if the snappying is enabled in the snappyHexMeshDict (at the begining of the file).
Owais Shabbir likes this.
simrego is offline   Reply With Quote

Old   May 14, 2019, 07:33
Default
  #3
Member
 
Owais Shabbir
Join Date: May 2019
Posts: 48
Rep Power: 7
Owais Shabbir is on a distinguished road
Hi,

I checked and it is turned on.
I am thinking maybe there is a new entity that I might have to introduce to refine the hole regions.
Btw just to clarify this is a solid present in the domain, I am meshing the flow domain around this solid.


This is the SHMDict that I am using, may be you can pick which entity should be improved/added.


Code:
            castellatedMesh   true;
   snap            true;
   addLayers       false;
   
   geometry
   {    topcover
       {
           type triSurfaceMesh;
           file "topcover.stl";
       }
   refinementBox   {type searchableBox; 
   min   (-0.02 -0.01 -0.01); 
   max   (0.7 0.03 0.2);}
   
   };
   
   castellatedMeshControls
   {
       maxLocalCells 500000;
       maxGlobalCells 5000000;
       minRefinementCells 10;
       nCellsBetweenLevels 3;
    features
       (
           {
               file "topcover.eMesh";
               level 4;
           }
       );
   
   
       refinementSurfaces
       {
           topcover
           {            level (5 5);
               faceZone topcover;
               cellZone topcover;
               cellZoneInside outside;
           }
     }
   
   
   
      resolveFeatureAngle 5;
       refinementRegions
       {
       //      refinementBox
       //     {
       //        mode inside;
        //       levels ((1E15 1));
           //}
       }
   
       locationInMesh (-0.1 -0.1 -0.25);
   
      allowFreeStandingZoneFaces true;
   }
   snapControls
   {
        nSmoothPatch 3;
       tolerance 4.0;
       nSolveIter 30;
       nRelaxIter 5;
       nFeatureSnapIter 15;
   
   implicitFeautureSnap        false;
   explicitFeatureSnap                true;
   multiRegionFeatureSnap        false;
   }
   
   addLayersControls
   {
       relativeSizes true;
       {
           topcover
           {
               nSurfaceLayers 3;
           }
       }
       expansionRatio 1.3;
       finalLayerThickness 0.02;
       minThickness 0.01;
       nGrow 1;
       featureAngle 80;
       nRelaxIter 3;
       nSmoothSurfaceNormals 1;
      nSmoothNormals 3;
       nSmoothThickness 2;
       maxFaceThicknessRatio 0.5;
       maxThicknessToMedialRatio 1;
       minMedianAxisAngle 90;
       nBufferCellsNoExtrude 0;
       nLayerIter 50;
   }
   
   meshQualityControls
   {
       #include "meshQualityDict"
   }
   
   ce   needs to be higher than this.
   mergeTolerance   1e-6;

I have removed the comments so it is clear and concise to be read.
Attached Images
File Type: jpg case5a.jpg (170.4 KB, 23 views)
Owais Shabbir is offline   Reply With Quote

Reply

Tags
holes, mesh around holes, snappyhesmeshdict, snappyhexmesh

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
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation 136 October 10, 2017 17:25
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM Community Contributions 25 March 6, 2017 10:03
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 11:46
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 09:45.