Jump to content
Mr. Carsten Fuetterer

OpenFoam Bounding Box Feature: Create a clean volume mesh

Recommended Posts

Hi guys,
 
today I want to share with you my latest feature which creates a bounding box for your OpenFoam internal flow geometry.
 
The idea came, when I struggled with SnappyHexMesh because the edges of the boundaries where not captured correctly, which resulted in a bad prismlayer mesh like this:

post-85-0-29484700-1493713401_thumb.png
 (image 1)
I found out that the reason for this, was the bounding box, where the inlet and outlet boundary do not lay within the first layer of the box like this:

post-85-0-09248300-1493713501_thumb.png

 (image 2)
So I created I bounding box which automatically adjusts with the changing geometry. It calculates the maximum and minimum positions and creates the bounding box with a user specified offset. A nice setup looks like this:

post-85-0-37101400-1493713552_thumb.png
(image 3)
This setup produces a nice volume mesh with clean prism layers:

post-85-0-90882000-1493713501_thumb.png

(image 4)
The complete bounding box, where the subdivision in x, y and z coordinates can be specified, looks like this:

post-85-0-38621000-1493713555_thumb.png

(image 5)

The following picture shows how to connect the BlockMeshDict with the bounding box feature:

post-85-0-55223900-1493713506_thumb.png
 (image 6)

Remember that you have to create an entry for the vertices by selecting these, right click and select new entry:

post-85-0-15851000-1493713553_thumb.png

 (image 7)

This creates a new entry in your config dialog. There you have to change the type to FString:

post-85-0-76816300-1493713555_thumb.png
 (image 8)
Do the same for the line where the blocks are defined (see image 6).
Now you have create a new entry for the point in mesh, which you can find in your SnappyHexMeshDict. Follow the same procedure, but just mark the three coordinate like this for a new entry:
post-85-0-50560300-1493713553_thumb.png
(image 9)

That's it. This is just a first version of the feature. I could imagine to write another feature for the creation of the bounding box for external flows, where you could specify different patches within the BlockMeshDict.

 

Of course you are also welcome to post your features here in the forum.

 

Attached is the feature and an example how to use this feature with a complete software connector. This example by the way couples OpenFoam for Windows with CAESES.

 

Have a nice day

 

Carsten

duct_win_forum.fdb

OpenFoam_BoundingBox.fdf

post-85-0-43087300-1493713502_thumb.png

post-85-0-39223500-1493713509_thumb.png

post-85-0-88454400-1493713553_thumb.png

Share this post


Link to post
Share on other sites
Guest Mr. Lorenz Krieg

Hi Carston,
 

I´m trying to run your "caeses as an GUI for OpenFoam" example. 

could you supply me with your prepared OpenFoam Files as well?

The folders 0, constant and system as well as  the Allrun script ?


Many thanks,

 

Lorenz

Share this post


Link to post
Share on other sites

Hi Lorenz,

 

All these files are included in the example from Carsten - just check the software connector where you can find them as templates post-8-0-31859200-1494314367_thumb.png.

 

Cheers

Jörg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...