Calculate magnetic torque

Numerical methods and mathematical models of Elmer
Bavragor
Posts: 32
Joined: 07 Nov 2013, 14:10
Antispam: Yes

Calculate magnetic torque

Post by Bavragor »

Hi everyone!
I have some Problem with the calculation of magnetic torque. I found 2 possibilities in Elmer:

1. as a component:

Code: Select all

Component 1
  Name = string "metal"
  Master Bodies(1) = integer 4
  Torque Origin(3) = Real 100 0 -100
  Torque Axis(3) = Real 0 0 100
  Calculate Magnetic Force = Logical True
  Calculate Magnetic Torque = Logical True
End
2. as a group

Code: Select all

...
Body 4
  Target Bodies(1) = 4
  Name = "Body 4"
  Equation = 1
  Material = 1
  Body Force = 2
  Torque Groups(1) = integer 1
End
...
Solver 3
  Equation = MgDynPost
  Potential Variable = AV
  Calculate Current Density = True
  Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
  Calculate Electric Field = True
  Calculate Magnetic Field Strength = True
  Exec Solver = Always
  Stabilize = True
  Bubbles = False
  Lumped Mass Matrix = False
  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 = CG
  Linear System Max Iterations = 5000
  Linear System Convergence Tolerance = 1.0e-10
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = Diagonal
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 1
  Linear System Precondition Recompute = 1

  Torque Group Origins(1,3) = Real 100 0 0
  Torque Group Axes(1, 3) = Real 0 0 1
  Calculate Electric Field = True
  Calculate Magnetic Field Strength = True
  Calculate Nodal Forces = Logical True
End
My problems are so far:

1. When i use coordinate scaling=1e-3 a point at 100mm in x-direction is still Torque Group Origins(1,3) = Real 100 0 0?

2. Whats the right way when i want a torque axis from f.e. A=(10 20 -30) to b=(10 20 30):

Code: Select all

Torque Origin(3) = Real 10 20 -30
  Torque Axis(3) = Real 0 0 30
or

Code: Select all

Torque Origin(3) = Real 10 20 -30
  Torque Axis(3) = Real 10 20 30
?

Thank you in advance!
raback
Site Admin
Posts: 3773
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Calculate magnetic torque

Post by raback »

Hi

1) Scaling is applied to the mesh when reading it in so Elmer loses all information of the original coordinates. Therefore use the scaled coordinates always.

2) The 1st alternative.

-Peter
Bavragor
Posts: 32
Joined: 07 Nov 2013, 14:10
Antispam: Yes

Re: Calculate magnetic torque

Post by Bavragor »

Thank you :)
Bavragor
Posts: 32
Joined: 07 Nov 2013, 14:10
Antispam: Yes

Re: Calculate magnetic torque

Post by Bavragor »

I have another question: in Which way does the torque calculation work? I had some problems with my model (squared core with an airgap, within the airgap a single wire):

I've got the problem that the magnetic torque isn't zero when the axis is through the middle of the wire:

4: component 1: res: magnetic force 1= 3.734628378772E+000
5: component 1: res: magnetic force 2 = -1.101039591209E-003
6: component 1: res: magnetic force 3 = 6.378247999766E-004
7: component 1: res: magnetic torque = -3.516128841510E+003

When I use an axis parallel to the wire in an distance of 10mm i get the following result:

4: component 1: res: magnetic force 1= 3.734628378772E+000
5: component 1: res: magnetic force 2 = -1.101039591209E-003
6: component 1: res: magnetic force 3 = 6.378247999766E-004
7: component 1: res: magnetic torque = -1.197103472730E+006

Another unexpected effect is that the length of the axis influences the magnitude of the torque. For example when the axis is the length of the wire ( Torque Origin(3) = Real 100 0 -10; Torque Axis(3) = Real 0 0 20) the torque is -4.379584261120E+002.

What I'm doing wrong? The force seems to be ok (direction and magnitude). Is there some problem with the coordinates?

The SIF:

Code: Select all

Header
  CHECK KEYWORDS Warn
  Mesh DB "." "."
  Include Path ""
  Results Directory ""
End

Simulation
  Max Output Level = 10
  Coordinate System = Cartesian
  Coordinate Mapping(3) = 1 2 3
  Simulation Type = Steady state
  Steady State Max Iterations = 1
  Output Intervals = 1
  Timestepping Method = BDF
  BDF Order = 1
  Solver Input File = sw.sif
  Post File = sw.ep
  Coordinate Scaling = 1e-3
End

Constants
  Gravity(4) = 0 -1 0 9.82
  Stefan Boltzmann = 5.67e-08
  Permittivity of Vacuum = 8.8542e-12
  Boltzmann Constant = 1.3807e-23
  Unit Charge = 1.602e-19
End

Body 1
  Target Bodies(1) = 1
  Name = "Body Property 1"
  Equation = 1
  Material = 1
  Body Force = 1
End

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

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

Body 4
  Target Bodies(1) = 4
  Name = "Body 4"
  Equation = 1
  Material = 1
  Body Force = 2
 ! Torque Groups(1) = integer 1
End

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

Solver 3
  Equation = MgDynPost
  Potential Variable = AV
  Calculate Current Density = True
  Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
  Calculate Electric Field = True
  Calculate Magnetic Field Strength = True
  Exec Solver = Always
  Stabilize = True
  Bubbles = False
  Lumped Mass Matrix = False
  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 = CG
  Linear System Max Iterations = 5000
  Linear System Convergence Tolerance = 1.0e-10
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = Diagonal
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 1
  Linear System Precondition Recompute = 1

  !Torque Group Origins(1,3) = Real 100 0 -10
  !Torque Group Axes(1, 3) = Real 0 0 20
  Calculate Electric Field = True
  Calculate Magnetic Field Strength = True
  Calculate Nodal Forces = Logical True
