freegs.machine.Solenoid#
- class freegs.machine.Solenoid(Rs, Zsmin, Zsmax, Ns, current=0.0, control=True)[source]#
Bases:
objectRepresents a central solenoid
Public members#
current - current in each turn control - enable or disable control system
- __init__(Rs, Zsmin, Zsmax, Ns, current=0.0, control=True)[source]#
Rs - Radius of the solenoid Zsmin, Zsmax - Minimum and maximum Z Ns - Number of turns
current - current in each turn control - enable or disable control system
Methods
Br(R, Z)Calculate radial magnetic field Br at (R,Z)
Bz(R, Z)Calculate vertical magnetic field Bz at (R,Z)
__init__(Rs, Zsmin, Zsmax, Ns[, current, ...])Rs - Radius of the solenoid Zsmin, Zsmax - Minimum and maximum Z Ns - Number of turns
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 solenoid.
plot([axis, show])psi(R, Z)Calculate poloidal flux at (R,Z)
Helper method for writing output
Attributes
- controlPsi(R, Z)[source]#
Calculate poloidal flux at (R,Z) due to a unit current
R and Z should have the same dimensions, but can be multi-dimensional Return should have the same shape
- dtype = dtype([('Rs', '<f8'), ('Zsmin', '<f8'), ('Zsmax', '<f8'), ('Ns', '<f8'), ('current', '<f8'), ('control', '?')])#