CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Empty patch problem with Netgen to Openfoam (

troy July 6, 2010 13:18

Empty patch problem
I am new to CFD and OpenFoam. I am using Netgen 4.9.13 (Windows) as a mesh generator and exporting directly into OpenFoam format (1.7.0). In Netgen I give similar faces the same boundary condition number, then I redefine them in the boundary file. Whenever I define a patch as "empty" the solver crashes. It gives the error, "This mesh contains patches of type empty but is not 1D or 2D by virtue of the fact that the number of faces of this empty patch is not divisible by the number of cells." If I define the patch as "wall" it can work, but that's not a good solution, as they are really not walls. Any suggestions?

philippose July 6, 2010 13:35

Hello there,

A Very Good and Warm evening to you :-)!

I think the title of your post is very misleading, and makes the post look like you are trying to report an error in the Netgen -> OpenFOAM export function.

However, the actual error that you are trying to report has nothing to do with the Netgen export, and has to do with the way you are defining the Boundary conditions.

In OpenFOAM, the boundary type "Empty", is intended to be used only for 2-D (and 1-D) meshes, and is not valid when the mesh has more than one layer of cells in all three co-ordinate directions.

OpenFOAM works basically on 3-D meshes, and the concept of 2-D is introduced into the system by forcing one mesh direction to have only one layer of cells, and using the "Empty" type for the front and back planes of the mesh.

I am not sure what you are trying to simulate, but trying to extrapolate from the details you have given, I think what you are looking for, is the "slip" boundary condition. To specify this type of boundary, you need to use the "patch" type of boundary in the "boundary" file, and use the boundary condition "slip" for the relevant variables in the initial conditions folder "0" (the variables will depend on what you are trying to simulate).

For more information, please read the OpenFOAM User Manual, which can also be found here:

Have a great day ahead!


troy July 6, 2010 14:17

Hi Philippose,
I think you must be the most active person on this site. It was your recommendation that led me to Netgen. Thanks for your help. I changed the title of my post to take out the Netgen to Openfoam part of it. I will look into the slip boundary condition. Thanks again,

hyperion August 10, 2010 16:04

Hi Troy - Did you ever get this problem solved? I get the same error message, and I would like to use empty patches for my geometry. I tried importing quad dominated netgen mesh files but apparently openFOAM doesn't like that. Any other suggestions? Thanks.

troy August 11, 2010 08:43

Gave up on OpenFoam
I gave up on OpenFoam because I couldn't get the turbo portion to work with the new version of OpenFoam. I have switched to Cradle's SC/Tetra software, which is Japan's version of Ansys and about half the cost and offered a two-month trial after attending a 3-day training. Regarding your empty wall patch, I never did get it worked out. I gave up due to other bigger issues beforehand. I invested two weeks of my time to get going with OpenFoam, and found that unless there are examples almost identical to the situation you have, then you should give up, or be OK with writing your own CFD solver. The solvers seem very intertwined with the type of situation being modeled. Others with more CFD experience than I may have different opinions, however.

All times are GMT -4. The time now is 15:59.