Salome: Elmer-plugin available

Mesh generators, CAD programs, and other tools
Post Reply
RaJa
Posts: 77
Joined: 22 Oct 2014, 09:48
Antispam: Yes

Salome: Elmer-plugin available

Post by RaJa »

Hi,

The Elmer-plugin (incl. ElmerGrid mesh export and sif-file generator) for the Salome CAD/Mesh platform has reached Beta status. A big thanks goes to Matthias (mzenker).
It can be downloaded here: https://github.com/physici/ElmerSalomeModule

A small demo can be found here: https://youtu.be/D2-dp4UxblY

What is it good for?
The plugin mimics the ElmerGui in the context of the Salome platform. It provides the same functionality as the "Model"-menu in the ElmerGui, allowing the definition of equations, material, boundary and body properties as well as simulation related parameters like time stepping, output file, etc.
Additionally, it provides a function that allows writing the settings into a sif-file that can be used as input for the ElmerSolver. Also, the Solver can be started from Salome. Finally, a once created sif-file can be used as input for the plugin to automatically setup a simulation.

Why not using ElmerGui?
We wanted to have everything in one single tool, since Salome already offers meshing and analysis in paraview. Building an interface to the Elmer-solver was kind of consequential.

How does it work?
When in the meshing module of Salome, the Elmer functionality can be accessed via the 'Tools'-menu: Tools->Plugins->Elmer. It contains a control window that can be activated and which provides faster access to the Elmer-functions.

