freegs.machine.Circuit#
- class freegs.machine.Circuit(coils, current=0.0, control=True)[source]#
Bases:
objectRepresents a collection of coils connected to the same circuit
Public members#
current Current in the circuit [Amps] control Use feedback control? [bool]
Methods
Br(R, Z)Calculate radial magnetic field Br at (R,Z)
Bz(R, Z)Calculate vertical magnetic field Bz at (R,Z)
__init__(coils[, current, control])coils - A list [ (label, Coil, multiplier) ]
calcPsiFromGreens(pgreen)Calculate psi from Greens functions
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 Greens functions
from_numpy_array(value)getForces(equilibrium)Calculate forces on the coils
inShape(polygon)plot([axis, show])Plot the coils in the circuit Returns the axis used
psi(R, Z)Calculate poloidal flux at (R,Z)
Helper method for writing output
Attributes
- dtype = dtype([('label', 'O'), ('coil', [('R', '<f8'), ('Z', '<f8'), ('current', '<f8'), ('turns', '<i8'), ('control', '?')]), ('multiplier', '<f8')])#
- getForces(equilibrium)[source]#
Calculate forces on the coils
Returns a dictionary of coil label -> force
- string_dtype = dtype('O')#