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

[Gmsh] gmshToFoam generates patches with 0 faces and 0 points

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 2, 2020, 03:32
Default gmshToFoam generates patches with 0 faces and 0 points
  #1
New Member
 
Join Date: Jan 2019
Posts: 3
Rep Power: 4
Simurgh is on a distinguished road
I have converted my gmsh generated mesh to OpenFOAM format using gmshToFoam, and everything is fine, and mesh is properly converted. checkMesh passes with flying colours. But, I end up with patches (i.e., my Physical surfaces in gmsh) that have 0 faces and 0 points on them! This obviously breaks simulation later on as I cannot assign velocity or pressure to these boundaries. Please help, any ideas is appreciated. I can change the code if need be. I can code in C++, just give me a pointer on what is going on.

Gmsh shows that there are faces on these surfaces, but they are not converted somehow.

Here is the output of mesh conversion, plus checkMesh output at the end:

Info : Running 'gmsh -format msh22 -o mesh/pipe2.msh -3 -smooth 3 mesh/pipe2.geo' [Gmsh 4.5.6, 1 node, max. 1 thread]
Info : Started on Mon Jun 1 23:17:49 2020
Info : Reading 'mesh/pipe2.geo'...
Info : Extrusion layer cycle detected for curve 2
Info : Extrusion layer cycle detected for curve 6
Info : Extrusion layer cycle detected for curve 15
Info : Extrusion layer cycle detected for curve 2
Info : Extrusion layer cycle detected for curve 6
Info : Extrusion layer cycle detected for curve 15
Info : Done reading 'mesh/pipe2.geo'
Info : Meshing 1D...
Info : [ 0 %] Meshing curve 1 (Line)
Info : [ 10 %] Meshing curve 2 (Line)
Info : [ 10 %] Meshing curve 3 (Line)
Info : [ 10 %] Meshing curve 4 (Line)
Info : [ 20 %] Meshing curve 5 (Line)
Info : [ 20 %] Meshing curve 6 (Line)
Info : [ 20 %] Meshing curve 7 (Line)
Info : [ 20 %] Meshing curve 8 (Line)
Info : [ 30 %] Meshing curve 9 (Line)
Info : [ 30 %] Meshing curve 10 (Line)
Info : [ 30 %] Meshing curve 11 (Line)
Info : [ 30 %] Meshing curve 12 (Line)
Info : [ 40 %] Meshing curve 13 (Line)
Info : [ 40 %] Meshing curve 14 (Line)
Info : [ 40 %] Meshing curve 15 (Line)
Info : [ 50 %] Meshing curve 16 (Line)
Info : [ 50 %] Meshing curve 17 (Extruded)
Info : [ 50 %] Meshing curve 18 (Extruded)
Info : [ 50 %] Meshing curve 19 (Extruded)
Info : [ 60 %] Meshing curve 20 (Extruded)
Info : [ 60 %] Meshing curve 21 (Extruded)
Info : [ 60 %] Meshing curve 22 (Extruded)
Info : [ 60 %] Meshing curve 23 (Extruded)
Info : [ 70 %] Meshing curve 24 (Extruded)
Info : [ 70 %] Meshing curve 25 (Extruded)
Info : [ 70 %] Meshing curve 26 (Extruded)
Info : [ 80 %] Meshing curve 27 (Extruded)
Info : [ 80 %] Meshing curve 28 (Extruded)
Info : [ 80 %] Meshing curve 29 (Extruded)
Info : [ 80 %] Meshing curve 30 (Extruded)
Info : [ 90 %] Meshing curve 31 (Extruded)
Info : [ 90 %] Meshing curve 32 (Extruded)
Info : [ 90 %] Meshing curve 33 (Extruded)
Info : [ 90 %] Meshing curve 34 (Extruded)
Info : [100 %] Meshing curve 35 (Extruded)
Info : [100 %] Meshing curve 36 (Extruded)
Info : [100 %] Meshing curve 37 (Extruded)
Info : Done meshing 1D (0.030967 s)
Info : Meshing 2D...
Info : [ 0 %] Meshing surface 20 (Plane, Frontal-Delaunay)
Info : [ 10 %] Meshing surface 21 (Plane, Frontal-Delaunay)
Info : [ 10 %] Meshing surface 22 (Plane, Frontal-Delaunay)
Info : [ 20 %] Meshing surface 23 (Plane, Frontal-Delaunay)
Info : [ 20 %] Meshing surface 24 (Extruded)
Info : [ 30 %] Meshing surface 25 (Extruded)
Info : [ 30 %] Meshing surface 26 (Extruded)
Info : [ 40 %] Meshing surface 27 (Extruded)
Info : [ 40 %] Meshing surface 28 (Extruded)
Info : [ 50 %] Meshing surface 29 (Extruded)
Info : [ 50 %] Meshing surface 30 (Extruded)
Info : [ 60 %] Meshing surface 31 (Extruded)
Info : [ 60 %] Meshing surface 32 (Extruded)
Info : [ 70 %] Meshing surface 33 (Extruded)
Info : [ 70 %] Meshing surface 34 (Extruded)
Info : [ 80 %] Meshing surface 35 (Extruded)
Info : [ 80 %] Meshing surface 36 (Extruded)
Info : [ 90 %] Meshing surface 37 (Extruded)
Info : [ 90 %] Meshing surface 38 (Extruded)
Info : [100 %] Meshing surface 39 (Extruded)
Info : [100 %] Meshing surface 40 (Extruded)
Info : Done meshing 2D (0.300156 s)
Info : Meshing 3D...
Info : Meshing volume 1 (Extruded)
Info : Meshing volume 2 (Extruded)
Info : Meshing volume 3 (Extruded)
Info : Meshing volume 4 (Extruded)
Info : Done meshing 3D (0.023414 s)
Info : Optimizing mesh...
Info : Done optimizing mesh (0.000127 s)
Info : 1675 nodes 5184 elements
Info : Writing 'mesh/pipe2.msh'...
Info : Done writing 'mesh/pipe2.msh'
Info : Stopped on Mon Jun 1 23:17:49 2020
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : dd4b8cf30d-20200514 OPENFOAM=1912 patch=200506
Arch : "LSB;label=32;scalar=64"
Exec : gmshToFoam -case case mesh/pipe2.msh
Date : Jun 01 2020
Time : 23:17:49
Host : houman-Gazelle-Professional
PID : 14979
I/O : uncollated
Case : /home/houman/projects/upipe/openFoamSample/case
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

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:9
Surface 2 TunnelOutlet
Surface 3 TunnelInlet
Surface 4 TunnelWall
Surface 5 pipeWalls
Surface 6 pipeInlet
Surface 7 pipeOutlet
Surface 8 wedge0
Surface 9 wedge1
Volume 1 air