Limitations?
Parallel runs of a simulation are currently supported only on Windows.
Important 1: Bodies and faces that shall be used for a simulation have to have a unique name without any blanks (e.g. "Face 1" has to be "Face1). Ideally, these names are definied via the group-function of Salome. The plugin uses the 'Use Mesh Names'-options by default and ElmerGrid crops the names at the first occurence of a blank.
Important 2: The current version also supports Salome 8.2.

Bugs?
There might be some issues with configurations we have not tested. Everything else is running stable.

Status as of Aug. 2017
We have refurbished the interface to Elmer: Everything is done via the floating control window. No cumbersome interaction via the Tools-menu anymore. Additionally, you can now set whether to use Parallel- or Single-Processing - just like in the ElmerGui.
There are also ideas about a convergence plot and a better integration in Salome.

Status as of March 2020
The sif-generator now is able to write down the multigrid-related solver settings.

Status as of April 2021
The plugin has been updated to Salome 9 with Python3.

Regards,
Rainer
Last edited by RaJa on 17 Apr 2021, 13:24, edited 4 times in total.
c_prabal
Posts: 3
Joined: 25 Oct 2010, 03:35

Re: Salome: Elmer-plugin available

Post by c_prabal »

I downloaded the content from the link provided as zip file. Unzipped and put he unzipped folder ElmerSalomeModule-master containing one folder (ElmerSalome) and two files (README and salome_plugins.py) in D:\SALOME-7.8.0-WIN64\SALOME-7.8.0-WIN64\MODULES\GUI\RELEASE\GUI_INSTALL\share\salome\plugins\gui and then added the system variable SALOME_PLUGINS_PATH with above path on my win 7.

On my salome 7.8.0 in the Mesh module, when I go to Tool > plugin > I do not find elmer.


Could please help?
RaJa
Posts: 77
Joined: 22 Oct 2014, 09:48
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by RaJa »

If you use the default directory then you do not have to add the system variable. So you may delete the entry. It could be possible that Salome gets confused by that. Additionally, you can check the terminal windows that appears when starting Salome for error messages. Sometimes the module is not loaded, because something went wrong during initialization.

And finally, as you use Windows, you can check
  • delete the current copies of the plugin again
  • go into the Windows explorer and enter %userprofile% into the address bar
  • navigate to the folder .config/salome
  • if not already existing, create a folder plugins
  • put the files from the zip-file there
This is the way I use the plugin, because it is much easer to find and does not require any settings in the system.

Report back, if you still have trouble.
c_prabal
Posts: 3
Joined: 25 Oct 2010, 03:35

Re: Salome: Elmer-plugin available

Post by c_prabal »

I created a folder in .config\salome as Plugins and pasted one folder and two files as stated in my previous mail.

These are the messages I got

←[01;34mD:\SALOME-7.8.0-WIN64\SALOME-7.8.0-WIN64\MODULES\GUI\RELEASE\GUI_INSTALL
\lib\python2.7\site-packages\salome\salome_pluginsmanager.py:285: DeprecationWar
ning: Call to deprecated function fatal of module salome.kernel.logger (called f
rom importPlugins).
Deprecated since version 5.1.5. Please replace with Logger.critical(message)
logger.fatal("Error while loading plugins from file %s"%plugins_file)
←[00mCRITICAL [PluginsManager] : Error while loading plugins from file C:\Users\
Directorhome/.config/salome/Plugins\salome_plugins.py
Traceback (most recent call last):
File "D:\SALOME-7.8.0-WIN64\SALOME-7.8.0-WIN64\MODULES\GUI\RELEASE\GUI_INSTALL
\lib\python2.7\site-packages\salome\salome_pluginsmanager.py", line 283, in impo
rtPlugins
execfile(plugins_file,globals(),{})
File "C:\Users\Directorhome/.config/salome/Plugins\salome_plugins.py", line 45
, in <module>
import elmer_window_handler as ewh
File "C:\Users\Directorhome/.config/salome/Plugins\ElmerSalome\elmer_window_ha
ndler.py", line 35, in <module>
import sifreader
File "C:\Users\Directorhome/.config/salome/Plugins\ElmerSalome\sifreader.py",
line 1
<<<<<<< HEAD
^
SyntaxError: invalid syntax
RaJa
Posts: 77
Joined: 22 Oct 2014, 09:48
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by RaJa »

Thanks for the reply. There is an error during import and I have already checked the source and fixed it (hopefully).

Please download a new copy of the module and paste it in the directory. I have tested the new version on my machine and the module appears correctly.

Regards,
Rainer
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Salome: Elmer-plugin available

Post by mzenker »

Hi all,

the plugin has been updated - see Rainer's edit to the starting post. Now that most of the ElmerGUI functionality is implemented, we encourage all Salomé+Elmer users to use the plugin and give us feedback about success, bugs and wishes for improvements!

Matthias
Doug
Posts: 3
Joined: 10 Oct 2018, 23:03
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by Doug »

Hello all

First off, thanks to everyone for developing this Salome plugin. I can really envision the benefits of this union! I just can't figure out the install.

I am attempting to install the plugin on the Elmer_Linux Mint18.3 virtual machine build. The installation instructions provided in this thread are for a Windows platform and the Extend SALOME gui functions examples (http://docs.salome-platform.org/latest/ ... nager.html) do not address the fundamentals of file naming, file placement, file edits, etc.

Can anybody provide really detailed instructions for installing this plugin on a Linux platform? Please note that Salome (8.5.0) installs with a salome_plugins.py file in Desktop/SALOME-8.5.0-UBC10.04-SRC/BINARIES-UB16.04/GUI/share/Salome/plugins/gui/demo and a salome_pluginsmanager.py file in Desktop/SALOME-8.5.0-UBC10.04-SRC/BINARIES-UB16.04/GUI/lib/python2.7/site-packages/salome. Does the downloaded plugin salome_plugins.py file need to be appended to the existing file or renamed or??? Does the salome_pluginsmanager.py file require editing? Exactly where do these files get placed?

I'm hoping somebody has a similar installation (as it is the Elmer recommended build) and can provide some advice to a Linux novice.

Thanks,
Doug
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Salome: Elmer-plugin available

Post by mzenker »

Hi,

I cannot tell you right away exactly how to install it under Linux, but I will be able to do it this evening since I have my Linux box at home (I have to use Windows at work).

Matthias
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Salome: Elmer-plugin available

Post by mzenker »

Hi,

to use the plugin under Linux, do the following:
  1. Make a directory "Elmer" in the Salomé installation directory under appli_VXXX/share/salome/plugins/gui/, where XXX is the current Salomé version (e.g. 8_2_0)
  2. Copy the directory ElmerSalome and the file salome_plugins.py to that directory.
  3. Start Salomé. You should find a Menu entry "Elmer" in the SMESH module under Tools->Plugins.
HTH,
Matthias
Doug
Posts: 3
Joined: 10 Oct 2018, 23:03
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by Doug »

Hi Matthias

Yes, those instructions helped a lot :D. The plugin seems to be working well. Out of curiosity, are there any plans to extend the equation set available in the plugin?

Thanks again,
Doug
Post Reply