API Reference
MXHEquilibrium
Missing docstring for AbstractEquilibrium. Check Documenter's build log for details.
MXHEquilibrium.AsymmetricMillerShape — TypeAsymmetricMillerShape Structure
Defines the Asymmetric Miller Plasma Shape Parameterization
Fields:R0 - Major Radius [m]Z0 - Elevation [m]ϵ - Inverse Aspect Ratio a/R0 where a = minor radiusκ - Elongationδl - Lower Triangularityδu - Upper Triangularity
MXHEquilibrium.LuceShape — TypeLuce Plasma Shape as described in:
"An analytic functional form for characterization and generation of axisymmetric plasma boundaries",
TC Luce, Plasma Phys. Control. Fusion 55 (2013) http://dx.doi.org/10.1088/0741-3335/55/9/095009
Fields:R0 - Major Radius [m]Z0 - Elevation [m]r - Minor Radius [m]Zᵣₘ - Z(Rₘₐₓ) [m]κ - Lower and Upper Elongationδ - Lower and Upper Triangulationζ - Squareness for the I,II,III,IV quadrants
MXHEquilibrium.MillerExtendedHarmonicShape — TypeMillerExtendedHarmonicShape Structure
Defines the Miller Extended Harmonic Plasma Shape Parameterization
Arbon, Ryan, Jeff Candy, and Emily A. Belli. "Rapidly-convergent flux-surface shape parameterization." Plasma Physics and Controlled Fusion 63.1 (2020): 012001.
Fields:R0 - Major Radius [m]Z0 - Elevation [m]ϵ - Inverse Aspect Ratio a/R0 where a = minor radiusκ - Elongationc0 - Tiltc - Cosine coefficients i.e. [ovality, twist, ...]s - Sine coefficients i.e. [asin(triangularity), -squareness, ...])
MXHEquilibrium.MillerShape — TypeMillerShape Structure
Defines the Miller Plasma Shape Parameterization
Fields:R0 - Major Radius [m]Z0 - Elevation [m]ϵ - Inverse Aspect Ratio a/R0 where a = minor radiusκ - Elongationδ - Triangularity
MXHEquilibrium.PlasmaGeometricParameters — TypePlasma Geometry Parameters as described in:
"An analytic functional form for characterization and generation of axisymmetric plasma boundaries",
TC Luce, Plasma Phys. Control. Fusion 55 (2013) http://dx.doi.org/10.1088/0741-3335/55/9/095009
Fields:R0 - Major Radius [m]Z0 - Elevation [m]r - Minor Radius [m]Zᵣₘ - Z(Rₘₐₓ) [m]κ - Lower and Upper Elongationδ - Lower and Upper Triangulationζ - Squareness for the I,II,III,IV quadrants
MXHEquilibrium.SolovevEquilibrium — TypeSolovevEquilibrium Structure
Defines the equilibrium that satisfy Δ⋆ψ(x,y) = α + (1 - α)x^2
where (r,z) = (R0 x,R0 y). F(dF/dψ) = -A, μ₀dp/dψ = -C, α = A/(A + C R0²), ψ₀ = R0²(A + C R0²)
Fields:cocos - COCOSB0 - Toroidal magnetic field magnitude on axis [T]S - Plasma Shape alpha - constant relating beta regime (α)qstar - Kink safety factorpsi0 - Poloidal flux normalization (ψ₀)beta_p - Theoretical Poloidal betabeta_t - Theoretical Toroidal betac - Coefficients for Solov'ev polynomialsdiverted - If true then equilibrium has one or more x-pointssymmetric - If true then equilibrium is up-down symmetricsigma - Sign of dot(B,J)
MXHEquilibrium.TurnbullMillerShape — TypeTurnbullMillerShape Structure
Defines the Turnbull-Miller Plasma Shape Parameterization
Turnbull, A. D., et al. "Improved magnetohydrodynamic stability through optimization of higher order moments in cross-section shape of tokamaks." Physics of Plasmas 6.4 (1999): 1113-1116.
Fields:R0 - Major Radius [m]Z0 - Elevation [m]ϵ - Inverse Aspect Ratio a/R0 where a = minor radiusκ - Elongationδ - Triangularityζ - Squareness
MXHEquilibrium.boundary_extrema — Functionouter, top, inner, bottom = boundary_extrema(bdry; interp=true)Returns the outermost, top, innermost, and bottom points on the boundary. Defaults to using interpolation to find extrema
CoordinateConventions.check_cocos — Functioncheck_cocos(g::GEQDSKFIle, cc::Union{Int,COCOS}) -> BoolChecks if GEQDSKFile is consistant with the given cocos, cc
CoordinateConventions.cocos — Functioncocos(g::GEQDSKFile; kwargs...) -> COCOSIdentifies and returns GEQDSKFile COCOS. A unique identification requires setting the clockwise_phi keyword.
Missing docstring for cylindrical_cocos. Check Documenter's build log for details.
Missing docstring for cylindrical_cocos_indices. Check Documenter's build log for details.
Missing docstring for electric_potential. Check Documenter's build log for details.
Missing docstring for electric_potential_gradient. Check Documenter's build log for details.
Missing docstring for flux_surface_geometry. Check Documenter's build log for details.
CoordinateConventions.identify_cocos — Functionidentify_cocos(g::GEQDSKFIle; clockwise_phi=nothing) -> List of possible COCOS IDsIdentifies possible GEQDSKFile COCOS. A unique identification requires setting the clockwise_phi keyword.
Missing docstring for plasma_boundary_psi. Check Documenter's build log for details.
Missing docstring for poloidal_cocos_indices. Check Documenter's build log for details.
Missing docstring for poloidal_current_gradient. Check Documenter's build log for details.
Missing docstring for pressure_gradient. Check Documenter's build log for details.
MXHEquilibrium.solovev — Functionsolovev(B0, R0, ϵ, δ, κ, α, q⋆; B0_dir=1, Ip_dir=1, diverted=false, x_point=nothing, symmetric = true)Creates a SolovevEquilibrium Structure
Arguments:B0 - Toroidal magnetic field magnitude on axis [T]R0 - Major Radius [m]ϵ - inverse aspect ratio a/R0δ - triangularityκ - elongation/ellipticityα - constant relating beta regime (α)q⋆ - Kink safety factor
Keyword Arguments:
'Z0- Elevation [m]\B0dir- Direction of the toroidal field (+1 = CCW, -1 = CW)\Ipdir- Direction of the plasma current (+1 = CCW, -1 = CW)\diverted- If true then equilibrium has one or more x-points\xpoint`- If diverted = true, then xpoint is set to (R0(1-1.1δϵ), -R01.1κϵ) else nothing`symmetric` - Is equilibrium up-down symmetric (must be if not diverted)
solovev(B0, S, α, q⋆; B0_dir=1, Ip_dir=1, diverted=false, x_point=nothing, symmetric = true)Creates a SolovevEquilibrium Structure
Arguments:B0 - Toroidal magnetic field magnitude on axis [T]S - Plasma Shape α - constant relating beta regime (α)q⋆ - Kink safety factor
Keyword Arguments:B0_dir - Direction of the toroidal field (+1 = CCW, -1 = CW)Ip_dir - Direction of the plasma current (+1 = CCW, -1 = CW)diverted - If true then equilibrium has one or more x-pointsx_point - If diverted = true, then x_point is set to (R0(1-1.1δϵ), -R01.1κϵ) else nothingsymmetric - Is equilibrium up-down symmetric
CoordinateConventions.transform_cocos — Functiontransform_cocos(g::GEQDSKFile, cc_in::Union{Int,COCOS}, cc_out::Union{Int,COCOS}; kwargs...) -> GEQDSKFileTransforms the given GEQDSKFile with COCOS=cc_in, and returns a GEQDSKFile with COCOS=cc_out.