Starting to read points at line 17
Vertices to be read: 1675
Vertices read:1675

Starting to read cells at line 1695
Cells to be read: 4838

Mapping region 9 to Foam patch 0
Mapping region 7 to Foam patch 1
Mapping region 2 to Foam patch 2
Mapping region 8 to Foam patch 3
Mapping region 3 to Foam patch 4
Mapping region 6 to Foam patch 5
Mapping region 5 to Foam patch 6
Mapping region 4 to Foam patch 7
Mapping region 1 to Foam cellZone 0
Cells:
total:1577
hex :0
prism:1510
pyr :35
tet :32

CellZones:
Zone Size
0 1577

Patch 0 gets name wedge1
Patch 1 gets name pipeOutlet
Patch 2 gets name TunnelOutlet
Patch 3 gets name wedge0
Patch 4 gets name TunnelInlet
Patch 5 gets name pipeInlet
Patch 6 gets name pipeWalls
Patch 7 gets name TunnelWall

--> FOAM Warning :
From function Foam:olyMesh:olyMesh(const Foam::IOobject&, Foam:ointField&&, const cellShapeList&, const faceListList&, const wordList&, const wordList&, const Foam::word&, const Foam::word&, const wordList&, bool)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 593
Found 3253 undefined faces in mesh; adding to default patch defaultFaces
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
Finding faces of patch 7

FaceZones:
Zone Size
1 4
5 4

