gmsh: how are physical surfaces numbers by ElmerGrid?

Mesh generators, CAD programs, and other tools
Post Reply
homerun4711
Posts: 40
Joined: 07 Jun 2011, 11:24
Antispam: Yes

gmsh: how are physical surfaces numbers by ElmerGrid?

Post by homerun4711 »

Hello,

I have two questions and hope that you can help me.

I created and meshed a geometry using gmsh. Since there are many boundaries
having assigned the same conditions I added them to a single physical surface.

Is this recommended or would it be better to add the surfaces to a single
"Ruled Surface" with a defined single surface number?

And how does the numbering of gmsh's Physical Surfaces/Volumes by ElmerGrid / ElmerGUI work?
E.g. the gmsh file is

Code: Select all

Physical Surface(100) = {50}
Physical Volume(200) = {150} 
or with names

Code: Select all

Physical Surface("surf1") = {50}
Physical Volume("vol1") = {150} 
ElmerGUI or ElmerGrid come up with

Code: Select all

Boundary 1
Volume 2
Are they just numbered in the order of their apperance in the *.geo file?

Kind regards,
Markus
rainer.ochs
Posts: 22
Joined: 19 Oct 2012, 01:24
Antispam: Yes

Re: gmsh: how are physical surfaces numbers by ElmerGrid?

Post by rainer.ochs »

Hi
there is a difference how you create the elmer mesh. If you use ElmerGrid for conversion the boundary indexes start at 1, if you use ElmerGui they are different, I think here it depends on the number of bodies.
At least for salome meshes it works that way.
In any case you can open your mesh in ElmerGui and by selecting the surface you can prove its extension and its index.


Rainer
homerun4711
Posts: 40
Joined: 07 Jun 2011, 11:24
Antispam: Yes

Re: gmsh: how are physical surfaces numbers by ElmerGrid?

Post by homerun4711 »

Hi,

thanks for your quick reply.

I could not find a pattern so far, but I guess you are right,
it depends on how I open the mesh.

One way, I am not sure which one, the numbers shown in ElmerGUI are

Code: Select all

Surface 1
Surface 2
Surface 3
Body 4
The other way it is numbered

Code: Select all

Surface 1
Surface 2
Surface 3
Body 1
Another question:
If I open a gmsh-mesh with defined physical surfaces/volumes,
only these boundaries / bodys are shown in ElmerGUI and both
available postprocessors. Other surfaces that are
not labeled as physical are not displayed.
Does this mean that if physical surfaces/bodys are present I
can not assign conditions to "normal" surfaces/bodys?

Kind regards,
Markus
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: gmsh: how are physical surfaces numbers by ElmerGrid?

Post by raback »

Hi Markus

In Gmsh format if you choose to save physical entities, then only physical entities are saved! That means that you should be really diligent in Gmsh to set all physical entities if you choose to use them. And not only BCs, also the bodies.

Personally I prefer to "Save all (ignore physical entities)". Then by default ElmerGUI numbers the geometric entities using all integers. This is the same functionality that you could in ElmerGrid on command line by choosing -autoclean. The only downside of this is that Gmsh may alter the numbering of the geometric entities when remeshing is performed. Hence it is more difficult to create fully automated workflows in this strategy - or this is what I've at least understood from messages in this forum.

-Peter
homerun4711
Posts: 40
Joined: 07 Jun 2011, 11:24
Antispam: Yes

Re: gmsh: how are physical surfaces numbers by ElmerGrid?

Post by homerun4711 »

Hello,

thanks for your help!

Kind regards,
Markus
Post Reply