CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Pre-Processing (
-   -   Netgen multiple volumes (

Pei-Ying Hsieh (Hsieh) February 11, 2005 12:13

HI, I think Netgen is a ve

I think Netgen is a very nice tool for generating Tet elements. However, it only generate 1 volume at a time. If I generate two separate volumes (these two volumes will have common faces), is it possible to combine these two volumes into one volume and then set the common faces as internal bounday conditions?

Another issue with this apporach is that, how to ensure that the points generated on the common faces are the same on both sides so that they can be merged?


Mattijs Janssens (Mattijs) February 11, 2005 12:25

Hello Pei, if netgen does n
Hello Pei,

if netgen does not do what you want you could try generating a single mesh and use the splitMesh utility to introduce the cut. splitMesh splits a mesh along internal faces (i.e. creates external faces from internal ones)

1] You will have to generate a 'faceSet' with all of the faces in it. A faceSet can be generated using the faceSet utility.

2] in the polyMesh/boundary file add two zero sized patches at the end.



will try to split your mesh along the faces in the faceSet.

This is all a bit experimental so you might want to try it on a small hex mesh first.


Pei-Ying Hsieh (Hsieh) February 11, 2005 15:44

Thanks Mattijs! The purpos
Thanks Mattijs!

The purpose of this really is related to gamma initialization. I am hoping to use the cell information (meaning cell numbers) inside specific blocks (volumes) and then initialize all these cells to gamma = 1. Ocassonally, I have to initialize gamma to 1 on irregular geometries.


Mattijs Janssens (Mattijs) February 11, 2005 16:00

You probably have studied the
You probably have studied the setGammaDamBreak utility which sets the gamma based on simple geometric info.

If you want it to use the netgen region info you will have to modify the netgenNeutralToFoam converter to read the region information as well and create a labelList with the region for every cell. Write this to a file and modify your setGammaDambreak to read this file and apply it.

All times are GMT -4. The time now is 10:20.