dividing bodies from multybody mesh

The graphical user interface of Elmer
Post Reply
billa
Posts: 6
Joined: 13 Feb 2020, 14:40
Antispam: Yes

dividing bodies from multybody mesh

Post by billa »

hello everyone,

I am new to elmer and i have a case where there is a multi body mesh (9 individual bodies) i have created in salome. I import it to ElmerGUI and "divide surface" so as to be able to define seperate BC and materials for each object. however unlike previous study cases that i have tried, ElmerGUI doesnot divide them in only 9 bodies, but into 46 different surfaces.
When i try to select an individual object, only a surface gets selected. when defining equation , i can see there are only 9 objects. However while setting up BC i see 46 different possible boundaries. i can merge the surfaces to create objects but its not a possibility as i plan to investigate more complex multi-body objects which may have upto 50 different objects.
Can someone help me on this?
P.S: I have done partitioning of the geometry prior to meshing and grouping of mesh according to objects in Salome.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: dividing bodies from multybody mesh

Post by kevinarden »

If you create groups of volume elements in Salome they become bodies. If you create groups of surface elements in Salome they become boundaries.

If you are working in 2D then groups of faces become bodies and groups of edges become boundaries.

Optionally,
If you don't use groups in salome for boundaries then all boundaries are one and dividing them in GUI depends on the angle boundary set. Once divided into, in your case 46 different surfaces, they can be selectively reemerged into surfaces by selecting and holding the shift key and then use the combine button.
billa
Posts: 6
Joined: 13 Feb 2020, 14:40
Antispam: Yes

Re: dividing bodies from multybody mesh

Post by billa »

Hello Kevinarden,
Thanks for your prompt reply!
kevinarden wrote: 13 Feb 2020, 23:10 If you create groups of volume elements in Salome they become bodies. If you create groups of surface elements in Salome they become boundaries.

If you are working in 2D then groups of faces become bodies and groups of edges become boundaries.
I have been doing exactly this but even though i can apply material and equations to 9 individual bodies, i get an option to have 46 different boundry conditions. so is there any possibility to define BC to all the surfaces at the same time (by selecting as an object) and not to all individual surfaces?
Optionally,
If you don't use groups in salome for boundaries then all boundaries are one and dividing them in GUI depends on the angle boundary set. Once divided into, in your case 46 different surfaces, they can be selectively reemerged into surfaces by selecting and holding the shift key and then use the combine button.
this is really not an option for me as the final object will be very complex and reemerging them manually will be an impossible task.

for better explanation, this problem arises when there are numerous cubical structures (not for spherical objects)as the angle between their surfaces is large.

Thanks in advance :)
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: dividing bodies from multybody mesh

Post by kevinarden »

If you are working in 3D then you can group surfaces together in salome to get the boundaries you want in elmer.
Same for edges if you are working in 2D.

If you use

ElmerGrid 8 2 mesh -autoclean

to convert the unv file, it will create an entities name file that tells you the body number and boundary number of each group.
billa
Posts: 6
Joined: 13 Feb 2020, 14:40
Antispam: Yes

Re: dividing bodies from multybody mesh

Post by billa »

Hello guys,

I was able to create simple objects and make them work, but the project i am actually working is quite complex with approx 70 boundary conditions and 100 plus bodies. To simplify assigning boundary conditions, i have grouped them together prior to partitioning and subsequent meshing in salome.
following which i have grouped them according to the geometry.

I can see in salome that each meshed group of faces and volumes are exactly the way I want them to be. However, when i inspect it in ElmerGUI most of the boundaries are mixed. trying to hide one object leads to hiding of several other objects sharing boundary with it. just to clarify, i have even used ElmerGrid and -autoclean.. but I cannot figure it out why it is behaving like that.

A strange thing has also been noted, when i hide some of the objects, the leave behind the common faces (where boundarys are supposed to be).

I hope someone can help me.
Thanks and BR,
Billa
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: dividing bodies from multybody mesh

Post by kevinarden »

You might try to use the solometoelmer script if you have the mesh the way you want it in salome

viewtopic.php?f=15&t=4514&hilit=salometoelmer
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: dividing bodies from multybody mesh

Post by mzenker »

Hi,

the ElmerGUI viewer having its shortcomings, you might convert the Elmer mesh to gmsh format using ElmerGrid and inspect the mesh with gmsh.
You can also open mesh.names to inspect the boundary and body names.
And a stupid question: You did open the mesh converted by ElmerGrid with File->load mesh instead of File->open...?
Just to be sure that it really is the way you think it is. ;)
Is it an "ordinary" tetrahedral mesh, or did you do fancy things like pyramids or similar stuff?

HTH,
Matthias
billa
Posts: 6
Joined: 13 Feb 2020, 14:40
Antispam: Yes

Re: dividing bodies from multybody mesh

Post by billa »

mzenker wrote: 31 Mar 2020, 14:18 Hi,

the ElmerGUI viewer having its shortcomings, you might convert the Elmer mesh to gmsh format using ElmerGrid and inspect the mesh with gmsh.
You can also open mesh.names to inspect the boundary and body names.
And a stupid question: You did open the mesh converted by ElmerGrid with File->load mesh instead of File->open...?
Just to be sure that it really is the way you think it is. ;)
Is it an "ordinary" tetrahedral mesh, or did you do fancy things like pyramids or similar stuff?

HTH,
Matthias
Hello Matthias, thanks for your reply. Yes, I converted it using ElmerGrid and opened it using "Load mesh" and not "open". I was able to solve my problem by using following options during partitioning: "No sub-shape intersection" and "detect self intersection". I had thought this was unnecessary as there should'nt have been intersection as the bodies were created using boolean Cut in salome. i found that many objects which shared boundaries, were kinda overlapping after exporting to UNV format, this gave rise to the thin

But now i have another problem. i had defined and named 65 boundaries in salome. however in the sif file generated after -autoclean, there is an additional boundary (66th) and it is automatically named as "Name = bnry347" i dont know what it is...

Any help will be appreciated
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: dividing bodies from multybody mesh

Post by kevinarden »

Sometimes after loading or saving with ElmerGUI or using ElmerGrid I have to manually edit the mesh.* files to remove erratic entries.

http://www.nic.funet.fi/pub/sci/physics ... Manual.pdf

Page 26 has the file formats
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: dividing bodies from multybody mesh

Post by mzenker »

billa wrote: 01 Apr 2020, 17:14 But now i have another problem. i had defined and named 65 boundaries in salome. however in the sif file generated after -autoclean, there is an additional boundary (66th) and it is automatically named as "Name = bnry347" i dont know what it is...
This is a boundary that was not named in Salomé, so it gets an automatically generated name.
Sometimes it is hard to find those, it might be some tiny snippet that was generated in the partitioning process. But normally you should be able to find it in the tree view in Salomé if you go through it carefully...

HTH,
Matthias
Post Reply