Gmsh generates a mesh with 0 nodes 0 edges 0 faces...

About the development of the FEM module/workbench.

Moderator: bernd

rpardeza
Posts: 11
Joined: Wed Apr 08, 2020 11:20 am

Gmsh generates a mesh with 0 nodes 0 edges 0 faces...

Post by rpardeza »

Hi everybody.

Following example FemCalculixCantilever3D.FCStd and some videos on YouTube I could make a simple mesh of a bar and then an analysis.

But after that successful analysis, I have been unable to perform any other, even with the most simple solids.

Repeating example FemCalculixCantilever3D.FCStd, and trying to reproduce the example, from the example's cube gmsh produces the mesh of my bar (sounds weird, but it is)

I don't know if it is a configuration problem of FreeCAD or gmsh, a folder permission's problem or what. I've been reading your post about problems with gmsh but they didn't help me.

Could you help me?

I copy my confugurations:

OS: Linux Mint 19.1
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.18.4.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Spanish/Spain (es_ES)

~$ gmsh -info
Version : 3.0.6
License : GNU General Public License
Build OS : Linux32
Build date : 20171107
Build host : lgw01-amd64-036
Build options : Ann Bamg Bfgs Blas(Generic) Blossom C++11 Cgns Chaco DIntegration Dlopen Fltk Gmm Jpeg Kbipack Lapack(Generic) LinuxJoystick MPI MathEx Med Mesh Mmg3d Mpeg NativeFileChooser Netgen ONELAB ONELABMetamodel OpenCASCADE OpenGL OptHom Parser Plugins Png Post Python Solver TetGen/BR Tetgen Voro3D Zlib
FLTK version : 1.3.4
OCC version : 6.9.1
MED version : 3.0.6
Packaged by : buildd
Web site : http://gmsh.info
Mailing list : gmsh@onelab.info
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Gmsh generates a mesh with 0 nodes 0 edges 0 faces...

Post by bernd »

Would you post a file an write exact the steps you did with the file and what did not work as you would like to have it.

Another hint. If you work with FEM you should use the lates 0.19 dev versions. There have been tons of fixes for FEM over the last year and 0.19 dev is pretty stable already.
rpardeza
Posts: 11
Joined: Wed Apr 08, 2020 11:20 am

Re: Gmsh generates a mesh with 0 nodes 0 edges 0 faces...

Post by rpardeza »

The steps are the following:

1) On Part, create a box solid 10x10x10,
2) On FEM, create Analysis,
3) select material (wood-generic in this case),
4) select fixed constraint on one face,
5) select constrainst force on another face,
6) select the box and "create a FEM mesh from a shape by gmsh mesher",
7) leave max and min element size as 0.00 (auto),
8) click on Apply,
9) the output of gmsh on the task dialog windows is:

Code: Select all

0.0: We are going to start ...
0.0: Start Gmsh ...
0.4: Clean run of Gmsh
0.4: Gmsh done!
10) No error, but in the terminal, FreeCAD output is:

Code: Select all

~$ freecad
FreeCAD 0.18.4, Libs: 0.18.4R
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

card_path: 
Previously used material card cannot be found in material directories. Add document material.
For some reason all material data is empty!
Density not found in material data of: Empty
YoungsModulus not found in material data of: Empty
PoissonRatio not found in material data of: Empty
ThermalConductivity not found in material data of: Empty
ThermalExpansionCoefficient not found in material data of: Empty
SpecificHeat not found in material data of: Empty
False
ThermalConductivity not found in material data of: Wood
ThermalExpansionCoefficient not found in material data of: Wood
SpecificHeat not found in material data of: Wood
Active analysis found: Analysis
Active analysis found: Analysis

We are going to start Gmsh FEM mesh run!
  Part to mesh: Name --> Box,  Label --> Cubo, ShapeType --> Solid
  CharacteristicLengthMax: 1e+22
  CharacteristicLengthMin: 0.0
  ElementOrder: 2
  ElementDimension: 3
  /tmp/Box_Geometry.brep
  /tmp/Box_Mesh_TmpGmsh.unv
  /tmp/shape2mesh.geo
  /usr/bin/gmsh
  Group meshing for analysis.
  Empty reference: SolidMaterial
  One material with no reference shapes. No need to make a group for materials.
  {'FemConstraintFixed': ['Face1'], 'FemConstraintForce': ['Face6']}
