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

[Gmsh] Problem with gmshToFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 3, 2017, 13:25
Unhappy Problem with gmshToFoam
  #1
New Member
 
Join Date: Jan 2017
Posts: 5
Rep Power: 9
bengir is on a distinguished road
Hello everybody.
I am a beginner with Openfoam and I am trying to model the flow past a sphere with an axisymmetric study. I created my mesh with gmsh but when I am using gmshToFoam I have the following error message :
Code:
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:8
    Line 4    axis
    Surface 1    inlet
    Surface 2    outlet
    Surface 3    wall
    Surface 5    sphere
    Surface 6    front
    Surface 7    back
    Volume 8    interior

Starting to read points at line 16
Vertices to be read:22920
Vertices read:22920

Starting to read cells at line 22939
Cells to be read:22685

Unhandled element 1 at line 22941
Unhandled element 1 at line 22942
................
Unhandled element 1 at line 23035
Unhandled element 1 at line 23036
..............
Unhandled element 1 at line 23087
Mapping region 7 to Foam patch 0
Mapping region 8 to Foam cellZone 0
Cells:
    total:11269
    hex  :11137
    prism:132
    pyr  :0
    tet  :0

CellZones:
Zone    Size
    0    11269

Skipping tag  at line 45627
Patch 0 gets name back

--> 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 22906 undefined faces in mesh; adding to default patch.
Finding faces of patch 0

FaceZones:
Zone    Size

Writing zone 0 to cellZone interior and cellSet
End
I don't understand what it the problem.
That is my .geo file so you will probably find the problem (I hope )

Code:
cl__1 = 1;


Point(1) = {-100, 0, 0, 1};
Point(2) = {200, 0, 0, 1};
Point(3) = {-100, 100, 0, 1};
Point(4) = {200, 100, 0, 1};
Point(5) = {-7.5, 0, 0, 1.0};
Point(6) = {7.5, 0, 0, 1.0};
Point(7) = {0, 0, 0, 1.0};

Point(11) = {100, 0, 0, 1.0};
Point(12) = {100, 100, 0, 1.0};


//sphere
Point(8) = {5.3033008589, 5.3033008589, 0, 1.0};
Point(9) = {-5.3033008589, 5.3033008589, 0, 1.0};
Point(10) = {5.3033008589, 5.3033008589, 0, 1.0};



//lignes domaine
Line(1) = {3, 1};
Line(2) = {12, 11};
Line(3) = {4, 2};
Line(4) = {3, 12};
Line(5) = {12, 4};
Line(6) = {1, 5};
Line(7) = {6, 11};
Line(8) = {11, 2};
Line(95) = {5, 6};


//sphere
Circle(9) = {5, 7, 9};
Circle(10) = {9, 7, 8};
Circle(11) = {8, 7, 6};

//lignes bloc
Line(12) = {3, 9};
Line(13) = {12, 8};

Transfinite Line {4} = 60 Using Progression 1;
Transfinite Line {5, 8} =15 Using Progression 1;
Transfinite Line {1} = 60 Using Progression 1;
Transfinite Line {2, 3} = 60 Using Progression 0.96;
Transfinite Line {11, 10, 9} = 60 Using Progression 1;
Transfinite Line {10} = 60 Using Progression 1;
Transfinite Line {12} = 60 Using Progression 0.9;
Transfinite Line {13} = 60 Using Progression 0.9;
Transfinite Line {6} = 60 Using Progression 0.9;
Transfinite Line {7} = 60 Using Progression 1.1;


//surfaces
Line Loop(14) = {12, 10, -13, -4};
Plane Surface(15) = {14};
Line Loop(16) = {12, -9, -6, -1};
Plane Surface(17) = {16};
Line Loop(18) = {13, 11, 7, -2};
Plane Surface(19) = {18};
Line Loop(20) = {5, 3, -8, -2};
Plane Surface(21) = {20};
Transfinite Surface {17};
Transfinite Surface {15};
Transfinite Surface {19};
Transfinite Surface {21};
Recombine Surface {17};
Recombine Surface {15};
Recombine Surface {19};
Recombine Surface {21};





