bluemira.magnetostatics.trapezoidal_prism

Analytical expressions for the field inside an arbitrarily shaped winding pack of rectangular cross-section, following equations as described in:

DOI: 10.1002/jnm.594

including corrections from:

DOI: 10.1002/jnm.675

Classes

TrapezoidalPrismCurrentSource

3-D trapezoidal prism current source with a rectangular cross-section and

Module Contents

class bluemira.magnetostatics.trapezoidal_prism.TrapezoidalPrismCurrentSource(origin: numpy.typing.NDArray[numpy.float64], ds: numpy.typing.NDArray[numpy.float64], normal: numpy.typing.NDArray[numpy.float64], t_vec: numpy.typing.NDArray[numpy.float64], breadth: float, depth: float, alpha: float, beta: float, current: float)

Bases: bluemira.magnetostatics.baseclass.PrismEndCapMixin, bluemira.magnetostatics.baseclass.CrossSectionCurrentSource

Inheritance diagram of bluemira.magnetostatics.trapezoidal_prism.TrapezoidalPrismCurrentSource

3-D trapezoidal prism current source with a rectangular cross-section and uniform current distribution.

The current direction is along the local y coordinate.

Parameters:
  • origin (numpy.typing.NDArray[numpy.float64]) – The origin of the current source in global coordinates [m]

  • ds (numpy.typing.NDArray[numpy.float64]) – The direction vector of the current source in global coordinates [m]

  • normal (numpy.typing.NDArray[numpy.float64]) – The normalised normal vector of the current source in global coordinates [m]

  • t_vec (numpy.typing.NDArray[numpy.float64]) – The normalised tangent vector of the current source in global coordinates [m]

  • breadth (float) – The breadth of the current source (half-width) [m]

  • depth (float) – The depth of the current source (half-height) [m]

  • alpha (float) – The first angle of the trapezoidal prism [°] [0, 180)

  • beta (float) – The second angle of the trapezoidal prism [°] [0, 180)

  • current (float) – The current flowing through the source [A]

Notes

Negative angles are allowed, but both angles must be either 0 or negative.

_origin
_halflength
_dcm
_length
_breadth
_depth
_alpha
_beta
_area
_points
_xyzlocal_to_rql(x_local: float, y_local: float, z_local: float) tuple[float, float, float, float, float, float]

Convert local x, y, z coordinates to working coordinates.

Returns:

Working coordinates

Parameters:
  • x_local (float)

  • y_local (float)

  • z_local (float)

Return type:

tuple[float, float, float, float, float, float]

_BxByBz(point: numpy.typing.NDArray[numpy.float64]) numpy.typing.NDArray[numpy.float64]

Calculate the field at a point in local coordinates.

Returns:

(Bx, By, Bz) at a point

Parameters:

point (numpy.typing.NDArray[numpy.float64])

Return type:

numpy.typing.NDArray[numpy.float64]

Note

By set to 0.

field(x: float | numpy.typing.NDArray[numpy.float64], y: float | numpy.typing.NDArray[numpy.float64], z: float | numpy.typing.NDArray[numpy.float64]) float | numpy.typing.NDArray[numpy.float64]

Calculate the magnetic field at a point due to the current source.

Parameters:
  • x (float | numpy.typing.NDArray[numpy.float64]) – The x coordinate(s) of the points at which to calculate the field

  • y (float | numpy.typing.NDArray[numpy.float64]) – The y coordinate(s) of the points at which to calculate the field

  • z (float | numpy.typing.NDArray[numpy.float64]) – The z coordinate(s) of the points at which to calculate the field

Returns:

The magnetic field vector {Bx, By, Bz} in [T]

Return type:

float | numpy.typing.NDArray[numpy.float64]

_calculate_points() numpy.typing.NDArray[numpy.float64]

Calculate extrema points of the current source for plotting and debugging.

Returns:

extrema points

Return type:

numpy.typing.NDArray[numpy.float64]