Salome: Elmer-plugin available

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

Re: Salome: Elmer-plugin available

Post by RaJa »

Can you post/attach your sif-file? Maybe also your mesh-file? Then I can try to run it on my own system.

The Elmer-plugin for Salome does nothing else as calling the elmersolver.exe and providing the sif-file as argument. So, if Elmer produces an error, it might be related to the sif-file itself.

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

Re: Salome: Elmer-plugin available

Post by tryphena »

Hi Rainer,
Here you go. I have set the parallel setting with 2 processes without skipping the mesh partition. The simulation runs without error. But no result output.

All files are in this link:
https://www.dropbox.com/sh/ngv7t9gg9lu7 ... _Gdwa?dl=0

Code: Select all

Starting program Elmergrid
Elmergrid reading in-line arguments
The mesh will be partitioned with Metis to 2 partitions.
Output will be saved to file C:\Users\tl393\Downloads\beamSalome.

Elmergrid loading data:
-----------------------
Loading mesh in ElmerSolver format from directory C:\Users\tl393\Downloads\beamSalome.
Loading header from mesh.header
Maximum elementtype index is: 504
Maximum number of nodes in element is: 4
Allocating for 748 knots and 2334 elements.
Loading 748 Elmer nodes from mesh.nodes
Loading 2334 bulk elements from mesh.elements
Loading 1252 boundary elements from mesh.boundary
Loading names for mesh parts from file mesh.names
Reading names for mesh bodies
Reading names for mesh boundaries
Elmer mesh loaded successfully

Elmergrid creating and manipulating meshes:
-------------------------------------------

Elmergrid partitioning meshes:
------------------------------
Making a Metis partitioning for 2334 elements in 3-dimensions.
All elements are of type 504
Minimum number of linear nodes in elements 4
Requiring number of nodes in dual graph 2
Using all 748 possible nodes in the Metis graph
Allocating mesh topology of size 9336
Starting graph partitioning METIS_PartMeshNodal.
 Runtime parameters:
   Objective type: METIS_OBJTYPE_CUT
   Coarsening type: METIS_CTYPE_SHEM
   Initial partitioning type: METIS_IPTYPE_METISRB
   Refinement type: METIS_RTYPE_GREEDY
   Perform a 2-hop matching: No
   Number of balancing constraints: 1
   Number of refinement iterations: 10
   Random number seed: -1
   Number of partitions: 2
   Number of cuts: 1
   User-supplied ufactor: 30
   Minimize connectivity: No
   Create contigous partitions: No
   Target partition weights:
        0=[5.00e-001]   1=[5.00e-001]
   Allowed maximum load imbalance: 1.030


 gk_mcore statistics
           coresize:        12104         nmops:         2048  cmop:      0
        num_callocs:           21   num_hallocs:            0
       size_callocs:        20440  size_hallocs:            0
        cur_callocs:            0   cur_hallocs:            0
        max_callocs:         7544   max_hallocs:            0
 nbrpool statistics
        nbrpoolsize:            0   nbrpoolcpos:            0
    nbrpoolreallocs:            0


Timing Information -------------------------------------------------
 Multilevel:               0.002
     Coarsening:                   0.001
            Matching:                      0.000
            Contract:                      0.001
     Initial Partition:            0.001
     Uncoarsening:                 0.000
          Refinement:                      0.000
          Projection:                      0.000
     Splitting:                    0.000
********************************************************************

 gk_mcore statistics
           coresize:        12104         nmops:         2048  cmop:      0
        num_callocs:           44   num_hallocs:            0
       size_callocs:        24384  size_hallocs:            0
        cur_callocs:            0   cur_hallocs:            0
        max_callocs:        12000   max_hallocs:            0
 nbrpool statistics
        nbrpoolsize:         1428   nbrpoolcpos:          989
    nbrpoolreallocs:            1

Finished graph partitioning METIS_PartMeshNodal.
Set the partition given by Metis for each node
Successfully made a Metis partition using the element mesh.
Optimizing the partitioning at boundaries.
Ownership of 0 parents was changed at BCs
Optimizing for 2 partitions
Creating a table showing all parenting partitions of nodes.
Nodes belong to 2 partitions in maximum
There are 44 shared nodes which is 5.88 % of all nodes.
The initial owner was not any of the elements for 0 nodes
Checking partitioning before optimization
Checking for partitioning
Information on partition bandwidth
Distribution of elements, nodes and shared nodes
     partition  elements   nodes      shared
     1          1165       371        26
     2          1169       377        18
