Using FEMM (triangle) to create input Mesh - Electrical Machine

Mesh generators, CAD programs, and other tools
Post Reply
gforti
Posts: 77
Joined: 11 Jan 2022, 20:39
Antispam: Yes

Using FEMM (triangle) to create input Mesh - Electrical Machine

Post by gforti »

Hello all,

I wanted to create a example case of the use of FEMM / Triangle to create the input mesh for simulation of electrical machines. But, before submiting to elmer-elmag folder, I wish for help in some points.

First:
I could not use the 'Discontinuous Boundary = Logical True' directly, the simulation gave the following error: ERROR:: CreateDiscontMesh: Alternative strategy requires all parent elements!

Using 'Discontinuous Target Bodies(1) = 10' helped.

Second:
I could not use SaveLine solver, either using 'Save Line = True' in the BC or using:

Code: Select all

Coordinate Transformation = String "cartesian to cylindrical"
Coordinate Transformation Use Degrees = Logical True
Polyline Coordinates(2,3) = 0.010738 0.0 0.0 0.010738 180.0 0.0
Polyline Divisions(1) = Integer 181
Save Line in the BC gave the error: ERROR:: SaveLine: Parent not associated!
Using 'Coordinate Transformation' gave weird results.

For comparing the magnetic flux in the air gap, I had to extract the line results from Paraview.

Please refer to the case files here:
https://github.com/gforti84/ElmerFiles/ ... in/share_1
kevinarden
Posts: 2313
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Using FEMM (triangle) to create input Mesh - Electrical Machine

Post by kevinarden »

The mesh bodies share nodes. The body inside of BC 2 share the same nodes as the body outside of BC 2. Therefore data is shared through the coincident nodes. This makes the mortar condition unneeded. The mortar condition shares data across paired boundary conditions at a discontinues mesh boundary. Each body at the discontinuity needs a boundary to be paired in the boundary condition. You BC 2 pairs with BC 3, but BC 3 doesn't exists. The problem runs OK because the elements share nodes and a mortar BC is not needed, and you are not trying to rotate the machinery.

The parent messages is because the parent elements are not fully defined in Boundary 2. Only the elements outside of the boundary are defined in the parent field.

The error messages come form the sif file inputs (based on mortar conditions) do not match the mesh file. The mesh file shares nodes across boundaries so that mortar conditions are not needed.
gforti
Posts: 77
Joined: 11 Jan 2022, 20:39
Antispam: Yes

Re: Using FEMM (triangle) to create input Mesh - Electrical Machine

Post by gforti »

Thanks for the response. I could not argue with that. I've made this case based on other examples, of course. These includes:
- https://www.researchgate.net/publicatio ... sing_Elmer
- https://github.com/ElmerCSC/elmerfem/bl ... iscont.sif

I tried to run the case without mortar BC without success, though. If you could point me to the right direction, i would appreciate. Thanks again.
kevinarden
Posts: 2313
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Using FEMM (triangle) to create input Mesh - Electrical Machine

Post by kevinarden »

case_pmsm.sif
(7.08 KiB) Downloaded 53 times
gforti
Posts: 77
Joined: 11 Jan 2022, 20:39
Antispam: Yes

Re: Using FEMM (triangle) to create input Mesh - Electrical Machine

Post by gforti »

Hello Kevin,

I've tried removing the BC, and other scenarios. But got the same following results in the last simulated step.
res_karden.png
res_karden.png (332.83 KiB) Viewed 935 times
When I run the case as posted, the results is as shown below:
res_pmsm.png
res_pmsm.png (265.83 KiB) Viewed 935 times
kevinarden
Posts: 2313
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Using FEMM (triangle) to create input Mesh - Electrical Machine

Post by kevinarden »

You are correct, the 'Discontinuous Boundary = Logical True' makes the conforming mesh discontinuous. However it does seem to complain about both parent elements not being defined. In the internal boundary there are two possible parent elements, one on each side of the boundary. In you boundary file only one of the parents is defined. This may be the source of the messages.
gforti
Posts: 77
Joined: 11 Jan 2022, 20:39
Antispam: Yes

Re: Using FEMM (triangle) to create input Mesh - Electrical Machine

Post by gforti »

Ok. Thanks

Also, i could not figure a way to work with 'Coordinate Transformation' in SaveData procedure.

Code: Select all

  Coordinate Transformation = String "cartesian to cylindrical"
  Coordinate Transformation Use Degrees = Logical True
  Polyline Coordinates(2,2) = 0.010738 0.0 0.010738 180.0
  Polyline Divisions(1) = Integer 1501
The results is very weird:
saveData_out.png
saveData_out.png (98.38 KiB) Viewed 867 times
Post Reply