freegs.shaped_coil.ShapedCoil#

class freegs.shaped_coil.ShapedCoil(shape, current=0.0, turns=1, control=True, npoints=6)[source]#

Bases: Coil

Represents a coil with a specified shape

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 area - Cross-section area in m^2

The total toroidal current carried by the coil block is current * turns

__init__(shape, current=0.0, turns=1, control=True, npoints=6)[source]#

Inputs#

shape:

Outline of the coil shape as a list of points [(r1,z1), (r2,z2), ...]. Must have more than two points

current:

The current in the circuit. The total current is current * turns

turns:

Number of turns in point coil(s) block. Total block current is current * turns

control:

enable or disable control system

npoints:

Number of quadrature points per triangle. Valid choices: 1, 3, 6

Methods

Br(R, Z)

Calculate radial magnetic field Br at (R,Z)

Bz(R, Z)

Calculate vertical magnetic field Bz at (R,Z)

__init__(shape[, current, turns, control, ...])

Inputs shape: Outline of the coil shape as a list of points [(r1,z1), (r2,z2), ...]. Must have more than two points current: The current in the circuit. The total current is current * turns turns: Number of turns in point coil(s) block. Total block current is current * turns control: enable or disable control system npoints: Number of quadrature points per triangle. Valid choices: 1, 3, 6

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 in the circuit

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 shape, using axis if given

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

property area#

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

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 in the circuit

dtype = dtype([('RZlen', '<i8'), ('R', '<f8', (10,)), ('Z', '<f8', (10,)), ('current', '<f8'), ('turns', '<i8'), ('control', '?'), ('npoints', '<i8')])#
classmethod from_numpy_array(value)[source]#
inShape(polygon)[source]#
plot(axis=None, show=False)[source]#

Plot the coil shape, using axis if given

to_numpy_array()[source]#

Helper method for writing output