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

[snappyHexMesh] snappyHexMesh: create boundary layer in a bent tube

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 2, 2011, 08:32
Default snappyHexMesh: create boundary layer in a bent tube
  #1
New Member
 
Brahim Aakti
Join Date: Mar 2009
Location: Lucerne, Switzerland
Posts: 23
Rep Power: 17
brahim is on a distinguished road
Hi all

I'm trying to mesh a "simple" bent tube using sHM. My goal is to resolve the boundary layer a bit... Therefore I tried three different approaches:
  1. standard procedure: define the layers in the dict file and rund sHM at once
  2. changing the bc type of inlet and outlet to empty before adding the layers
  3. adding the layers using the utility refineWallLayer
Unfortunatly, none of these approaches succeeded!
In the attachment you will find the "overview" of the geometry and the results of the three approaches. The third one looks quite nice, but the checkMesh fails because of "incorrect orientation of faces" and "edges not aligned with or perpendicular to non-empty directions".
Does anyone know what I am doing wrong?
Any help and hints are very appreciated!

Thanks - Brahim.
Attached Images
File Type: jpg geom.jpg (9.3 KB, 251 views)
File Type: jpg ver1.jpg (42.2 KB, 314 views)
File Type: jpg ver2.jpg (40.5 KB, 295 views)
File Type: jpg ver3.jpg (30.4 KB, 298 views)
brahim is offline   Reply With Quote

Old   September 2, 2011, 09:51
Default
  #2
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
Hej,

exactly what you have written under step two is wrong.

The type empty is used for 2D meshes only. You need to set this to wall. Then checkMesh will not give you an error.
__________________
~roman
romant is offline   Reply With Quote

Old   September 5, 2011, 03:23
Default
  #3
New Member
 
Brahim Aakti
Join Date: Mar 2009
Location: Lucerne, Switzerland
Posts: 23
Rep Power: 17
brahim is on a distinguished road
Hi Roman

Thanks for your hint.
BC type wall is the default setting. So, when I "change" the bc type to wall, procedure 1 and procedure 2 are exactly the same. The mesh I get then is the one on the second picture (tube-ver1.jpg). But I would like to have a mesh like the one in the fourth picture (tube-ver3.jpg)
Any other hints are very welcome!

Brahim.
brahim is offline   Reply With Quote

Old   September 5, 2011, 03:33
Default
  #4
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
Quote:
Originally Posted by brahim View Post
Hi Roman

Thanks for your hint.
BC type wall is the default setting. So, when I "change" the bc type to wall, procedure 1 and procedure 2 are exactly the same. The mesh I get then is the one on the second picture (tube-ver1.jpg). But I would like to have a mesh like the one in the fourth picture (tube-ver3.jpg)
Any other hints are very welcome!

Brahim.
I am not quite sure you can, but you could refine the region with a refinement region (check the options for inside and outside), since it is only the first cell that does not have layers, this could at least give you the layers by refinement.
__________________
~roman
romant is offline   Reply With Quote

Old   September 5, 2011, 04:31
Default
  #5
New Member
 
Brahim Aakti
Join Date: Mar 2009
Location: Lucerne, Switzerland
Posts: 23
Rep Power: 17
brahim is on a distinguished road
Quote:
Originally Posted by romant View Post
I am not quite sure you can, but you could refine the region with a refinement region (check the options for inside and outside), since it is only the first cell that does not have layers, this could at least give you the layers by refinement.
Hi Roman

Could you please give me more information about the refinement region? I don't know, what you mean by "refine the region with a refinement region"? Is it somehow possible to define a box for further refinement?
In the attachment you will find the snappyHexMeshDict I used.

Thanks a lot for your help!!!
Attached Files
File Type: txt snappyHexMeshDict.txt (10.6 KB, 155 views)
brahim is offline   Reply With Quote

Old   September 5, 2011, 04:36
Default
  #6
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
Hej,

I can see in your snappyHexMeshDict, there is already a refinementBox defined (line 38), which later on (line 129) is used. Since I don't know what the over all bounding box of your geometry is, i can't tell you what the refinement box should include. But the example of one is included in your snappyHexMeshDict.

