3D simulation of a Motor without application of a load

Numerical methods and mathematical models of Elmer
raback
Site Admin
Posts: 4864
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: 3D simulation of a Motor without application of a load

Post by raback »

Hi Felix,

The torque in 2D and 3D is a little different. In 2D it must be multiplied by the length of the machine even when using 2.5D approach. In 3D not. In both cases the result must be multiplied with the number of symmetric sections.

Regarding BCs here are some that I've been using lately. Here only part of machine (1/4) is used and the BCs are detected automatically for a typical elecrtical machine. But you can use them even if you use the names or target boundaries.

It may be worth using conforming BCs in cases where the symmetry allows that. This reduced the size of the linear system to N-M instead of increasing it to N+M. Unfortunately the rotating interface can never be conforming.

There is a version of generic strong (edge-to-surface) projector that might be more robust. It would be nice to apply elimination for that.

Maybe I could have a look at the case at the elmag repo.

BR, Peter
Attachments
motor_bcs_mort_3d.sif
(982 Bytes) Downloaded 28 times
motor_bcs_mort.sif
(871 Bytes) Downloaded 47 times
motor_bcs_conf_3d.sif
(921 Bytes) Downloaded 23 times
motor_bcs_conf.sif
(771 Bytes) Downloaded 18 times
FFF
Posts: 37
Joined: 11 Jun 2021, 11:00
Antispam: Yes

Re: 3D simulation of a Motor without application of a load

Post by FFF »

Hi Peter,

