[solved], Problem create a FEM mesh from a shape by GMSH

About the development of the FEM module/workbench.

Moderator: bernd

omi06
Posts: 6
Joined: Sun Nov 11, 2018 3:25 pm

[solved], Problem create a FEM mesh from a shape by GMSH

Postby omi06 » Sun Nov 11, 2018 3:57 pm

Hi,

Before I would like to apologize for my English, I'm french and my english is very poor. I hope you will understand my problem without much difficulty :oops:

I have been using FreeCad for some time but I just installed 0.17 on my system for use thermal simulation with FEM.

My FreeCad informations :

OS: Linux Mint 18.3 Sylvia
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.17.13541 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)


I can't generate a mesh with gmsh. I have version 2.10.1 of gmsh which is in the /usr/bin/gmsh directory.
When I run a mesh generation I've got this error:


We are going to start Gmsh FEM mesh run!
Part to mesh: Name --> Box, Label --> Cube, ShapeType --> Solid
CharacteristicLengthMax: 2.0
CharacteristicLengthMin: 1.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.
*** Error in `/usr/bin/gmsh': free(): invalid pointer: 0xb4634b98 ***

If you have an idea, I'm interested, thank you very much.

Romain
Last edited by omi06 on Wed Nov 14, 2018 10:10 am, edited 2 times in total.
User avatar
bernd
Posts: 10528
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Problem create a FEM mesh from a shape by GMSH

Postby bernd » Mon Nov 12, 2018 10:37 am

What geometry did you try to mesh? Try a simple box!

Have you tried to start gmsh gui separately. Open a terminal type in gmsh ... Gmsh gui should start.

bernd
omi06
Posts: 6
Joined: Sun Nov 11, 2018 3:25 pm

Re: Problem create a FEM mesh from a shape by GMSH

Postby omi06 » Mon Nov 12, 2018 2:59 pm

Hi,

Thanks for your answer.

I try to mesh a simple box and gmsh start good when I open a terminal and I start gmsh gui separately...

I don't try to make a mesh with gmsh gui separately... Should I try it ?
User avatar
bernd
Posts: 10528
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Problem create a FEM mesh from a shape by GMSH

Postby bernd » Mon Nov 12, 2018 4:18 pm

You could do that too. Export the geometry in FreeCAD as brep and export the mesh from gmsh gui as unv. BTW: this is exactly what FreeCAD does in background.

Does meshing a simple box in FreeCAD with gmsh object works for you ?


bernd
omi06
Posts: 6
Joined: Sun Nov 11, 2018 3:25 pm

Re: Problem create a FEM mesh from a shape by GMSH

Postby omi06 » Mon Nov 12, 2018 4:32 pm

bernd wrote:
Mon Nov 12, 2018 4:18 pm
You could do that too. Export the geometry in FreeCAD as brep and export the mesh from gmsh gui as unv. BTW: this is exactly what FreeCAD does in background.
Ok I try this.
bernd wrote:
Mon Nov 12, 2018 4:18 pm
Does meshing a simple box in FreeCAD with gmsh object works for you ?

bernd
No I have this error :

We are going to start Gmsh FEM mesh run!
Part to mesh: Name --> Box, Label --> Cube, ShapeType --> Solid
CharacteristicLengthMax: 2.0
CharacteristicLengthMin: 1.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.
*** Error in `/usr/bin/gmsh': free(): invalid pointer: 0xb4634b98 ***

Thank you.
Romain
omi06
Posts: 6
Joined: Sun Nov 11, 2018 3:25 pm

Re: Problem create a FEM mesh from a shape by GMSH

Postby omi06 » Tue Nov 13, 2018 7:16 pm

Hi,

I solved my problem by installing version 4 of gmsh instead of version 2. 8-)

Thank for all.
A++
Romain
User avatar
Kunda1
Posts: 7687
Joined: Thu Jan 05, 2017 9:03 pm

Re: Problem create a FEM mesh from a shape by GMSH

Postby Kunda1 » Wed Nov 14, 2018 12:42 am

Op, Please mark this issue [Solved,] by changing the summary of the first post of this thread.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
kkremitzki
Posts: 2074
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: Problem create a FEM mesh from a shape by GMSH

Postby kkremitzki » Wed Nov 14, 2018 12:46 am

omi06 wrote:
Tue Nov 13, 2018 7:16 pm
Hi,

I solved my problem by installing version 4 of gmsh instead of version 2. 8-)

Thank for all.
A++
Romain
Did you build it yourself or are you using the version from the Community-Extras PPA?
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
omi06
Posts: 6
Joined: Sun Nov 11, 2018 3:25 pm

Re: Problem create a FEM mesh from a shape by GMSH

Postby omi06 » Wed Nov 14, 2018 10:17 am

Hi,
kkremitzki wrote:
Wed Nov 14, 2018 12:46 am
Did you build it yourself or are you using the version from the Community-Extras PPA?
I use the wget function of linux.
On the site of gmsh I found the version that corresponded to my linux and in terminal :

Name-of-my-computer ~ $ cd ~
Name-of-my-computer ~ $ wget http://gmsh.info/bin/Linux/gmsh-4.0.4-Linux32.tgz
Name-of-my-computer ~ $ tar -xzvf gmsh-4.0.4-Linux32.tgz
Name-of-my-computer ~ $ sudo ln -s ~/gmsh-4.0.4-Linux32/bin/gmsh /usr/bin/gmsh

Thank
Romain