ModelingToolkitStandardLibrary: Magnetic Components


Flux Tubes

Flux Tube Utilities

TwoPort(;name, V_m_start=0.0, Phi_start=0.0)

Partial component with magnetic potential difference between two magnetic ports p and n and magnetic flux Phi from p to n.


  • V_m_start: Initial magnetic potential difference between both ports
  • Phi_start: Initial magnetic flux from portp to portn

Basic Flux Tube Blocks

EddyCurrent(;name, rho=0.098e-6, l=1, A=1, Phi_start=0.0)

For modelling of eddy current in a conductive magnetic flux tube.


  • rho: [ohm * m] Resistivity of flux tube material (default: Iron at 20degC)
  • l: [m] Average length of eddy current path
  • A: [m^2] Cross sectional area of eddy current path
  • Phi_start: [Wb] Initial magnetic flux flowing into the port_p
ElectroMagneticConverter(;name, N, Phi_start=0.0)

Ideal electromagnetic energy conversion.

The electromagnetic energy conversion is given by Ampere's law and Faraday's law respectively V_m = N * i N * dΦ/dt = -v


  • N: Number of turns
  • Phi_start: [Wb] Initial magnetic flux flowing into the port_p

Flux Tube Sources