End

Solver 1
  Equation = Static Current Conduction
  Calculate Volume Current = True
  Procedure = "StatCurrentSolve" "StatCurrentSolver"
  Variable = Potential
  Exec Solver = Before Simulation
  Stabilize = True
  Bubbles = False
  Lumped Mass Matrix = False
  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 = CG
  Linear System Max Iterations = 5000
  Linear System Convergence Tolerance = 1.0e-10
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = Diagonal
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 1
  Linear System Precondition Recompute = 1
End

Solver 4
  Equation = Result Output
  Procedure = "ResultOutputSolve" "ResultOutputSolver"
  Output Format = Vtu
  Output File Name = loop
  Exec Solver = After Timestep
End

Solver 2
  Equation = MgDyn
  Fix Input Current Density = True
  Variable = AV
  Procedure = "MagnetoDynamics" "WhitneyAVSolver"
  Exec Solver = Always
  Stabilize = True
  Bubbles = False
  Lumped Mass Matrix = False
  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 = CG
  Linear System Max Iterations = 5000
  Linear System Convergence Tolerance = 1.0e-10
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = Diagonal
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 1
  Linear System Precondition Recompute = 1
End

Solver 5 
  Equation = "Savedata"
  Procedure = "SaveData" "SaveScalars"
  filename = "withouttorque.dat"
  save component results = logical true
End

Equation 1
  Name = "Wire+SW"
  Active Solvers(4) = 3 1 4 2
End

Equation 2
  Name = "Air+Core"
  Active Solvers(3) = 3 4 2
End

Material 1
  Name = "Copper"
  Electric Conductivity = 59.59e6
  Relative Permeability = 1
  Density = 8960
End

Material 2
  Name = "Steel"
  Electric Conductivity = 1.449e6
  Relative Permeability = 1000
  Density = 7850
End

Material 3
  Name = "Air"
  Electric Conductivity = 0
  Relative Permeability = 1
  Density = 1.205
End

Body Force 1
  Name = "Volume Current"
  Current Density 1 = Equals  Volume Current 1
  Current Density 3 = Equals  Volume Current 3
  Current Density 2 = Equals  Volume Current 2
End

Body Force 2
  Name = "SW"
  Current Density 1 = Equals Volume Current 1
  Current Density 3 = Equals Volume Current 3
  Current Density 2 = Equals Volume Current 2
End

Boundary Condition 1
  Target Boundaries(2) = 4 26 
  Name = "Ground"
  Potential = 0
End

Boundary Condition 2
  Target Boundaries(2) = 13 27 
  Name = "Current Density"
  Current Density = 141471061
End

Boundary Condition 3
  Target Boundaries(1) = 20 
  Name = "Border"
  AV {e} = Real 0
End

Component 1
  Name = string "metal"
  Master Bodies(1) = integer 4
  Torque Origin(3) = Real 100 0 -20 ! Real 100 10 -20 with torque
  Torque Axis(3) = Real 0 0 40
  Calculate Magnetic Force = Logical True
  Calculate Magnetic Torque = Logical True
End
Attachments
core_sw.png
(68.14 KiB) Not downloaded yet
Bavragor
Posts: 32
Joined: 07 Nov 2013, 14:10
Antispam: Yes

Re: Calculate magnetic torque

Post by Bavragor »

Nobody any hints?

The project files:

https://www.dropbox.com/s/jitnit6arx2v5 ... m.zip?dl=0
raback
Site Admin
Posts: 3773
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Calculate magnetic torque

Post by raback »

Hi, I checked the Axis and it seems that it was normalized to unity length. Thus the code relied on the length of the direction being one. I now will add the normalization. -Peter
Bavragor
Posts: 32
Joined: 07 Nov 2013, 14:10
Antispam: Yes

Re: Calculate magnetic torque

Post by Bavragor »

Thx for the reply!
To be sure i understand it properly: the problem was, that the coordinate scaling doesn't work for the magnetic torque axis? And the the length of the vector should be 1?
After you add the normalization this

Code: Select all

Component 1
  Name = string "metal"
  Master Bodies(1) = integer 4
  Torque Origin(3) = Real 100 0 -20 ! Real 100 10 -20 with torque
  Torque Axis(3) = Real 0 0 40
  Calculate Magnetic Force = Logical True
  Calculate Magnetic Torque = Logical True
End
will calculate the torque properly?
raback
Site Admin
Posts: 3773
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Calculate magnetic torque

Post by raback »

Hi, If you scale the coordinates then also the origin should be scaled. It is not automatically scaled. -Peter
Bavragor
Posts: 32
Joined: 07 Nov 2013, 14:10
Antispam: Yes

Re: Calculate magnetic torque

Post by Bavragor »

Thx! The torque is calculated in Nm?
Bavragor
Posts: 32
Joined: 07 Nov 2013, 14:10
Antispam: Yes

Re: Calculate magnetic torque

Post by Bavragor »

Another question: is it possible that the axis/compas are arranged in a new order compared to the model or something like that?
When I use an axis parallel to the wire with a distance of 0.1m i get a torque of 7.466260917725E-003Nm. The force is 3.734628378772E+000. (expected a torque of ~3.73E-001Nm)
What's the problem?
Post Reply