API Reference

QED

QED.IpFunction
Ip(QI::QED_state)

Return the total plasma current for QED_state QI

source
QED.JBFunction
JB(QI::QED_state; ι=QI.ι, ρ::AbstractVector{<:Real}=QI.ρ)

For a given QED_state QI, return <J⋅B> on grid ρ with rotational transform ι By default, use the grid and rotational transform in QI itself

source
QED.Jt_RFunction
Jt_R(QI::QED_state; ι::FE_rep=QI.ι, ρ::AbstractVector{<:Real}=QI.ρ)

For a given QED_state QI, return <Jt/R> on grid ρ with rotational transform ι By default, use the grid and rotational transform in QI itself

source
QED.diffuseFunction
diffuse(QI::QED_state, η, tmax::Real, Nt::Integer;
        θimp::Real=0.5,
        Vedge::Union{Nothing,Real}=nothing, Ip::Union{Nothing,Real}=nothing,
        debug::Bool=false, Np::Union{Nothing,Integer}=nothing)

Diffuse rotational transform in QED_state QI with resistivity η for tmax seconds in Nt One of Vedge or Ip should be set Keyword arguments θimp - 0 is fully explicit, 1 is fully implicity, 0.5 (default) gives second-order time accuracy Vedge - edge loop voltage boundary condition (in Volts) Ip - total plasma current boundary condition (in Amps) debug - plot intermediate rotational-transform profiles Np - if debug is true, number of time steps between plots of rotational transform

source
QED.evolveFunction
evolve(QI::QED_state, η, build::QED_build, tmax::Real, Nt::Integer;
        θimp::Real=0.5,
        debug::Bool=false, Np::Union{Nothing,Integer}=nothing)

Evolve rotational transform in QED_state QI with resistivity η and surrounding structures build for tmax seconds in Nt Keyword arguments θimp - 0 is fully explicit, 1 is fully implicity, 0.5 (default) gives second-order time accuracy debug - plot intermediate rotational-transform profiles Np - if debug is true, number of time steps between plots of rotational transform

source
Missing docstring.

Missing docstring for evolve!. Check Documenter's build log for details.

QED.from_imasFunction
from_imas(filename::String, timeslice=1)

Initialize the QED data structure from a JSON filename in IMAS format at requested timeslice

source
from_imas(data::Dict, timeslice=1)

Initialize the QED data structure from a dictionary data in IMAS format at requested timeslice

source
QED.initializeFunction
initialize(rho_tor::AbstractVector{<:Real},
           B₀::Real,
           gm1::AbstractVector{<:Real},
           f::AbstractVector{<:Real},
           dvolume_drho_tor::AbstractVector{<:Real},
           q::AbstractVector{<:Real},
           j_tor::AbstractVector{<:Real},
           gm9::AbstractVector{<:Real};
           ρ_j_non_inductive::Union{Nothing,Tuple{<:AbstractVector{<:Real},<:AbstractVector{<:Real}}}=nothing,
           ρ_grid::Union{Nothing,AbstractVector{<:Real}}=nothing)

Initialize the QED data structure with data typically taken from an IMAS-like data structure, e.g.,

eqt = data["equilibrium"]["time_slice"][timeslice]
rho_tor = eqt["profiles_1d"]["rho_tor"]
B₀ = data["equilibrium"]["vacuum_toroidal_field"]["b0"][timeslice]
gm1 = eqt["profiles_1d"]["gm1"]
f = eqt["profiles_1d"]["f"]
dvolume_drho_tor = eqt["profiles_1d"]["dvolume_drho_tor"]
q = eqt["profiles_1d"]["q"]
j_tor = eqt["profiles_1d"]["j_tor"]
gm9 = eqt["profiles_1d"]["gm9"]

Keyword arguments: ρ_j_non_inductive - a tuple giving a grid and the noninductive current e.g., ρ_j_non_inductive = (prof1d["grid"]["rho_tor_norm"], prof1d["j_non_inductive"]) ρ_grid - The grid for QED to operate on. By default, it uses normalized rho_tor

source
QED.steady_stateFunction
steady_state(QI::QED_state, η; debug::Bool=false,
             Vedge::Union{Nothing,Real}=nothing, Ip::Union{Nothing,Real}=nothing)

Compute steady-state rotational transform for QED_state QI with resistivity η One of Vedge or Ip should be set Keyword arguments Vedge - edge loop voltage boundary condition (in Volts) Ip - total plasma current boundary condition (in Amps) debug - plot rotational-transform profiles

source
QED.η_FEFunction
η_FE(rho::AbstractVector{<:Real}, η::AbstractVector{<:Real}; use_log::Bool=true)

Return a cubic-Hermite finite-element interpolation of the resistivity η on grid rho use_log=true (default) interpolates on the log of the resistivity

source
QED.η_imasFunction
η_imas(filename::String, timeslice::Integer=1; use_log::Bool=true)

Return an interpolation of the resistivity from an IMAS-like JSON file filename at timeslice use_log=true (default) interpolates on the log of the resistivity

source
η_imas(data::Dict, timeslice::Integer=1; use_log::Bool=true)

Return an interpolation of the resistivity from an IMAS-like dictionary data at timeslice use_log=true (default) interpolates on the log of the resistivity

source
QED.η_mockFunction
η_mock(; T0::Real=3000.0, Tp::Real=500.0, Ts::Real=100.0)

Return a function of a mock resistivity profile with temperatures T0 (core), Tp (pedestal), and Ts (separatrix)

source