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

[snappyHexMesh] How To Prepare a Large, Complex Geometry for SnappyHexMesh?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By akidess
  • 1 Post By akidess

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 30, 2019, 02:39
Default How To Prepare a Large, Complex Geometry for SnappyHexMesh?
  #1
New Member
 
Mads Ivarson
Join Date: Jul 2019
Posts: 17
Rep Power: 6
Nosravi is on a distinguished road
Hello!

I am relatively new to OpenFOAM, and I am tasked to simulate flow in a small, rocky river using the interFoam solver. I have the 3D model of the river, however, I have a couple of questions before I try to create the mesh:

- Does the geometry have to be closed to use SnappyHexMesh, meaning do I need to add a 'roof' representing the atmosphere? Currently my model consists of the banks, riverbed, a dam and inlet/outlet planes.

- Would it be preferrable to keep the riverbank, riverbed and dam as one STL, or split them apart? I think they will all have the same boundary conditions.

I will attach pictures of the geometry.
Imgur album: https://imgur.com/a/9B8c4NQ

These are my initial questions, I would really appreciate some input! Cheers
Nosravi is offline   Reply With Quote

Old   July 30, 2019, 03:18
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
You don't need a roof. Just prepare your background mesh accordingly - snappyHexMesh will never make anything larger. Same for the inlet and outlet planes.

If you never change the parts, it doesn't really matter if you have one or multiple STLs. If for instance you want to check different dams it makes sense to have a separate STL just for the dam to replace it easier.

InterFoam is picky about the mesh. Avoid sudden changes in mesh density at the fluid interface, and pay attention to good mesh quality (orthogonality, skewness).
Nosravi likes this.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   July 30, 2019, 03:39
Default
  #3
New Member
 
Mads Ivarson
Join Date: Jul 2019
Posts: 17
Rep Power: 6
Nosravi is on a distinguished road
Quote:
Originally Posted by akidess View Post
You don't need a roof. Just prepare your background mesh accordingly - snappyHexMesh will never make anything larger. Same for the inlet and outlet planes.

If you never change the parts, it doesn't really matter if you have one or multiple STLs. If for instance you want to check different dams it makes sense to have a separate STL just for the dam to replace it easier.

InterFoam is picky about the mesh. Avoid sudden changes in mesh density at the fluid interface, and pay attention to good mesh quality (orthogonality, skewness).
Thank you so much for the reply!

So if I understand you correctly, the roof and inlet/outlet planes are unnecessary as long as the block i make around the geometry does this job?

There is a slight slope to the river, and it is not completely straight, so a box will not envelop it perfectly, AFAIK.

Will I then use setFields to specify for interFoam that i don't want water on the 'underside' of the model?
Nosravi is offline   Reply With Quote

Old   July 30, 2019, 05:17
Default
  #4
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
There should be no underside of the model. Your top, left, right, front and back should be given by your background mesh, and snappyHexMesh will snap the bottom boundary to your riverbank STL. This is indeed not currently possible with your STL, because the river is not straight and your banks don't extend far enough to the sides. You will need to extend the banks, or build an atmosphere STL boundary as you initially suggested.
Nosravi likes this.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   July 30, 2019, 07:12
Default
  #5
New Member
 
Mads Ivarson
Join Date: Jul 2019
Posts: 17
Rep Power: 6
Nosravi is on a distinguished road
Quote:
Originally Posted by akidess View Post
There should be no underside of the model. Your top, left, right, front and back should be given by your background mesh, and snappyHexMesh will snap the bottom boundary to your riverbank STL. This is indeed not currently possible with your STL, because the river is not straight and your banks don't extend far enough to the sides. You will need to extend the banks, or build an atmosphere STL boundary as you initially suggested.
Thank you again! I will try to improve my STL file so that my background mesh will declare the boundaries.
Nosravi 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
Solving complex geometry with compressible flow gfoam FLUENT 1 May 19, 2017 14:56
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry pizzaspinate OpenFOAM Meshing & Mesh Conversion 1 February 25, 2015 07:05
Meshing in a complex geometry Jay_upd Mesh Generation & Pre-Processing 0 February 20, 2015 10:16
[ICEM] Dealing with complex geometry imported form SolidWorks Daniel_Khazaei ANSYS Meshing & Geometry 2 September 30, 2013 20:42
how to deal with complex geometry using ICEM? prayskyer CFX 3 June 20, 2006 07:33


All times are GMT -4. The time now is 18:36.