Unexpected error when creating mesh:  <class 'RuntimeError'>
11) The object FEM mesh is created, but with 0 nodes 0 edges 0 faces...

And of course, no results of analysis can be obtained with that mesh.
Last edited by rpardeza on Wed Apr 08, 2020 7:12 pm, edited 1 time in total.
rpardeza
Posts: 11
Joined: Wed Apr 08, 2020 11:20 am

Re: Gmsh generates a mesh with 0 nodes 0 edges 0 faces...

Post by rpardeza »

I'm trying to do it again but gmsh spends more and more time... it looks like gmsh is busy or too slow.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Gmsh generates a mesh with 0 nodes 0 edges 0 faces...

Post by bernd »

would you test it the short way ...

- start FreeCAD
- go to Part make a Box
- go to FEM select the Box, make a mesh gmsh object
- click on apply --> for me a mesh is created and shown in around two second
- click on ok

box-mesh.FCStd
(93.57 KiB) Downloaded 17 times

Screenshot_20200408_230127.png
Screenshot_20200408_230127.png (86.86 KiB) Viewed 1046 times
rpardeza
Posts: 11
Joined: Wed Apr 08, 2020 11:20 am

Re: Gmsh generates a mesh with 0 nodes 0 edges 0 faces...

Post by rpardeza »

Hi, thak you for your efforts.

I've tried the simple way you've just recommended. No mesh.
freecad gmsh problem.png
freecad gmsh problem.png (117.37 KiB) Viewed 1037 times
I've attached several files:

-Screenshot where you can see the generated mesh and 0 nodes 0 edges...
-FCStd file
-.brep and .geo files in case they may help (geo file is renamed adding .txt, in order to upload. Just remove .txt)

FreeCAD send on terminal the following error:

Code: Select all

FreeCAD 0.18.4, Libs: 0.18.4R
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##


We are going to start Gmsh FEM mesh run!
  Part to mesh: Name --> Box,  Label --> Cubo, ShapeType --> Solid
  CharacteristicLengthMax: 1e+22
  CharacteristicLengthMin: 0.0
  ElementOrder: 2
  ElementDimension: 3
  /tmp/Box_Geometry.brep
  /tmp/Box_Mesh_TmpGmsh.unv
  /tmp/shape2mesh.geo
  /usr/bin/gmsh
  No Group meshing for analysis.
Unexpected error when creating mesh:  <class 'RuntimeError'>
Attachments
shape2mesh.geo.txt
(1.54 KiB) Downloaded 21 times
Box_Geometry.brep
(3.89 KiB) Downloaded 17 times
freecad gmsh problem.FCStd
(4.94 KiB) Downloaded 17 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Gmsh generates a mesh with 0 nodes 0 edges 0 faces...

Post by bernd »

Strange ... Would you check your gmsh installation as follows ... Are you able to run gmsh on the shell, with the commands provided at the end of the geo file? Does gmsh create a unv mesh file?
rpardeza
Posts: 11
Joined: Wed Apr 08, 2020 11:20 am

Re: Gmsh generates a mesh with 0 nodes 0 edges 0 faces...

Post by rpardeza »

That is the result:

Code: Select all

