desc.coils.SplineXYZCoil.compute_magnetic_vector_potential

SplineXYZCoil.compute_magnetic_vector_potential(coords, params=None, basis='rpz', source_grid=None, transforms=None, chunk_size=None)Source

Compute magnetic vector potential 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 magnetic vector potential 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 vector potential.

  • 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.

  • transforms (dict of Transform or array-like) – Transforms for R, Z, lambda, etc. Default is to build from grid.

  • chunk_size (int or None) – Size to split computation into chunks of evaluation points. If no chunking should be done or the chunk size is the full input then supply None. Default is None.

Returns:

A (ndarray, shape(n,3)) – Magnetic vector potential at specified points, in either rpz or xyz coordinates

Notes

Discretizes the coil into straight segments between grid points, and uses the Hanson-Hirshman expression for exact vector potential from a straight segment. Convergence is approximately quadratic in the number of coil points.