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

[snappyHexMesh] problems with snappyHexMesh

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 6, 2010, 06:03
Default problems with snappyHexMesh
  #1
StSchiff
Guest
 
Posts: n/a
I want to mesh a surface mounted cube in a channel with snappyHexMesh, but since I'm still quite new to snappy I'm unsure about the settings. I started by setting
CastellatedMesh true;
snap false;
addLayers false;
The result (CubeMesh.jpg) looks fine to me so far.
Then I changed the setting to:
CastellatedMesh true;
snap true;
addLayers false;
and the result (CubeMeshSnap.jpg) looks strange to me.
So I tried adding the layers without the snap step:
CastellatedMesh true;
snap false;
addLayers true;
The result (CubeMeshLayers.jpg) looks even worse than without the layers. So I decided to switch the snap step on again:
CastellatedMesh true;
snap true;
addLayers true;
The results (CubeMeshLayersSnap.jpg) looks better than the 3rd result but there are still some weird looking cells.

Can someone give me a hint how to produce a better result with snappy?

Thanks
Stefanie
Attached Images
File Type: jpg CubeMesh.jpg (61.1 KB, 70 views)
File Type: jpg CubeMeshSnap.jpg (61.7 KB, 67 views)
File Type: jpg CubeMeshLayers.jpg (62.6 KB, 61 views)
File Type: jpg CubeMeshLayersSnap.jpg (60.9 KB, 66 views)
  Reply With Quote

Old   August 6, 2010, 07:38
Default
  #2
Member
 
Moritz Wied
Join Date: Mar 2010
Location: suttgart, germany
Posts: 35
Rep Power: 16
Mo-ITB is on a distinguished road
Hi Stefanie,

do you use a stl-file for the cube or are the outer boundaries containing the block definded by blockMesh?
In this case there would be no need to snap.

best,
Moritz
Mo-ITB is offline   Reply With Quote

Old   August 6, 2010, 07:44
Default
  #3
Member
 
Moritz Wied
Join Date: Mar 2010
Location: suttgart, germany
Posts: 35
Rep Power: 16
Mo-ITB is on a distinguished road
if you watch your mesh with paraview try to make a threshold ( filters -> alphabetical -> extract cells by region) instead of a plane to prevent cells from being cut. then it might look better.
Mo-ITB is offline   Reply With Quote

Old   August 6, 2010, 08:01
Default
  #4
StSchiff
Guest
 
Posts: n/a
Hi Moritz,

I'm using an stl file for the cube and the channel walls. But I might try putting the cube and the walls into the bounding box. That would mean I don't need an stl file at all, right? But then how do I add the layers to the cube? Or the refinement at the walls?

With the threshold the mesh looks a log better, thanks for the hint!

best
Stefanie
  Reply With Quote

Old   August 6, 2010, 08:43
Default
  #5
Member
 
Moritz Wied
Join Date: Mar 2010
Location: suttgart, germany
Posts: 35
Rep Power: 16
Mo-ITB is on a distinguished road
Hi Stefanie,

snappy first snaps the stl out of the volume defined by the bounding box.
the refinement can be done for all patches and surfaces you define.

in snappyHexMeshDict you can do this:

- in the dictionary geometry you can define surfaces. here the patch-name of the stl-surface which is snapped, is defined. also closed surfaces like boxes (searchableBox) or cylinders (searchableCylinder) are defined here.

-in the dictionary refinementSurfaces you can define which ones should be refined how fine.

- in the dictionary refinementRegions the same, here you can chose outside/inside (for closed surfaces like boxes) or distance (for all).

- in the dictionary addLayersControls you can chose which patches should get layers.

in the motorbike tutorial there is snappyhexmeshdict which helped me alot.

bye
moritz
Mo-ITB is offline   Reply With Quote

Old   August 7, 2010, 11:17
Default
  #6
New Member
 
Luiz Eduardo
Join Date: May 2010
Posts: 19
Rep Power: 16
DudaAPD is on a distinguished road
Hi,
I am also having problems with snappyHexMesh. It seems to work well untill it displays this message (after a good while):

--> FOAM FATAL IO ERROR:
keyword relativeSizes is undefined in dictionary "::addLayersControls"

file: ::addLayersControls from line 249 to line 324.

From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 388.

FOAM exiting

I checked 3 times my setup against the motorbike tutorial and it is quite the same. Any ideas what the problem can be?

Thank you very much
DudaAPD is offline   Reply With Quote

Old   August 9, 2010, 02:53
Default
  #7
StSchiff
Guest
 
Posts: n/a
Hi DudaAPD,

can you post your snappyHexMeshDict file? Did you set the variable relativeSize in the addLayersControl subdictionary?

best
Stefanie
  Reply With Quote

Old   August 9, 2010, 11:11
Default
  #8
New Member
 
Luiz Eduardo
Join Date: May 2010
Posts: 19
Rep Power: 16
DudaAPD is on a distinguished road
Dear Stefanie,

I managed to solve the problem. Thank you very much for time.

best,
Duda
DudaAPD is offline   Reply With Quote

Reply

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
[snappyHexMesh] Problems with coarse/unsnapped cells in snappyHexMesh scareneb OpenFOAM Meshing & Mesh Conversion 2 August 13, 2014 07:13
[snappyHexMesh] snappyHexMesh problems 1.5->1.6 grtabor OpenFOAM Meshing & Mesh Conversion 5 May 18, 2012 03:00
[snappyHexMesh] stitchMesh and snappyHexMesh gdbaldw OpenFOAM Meshing & Mesh Conversion 0 December 23, 2009 02:09
[snappyHexMesh] SnappyhexMesh and Symmetryplane bastil OpenFOAM Meshing & Mesh Conversion 10 October 7, 2008 17:07
[snappyHexMesh] SnappyHexMesh not generate mesh first time mavimo OpenFOAM Meshing & Mesh Conversion 4 August 26, 2008 07:08


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