CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Open Source Meshers: Gmsh, Netgen, CGNS, ... (http://www.cfd-online.com/Forums/openfoam-meshing-open/)
-   -   GmshToFoam FOAM FATAL ERROR faces deallocated (http://www.cfd-online.com/Forums/openfoam-meshing-open/61886-gmshtofoam-foam-fatal-error-faces-deallocated.html)

Tobias Prousa (Prousa) February 18, 2005 15:42

Hi, I try to generate a mes
 
Hi,

I try to generate a mesh using gmsh and later translate it into a OpenFOAM mesh using gmshToFoam, but I alwas get the error:

FOAM FATAL ERROR : faces deallocated

I think I am missing something in gmsh, but don't know what.
Here is what I did: In gmsh I created 8 points, connected them with straight lines to a cube, added 6 surfaces and then added a volume. After that I selected 'mesh'->'3d' and the saved the mesh as version1 .msh. When I now try to import the mesh in OpenFOAM using gmshToFoam this is what I get:

#> gmshToFoam . cavity test.msh
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.0.2 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : gmshToFoam . cavity test.msh
Date : Feb 18 2005
Time : 20:33:25
Host : archer
PID : 11536
Root : /home/tobi/OpenFOAM/OpenFOAM-1.0.2/tutorials/icoFoam
Case : cavity
Nprocs : 1
Create database

Read nVerts:676

Read nElems:1456

Mapping region 14 to Foam patch 0
Mapping region 16 to Foam patch 1
Mapping region 18 to Foam patch 2
Mapping region 20 to Foam patch 3
Mapping region 22 to Foam patch 4
Mapping region 24 to Foam patch 5
Cells:
total:0
hex :0
prism:0
pyr :0
tet :0

Patches:
Patch Size
0 222
1 224
2 224
3 224
4 228
5 226


--> FOAM FATAL ERROR : faces deallocated

Function: const faceList& polyMesh::allFaces() const
in file: meshes/polyMesh/polyMesh.C at line: 526.

FOAM aborting

Aborted


Any idea what I am doing wrong? Thanks, Tobi

Mattijs Janssens (Mattijs) February 21, 2005 04:56

Seems gmshToFoam didn't find
 
Seems gmshToFoam didn't find any volume elements (tets, hex, etc.) in the file, just triangles and quads. Have a look at the .msh file itself. Should have element number in second column and this should be according to the values in utilities/mesh/conversion/gmshToFoam/gmshToFoam line 47.

Mattijs

Rasmus Gjesing (Gjesing) February 21, 2005 08:33

Hi, Some time a go, Mattij
 
Hi,

Some time a go, Mattijs rewrote gmshToFoam so it could handle physicals (see forum) on my request. I tested it, and it worked. However, I have just tried to convert the .msh file that worked earlier, but know gmshToFoam doesn't discover the volumeelements...

This doesn't answer Tobias question, but I can send you a .geo file that can convert. Perhaps Matijs will have a look at it. I will gladly supply with files.

/Rasmus

Mattijs Janssens (Mattijs) February 21, 2005 14:27

Hi Rasmus, just send me a
 
Hi Rasmus,

just send me a .msh file you think is correct and I'll have a look.

Mattijs

Mattijs Janssens (Mattijs) February 22, 2005 07:00

Hi Tobi, from what Rasmus
 
Hi Tobi,

from what Rasmus and I can deduct the problem is not in gmshToFoam. You will however have to make sure to generate and export the 3D elements (haven't used gmsh for a while so cannot tell you how)

Can send you Rasmus's test .msh file if you're interested.

Mattijs

Rasmus Gjesing (Gjesing) February 22, 2005 08:27

I can also provide a geometry
 
I can also provide a geometry-file from gmsh that ensures the volume-mesh is stored.

Just let me know!

/Rasmus

panara April 1, 2005 06:02

Hi, I experienced the same
 
Hi,

I experienced the same problem of Tobias, what was the solution?

Could anybody send me the working example to see what I am doing wrong?

Daniele

mattijs April 1, 2005 10:47

Think it was the fact that the
 
Think it was the fact that the physical volumes were not defined in gmsh. So all it output was its surface mesh (triangles and quads only) but no tets.

In the mesh/conversion/gmshToFoam/ directory there is a sample .msh file which contanis tets (I think). See if you can convert that. Haven't really used gmsh seriously so cannot help you more.

panara April 1, 2005 12:35

When I save the file as versio
 
When I save the file as version 1 without physicals I do not have the problem of Tobias and everithing seems to work but for a simple cubic case.

For a more complex case instead I get another error message:

cannot find face 4(412 2 11 576) in patch

Function: findFace
in file: gmshToFoam.C at line 107.

I will try to solve this problem when the simple case will work.

In any case I get a lot of patches and I do not know how to impose the Boundary conditions, how I can get the version of gmshToFoam that handles the Physical surface conditions? Could you send it to me?

I guess that with this new version the only patch that I get will be the Boundary condition patches...

Daniele

mattijs April 1, 2005 12:48

1.1 gmshToFoam is the latest.
 
1.1 gmshToFoam is the latest.

The message you are getting is probably because some volume element (tet, hex) is using a boundary face that has not been exported.

wsuaero November 27, 2007 22:29

I have also not been able to c
 
I have also not been able to convert from gmsh to Foam. The error messages I am getting are not quite like what is above but it was as close a I could find. I have followed the previous post troubleshooting and nothing has worked.

Here is the output from trying to convert the provided mesh file CubeVer1.msh

/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : gmshToFoam /home/philip/OpenFOAM/philip-1.4.1/run/tutorials/icoFoam tunnel CubeVer1.msh
Date : Nov 27 2007
Time : 19:03:27
Host : philip-desktop
PID : 10206
Root : /home/philip/OpenFOAM/philip-1.4.1/run/tutorials/icoFoam
Case : tunnel
Nprocs : 1
Create time

--> FOAM Warning :
From function boundBox::boundBox(const pointField& points)
in file meshes/boundBox/boundBox.C at line 52
cannot find bounding box for zero sized pointFieldreturning zero
#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/philip/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/philip/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib/libc.so.6"
#3 main in "/home/philip/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/gmshToFoa m"
#4 __libc_start_main in "/lib/libc.so.6"
#5 __gxx_personality_v0 in "/home/philip/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/gmshToFoa m"
ccKilled
runFoamXHB : cleanup
runFoamXHB: Name server is not running.
philip@philip-desktop:~$ cc

if you need anything else I will be happy to provide it.

phil

zhoubinwx December 14, 2007 04:54

dear phil, I am glad to know
 
dear phil,
I am glad to know that you have the same problem as mine, and I post it also in this forum, if possible we could exchange our views about gmsh and openfoam.

I will post it here if I have solved the problem.

my msn is zhoubinwx@hotmail.com

Best regards,

Zhou Bin

wendel April 16, 2009 13:57

Hi, I've tried to convert from gmsh to Foam, but experience the same problem as Phil (wsuaero). Is there anyone that know what this error means and how to solve it?

Edit: Seems like this error, in my case at least, was caused by a miss match in the number of elements in each patch. In other words my mesh was a bit on the ugly side. Although I'm not completely sure this is the cause of the error.

Goutam January 30, 2012 14:08

gmsh
 
I have the same problem? How I will solve this? Need Help... pls

Goutam January 31, 2012 11:45

gmsh
 
Dear friends,
I got the following massage, what I will do?

Starting to read mesh format at line 2
Read format version 2.2 ascii 0
Starting to read physical names at line 5
Physical names:7
Surface 1 top
Surface 2 bottom
Surface 3 left
Surface 4 right
Surface 5 front
Surface 6 back
Volume 7 internal
Starting to read points at line 15
Vertices to be read:70
Vertices read:70
Starting to read cells at line 88
Cells to be read:322
Mapping region 1 to Foam patch 0
Mapping region 2 to Foam patch 1
Mapping region 3 to Foam patch 2
Mapping region 4 to Foam patch 3
Mapping region 5 to Foam patch 4
Mapping region 6 to Foam patch 5
Mapping region 7 to Foam cellZone 0
Cells:
total:226
hex :0
prism:0
pyr :0
tet :226
CellZones:
Zone Size
0 226
Skipping tag at line 413
Patch 0 gets name top
Patch 1 gets name bottom
Patch 2 gets name left
Patch 3 gets name right
Patch 4 gets name front
Patch 5 gets name back
--> FOAM Warning :
From function polyMesh::polyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 619
Found 96 undefined faces in mesh; adding to default patch.
Finding faces of patch 0
Finding faces of patch 1
Finding faces of patch 2
Finding faces of patch 3
Finding faces of patch 4
Finding faces of patch 5
FaceZones:
Zone Size
Writing zone 0 to cellZone internal and cellSet
End


All times are GMT -4. The time now is 06:13.