API

EQDSKReader.ContentType
Content

Content of EQDSK file.

Attrs:

case    identification character string
nw      number of horizontal grid points
nh      number of vertical grid points
rdim    horizontal dimension in metter of computational box
zdim    vertical dimension in metter of computational box
rcentr  R in meter of vacuum toroidal magnetic field BCENTR
rleft   Minimum R in meter of rectangular computational box
zmid    Z of center of computational box in meter
rmaxis  R of magnetic axis in meter
zmaxis  Z of magnetic axis in meter
simag   poloidal flux at magnetic axis in Weber /rad
sibry   poloidal flux at the plasma boundary in Weber /rad
bcentr  Vacuum toroidal magnetic field in Tesla at RCENTR
current Plasma current in Ampere
fpol    Poloidal current function in m-T, F = RB_T on flux grid
pres    Plasma pressure in nt / m^2 on uniform flux grid
ffprim  FF’(ψ) in (mT)^2 / (Weber /rad) on uniform flux grid
pprime  P’(ψ) in (nt/m^2 ) / (Weber /rad) on uniform flux grid
psirz   Poloidal flux in Weber / rad on the rectangular grid points
qpsi    q values on uniform flux grid from axis to boundary
nbbbs   Number of boundary points
limitr  Number of limiter points
rbbbs   R of boundary points in meter
zbbbs   Z of boundary points in meter
rlim    R of surrounding limiter contour in meter
zlim    Z of surrounding limiter contour in mete
EQDSKReader.calc_boundary_psiMethod
calc_boundary_psi(c::Content)

Returns average value of ψ at the specified plasma boundary.

This value is used in normalize_psi.

EQDSKReader.create_psi_interpolatorMethod
create_psi_interpolator(ψ, rpoints, zpoints)

Create interpolator for matrix ψ with coordinates rpoints and zpoints.

Returns function ψ(r,z) to compute ψ at arbitrary point.

EQDSKReader.lowest_boundary_pointMethod
lowest_boundary_point(c::Content)

Returns coordinates of the lowest point at plasma boundary. This is useful to select points in plasma. There should be ψ ≤ 1 and the points are to be above this point.

EQDSKReader.normalize_psiMethod
function normalize_psi(ψ::Matrix{Float64})::Matrix{Float64}

Normalize matrix Ψ to have zero at minimum and 1.0 on the specified plasma boundary.

Returns normalized matrix.

EQDSKReader.read_eqdskMethod
read_eqdsk(io::IO)

Reads a stream according to spec found in G_EQDSK.pdf.

returns

[`Content`](@ref)
EQDSKReader.rpointsMethod
rpoints(c::Content)

returns

    Coordinates of Ψ(r,z) along tokamak large radius R.
EQDSKReader.zpointsMethod
zpoints(c::Content)

Returns coordinates of Ψ(r,z) along tokamak vertial axis Z.