CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Pre-Processing (
-   -   gmshToFoam problem (

DineshramBalaji July 25, 2013 20:05

gmshToFoam problem
Hi eveyone,

I built a model using gmsh and used the gmshToFoam command to overwrite the copy of the hot room tutorial in buoyantBoussinesqPimpleFoam. the boundaries have been overwritten with new boundaries, but the patch seems to be empty and the start face remains the same for all the boundaries.

Can anyone suggest on this problem?

nimasam July 28, 2013 11:33

i never import a file from gmsh , but if it imports all patch names correctly, then you can assign your patch type manually in polyMesh/boundary file

vishal3 July 29, 2013 03:06

I agree Nima Sam. What you have to do is just go to>>Constant>>polymesh>>boundary and manually edit your patch type.


DineshramBalaji July 31, 2013 15:26


Thanks for the response. But the problem is not with the type of the patch. The nFaces of the patch remains empty. It is a structured mesh. There seems to be a similar problem

But it is quite complicated.

vishal3 August 5, 2013 00:58


Have you created a volume while adding physical groups? This might solve your problem.
You have to add a physical group to all the volumes in your geometry as an internal.
Check whether it works or not.

DineshramBalaji August 5, 2013 14:51

Hi Vishal,

I have used internal volume and still the nFaces remain zero. it's a structured mesh and is there something that can be done with the grouping of the mesh parts.
when I did the checkMesh, I got the following error

Checking patch topology for multiply connected surfaces...
Patch Faces Points Surface topology Bounding box
Tiles 0 0 ok (empty)
Inlet 0 ok (empty)
RackWall 0 0 ok (empty)
Chassis 0 ok (empty)

#0 Foam::error::printStack(Foam::Ostream&) in "/home/bluesim/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64Gcc46DPOpt/lib/"
#1 Foam::sigSegv::sigHandler(int) in "/home/bluesim/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64Gcc46DPOpt/lib/"
#2 in "/lib/"
#3 Foam::polyMeshTetDecomposition::checkFaceTets(Foam ::polyMesh const&, double, bool, Foam::HashSet<int, Foam::Hash<int> >*) in "/home/bluesim/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64Gcc46DPOpt/lib/"
in "/home/bluesim/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64Gcc46DPOpt/bin/checkMesh"
in "/home/bluesim/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64Gcc46DPOpt/bin/checkMesh"
#6 __libc_start_main in "/lib/"
in "/home/bluesim/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64Gcc46DPOpt/bin/checkMesh"
Segmentation fault

vishal3 August 5, 2013 23:33

hi Dinesh

Can you send me your .geo file of the geometry? So that I can try that here.

DineshramBalaji August 6, 2013 05:36

1 Attachment(s)
Yeah sure.

Thanks for the help.

wyldckat August 17, 2013 09:49

Greetings to all!

@Dinesh: I've never used much gmsh, so I'm not familiar with it. I used the same tutorial case as base; the geo file you provided I used as follows:

gmsh -3 IO_D2.geo
When it was done, I used the command:

gmshToFoam IO_D2.msh  > log
When I had a look into the "log" file, it indicates that surfaces have names such as:

The "NaN" is a clear indication of Not-a-Number:

Further down in the "log" file, there are several occurrences like these:

Finding faces of patch 0
--> FOAM Warning : Not using gmsh face 4(65139 65145 65146 65140) since zero vertex is not on boundary of polyMesh

This is the main symptom as to why the patches have 0 faces assigned to them.

I then opened the geo file on gmsh and it looks like you did not define a proper geometry, but I could be wrong. My advice is to step back a bit and try creating first a simpler and similar geometry, and then gradually make it more complex, until you can figure out how it's used.
For more information, I suggest you check the official user guide:

Best regards,

vishal3 August 19, 2013 03:43

Hi dinesh
Will you please provide the details of your case?

All times are GMT -4. The time now is 05:40.