CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Gmsh] GmshToFoam keyword patch0 is undefined

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 3, 2008, 13:05
Default GmshToFoam keyword patch0 is undefined
  #1
New Member
 
Steve Duncan
Join Date: Mar 2009
Posts: 4
Rep Power: 17
steve999 is on a distinguished road
Hi there,

Well I've been struggling with the following problem for days and I can't figure out where is the mistake.

I want to study a flow around a complicated object. I did a cube around the objet in Catia, meshed the object, meshed the volume and then imported it in Gmsh. Everything was fine in gmsh.

Here was the .msh :

********$MeshFormat
********2 0 8
********$EndMeshFormat
********$Nodes
********...
********$EndNodes
********$Elements
********... (triangles -- surfaces)
********$EndElements
********$Elements
********... (tetrahedron -- volume)
********$EndElements


When I did gmshToFoam . . my_mesh.msh, here is what I got :


********Found $MeshFormat tag; assuming version 2 file format.
********Starting to read points at line 5
********Vertices to be read:129645
********Vertices read:129645
********
********Starting to read cells at line 129653
********Cells to be read:692471
********
********Mapping region 0 to Foam patch 0
********Mapping region 2 to Foam cellZone 0
********Cells:
******** total:562747
******** hex :0
******** prism:0
******** pyr :0
******** tet :562747
********
********CellZones:
********Zone Size
******** 0 562747
********
********Skipping tag at line 822127
********--> FOAM Warning :
******** From function polyMesh::polyMesh(... construct from shapes...)
******** in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 577
******** Found 129728 undefined faces in mesh; adding to default patch.
********Finding faces of patch 0
********
********FaceZones:
********Zone Size
********
********Writing zone 0 to cellZone cellZone_0 and cellSet
********End


I could view it with paraFoam, no problem, even with the warning.

The thing is, the whole mesh being between $Elements and $EndElements, there was of course only one physical entity so I couldn' tell FoamX what was the inlet (in the list, I only had patch0, internal mesh and defaultPatch).
This was expected : I wanted to do something easy first, to be sure the mesh was readable. Here come the problems : I put every cube wall in a different paragraph so that every wall could be defined as a different entity :


********$MeshFormat
********2 0 8
********$EndMeshFormat
********$Nodes
********...
********$EndNodes
********$Elements
********... (wall 1 -- surfaces)
********$EndElements
********$Elements
********... (wall 2 -- surfaces)
********$EndElements
********...
********$Elements
********... (wall 8 -- surfaces)
********$EndElements
********$Elements
********... (tetrahedron -- volume)
********$EndElements


In gmsh, it was wonderful : I could view all the different walls with different colors as expected. Great.
But then I tried gmshToFoam . . my_new_mesh.msh and here is the result :

********Found $MeshFormat tag; assuming version 2 file format.
********Starting to read points at line 5
********Vertices to be read:129645
********Vertices read:129645
********
********Starting to read cells at line 129653
********Cells to be read:16000
********
********Mapping region 1 to Foam patch 0
********Cells:
******** total:0
******** hex :0
******** prism:0
******** pyr :0
******** tet :0
********
********CellZones:
********Zone Size
********
********Starting to read cells at line 145656
********Cells to be read:12800
********
********Mapping region 2 to Foam patch 1
********Cells:
******** total:0
******** hex :0
******** prism:0
******** pyr :0
******** tet :0
********
********CellZones:
********Zone Size
********
********Starting to read cells at line 158459
********Cells to be read:16000
********
********Mapping region 3 to Foam patch 2
********Cells:
******** total:0
******** hex :0
******** prism:0
******** pyr :0
******** tet :0
********
********CellZones:
********Zone Size
********
********Starting to read cells at line 174462
********Cells to be read:12800
********
********Mapping region 4 to Foam patch 3
********Cells:
******** total:0
******** hex :0
******** prism:0
******** pyr :0
******** tet :0
********
********CellZones:
********Zone Size
********
********Starting to read cells at line 187265
********Cells to be read:16000
********
********Mapping region 5 to Foam patch 4
********Cells:
******** total:0
******** hex :0
******** prism:0
******** pyr :0
******** tet :0
********
********CellZones:
********Zone Size
********
********Starting to read cells at line 203268
********Cells to be read:16000
********
********Mapping region 6 to Foam patch 5
********Cells:
******** total:0
******** hex :0
******** prism:0
******** pyr :0
******** tet :0
********
********CellZones:
********Zone Size
********
********Starting to read cells at line 219271
********Cells to be read:40124
********
********Mapping region 7 to Foam patch 6
********Cells:
******** total:0
******** hex :0
******** prism:0
******** pyr :0
******** tet :0
********
********CellZones:
********Zone Size
********
********Starting to read cells at line 259398
********Cells to be read:562747
********
********Mapping region 2 to Foam cellZone 0
********Cells:
******** total:562747
******** hex :0
******** prism:0
******** pyr :0
******** tet :562747
********
********CellZones:
********Zone Size
******** 0 562747
********
********Skipping tag at line 822148
********--> FOAM Warning :
******** From function polyMesh::polyMesh(... construct from shapes...)
******** in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 577
******** Found 129728 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
********Finding faces of patch 6
********
********FaceZones:
********Zone Size
********
********Writing zone 0 to cellZone cellZone_0 and cellSet
********End
********
********
********
********--> FOAM FATAL IO ERROR : keyword patch1 is undefined in dictionary "/home/steve/OpenFOAM/steve-1.4.1/current_work/0/T::boundaryField"
********

