CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Gmsh] Boundary Conditions (https://www.cfd-online.com/Forums/openfoam-meshing/61868-boundary-conditions.html)

sega September 23, 2008 06:02

Boundary Conditions
 
Hello World.

I have created a 3D geometry with gmsh and got a nice mesh.

Now, gmshToFoam worked fine and I have the complete set of polyMesh files.

How can I specify boundary and initial conditions for my desired fields at this point?

This problem must be related to OpenFOAM since gmsh is not able to set conditions like this.
(The developers call gmsh "solver-agnostic")

Thanks a lot.
sega

andrea_barbera September 23, 2008 09:32

Hi Sebastian, according to
 
Hi Sebastian,

according to my experience, in the GMSH model you should create some physical surfaces (that will become your OF patches) and one physical volume (the domain). You should run gmsh with this settings without the "save all" option. If you use this options patches will not be saved.

At this point you should convert the mesh using "gmsh2toFoam", that you should find in the OF Wiki. This utility preserves patches names but must be compiled. From what I know this utility has some problems with OF 1.5 version: I use my old 1.4.1 version to convert meshes.

Regards

Andrea

sega September 23, 2008 11:40

Ok, now I see how this is goin
 
Ok, now I see how this is going to work.

I tried to set up a simple cavity case with a gmsh mesh. Everything is working into I want to start the calculation.
(Well, actually the orientation of the faces got messed up on the way, but thats not the problem).

When starting the interFoam solver there is this familiar error:

--> FOAM FATAL 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.


As the debugging was easy with blockMesh and structured hex-meshes, I don't know what to do on this unstructured mesh.

I hope you have some ideas for me?

Maybe a look at my case helps:
http://therealsega.th.funpic.de/open...mshMesh.tar.gz

Thanks so far.

louisgag November 17, 2008 15:59

Hi Sebastian, you probably
 
Hi Sebastian,

you probably figured that out by now but if your mesh is 3D you cannot specify any of the boundaries as type "empty".

cheers,

-Louis


All times are GMT -4. The time now is 08:21.