=====================
Flux and flux-linkage
=====================

.. role:: red

.. admonition:: Command: post_models(*"flux(x1, x2)", "r"*)

 Returns the flux in the variable with the freely selectable identifier "r" that passes through a straight line defined by the points (x1,y1) and (x2,y2).

 **Example:**
 ::

  m.coord_x1 = 33.974   -- Point P1 coordinate x1     [mm]
  m.coord_y1 = 15.955   -- Point P1 coordinate y1     [mm]
  m.coord_x2 = 21.492   -- Point P2 coordinate x2     [mm]
  m.coord_y2 = 29.681   -- Point P2 coordinate y2     [mm]

  post_models("flux(x1,x2)","r")

  b    = r[1]   -- Induction at center of line P1 -- P2 [T]
  flux = r[2]   -- Flux [Vs/m]

.. admonition:: Funktion: *Psi_re, Psi_im* = flux_winding_wk(*key*)

 Returns the real and imaginary parts of the coil flux-linkage (der Spulenflussverkettung) per unit length. Depending on the definition of the global units, the units are either [Vs/m] or [Vs/mm].

 In case of r/z- coordinates the function returns the total flux linkage in [Vs] (no length needed).

 **Parameter**
  :red:`key` Winding key

 .. warning::

  In FEMAG versions prior to March 2015, the unit is always [Vs/m] regardless of the global_units.