desc.coils.FourierPlanarCoil.compute_magnetic_field

FourierPlanarCoil.compute_magnetic_field(coords, params=None, basis='rpz', source_grid=None)Source

Compute magnetic field at a set of points.

The coil current may be overridden by including current in the params dictionary.

Parameters:
  • coords (array-like shape(n,3)) – Nodes to evaluate field at in [R,phi,Z] or [X,Y,Z] coordinates.

  • params (dict, optional) – Parameters to pass to Curve.

  • basis ({"rpz", "xyz"}) – Basis for input coordinates and returned magnetic field.

  • source_grid (Grid, int or None, optional) – Grid used to discretize coil. If an integer, uses that many equally spaced points. Should NOT include endpoint at 2pi.

Returns:

field (ndarray, shape(n,3)) – magnetic field at specified points, in either rpz or xyz coordinates

Notes

Uses direct quadrature of the Biot-Savart integral for filamentary coils with tangents provided by the underlying curve class. Convergence should be exponential in the number of points used to discretize the curve, though curl(B) may not be zero if not fully converged.