bluemira.magnetostatics.circular_arc ==================================== .. py:module:: bluemira.magnetostatics.circular_arc .. autoapi-nested-parse:: Analytical expressions for the field due to a circular current arc of rectangular cross-section, following equations as described in: .. doi:: 10.1109/TMAG.1985.1064259 Classes ------- .. autoapisummary:: bluemira.magnetostatics.circular_arc.CircularArcCurrentSource Module Contents --------------- .. py:class:: CircularArcCurrentSource(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, radius: float, dtheta: float, current: float) Bases: :py:obj:`bluemira.magnetostatics.baseclass.CrossSectionCurrentSource` .. autoapi-inheritance-diagram:: bluemira.magnetostatics.circular_arc.CircularArcCurrentSource :parts: 1 :private-bases: 3-D circular arc prism current source with a rectangular cross-section and uniform current distribution. :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 breadth: The breadth of the current source (half-width) [m] :param depth: The depth of the current source (half-height) [m] :param radius: The radius of the circular arc from the origin [m] :param dtheta: The azimuthal width of the arc [°] :param current: The current flowing through the source [A] .. rubric:: Notes The origin is at the centre of the circular arc, with the ds vector pointing towards the start of the circular arc. Cylindrical coordinates are used for calculations under the hood. .. py:attribute:: _origin .. py:attribute:: _breadth .. py:attribute:: _depth .. py:attribute:: _length .. py:attribute:: _radius .. py:attribute:: _dtheta .. py:attribute:: _rho .. py:attribute:: _dcm .. py:attribute:: _points .. py:property:: radius :type: float Get the radius of the CircularArcCurrentSource :returns: Radius of the CircularArcCurrentSource .. py:property:: breadth :type: float Get the breadth of the CircularArcCurrentSource. :returns: Breadth of the CircularArcCurrentSource .. py:method:: _update_r1r2() Update .. py:method:: _local_to_cylindrical(point: numpy.typing.NDArray[numpy.float64]) -> numpy.typing.NDArray[numpy.float64] :staticmethod: Convert from local to cylindrical coordinates. :returns: Cylindrical coordinates of point. .. py:method:: _cylindrical_to_working(zp: float) -> tuple[float, float, float, float] Convert from local cylindrical coordinates to working coordinates. :returns: r +- breadth and z +- depth. .. py:method:: _BxByBz(rp: float, tp: float, zp: float) -> numpy.typing.NDArray[numpy.float64] Calculate the field at a point in local coordinates. :returns: (Bx, By, Bz) at a point .. note:: By set to 0. .. 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:: _calculate_points() -> numpy.typing.NDArray[numpy.float64] Calculate extrema points of the current source for plotting and debugging. :returns: extrema points .. py:method:: plot(ax: matplotlib.pyplot.Axes | None = None, *, show_coord_sys: bool = False) Plot the CircularArcCurrentSource. :param ax: The matplotlib axes to plot on :type ax: Union[None, Axes] :param show_coord_sys: Whether or not to plot the coordinate systems :type show_coord_sys: bool