Impossible to select bodies

The graphical user interface of Elmer
Roland
Posts: 226
Joined: 12 Apr 2018, 11:29
Antispam: Yes

Impossible to select bodies

Post by Roland »

Hi,
With Gmsh I made a simple geometry consisting of 3 cubes located in an outer cube (file cube.geo) and meshed it (file cube.msh).
After importing the cube.msh file in ElmerGUI, I try to select the cubes for entering the properties.
Unfortunately, when I click on Body Property 1,2,3 in the left window the corresponding cubes are not highlighted in red as it should be the case (only the outer cube 4 is highlighted in red when I click on Body Property 4).
Has somebody an idea where this problem could come from ( I had no such problem a few weeks ago...)?
Here attached are the 2 files cube.geo and cube.msh
Thanks in advance for any help.
Roland
Attachments
cube.msh
Gmsh mesh file
(124.6 KiB) Downloaded 119 times
cube.geo
Gmsh geometry file
(275 Bytes) Downloaded 116 times
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Impossible to select bodies

Post by kevinarden »

Have run into this issue before. It is a visualization issue in ElmerGUI. ElmerGUI highlights solid bodies using the boundary elements assigned to it. However your boundary elements are assigned to two bodies. The surfaces assigned to the internal bodies are also assigned to body 4. Since body 4 is the second assigned body to the surface selecting body 1, 2, or 3, highlights body 4. This is just a GUI graphic issue, the bodies and boundaries are still good, and can be used as such in the analysis.

the format on boundary elements is
element #, boundary #, element 1, element 2, element type, n1, n2, n3

The graphical problem is avoided by making the element 2 entry zero for every boundary element.

1 1 164 0 303 36 1 172
cube.png
cube.png (62.58 KiB) Viewed 1704 times
Roland
Posts: 226
Joined: 12 Apr 2018, 11:29
Antispam: Yes

Re: Impossible to select bodies

Post by Roland »

Hi,
Thanks Kevin for your answer.
But I don't exactly understand this.
Why are the boundary elements assigned to two bodies?
And where can I find your mentionned boundary elements format "element #, boundary #, element 1, element 2, element type, n1, n2, n3" and make the element 2 entry zero in the GUI?
Thanks for your next help about that issue.
Roland
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Impossible to select bodies

Post by kevinarden »

Why are the boundary elements assigned to two bodies? Because doing so allows for specifying boundary conditions for both bodies if necessary. Typically an internal boundary is not even required since the body share nodes. But having an internal boundary does allow assigning boundary conditions for both bodies if necessary.

The Elmer mesh format is in Appendix A of this manual

https://www.nic.funet.fi/pub/sci/physic ... Manual.pdf


Making element 2 entry zero can not be done from the GUI, I edited the file using a spreadsheet.
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Re: Impossible to select bodies

Post by Rich_B »

Hello,

The boundaries are in the mesh file 'mesh.boundary'. If you change the file extension to .csv and open in a spreadsheet program, you can change column 4 to all zeros, then save the file. Change the file name back to 'mesh.boundary' and open the mesh in ElmerGUI. Now you can select the bodies. This exercise of changing the mesh.boundary file is just to show that it's an ElmerGUI issue, not an gmsh issue.

But, changing the mesh.boundary file and running an analysis with all zeros in column 4 will probably make elmersolver very unhappy. If you try running with all zeros, let us know what happens.

As Kevin said, go ahead and use the unmodified mesh files in your analysis, don't worry about the display in ElmerGUI.

Rich.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Impossible to select bodies

Post by kevinarden »

Zero is a valid entry for column 4 and the solver can handle it. Whether it is the right thing to do depends on the analysis and if it needs internal boundary conditions, and if those internal boundary conditions are to be applied to both bodies. Data is transmitted by the shared nodes, for most analysis, and no internal boundary conditions are need by the solver. These, boundaries if not need can be removed by ElmerGrid with the flag

-removeintbcs

however, that does not solve the graphic display issue in GUI.

If there is no actual boundary condition to be applied to the internal BCs, then using the zero flag in column 4 allows the visualization in GUI, and the solver will not have an issue unless you need to specify internal boundary conditions.
Roland
Posts: 226
Joined: 12 Apr 2018, 11:29
Antispam: Yes

Re: Impossible to select bodies

Post by Roland »

Hi,
Thanks Kevin and Rich for your answers.
But I don't remember having this kind of problem a few weeks ago, and never had problems for selecting bodies in the GUI graphical window...
I don't know why, as you say, some boundary elements are assigned to two bodies...
In the cube.geo very simple file you can see that there are just the 4 boxes created and the "boleanFragments" command for getting mesh continuity from one cube to the other.
So I still wonder how it is possible to avoid that boundary elements are assigned to two bodies, and the problem is, even if you say that in Elmer each body really exists and the properties can be assigned to each body, how is it possible to graphically identify each of these bodies if they are not highlighted in red?
Thanks in advance for your precious help!
Roland
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Impossible to select bodies

Post by kevinarden »

Not in ElmerGUI but in gmsh you can create physical groups and name them, Each named volume will be a body and each named surface will be a boundary. Such as
cube.geo
(683 Bytes) Downloaded 114 times
Then when loaded in ElmerGUI a entities.sif file is created that identifies the bodies and boundaries by name.
entities.sif
(365 Bytes) Downloaded 123 times
In Salome the same is true if you group volumes and surfaces.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Impossible to select bodies

Post by kevinarden »

The bodies are still selectable on the forms for assigning properties.
bodies.png
(117 KiB) Not downloaded yet
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Re: Impossible to select bodies

Post by Rich_B »

Hello Kevin,

Thanks for the clarifications. I've seen entities.sif in some cases, but didn't know they were created by ElmerGUI based on the statements loaded into gmsh. On a similar note, how does the file 'mesh.names' get created?

Rich.
Post Reply