# definition of maxLocalCells and maxGlobalCells?

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

January 7, 2016, 07:48
definition of maxLocalCells and maxGlobalCells?
#1
Member

Yage
Join Date: May 2014
Posts: 50
Rep Power: 5
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

January 13, 2016, 14:26
#2
Member

Pascal Balz
Join Date: Feb 2015
Location: Germany
Posts: 44
Rep Power: 5
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!
__________________
Regards,
Pascal

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

All times are GMT -4. The time now is 13:23.

 Contact Us - CFD Online - Privacy Statement - Top