Page 3 of 4

Re: Impossible to select bodies

Posted: 09 Feb 2022, 13:39
by Roland
Hi Kevin and Rich,
As you eplained it, in the "cube" Elmer project, I changed all the elements of column 4 of the mesh.csv (meaning the mesh.boundary modified to mesh.csv) to zero, and renamed it to mesh.boundary.
Unfortunately, when trying to open in Elmer the "cube" project again, Elmer does not open and cancels immediately.
Please have you an idea where this could come from? Perhaps the format of the mesh.boundary is not correct when coming back from mesh.csv, after renaming it, to mesh.boundary?
Thanks in advance.
Roland

Re: Impossible to select bodies

Posted: 09 Feb 2022, 17:52
by Rich_B
Hello Roland,

Please post your modified mesh.boundary file, along with your other current files, in a zip archive.

Just to be specific, when starting ElmerGUI for this particular exercise of loading a modified mesh.boundary, the first action you perform should be 'File -> Load Mesh', and not 'Load Project' or 'Recent Project'.

Thanks, Rich.

Re: Impossible to select bodies

Posted: 10 Feb 2022, 11:36
by Roland
Hi Rich,
Thanks for your answer.
As you suggest it I join to this post a zip file of the "cube" project with the mesh.boundary file which is to modify.
After renaming it to mesh.csv (as you explained it) I could replace manually(just for the 10 first rows) the element n°4 by zero and after opening then the cube.msh file (and not open project or load project) I saw that one of the inner cubes was red highlighted when I selected it, which proves that the method works. But replacing all the n°4 elements by zero when you have about 100 (or more, depending on the mesh fineness!) cannot be done manually one by one, ok? I tried, by using the "data/convert" Excell command to replace all the n°4 elements by zero, but after renaming again the mesh.csv file to mesh.boundary it didn't work probably because the format has been changed (the unique column of the original mesh.boundary file was changed in several columns, each contaning one element, after applying the data/convert Excell command...).
It would be kind if you could explain me if there is some trick in Excell for how to change only the element n°4 to zero without changing the format of the mesh.boundary file.
We keep in touch and thanks again.
Roland

Re: Impossible to select bodies

Posted: 11 Feb 2022, 17:40
by Rich_B
Hello Roland,

Working with text files using Excel or Open Office should be easy, but there are details that need to be taken care of.

Elmer mesh files are plain text files. First step is to open one of the mesh files with a text editor, such as Notepad. Notice that you see only numbers and spaces, no commas. Second step is to open the file using Excel. Excel will open Data/Convert dialog, because it knows it's a text file, but doesn't know what are the column delimiters. Somewhere in the Data/Convert dialog, you will be able to select 'Space' as the column delimiter, not comma and not tab. Go ahead and finish the Data/Convert dialog and import the file. You should see each data entry in a single cell. If you see the entire line of data all in cell A1, column A, then try again.

Then enter a zero in cell D1. Copy that cell and paste the zero into cells D2 thru the last cell, such as D112. Close Excel, saving the file. Open the file in Notepad, and verify that it looks correct. Then test your work with ElmerGUI.

This should help you further in your task, please let us know how it works for you.

Rich.

Re: Impossible to select bodies

Posted: 11 Feb 2022, 21:49
by Roland
Hi Rich,
Thank you for your help.
Yes I have tried all this but a bit to quickly and probably the format of the modified mesh.boundary file which I reimported in the Elmer project was not correct (it is a bit tricky to struggle with this Excell Data/Convert command....).
I will try this again as soon I have a bit more time and keep you informed.
Thanks again!
Roland

Re: Impossible to select bodies

Posted: 26 Feb 2022, 01:00
by Rich_B
Hello,

To return to the original question, how to select bodies in ElmerGUI when there are multiple bodies in the model. Saeki recently posted a Pull Request that fixes the behaviour, and now ElmerGUI can successfully select bodies. One can either double click in the graphic display window or in the Objectbrowser tree, and select bodies.

For testing purposes, a revised cube model is attached, with nine bodies.
selection.png
selection.png (157.8 KiB) Viewed 1542 times
Download a recent nightly build installer, and try out the attached model.

Thanks again to Saeki for the fix!

Rich.

Edit: When in the graphic display window, double click to select boundaries, and hold down the shift key and double click to select bodies.

Re: Impossible to select bodies

Posted: 05 Apr 2022, 10:53
by Gmontgomery29
Sometimes I like to bring into ELMER a model by reading a file of nodes and elements. The *.msh format works for this. Now there are no boundaries listed so I need to specify them. Does anyone have a suggestion for doing that? Most of my problems are heat transfer.

In commercial programs (ANSYS) I can specify all the nodes along a certain X Y or Z value. This then can be a boundary for specifying a heat transfer coefficient.

Thank you.

George

Re: Impossible to select bodies

Posted: 05 Apr 2022, 12:36
by kevinarden
In Elmer you can target nodes with boundary conditions instead of boundary elements

Boundary Condition 1
Target Nodes(6) = 3, 4, 25, 26, 27, 28
Name = "BoundaryCondition 1"
Temperature = 10
End

Re: Impossible to select bodies

Posted: 05 Apr 2022, 15:23
by Rich_B
Hello,

Would you mind posting a small example of a *.msh file with just nodes and elements?

Thanks, Rich.

Re: Impossible to select bodies

Posted: 05 Apr 2022, 18:50
by kevinarden
The msh file has only nodes and surface elements. ElmerGrid creates 0 boundary elements. However ElmerGUI adds 1 boundary all the way around.
Most commercial meshing codes do not create boundary elements by default, nor do most commercial solvers use boundary elements, this is one of the things to learn when moving from commercial to open source.. Salome allows you to delete or add boundary elements around surface or volume groups.
test.msh
(5.63 KiB) Downloaded 107 times