bluemira.magnetostatics.biot_savart

Biot-Savart filament object

Classes

BiotSavartFilament

Class to calculate field and vector potential from an arbitrary filament.

Module Contents

class bluemira.magnetostatics.biot_savart.BiotSavartFilament(arrays: bluemira.geometry.coordinates.Coordinates | numpy.typing.NDArray[numpy.float64] | list[bluemira.geometry.coordinates.Coordinates] | list[numpy.typing.NDArray[numpy.float64]], radius: float, current: float = 1.0)

Bases: bluemira.magnetostatics.baseclass.CurrentSource

Inheritance diagram of bluemira.magnetostatics.biot_savart.BiotSavartFilament

Class to calculate field and vector potential from an arbitrary filament.

Parameters:
  • arrays (bluemira.geometry.coordinates.Coordinates | numpy.typing.NDArray[numpy.float64] | list[bluemira.geometry.coordinates.Coordinates] | list[numpy.typing.NDArray[numpy.float64]]) – The arbitrarily shaped closed current Coordinates. Alternatively provide the list of Coordinates objects.

  • radius (float) – The nominal radius of the coil [m].

  • current (float) – The current flowing through the filament [A]. Defaults to 1 A to enable current to be optimised separately from the field response.

_d_l
_d_l_hat
_mid_points
_points
_arrays
_radius
current = 1.0
static _check_discretisation(d_l: numpy.typing.NDArray[numpy.float64])

Check the discretisation of the array.

Parameters:

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

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 of an arbitrarily shaped Coordinates.

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

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

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

Returns:

The vector potential at the point due to the arbitrarily shaped Coordinates

Return type:

numpy.typing.NDArray[numpy.float64]

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 field due to the arbitrarily shaped Coordinates.

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 field at the point(s) due to the arbitrarily shaped Coordinates

Return type:

numpy.typing.NDArray[numpy.float64]

Notes

\(\dfrac{\mu_{0}}{4\pi}\oint \dfrac{Idl \times\mathbf{r^{'}}}{|\mathbf{r^{'}}|^{3}}\)

This is the original Biot-Savart equation, without centre-averaged smoothing. Do not use for values near the coil current centreline.

inductance() float

Calculate the total inductance of the BiotSavartFilament.

Returns:

The total inductance (including self-inductance of reference Coordinates) [H]

Return type:

float

Notes

\(\dfrac{\mu_{0}}{4\pi}\oint \dfrac{d\mathbf{x_{1}} \cdot d\mathbf{r_{x}}}{|\mathbf{x_{1}}-\mathbf{x_{2}}|}\)

https://arxiv.org/pdf/1204.1486.pdf

You probably shouldn’t use this if you are actually interested in the inductance of an arbitrarily shaped Coordinates…

rotate(angle: float, axis: str | numpy.ndarray)

Rotate the CurrentSource about an axis.

Parameters:
  • angle (float) – The rotation degree [degree]

  • axis (str | numpy.ndarray) – The axis of rotation

plot(ax: matplotlib.pyplot.Axes | None = None, *, show_coord_sys: bool = False)

Plot the CurrentSource.

Parameters:
  • ax (matplotlib.pyplot.Axes | None) – The matplotlib axes to plot on

  • show_coord_sys (bool) – Whether or not to plot the coordinate systems