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

[Gmsh] Converting gmsh to OpenFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Friendly

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 4, 2017, 16:58
Smile Converting gmsh to OpenFoam
  #1
Member
 
Join Date: Jun 2017
Posts: 73
Rep Power: 8
Friendly is on a distinguished road
Hello everyone,

I have a problem to convert my gmsh mesh file to OpenFoam. I am just starting to use OpenFoam and hope u can help me with my first test case. Its just to test how to convert gmsh to OpenFoam. The mesh has to be edited to run a simulation.

This is the Error Warning I have received:

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

Case : /home/TestTest
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
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:2
Surface 1 wall
Volume 2 internalVolume

Starting to read points at line 10
Vertices to be read:225
Vertices read:225

Starting to read cells at line 238
Cells to be read:304

Mapping region 1 to Foam patch 0
Mapping region 2 to Foam cellZone 0
Cells:
total:128
hex :128
prism:0
pyr :0
tet :0

CellZones:
Zone Size
0 128

Skipping tag at line 545
Patch 0 gets name wall

--> FOAM Warning :
From function Foam::polyMesh::polyMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, 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 595
Found 160 undefined faces in mesh; adding to default patch.
Finding faces of patch 0
--> FOAM Warning : Not using gmsh face 4(81 84 85 82) since zero vertex is not on boundary of polyMesh
--> FOAM Warning : Not using gmsh face 4(82 85 86 83) since zero vertex is not on boundary of polyMesh
--> FOAM Warning : Not using gmsh face 4(83 86 64 63) since zero vertex is not on boundary of polyMesh
--> FOAM Warning : Not using gmsh face 4(84 87 88 85) since zero vertex is not on boundary of polyMesh
--> FOAM Warning : Not using gmsh face 4(85 88 89 86) since zero vertex is not on boundary of polyMesh
--> FOAM Warning : Not using gmsh face 4(86 89 65 64) since zero vertex is not on boundary of polyMesh
--> FOAM Warning : Not using gmsh face 4(87 53 52 88) since zero vertex is not on boundary of polyMesh
--> FOAM Warning : Not using gmsh face 4(88 52 51 89) since zero vertex is not on boundary of polyMesh
--> FOAM Warning : Not using gmsh face 4(89 51 3 65) since zero vertex is not on boundary of polyMesh

FaceZones:
Zone Size
0 16

Writing zone 0 to cellZone internalVolume and cellSet
Writing zone 0 to faceZone wall and faceSet
End

And this is my .geo file. I have defined all the physical surfaces and volumes and cannot find my mistake. I hope you do!

Point(1) = {0, 0, 0, 1.0};
Point(2) = {1, 0, 0, 1.0};
Point(3) = {0, 1, 0, 1.0};
Point(4) = {1, 1, 0, 1.0};
Point(5) = {2, 1, 0, 1.0};
Point(6) = {2, 0, 0, 1.0};
Point(7) = {0, 0, 1, 1.0};
Point(8) = {1, 0, 1, 1.0};
Point(9) = {0, 1, 1, 1.0};
Point(10) = {1, 1, 1, 1.0};
Point(11) = {2, 1, 1, 1.0};
Point(12) = {2, 0, 1, 1.0};
Line(1) = {7, 9};
Line(2) = {9, 10};
Line(3) = {10, 11};
Line(4) = {11, 12};
Line(5) = {12, 8};
Line(6) = {8, 7};
Line(7) = {10, 8};
Line(8) = {1, 3};
Line(9) = {3, 4};
Line(10) = {4, 5};
Line(11) = {5, 6};
Line(12) = {6, 2};
Line(13) = {2, 1};
Line(14) = {4, 2};
Line(15) = {7, 1};
Line(16) = {9, 3};
Line(17) = {8, 2};
Line(18) = {10, 4};
Line(19) = {12, 6};
Line(20) = {11, 5};

Line Loop(21) = {15, 8, -16, -1};
Plane Surface(22) = {21};
Line Loop(23) = {17, -14, -18, 7};
Plane Surface(24) = {23};
Line Loop(25) = {19, -11, -20, 4};
Plane Surface(26) = {25};
Line Loop(27) = {6, 1, 2, 7};
Plane Surface(28) = {27};
Line Loop(29) = {3, 4, 5, -7};
Plane Surface(30) = {29};
Line Loop(31) = {13, 8, 9, 14};
Plane Surface(32) = {31};
Line Loop(33) = {14, -12, -11, -10};
Plane Surface(34) = {33};
Line Loop(35) = {15, -13, -17, 6};
Plane Surface(36) = {35};
Line Loop(37) = {16, 9, -18, -2};
Plane Surface(38) = {37};
Line Loop(39) = {18, 10, -20, -3};
Plane Surface(40) = {39};
Line Loop(41) = {17, -12, -19, 5};
Plane Surface(42) = {41};


Surface Loop(43) = {22, 36, 32, 38, 28, 24};
Volume(44) = {43};
Surface Loop(45) = {42, 34, 26, 40, 30, 24};
Volume(46) = {45};

Transfinite Line {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,2 0} = 5;
Transfinite Surface {22,24,26,28,30,32,34,36,38,40,42};
Recombine Surface {22,24,26,28,30,32,34,36,38,40,42};
Transfinite Volume {44,46};
Recombine Volume {44,46};

Physical Surface ("wall") = {22,24,26,28,30,32,34,36,38,40,42};
Physical Volume ("internalVolume") = {44,46};


Have a great day,

Friendly
arashgmn likes this.
Friendly is offline   Reply With Quote

Old   September 27, 2017, 19:24
Default
  #2
New Member
 
Join Date: Feb 2012
Posts: 2
Rep Power: 0
knut is on a distinguished road
Hi,

I've got the exact same problem, did you manage to solve it?

Cheers
knut is offline   Reply With Quote

Old   June 24, 2018, 08:35
Default
  #3
Member
 
Cristina Hernandez
Join Date: May 2018
Posts: 35
Rep Power: 7
crizpi21 is on a distinguished road
Hi,

I am also getting this problem. Did you find any solution?

Thanks!
crizpi21 is offline   Reply With Quote

Old   June 26, 2018, 05:46
Default
  #4
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Same for me. I've started a thread here https://www.cfd-online.com/Forums/op...oam-5-0-a.html. No solution yet.
deepbandivadekar is offline   Reply With Quote

Reply

Tags
convert, gmsh, openfoam


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
Getting Started with OpenFOAM wyldckat OpenFOAM 25 August 14, 2022 13:55
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 13:36
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 03:52
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 06:25
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 10:56


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