Extrude {{1,0,0}, {0,0,0},Pi/36} {
Surface{17, 15, 19, 21}; 
Layers{1};
Recombine; }

Physical Surface("inlet") = {37};//inlet
Physical Surface("outlet") = {89};//outlet
Physical Surface("wall") = {59, 86};//wall haut
Physical Line("axis") = {6, 7, 8, 95};//ligne sym
Physical Surface("sphere") = {51, 72, 33};//sphere
Physical Surface("front") = {38, 60, 77, 94};//front
Physical Surface("back") = {17, 15, 19, 21};//back
Physical Volume("interior") = {1, 2, 3, 4};//interior
Thanks in advance,
Cheers,
Ben
bengir is offline   Reply With Quote

Old   January 5, 2017, 06:12
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

You have two kinds of warnings in your output:

1. Unhandled element type.
2. Standard "Found ... undefined faces in mesh; adding to default patch."

The second should be ignored, you can find explanation of the forum.

The first is caused by "2-node line" elements (type 1 in Gmsh terminology) in MSH file, which are generated due to this line:

Code:
Physical Line("axis") = {6, 7, 8, 95};//ligne sym
gmshToFoam indeed can not handle this type of elements. So, you can try to remove above mentioned line.
sourav90 likes this.
alexeym is offline   Reply With Quote

Old   January 5, 2017, 06:45
Smile
  #3
New Member
 
Join Date: Jan 2017
Posts: 5
Rep Power: 9
bengir is on a distinguished road
Thanks for your answer!
I don't have the message "unhandled..." anymore , nevertheless I still have one problem.
When I check my "boundary" file into "poly mesh", I just have 2 zone : "back" and "defaultFaces". I don't know why the other zone are not created.
Do you have any idea?
bengir is offline   Reply With Quote

Old   January 5, 2017, 13:45
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

You have used wrong IDs, when defined physical surfaces. So in resulting MSH there is only physical surface 6 (back) and physical volume 7 (interior). Guess there are other faces, which do not belong to any physical surfaces and they are added to defaultFaces.
alexeym is offline   Reply With Quote

Old   January 5, 2017, 14:00
Default
  #5
New Member
 
Join Date: Jan 2017
Posts: 5
Rep Power: 9
bengir is on a distinguished road
Hi,
Thanks, I modified something and so I forgot to change ID's. Obviously, now, I have something wrong again. When I do a checkMesh I have a fatal error :

Code:
wedge wedge1 plane aligns with coordinate plane
Does that mean I have to change that plane thanks to a rotate extrusion? I did it before but then there were some fatal error about the normal of wedge plane...

I'm sorry for all that questions but I really want to understand that axisymmetric problem.

Thanks in advance,

Ben.
bengir is offline   Reply With Quote

Old   January 5, 2017, 14:16
Default
  #6
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Wedge-type boundaries should not align with coordinate planes, so before extrusion you need to rotate plane you would like to extrude, since you have constructed geometry in X-Y plane. In general, I rotate plane by -alpha radians and then extrude by 2*alpha radians. 2*alpha should be less than 5 degrees, so usually alpha = Pi/180.
alexeym is offline   Reply With Quote

Old   January 5, 2017, 15:04
Default
  #7
New Member
 
Join Date: Jan 2017
Posts: 5
Rep Power: 9
bengir is on a distinguished road
It's working now!
I jus have to launch some calculations now, thanks
bengir is offline   Reply With Quote

Reply

Tags
gmshtofoam problem, openfoam error


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
area does not match neighbour by ... % -- possible face ordering problem St.Pacholak OpenFOAM 11 September 4, 2024 05:28
Convergence Problem in Multiphase problem (three phases) m.uzair FLUENT 0 August 2, 2018 09:23
Large problem partitioner tzy CFX 3 February 7, 2018 18:11
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 07:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13


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