freegs.coil.Coil#
- class freegs.coil.Coil(R, Z, current=0.0, turns=1, control=True, area=<freegs.coil.AreaCurrentLimit object>)[source]#
Bases:
objectRepresents a poloidal field coil
public members#
R, Z - Location of the coil current - current in each turn of the coil in Amps turns - Number of turns control - enable or disable control system area - Cross-section area in m^2
The total toroidal current carried by the coil is current * turns
- __init__(R, Z, current=0.0, turns=1, control=True, area=<freegs.coil.AreaCurrentLimit object>)[source]#
R, Z - Location of the coil
current - current in each turn of the coil in Amps turns - Number of turns. Total coil current is current * turns control - enable or disable control system area - Cross-section area in m^2
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.
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])R, Z - Location of the coil
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 location, using axis if given
psi(R, Z)Calculate poloidal flux at (R,Z)
Helper method for writing output
Attributes
- property area#
The cross-section area of the coil in m^2
- createPsiGreens(R, Z)[source]#
Calculate the Greens function at every point, and return array. This will be passed back to evaluate Psi in calcPsiFromGreens()
- dtype = dtype([('R', '<f8'), ('Z', '<f8'), ('current', '<f8'), ('turns', '<i8'), ('control', '?')])#
- getForces(equilibrium)[source]#
Calculate forces on the coils in Newtons
Returns an array of two elements: [ Fr, Fz ]
- Force on coil due to its own current:
Lorentz self-forces on curved current loops Physics of Plasmas 1, 3425 (1998); https://doi.org/10.1063/1.870491 David A. Garren and James Chen