CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Gmsh] Converting gmsh to OpenFoam (https://www.cfd-online.com/Forums/openfoam-meshing/188686-converting-gmsh-openfoam.html)

Friendly June 4, 2017 16:58

Converting gmsh to OpenFoam
 
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

knut September 27, 2017 19:24

Hi,

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

Cheers

crizpi21 June 24, 2018 08:35

Hi,

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

Thanks!

deepbandivadekar June 26, 2018 05:46

Same for me. I've started a thread here https://www.cfd-online.com/Forums/op...oam-5-0-a.html. No solution yet.


All times are GMT -4. The time now is 15:56.