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
Impossible to select bodies
-
- Posts: 2368
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Impossible to select bodies
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
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
Re: Impossible to select bodies
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
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
-
- Posts: 2368
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Impossible to select bodies
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.
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.
Re: Impossible to select bodies
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.
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.
-
- Posts: 2368
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Impossible to select bodies
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.
-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.
Re: Impossible to select bodies
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
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
-
- Posts: 2368
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Impossible to select bodies
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
Then when loaded in ElmerGUI a entities.sif file is created that identifies the bodies and boundaries by name.
In Salome the same is true if you group volumes and surfaces.-
- Posts: 2368
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Impossible to select bodies
The bodies are still selectable on the forms for assigning properties.
Re: Impossible to select bodies
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.
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.