freegs.multi_coil.MultiCoil#

class freegs.multi_coil.MultiCoil(R, Z, current=0.0, turns=1, control=True, mirror=False, polarity=[1.0, 1.0], area=<freegs.coil.AreaCurrentLimit object>)[source]#

Bases: Coil

This class is multifunctional and can model several coil arrangements:

  1. A single PF coil

  2. A block of several PF coil filaments, modelled as
    1. a single point in (R,Z)

    2. a list of (R,Z) points for each filament in the block

In both cases, the specified coil(s) can also be mirrored in Z=0 and connected in a circuit sharing the same power supply. In such a case, there is also the option to specify the polarity of the currents in the upper and lower coil blocks, enabling the wiring of these blocks in opposite directions.

public members#

R, Z:

Location of the point coil/Locations of coil filaments

current:

current in the coil(s) in Amps

turns:

Number of turns if using point coils

control:

enable or disable control system

mirror:

enable or disable mirroring of coil block in Z=0

polarity:

wiring of coil blocks in circuit

area:

Cross-section area in m^2

For multiple point coils, the total toroidal current carried by the point coil block is current * turns

__init__(R, Z, current=0.0, turns=1, control=True, mirror=False, polarity=[1.0, 1.0], area=<freegs.coil.AreaCurrentLimit object>)[source]#

Area can be a fixed value (e.g. 0.025 for 5x5cm coil), or can be specified using a function which takes a coil as an input argument. To specify a current density limit, use:

area = AreaCurrentLimit(current_density)

where current_density is in A/m^2. The area of the coil will be recalculated as the coil current is changed.

The most important effect of the area is on the coil self-force: The smaller the area the larger the hoop force for a given current.

Parameters:
  • R – Location of the coil centre. If modified moves all filaments

  • Z – Location of the coil centre. If modified moves all filaments

  • Rfil – Locations of coil filaments (lists)

  • Zfil – Locations of coil filaments (lists)

  • current – current in each turn of the coil in Amps

  • turns – Number of turns in point coil(s) block. Total block current is current * turns. This is only used if R,Z are a single point

  • control – enable or disable control system

  • mirror – mirror the point/detailed coil block in Z=0, creating a circuit

  • polarity – Wiring of the circuit: same or opposite direction, [Block 1, Block 2]

  • area – Cross-section area of block in m^2

Methods

Br(R, Z)

Calculate radial magnetic field Br at (R,Z)

Bz(R, Z)

Calculate vertical magnetic field Bz at (R,Z)

__init__(R, Z[, current, turns, control, ...])

Area can be a fixed value (e.g. 0.025 for 5x5cm coil), or can be specified using a function which takes a coil as an input argument.

calcPsiFromGreens(pgreen)

Calculate plasma psi from Greens functions and current

controlBr(R, Z)

Calculate radial magnetic field Br at (R,Z) due to a unit current

controlBz(R, Z)

Calculate vertical magnetic field Bz at (R,Z) due to a unit current

controlPsi(R, Z)

Calculate poloidal flux at (R,Z) due to a unit current

createPsiGreens(R, Z)

Calculate the Greens function at every point, and return array.

from_numpy_array(value)

getForces(equilibrium)

Calculate forces on the coils in Newtons

inShape(polygon)

plot([axis, show])

Plot the coil including turn locations

psi(R, Z)

Calculate poloidal flux at (R,Z)

to_numpy_array()

Helper method for writing output

Attributes

R

Major radius of the coil in m

Z

Height of the coil in m

area

The cross-section area of the coil in m^2

dtype

property R#

Major radius of the coil in m

property Z#

Height of the coil in m

controlBr(R, Z)[source]#

Calculate radial magnetic field Br at (R,Z) due to a unit current

controlBz(R, Z)[source]#

Calculate vertical magnetic field Bz at (R,Z) due to a unit current

controlPsi(R, Z)[source]#

Calculate poloidal flux at (R,Z) due to a unit current

dtype = dtype([('RZlen', '<i8'), ('R', '<f8', (500,)), ('Z', '<f8', (500,)), ('current', '<f8'), ('turns', '<i8'), ('control', '?'), ('mirror', '?'), ('polarity', '<f8', (2,))])#
classmethod from_numpy_array(value)[source]#
plot(axis=None, show=False)[source]#

Plot the coil including turn locations

to_numpy_array()[source]#

Helper method for writing output