Salome: Elmer-plugin available

Mesh generators, CAD programs, and other tools
julien givernaud
Posts: 86
Joined: 18 Nov 2014, 18:18
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by julien givernaud »

I try to add the Elmer plugin for different Salome versions. It doesn't work for the 9-series of Salome.
It works with Salome 8.3, I don't have test on 8.5

Julien
RaJa
Posts: 77
Joined: 22 Oct 2014, 09:48
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by RaJa »

I haven't used the newer SALOME versions as I cannot run them via Windows RDP on my simulation PC. Something about graphics drivers (OpenGL...). So I haven't had a look at the new GUI interface in Salome.

@Peter
About promoting the tool. I am aware of a similar approach in the FreeCAD community. I have to admit that their tool looks more mature as there seem to be more people involved. And for a better integration in SALOME I lack the required coding skills. So we would have to get serious support from the SALOME experts and their forum is empty compared to the FreeCAD forum.
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Salome: Elmer-plugin available

Post by raback »

Hi

The Salome plugin has the nice approach that it uses directly the same XML files as ElmerGUI. Hence its path for utilizing the multiphysics features of Elmer is very smooth.

FreeCAD has its own naming conventions and in their approach Elmer is one alternative solver to implement them. So their approach will have a more unified experience but also will have quite a effort to take full use of Elmer.

Probably it is more difficult to find Salome developer embracing the Elmer philosophy than FreeCAD developer implementing their own approach.

We are happy to support both activities within our limited time.

-Peter
tryphena
Posts: 35
Joined: 16 Apr 2021, 17:38
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by tryphena »

I have salome 9.6 and the latest Elmer on windows 10. I just do not know how to install salome. I just extract the package and click run_salome file and the salome GUI opens. For the elmer plugin file, I cope the plugin folder to path: ...SALOME-9.6.0\SALOME-9.6.0\W64\GUI\share\salome\plugins\gui, nothing come up in salome but errors reported:

ModuleNotFoundError: No module named 'smesh'

SyntaxError: Missing parentheses in call to 'print'. Did you mean print(fname)?

Have someone who successfully the plugin in salome show the process ? Thank you.
RaJa
Posts: 77
Joined: 22 Oct 2014, 09:48
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by RaJa »

The plugin was written for the previous Salome versionx 8.x. These used Python 2.7. With Salome 9.x they switched to Python 3 and the code would need an update. For example the parenthesis after the print statement.

I also don't know, if Salome 9 still uses the smesh module or if it has been replaced.

I may be able to look at it tomorrow.
tryphena
Posts: 35
Joined: 16 Apr 2021, 17:38
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by tryphena »

mzenker wrote: 26 Oct 2018, 10:49 Hi,

if you move .xml files from edf-extra to edf in the ElmerSalome directory, the corresponding solvers will appear in the solver tabs.

HTH,
Matthias
The python code returns error.... Do I need to update code after the movement of .xml files? Thanks.
tryphena
Posts: 35
Joined: 16 Apr 2021, 17:38
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by tryphena »

RaJa wrote: 16 Apr 2021, 18:23 The plugin was written for the previous Salome versionx 8.x. These used Python 2.7. With Salome 9.x they switched to Python 3 and the code would need an update. For example the parenthesis after the print statement.

I also don't know, if Salome 9 still uses the smesh module or if it has been replaced.

I may be able to look at it tomorrow.
Raja,
You are right. I have been able to install the plugin in Salome 8.3. But I could not use the other solvers in edf-extra even I cope the .xml file to the edf folder. Could you please explain a little bit? Thank you.
RaJa
Posts: 77
Joined: 22 Oct 2014, 09:48
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by RaJa »

Which solvers do you need? I will check if there is something missing in the code of the plug-in.

Regards,
Rainer
tryphena
Posts: 35
Joined: 16 Apr 2021, 17:38
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by tryphena »

RaJa wrote: 17 Apr 2021, 08:42 Which solvers do you need? I will check if there is something missing in the code of the plug-in.

Regards,
Rainer
Hi Rainer,
I need to use static current, linear elasticity, and nonlinear elasticity modules. Here is the error when I copy statcurrent.xml and linearelasticity.xml files from edf-extra folder to edf folder. Please advise. Thank you.

Code: Select all

[/ logger.fatal("Error while loading plugins from file %s"%plugins_file)
CRITICAL [PluginsManager] : Error while loading plugins from file C:\Downloads\SALOME-8.3.0-WIN64\MODULES\GUI\RELEASE\GUI_INSTALL\share/salome/plugins\gui\salome_plugins.py
Traceback (most recent call last):
  File "C:\Downloads\SALOME-8.3.0-WIN64\MODULES\GUI\RELEASE\GUI_INSTALL\lib\python2.7\site-packages\salome\salome_pluginsmanager.py", line 284, in importPlugins
    execfile(plugins_file,globals(),{})
  File "C:\Downloads\SALOME-8.3.0-WIN64\MODULES\GUI\RELEASE\GUI_INSTALL\share/salome/plugins\gui\salome_plugins.py", line 55, in <module>
    main = ewh.ElmerWindowHandler()
  File "C:\Downloads\SALOME-8.3.0-WIN64\MODULES\GUI\RELEASE\GUI_INSTALL\share/salome/plugins\gui\ElmerSalome\elmer_window_handler.py", line 85, in __init__
    self._xmlMerge(path_edfs)
  File "C:\Downloads\SALOME-8.3.0-WIN64\MODULES\GUI\RELEASE\GUI_INSTALL\share/salome/plugins\gui\ElmerSalome\elmer_window_handler.py", line 1170, in _xmlMerge
    data = et.parse(xml_file).getroot()
  File "C:\Downloads\SALOME-8.3.0-WIN64\PRODUCTS\python-2.7.10\Lib\xml\etree\ElementTree.py", line 1182, in parse
    tree.parse(source, parser)
  File "C:\Downloads\SALOME-8.3.0-WIN64\PRODUCTS\python-2.7.10\Lib\xml\etree\ElementTree.py", line 656, in parse
    parser.feed(data)
  File "C:\Downloads\SALOME-8.3.0-WIN64\PRODUCTS\python-2.7.10\Lib\xml\etree\ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "C:\Downloads\SALOME-8.3.0-WIN64\PRODUCTS\python-2.7.10\Lib\xml\etree\ElementTree.py", line 1506, in _raiseerror
    raise err
ParseError: not well-formed (invalid token): line 310, column 142]
RaJa
Posts: 77
Joined: 22 Oct 2014, 09:48
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by RaJa »

I`ve just updated the source code to Elmer 9 and Salome 9 with Python 3. Sorry, for the inconvenience to reinstall Salome 9 :|

I think your problem comes from the xml files themselves and has nothing to do with the plugin. I am currently looking into that.
Post Reply