Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2018-10-27 00:06:48

MrSnail
Member
Registered: 2018-10-26
Posts: 35

Aster doesnt read mesh from GMSH

Hi All,

I am a beginner with CA and started the book called "Beginning with Code_Aster".
I downloaded CAE Linux 2017 (which means Aster 13.4) and GMSH 4.0.4 after.
These versions are a bit newer than what the author used in the book and unfortunately there are some minor changes so not everything goes the same way as written in the book.
I just encountered the following problem:
I made a frame in GMSH 4.0.4 and meshed it. (This is actually chapter 3 in the book) I tried to save the mesh file (what I would like to use with Aster later) in MED format. I assume that this med format is supposed to be the same what Aster reads when both the geometry and mesh is done in Salome. So I decided to try to make Aster read the mesh produced by GMSH instead of typing the command file manually. (theoretically it should work, shouldnt it?)

1., But then I realized that the menu in GMSH->File has been changed and there is no longer "Save As" button.
I can save the mesh with "Save Mesh" but this saves it only in msh format. I dont have the option to change it, and Aster doesnt recognize this msh. Than I tried File->"Export.." where I can choose MED extension but I get error message if I want to import it to Aster.
I tried to import it in 2 different ways.
The first was to go to Mesh module in Salome and File->Import->frame1.med. Aster says: The file is incorrect, some data is missed. (Just produced it with GMSH 1 min ago)
The second way was to launch the Aster Study and read the mesh by the common way, Mesh->Read Mesh and than selecting med file manually. Than Aster says: std::bad_alloc

I was trying to find an answer in both aster and gmsh forums but did not really find anything.
Does anybody know what did I do wrong?
Or would you suggest me to go back to elder versions of these software where the menu is the same as used in the book?
Well I have enclosed the geo/med/msh files here just in case.

Any help/explanation will be appreciated!


Attachments:
frame1.rar, Size: 3.7 KiB, Downloads: 310

Offline

#2 2018-11-08 08:42:17

jeanpierreaubry
Guru
From: nantes (france)
Registered: 2009-03-12
Posts: 3,707

Re: Aster doesnt read mesh from GMSH

hello

this come from a difference in med library
i agree this is some sort an un-documented nightmare!
to make things simple we have
med 3.3 with code_aster  14.x and 13.6 and gmsh 4.x
med 3.2 with code_aster  13.4 and before and gmsh 3.07 and before
try using compatible programs

jean pierre aubry

Last edited by jeanpierreaubry (2018-11-13 06:35:01)


consider reading my book
freely available here https://framabook.org/beginning-with-code_aster/

Offline

#3 2018-11-13 00:12:06

MrSnail
Member
Registered: 2018-10-26
Posts: 35

Re: Aster doesnt read mesh from GMSH

Thank you Mr Aubry, it seems to work with an older GMSH.

However, I would like to ask one more thing as I just came across another interesting situation with the same example.
As it is written in the book I predefined several groups in mesh for beams and nodes and they work very well when I define supports and loads. But when it comes to define GROUP_NO for printing reaction forces into table, the selection box from where I should select node groups is totally blank. Without node group selection, the command does not work.
So I dont understand why is it blank if I predefined my group and I am able to reach/use them in other commands.
If somebody could enlighten me, I would really appreciate that.


Attachments:
Untitled.jpg, Size: 220.48 KiB, Downloads: 235

Offline

#4 2018-11-13 20:34:11

MrSnail
Member
Registered: 2018-10-26
Posts: 35

Re: Aster doesnt read mesh from GMSH

And I found the answer for my own question here in this topic:

<AsterStudy> Can't see group in POST_RELEVE_T and POST_ELEM

(I am not allowed to post the link)

Known issues document:
POST_RELEVE_T command
During the edition of the POST_RELEVE_T command, the link with the mesh is not activated until the modifications of the ACTION  factor keyword or the whole command are validated.

Last edited by MrSnail (2018-11-13 20:37:59)

Offline

#5 2019-02-14 15:05:15