~$ /usr/bin/gmsh /tmp/shape2mesh.geo
Delaunizing vertices...
Delaunay seconds:  0.001916
Creating surface mesh ...
Surface mesh seconds:  0.000592
Recovering boundaries...
gmsh: /build/tetgen-OYksSp/tetgen-1.5.0/tetgen.cxx:19561: int tetgenmesh::recoverfacebyflips(tetgenmesh::point, tetgenmesh::point, tetgenmesh::point, tetgenmesh::face*, tetgenmesh::triface*): Assertion `dest(*searchtet) == fc.fac[(i+1)%3]' failed.
[Gerion:22281] *** Process received signal ***
[Gerion:22281] Signal: Aborted (6)
[Gerion:22281] Signal code:  (-6)
[Gerion:22281] [ 0] linux-gate.so.1(__kernel_rt_sigreturn+0x0)[0xb7ed9d20]
[Gerion:22281] [ 1] linux-gate.so.1(__kernel_vsyscall+0x9)[0xb7ed9d09]
[Gerion:22281] [ 2] /lib/i386-linux-gnu/libc.so.6(gsignal+0xc2)[0xb687a832]
[Gerion:22281] [ 3] /lib/i386-linux-gnu/libc.so.6(abort+0x121)[0xb687bcc1]
[Gerion:22281] [ 4] /lib/i386-linux-gnu/libc.so.6(+0x257bb)[0xb68727bb]
[Gerion:22281] [ 5] /lib/i386-linux-gnu/libc.so.6(+0x25819)[0xb6872819]
[Gerion:22281] [ 6] /usr/lib/i386-linux-gnu/libtet.so.1.5(_ZN10tetgenmesh18recoverfacebyflipsEPdS0_S0_PNS_4faceEPNS_7trifaceE+0x637)[0xb637cd57]
[Gerion:22281] [ 7] /usr/lib/i386-linux-gnu/libtet.so.1.5(_ZN10tetgenmesh15recoversubfacesEPNS_9arraypoolEi+0x307)[0xb638dcd7]
[Gerion:22281] [ 8] /usr/lib/i386-linux-gnu/libtet.so.1.5(_ZN10tetgenmesh15recoverboundaryERl+0x4fa)[0xb63986da]
[Gerion:22281] [ 9] /usr/lib/i386-linux-gnu/libtet.so.1.5(_Z14tetrahedralizeP14tetgenbehaviorP8tetgenioS2_S2_S2_+0x4003)[0xb63a9db3]
[Gerion:22281] [10] /usr/lib/i386-linux-gnu/libtet.so.1.5(_Z14tetrahedralizePcP8tetgenioS1_S1_S1_+0x365)[0xb63aa525]
[Gerion:22281] [11] /usr/lib/i386-linux-gnu/libgmsh.so.3(_Z24MeshDelaunayVolumeTetgenRSt6vectorIP7GRegionSaIS1_EE+0x1018)[0xb71ff8d8]
[Gerion:22281] [12] /usr/lib/i386-linux-gnu/libgmsh.so.3(_Z18MeshDelaunayVolumeRSt6vectorIP7GRegionSaIS1_EE+0x5b)[0xb72007cb]
[Gerion:22281] [13] /usr/lib/i386-linux-gnu/libgmsh.so.3(_Z12GenerateMeshP6GModeli+0x2677)[0xb71960a7]
[Gerion:22281] [14] /usr/lib/i386-linux-gnu/libgmsh.so.3(_ZN6GModel4meshEi+0x1c)[0xb6f9c1cc]
[Gerion:22281] [15] /usr/lib/i386-linux-gnu/libgmsh.so.3(_Z12gmsh_yyparsev+0x133df)[0xb74e90f9]
[Gerion:22281] [16] /usr/lib/i386-linux-gnu/libgmsh.so.3(_Z9ParseFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb+0x1d5)[0xb6e48575]
[Gerion:22281] [17] /usr/lib/i386-linux-gnu/libgmsh.so.3(_ZN6GModel7readGEOERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1d)[0xb6fa508d]
[Gerion:22281] [18] /usr/lib/i386-linux-gnu/libgmsh.so.3(_Z9MergeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbbb+0x2c42)[0xb6e48392]
[Gerion:22281] [19] /usr/lib/i386-linux-gnu/libgmsh.so.3(_Z11OpenProjectRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x6ad)[0xb6e49ced]
[Gerion:22281] [20] /usr/lib/i386-linux-gnu/libgmsh.so.3(_Z8GmshFLTKiPPc+0xbc)[0xb6de665c]
[Gerion:22281] [21] /usr/bin/gmsh(main+0xbd)[0x40bd4d]
[Gerion:22281] [22] /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0xb6865e81]
[Gerion:22281] [23] /usr/bin/gmsh(+0xef9)[0x40bef9]
[Gerion:22281] *** End of error message ***
Abortado (`core' generado)
and gmsh is aborted
rpardeza
Posts: 11
Joined: Wed Apr 08, 2020 11:20 am

Re: Gmsh generates a mesh with 0 nodes 0 edges 0 faces...

Post by rpardeza »

bernd wrote: Thu Apr 09, 2020 7:51 am Strange ... Would you check your gmsh installation as follows ... Are you able to run gmsh on the shell, with the commands provided at the end of the geo file? Does gmsh create a unv mesh file?
No unv mesh file created.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Gmsh generates a mesh with 0 nodes 0 edges 0 faces...

Post by bernd »

OK we now gmsh binary is the culprit. We had similar gmsh problems on Linux before, but I can not remember the topic.

Are you able to to do the following:
- start gmsh gui
- import the brep of a simple cube
- mesh the cube in gmsh gui
- export as unv


- BTW this unv can be opened in FreeCAD
Post Reply