desc.coils.initialize_modular_coils

class desc.coils.initialize_modular_coils(eq, num_coils, r_over_a=2.0)Source

Initialize a CoilSet of modular coils for stage 2 optimization.

The coils will be planar, circular coils centered on the equilibrium magnetic axis, and aligned such that the normal to the coil points along the axis. The currents will be set to match the equilibrium required poloidal linking current.

The coils will be FourierPlanarCoil with N=0, if another type is desired use coilset.to_FourierXYZ(N=10), coilset.to_SplineXYZ() etc.

Parameters:
  • eq (Equilibrium) – Stage 1 equilibrium the coils are being optimized for.

  • num_coils (int) – Number of coils to create per field period. For stellarator symmetric equilibria, this will be the number of coils per half-period.

  • r_over_a (float) – Minor radius of the coils, in units of equilibrium minor radius. Note that for strongly shaped equilibria this may need to be large to avoid having the coils intersect the plasma.

Returns:

coilset (CoilSet of FourierPlanarCoil) – Planar coils centered on magnetic axis, with appropriate symmetry.