J_Berthellemy
Member
From: Champs-sur-Marne
Registered: 2009-04-29
Posts: 70

Re: Aster doesnt read mesh from GMSH

Hi Jean-Pierre !

I am just making a test to move from Aster-12-stable to Aster-13.6-stable.

In order to follow your recommendation, I downloaded first GMSH-4.

But the generated MED file was not read correcly. Do you know why ?

3 useful files  attached.

Jacques.


   !----------------------------------------------------------------!
   ! <A> <MODELISA9_44>                                             !
   !                                                                !
   !  fichier MED :  fort.20 maillage :   erreur numéro  -1         !
   !                                                                !
   !                                                                !
   ! Ceci est une alarme. Si vous ne comprenez pas le sens de cette !
   ! alarme, vous pouvez obtenir des résultats inattendus !         !
   !----------------------------------------------------------------!
   
   
   !------------------------------------------------------------------------------------------!
   ! <EXCEPTION> <PREPOST3_10>                                                                !
   !                                                                                          !
   !  soit le fichier n'existe pas, soit c'est une mauvaise version de HDF (utilise par MED). !
   !------------------------------------------------------------------------------------------!


Attachments:
pour_forum.zip, Size: 141.07 KiB, Downloads: 282

https://www.researchgate.net/profile/Jacques_Berthellemy
Ubuntu 18.04 LTS  64 bits 15,7 Gio  8 CPU et/ou Red-Hat 250 Gio 57 CPU

Offline

#6 2019-02-14 21:10:45

MrSnail
Member
Registered: 2018-10-26
Posts: 35

Re: Aster doesnt read mesh from GMSH

Hi

I am able to read the mesh but the error message I get is that the groups do not form part of the mesh.
Also there is an error sign when I just import the med into the CA mesh module.
With compatibility problem, I am not sure I would able to read the mesh at all (just happened to me when I opened this topic)
I use GMSH 4.0.4 with Code_Aster_Win stable 13.6, they sure are compatible.
I might have an idea what is wrong but if I am right, not possible to trace it back from the med.
Can we actually have the geo file for GMSH?


Attachments:
chamangl.jpg, Size: 28.25 KiB, Downloads: 190

Offline

#7 2019-02-15 13:40:52

J_Berthellemy
Member
From: Champs-sur-Marne
Registered: 2009-04-29
Posts: 70

Re: Aster doesnt read mesh from GMSH

Hi MrSnail thx for the answer.

I used Gmsh 4.1.4  which is packaged to make MED files with version 3.3.1

So I will try to find Gmsh 4.0.4

I add the geo file as attached file ( sorry I forgot to joint it with the first post ).
Of course the example ran all right with  Aster-12-stable and pre-GMSH.

Jacques.


Attachments:
chamangl.geo, Size: 12.21 KiB, Downloads: 280

https://www.researchgate.net/profile/Jacques_Berthellemy
Ubuntu 18.04 LTS  64 bits 15,7 Gio  8 CPU et/ou Red-Hat 250 Gio 57 CPU

Offline

#8 2019-02-15 13:55:26

J_Berthellemy
Member
From: Champs-sur-Marne
Registered: 2009-04-29
Posts: 70

Re: Aster doesnt read mesh from GMSH

MrSnail wrote:

I use GMSH 4.0.4

Impossible to find Gmsh 4.0.4 in february 2019 sad
Could you please attach an installation file either for windows or for Ubuntu ?


https://www.researchgate.net/profile/Jacques_Berthellemy
Ubuntu 18.04 LTS  64 bits 15,7 Gio  8 CPU et/ou Red-Hat 250 Gio 57 CPU

Offline

#9 2019-02-15 17:14:30

J_Berthellemy
Member
From: Champs-sur-Marne
Registered: 2009-04-29
Posts: 70

Re: Aster doesnt read mesh from GMSH

MrSnail wrote:

med

I also changes all med suffixes into mmed !


