bluemira.magnetostatics.polyhedral_prism ======================================== .. py:module:: bluemira.magnetostatics.polyhedral_prism .. autoapi-nested-parse:: Polyhedral prism current source using the volume integral method The easiest description and structure to follow was: .. doi:: 10.1109/TMAG.2007.908698 :title: M. Fabbri, "Magnetic Flux Density and Vector Potential of Uniform Polyhedral Sources", IEEE TRANSACTIONS ON MAGNETICS, VOL. 44, NO. 1, JANUARY 2008 Additional information and detail also present in Passaroto's Master's thesis: https://thesis.unipd.it/retrieve/d0269be2-2e5d-4068-af58-4374193d38a1/Passarotto_Mauro_tesi.pdf An alternative calculation also available, which should give identical results from Bottura et al., following essentially C. J. Collie's 1976 RAL work https://supermagnet.sourceforge.io/notes/CRYO-06-034.pdf Classes ------- .. autoapisummary:: bluemira.magnetostatics.polyhedral_prism.PolyhedralPrismCurrentSource Module Contents --------------- .. py:class:: PolyhedralPrismCurrentSource(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], xs_coordinates: bluemira.geometry.coordinates.Coordinates, alpha: float, beta: float, current: float, *, bypass_endcap_error: bool | None = False, endcap_warning: bool | None = True) Bases: :py:obj:`bluemira.magnetostatics.baseclass.PrismEndCapMixin`, :py:obj:`bluemira.magnetostatics.baseclass.PolyhedralCrossSectionCurrentSource` .. autoapi-inheritance-diagram:: bluemira.magnetostatics.polyhedral_prism.PolyhedralPrismCurrentSource :parts: 1 :private-bases: 3-D polyhedral prism current source with a polyhedral cross-section and uniform current distribution. The current direction is along the local y coordinate. The cross-section is specified in the local x-z plane. :param origin: The origin of the current source in global coordinates [m] :param ds: The direction vector of the current source in global coordinates [m] :param normal: The normalised normal vector of the current source in global coordinates [m] :param t_vec: The normalised tangent vector of the current source in global coordinates [m] :param xs_coordinates: Coordinates of the conductor cross-section (specified in the x-z plane) :param alpha: The first angle of the trapezoidal prism [°] [0, 180) :param beta: The second angle of the trapezoidal prism [°] [0, 180) :param current: The current flowing through the source [A] .. rubric:: Notes Negative angles are allowed, but both angles must be equal .. py:attribute:: _origin .. py:attribute:: _warning :value: False .. py:attribute:: _halflength .. py:attribute:: _dcm .. py:attribute:: _alpha .. py:attribute:: _beta .. py:attribute:: _points .. py:attribute:: __kernel .. py:property:: _kernel .. py:method:: _check_angle_values(alpha, beta, bypass_endcap_error, endcap_warning) Check that end-cap angles are acceptable. :raises MagnetostaticsError: alpha and beta must be within bound [0, 180°) Endcaps must be equal .. py:method:: _set_cross_section(xs_coordinates: bluemira.geometry.coordinates.Coordinates) .. py:method:: field(x: float | numpy.typing.NDArray[numpy.float64], y: float | numpy.typing.NDArray[numpy.float64], z: float | numpy.typing.NDArray[numpy.float64]) -> numpy.typing.NDArray[numpy.float64] Calculate the magnetic field at a point due to the current source. :param x: The x coordinate(s) of the points at which to calculate the field :param y: The y coordinate(s) of the points at which to calculate the field :param z: The z coordinate(s) of the points at which to calculate the field :returns: The magnetic field vector {Bx, By, Bz} in [T] .. py:method:: vector_potential(x: float | numpy.typing.NDArray[numpy.float64], y: float | numpy.typing.NDArray[numpy.float64], z: float | numpy.typing.NDArray[numpy.float64]) -> numpy.typing.NDArray[numpy.float64] Calculate the vector potential at a point due to the current source. :param x: The x coordinate(s) of the points at which to calculate the field :param y: The y coordinate(s) of the points at which to calculate the field :param z: The z coordinate(s) of the points at which to calculate the field :returns: The vector potential {Ax, Ay, Az} in [T] .. py:method:: _calculate_points() -> numpy.typing.NDArray[numpy.float64] Calculate extrema points of the current source for integration and plotting purposes :returns: extrema points