You can use paraFoam and under display you can show the axis with measurements. From there you can deduce where you want to have a refinement box ( I guess at the inlet) and then chose how much more refined this should become (play with the levels I guess).
__________________
~roman
romant is offline   Reply With Quote

Old   September 5, 2011, 07:50
Default
  #7
New Member
 
Brahim Aakti
Join Date: Mar 2009
Location: Lucerne, Switzerland
Posts: 23
Rep Power: 17
brahim is on a distinguished road
Hi Roman

I defined a refinement box and played around with the levels, but without any success. The mesh still looks like in the second picture...
brahim is offline   Reply With Quote

Old   September 5, 2011, 07:54
Default
  #8
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
with the refinement box you will not get layers, but rather more cells that could then be on the same level as your layers in the rest of the domain.

depending on your application, you might not need the layers in the first cell (since only that one is actually affected) however, you can also just add an extension to the geometry, so that there are more cells before your real geometry starts, which means that were your real geometry starts, you will definitely have layers.
__________________
~roman
romant is offline   Reply With Quote

Old   September 5, 2011, 08:37
Default
  #9
New Member
 
Brahim Aakti
Join Date: Mar 2009
Location: Lucerne, Switzerland
Posts: 23
Rep Power: 17
brahim is on a distinguished road
For a simple test case, your suggested work around would work. But it is a "work around" and I think that there must be a proper solution... As you can see in this thread: http://www.cfd-online.com/Forums/ope...tlet-pipe.html it should be possible to create a nice boundary layer. There they changed the bc type from inlet/outlet to empty... But in my case, this procedure did not work!
Does someone has other ideas, how to fix that problem?
brahim is offline   Reply With Quote

Old   September 5, 2011, 08:45
Default
  #10
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
Quote:
Originally Posted by brahim View Post
Hi all

I'm trying to mesh a "simple" bent tube using sHM. My goal is to resolve the boundary layer a bit... Therefore I tried three different approaches:
  1. standard procedure: define the layers in the dict file and rund sHM at once
  2. changing the bc type of inlet and outlet to empty before adding the layers
  3. adding the layers using the utility refineWallLayer
Unfortunatly, none of these approaches succeeded!
In the attachment you will find the "overview" of the geometry and the results of the three approaches. The third one looks quite nice, but the checkMesh fails because of "incorrect orientation of faces" and "edges not aligned with or perpendicular to non-empty directions".
Does anyone know what I am doing wrong?
Any help and hints are very appreciated!

Thanks - Brahim.

Sorry, maybe I should have read your post more carefully. Since your third approach works, I suggest to change the type definition back from empty to wall after you have done the meshing. checkMesh should not give any errors and you then end up with the mesh that you want.

You might need to specify the patches/boundaries differently afterwards anyway, because some boundary conditions don't work on a wall.

you will find the new boundary conditions for the ready made mesh under lastTimeDirectory/polyMesh/boundary
__________________
~roman
romant is offline   Reply With Quote

Old   September 5, 2011, 09:43
Default
  #11
New Member
 
Brahim Aakti
Join Date: Mar 2009
Location: Lucerne, Switzerland
Posts: 23
Rep Power: 17
brahim is on a distinguished road
Quote:
Originally Posted by romant View Post
Sorry, maybe I should have read your post more carefully. Since your third approach works, I suggest to change the type definition back from empty to wall after you have done the meshing. checkMesh should not give any errors and you then end up with the mesh that you want.

You might need to specify the patches/boundaries differently afterwards anyway, because some boundary conditions don't work on a wall.

you will find the new boundary conditions for the ready made mesh under lastTimeDirectory/polyMesh/boundary
Hi Roman,

changing the bc type in the boundary file does not change the mesh... I still get the error message
Code:
Error in face pyramids: 104 faces are incorrectly oriented
For the first four time steps, the checkMesh gives "OK" which means: adding the first two layers works fine. But I definitely need more than just 2 layers.
brahim 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 08:44
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 06:20
Validity & transformation of boundary layer equations Obad Main CFD Forum 2 April 27, 2015 02:59
Low Mixing time Problem Mavier CFX 5 April 29, 2013 00:00
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 15:55


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