Elmer keeps changing boundary indices when loading

Clearly defined bug reports and their fixes
Post Reply
thomasatelmer
Posts: 31
Joined: 18 Jan 2019, 18:18
Antispam: Yes

Elmer keeps changing boundary indices when loading

Post by thomasatelmer »

Hello,
I am currently fighting to get a working ElmerFEM toolchain on my Ubuntu 18.04 home PC. I installed the elmerfem-csc-eg package using sudo apt-get install. It works ok, when I setup a new model, no problem. The problem arises, when I exit Elmer, and reopen the program, reload the previously solved project by "load project" in the GUI, and try to calculate once more: Elmer has changed the used boundary indices for the defined boundary conditions while loading the project. The SIF is regenerated with a seemingly random assigment of boundary indices to boundary conditions. The new simulation then produces garbage for sure.

I suspect there is something with permissions, or the install locations of Elmer, but I cannot track it down. Can someone provide some useful hints?

I attach two ZIP files of a small cantilever beam test case project directory. The file "original.zip" contains the state of this working directory after the first successful solve. The file "2nd open.zip" is the contents just after loading the directory contents again with "load project" in ElmerGUI.
When more complex models are used (with more boundary conditions or bodies), everything is screwed up even more, equations get assigned to other bodies and such stuff. The only thing that Elmer seems to remember, is the number of boundary indices a certain boundary condition is linked to. But the index values are completely set by rolling the dice.

This has kept me up all night long, but now I realized I cannot correct this on my own. Any help is greatly appreciated.

Thanks, Thomas.
Attachments
2nd_open.zip
(650.53 KiB) Downloaded 90 times
original.zip
(650.53 KiB) Downloaded 86 times
kevinarden
Posts: 669
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Elmer keeps changing boundary indices when loading

Post by kevinarden »

Started ElmerGUI from the command line and get this message

Loading geometry input file
Geometry input file: /fea/beamtest/
Unable to open file: file type unknown
Regenerating and saving the solver input file...

Happens because the first line in the egproject.xml has no geometry file name.

<contents>
<geometryinputfile></geometryinputfile>

In my other projects is is something like

<contents>
<geometryinputfile>plate.unv</geometryinputfile>

whenever there is no geometry file ElmerGUI I get the redefine boundary condition problem you describe.
thomasatelmer
Posts: 31
Joined: 18 Jan 2019, 18:18
Antispam: Yes

Re: Elmer keeps changing boundary indices when loading

Post by thomasatelmer »

Hi Kevinarden,

Thanks for this check and the solution... I just now wonder, how to tell Elmer about the unv file. Reason for my confusion being, that my workflow does not use the unv with Elmer:
1. I create geometry in Salome, create the mesh and export as UNV file.
2. Elmergrid is used to convert into Elmer mesh: elmergrid 8 2 mesh.unv -autoclean -scale 0.001 0.001 0.001
3. In Elmer, the generated files are loaded with "load mesh..." dialogue. My Elmer therefore cannot see the UNV file.

What would I have to do different to get the geometry input section correct in egproject.xml?

Thank you and a nice evening,
Thomas
kevinarden
Posts: 669
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Elmer keeps changing boundary indices when loading

Post by kevinarden »

Your workflow is the same as mine. If you open the unv file from ElmerGUI it runs ElmerGrid for you and records the unv file in the project. However I do not recommend this because there are known bugs this way. Many times it works perfectly but not always.

Since ElmerGrid puts the mesh into a sub-directory I tried copying the unv file to the sub-directory but that did not help.

One option, not elegant, is to edit the project file and add the unv file name. This has worked for me.
raback
Site Admin
Posts: 3780
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Elmer keeps changing boundary indices when loading

Post by raback »

Hi

When working with UNV files you could also take use of the feature that it allows to use the names you have defined. In short:

Code: Select all

  Simulation 
    Use Mesh Names = Logical True
  ...
  
  Body 1
    Name = "fluid"  ! instead of "Target Bodies"
  ... 
    
  Boundary Condition 1
    Name = "inlet" ! instead of "Target Boundaries"
   ...
This way you can better automate your workflow. Have fun!

-Peter
thomasatelmer
Posts: 31
Joined: 18 Jan 2019, 18:18
Antispam: Yes

Re: Elmer keeps changing boundary indices when loading

Post by thomasatelmer »

Thanks for the great hint with the command option "use mesh names", Peter. When I began with Elmer earlier this year, I just found posts that stated that such functionality would not exist. So I always went to entities.sif or mesh.names. But you are absolutely right, using the entity names is much easier.

Promising to have fun,
Thomas.
Post Reply