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

[snappyHexMesh] definition of maxLocalCells and maxGlobalCells?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By pbalz

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 7, 2016, 06:48
Default definition of maxLocalCells and maxGlobalCells?
  #1
Member
 
Yage
Join Date: May 2014
Posts: 60
Rep Power: 11
Yage is on a distinguished road
Dear Foamers,

Happy New Year!

I would like to generate a mesh around complex geometry.

Could someone explain me something about the snappyhexmesh setting

1. what are the meaning of maxLocalCells and maxGlobalCells?
the default values are:
Quote:
maxLocalCells 100000;
maxGlobalCells 2000000;
My initial mesh is 26516 and the final one is 2755738, so the total refinement cells are more than 2000000.

2. what is the unit used here in snappyhexMesh, could I convert it to other, such as mm?
Code:
    refinementBox
    {
        type searchableBox;
        min (-1.0 -0.7 0.0);
        max ( 8.0  0.7 2.5);
    }
3. the surface refinement level based on what? It is based on the STL geometry dimension or the background mesh?

4. For region refinement, such as
Quote:
refinementRegions
{
motobike
{
mode distance;
levels ((0.1 5));
}
refinementBox
{
mode inside;
levels ((1E15 4));
}
}
if the motobike refinement region overlaps with refinementBox, what are the levels based on? Are both of them based on the background mesh?

Many thanks in advance!

Regards,
Yage
Yage is offline   Reply With Quote

Old   January 13, 2016, 13:26
Default
  #2
Member
 
Pascal Balz
Join Date: Feb 2015
Location: Germany
Posts: 44
Rep Power: 11
pbalz is on a distinguished road
Hi,

Quote:
1. what are the meaning of maxLocalCells and maxGlobalCells?
In my experience maxLocalCells isn't a value to worry about but maxGlobalCells can affect your meshing results. If this value is too low snappy might stop refining and directly jump over to the snapping process.
Just make sure that this variable has a reasonable value, i.e. you expect your final mesh to be arround 2.5 mio cells so you would set maxGlobalCells to 4-5 mio. If you have a low RAM amount on your Workstation you can avoid to run out of memory with it.

The next questions:
snappy works in SI units (so meter) and so should you. Basically you want to define your blockMesh in m and make sure that your stl is scaled in m.

All refinement levels are based on the background mesh so if you have a mesh base size of 0.1 x 0.1 x 0.1 m, then a level 3 refinement would split your cells 3 times leading to 0.0125 m.
Higher levels (so finer mesh) always overlaps the coarse mesh but both are based on the background mesh.


Hope this helps!
Yage likes this.
__________________
Regards,
Pascal
pbalz 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



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