freegs.machine.Solenoid#

class freegs.machine.Solenoid(Rs, Zsmin, Zsmax, Ns, current=0.0, control=True)[source]#

Bases: object

Represents 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)

to_numpy_array()

Helper method for writing output

Attributes

Br(R, Z)[source]#

Calculate radial magnetic field Br at (R,Z)

Bz(R, Z)[source]#

Calculate vertical magnetic field Bz at (R,Z)

calcPsiFromGreens(pgreen)[source]#

Calculate psi from Greens functions

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

R and Z should have the same dimensions, but can be multi-dimensional Return should have the same shape

createPsiGreens(R, Z)[source]#

Calculate Greens functions

dtype = dtype([('Rs', '<f8'), ('Zsmin', '<f8'), ('Zsmax', '<f8'), ('Ns', '<f8'), ('current', '<f8'), ('control', '?')])#
classmethod from_numpy_array(value)[source]#
getForces(equilibrium)[source]#

Calculate forces on the solenoid. Not currently implemented

plot(axis=None, show=False)[source]#
psi(R, Z)[source]#

Calculate poloidal flux at (R,Z)

to_numpy_array()[source]#

Helper method for writing output