Thanks a lot for your explanations and the files!
I was able to run the 3D simulation with my ElmerGrid extruded 2D mesh. See the cogging torque and bfield below. The relative error of the torque between 3D and 2D is below 1%.
CoggingTorque_3dvs2d.png
(139.98 KiB) Not downloaded yet
bfield_3d_2d.gif
(990.25 KiB) Not downloaded yet
(see the files I provided here: https://elmerfem.org/forum/viewtopic.php?p=30580#p30580)

The solver settings, which led to success, are the following:

Code: Select all

Header
  CHECK KEYWORDS "Warn"
  Mesh DB "." "Mesh_1_3D"
 Results Directory "ILU0_BiCGstabl_res_discon"
End

Simulation
  Coordinate System = Cartesian 3D
  Simulation Type = Transient
  Timestepping Method = BDF
  BDF Order = 2
  Max Output Level =10 
  Timestep intervals = 16
  Timestep Sizes = 4.990019960079841e-05
  Use Mesh Names = Logical True ! Use the mesh.names from Salome/ElmerGrid
End

Constants
  Stefan Boltzmann = 5.6704e-08
End

! main
Equation 1
  Active Solvers(2) = 1 2   ! mg_dyn_solver, flux_solver, 
End


! mg_dyn_solver
Solver 1
  Variable = "AV"
  Procedure = "MagnetoDynamics" "WhitneyAVSolver"
  Equation = mg_dyn_solver3D
!  Use Piola Transform = True
!  Quadratic Approximation = True

  Export Lagrange Multiplier = True
  Steady State Convergence Tolerance = 1e-4

  Newton-Raphson Iteration = True

  NonLinear System Relaxation Factor = 1.0
  Nonlinear System Newton After Tolerance = 1.e-3
  Nonlinear System Max Iterations = 50
  Nonlinear System Convergence Tolerance = 1e-6

  Linear System Solver = "Iterative"
  Linear System Preconditioning = ILU0
  Linear System Residual Output = 20
  Linear System Max Iterations = 500
  Linear System Iterative Method = BiCGstabl !GCR
  BicGStabL Polynomial Degree = 6
  Linear System GCR Restart = 600
  Linear System Convergence Tolerance = 1e-10
  Linear System Abort Not Converged = False
  Linear System Robust = Logical True
  Edge Basis = Logical True

  Steady State Convergence Tolerance = 1e-7

  Linear System Abort Not Converged  = False

  Nonlinear System Consistent Norm = True
  Steady State Convergence Tolerance = 1e-5

  
  Apply Mortar BCs = True  
  Mortar BCs Additive = True
   End

! flux_solver
Solver 2
  Equation = CalcFields
  Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
  Exec Solver = Always
  Angular Frequency = 2098.583892597982
  Calculate Magnetic Flux = Logical True
  Calculate Magnetic Field Strength = Logical True
  Calculate Magnetic Vector Potential = Logical True
  Calculate Electric Field = Logical True
  Calculate Current Density = Logical True
  Calculate Nodal Forces = Logical True
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStabL
  Linear System Max Iterations = 1000
  Linear System Convergence Tolerance = 1e-10
  Linear System Preconditioning = ILU0
  Linear System ILUT Tolerance = 1e-06
  Linear System Precondition Recompute = 1
  Linear System Abort Not Converged = Logical False
  Linear System Residual Output = 50
End

! translate_solver
Solver 3
  Equation = MeshDeform
  Procedure = "RigidMeshMapper" "RigidMeshMapper"
  Exec Solver = Before Timestep
  Translate Before Rotate = Logical True
  Cumulative Displacements = Logical False
End

! mat_solver
Solver 4
  Equation = SaveMaterials
  Procedure = "SaveData" "SaveMaterials"
  Exec Solver = After Timestep
  Parameter 2 = Relative Permeability
End

! bndy_solver
Solver 5
  Equation = SaveBoundaryValues
  Procedure = "SaveData" "SaveBoundaryValues"
  Exec Solver = After Timestep
End

! scalar_solver
Solver 6
  Equation = SaveScalars
  Procedure = "SaveData" "SaveScalars"
  Filename = scalars.dat
  Exec Solver = After Timestep
  Variable 1 = Time
  Variable 2 = Position
  Operator 3 = cpu time
  Variable 4 = String "Magnetic Vector Potential 3"
  Mask Name 4 = s_slot_5_A+
  Operator 4 = Body Int
  Variable 5 = String "Magnetic Vector Potential 3"
  Mask Name 5 = s_slot_6_A+
  Operator 5 = Body Int
  Variable 6 = String "Magnetic Vector Potential 3"
  Mask Name 6 = s_slot_7_C-
  Operator 6 = Body Int
  Variable 7 = String "Magnetic Vector Potential 3"
  Mask Name 7 = s_slot_8_C-
  Operator 7 = Body Int
  Variable 8 = String "Magnetic Vector Potential 3"
  Mask Name 8 = s_slot_9_B+
  Operator 8 = Body Int
  Variable 9 = String "Magnetic Vector Potential 3"
  Mask Name 9 = s_slot_10_B+
  Operator 9 = Body Int
  Variable 10 = String "Magnetic Vector Potential 3"
  Mask Name 10 = s_slot_11_A-
  Operator 10 = Body Int
  Variable 11 = String "Magnetic Vector Potential 3"
  Mask Name 11 = s_slot_12_A-
  Operator 11 = Body Int
  Variable 12 = String "Magnetic Vector Potential 3"
  Mask Name 12 = s_slot_13_C+
  Operator 12 = Body Int
  Variable 13 = String "Magnetic Vector Potential 3"
  Mask Name 13 = s_slot_14_C+
  Operator 13 = Body Int
  Variable 14 = String "Magnetic Vector Potential 3"
  Mask Name 14 = s_slot_15_B-
  Operator 14 = Body Int
  Variable 15 = String "Magnetic Vector Potential 3"
  Mask Name 15 = s_slot_16_B-
  Operator 15 = Body Int
End

! scalar_solver2
Solver 7
  Equation = SaveScalars2
  Procedure = "SaveData" "SaveScalars"
  Filename = fluxDens.dat
  Exec Solver = after timestep
  Save Coordinates(3,3) = Real 0.01299 0.0075 0 0.02075 0.0 0 0.01175 0 0
  Moving Mesh = Logical True
  Save component results = Logical False
End

! fields_solver
Solver 8
  Equation = ResultOutputSolver
  Procedure = "ResultOutputSolve" "ResultOutputSolver"
  Exec Solver = After Timestep
  Output File Name = fields
  Output Format = vtu
  Single Precision = Logical True
  Binary Output = Logical False
  Ascii Output = Logical True
  Save Geometry Ids = Logical True
  Discontinuous Bodies = Logical True
End


! n35eh_RingMagnet_1
Material 1
  Relative Permeability = Real 1.07
  Electric Conductivity = Real 0
  Magnetization 1 = Variable Time, timestep size
    Real MATC "877583.3310674601*cos(2098.583892597982*(tx(0)-tx(1))+0.0)"
  Magnetization 2 = Variable Time, timestep size
    Real MATC "877583.3310674601*sin(2098.583892597982*(tx(0)-tx(1))+0.0)"
End

! n35eh_RingMagnet_2
Material 2
  Relative Permeability = Real 1.07
  Electric Conductivity = Real 0
  Magnetization 1 = Variable Time, timestep size
    Real MATC "877583.3310674601*cos(2098.583892597982*(tx(0)-tx(1))+0.0)"
  Magnetization 2 = Variable Time, timestep size
    Real MATC "877583.3310674601*sin(2098.583892597982*(tx(0)-tx(1))+0.0)"
End

! steel_Shaft_3
Material 3
  H-B Curve = Variable coupled iter
	Real Monotone Cubic
		0.0 0.0
		0.472731 31.85111
		0.951703 62.22722
		1.191549 92.09444
		1.311137 118.01111
		1.327299 122.99778
		1.362771 136.41
		1.443033 176.70333
		1.467546 196.00333
		1.519306 243.64889
		1.526116 251.34556
		1.597592 409.27778
		1.606725 444.70333
		1.6691 999.49778
		1.691862 1437.52222
		1.742464 2570.96667
		1.781541 3976.11111
		1.819971 5600.16667
		1.870181 7968.98889
		1.936121 11696.77778
		2.025563 17893.11111
		2.108638 27661.22222
		2.15167 36227.88889
		2.172291 41894.55556
		2.284689 106704.4444
		2.296415 115956.6667
		2.41177 203216.6667
		2.425393 214057.7778
		2.500904 271840.0
		2.562768 320990.0
	End

  Electric Conductivity = Real 0
End

! air_AirGap_Stator_4
Material 4
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! copper_RoundWireConductor_5
Material 5
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! copper_RoundWireConductor_6
Material 6
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! copper_RoundWireConductor_7
Material 7
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! copper_RoundWireConductor_8
Material 8
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! copper_RoundWireConductor_9
Material 9
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! copper_RoundWireConductor_10
Material 10
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! copper_RoundWireConductor_11
Material 11
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! copper_RoundWireConductor_12
Material 12
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! copper_RoundWireConductor_13
Material 13
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! copper_RoundWireConductor_14
Material 14
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! copper_RoundWireConductor_15
Material 15
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! copper_RoundWireConductor_16
Material 16
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! a_M400_50A_StatorSheetForm1_17
Material 17
  H-B Curve = Variable coupled iter
	Real Monotone Cubic
		0 0
		0.31 223.0
		0.57 415.0
		0.79 618.0
		0.97 830.0
		1.1 1040.0
		1.2 1320.0
		1.3 1800.0
		1.4 2600.0
		1.5 3800.0
		1.6 5600.0
		1.67 7700.0
		1.74 10700.0
		1.8 14000.0
		1.86 18500.0
		1.94 29000.0
		2.04 48000.0
		2.07 55000.0
		2.1 68000.0
		2.2 180000.0
		2.4 450000.0
		2.6 800000.0
		2.8 1160000.0
		3.2 2000000.0
		4.0 3700000.0
	End

  Electric Conductivity = Real 0
End

! air_AirGap_18
Material 18
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! air_AirGap_19
Material 19
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End

! air_AirGap_20
Material 20
  Relative Permeability = Real 1.0
  Electric Conductivity = Real 0
End


! n35eh_RingMagnet_1
Body 1
  Name =  magnet0
  Equation = 1  ! main
  Material = 1  ! n35eh_RingMagnet_1
  Body Force = 1  ! n35eh_RingMagnet_1
End

! n35eh_RingMagnet_2
Body 2
  Name = magnet1
  Equation = 1  ! main
  Material = 2  ! n35eh_RingMagnet_2
  Body Force = 2  ! n35eh_RingMagnet_2
End

! steel_Shaft_3
Body 3
  Name =  shaft
  Equation = 1  ! main
  Material = 3  ! steel_Shaft_3
  Body Force = 3  ! steel_Shaft_3
End

! air_AirGap_Stator_4
Body 4
  Name =  stator_slot_air
  Equation = 1  ! main
  Material = 4  ! air_AirGap_Stator_4
End

! copper_RoundWireConductor_5
Body 5
  Name =  stator_slot_0_lce
  Equation = 1  ! main
  Material = 5  ! copper_RoundWireConductor_5
  Body Force = 7  ! s_slot_5_A+
  s_slot_5_A+ = Logical True
End

! copper_RoundWireConductor_6
Body 6
  Name =  stator_slot_0_lle
  Equation = 1  ! main
  Material = 6  ! copper_RoundWireConductor_6
  Body Force = 6  ! s_slot_6_A+
  s_slot_6_A+ = Logical True
End

! copper_RoundWireConductor_7
Body 7
  Name =  stator_slot_1_lce
  Equation = 1  ! main
  Material = 7  ! copper_RoundWireConductor_7
  Body Force = 9  ! s_slot_7_C-
  s_slot_7_C- = Logical True
End

! copper_RoundWireConductor_8
Body 8
  Name =  stator_slot_1_lle
  Equation = 1  ! main
  Material = 8  ! copper_RoundWireConductor_8
  Body Force = 8  ! s_slot_8_C-
  s_slot_8_C- = Logical True
End

! copper_RoundWireConductor_9
Body 9
  Name =  stator_slot_2_lce
  Equation = 1  ! main
  Material = 9  ! copper_RoundWireConductor_9
  Body Force = 11  ! s_slot_9_B+
  s_slot_9_B+ = Logical True
End

! copper_RoundWireConductor_10
Body 10
  Name =  stator_slot_2_lle
  Equation = 1  ! main
  Material = 10  ! copper_RoundWireConductor_10
  Body Force = 10  ! s_slot_10_B+
  s_slot_10_B+ = Logical True
End

! copper_RoundWireConductor_11
Body 11
  Name = stator_slot_3_lce 
  Equation = 1  ! main
  Material = 11  ! copper_RoundWireConductor_11
  Body Force = 13  ! s_slot_11_A-
  s_slot_11_A- = Logical True
End

! copper_RoundWireConductor_12
Body 12
  Name =  stator_slot_3_lle
  Equation = 1  ! main
  Material = 12  ! copper_RoundWireConductor_12
  Body Force = 12  ! s_slot_12_A-
  s_slot_12_A- = Logical True
End

! copper_RoundWireConductor_13
Body 13
  Name =  stator_slot_4_lce
  Equation = 1  ! main
  Material = 13  ! copper_RoundWireConductor_13
  Body Force = 15  ! s_slot_13_C+
  s_slot_13_C+ = Logical True
End

! copper_RoundWireConductor_14
Body 14
  Name =  stator_slot_4_lle
  Equation = 1  ! main
  Material = 14  ! copper_RoundWireConductor_14
  Body Force = 14  ! s_slot_14_C+
  s_slot_14_C+ = Logical True
End

! copper_RoundWireConductor_15
Body 15
  Name =  stator_slot_5_lce
  Equation = 1  ! main
  Material = 15  ! copper_RoundWireConductor_15
  Body Force = 17  ! s_slot_15_B-
  s_slot_15_B- = Logical True
End

! copper_RoundWireConductor_16
Body 16
  Name =  stator_slot_5_lle
  Equation = 1  ! main
  Material = 16  ! copper_RoundWireConductor_16
  Body Force = 16  ! s_slot_16_B-
  s_slot_16_B- = Logical True
End

! a_M400_50A_StatorSheetForm1_17
Body 17
  Name = stator 
  Equation = 1  ! main
  Material = 17  ! a_M400_50A_StatorSheetForm1_17
End

! air_AirGap_18
Body 18
  Name =  stator_airgap
  Equation = 1  ! main
  Material = 18  ! air_AirGap_18
End

! air_AirGap_19
Body 19
  Name =  middle_airgap
  Equation = 1  ! main
  Material = 19  ! air_AirGap_19
  Body Force = 4  ! air_AirGap_19
End

! air_AirGap_20
Body 20
  Name =  rotor_airgap
  Equation = 1  ! main
  Material = 20  ! air_AirGap_20
  Body Force = 5  ! air_AirGap_20
End




! outer
Boundary Condition 1
  Name = outer_stator_curve
  AV {e} = real 0 !Vector Potential
  AV = real 0	  !scalar Potential
End

! stator_airgap
Boundary Condition 2
  Name =  rotational_mortar_airgap_curve
  Mortar BC =666 
  Rotational Projector = Logical True
 Discontinuous Boundary= True 
  Galerkin Projector = True
 
  Projector Skip Nodes = True
  !release AV {e} = Logical True

  End

Boundary Condition 3
  Name = magnet0_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 4
  Name = magnet1_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 5
  Name = shaft_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 6
  Name = stator_slot_0_lce_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 7
  Name = stator_slot_0_lle_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 8
  Name = stator_slot_air_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 9
  Name = stator_slot_1_lce_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 10
  Name = stator_slot_1_lle_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 11
  Name = stator_slot_2_lce_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 12
  Name = stator_slot_2_lle_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 13
  Name = stator_slot_3_lce_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 14
  Name = stator_slot_3_lle_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 15
  Name = stator_slot_4_lce_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 16
  Name = stator_slot_4_lle_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 17
  Name = stator_slot_5_lce_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 18
  Name = stator_slot_5_lle_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 19
  Name = stator_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 20
  Name = middle_airgap_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 21
  Name = stator_airgap_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 22
  Name = rotor_airgap_Start
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 23
  Name = magnet0_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 24
  Name = magnet1_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 25
  Name = shaft_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 26
  Name = stator_slot_0_lce_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 27
  Name = stator_slot_0_lle_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 28
  Name = stator_slot_air_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 29
  Name = stator_slot_1_lce_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 30
  Name = stator_slot_1_lle_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 31
  Name = stator_slot_2_lce_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 32
  Name = stator_slot_2_lle_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 33
  Name = stator_slot_3_lce_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 34
  Name = stator_slot_3_lle_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 35
  Name = stator_slot_4_lce_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 36
  Name = stator_slot_4_lle_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 37
  Name = stator_slot_5_lce_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 38
  Name = stator_slot_5_lle_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 39
  Name = stator_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 40
  Name = middle_airgap_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 41
  Name = stator_airgap_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End

Boundary Condition 42
  Name = rotor_airgap_End
  AV {e} = real 0 !Vector Potential
  AV = real 0    !scalar Potential
End


! n35eh_RingMagnet_1
Body Force 1
  Mesh Rotate 3 = Variable Time
	Real MATC "(180/pi)*2098.583892597982*tx"
End

! n35eh_RingMagnet_2
Body Force 2
  Mesh Rotate 3 = Variable Time
	Real MATC "(180/pi)*2098.583892597982*tx"
End

! steel_Shaft_3
Body Force 3
  Mesh Rotate 3 = Variable Time
	Real MATC "(180/pi)*2098.583892597982*tx"
End

! air_AirGap_19
Body Force 4
  Mesh Rotate 3 = Variable Time
	Real MATC "(180/pi)*2098.583892597982*tx"
End

! air_AirGap_20
Body Force 5
  Mesh Rotate 3 = Variable Time
	Real MATC "(180/pi)*2098.583892597982*tx"
End

! s_slot_6_A+
Body Force 6
  Current Density = Variable Time
	Real MATC "0.0*cos(2098.583892597982*tx+3.141592653589793)"
End

! s_slot_5_A+
Body Force 7
  Current Density = Variable Time
	Real MATC "0.0*cos(2098.583892597982*tx+3.141592653589793)"
End

! s_slot_8_C-
Body Force 8
  Current Density = Variable Time
	Real MATC "0.0*cos(2098.583892597982*tx+2.0943951023931957)"
End

! s_slot_7_C-
Body Force 9
  Current Density = Variable Time
	Real MATC "0.0*cos(2098.583892597982*tx+2.0943951023931957)"
End

! s_slot_10_B+
Body Force 10
  Current Density = Variable Time
	Real MATC "0.0*cos(2098.583892597982*tx+1.0471975511965979)"
End

! s_slot_9_B+
Body Force 11
  Current Density = Variable Time
	Real MATC "0.0*cos(2098.583892597982*tx+1.0471975511965979)"
End

! s_slot_12_A-
Body Force 12
  Current Density = Variable Time
	Real MATC "0.0*cos(2098.583892597982*tx+0.0)"
End

! s_slot_11_A-
Body Force 13
  Current Density = Variable Time
	Real MATC "0.0*cos(2098.583892597982*tx+0.0)"
End

! s_slot_14_C+
Body Force 14
  Current Density = Variable Time
	Real MATC "0.0*cos(2098.583892597982*tx+5.235987755982989)"
End

! s_slot_13_C+
Body Force 15
  Current Density = Variable Time
	Real MATC "0.0*cos(2098.583892597982*tx+5.235987755982989)"
End

! s_slot_16_B-
Body Force 16
  Current Density = Variable Time
	Real MATC "0.0*cos(2098.583892597982*tx+4.188790204786391)"
End

! s_slot_15_B-
Body Force 17
  Current Density = Variable Time
	Real MATC "0.0*cos(2098.583892597982*tx+4.188790204786391)"
End


! rotor
Component 1
  Name = rotor
  Master Bodies(3) = 1 2 3
  Calculate Magnetic Force = Logical True
  Calculate Magnetic Torque = Logical True
  Torque Origin(3) = Real 0.0 0.0 0.0
  Torque Axis(3) = Real 0.0 0.0 1.0
End




I would be very thankful if you could explain what you meant by
There is a version of generic strong (edge-to-surface) projector that might be more robust. It would be nice to apply elimination for that.
.
What is the meaning of elimination? I read about this in some of the testcases but could not find any related keyword in the sifs.

In contrary to your settings, I use only one rotational mortar boundary. In this post I found your explanation, why this can work. https://elmerfem.org/forum/viewtopic.ph ... 42#p26242

I used this approach because until now I am not able to duplicate the cylindrical face (i.e. the rotational mortar BC) in Salome. I assume this approach is not the cleanest way to implement the rotational mortar? The problem is that the identical faces are not exported into the Elmer-mesh when transforming the unv Using ElmerGrid. I would be thankful if anybody who knows how to do this could share an example. Must the rotational mortars have an identical radius or can one of them be slightly bigger than the other?

The difference of the ElmerGrid extruded 3D mesh to my fully Salome created mesh (see the mesh on the left side in https://elmerfem.org/forum/download/file.php?id=8139 ) is, that all bodies of the simulation geometry are extruded through hex elements, which lead to quadrilles in the mortar BC.
In the Manual of the ElmerSolver I found the following statement:
In the current implementation of Level Projector it is assumed that the surface elements are quadrilaterals and two of the element sides remain parallel

Therefore, I believe in the 3D case the quadrilateral elements along the z-axis are a must for the rotational Mortar face. Is that true? Does this also play a role with a single or a double BC for the rotational mortar (i.e. one face for Stator and one for the rotor)?

I appreciate any suggestions or hints!

Best regards,

Felix
tayeb.mezri
Posts: 3
Joined: 04 Jun 2024, 12:40
Antispam: Yes

Re: 3D simulation of a Motor without application of a load

Post by tayeb.mezri »

Hello Sir,

I am encountering an issue with ELMER while calculating the flux in an electric machine. When I energize phase A and turn off phase B, the flux values are not of the same order of magnitude. However, on FEMM, the fluxes for both phases (A and B) are of the same order of magnitude.

Could you please assist me in identifying the problem and resolving this discrepancy in the flux calculation?

Thank you
Sif .file :
Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
End

Simulation
Max Output Level = 5
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Steady state
Coordinate Scaling = 0.001
Steady State Max Iterations = 1
Output Intervals(1) = 1
Solver Input File = case.sif
Post File = case.vtu
End

Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.670374419e-08
Permittivity of Vacuum = 8.85418781e-12
Permeability of Vacuum = 1.25663706e-6
Boltzmann Constant = 1.380649e-23
Unit Charge = 1.6021766e-19
End

Body 1
Target Bodies(1) = 1
Name = "A+"
Equation = 1
Material = 2
Body Force = 1
End

Body 2
Target Bodies(1) = 2
Name = "st"
Equation = 1
Material = 3
End

Body 3
Target Bodies(1) = 3
Name = "B-"
Equation = 1
Material = 2
Body Force = 3
End

Body 4
Target Bodies(1) = 4
Name = "A-"
Equation = 1
Material = 2
Body Force = 2
End

Body 5
Target Bodies(1) = 5
Name = "ent"
Equation = 1
Material = 1
End

Body 6
Target Bodies(1) = 6
Name = "RT"
Equation = 1
Material = 3
End

Body 7
Target Bodies(1) = 7
Name = "B+"
Equation = 1
Material = 2
Body Force = 3
End

Solver 1
Equation = MgDyn2D
Procedure = "MagnetoDynamics2D" "MagnetoDynamics2D"
Variable = Potential
Exec Solver = Always
Stabilize = True
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-10
BiCGstabl polynomial degree = 2
Linear System Preconditioning = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 10
Linear System Precondition Recompute = 1
End
Solver 2
Equation = MgDynPost
Calculate Maxwell Stress = True
Calculate Nodal Forces = True
Calculate Magnetic Field Strength = True
Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
Calculate Current Density = True
Calculate Electric Field = True
Calculate Joule Heating = True
Exec Solver = Before Saving
Stabilize = True
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Direct
Linear System Direct Method = Umfpack
End
Equation 1
Name = "MG2DYN"
Active Solvers(2) = 1 2
End

Material 1
Name = "Air (room temperature)"
Relative Permeability = 1
Electric Conductivity = 0
End

Material 2
Name = "Copper (generic)"
Relative Permeability = 1
Electric Conductivity = 59.59e6
End
Material 3
Name = "Iron (generic)"
Electric Conductivity = 0
Relative Permeability = 1000
End

Body Force 1
Name = "I+"
Calculate Potential = True
Current Density = 1e7
End

Body Force 2
Name = "I-"
Calculate Potential = True
Current Density = -1e7
End

Body Force 3
Name = "I0"
Calculate Potential = True
Current Density = 0
End
Boundary Condition 1
Target Boundaries(1) = 1
Name = "ff"
Infinity BC = True
End
raback
Site Admin
Posts: 4864
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: 3D simulation of a Motor without application of a load

Post by raback »

Hi Tayeb,

Unfortunately it is almost impossible to detect an error from a sif file alone. Providing the full case at least gives people the possibility to study what could be the issue. Also, it is more compatible with the spririt of free public support. Neither does it help to cross post the issue.

Generally Elmer has been compared extensively particularly in 2D to other software (Comsol, Flux, Maxwell,...). Sometimes results match exactly if we have the luxury of having the same mesh. Sometimes there is a small discrepancy that can be explained by the discretization error. Major discrepancies thus probably come from case definition or interpretation of results.

-Peter
Post Reply