PMSM Simulation from Pavel in ElmerFEM 9.0

Numerical methods and mathematical models of Elmer
zmladen
Posts: 43
Joined: 28 Apr 2013, 17:15
Antispam: Yes

PMSM Simulation from Pavel in ElmerFEM 9.0

Post by zmladen »

Hello,

I am trying to learn how to use Elmer by running some of the simulations done by Pavel. I generated the same mesh and the .sif file. The simulation is running but I get strange results (see images). The flux lines in most of the time-steps seem to be ok, but in some time-steps i experience some sudden jumps.
cogging_torque.png
cogging_torque.png (33.01 KiB) Viewed 960 times
Cogging Torque
field_plot.png
field_plot.png (235.14 KiB) Viewed 960 times
Flux density plot

I am runing the simulation on the elmerfem virtual machine with the latest elmerfem 9.0 version installed. Is the setup in the .sif file still up to date?
Attachments
pmsm_project.zip
(727.64 KiB) Downloaded 82 times
raback
Site Admin
Posts: 4823
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: PMSM Simulation from Pavel in ElmerFEM 9.0

Post by raback »

Hi

You should give more information on what kind of mortar BC it is: galerkin projector & rotational projector.

-Peter
zmladen
Posts: 43
Joined: 28 Apr 2013, 17:15
Antispam: Yes

Re: PMSM Simulation from Pavel in ElmerFEM 9.0

Post by zmladen »

Hi Peter,

thanks for the fast reply. How to do that?

Thanks,
Mladen
zmladen
Posts: 43
Joined: 28 Apr 2013, 17:15
Antispam: Yes

Re: PMSM Simulation from Pavel in ElmerFEM 9.0

Post by zmladen »

Hi Peter,

i just added "Rotational Projector = Logical True" in the sliding boundary definition and the obtained torque looks much smoother.

Code: Select all

Boundary Condition 2 
 Target Boundaries(1) = 2 
 Name = "Sliding" 
 Discontinuous Boundary = Logical True 
 Save Line = True 
 Mortar BC = 3 
 Rotational Projector = Logical True
End 
cogging_torque_smooth.png
cogging_torque_smooth.png (21.86 KiB) Viewed 952 times
Thanks again for the help!
Mladen
zmladen
Posts: 43
Joined: 28 Apr 2013, 17:15
Antispam: Yes

Re: PMSM Simulation from Pavel in ElmerFEM 9.0

Post by zmladen »

What is the meaning of "Mortar BC = 3"? In this example the mesh consists from only one sliding boundary with the number 2.

Code: Select all

Boundary Condition 2 
 Target Boundaries(1) = 2 
 Name = "Sliding" 
 Discontinuous Boundary = Logical True 
 Save Line = True 
 Mortar BC = 3 
 Rotational Projector = Logical True
End 
kevinarden
Posts: 2301
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: PMSM Simulation from Pavel in ElmerFEM 9.0

Post by kevinarden »

A mortar condition is between two boundaries, they are always in pairs, so boundary 2 as defined by the target boundary is mortared to boundary 3 as defined by Mortar BC = 3. The mortar conditions between the two boundaries are specified by the user.

Boundary Condition 2
Target Boundaries(1) = 2
Mortar BC = 3
This is set for the non-mortar (slave) boundary to refer to the boundary condition index of the
corresponding mortar boundary. The mortar boundaries always come in pairs, but the settings
are only given in the context of the non-mortar boundary.
zmladen
Posts: 43
Joined: 28 Apr 2013, 17:15
Antispam: Yes

Re: PMSM Simulation from Pavel in ElmerFEM 9.0

Post by zmladen »

I understand that the Mortar condition needs 2 boundaries. But in this example there is no boundary 3 defined in the sif file. Only 2 boundaries are defined. It seems that the model is made in such a way that boundary 2 is "master" and "slave" boundary in the same time.

Thanks,
Mladen
kevinarden
Posts: 2301
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: PMSM Simulation from Pavel in ElmerFEM 9.0

Post by kevinarden »

Since Boundary 2 is defined as belonging to elements on both sides, and Discontinuous Boundary = Logical True is on, then the code understands that there needs to be a mortar condition to the both sides. Therefore the Mortar BC = 3 does nothing, and can be deleted from the SIF.
zmladen
Posts: 43
Joined: 28 Apr 2013, 17:15
Antispam: Yes

Re: PMSM Simulation from Pavel in ElmerFEM 9.0

Post by zmladen »

That makes sense, thanks a lot!
Mladen
zmladen
Posts: 43
Joined: 28 Apr 2013, 17:15
Antispam: Yes

Re: PMSM Simulation from Pavel in ElmerFEM 9.0

Post by zmladen »

I made some tests and it looks like "Mortar BC = 3" cannot be deleted from the SIF. However, the number 3 is not relevant. It can be any number other than the numbers used in the defined boundaries. If deleted the solver shows "discont" message and appends "discont_" to the result file name.
Post Reply