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 Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 1, 2021, 04:17
Default Problem with gmshToFoam
  #1
New Member
 
Peter Lysdahl Bęk
Join Date: Nov 2021
Posts: 6
Rep Power: 4
PeterBaek is on a distinguished road
Hello
I am trying to get my Gmsh mesh into my openfoam case


My mesh is described by the following .geo file


//Points
Point(1) = {0, 0, 0, 1.0};
Point(2) = {-0.0027, 0.0058, 0, 1.0};
Point(3) = {-0.00635,0,0,1.0};
Point(4) = {0.045315389,0,0,1.0};
Point(5) = {0.045315389,0.026930913,0,1.0};
Point(8) = {0.046315389,0.025930913,0,1.0};
Point(9) = {0.045315389,0.025930913,0,1.0};
Point(10) = {0.046315389,0,0,1.0};
Point(11) = {-0.0635,0,0,1.0};
Point(12) = {-0.027,0.058,0,1.0};
Point(13) = {0.018315389,0.079130913,0,1.0};
Point(14) = {0.13,0.025930913,0,1.0};
Point(15)={0.13,0,0,1.0};


//lines
Ellipse(2) = {3, 1, 1, 2};
Ellipse(3) = {5, 9,9, 8};
Line(4) = {2, 5};
Line(5) = {8, 10};
Ellipse(6) = {11,1,1,12};
Line(7) = {12,13};
Ellipse(10) = {13,4,4,14};
Line(11)={14,15};
Line(12)={10,15};
Line(13) = {3, 11};
Line(14) = {12, 2};
Line(15) = {5, 13};
Line(16) = {8, 14};



//Superficies
Line Loop(1) = {13, 6, 14, -2};
Plane Surface(1) = {1};
Line Loop(2) = {7, -15, -4, -14};
Plane Surface(2) = {2};
Line Loop(3) = {15, 10, -16, -3};
Plane Surface(3) = {3};
Line Loop(4) = {12, -11, -16, 5};
Plane Surface(4) = {4};

//mesh
Transfinite Line {13, 14} = 50 Using Progression 1.2;
Transfinite Line {14, 15} = 50 Using Progression 0.8;
Transfinite Line {15, 16} = 50 Using Progression 1.2;
Transfinite Line {12, 16} = 50 Using Progression 1.2;

Transfinite Line {5, 11} = 50 Using Progression 1;
Transfinite Line {10, 3} = 50 Using Progression 1;
Transfinite Line {4, 7} = 50 Using Progression 1;
Transfinite Line {2, 6} = 50 Using Progression 1;

Transfinite Surface {1};
Transfinite Surface {2};
Transfinite Surface {3};
Transfinite Surface {4} Right;


Recombine Surface {1};
Recombine Surface {2};
Recombine Surface {3};
Recombine Surface {4};


Extrude {{1, 0, 0}, {0, 0, 0}, 0.1} {
Surface{1}; Surface{2}; Surface{3}; Surface{4}; Layers{1}; Recombine;
}

Physical Surface("lWedge") = {33, 55, 77, 94};
Physical Surface("rWedge") = {4, 3, 2, 1};
Physical Surface("outlet") = {86, 68};
Physical Surface("inlet") = {42, 25};
Physical Surface("cone") = {93, 76, 50, 32};
Physical Volume("internal") = {2, 1, 3, 4};





A screenshot of this is attached below.

When I save my mesh and run gmshToFoam in openfoam I get the following error



---------------------------------------------------------



--> FOAM FATAL IO ERROR:
No cells read from file "BluntedConeMedEnde.msh"
Does your file specify any 3D elements (hex=5, prism=6, pyramid=7, tet=4)?
Perhaps you have not exported the 3D elements?

file: BluntedConeMedEnde.msh at line 39198.

From function void readCells(Foam::scalar, bool, const pointField&, const Foam::Map<long int>&, Foam::IFstream&, Foam::cellShapeList&, Foam::labelList&, Foam::List<Foam::DynamicList<Foam::face> >&, Foam::labelList&, Foam::List<Foam::DynamicList<long int> >&)
in file gmshToFoam.C at line 742.

FOAM exiting

--------------------------------------------------------------------------------------------
a screenshot of the error is also attached.



It seems as if I have not created a 3D mesh, however my case is clearly 3D which confuses me.


I am very new with Gmsh and openFoam so I have just created this mesh from watching different tutorials.



When saving the mesh in Gmsh I save as version 2 ASCII.

I am using openFoam v.1612+ on Ubuntu 16.04 and meshing in Gmsh 4.8.4



Hope someone will be able to help me



/Peter
Attached Images
File Type: jpg Screenshot from 2021-11-01 09-57-55.jpg (140.8 KB, 0 views)
File Type: png Screenshot from 2021-11-01 10-08-52.png (97.4 KB, 0 views)
PeterBaek is offline   Reply With Quote

Reply

Tags
gmsh 4.8.4, gmshtofoam problem, openfoam 1612

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


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