bluemira.magnetostatics.circular_arc
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
3-D circular arc prism current source with a rectangular cross-section and |
Module Contents
- class bluemira.magnetostatics.circular_arc.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:
bluemira.magnetostatics.baseclass.CrossSectionCurrentSource3-D circular arc prism current source with a rectangular cross-section and uniform current distribution.
- 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]
radius (float) – The radius of the circular arc from the origin [m]
dtheta (float) – The azimuthal width of the arc [°]
current (float) – The current flowing through the source [A]
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.
- _origin
- _breadth
- _depth
- _length
- _radius
- _dtheta
- _rho
- _dcm
- _points
- property radius: float
Get the radius of the CircularArcCurrentSource
- Returns:
Radius of the CircularArcCurrentSource
- Return type:
float
- property breadth: float
Get the breadth of the CircularArcCurrentSource.
- Returns:
Breadth of the CircularArcCurrentSource
- Return type:
float
- _update_r1r2()
Update
- static _local_to_cylindrical(point: numpy.typing.NDArray[numpy.float64]) numpy.typing.NDArray[numpy.float64]
Convert from local to cylindrical coordinates.
- Returns:
Cylindrical coordinates of point.
- Parameters:
point (numpy.typing.NDArray[numpy.float64])
- Return type:
numpy.typing.NDArray[numpy.float64]
- _cylindrical_to_working(zp: float) tuple[float, float, float, float]
Convert from local cylindrical coordinates to working coordinates.
- Returns:
r +- breadth and z +- depth.
- Parameters:
zp (float)
- Return type:
tuple[float, float, float, float]
- _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
- Parameters:
rp (float)
tp (float)
zp (float)
- 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]) 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:
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]
- plot(ax: matplotlib.pyplot.Axes | None = None, *, show_coord_sys: bool = False)
Plot the CircularArcCurrentSource.
- Parameters:
ax (Union[None, Axes]) – The matplotlib axes to plot on
show_coord_sys (bool) – Whether or not to plot the coordinate systems