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

[Gmsh] No 3D-elements found

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2019, 04:00
Default No 3D-elements found
  #1
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
Hi guys,
I am well aware that there are at least a dozen threads asking the same thing. I am deperately trying to get a valid 3d mesh out of gmsh to use with openfoam. I went through the first 3 pages of google results on this topic but no "solution" that worked for others seem to work for me. Maybe something is wrong with my overall process or I dont know.

Ok here is what I'm doing: I use professional CAD software (Solidworks) to create the geometry. This can be quite complex, but for now I used a very simple geometry: a cube with sides 500mm and 3 pipes coming 200mm out of it. Then export this to .stp. Creating the geometry in gmsh is not really an option for me.
Anyway, then I go and use
Code:
SetFactory("OpenCASCADE");
Merge "Geometry.step";
in the .geo file. It is loaded just fine without errors or warnings. I can see all the edges, faces and one volume. I add each surface to a physical patch and the one volume I have to a physical volume:
Code:
Physical Surface("INLET") = {11};
Physical Surface("OUTLET1") = {12};
Physical Surface("OUTLET2") = {15};
Physical Surface("WALLS") = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 14};
Physical Volume("CUBE") = {1};
(Not assigning a physical volume seems to be the mistake 99% of the people having the same issue are doing)
Then I use the GUI to create a 3D mesh (Delauney algorithms, converting to hexas). The mesh is created without any error or warning message. I can see the 3D elements, they are also listed under Tools->Statistics-> 150k Hexahedra.

I then go to export the .msh file using the Export with "Mesh - Gmsh MSH (*.msh)" format. In the following dialog I use "Version 2 ASCII" which seems to be the format supported by OpenFOAM. I also check "save all elements". -> .msh file is generated.
I put this file in an open foam case and run "gmshToFoam Geometry.msh" which complains about some unhandled elements (error can be ignored from what I found with my research?) and finally tells me that there are not 3D elements.
Any idea what could be wrong will be very appreciated. I also tried exporting the mesh in other formats and tried to import to CFX which tells me the same thing: no 3D elements found. So I figured something must be wrong in my gmsh process but I cant figure out what.

Thanks in advance!
AtoHM is offline   Reply With Quote

Old   July 9, 2019, 02:32
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
I was missing the
Code:
Physical Volume("CUBE") = {1}
When I was trying to get my mesh to CFX. With that included, one can export it as a .bdf file which is readily known by CFX Pre as "Nastran" mesh file.

However it is still unresolved how to get the mesh to OpenFoam.
AtoHM is offline   Reply With Quote

Reply

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
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' muth OpenFOAM Running, Solving & CFD 3 August 27, 2018 04:18
fireFoam.1.7.x_0.4 compilation error !link OpenFOAM Installation 9 December 24, 2012 04:15
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01
OpenFOAM15 installables are incomplete problem with paraFoam tryingof OpenFOAM Bugs 17 December 7, 2008 04:41
Problem of compilation OF 14Allwmake command not found erik_d OpenFOAM Bugs 13 September 13, 2008 21:45


All times are GMT -4. The time now is 21:39.