********file: /home/steve/OpenFOAM/steve-1.4.1/current_work/0/T::boundaryField from line 36 to line 41.
********
******** From function dictionary::lookupEntry(const word& keyword) const
******** in file db/dictionary/dictionary.C at line 146.
********
********FOAM exiting


Of course if I try to run paraFoam, I do have in the list "patch0, patch1, ... patch6", but it bursts out whit a segmentation fault if I try to make it display anything.

If I try to do only one paragraph in gmsh specifying different entities this way :


********...
********$Elements
********1 2 3 1 1 0 ... ... ... ---> Wall 1
********2 2 3 1 1 0 ... ... ...
********...

********10 2 3 1 2 0 ... ... ... ---> Wall 2
********11 2 3 1 2 0 ... ... ...
********...
********$EndElements
********...


Everything's the same...

Please help me...

Best regards

PS :*I'm affraid I can't post the .msh because the object I'm working on is to be patented soon...supposing I can figure out where the pb is...
steve999 is offline   Reply With Quote

Old   September 9, 2008, 04:18
Default Hi guys, is there anyone t
  #2
New Member
 
Steve Duncan
Join Date: Mar 2009
Posts: 4
Rep Power: 17
steve999 is on a distinguished road
Hi guys,

is there anyone to help me ?

Best regards
steve999 is offline   Reply With Quote

Old   September 12, 2008, 10:09
Default Please, foamers, any idea ? I'
  #3
New Member
 
Steve Duncan
Join Date: Mar 2009
Posts: 4
Rep Power: 17
steve999 is on a distinguished road
Please, foamers, any idea ? I'm really stuck.

Best regards.
steve999 is offline   Reply With Quote

Old   September 12, 2008, 13:01
Default From the comment in gmshToFoam
  #4
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
From the comment in gmshToFoam:

Needs surface elements on mesh to be present and aligned with outside faces
of the mesh. I.e. if the mesh is hexes, the outside faces need to be quads

Sorry, couldn't find a test gmsh surface.
mattijs is offline   Reply With Quote

Old   September 14, 2008, 04:39
Default Hi, thanks for the answer ! I
  #5
New Member
 
Steve Duncan
Join Date: Mar 2009
Posts: 4
Rep Power: 17
steve999 is on a distinguished road
Hi, thanks for the answer !
I think that, unfortunately, this is not the problem : my mesh is made of tetrahedron, and the surfaces are the corresponding triangles.

I can't figure out what the problem is...
steve999 is offline   Reply With Quote

Old   September 14, 2008, 14:45
Default So does your mesh have (non-ze
  #6
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
So does your mesh have (non-zero-sized) patches? Look at constant/polyMesh/boundary or run checkMesh.

(your paraview message comes from it reading a T field with patch information inconsistent with the mesh)
mattijs is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Second Derivative Zero - Boundary Condition fu-ki-pa OpenFOAM 11 March 27, 2021 04:28
LEMOS InflowGenerator r_gordon OpenFOAM Running, Solving & CFD 103 December 18, 2018 00:58
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 12:38
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
G95 + CGNS Bruno Main CFD Forum 1 January 30, 2007 00:34


All times are GMT -4. The time now is 19:04.