Average number of elements in partition 3.740e+002
Maximum deviation in ownership 6
Average deviation in ownership 3.000e+000
Average relative deviation 0.80 %
Checking for problematic sharings
Partitioning was not altered

Elmergrid saving data with method 2:
-------------------------------------
Saving Elmer mesh in partitioned format
Number of boundary nodes at the boundary: 628
Number of additional interface nodes: 0
Created mesh directory: C:\Users\tl393\Downloads\beamSalome
Created subdirectory: partitioning.2
Saving mesh in parallel ElmerSolver format to directory C:\Users\tl393\Downloads\beamSalome/partitioning.2.
Nodes belong to 2 partitions in maximum
Saving mesh for 2 partitions
   part  elements   nodes      shared   bc elems
   1     1165       371        26       633
   2     1169       377        18       619
----------------------------------------------------------------------------------------------
   ave   1167.0     374.0      22.0     626.0    0.0
Writing of partitioned mesh finished

Thank you for using Elmergrid!
Send bug reports and feature wishes to elmeradm@csc.fi
Attachments
entities.sif
(250 Bytes) Downloaded 223 times
case.sif
(3.36 KiB) Downloaded 210 times
beam.unv
(553.61 KiB) Downloaded 214 times
Last edited by tryphena on 03 May 2021, 23:13, edited 1 time in total.
tryphena
Posts: 35
Joined: 16 Apr 2021, 17:38
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by tryphena »

As Kevinarden points out, the sif file has error when using the linear elasticity solver, I have to manually delete this following line, before start the solver. I hope you guys can update the plugin in near future. Thank you!

Code: Select all

 Variable = Displacement(cdim)
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,

This is not actually needed in the XML file. I just removed it in the "devel" branch. Hopefully the XML files found their way to the plugin.

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

Re: Salome: Elmer-plugin available

Post by tryphena »

Hi Peter,
There are always errors when I tried to read sif file. I have to redo the setting every time for the simulation. Is any way to improve this?

And after I run the simulation, if I try to change the setting, and run it again, Salome will just not respond. I have to restart the program. Is this the problem with salome or my computer?
Thanks.
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

I suggest that you make the 1st version with Salome. Then jump to your favorite editor for the rest of the workflow. Fix the errors and rather report upstream what the problems were. This is not a workflow used often by the developers.

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

Re: Salome: Elmer-plugin available

Post by tryphena »

Hi Peter,
Thank you for your advice. I was thinking to use the opensource workflow: salome-elmer in my thesis. I do not have too much time to figure out developing programs...
RaJa
Posts: 77
Joined: 22 Oct 2014, 09:48
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by RaJa »

Hello Tryphena,
the Elmer-plugin for Salome takes its information for the sif-file from the xml-configuration of the solvers. The error that you have reported (see below) is therefore created by an information in the xml-file that the solver later does not understand. The information is NOT inserted by the plugin by itself. So I would assume that it is not related to the plugin. As Peter has already pointed out, you should try the updated xml-configuration. IF the problem persists then I would be happy to help.

Code: Select all

 Variable = Displacement(cdim)
About your idea to use Salome and Elmer in your thesis: Both tools are work in progress. They are both fairly stable and I use them (at least Salome) on a regular basis. However, both are maintained by people whose primary job is NOT developing the software. So there might be issues that nobody has found yet. Hence my advice that for the simulation you check your results at least initially with manual estimations or a second tool like 'simscale' (cloud FEM tool, free for personal use).

But I will try to run a basic linear elasticity problem later today with Salome and Elmer.

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

Re: Salome: Elmer-plugin available

Post by tryphena »

Hi Rainer,
Yes, I appreciate you and others who answer my questions on this forum. I have been able to update the XML file and remove the sif error.

I am also comparing the results with other commercial software. I aim to replace commercial software with this open-source software. I found that if I use Salome and Elmer separately, the assembly of objects exported by Salome cannot be recognized by Elmer. Elmer could only treat the assembly as one object. That's why I would like to use the plugin, without exporting the mesh, so the volume groups can be preserved...

People says that there is Salome-to-Elmer python code to create elmer mesh. But it crashes Elmer on my computer...

Thank you for your understanding.

Best wishes,
Tryphena
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Salome: Elmer-plugin available

Post by kevinarden »

I found that if I use Salome and Elmer separately, the assembly of objects exported by Salome cannot be recognized by Elmer. Elmer could only treat the assembly as one object.

Is not true, if you create groups in salome they export in the unv file and are translated to the elmer mesh. The translator also provides a name file providing the names of the bodies and boundaries by group. I believe the plugin creates the unv file and runs the same translator elmer would.

viewtopic.php?f=4&t=4106
Post Reply