Writing zone 0 to cellZone air and cellSet
Writing zone 1 to faceZone pipeOutlet and faceSet
Writing zone 5 to faceZone pipeInlet and faceSet
End

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : dd4b8cf30d-20200514 OPENFOAM=1912 patch=200506
Arch : "LSB;label=32;scalar=64"
Exec : checkMesh -case case
Date : Jun 01 2020
Time : 23:17:50
Host : houman-Gazelle-Professional
PID : 14980
I/O : uncollated
Case : /home/houman/projects/upipe/openFoamSample/case
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Time = 0

Mesh stats
points: 1675
internal points: 0
faces: 5553
internal faces: 2300
cells: 1577
faces per cell: 4.97971
boundary patches: 8
point zones: 0
face zones: 2
cell zones: 1

Overall number of cells of each type:
hexahedra: 0
prisms: 1510
wedges: 0
pyramids: 35
tet wedges: 0
tetrahedra: 32
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
Patch Faces Points Surface topology
wedge1 1577 854 ok (non-closed singly connected)
pipeOutlet 0 0 ok (empty)
TunnelOutlet 17 35 ok (non-closed singly connected)
wedge0 1577 854 ok (non-closed singly connected)
TunnelInlet 17 35 ok (non-closed singly connected)
pipeInlet 0 0 ok (empty)
pipeWalls 34 68 ok (non-closed singly connected)
TunnelWall 31 64 ok (non-closed singly connected)

Checking faceZone topology for multiply connected surfaces...
FaceZone Faces Points Surface topology
pipeOutlet 4 9 ok (non-closed singly connected)
pipeInlet 4 9 ok (non-closed singly connected)

Checking basic cellZone addressing...
CellZone Cells Points Volume BoundingBox
air 1577 1675 0.697106 (0 -2 0) (1.9981 2 0.261052)

Checking geometry...
Overall domain bounding box (0 -2 0) (1.9981 2 0.261052)
Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
Mesh has 3 solution (non-empty) directions (1 1 1)
Boundary openness (-1.11534e-17 9.73628e-18 2.85705e-16) OK.
Max cell openness = 2.05534e-16 OK.
Max aspect ratio = 20.3769 OK.
Minimum face area = 2.00566e-05. Maximum face area = 0.0257222. Face area magnitudes OK.
Min volume = 7.05952e-07. Max volume = 0.00141272. Total volume = 0.697106. Cell volumes OK.
Mesh non-orthogonality Max: 59.066 average: 5.01187
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 1.92527 OK.
Coupled point location match (average 0) OK.

Mesh OK.

End


Thank you
Simurgh is offline   Reply With Quote

Old   June 3, 2020, 04:12
Default Found the issue
  #2
New Member
 
Join Date: Jan 2019
Posts: 3
Rep Power: 4
Simurgh is on a distinguished road
The issue is that the internal boundary converted from gmsh (using gmshToFoam convertor) is not a patch. It can be converted to a patch using createBaffles.
Simurgh is offline   Reply With Quote

Old   July 29, 2020, 16:04
Default
  #3
Member
 
Join Date: Oct 2013
Posts: 92
Rep Power: 9
fedvasu is on a distinguished road
Quote:
Originally Posted by Simurgh View Post
The issue is that the internal boundary converted from gmsh (using gmshToFoam convertor) is not a patch. It can be converted to a patch using createBaffles.
Can you please tell me how to convert the desired patch using createBaffles ?

I don't any ANY internal boundary patches!!
fedvasu is offline   Reply With Quote

Reply

Tags
gmshtofoam patch, gmshtofoam problem

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Decomposing meshes Tobi OpenFOAM Pre-Processing 17 January 24, 2020 06:42
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 90 October 3, 2019 08:01
GenerateVolumeMesh Error - Surface Wrapper Self Interacting (?) AndreP STAR-CCM+ 10 August 2, 2018 08:48
[snappyHexMesh] sHM layer process keeps getting killed MBttR OpenFOAM Meshing & Mesh Conversion 4 August 15, 2016 04:21
snappyhexmesh remove blockmesh geometry philipp1 OpenFOAM Running, Solving & CFD 2 December 12, 2014 11:58


All times are GMT -4. The time now is 09:45.