https://www.researchgate.net/profile/Jacques_Berthellemy
Ubuntu 18.04 LTS  64 bits 15,7 Gio  8 CPU et/ou Red-Hat 250 Gio 57 CPU

Offline

#10 2019-02-15 19:09:17

plegat
Member
Registered: 2007-11-23
Posts: 184

Re: Aster doesnt read mesh from GMSH

J_Berthellemy wrote:

Impossible to find Gmsh 4.0.4 in february 2019 sad
Could you please attach an installation file either for windows or for Ubuntu ?

All Gmsh versions are available through Gmsh website (download section, "All versions" link).

For windows: http: //gmsh.info/bin/Windows/
For linux: http: //gmsh.info/bin/Linux/

Offline

#11 2019-02-16 10:45:08

jeanpierreaubry
Guru
From: nantes (france)
Registered: 2009-03-12
Posts: 3,707

Re: Aster doesnt read mesh from GMSH

hello J_Berthellemy

when trying to run your problem with 14.2 version
i can read the mesh
but the analysis stops in AFFE_MODEL with
le GROUP_MA  GM300  ne fait pas partie du maillage
the problem is not a med version one!

whatever it is  and as far a i know
13.6 or 14.2 can read med 3.2 or 3.3 as input mesh
but will only produce 3.3 as a results
and any gmsh >=4 will write med 3.3
any version >=4 will behave the same way in this respect

another point

I also changes all med suffixes into mmed !

file suffixes have no meaning in the unix world you can just as well name the file file .toto it would not change anything

jean pierre aubry


consider reading my book
freely available here https://framabook.org/beginning-with-code_aster/

Offline

#12 2019-02-19 13:10:54

J_Berthellemy
Member
From: Champs-sur-Marne
Registered: 2009-04-29
Posts: 70

Re: Aster doesnt read mesh from GMSH

jeanpierreaubry wrote:

le GROUP_MA  GM300  ne fait pas partie du maillage

OK : I suppose that the name of the group has changed and is no more GMxxx for Aster,
but of course something else.


https://www.researchgate.net/profile/Jacques_Berthellemy
Ubuntu 18.04 LTS  64 bits 15,7 Gio  8 CPU et/ou Red-Hat 250 Gio 57 CPU

Offline

#13 2019-02-20 20:27:13

MrSnail
Member
Registered: 2018-10-26
Posts: 35

Re: Aster doesnt read mesh from GMSH

Hi. I think the following nodes are on the top of each other:
33-35
34-36

I decided to rebuild the model for Salome (import py) than I noticed them.

Offline

#14 2021-05-31 03:54:13

Xiaoyue
Member
Registered: 2021-01-27
Posts: 3

Re: Aster doesnt read mesh from GMSH

hi, did you get your problem solved? thanks

MrSnail wrote:

Hi

I am able to read the mesh but the error message I get is that the groups do not form part of the mesh.
Also there is an error sign when I just import the med into the CA mesh module.
With compatibility problem, I am not sure I would able to read the mesh at all (just happened to me when I opened this topic)
I use GMSH 4.0.4 with Code_Aster_Win stable 13.6, they sure are compatible.
I might have an idea what is wrong but if I am right, not possible to trace it back from the med.
Can we actually have the geo file for GMSH?

Offline

#15 2021-10-04 15:10:42

J_Berthellemy
Member
From: Champs-sur-Marne
Registered: 2009-04-29
Posts: 70

Re: Aster doesnt read mesh from GMSH

Hi

Yes the problem was fixed on Ubuntu 16 with GMSH 4.1.4 writing at format MED 3.3.1
This format is compatible with Aster 13.6

However  I am now looking forward to find a version of GMSH writing at format 3.3.1 for Ubuntu 18.04 !...
The new versions of GMSH seem to be not compatible with Aster 13.6.

Kind regards.


https://www.researchgate.net/profile/Jacques_Berthellemy
Ubuntu 18.04 LTS  64 bits 15,7 Gio  8 CPU et/ou Red-Hat 250 Gio 57 CPU

Offline