CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

definition of maxLocalCells and maxGlobalCells?

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

Like Tree1Likes
  • 1 Post By pbalz

LinkBack Thread Tools Display Modes
Old   January 7, 2016, 07:48
Default definition of maxLocalCells and maxGlobalCells?
Join Date: May 2014
Posts: 47
Rep Power: 4
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:
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?
        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
mode distance;
levels ((0.1 5));
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!

Yage is offline   Reply With Quote

Old   January 13, 2016, 14:26
Pascal Balz
Join Date: Feb 2015
Location: Germany
Posts: 36
Rep Power: 3
pbalz is on a distinguished road

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.
pbalz is offline   Reply With Quote


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

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