CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] Some tips for Snappyhexmesh required (https://www.cfd-online.com/Forums/openfoam-meshing/82824-some-tips-snappyhexmesh-required.html)

basilwatson December 7, 2010 04:30

Some tips for Snappyhexmesh required
 
Dear all

Just wondering if some kind soul could share some experience when using SnappyHexmesh

As noted before I can run simple shapes in ( I assume ) course blockmesh though complex meshes end in tears

What would be an acceptable mesh/cell size if for example the Imported STL file was 1 unit square, 3, 5 10 50 100?? ie the blockmesh would be 10 cell wide and 50 long by 10 cell high

Secondly what about the quality of the mesh, stl import or another file type, watertight ( non manifolds, ). I really have had hit and miss with mesh import, Some really big stl files that I am sure wouldn't run, have run and simple ones havent. Is there a good code of practice ?

Lastly when running what part of the computer system does Openfoam place demands upon, processor, Ram , video card or the whole lot !

I ask this because the computer I am using to run Openfoam is in the workshop, and while ok for simple cad work seems to run out of steam when running Openfoam ( simple foam ), Its a dual core with 4 gig of ram but with a basic video card

If any one has advice I am all ears ( please do excuse the wording, I am new to all of this !)

Kind regards

Stephen

colinB December 7, 2010 05:01

Hi Stephen,

I've been working with sHM for a while and try to share my thoughts with you.

1) how dens should be your background mesh:
Well it depends on what you want to do and how you define a possible
refinment.
Actually I don't really get your idea with the unit square.
For my problems I use a corase background mesh (130 000 cells for
4.752.200m² Domain) This you can actually throw away because it is use
less, but with sHMD I make refinements in different areas so my final
mesh has ~2 Mio cells. This is still very coarse but the answer to that
brings me to:

2) As a rough estimation you can asume that your computer can not deal
with more than 1 Mio cells per GB RAM and as further assumption you
should have 2 GB RAM per core. This is valid for sHM and OF

3) sHM can also deal with high complex geometries, but if you have sharp
edges that might get smoothend. But that it can deal with it you should
have a proper stl file with the geometry as a solid. If the original file
contains patches that are not glued together this might cause trouble,
especially when the face are getting smaller than the wholes!

Well I hope that helps! for further questions see also the special forum for sHM (OpenFoam>Meshing & Mesh conversion > snappyHexMesh )

regards Colin

basilwatson December 8, 2010 22:43

Hi Colin;
Ive just a couple of questions so I've highlighted my them, Thank you for taking the time to reply,


I've been working with sHM for a while and try to share my thoughts with you.

1) how dens should be your background mesh:
Well it depends on what you want to do and how you define a possible
refinment.
Actually I don't really get your idea with the unit square.

I was refering to the size of the blockmesh, I am not sure but here is a cut and paste from and attempt of mine, I assume the 10,25.10 are the cells in the X, Y, and Z directions of the blockmesh.

blocks
(
hex (0 1 2 3 4 5 6 7) (10 25 10) simpleGrading (1 1 1)
);

~2 Mio cells by this do you mean ~2 million? I have just been filling out the block mesh dictionary and letting shm do its work


For my problems I use a coarse background mesh (130 000 cells for
4.752.200m² Domain) This you can actually throw away because it is use
less, but with sHMD I make refinements in different areas so my final
mesh has ~2 Mio cells. This is still very coarse but the answer to that
brings me to:

is there a tutorial, or something I can look at ( i will look at forum when I get home from work)



Finally, well its Christmas so the old computer can get an upgrade, its a linux 64bit so I will throw a quad core and 8 gig of ram in there and an Quadro fx video card

BTW does Openfoam automatically recognise more than one chip or are these some things I need to change ( again ill see if there is anything on the net !


Well I hope that helps! for further questions see also the special forum for sHM (OpenFoam>Meshing & Mesh conversion > snappyHexMesh )

I will have a look !

Thanks for your help and hope it isnt too cold for you this year ,!


Thanks for your help

Stephen

colinB December 9, 2010 02:53

Hi Stephen,

1) I see what you mean.
This was also refering to the blockMesh file:
Quote:

130 000 cells for 4.752.200m³ Domain
Yes the numbers are the number of cells in x y and z direction.
If they are sufficient, depends on the actual domain size and what
you are planning to do.
If you are interested in things that are happening within the domain
you maybe should choose a more coarse mesh if not you can define
the rest with refinement boxes.

2) ehm yes I was referring to 2 million my bad ;)

3) well there is the motorBike tutorial. You can find it in
openfoam171>tutorials>incompressible>simpleFoam>mo torBike
you have to look for the stl file in the constant>triSurface subdirectory
and for the snappyHexMeschDict file in the system sudirectory

4) with OF parallel processing is possible therefore you need to study the decomposeParDict file in the system subdirectory. I'm not sure if you can also use parallel processing for meshing, but I didn't need it so far if it is available.

temperatures are fine here (around 0° with snow falling)
hope the same for you

regards
Colin


All times are GMT -4. The time now is 22:06.