From 26d9f8af9f7863dcc58f6dc5edbc1c71e61c5a1b Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 13 Feb 2025 01:00:52 +0000 Subject: [PATCH] build based on 9a5c904 --- dev/.documenter-siteinfo.json | 2 +- dev/api/index.html | 124 +++++++++++++++++----------------- dev/expressions/index.html | 2 +- dev/index.html | 2 +- dev/license/index.html | 2 +- dev/notice/index.html | 2 +- 6 files changed, 67 insertions(+), 67 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 791d445a..40fff047 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.3","generation_timestamp":"2025-02-12T19:32:51","documenter_version":"1.8.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.3","generation_timestamp":"2025-02-13T01:00:44","documenter_version":"1.8.1"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 199a5a7f..2e9f842a 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -3,44 +3,44 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-65D8V8C8VQ', {'page_path': location.pathname + location.search + location.hash}); -

API Reference

Control

IMAS.controllerFunction
controller(ct::IMAS.controllers, name::String)

Pick a controller based on its name, returns nothing if not found

NOTE: for now only looks under dd.controllers.linear_controller

source
IMAS.pid_controllerFunction
pid_controller(controller::IMAS.controllers__linear_controller, kP::T, kI::T, kD::T) where {T<:Real}

Initializes SISO PID controller

source

Extract

IMAS.extractFunction
extract(dd::IMAS.dd, library::Symbol=:extract)

library can be one of:

  • :extract => ExtractFunctionsLibrary
  • :moopt => ConstraintFunctionsLibrary + ObjectiveFunctionsLibrary
  • :all => ExtractFunctionsLibrary + ConstraintFunctionsLibrary + ObjectiveFunctionsLibrary
source
extract(dd::IMAS.dd, xtract::AbstractDict{Symbol,<:ExtractFunction})

Extract data from dd. Each of the ExtractFunction should accept dd as input, like this:

xtract = IMAS.ExtractFunction[
+

API Reference

Control

IMAS.controllerFunction
controller(ct::IMAS.controllers, name::String)

Pick a controller based on its name, returns nothing if not found

NOTE: for now only looks under dd.controllers.linear_controller

source
IMAS.pid_controllerFunction
pid_controller(controller::IMAS.controllers__linear_controller, kP::T, kI::T, kD::T) where {T<:Real}

Initializes SISO PID controller

source

Extract

IMAS.extractFunction
extract(dd::IMAS.dd, library::Symbol=:extract)

library can be one of:

  • :extract => ExtractFunctionsLibrary
  • :moopt => ConstraintFunctionsLibrary + ObjectiveFunctionsLibrary
  • :all => ExtractFunctionsLibrary + ConstraintFunctionsLibrary + ObjectiveFunctionsLibrary
source
extract(dd::IMAS.dd, xtract::AbstractDict{Symbol,<:ExtractFunction})

Extract data from dd. Each of the ExtractFunction should accept dd as input, like this:

xtract = IMAS.ExtractFunction[
     :κ => ExtractFunction(:equilibrium, :κ, "-", dd -> dd.equilibrium.time_slice[].boundary.elongation)
     :Te0 => ExtractFunction(:profiles, :Te0, "keV", dd -> dd.core_profiles.profiles_1d[].electrons.temperature[1] / 1E3)
-]
source
extract(dd::IMAS.dd, filename::AbstractString, args...; kw...)

Like extract(dd) but saves the data to HDF5 file

source

Functions library

Functions library

IMAS.ConstraintFunctionsLibraryConstant
ConstraintFunctionsLibrary::OrderedCollections.OrderedDict{Symbol,ConstraintFunction}

Collection of ConstraintFunction

  • power_electric_net → == 0.0 ± 0.2 [%]
  • min_power_electric_net → > 0.0 [%]
  • flattop_duration → == 0.0 ± 0.01 [%]
  • min_flattop_duration → > 0.0 [%]
  • min_required_B0 → > 0.0 [%]
  • zero_ohmic → == 0.0 ± 0.1 [MA]
  • max_ne_peaking → < 0.0 [%]
  • min_lh_power_threshold_fraction → > 1.0 [%]
  • max_ωpe_ωce → < 1.0 [%]
  • max_qpol_omp → < 0.0 [%]
  • max_tf_coil_j → < 1.0 [%]
  • max_oh_coil_j → < 1.0 [%]
  • max_pl_stress → < 1.0 [%]
  • max_tf_coil_stress → < 1.0 [%]
  • max_oh_coil_stress → < 1.0 [%]
  • max_hds03 → < 0.0 [%]
  • min_q95 → > 0.0 [%]
  • max_beta_normal → < 0.0 []
  • max_Psol_R → < 0.0 [%]
  • max_transport_error → < 0.1 []
source
IMAS.ConstraintFunctionsLibraryConstant
ConstraintFunctionsLibrary::OrderedCollections.OrderedDict{Symbol,ConstraintFunction}

Collection of ConstraintFunction

  • power_electric_net → == 0.0 ± 0.2 [%]
  • min_power_electric_net → > 0.0 [%]
  • flattop_duration → == 0.0 ± 0.01 [%]
  • min_flattop_duration → > 0.0 [%]
  • min_required_B0 → > 0.0 [%]
  • zero_ohmic → == 0.0 ± 0.1 [MA]
  • max_ne_peaking → < 0.0 [%]
  • min_lh_power_threshold_fraction → > 1.0 [%]
  • max_ωpe_ωce → < 1.0 [%]
  • max_qpol_omp → < 0.0 [%]
  • max_tf_coil_j → < 1.0 [%]
  • max_oh_coil_j → < 1.0 [%]
  • max_pl_stress → < 1.0 [%]
  • max_tf_coil_stress → < 1.0 [%]
  • max_oh_coil_stress → < 1.0 [%]
  • max_hds03 → < 0.0 [%]
  • min_q95 → > 0.0 [%]
  • max_beta_normal → < 0.0 []
  • max_Psol_R → < 0.0 [%]
  • max_transport_error → < 0.1 []
source
IMAS.ObjectiveFunctionsLibraryConstant
ObjectiveFunctionsLibrary::OrderedCollections.OrderedDict{Symbol,ObjectiveFunction}

Collection of ObjectiveFunction

  • min_levelized_CoE → -Inf [$/kWh]
  • min_log10_levelized_CoE → -Inf [log₁₀($/kW)]
  • min_capital_cost → -Inf [$B]
  • max_fusion → Inf [MW]
  • max_power_electric_net → Inf [MW]
  • req_power_electric_net → 0.0 [ΔMW]
  • max_flattop → Inf [hours]
  • max_q95 → Inf []
  • req_flattop → 0.0 [Δhours]
  • max_log10_flattop → Inf [log₁₀(hours)]
  • min_βn → -Inf []
  • min_R0 → -Inf [m]
  • max_zeff → Inf []
source
IMAS.ObjectiveFunctionsLibraryConstant
ObjectiveFunctionsLibrary::OrderedCollections.OrderedDict{Symbol,ObjectiveFunction}

Collection of ObjectiveFunction

  • min_levelized_CoE → -Inf [$/kWh]
  • min_log10_levelized_CoE → -Inf [log₁₀($/kW)]
  • min_capital_cost → -Inf [$B]
  • max_fusion → Inf [MW]
  • max_power_electric_net → Inf [MW]
  • req_power_electric_net → 0.0 [ΔMW]
  • max_flattop → Inf [hours]
  • max_q95 → Inf []
  • req_flattop → 0.0 [Δhours]
  • max_log10_flattop → Inf [log₁₀(hours)]
  • min_βn → -Inf []
  • min_R0 → -Inf [m]
  • max_zeff → Inf []
source
IMAS.ExtractFunctionType
group::Symbol
 name::Symbol
 units::String
 func::Function
 error::Union{Nothing,Exception}
-value::Any
source
IMAS.ExtractFunctionsLibraryConstant
ExtractFunctionsLibrary::OrderedCollections.OrderedDict{Symbol,ExtractFunction}

Collection of ExtractFunction

  • geometry.R0 → [m]
  • geometry.a → [m]
  • geometry.1/ϵ → [-]
  • geometry.κ → [-]
  • geometry.δ → [-]
  • geometry.ζ → [-]
  • geometry.Volume → [m³]
  • geometry.Surface → [m²]
  • equilibrium.B0 → [T]
  • equilibrium.ip → [MA]
  • equilibrium.q95 → [-]
  • equilibrium.<Bpol> → [T]
  • equilibrium.βpol_MHD → [-]
  • equilibrium.βtor_MHD → [-]
  • equilibrium.βn_MHD → [-]
  • temperatures.Te0 → [keV]
  • temperatures.Ti0 → [keV]
  • temperatures.<Te> → [keV]
  • temperatures.<Ti> → [keV]
  • temperatures.Te0/<Te> → [-]
  • temperatures.Ti0/<Ti> → [-]
  • densities.ne0 → [m⁻³]
  • densities.ne_ped → [m⁻³]
  • densities.ne_line → [m⁻³]
  • densities.<ne> → [m⁻³]
  • densities.ne0/<ne> → [-]
  • densities.fGW → [-]
  • densities.zeff_ped → [-]
  • densities.<zeff> → [-]
  • densities.impurities → [-]
  • pressures.P0 → [MPa]
  • pressures.<P> → [MPa]
  • pressures.P0/<P> → [-]
  • pressures.βn → [-]
  • pressures.βn_th → [-]
  • transport.τe → [s]
  • transport.τe_exp → [s]
  • transport.H98y2 → [-]
  • transport.H98y2_exp → [-]
  • transport.Hds03 → [-]
  • transport.Hds03_exp → [-]
  • transport.τα_thermalization → [s]
  • transport.τα_slowing_down → [s]
  • sources.Pec → [MW]
  • sources.rho0_ec → [MW]
  • sources.Pnbi → [MW]
  • sources.Enbi1 → [MeV]
  • sources.Pic → [MW]
  • sources.Plh → [MW]
  • sources.Paux_tot → [MW]
  • sources.Pα → [MW]
  • sources.Pohm → [MW]
  • sources.Pheat → [MW]
  • sources.Prad_tot → [MW]
  • exhaust.Psol → [MW]
  • exhaust.PLH → [MW]
  • exhaust.Bpol_omp → [T]
  • exhaust.λq → [mm]
  • exhaust.qpol → [MW/m²]
  • exhaust.qpar → [MW/m²]
  • exhaust.P/R0 → [MW/m]
  • exhaust.PB/R0 → [MW T/m]
  • exhaust.PBp/R0 → [MW T/m]
  • exhaust.PBϵ/R0q95 → [MW T/m]
  • exhaust.neutrons_peak → [MW/m²]
  • currents.ip_bs_aux_ohm → [MA]
  • currents.ip_ni → [MA]
  • currents.ip_bs → [MA]
  • currents.ip_aux → [MA]
  • currents.ip_ohm → [MA]
  • currents.ejima → [-]
  • currents.flattop → [Hours]
  • bop.Pfusion → [MW]
  • bop.Qfusion → [-]
  • bop.thermal_cycle_type → [-]
  • bop.thermal_efficiency_plant → [%]
  • bop.thermal_efficiency_cycle → [%]
  • bop.power_electric_generated → [MW]
  • bop.Pelectric_net → [MW]
  • bop.Qplant → [-]
  • bop.TBR → [-]
  • build.PF_material → [-]
  • build.TF_material → [-]
  • build.OH_material → [-]
  • build.TF_max_b → [T]
  • build.OH_max_b → [T]
  • build.TF_j_margin → [-]
  • build.OH_j_margin → [-]
  • build.TF_stress_margin → [-]
  • build.OH_stress_margin → [-]
  • costing.capital_cost → [$B]
  • costing.levelized_CoE → [$/kWh]
  • costing.TF_of_total → [%]
  • costing.BOP_of_total → [%]
  • costing.blanket_of_total → [%]
  • costing.cryostat_of_total → [%]
source

Geometry

IMAS.centroidFunction
centroid(x::AbstractVector{<:T}, y::AbstractVector{<:T}) where {T<:Real}

Calculate centroid of polygon

source
IMAS.perimeterFunction
perimeter(r::AbstractVector{T}, z::AbstractVector{T})::T where {T<:Real}

Calculate the perimeter of a polygon

source
IMAS.areaFunction
area(x::AbstractVector{<:T}, y::AbstractVector{<:T}) where {T<:Real}

Calculate area of polygon

source
area(layer::IMAS.build__layer)

Calculate cross-sectional area of a build layer

source
area(coil::IMAS.pf_active__coil)

Returns cross sectional area of PF coils

source
IMAS.revolution_volumeFunction
revolution_volume(x::AbstractVector{<:T}, y::AbstractVector{<:T}) where {T<:Real}

Calculate volume of polygon revolved around x=0

source
IMAS.ExtractFunctionsLibraryConstant
ExtractFunctionsLibrary::OrderedCollections.OrderedDict{Symbol,ExtractFunction}

Collection of ExtractFunction

  • geometry.R0 → [m]
  • geometry.a → [m]
  • geometry.1/ϵ → [-]
  • geometry.κ → [-]
  • geometry.δ → [-]
  • geometry.ζ → [-]
  • geometry.Volume → [m³]
  • geometry.Surface → [m²]
  • equilibrium.B0 → [T]
  • equilibrium.ip → [MA]
  • equilibrium.q95 → [-]
  • equilibrium.<Bpol> → [T]
  • equilibrium.βpol_MHD → [-]
  • equilibrium.βtor_MHD → [-]
  • equilibrium.βn_MHD → [-]
  • temperatures.Te0 → [keV]
  • temperatures.Ti0 → [keV]
  • temperatures.<Te> → [keV]
  • temperatures.<Ti> → [keV]
  • temperatures.Te0/<Te> → [-]
  • temperatures.Ti0/<Ti> → [-]
  • densities.ne0 → [m⁻³]
  • densities.ne_ped → [m⁻³]
  • densities.ne_line → [m⁻³]
  • densities.<ne> → [m⁻³]
  • densities.ne0/<ne> → [-]
  • densities.fGW → [-]
  • densities.zeff_ped → [-]
  • densities.<zeff> → [-]
  • densities.impurities → [-]
  • pressures.P0 → [MPa]
  • pressures.<P> → [MPa]
  • pressures.P0/<P> → [-]
  • pressures.βn → [-]
  • pressures.βn_th → [-]
  • transport.τe → [s]
  • transport.τe_exp → [s]
  • transport.H98y2 → [-]
  • transport.H98y2_exp → [-]
  • transport.Hds03 → [-]
  • transport.Hds03_exp → [-]
  • transport.τα_thermalization → [s]
  • transport.τα_slowing_down → [s]
  • sources.Pec → [MW]
  • sources.rho0_ec → [MW]
  • sources.Pnbi → [MW]
  • sources.Enbi1 → [MeV]
  • sources.Pic → [MW]
  • sources.Plh → [MW]
  • sources.Paux_tot → [MW]
  • sources.Pα → [MW]
  • sources.Pohm → [MW]
  • sources.Pheat → [MW]
  • sources.Prad_tot → [MW]
  • exhaust.Psol → [MW]
  • exhaust.PLH → [MW]
  • exhaust.Bpol_omp → [T]
  • exhaust.λq → [mm]
  • exhaust.qpol → [MW/m²]
  • exhaust.qpar → [MW/m²]
  • exhaust.P/R0 → [MW/m]
  • exhaust.PB/R0 → [MW T/m]
  • exhaust.PBp/R0 → [MW T/m]
  • exhaust.PBϵ/R0q95 → [MW T/m]
  • exhaust.neutrons_peak → [MW/m²]
  • currents.ip_bs_aux_ohm → [MA]
  • currents.ip_ni → [MA]
  • currents.ip_bs → [MA]
  • currents.ip_aux → [MA]
  • currents.ip_ohm → [MA]
  • currents.ejima → [-]
  • currents.flattop → [Hours]
  • bop.Pfusion → [MW]
  • bop.Qfusion → [-]
  • bop.thermal_cycle_type → [-]
  • bop.thermal_efficiency_plant → [%]
  • bop.thermal_efficiency_cycle → [%]
  • bop.power_electric_generated → [MW]
  • bop.Pelectric_net → [MW]
  • bop.Qplant → [-]
  • bop.TBR → [-]
  • build.PF_material → [-]
  • build.TF_material → [-]
  • build.OH_material → [-]
  • build.TF_max_b → [T]
  • build.OH_max_b → [T]
  • build.TF_j_margin → [-]
  • build.OH_j_margin → [-]
  • build.TF_stress_margin → [-]
  • build.OH_stress_margin → [-]
  • costing.capital_cost → [$B]
  • costing.levelized_CoE → [$/kWh]
  • costing.TF_of_total → [%]
  • costing.BOP_of_total → [%]
  • costing.blanket_of_total → [%]
  • costing.cryostat_of_total → [%]
source

Geometry

IMAS.centroidFunction
centroid(x::AbstractVector{<:T}, y::AbstractVector{<:T}) where {T<:Real}

Calculate centroid of polygon

source
IMAS.perimeterFunction
perimeter(r::AbstractVector{T}, z::AbstractVector{T})::T where {T<:Real}

Calculate the perimeter of a polygon

source
IMAS.areaFunction
area(x::AbstractVector{<:T}, y::AbstractVector{<:T}) where {T<:Real}

Calculate area of polygon

source
area(layer::IMAS.build__layer)

Calculate cross-sectional area of a build layer

source
area(coil::IMAS.pf_active__coil)

Returns cross sectional area of PF coils

source
IMAS.revolution_volumeFunction
revolution_volume(x::AbstractVector{<:T}, y::AbstractVector{<:T}) where {T<:Real}

Calculate volume of polygon revolved around x=0

source
IMAS.intersection_anglesFunction
intersection_angles(
     path1_r::AbstractVector{T},
     path1_z::AbstractVector{T},
     path2_r::AbstractVector{T},
     path2_z::AbstractVector{T},
     intersection_indexes::Vector{StaticArrays.SVector{2,Int}};
     mod_pi::Bool=true
-) where {T<:Real}

returns angles of intersections between two paths and intersection_indexes given by intersection() function

source
IMAS.intersectionFunction
intersection(
+) where {T<:Real}

returns angles of intersections between two paths and intersection_indexes given by intersection() function

source
IMAS.intersectionFunction
intersection(
     l1_x::AbstractVector{T},
     l1_y::AbstractVector{T},
     l2_x::AbstractVector{T},
     l2_y::AbstractVector{T}
-) where {T<:Real}

Intersections between two 2D paths, returns list of (x,y) intersection indexes and crossing points

source
intersection(
+) where {T<:Real}

Intersections between two 2D paths, returns list of (x,y) intersection indexes and crossing points

source
intersection(
     l1_x::AbstractVector{T},
     l1_y::AbstractVector{T},
     l2_x::AbstractVector{T},
     l2_y::AbstractVector{T},
-    tolerance::Float64) where {T<:Real}

Intersections between two 2D paths, returns list of (x,y) intersection indexes and crossing points

Endpoints crossings are checked with some tolerance

source
IMAS.intersection_splitFunction
intersection_split(
+    tolerance::Float64) where {T<:Real}

Intersections between two 2D paths, returns list of (x,y) intersection indexes and crossing points

Endpoints crossings are checked with some tolerance

source
IMAS.intersection_splitFunction
intersection_split(
     l1_x::AbstractVector{T},
     l1_y::AbstractVector{T},
     l2_x::AbstractVector{T},
-    l2_y::AbstractVector{T}) where {T<:Real}

Returns vector of segments of l1x,l1y split at the intersections with l2x,l2y

source
IMAS.point_to_line_distanceFunction
point_to_line_distance(x0::Real, y0::Real, x1::Real, y1::Real, x2::Real, y2::Real)

Distance of point (x0,y0) from line defined by points (x1,y1) and (x2,y2)

source
IMAS.closest_point_to_segmentFunction
closest_point_to_segment(x0::Real, y0::Real, x1::Real, y1::Real, x2::Real, y2::Real)

Closest point on segment defined by points (x1,y1) and (x2,y2) to point (x0,y0)

source
IMAS.point_to_segment_distanceFunction
point_to_segment_distance(x0::Real, y0::Real, x1::Real, y1::Real, x2::Real, y2::Real)

Distance of point (x0,y0) from segment defined by points (x1,y1) and (x2,y2)

source
IMAS.point_to_path_distanceFunction
point_to_path_distance(x0::Real, y0::Real, x::AbstractVector{<:Real}, y::AbstractVector{<:Real})

Distance of point (x0,y0) from path defined by vectors x and y

source
IMAS.rdp_simplify_2d_pathFunction
rdp_simplify_2d_path(x::AbstractArray{T}, y::AbstractArray{T}, epsilon::T) where {T<:Real}

Simplifies a 2D line represented by arrays of x and y coordinates using the Ramer-Douglas-Peucker algorithm. The epsilon parameter controls the maximum distance allowed between a point on the original line and its simplified representation.

source
IMAS.rwa_simplify_2d_pathFunction
rwa_simplify_2d_path(x::AbstractArray{T}, y::AbstractArray{T}, epsilon::T) where {T<:Real}

Simplifies a 2D line represented by arrays of x and y coordinates using the Reumann-Witkam Algorithm algorithm. This algorithm uses a threshold value to determine which points to keep in the path. Points are kept if the angle between the previous and next line segments is greater than the threshold, and removed if it is less than or equal to the threshold.

source
IMAS.simplify_2d_pathFunction
simplify_2d_path(x::AbstractArray{T}, y::AbstractArray{T}, simplification_factor::T; model::Symbol=:distance)

Simplify 2D path by :curvature (Reumann-Witkam Algorithm) or :distance (Ramer-Douglas-Peucker) algorithms

source
IMAS.resample_2d_pathFunction
resample_2d_path(
+    l2_y::AbstractVector{T}) where {T<:Real}

Returns vector of segments of l1x,l1y split at the intersections with l2x,l2y

source
IMAS.point_to_line_distanceFunction
point_to_line_distance(x0::Real, y0::Real, x1::Real, y1::Real, x2::Real, y2::Real)

Distance of point (x0,y0) from line defined by points (x1,y1) and (x2,y2)

source
IMAS.closest_point_to_segmentFunction
closest_point_to_segment(x0::Real, y0::Real, x1::Real, y1::Real, x2::Real, y2::Real)

Closest point on segment defined by points (x1,y1) and (x2,y2) to point (x0,y0)

source
IMAS.point_to_segment_distanceFunction
point_to_segment_distance(x0::Real, y0::Real, x1::Real, y1::Real, x2::Real, y2::Real)

Distance of point (x0,y0) from segment defined by points (x1,y1) and (x2,y2)

source
IMAS.point_to_path_distanceFunction
point_to_path_distance(x0::Real, y0::Real, x::AbstractVector{<:Real}, y::AbstractVector{<:Real})

Distance of point (x0,y0) from path defined by vectors x and y

source
IMAS.rdp_simplify_2d_pathFunction
rdp_simplify_2d_path(x::AbstractArray{T}, y::AbstractArray{T}, epsilon::T) where {T<:Real}

Simplifies a 2D line represented by arrays of x and y coordinates using the Ramer-Douglas-Peucker algorithm. The epsilon parameter controls the maximum distance allowed between a point on the original line and its simplified representation.

source
IMAS.rwa_simplify_2d_pathFunction
rwa_simplify_2d_path(x::AbstractArray{T}, y::AbstractArray{T}, epsilon::T) where {T<:Real}

Simplifies a 2D line represented by arrays of x and y coordinates using the Reumann-Witkam Algorithm algorithm. This algorithm uses a threshold value to determine which points to keep in the path. Points are kept if the angle between the previous and next line segments is greater than the threshold, and removed if it is less than or equal to the threshold.

source
IMAS.simplify_2d_pathFunction
simplify_2d_path(x::AbstractArray{T}, y::AbstractArray{T}, simplification_factor::T; model::Symbol=:distance)

Simplify 2D path by :curvature (Reumann-Witkam Algorithm) or :distance (Ramer-Douglas-Peucker) algorithms

source
IMAS.resample_2d_pathFunction
resample_2d_path(
     x::AbstractVector{T},
     y::AbstractVector{T};
     step::Float64=0.0,
@@ -48,7 +48,7 @@
     curvature_weight::Float64=0.0,
     retain_extrema::Bool=false,
     retain_original_xy::Bool=false,
-    method::Symbol=:cubic) where {T<:Real}

Resample 2D line with uniform stepping (or number of points) with option to add more points where curvature is highest and option to retain extrema in x and y (in these cases stepping is not constant anymore!)

source
IMAS.resample_plasma_boundaryFunction
resample_plasma_boundary(
+    method::Symbol=:cubic) where {T<:Real}

Resample 2D line with uniform stepping (or number of points) with option to add more points where curvature is highest and option to retain extrema in x and y (in these cases stepping is not constant anymore!)

source
IMAS.resample_plasma_boundaryFunction
resample_plasma_boundary(
     x::AbstractVector{T},
     y::AbstractVector{T};
     step::Float64=0.0,
@@ -56,24 +56,24 @@
     curvature_weight::Float64=0.0,
     retain_extrema::Bool=true,
     retain_original_xy::Bool=false,
-    method::Symbol=:linear) where {T<:Real}

Like resample2dpath but with retain_extrema=true and method=:linear as defaults

source
IMAS.is_z_offsetFunction
is_z_offset(pr::Vector{T}, pz::Vector{T}; order::Int=4, precision::Float64=1E-3) where {T<:Real}

Returns true the shape is offset from z=0 (ie. does not have mxh.z0=0)

source
is_z_offset(mxh::MXH; precision::Float64=1E-3)
source
IMAS.is_updown_symmetricFunction
is_updown_symmetric(pr::Vector{T}, pz::Vector{T}; order::Int=4, precision::Float64=1E-3) where {T<:Real}

Returns true if boundary is updown symmetric (independent of mxh.z0)

source
is_updown_symmetric(mxh::MXH; precision::Float64=1E-3)
source
IMAS.is_z_offsetFunction
is_z_offset(pr::Vector{T}, pz::Vector{T}; order::Int=4, precision::Float64=1E-3) where {T<:Real}

Returns true the shape is offset from z=0 (ie. does not have mxh.z0=0)

source
is_z_offset(mxh::MXH; precision::Float64=1E-3)
source
IMAS.is_updown_symmetricFunction
is_updown_symmetric(pr::Vector{T}, pz::Vector{T}; order::Int=4, precision::Float64=1E-3) where {T<:Real}

Returns true if boundary is updown symmetric (independent of mxh.z0)

source
is_updown_symmetric(mxh::MXH; precision::Float64=1E-3)
source
IMAS.minimum_distance_polygons_verticesFunction
minimum_distance_polygons_vertices(
     R_obj1::AbstractVector{<:T},
     Z_obj1::AbstractVector{<:T},
     R_obj2::AbstractVector{<:T},
     Z_obj2::AbstractVector{<:T};
-    return_index::Bool=false) where {T<:Real}

Returns minimum distance between two polygons vertices

source
IMAS.minimum_distance_polygonsFunction
minimum_distance_polygons(
     R_obj1::AbstractVector{<:T},
     Z_obj1::AbstractVector{<:T},
     R_obj2::AbstractVector{<:T},
-    Z_obj2::AbstractVector{<:T}) where {T<:Real}

Returns minimum distance between two polygons

NOTE: this is the actual distance, not the distance between the vertices

source
IMAS.min_mean_distance_polygonsFunction
min_mean_distance_polygons(
+    Z_obj2::AbstractVector{<:T}) where {T<:Real}

Returns minimum distance between two polygons

NOTE: this is the actual distance, not the distance between the vertices

source
IMAS.min_mean_distance_polygonsFunction
min_mean_distance_polygons(
     R_obj1::AbstractVector{<:T},
     Z_obj1::AbstractVector{<:T},
     R_obj2::AbstractVector{<:T},
-    Z_obj2::AbstractVector{<:T}) where {T<:Real}

Calculate the minimum and mean distances between two polygons in 2D space.

NOTE: this is the actual distance, not the distance between the vertices

source
IMAS.curvatureFunction
curvature(pr::AbstractVector{T}, pz::AbstractVector{T}) where {T<:Real}

Calculate the curvature of a 2D path defined by pr and pz using a finite difference approximation.

The path is assumed to be closed if the first and last points are the same, and open otherwise.

Arguments

  • pr: Real abstract vector representing the r-coordinates of the path.
  • pz: Real abstract vector representing the z-coordinates of the path.

Returns

  • A vector of the same length as pr and pz with the calculated curvature values.
source
IMAS.angle_between_two_vectorsFunction
angle_between_two_vectors(
+    Z_obj2::AbstractVector{<:T}) where {T<:Real}

Calculate the minimum and mean distances between two polygons in 2D space.

NOTE: this is the actual distance, not the distance between the vertices

source
IMAS.curvatureFunction
curvature(pr::AbstractVector{T}, pz::AbstractVector{T}) where {T<:Real}

Calculate the curvature of a 2D path defined by pr and pz using a finite difference approximation.

The path is assumed to be closed if the first and last points are the same, and open otherwise.

Arguments

  • pr: Real abstract vector representing the r-coordinates of the path.
  • pz: Real abstract vector representing the z-coordinates of the path.

Returns

  • A vector of the same length as pr and pz with the calculated curvature values.
source
IMAS.angle_between_two_vectorsFunction
angle_between_two_vectors(
     v1_p1::Tuple{T,T},
     v1_p2::Tuple{T,T},
     v2_p1::Tuple{T,T},
-    v2_p2::Tuple{T,T}) where {T<:Real}

Returns angle in radiants between two vectors defined by their start and end points

source
IMAS.bisectorFunction
bisector(v1, v2, v3)

Returns signed unitary bisector given three vertices

source
IMAS.polygon_raysFunction
polygon_rays(vertices::AbstractVector, extent_a::Float64, extent_b::Float64)

Returns bisecting "rays" (lines) that radiate from vertices of a polygon

source
IMAS.split_long_segmentsFunction
split_long_segments(R::AbstractVector{T}, Z::AbstractVector{T}, max_length::Float64) where {T<:Real}

Split long segments of a polygon so that each resulting segment is always <= max_length

source
split_long_segments(R::AbstractVector{T}, Z::AbstractVector{T}, n_points::Int) where {T<:Real}

Split long segments of a polygon so that there are at least n_points in it

source
IMAS.thick_line_polygonFunction
thick_line_polygon(r1, z1, r2, z2, thickness1, thickness2)

Generates a closed polygon from a thick line. Returns points of the quadrilateral polygon

source
thick_line_polygon(pr::AbstractVector{Float64}, pz::AbstractVector{Float64}, thickness::AbstractVector{Float64})
source
IMAS.convex_hullFunction
convex_hull(xy_points::AbstractVector; closed_polygon::Bool)

Compute the convex hull of a set of 2D points, sorted in counter-clockwise order. The resulting convex hull forms a closed polygon by appending the first point at the end.

source
convex_hull(x::AbstractVector{T}, y::AbstractVector{T}; closed_polygon::Bool) where {T}
source

Math

IMAS.norm01Function
norm01(x::T)::T where {T<:AbstractVector{<:Real}}

Normalize a vector so that the first item in the array is 0 and the last one is 1 This is handy where psinorm should be used (and IMAS does not define a psinorm array)

source
IMAS.to_rangeFunction
to_range(vector::AbstractVector)

Turn a vector into a range (if possible)

source
IMAS.meshgridFunction
meshgrid(x::AbstractVector{T}, y::AbstractVector{T}) where {T}

Return coordinate matrices from coordinate vectors

source
IMAS.calc_zFunction
calc_z(x::AbstractVector{<:Real}, f::AbstractVector{<:Real}, method::Symbol)

Returns the gradient scale lengths of vector f on x

The finite difference method of the gradient can be one of [:backward, :central, :forward, :secondorder, :thirdorder]

NOTE: the inverse scale length is NEGATIVE for typical density/temperature profiles

source
IMAS.integ_zFunction
integ_z(rho::AbstractVector{<:Real}, z_profile::AbstractVector{<:Real}, bc::Real)

Backward integration of inverse scale length vector with given edge boundary condition

source
IMAS.pack_grid_gradientsFunction
pack_grid_gradients(x::AbstractVector{T}, y::AbstractVector{T}; n_points::Int=length(x), l::Float64=1E-2) where {T<:Float64}

Returns grid between minimum(x) and maximum(x) with n_points points positioned to sample y(x) in such a way to pack more points where gradients are greates.

l controls how much the adaptive gradiant sampling should approach linear sampling.

source
IMAS.unique_indicesFunction
unique_indices(vec::AbstractVector)::Vector{Int}

Return the indices of the first occurrence of each unique element in the input vector vec

source
IMAS.index_circularFunction
index_circular(N::Int, idx::Int)

If idx is beyond N or less than 1, it wraps around in a circular manner.

source
IMAS.getindex_circularFunction
getindex_circular(vec::AbstractVector{T}, idx::Int)::T where {T}

Return the element of the vector vec at the position idx.

If idx is beyond the length of vec or less than 1, it wraps around in a circular manner.

source
IMAS.chunk_indicesFunction
chunk_indices(dims::Tuple{Vararg{Int}}, N::Int)

Split the indices of an array with dimensions dims into N chunks of similar size. Each chunk is a generator of CartesianIndex objects.

Arguments

  • dims::Tuple{Vararg{Int}}: A tuple specifying the dimensions of the array. For a 2D array, this would be (rows, cols).
  • N::Int: The number of chunks to split the indices into.

Returns

  • Vector with chunks of cartesian indices. Each chunk can be iterated over to get the individual CartesianIndex objects.
source

Outlines

IMAS.OutlineClosedVectorType
OutlineClosedVector{T,A<:AbstractVector{T}} <: AbstractVector{T}

Outlines in IMAS v3 ontology are always open (NOTE: in v4 they will always be closed!)

Use OutlineClosedVector to have a vector that behaves like a it's a closed outline, without creating a new array (allocation free)

When OutlineClosedVector is put into the dd, it will automatically save it there as an open outline

source
IMAS.OutlineOpenVectorType
OutlineOpenVector{T,A<:AbstractVector{T}} <: AbstractVector{T}

Outlines in IMAS v3 ontology are always open (NOTE: in v4 they will always be closed!)

Use OutlineOpenVector to have a vector that behaves like a it's a open outline, without creating a new array (allocation free)

When OutlineOpenVector is put into the dd, it will automatically save it there as an open outline

source
IMAS.CircularVectorType
CircularVector{T,A<:AbstractVector{T}} <: AbstractVector{T}

Vector with circular indexes, without creating a new array (allocation free)

NOTE: It can be combined with OutlineClosedVector and/or OutlineOpenVector, like this: CircularVector(OutlineClosedVector(x, x_is_closed))

source
IMAS.is_open_polygonFunction
is_open_polygon(R::AbstractVector{T}, Z::AbstractVector{T})::Bool where {T<:Real}

Determine if a polygon, defined by separate vectors for R and Z coordinates, is open.

source
is_open_polygon(vertices::AbstractVector)::Bool
source
IMAS.is_closed_polygonFunction
is_closed_polygon(R::AbstractVector{T}, Z::AbstractVector{T})::Bool where {T<:Real}

Determine if a polygon, defined by separate vectors for R and Z coordinates, is closed.

source
is_closed_polygon(vertices::AbstractVector)::Bool
source
IMAS.open_polygonFunction
open_polygon(R::AbstractVector{T}, Z::AbstractVector{T}, args...) where {T<:Real}

Returns a view of the vectors R and Z such that they are a open polygon

Returns a named tuple containing the status of the polygon (wasclosed, wasopen) and the views of the R and Z vectors.

source
IMAS.closed_polygonFunction
closed_polygon(R::AbstractVector{T}, Z::AbstractVector{T}, args...) where {T<:Real}

Returns a view of the vectors R and Z such that they are a closed polygon

Returns a named tuple containing the status of the polygon (wasclosed, wasopen) and the views of the R and Z vectors.

source
closed_polygon(R::AbstractVector{T}, Z::AbstractVector{T}, closed::Bool, args...) where {T<:Real}

Returns a closed polygon depending on closed otherwise returns an open polygon

source
IMAS.is_clockwiseFunction
is_clockwise(r::AbstractVector{T}, z::AbstractVector{T})::Bool where {T<:Real}

Returns true/false if polygon is defined clockwise

source
IMAS.is_counterclockwiseFunction
is_counterclockwise(r::AbstractVector{T}, z::AbstractVector{T})::Bool where {T<:Real}

Returns true/false if polygon is defined counterclockwise

source

Physics boundary

IMAS.boundary_shapeFunction
boundary_shape(;
+    v2_p2::Tuple{T,T}) where {T<:Real}

Returns angle in radiants between two vectors defined by their start and end points

source
IMAS.bisectorFunction
bisector(v1, v2, v3)

Returns signed unitary bisector given three vertices

source
IMAS.polygon_raysFunction
polygon_rays(vertices::AbstractVector, extent_a::Float64, extent_b::Float64)

Returns bisecting "rays" (lines) that radiate from vertices of a polygon

source
IMAS.split_long_segmentsFunction
split_long_segments(R::AbstractVector{T}, Z::AbstractVector{T}, max_length::Float64) where {T<:Real}

Split long segments of a polygon so that each resulting segment is always <= max_length

source
split_long_segments(R::AbstractVector{T}, Z::AbstractVector{T}, n_points::Int) where {T<:Real}

Split long segments of a polygon so that there are at least n_points in it

source
IMAS.thick_line_polygonFunction
thick_line_polygon(r1, z1, r2, z2, thickness1, thickness2)

Generates a closed polygon from a thick line. Returns points of the quadrilateral polygon

source
thick_line_polygon(pr::AbstractVector{Float64}, pz::AbstractVector{Float64}, thickness::AbstractVector{Float64})
source
IMAS.convex_hullFunction
convex_hull(xy_points::AbstractVector; closed_polygon::Bool)

Compute the convex hull of a set of 2D points, sorted in counter-clockwise order. The resulting convex hull forms a closed polygon by appending the first point at the end.

source
convex_hull(x::AbstractVector{T}, y::AbstractVector{T}; closed_polygon::Bool) where {T}
source

Math

IMAS.norm01Function
norm01(x::T)::T where {T<:AbstractVector{<:Real}}

Normalize a vector so that the first item in the array is 0 and the last one is 1 This is handy where psinorm should be used (and IMAS does not define a psinorm array)

source
IMAS.to_rangeFunction
to_range(vector::AbstractVector)

Turn a vector into a range (if possible)

source
IMAS.meshgridFunction
meshgrid(x::AbstractVector{T}, y::AbstractVector{T}) where {T}

Return coordinate matrices from coordinate vectors

source
IMAS.calc_zFunction
calc_z(x::AbstractVector{<:Real}, f::AbstractVector{<:Real}, method::Symbol)

Returns the gradient scale lengths of vector f on x

The finite difference method of the gradient can be one of [:backward, :central, :forward, :secondorder, :thirdorder]

NOTE: the inverse scale length is NEGATIVE for typical density/temperature profiles

source
IMAS.integ_zFunction
integ_z(rho::AbstractVector{<:Real}, z_profile::AbstractVector{<:Real}, bc::Real)

Backward integration of inverse scale length vector with given edge boundary condition

source
IMAS.pack_grid_gradientsFunction
pack_grid_gradients(x::AbstractVector{T}, y::AbstractVector{T}; n_points::Int=length(x), l::Float64=1E-2) where {T<:Float64}

Returns grid between minimum(x) and maximum(x) with n_points points positioned to sample y(x) in such a way to pack more points where gradients are greates.

l controls how much the adaptive gradiant sampling should approach linear sampling.

source
IMAS.unique_indicesFunction
unique_indices(vec::AbstractVector)::Vector{Int}

Return the indices of the first occurrence of each unique element in the input vector vec

source
IMAS.index_circularFunction
index_circular(N::Int, idx::Int)

If idx is beyond N or less than 1, it wraps around in a circular manner.

source
IMAS.getindex_circularFunction
getindex_circular(vec::AbstractVector{T}, idx::Int)::T where {T}

Return the element of the vector vec at the position idx.

If idx is beyond the length of vec or less than 1, it wraps around in a circular manner.

source
IMAS.chunk_indicesFunction
chunk_indices(dims::Tuple{Vararg{Int}}, N::Int)

Split the indices of an array with dimensions dims into N chunks of similar size. Each chunk is a generator of CartesianIndex objects.

Arguments

  • dims::Tuple{Vararg{Int}}: A tuple specifying the dimensions of the array. For a 2D array, this would be (rows, cols).
  • N::Int: The number of chunks to split the indices into.

Returns

  • Vector with chunks of cartesian indices. Each chunk can be iterated over to get the individual CartesianIndex objects.
source

Outlines

IMAS.OutlineClosedVectorType
OutlineClosedVector{T,A<:AbstractVector{T}} <: AbstractVector{T}

Outlines in IMAS v3 ontology are always open (NOTE: in v4 they will always be closed!)

Use OutlineClosedVector to have a vector that behaves like a it's a closed outline, without creating a new array (allocation free)

When OutlineClosedVector is put into the dd, it will automatically save it there as an open outline

source
IMAS.OutlineOpenVectorType
OutlineOpenVector{T,A<:AbstractVector{T}} <: AbstractVector{T}

Outlines in IMAS v3 ontology are always open (NOTE: in v4 they will always be closed!)

Use OutlineOpenVector to have a vector that behaves like a it's a open outline, without creating a new array (allocation free)

When OutlineOpenVector is put into the dd, it will automatically save it there as an open outline

source
IMAS.CircularVectorType
CircularVector{T,A<:AbstractVector{T}} <: AbstractVector{T}

Vector with circular indexes, without creating a new array (allocation free)

NOTE: It can be combined with OutlineClosedVector and/or OutlineOpenVector, like this: CircularVector(OutlineClosedVector(x, x_is_closed))

source
IMAS.is_open_polygonFunction
is_open_polygon(R::AbstractVector{T}, Z::AbstractVector{T})::Bool where {T<:Real}

Determine if a polygon, defined by separate vectors for R and Z coordinates, is open.

source
is_open_polygon(vertices::AbstractVector)::Bool
source
IMAS.is_closed_polygonFunction
is_closed_polygon(R::AbstractVector{T}, Z::AbstractVector{T})::Bool where {T<:Real}

Determine if a polygon, defined by separate vectors for R and Z coordinates, is closed.

source
is_closed_polygon(vertices::AbstractVector)::Bool
source
IMAS.open_polygonFunction
open_polygon(R::AbstractVector{T}, Z::AbstractVector{T}, args...) where {T<:Real}

Returns a view of the vectors R and Z such that they are a open polygon

Returns a named tuple containing the status of the polygon (wasclosed, wasopen) and the views of the R and Z vectors.

source
IMAS.closed_polygonFunction
closed_polygon(R::AbstractVector{T}, Z::AbstractVector{T}, args...) where {T<:Real}

Returns a view of the vectors R and Z such that they are a closed polygon

Returns a named tuple containing the status of the polygon (wasclosed, wasopen) and the views of the R and Z vectors.

source
closed_polygon(R::AbstractVector{T}, Z::AbstractVector{T}, closed::Bool, args...) where {T<:Real}

Returns a closed polygon depending on closed otherwise returns an open polygon

source
IMAS.is_clockwiseFunction
is_clockwise(r::AbstractVector{T}, z::AbstractVector{T})::Bool where {T<:Real}

Returns true/false if polygon is defined clockwise

source
IMAS.is_counterclockwiseFunction
is_counterclockwise(r::AbstractVector{T}, z::AbstractVector{T})::Bool where {T<:Real}

Returns true/false if polygon is defined counterclockwise

source

Physics boundary

IMAS.boundary_shapeFunction
boundary_shape(;
     a::T,
     eps::T,
     kapu::T,
@@ -88,29 +88,29 @@
     upnull::Bool=false,
     lonull::Bool=false,
     npts::Int=90
-) where {T<:Real}

Function used to generate boundary shapes based on T. C. Luce, PPCF, 55 9 (2013)

  • a: minor radius
  • eps: aspect ratio
  • kapu: upper elongation
  • lkap: lower elongation
  • delu: upper triangularity
  • dell: lower triangularity
  • zetaou: upper outer squareness
  • zetaiu: upper inner squareness
  • zetail: lower inner squareness
  • zetaol: lower outer squareness
  • zoffset: z-offset
  • upnull: toggle upper x-point
  • lonull: toggle lower x-point
  • npts: number of points (per quadrant)

returns tuple with arrays of (r, z, zref)

>> boundary_shape(;a=0.608,eps=0.374,kapu=1.920,kapl=1.719,delu=0.769,dell=0.463,zetaou=-0.155,zetaiu=-0.255,zetail=-0.174,zetaol=-0.227,zoffset=0.000,upnull=true,lonull=false)
source
IMAS.boundaryFunction
boundary(pc::IMAS.pulse_schedule__position_control{T}, time0::Float64)

return boundary from pulseschedule.positioncontrol at a given time0

source
boundary(pc::IMAS.pulse_schedule__position_control{T}, time_index::Int)

returns boundary from pulseschedule.positioncontrol at a given time_index

source
boundary(pc::IMAS.pulse_schedule__position_control; time0::Float64=global_time(pc))

Beturns r,z vectors from pulseschedule.positioncontrol.equilibriumtime_slice___boundaryoutline

source
IMAS.x_pointsFunction
x_points(x_points::IMAS.IDSvector{<:IMAS.pulse_schedule__position_control__x_point{T}}; time0::Float64=global_time(x_points)) where {T<:Real}

Beturns vector with tuples of R,Z coordinates of x-points in pulse_schedule at time0

source
IMAS.strike_pointsFunction
strike_points(strike_points::IMAS.IDSvector{<:IMAS.pulse_schedule__position_control__strike_point{T}}; time0::Float64=global_time(strike_points)) where {T<:Real}

Beturns vector with tuples of R,Z coordinates of x-points in pulse_schedule at time0

source

Physics build

IMAS.BuildLayerTypeType
Enum BuildLayerType

Used for dd.build.layer[:].type

  • _plasma_ -> -1
  • _gap_ -> 0
  • _oh_ -> 1
  • _tf_ -> 2
  • _shield_ -> 3
  • _blanket_ -> 4
  • _wall_ -> 5
  • _vessel_ -> 6
  • _cryostat_ -> 7
  • _divertor_ -> 8
  • _port_ -> 9
source
IMAS.BuildLayerSideType
Enum BuildLayerSide

Used for dd.build.layer[:].side

  • _lfs_ -> -1
  • _lhfs_ -> 0
  • _hfs_ -> 1
  • _in_ -> 2
  • _out_ -> 3
source
IMAS.BuildLayerShapeType
Enum BuildLayerShape

Used for dd.build.layer[:].shape

  • _offset_ -> 0
  • _negative_offset_ -> 1
  • _convex_hull_ -> 2
  • _mirror_princeton_D_exact_ -> 3
  • _princeton_D_ -> 4
  • _mirror_princeton_D_ -> 5
  • _princeton_D_scaled_ -> 6
  • _mirror_princeton_D_scaled_ -> 7
  • _rectangle_ -> 8
  • _double_ellipse_ -> 9
  • _mirror_double_ellipse_ -> 10
  • _rectangle_ellipse_ -> 11
  • _mirror_rectangle_ellipse_ -> 12
  • _circle_ellipse_ -> 13
  • _mirror_circle_ellipse_ -> 14
  • _triple_arc_ -> 15
  • _mirror_triple_arc_ -> 16
  • _miller_ -> 17
  • _silo_ -> 18
  • _racetrack_ -> 19
  • _undefined_ -> 20
source
IMAS.build_radiiFunction
build_radii(layers::IMAS.IDSvector{<:IMAS.build__layer{T}}) where {T<:Real}

Convert thicknesses to absolute radii in the build layers

source
IMAS.get_build_indexesFunction
get_build_indexes(
+) where {T<:Real}

Function used to generate boundary shapes based on T. C. Luce, PPCF, 55 9 (2013)

  • a: minor radius
  • eps: aspect ratio
  • kapu: upper elongation
  • lkap: lower elongation
  • delu: upper triangularity
  • dell: lower triangularity
  • zetaou: upper outer squareness
  • zetaiu: upper inner squareness
  • zetail: lower inner squareness
  • zetaol: lower outer squareness
  • zoffset: z-offset
  • upnull: toggle upper x-point
  • lonull: toggle lower x-point
  • npts: number of points (per quadrant)

returns tuple with arrays of (r, z, zref)

>> boundary_shape(;a=0.608,eps=0.374,kapu=1.920,kapl=1.719,delu=0.769,dell=0.463,zetaou=-0.155,zetaiu=-0.255,zetail=-0.174,zetaol=-0.227,zoffset=0.000,upnull=true,lonull=false)
source
IMAS.boundaryFunction
boundary(pc::IMAS.pulse_schedule__position_control{T}, time0::Float64)

return boundary from pulseschedule.positioncontrol at a given time0

source
boundary(pc::IMAS.pulse_schedule__position_control{T}, time_index::Int)

returns boundary from pulseschedule.positioncontrol at a given time_index

source
boundary(pc::IMAS.pulse_schedule__position_control; time0::Float64=global_time(pc))

Beturns r,z vectors from pulseschedule.positioncontrol.equilibriumtime_slice___boundaryoutline

source
IMAS.x_pointsFunction
x_points(x_points::IMAS.IDSvector{<:IMAS.pulse_schedule__position_control__x_point{T}}; time0::Float64=global_time(x_points)) where {T<:Real}

Beturns vector with tuples of R,Z coordinates of x-points in pulse_schedule at time0

source
IMAS.strike_pointsFunction
strike_points(strike_points::IMAS.IDSvector{<:IMAS.pulse_schedule__position_control__strike_point{T}}; time0::Float64=global_time(strike_points)) where {T<:Real}

Beturns vector with tuples of R,Z coordinates of x-points in pulse_schedule at time0

source

Physics build

IMAS.BuildLayerTypeType
Enum BuildLayerType

Used for dd.build.layer[:].type

  • _plasma_ -> -1
  • _gap_ -> 0
  • _oh_ -> 1
  • _tf_ -> 2
  • _shield_ -> 3
  • _blanket_ -> 4
  • _wall_ -> 5
  • _vessel_ -> 6
  • _cryostat_ -> 7
  • _divertor_ -> 8
  • _port_ -> 9
source
IMAS.BuildLayerSideType
Enum BuildLayerSide

Used for dd.build.layer[:].side

  • _lfs_ -> -1
  • _lhfs_ -> 0
  • _hfs_ -> 1
  • _in_ -> 2
  • _out_ -> 3
source
IMAS.BuildLayerShapeType
Enum BuildLayerShape

Used for dd.build.layer[:].shape

  • _offset_ -> 0
  • _negative_offset_ -> 1
  • _convex_hull_ -> 2
  • _mirror_princeton_D_exact_ -> 3
  • _princeton_D_ -> 4
  • _mirror_princeton_D_ -> 5
  • _princeton_D_scaled_ -> 6
  • _mirror_princeton_D_scaled_ -> 7
  • _rectangle_ -> 8
  • _double_ellipse_ -> 9
  • _mirror_double_ellipse_ -> 10
  • _rectangle_ellipse_ -> 11
  • _mirror_rectangle_ellipse_ -> 12
  • _circle_ellipse_ -> 13
  • _mirror_circle_ellipse_ -> 14
  • _triple_arc_ -> 15
  • _mirror_triple_arc_ -> 16
  • _miller_ -> 17
  • _silo_ -> 18
  • _racetrack_ -> 19
  • _undefined_ -> 20
source
IMAS.build_radiiFunction
build_radii(layers::IMAS.IDSvector{<:IMAS.build__layer{T}}) where {T<:Real}

Convert thicknesses to absolute radii in the build layers

source
IMAS.get_build_indexesFunction
get_build_indexes(
     layers::IMAS.IDSvector{<:IMAS.build__layer};
     type::Union{Nothing,BuildLayerType}=nothing,
     name::Union{Nothing,String}=nothing,
     identifier::Union{Nothing,Integer}=nothing,
-    fs::Union{Nothing,BuildLayerSide,AbstractVector{BuildLayerSide}}=nothing)

Returns indexes of layer(s) in build based on a series of selection criteria

source
IMAS.get_build_indexFunction
get_build_index(
+    fs::Union{Nothing,BuildLayerSide,AbstractVector{BuildLayerSide}}=nothing)

Returns indexes of layer(s) in build based on a series of selection criteria

source
IMAS.get_build_indexFunction
get_build_index(
     layers::IMAS.IDSvector{<:IMAS.build__layer};
     type::Union{Nothing,BuildLayerType}=nothing,
     name::Union{Nothing,String}=nothing,
     identifier::Union{Nothing,Integer}=nothing,
-    fs::Union{Nothing,BuildLayerSide,AbstractVector{BuildLayerSide}}=nothing)

Returns index of layer in build based on a series of selection criteria

It raises an error if none or more than one layer matches.

source
IMAS.get_build_layersFunction
get_build_layers(
+    fs::Union{Nothing,BuildLayerSide,AbstractVector{BuildLayerSide}}=nothing)

Returns index of layer in build based on a series of selection criteria

It raises an error if none or more than one layer matches.

source
IMAS.get_build_layersFunction
get_build_layers(
     layers::IMAS.IDSvector{<:IMAS.build__layer};
     type::Union{Nothing,BuildLayerType}=nothing,
     name::Union{Nothing,String}=nothing,
     identifier::Union{Nothing,Integer}=nothing,
-    fs::Union{Nothing,BuildLayerSide,AbstractVector{BuildLayerSide}}=nothing)

Select layer(s) in build based on a series of selection criteria

source
IMAS.get_build_layerFunction
get_build_layer(
+    fs::Union{Nothing,BuildLayerSide,AbstractVector{BuildLayerSide}}=nothing)

Select layer(s) in build based on a series of selection criteria

source
IMAS.get_build_layerFunction
get_build_layer(
     layers::IMAS.IDSvector{<:IMAS.build__layer};
     type::Union{Nothing,BuildLayerType}=nothing,
     name::Union{Nothing,String}=nothing,
     identifier::Union{Nothing,Integer}=nothing,
-    fs::Union{Nothing,BuildLayerSide,AbstractVector{BuildLayerSide}}=nothing)

Select layer in build based on a series of selection criteria

It raises an error if none or more than one layer matches.

source
IMAS.func_nested_layersFunction
func_nested_layers(layer::IMAS.build__layer{D}, func::Function)::D where {D<:Real}

Apply function func to a layer, then subtract func applied to the layer inside of it.

This is used to caclulate area, volume, etc.. of each layer.

source
Missing docstring.

Missing docstring for IMAS.area. Check Documenter's build log for details.

IMAS.volumeFunction
volume(layer::IMAS.build__layer)

Calculate volume of a build layer revolved around z axis

source
volume(layer::IMAS.build__structure)

Calculate volume of a build structure outline revolved around z axis

source
volume(coil::IMAS.pf_active__coil)

Returns volume of PF coils

source
IMAS.first_wallFunction
first_wall(wall::IMAS.wall{T}) where {T<:Real}

Returns named tuple with outline of the official contiguous first wall limiter contour, or an empty outline if not present

NOTE: in IMAS wall.description_2d[].limiter.type.index == 0 indicates an official contiguous limiter contour

source
first_wall(pf_active::IMAS.pf_active{T}) where {T<:Real}

Returns named tuple with outline of the first wall, defined by the pf_active.coils

source
first_wall(eqt::IMAS.equilibrium__time_slice; precision::Float=1E-3) where {T<:Real}

Returns named tuple with outline of the first wall, defined by equilibrium computation domain

source
first_wall(eqt::IMAS.equilibrium__time_slice, pf_active::IMAS.pf_active{T}) where {T<:Real}

Returns named tuple with outline of the first wall, defined as the equilibrium computational domain with cutouts for the pf_active.coils that fall in it

source
IMAS.first_wall!Function
first_wall!(wall::IMAS.wall{T}, r::AbstractVector{T}, z::AbstractVector{T}) where {T<:Real}

Set wall.description_2d[?].limiter.unit[1].outline from input r and z

source
IMAS.build_max_R0_B0Function
build_max_R0_B0(bd::IMAS.build)

Returns the plasma geometric center (r0) and the maximum vacuum toroidal magnetic field (b0) evaluated at (r0) that the TF build allows

source
IMAS.vertical_maintenanceFunction
vertical_maintenance(bd::IMAS.build; tor_modularity::Int=2, pol_modularity::Int=1, gap_VV_BL::Float64=0.1)

Returns the radial dimensions of the vertical vacuum port for blanket maintenance

gapVVBL is the margin between the blanket module and the wall (10cm seems reasonable)

source
IMAS.outlineFunction
outline(layer::Union{IMAS.build__layer, IMAS.build__structure})
+    fs::Union{Nothing,BuildLayerSide,AbstractVector{BuildLayerSide}}=nothing)

Select layer in build based on a series of selection criteria

It raises an error if none or more than one layer matches.

source
IMAS.func_nested_layersFunction
func_nested_layers(layer::IMAS.build__layer{D}, func::Function)::D where {D<:Real}

Apply function func to a layer, then subtract func applied to the layer inside of it.

This is used to caclulate area, volume, etc.. of each layer.

source
Missing docstring.

Missing docstring for IMAS.area. Check Documenter's build log for details.

IMAS.volumeFunction
volume(layer::IMAS.build__layer)

Calculate volume of a build layer revolved around z axis

source
volume(layer::IMAS.build__structure)

Calculate volume of a build structure outline revolved around z axis

source
volume(coil::IMAS.pf_active__coil)

Returns volume of PF coils

source
IMAS.first_wallFunction
first_wall(wall::IMAS.wall{T}) where {T<:Real}

Returns named tuple with outline of the official contiguous first wall limiter contour, or an empty outline if not present

NOTE: in IMAS wall.description_2d[].limiter.type.index == 0 indicates an official contiguous limiter contour

source
first_wall(pf_active::IMAS.pf_active{T}) where {T<:Real}

Returns named tuple with outline of the first wall, defined by the pf_active.coils

source
first_wall(eqt::IMAS.equilibrium__time_slice; precision::Float=1E-3) where {T<:Real}

Returns named tuple with outline of the first wall, defined by equilibrium computation domain

source
first_wall(eqt::IMAS.equilibrium__time_slice, pf_active::IMAS.pf_active{T}) where {T<:Real}

Returns named tuple with outline of the first wall, defined as the equilibrium computational domain with cutouts for the pf_active.coils that fall in it

source
IMAS.first_wall!Function
first_wall!(wall::IMAS.wall{T}, r::AbstractVector{T}, z::AbstractVector{T}) where {T<:Real}

Set wall.description_2d[?].limiter.unit[1].outline from input r and z

source
IMAS.build_max_R0_B0Function
build_max_R0_B0(bd::IMAS.build)

Returns the plasma geometric center (r0) and the maximum vacuum toroidal magnetic field (b0) evaluated at (r0) that the TF build allows

source
IMAS.vertical_maintenanceFunction
vertical_maintenance(bd::IMAS.build; tor_modularity::Int=2, pol_modularity::Int=1, gap_VV_BL::Float64=0.1)

Returns the radial dimensions of the vertical vacuum port for blanket maintenance

gapVVBL is the margin between the blanket module and the wall (10cm seems reasonable)

source
IMAS.outlineFunction
outline(layer::Union{IMAS.build__layer, IMAS.build__structure})
 
-outline(out::Union{IMAS.build__layer___outline,IMAS.build__structure___outline})

Returns a closed polygon as a named tuple with (r,z) of a dd.build.layer or dd.build.structure

source
outline(element::Union{IMAS.pf_active__coil___element{T},IMAS.pf_passive__loop___element{T}}) where {T<:Real}

Returns named tuple with r and z arrays outline, independent of geometry_type used to describe the element

source

Physics collisions

IMAS.lnΛ_eeFunction
lnΛ_ee(ne::Real, Te::Real)

Calculate Couloumb logarithm (lnΛ) for thermal electron-electron collisions [NRL Plasma Formulary]

  • ne: electron density [m^-3]

  • Te: electron temperature [eV]

source
IMAS.lnΛ_eiFunction
nΛ_ei(ne::S, Te::P, ni::AbstractVector{Q}, Ti::AbstractVector{R}, mi::AbstractVector{T}, Zi::AbstractVector{Int}) where {S<:Real,P<:Real,Q<:Real,R<:Real,T<:Real}

Calculate Couloumb logarithm (lnΛ) for thermal electron-ion collisions [NRL Plasma Formulary]

  • ne: electron density [m^-3]

  • Te: electron temperature [eV]

  • ni: list of ion densities [m^-3]

  • Ti: list of ion temperaturs [eV]

  • mi: list of ion masses [amu]

  • Zi: list of ion charges

source
lnΛ_ei(ne::Real, Te::Real)

Calculate Couloumb logarithm (lnΛ) for thermal electron-ion collisions where Ti*me/mi < 10Zi^2 eV < Te [NRL Plasma Formulary]

  • ne: electron density [m^-3]

  • Te: electron temperature [eV]

source
IMAS.lnΛ_iiFunction
lnΛ_ii(ne::Real, Te::Real, ni1::Real, Ti1::Real, mi1::Real, Zi1::Int, ni2::Real, Ti2::Real, mi2::Real, Zi2::Int; beta_D::Real=0.0)

Calculate Couloumb logarithm (lnΛ) for mixed thermal ion1-ion2 collisions [NRL Plasma Formulary]

  • ne: electron density [m^-3]

  • Te: electron temperaturs [eV]

  • ni1: ion1 density [m^-3]

  • Ti1: ion1 temperature [eV]

  • mi1: ion1 mass [amu]

  • Zi1: ion1 charge

  • ni1: ion2 density [m^-3]

  • Ti1: ion2 temperature [eV]

  • mi1: ion2 mass [amu]

  • Zi1: ion2 charge

  • beta_D: relative drift velocities between ion species v_D = beta_D*c

source
IMAS.lnΛ_fiFunction
lnΛ_fi(ne::Real, Te::Real, n_i::Real, T_i::Real, m_i::Real, Z_i::Int, beta_f::Real, mf::Real, Zf::Int; verbose=true)

Calculate Couloumb logarithm (lnΛ) for beam/fast ion in the presence of warm electrons/ions [NRL Plasma Formulary]

  • ne: electron density [m^-3]

  • Te: electron temperaturs [eV]

  • n_i: ion density [m^-3]

  • Ti: ion temperature [eV]

  • mi: ion mass [amu]

  • Zi: ion charge

  • beta_f: relative fast ion velocity v_f = beta_f*c

  • mf: mass of fast ion [amu]

  • Zf: charge of fast ion

source

Physics constants

IMAS.mksConstant

Named tuple with physics constants in mks (and eV):

μ_0 = 1.25663706212e-6 [N A^-2]  # Vacuum permeability
+outline(out::Union{IMAS.build__layer___outline,IMAS.build__structure___outline})

Returns a closed polygon as a named tuple with (r,z) of a dd.build.layer or dd.build.structure

source
outline(element::Union{IMAS.pf_active__coil___element{T},IMAS.pf_passive__loop___element{T}}) where {T<:Real}

Returns named tuple with r and z arrays outline, independent of geometry_type used to describe the element

source

Physics collisions

IMAS.lnΛ_eeFunction
lnΛ_ee(ne::Real, Te::Real)

Calculate Couloumb logarithm (lnΛ) for thermal electron-electron collisions [NRL Plasma Formulary]

  • ne: electron density [m^-3]

  • Te: electron temperature [eV]

source
IMAS.lnΛ_eiFunction
nΛ_ei(ne::S, Te::P, ni::AbstractVector{Q}, Ti::AbstractVector{R}, mi::AbstractVector{T}, Zi::AbstractVector{Int}) where {S<:Real,P<:Real,Q<:Real,R<:Real,T<:Real}

Calculate Couloumb logarithm (lnΛ) for thermal electron-ion collisions [NRL Plasma Formulary]

  • ne: electron density [m^-3]

  • Te: electron temperature [eV]

  • ni: list of ion densities [m^-3]

  • Ti: list of ion temperaturs [eV]

  • mi: list of ion masses [amu]

  • Zi: list of ion charges

source
lnΛ_ei(ne::Real, Te::Real)

Calculate Couloumb logarithm (lnΛ) for thermal electron-ion collisions where Ti*me/mi < 10Zi^2 eV < Te [NRL Plasma Formulary]

  • ne: electron density [m^-3]

  • Te: electron temperature [eV]

source
IMAS.lnΛ_iiFunction
lnΛ_ii(ne::Real, Te::Real, ni1::Real, Ti1::Real, mi1::Real, Zi1::Int, ni2::Real, Ti2::Real, mi2::Real, Zi2::Int; beta_D::Real=0.0)

Calculate Couloumb logarithm (lnΛ) for mixed thermal ion1-ion2 collisions [NRL Plasma Formulary]

  • ne: electron density [m^-3]

  • Te: electron temperaturs [eV]

  • ni1: ion1 density [m^-3]

  • Ti1: ion1 temperature [eV]

  • mi1: ion1 mass [amu]

  • Zi1: ion1 charge

  • ni1: ion2 density [m^-3]

  • Ti1: ion2 temperature [eV]

  • mi1: ion2 mass [amu]

  • Zi1: ion2 charge

  • beta_D: relative drift velocities between ion species v_D = beta_D*c

source
IMAS.lnΛ_fiFunction
lnΛ_fi(ne::Real, Te::Real, n_i::Real, T_i::Real, m_i::Real, Z_i::Int, beta_f::Real, mf::Real, Zf::Int; verbose=true)

Calculate Couloumb logarithm (lnΛ) for beam/fast ion in the presence of warm electrons/ions [NRL Plasma Formulary]

  • ne: electron density [m^-3]

  • Te: electron temperaturs [eV]

  • n_i: ion density [m^-3]

  • Ti: ion temperature [eV]

  • mi: ion mass [amu]

  • Zi: ion charge

  • beta_f: relative fast ion velocity v_f = beta_f*c

  • mf: mass of fast ion [amu]

  • Zf: charge of fast ion

source

Physics constants

IMAS.mksConstant

Named tuple with physics constants in mks (and eV):

μ_0 = 1.25663706212e-6 [N A^-2]  # Vacuum permeability
 c = 2.99792458e8 [m s^-1]        # Speed of light in vacuum
 ϵ_0 = 8.8541878128e-12 [F m^-1]  # Vacuum permittivity
 k_B = 1.380649e-23 [J K^-1]      # Boltzmann constant
@@ -123,7 +123,7 @@
 m_u = 1.6605390666e-27 [kg]      # Atomic mass constant
 avog = 6.02214076e23 [mol^-1]    # Avogadro constant
 E_α = 3.518e6 [eV]               # Alpha particle energy
-E_n = 14.072e6 [eV]              # Neutron energy
source
IMAS.cgsConstant

Named tuple with physics constants used for interfacing with CGS codes:

e=4.8032e-10 # stacoul
+E_n = 14.072e6 [eV]              # Neutron energy
source
IMAS.cgsConstant

Named tuple with physics constants used for interfacing with CGS codes:

e=4.8032e-10 # stacoul
 k=1.6022e-12 # erg/eV
 c=2.9979e10 # cm/s
 me=9.1094e-28 # g
@@ -133,7 +133,7 @@
 Erg_to_J=1e-7
 m_to_cm=1e2
 m²_to_cm²=1E4
-m³_to_cm³=1e6
source

Physics currents

IMAS.j_ohmic_steady_stateFunction
j_ohmic_steady_state(eqt::IMAS.equilibrium__time_slice{T}, cp1d::IMAS.core_profiles__profiles_1d{T}, ip::T, j_ohmic_shape::AbstractVector{T}=cp1d.conductivity_parallel) where {T<:Real}

Sets j_ohmic parallel current density to what it would be at steady-state, based on conductivity_parallel, j_non_inductive and a target total ip

Requires constant loop voltage: Vl = 2π * η * <J_oh⋅B> / (F * <R⁻²>) = constant

source
IMAS.JtoR_2_JparBFunction
JtoR_2_JparB(rho_tor_norm::Vector{<:Real}, JtoR::Vector{<:Real}, includes_bootstrap::Bool, eqt::IMAS.equilibrium__time_slice)

Given <Jt/R> returns <J⋅B>

Transformation obeys <J⋅B> = (1/f)*(<B^2>/<1/R^2>)*(<Jt/R> + dp/dpsi*(1 - f^2*<1/R^2>/<B^2>))

Includes_bootstrap set to true if input current includes bootstrap

NOTE: Jtor ≂̸ JtoR

<Jt/R> = <Jt/R>/<1/R> * <1/R> = Jtor * <1/R> = Jtor * gm9

NOTE: Jpar ≂̸ JparB

JparB = Jpar * B0
source
IMAS.JparB_2_JtoRFunction
JparB_2_JtoR(rho_tor_norm::Vector{<:Real}, JparB::Vector{<:Real}, includes_bootstrap::Bool, eqt::IMAS.equilibrium__time_slice)

Given <J⋅B> returns <Jt/R>

Transformation obeys <J⋅B> = (1/f)*(<B^2>/<1/R^2>)*(<Jt/R> + dp/dpsi*(1 - f^2*<1/R^2>/<B^2>))

Includes_bootstrap set to true if input current includes bootstrap

NOTE: Jtor ≂̸ JtoR

<Jt/R> = <Jt/R>/<1/R> * <1/R> = Jtor * <1/R> = Jtor * gm9

NOTE: Jpar ≂̸ JparB

JparB = Jpar * B0
source
IMAS.Jtor_2_JparFunction
Jtor_2_Jpar(rho_tor_norm::Vector{<:Real}, Jtor::Vector{<:Real}, includes_bootstrap::Bool, eqt::IMAS.equilibrium__time_slice)

Given Jtor returns Jpar

Includes_bootstrap set to true if input current includes bootstrap

NOTE: Jtor ≂̸ JtoR

<Jt/R> = <Jt/R>/<1/R> * <1/R> = Jtor * <1/R> = Jtor * gm9

NOTE: Jpar ≂̸ JparB

JparB = Jpar * B0
source
IMAS.Jpar_2_JtorFunction
Jpar_2_Jtor(rho_tor_norm::Vector{<:Real}, Jpar::Vector{<:Real}, includes_bootstrap::Bool, eqt::IMAS.equilibrium__time_slice)

Given Jpar returns Jtor

Includes_bootstrap set to true if input current includes bootstrap

NOTE: Jtor ≂̸ JtoR

<Jt/R> = <Jt/R>/<1/R> * <1/R> = Jtor * <1/R> = Jtor * gm9

NOTE: Jpar ≂̸ JparB

JparB = Jpar * B0
source
IMAS.vloopFunction
vloop(cp1d::IMAS.core_profiles__profiles_1d{T})::T where {T<:Real}

Vloop = 2π * η * <J_oh⋅B> / (F * <R⁻²>): method emphasizes the resistive nature of the plasma

source
vloop(eq::IMAS.equilibrium{T}; time0::Float64=global_time(eq))::T where {T<:Real}

Vloop = dψ/dt: method emphasizes the inductive nature of the loop voltage. Assumes COCOS 11.

source
vloop(ct::IMAS.controllers{T}; time0::Float64=global_time(ct))::T where {T<:Real}

Returns vloop at time0 from controller named ip

source
IMAS.vloop_timeFunction
vloop_time(ct::IMAS.controllers{T}) where {T<:Real}

Returns named tuple with time and data with vloop from controller named ip

source
IMAS.Ip_non_inductiveFunction
Ip_non_inductive(cp1d::IMAS.core_profiles__profiles_1d{T}, eqt::IMAS.equilibrium__time_slice{T}) where {T<:Real}

Integrated toroidal non-inductive current

source
IMAS.Ip_bootstrapFunction
Ip_bootstrap(cp1d::IMAS.core_profiles__profiles_1d{T}, eqt::IMAS.equilibrium__time_slice{T}) where {T<:Real}

Integrated toroidal bootstrap current

source
IMAS.Ip_ohmicFunction
Ip_ohmic(cp1d::IMAS.core_profiles__profiles_1d{T}, eqt::IMAS.equilibrium__time_slice{T}) where {T<:Real}

Integrated toroidal ohmic current

source
IMAS.IpFunction
Ip(cp1d::IMAS.core_profiles__profiles_1d{T}) where {T<:Real}

Integrated toroidal total current (based on core_profiles)

source
Ip(eqt::IMAS.equilibrium__time_slice{T}) where {T<:Real}

Integrated toroidal total current (based on equilibrium)

source

Physics equilibrium

Physics currents

IMAS.j_ohmic_steady_stateFunction
j_ohmic_steady_state(eqt::IMAS.equilibrium__time_slice{T}, cp1d::IMAS.core_profiles__profiles_1d{T}, ip::T, j_ohmic_shape::AbstractVector{T}=cp1d.conductivity_parallel) where {T<:Real}

Sets j_ohmic parallel current density to what it would be at steady-state, based on conductivity_parallel, j_non_inductive and a target total ip

Requires constant loop voltage: Vl = 2π * η * <J_oh⋅B> / (F * <R⁻²>) = constant

source
IMAS.JtoR_2_JparBFunction
JtoR_2_JparB(rho_tor_norm::Vector{<:Real}, JtoR::Vector{<:Real}, includes_bootstrap::Bool, eqt::IMAS.equilibrium__time_slice)

Given <Jt/R> returns <J⋅B>

Transformation obeys <J⋅B> = (1/f)*(<B^2>/<1/R^2>)*(<Jt/R> + dp/dpsi*(1 - f^2*<1/R^2>/<B^2>))

Includes_bootstrap set to true if input current includes bootstrap

NOTE: Jtor ≂̸ JtoR

<Jt/R> = <Jt/R>/<1/R> * <1/R> = Jtor * <1/R> = Jtor * gm9

NOTE: Jpar ≂̸ JparB

JparB = Jpar * B0
source
IMAS.JparB_2_JtoRFunction
JparB_2_JtoR(rho_tor_norm::Vector{<:Real}, JparB::Vector{<:Real}, includes_bootstrap::Bool, eqt::IMAS.equilibrium__time_slice)

Given <J⋅B> returns <Jt/R>

Transformation obeys <J⋅B> = (1/f)*(<B^2>/<1/R^2>)*(<Jt/R> + dp/dpsi*(1 - f^2*<1/R^2>/<B^2>))

Includes_bootstrap set to true if input current includes bootstrap

NOTE: Jtor ≂̸ JtoR

<Jt/R> = <Jt/R>/<1/R> * <1/R> = Jtor * <1/R> = Jtor * gm9

NOTE: Jpar ≂̸ JparB

JparB = Jpar * B0
source
IMAS.Jtor_2_JparFunction
Jtor_2_Jpar(rho_tor_norm::Vector{<:Real}, Jtor::Vector{<:Real}, includes_bootstrap::Bool, eqt::IMAS.equilibrium__time_slice)

Given Jtor returns Jpar

Includes_bootstrap set to true if input current includes bootstrap

NOTE: Jtor ≂̸ JtoR

<Jt/R> = <Jt/R>/<1/R> * <1/R> = Jtor * <1/R> = Jtor * gm9

NOTE: Jpar ≂̸ JparB

JparB = Jpar * B0
source
IMAS.Jpar_2_JtorFunction
Jpar_2_Jtor(rho_tor_norm::Vector{<:Real}, Jpar::Vector{<:Real}, includes_bootstrap::Bool, eqt::IMAS.equilibrium__time_slice)

Given Jpar returns Jtor

Includes_bootstrap set to true if input current includes bootstrap

NOTE: Jtor ≂̸ JtoR

<Jt/R> = <Jt/R>/<1/R> * <1/R> = Jtor * <1/R> = Jtor * gm9

NOTE: Jpar ≂̸ JparB

JparB = Jpar * B0
source
IMAS.vloopFunction
vloop(cp1d::IMAS.core_profiles__profiles_1d{T})::T where {T<:Real}

Vloop = 2π * η * <J_oh⋅B> / (F * <R⁻²>): method emphasizes the resistive nature of the plasma

source
vloop(eq::IMAS.equilibrium{T}; time0::Float64=global_time(eq))::T where {T<:Real}

Vloop = dψ/dt: method emphasizes the inductive nature of the loop voltage. Assumes COCOS 11.

source
vloop(ct::IMAS.controllers{T}; time0::Float64=global_time(ct))::T where {T<:Real}

Returns vloop at time0 from controller named ip

source
IMAS.vloop_timeFunction
vloop_time(ct::IMAS.controllers{T}) where {T<:Real}

Returns named tuple with time and data with vloop from controller named ip

source
IMAS.Ip_non_inductiveFunction
Ip_non_inductive(cp1d::IMAS.core_profiles__profiles_1d{T}, eqt::IMAS.equilibrium__time_slice{T}) where {T<:Real}

Integrated toroidal non-inductive current

source
IMAS.Ip_bootstrapFunction
Ip_bootstrap(cp1d::IMAS.core_profiles__profiles_1d{T}, eqt::IMAS.equilibrium__time_slice{T}) where {T<:Real}

Integrated toroidal bootstrap current

source
IMAS.Ip_ohmicFunction
Ip_ohmic(cp1d::IMAS.core_profiles__profiles_1d{T}, eqt::IMAS.equilibrium__time_slice{T}) where {T<:Real}

Integrated toroidal ohmic current

source
IMAS.IpFunction
Ip(cp1d::IMAS.core_profiles__profiles_1d{T}) where {T<:Real}

Integrated toroidal total current (based on core_profiles)

source
Ip(eqt::IMAS.equilibrium__time_slice{T}) where {T<:Real}

Integrated toroidal total current (based on equilibrium)

source

Physics equilibrium

IMAS.calc_pprime_ffprim_fFunction
calc_pprime_ffprim_f(
     psi::T,
     R::T,
     one_R::T,
@@ -146,14 +146,14 @@
     j_tor_over_R::Union{Missing,T}=missing,
     f::Union{Missing,T}=missing,
     f_df_dpsi::Union{Missing,T}=missing,
-    ) where {T<:AbstractVector{<:Real}}

This method returns the P' and FF' given P or P' and J or J/R based on the current equilibrium fluxsurfaces geometry

Arguments:

  • psi: poloidal flux
  • R: <R>
  • one_R: <1/R>
  • one_R2: <1/R²>
  • R0: R at which B0 is defined
  • B0: vacuum magnetic field
  • pressure: P
  • dpressure_dpsi: P'
  • j_tor: toroidal current
  • j_tor_over_R: flux surface averaged toroidal current density over major radius
  • f: F
  • f_df_dpsi: FF'

returns (P', FF', F)

source
IMAS.p_jtor_2_pprime_ffprim_fFunction
p_jtor_2_pprime_ffprim_f(eqt1::IMAS.equilibrium__time_slice___profiles_1d, R0::Real, B0::Real)

Calculate P', FF' and F from pressure and j_tor in equilibrium

source
IMAS.symmetrize_equilibrium!Function
symmetrize_equilibrium!(eqt::IMAS.equilibrium__time_slice)

Update equilibrium time slice in place to be symmetric with respect to its magnetic axis.

This is done by averaging the upper and lower parts of the equilibrium.

Flux surfaces should re-traced after this operation.

NOTE: Use with care! This operation will change the flux surfaces (LCFS included) and as such quantities may change

source
IMAS.B0_geoFunction
B0_geo(eqt::IMAS.equilibrium__time_slice{T})::T where{T<:Real}

Returns vacuum B0 at the plasma geometric center, which may or may not be eqt.global_quantities.vacuum_toroidal_field.r0

source
IMAS.elongation_limitFunction
elongation_limit(R0_over_a::Real)

Returns elongation limit due to control limit from simple aspect ratio scaling

source
elongation_limit(eqt::IMAS.equilibrium__time_slice)
source
IMAS.optimal_kappa_deltaFunction
optimal_kappa_delta(li::T1, βp::T1, ϵ::T1, γτw::T2, ∆o::T2) where {T1<:Real,T2<:Real}

An analytic scaling relation for the maximum tokamak elongation against n=0 MHD resistive wall modes Jungpyo Lee, Jeffrey P. Freidberg, Antoine J. Cerfon, Martin Greenwald https://doi.org/10.1088%2F1741-4326%2Faa6877

NOTE:

  • γτw is the feedback capability parameter and represents how fast a instability is controllable (𝛾 is the instability growth rate and τw is the wall diffusion time) (typically γτw < 10 is assumed for controllability, see VacuumFields.normalized_growth_rate())

  • ∆o is the outer gap (NOTE: assumes ∆o = ∆i = 1/3 * ∆v) detemines the relation between κ and δ of the plasma boundary and the κw=(κ+3∆o)(1+∆o) and δw=δ(1+∆o) of the wall boundary

source
optimal_kappa_delta(eqt::IMAS.equilibrium__time_slice, γτw::T, ∆o::T) where {T<:Real}
source

Physics fast

IMAS.estrada_I_integralsFunction
estrada_I_integrals(ne::Real, Te::Real, ni::AbstractVector{<:Real}, Ti::AbstractVector{<:Real}, mi::AbstractVector{<:Real}, Zi::AbstractVector{Int}, Ef::Real,  mf::Real, Zf::Int)

Returns solution to i2 and i4 integrals from [Estrada et al., Phys of Plasm. 13, 112303 (2006)] Eq. 9 & 10

  • ne: electron density [m^-3]

  • Te: electron temperature [eV]

  • ni: list of ion densities [m^-3]

  • Ti: list of ion temperatures [eV]

  • mi: list of ion masses [amu]

  • Zi: list of ion charges

  • Ef: fast ion energy [eV]

  • mf: mass of fast ion [amu]

  • Zf: fast ion charge

source
estrada_I_integrals(ne::Real, Te::Real, ni::AbstractVector{<:Real}, Ti::AbstractVector{<:Real}, mi::AbstractVector{<:Real}, Zi::AbstractVector{Int}, Ef::Real,  mf::Real, Zf::Int)

Returns solution to i2 and i4 integrals from [Estrada et al., Phys of Plasm. 13, 112303 (2006)] Eq. 9 & 10

  • Ef: fast ion energy [eV]

  • Ec: critical energy [eV]

source
IMAS.α_slowing_down_timeFunction
α_slowing_down_time(cp1d::IMAS.core_profiles__profiles_1d)

Returns the slowing down time in seconds of α particles evaluated on axis

source
IMAS.critical_energyFunction
critical_energy(ne::Real, Te::Real, ni::AbstractVector{<:Real}, Ti::AbstractVector{<:Real}, mi::AbstractVector{<:Real}, Zi::AbstractVector{Int}, mf::Real, Zf::Int; approximate::Bool=false)

Returns Ec the critical energy by finding the root of the difference between the electron and ion drag

  • ne: electron density [m^-3]

  • Te: electron temperature [eV]

  • ni: list of ion densities [m^-3]

  • Ti: list of ion temperatures [eV]

  • mi: list of ion masses [amu]

  • Zi: list of ion charges

  • mf: mass of fast ion [amu]

  • Zf: fast ion charge

  • approximate: calculate critical energy assuming lnΛ_fe == lnΛ_fi. For DIII-D this results in a correction factor of (lnΛfi/lnΛfe)^(2/3) ≈ 1.2.

source
IMAS.thermalization_timeFunction
thermalization_time(v_f, v_c, tau_s)

Calculate thermalization time in seconds

  • v_f: fast ion velocity

  • v_c: critical velocity

  • tau_s: slowing down time

source
thermalization_time(ne::Real, Te::Real, ni::AbstractVector{<:Real}, Ti::AbstractVector{<:Real}, mi::AbstractVector{<:Real}, Zi::AbstractVector{Int}, Ef::Real, mf::Real, Zf::Int)

Calculate thermalization time in seconds of a fast ion with energy Ef and Ti*me/mi < 10Zi^2 eV < Te

  • ne: electron density [m^-3]

  • Te: electron temperature [eV]

  • ni: list of ion densities [m^-3]

  • Ti: list of ion temperatures [eV]

  • mi: list of ion masses [amu]

  • Zi: list of ion charges

  • Ef: fast ion energy [eV]

  • mf: mass of fast ion [amu]

  • Zf: fast ion charge

source
IMAS.α_thermalization_timeFunction
α_thermalization_time(cp1d::IMAS.core_profiles__profiles_1d)

Returns the thermalization time in seconds of α particles evaluated on axis

source
IMAS.beam_thermalization_timeFunction
beam_thermalization_time(cp1d::IMAS.core_profiles__profiles_1d, ion, ion_energy::Real)

Returns the beam thermalization time in seconds evaluated on axis

source
IMAS.fast_particles!Function
fast_particles!(cs::IMAS.core_sources, cp1d::IMAS.core_profiles__profiles_1d; verbose::Bool=false)

Fills the core_profiles fast ion densities and pressures that result from fast ion sources (eg. fusion and nbi)

This calculation is done based on the slowing_down_time and thermalization_time of the fast ion species.

source
IMAS.sivukhin_fractionFunction
sivukhin_fraction(cp1d::IMAS.core_profiles__profiles_1d, particle_energy::Real, particle_mass::Real)

Compute a low-accuracy but fast approximation of the ion to electron heating fraction for fast particles (like alpha particles and beam particles)

source
IMAS.smooth_beam_powerFunction
smooth_beam_power(power::Vector{Float64}, time::AbstractVector{Float64}, taus::Float64) where {T<:Real}

Smooths out the beam power history based on a given thermalization constant taus

Such smoothing mimics the delayed contribution from the instantaneous source, as well as the gradual decay of the previous fast ion population over time.

source
smooth_beam_power(time::AbstractVector{Float64}, power::AbstractVector{T}, time0::Float64, taus::Float64) where {T<:Real}

return smoothed beam power at time0

source

Physics flux-surfaces

IMAS.ψ_interpolantFunction
ψ_interpolant(eqt2d::IMAS.equilibrium__time_slice___profiles_2d)

Returns r, z, and ψ interpolant named tuple

source
ψ_interpolant(r::AbstractRange{T1}, z::AbstractRange{T1}, psi::Matrix{T2}) where {T1<:Real,T2<:Real}
source
ψ_interpolant(eqt2dv::IDSvector{<:IMAS.equilibrium__time_slice___profiles_2d})
source
ψ_interpolant(eqt::IMAS.equilibrium__time_slice)
source
IMAS.ρ_interpolantFunction
ρ_interpolant(eqt2d::IMAS.equilibrium__time_slice___profiles_2d{T}, phi_norm::T) where {T<:Real}

Returns r, z, and ρ interpolant named tuple

source
ρ_interpolant(r::AbstractRange{T}, z::AbstractRange{T}, rho::Matrix{T}) where {T<:Real}
source
ρ_interpolant(eqt2dv::IDSvector{<:IMAS.equilibrium__time_slice___profiles_2d{T}}, phi_norm::T) where {T<:Real}
source
ρ_interpolant(eqt::IMAS.equilibrium__time_slice)
source
IMAS.Br_BzFunction
Br_Bz(eqt2d::IMAS.equilibrium__time_slice___profiles_2d)

Returns Br and Bz named tuple evaluated at r and z starting from ψ interpolant

source
Br_Bz(eqt2dv::IDSvector{<:IMAS.equilibrium__time_slice___profiles_2d})
source
Br_Bz(PSI_interpolant::Interpolations.AbstractInterpolation, r::T, z::T) where {T<:Real}
source
Br_Bz(PSI_interpolant::Interpolations.AbstractInterpolation, r::AbstractArray{T}, z::AbstractArray{T}) where {T<:Real}
source
IMAS.BpFunction
Bp(eqt2d::IMAS.equilibrium__time_slice___profiles_2d)

Returns Bp evaluated at r and z starting from ψ interpolant

source
Bp(PSI_interpolant::Interpolations.AbstractInterpolation, r::T, z::T) where {T<:Real}
source
Bp(eqt2dv::IDSvector{<:IMAS.equilibrium__time_slice___profiles_2d})
source
IMAS.find_psi_boundaryFunction
find_psi_boundary(
+    ) where {T<:AbstractVector{<:Real}}

This method returns the P' and FF' given P or P' and J or J/R based on the current equilibrium fluxsurfaces geometry

Arguments:

  • psi: poloidal flux
  • R: <R>
  • one_R: <1/R>
  • one_R2: <1/R²>
  • R0: R at which B0 is defined
  • B0: vacuum magnetic field
  • pressure: P
  • dpressure_dpsi: P'
  • j_tor: toroidal current
  • j_tor_over_R: flux surface averaged toroidal current density over major radius
  • f: F
  • f_df_dpsi: FF'

returns (P', FF', F)

source
IMAS.p_jtor_2_pprime_ffprim_fFunction
p_jtor_2_pprime_ffprim_f(eqt1::IMAS.equilibrium__time_slice___profiles_1d, R0::Real, B0::Real)

Calculate P', FF' and F from pressure and j_tor in equilibrium

source
IMAS.symmetrize_equilibrium!Function
symmetrize_equilibrium!(eqt::IMAS.equilibrium__time_slice)

Update equilibrium time slice in place to be symmetric with respect to its magnetic axis.

This is done by averaging the upper and lower parts of the equilibrium.

Flux surfaces should re-traced after this operation.

NOTE: Use with care! This operation will change the flux surfaces (LCFS included) and as such quantities may change

source
IMAS.B0_geoFunction
B0_geo(eqt::IMAS.equilibrium__time_slice{T})::T where{T<:Real}

Returns vacuum B0 at the plasma geometric center, which may or may not be eqt.global_quantities.vacuum_toroidal_field.r0

source
IMAS.elongation_limitFunction
elongation_limit(R0_over_a::Real)

Returns elongation limit due to control limit from simple aspect ratio scaling

source
elongation_limit(eqt::IMAS.equilibrium__time_slice)
source
IMAS.optimal_kappa_deltaFunction
optimal_kappa_delta(li::T1, βp::T1, ϵ::T1, γτw::T2, ∆o::T2) where {T1<:Real,T2<:Real}

An analytic scaling relation for the maximum tokamak elongation against n=0 MHD resistive wall modes Jungpyo Lee, Jeffrey P. Freidberg, Antoine J. Cerfon, Martin Greenwald https://doi.org/10.1088%2F1741-4326%2Faa6877

NOTE:

  • γτw is the feedback capability parameter and represents how fast a instability is controllable (𝛾 is the instability growth rate and τw is the wall diffusion time) (typically γτw < 10 is assumed for controllability, see VacuumFields.normalized_growth_rate())

  • ∆o is the outer gap (NOTE: assumes ∆o = ∆i = 1/3 * ∆v) detemines the relation between κ and δ of the plasma boundary and the κw=(κ+3∆o)(1+∆o) and δw=δ(1+∆o) of the wall boundary

source
optimal_kappa_delta(eqt::IMAS.equilibrium__time_slice, γτw::T, ∆o::T) where {T<:Real}
source

Physics fast

IMAS.estrada_I_integralsFunction
estrada_I_integrals(ne::Real, Te::Real, ni::AbstractVector{<:Real}, Ti::AbstractVector{<:Real}, mi::AbstractVector{<:Real}, Zi::AbstractVector{Int}, Ef::Real,  mf::Real, Zf::Int)

Returns solution to i2 and i4 integrals from [Estrada et al., Phys of Plasm. 13, 112303 (2006)] Eq. 9 & 10

  • ne: electron density [m^-3]

  • Te: electron temperature [eV]

  • ni: list of ion densities [m^-3]

  • Ti: list of ion temperatures [eV]

  • mi: list of ion masses [amu]

  • Zi: list of ion charges

  • Ef: fast ion energy [eV]

  • mf: mass of fast ion [amu]

  • Zf: fast ion charge

source
estrada_I_integrals(ne::Real, Te::Real, ni::AbstractVector{<:Real}, Ti::AbstractVector{<:Real}, mi::AbstractVector{<:Real}, Zi::AbstractVector{Int}, Ef::Real,  mf::Real, Zf::Int)

Returns solution to i2 and i4 integrals from [Estrada et al., Phys of Plasm. 13, 112303 (2006)] Eq. 9 & 10

  • Ef: fast ion energy [eV]

  • Ec: critical energy [eV]

source
IMAS.α_slowing_down_timeFunction
α_slowing_down_time(cp1d::IMAS.core_profiles__profiles_1d)

Returns the slowing down time in seconds of α particles evaluated on axis

source
IMAS.critical_energyFunction
critical_energy(ne::Real, Te::Real, ni::AbstractVector{<:Real}, Ti::AbstractVector{<:Real}, mi::AbstractVector{<:Real}, Zi::AbstractVector{Int}, mf::Real, Zf::Int; approximate::Bool=false)

Returns Ec the critical energy by finding the root of the difference between the electron and ion drag

  • ne: electron density [m^-3]

  • Te: electron temperature [eV]

  • ni: list of ion densities [m^-3]

  • Ti: list of ion temperatures [eV]

  • mi: list of ion masses [amu]

  • Zi: list of ion charges

  • mf: mass of fast ion [amu]

  • Zf: fast ion charge

  • approximate: calculate critical energy assuming lnΛ_fe == lnΛ_fi. For DIII-D this results in a correction factor of (lnΛfi/lnΛfe)^(2/3) ≈ 1.2.

source
IMAS.thermalization_timeFunction
thermalization_time(v_f, v_c, tau_s)

Calculate thermalization time in seconds

  • v_f: fast ion velocity

  • v_c: critical velocity

  • tau_s: slowing down time

source
thermalization_time(ne::Real, Te::Real, ni::AbstractVector{<:Real}, Ti::AbstractVector{<:Real}, mi::AbstractVector{<:Real}, Zi::AbstractVector{Int}, Ef::Real, mf::Real, Zf::Int)

Calculate thermalization time in seconds of a fast ion with energy Ef and Ti*me/mi < 10Zi^2 eV < Te

  • ne: electron density [m^-3]

  • Te: electron temperature [eV]

  • ni: list of ion densities [m^-3]

  • Ti: list of ion temperatures [eV]

  • mi: list of ion masses [amu]

  • Zi: list of ion charges

  • Ef: fast ion energy [eV]

  • mf: mass of fast ion [amu]

  • Zf: fast ion charge

source
IMAS.α_thermalization_timeFunction
α_thermalization_time(cp1d::IMAS.core_profiles__profiles_1d)

Returns the thermalization time in seconds of α particles evaluated on axis

source
IMAS.beam_thermalization_timeFunction
beam_thermalization_time(cp1d::IMAS.core_profiles__profiles_1d, ion, ion_energy::Real)

Returns the beam thermalization time in seconds evaluated on axis

source
IMAS.fast_particles!Function
fast_particles!(cs::IMAS.core_sources, cp1d::IMAS.core_profiles__profiles_1d; verbose::Bool=false)

Fills the core_profiles fast ion densities and pressures that result from fast ion sources (eg. fusion and nbi)

This calculation is done based on the slowing_down_time and thermalization_time of the fast ion species.

source
IMAS.sivukhin_fractionFunction
sivukhin_fraction(cp1d::IMAS.core_profiles__profiles_1d, particle_energy::Real, particle_mass::Real)

Compute a low-accuracy but fast approximation of the ion to electron heating fraction for fast particles (like alpha particles and beam particles)

source
IMAS.smooth_beam_powerFunction
smooth_beam_power(power::Vector{Float64}, time::AbstractVector{Float64}, taus::Float64) where {T<:Real}

Smooths out the beam power history based on a given thermalization constant taus

Such smoothing mimics the delayed contribution from the instantaneous source, as well as the gradual decay of the previous fast ion population over time.

source
smooth_beam_power(time::AbstractVector{Float64}, power::AbstractVector{T}, time0::Float64, taus::Float64) where {T<:Real}

return smoothed beam power at time0

source

Physics flux-surfaces

IMAS.ψ_interpolantFunction
ψ_interpolant(eqt2d::IMAS.equilibrium__time_slice___profiles_2d)

Returns r, z, and ψ interpolant named tuple

source
ψ_interpolant(r::AbstractRange{T1}, z::AbstractRange{T1}, psi::Matrix{T2}) where {T1<:Real,T2<:Real}
source
ψ_interpolant(eqt2dv::IDSvector{<:IMAS.equilibrium__time_slice___profiles_2d})
source
ψ_interpolant(eqt::IMAS.equilibrium__time_slice)
source
IMAS.ρ_interpolantFunction
ρ_interpolant(eqt2d::IMAS.equilibrium__time_slice___profiles_2d{T}, phi_norm::T) where {T<:Real}

Returns r, z, and ρ interpolant named tuple

source
ρ_interpolant(r::AbstractRange{T}, z::AbstractRange{T}, rho::Matrix{T}) where {T<:Real}
source
ρ_interpolant(eqt2dv::IDSvector{<:IMAS.equilibrium__time_slice___profiles_2d{T}}, phi_norm::T) where {T<:Real}
source
ρ_interpolant(eqt::IMAS.equilibrium__time_slice)
source
IMAS.Br_BzFunction
Br_Bz(eqt2d::IMAS.equilibrium__time_slice___profiles_2d)

Returns Br and Bz named tuple evaluated at r and z starting from ψ interpolant

source
Br_Bz(eqt2dv::IDSvector{<:IMAS.equilibrium__time_slice___profiles_2d})
source
Br_Bz(PSI_interpolant::Interpolations.AbstractInterpolation, r::T, z::T) where {T<:Real}
source
Br_Bz(PSI_interpolant::Interpolations.AbstractInterpolation, r::AbstractArray{T}, z::AbstractArray{T}) where {T<:Real}
source
IMAS.BpFunction
Bp(eqt2d::IMAS.equilibrium__time_slice___profiles_2d)

Returns Bp evaluated at r and z starting from ψ interpolant

source
Bp(PSI_interpolant::Interpolations.AbstractInterpolation, r::T, z::T) where {T<:Real}
source
Bp(eqt2dv::IDSvector{<:IMAS.equilibrium__time_slice___profiles_2d})
source
IMAS.find_psi_boundaryFunction
find_psi_boundary(
     eqt::IMAS.equilibrium__time_slice{T},
     wall_r::AbstractVector{T},
     wall_z::AbstractVector{T};
     precision::Float64=1e-6,
     raise_error_on_not_open::Bool=true,
     raise_error_on_not_closed::Bool=true
-) where {T<:Real}

Find psi value of the last-closed and first-open flux surface

Results are returned as a named tuple (last_closed=..., first_open=...)

source
find_psi_boundary(
+) where {T<:Real}

Find psi value of the last-closed and first-open flux surface

Results are returned as a named tuple (last_closed=..., first_open=...)

source
find_psi_boundary(
     dimR::Union{AbstractVector{T1},AbstractRange{T1}},
     dimZ::Union{AbstractVector{T1},AbstractRange{T1}},
     PSI::Matrix{T2},
@@ -168,7 +168,7 @@
     raise_error_on_not_open::Bool,
     raise_error_on_not_closed::Bool,
     verbose::Bool=false
-) where {T1<:Real,T2<:Real,T3<:Real,T4<:Real,T5<:Real}
source
find_psi_boundary(
+) where {T1<:Real,T2<:Real,T3<:Real,T4<:Real,T5<:Real}
source
find_psi_boundary(
     dimR::Union{AbstractVector{T1},AbstractRange{T1}},
     dimZ::Union{AbstractVector{T1},AbstractRange{T1}},
     PSI::Matrix{T2},
@@ -185,7 +185,7 @@
     raise_error_on_not_open::Bool,
     raise_error_on_not_closed::Bool,
     verbose::Bool=false
-) where {T1<:Real,T2<:Real,T3<:Real,T4<:Real,T5<:Real}
source
find_psi_boundary(
+) where {T1<:Real,T2<:Real,T3<:Real,T4<:Real,T5<:Real}
source
find_psi_boundary(
     dimR::Union{AbstractVector{T1},AbstractRange{T1}},
     dimZ::Union{AbstractVector{T1},AbstractRange{T1}},
     PSI::Matrix{T2},
@@ -201,25 +201,25 @@
     raise_error_on_not_open::Bool,
     raise_error_on_not_closed::Bool,
     verbose::Bool=false
-)
source
IMAS.find_psi_separatrixFunction
find_psi_separatrix(eqt::IMAS.equilibrium__time_slice{T}; precision::Float64=1E-7) where {T<:Real}

Returns psi of the first magentic separatrix

Note: The first separatrix is the LCFS only in diverted plasmas

source
IMAS.find_psi_2nd_separatrixFunction
find_psi_2nd_separatrix(eqt::IMAS.equilibrium__time_slice{T}; type::Symbol=:not_diverted, precision::Float64=1E-7) where {T<:Real}

Returns psi of the second magentic separatrix

returns either :diverted or :not_diverted surface depending on type

  • :diverted is when the surface starts and finishes on the same side of the midplane

  • :not_diverted is when the surface starts and finishes on opposite sides of the midplane

source
IMAS.find_psi_separatrixFunction
find_psi_separatrix(eqt::IMAS.equilibrium__time_slice{T}; precision::Float64=1E-7) where {T<:Real}

Returns psi of the first magentic separatrix

Note: The first separatrix is the LCFS only in diverted plasmas

source
IMAS.find_psi_2nd_separatrixFunction
find_psi_2nd_separatrix(eqt::IMAS.equilibrium__time_slice{T}; type::Symbol=:not_diverted, precision::Float64=1E-7) where {T<:Real}

Returns psi of the second magentic separatrix

returns either :diverted or :not_diverted surface depending on type

  • :diverted is when the surface starts and finishes on the same side of the midplane

  • :not_diverted is when the surface starts and finishes on opposite sides of the midplane

source
IMAS.find_psi_last_divertedFunction
find_psi_last_diverted(
     eqt::IMAS.equilibrium__time_slice,
     wall_r::AbstractVector{<:Real},
     wall_z::AbstractVector{<:Real},
     PSI_interpolant::Interpolations.AbstractInterpolation;
-    precision::Float64=1e-7)

Returns psi_last_lfs,psifirstlfsfar, andnullwithin_wall`

  • psi_first_lfs_far will be the first surface inside OFL[:lfs_far]

  • psi_last_lfs will be the last surface inside OFL[:lfs]

Precision between the two is defined on the poloidal crossection area at the OMP (Psol*precision = power flowing between psi_first_lfs_far and psi_last_lfs ~ 0)

source
IMAS.find_psi_tangent_ompFunction
find_psi_tangent_omp(
+    precision::Float64=1e-7)

Returns psi_last_lfs,psifirstlfsfar, andnullwithin_wall`

  • psi_first_lfs_far will be the first surface inside OFL[:lfs_far]

  • psi_last_lfs will be the last surface inside OFL[:lfs]

Precision between the two is defined on the poloidal crossection area at the OMP (Psol*precision = power flowing between psi_first_lfs_far and psi_last_lfs ~ 0)

source
IMAS.find_psi_tangent_ompFunction
find_psi_tangent_omp(
     eqt::IMAS.equilibrium__time_slice,
     wall_r::AbstractVector{<:Real},
     wall_z::AbstractVector{<:Real},
     PSI_interpolant::Interpolations.AbstractInterpolation;
-    precision::Float64=1e-7)

Returns the psi of the magnetic surface in the SOL which is tangent to the wall near the outer midplane

source
IMAS.find_psi_maxFunction
find_psi_max(
+    precision::Float64=1e-7)

Returns the psi of the magnetic surface in the SOL which is tangent to the wall near the outer midplane

source
IMAS.find_psi_maxFunction
find_psi_max(
     eqt::IMAS.equilibrium__time_slice{T},
     wall_r::AbstractVector{T},
     wall_z::AbstractVector{T};
-    precision::Float64=1e-2) where {T<:Real}

Returns the max psi useful for an ofl in the SOL with no wall.

source
IMAS.find_psi_wall_ompFunction
find_psi_wall_omp(
+    precision::Float64=1e-2) where {T<:Real}

Returns the max psi useful for an ofl in the SOL with no wall.

source
IMAS.find_psi_wall_ompFunction
find_psi_wall_omp(
     eqt::IMAS.equilibrium__time_slice,
     wall_r::AbstractVector{<:Real},
     wall_z::AbstractVector{<:Real}
-)

Returns the psi of the magnetic surface in the SOL which intersects the wall at the outer midplane

source
find_psi_wall_omp(
+)

Returns the psi of the magnetic surface in the SOL which intersects the wall at the outer midplane

source
find_psi_wall_omp(
     PSI_interpolant::Interpolations.AbstractInterpolation,
     RA::T1,
     ZA::T1,
@@ -227,14 +227,14 @@
     wall_z::AbstractVector{T2},
     psi_max::T1,
     psi_sign::T1
-) where {T1<:Real,T2<:Real}
source
IMAS.interp_rmid_at_psiFunction
interp_rmid_at_psi(eqt::IMAS.equilibrium__time_slice, PSI_interpolant::Interpolations.AbstractInterpolation, R::AbstractVector{<:Real})

Returns the interpolant r_mid(ψ) to compute the r at the midplane of the flux surface identified by ψ

The vector R defines the sampling of interest for thie interpolation

source
IMAS.interp_rmid_at_psiFunction
interp_rmid_at_psi(eqt::IMAS.equilibrium__time_slice, PSI_interpolant::Interpolations.AbstractInterpolation, R::AbstractVector{<:Real})

Returns the interpolant r_mid(ψ) to compute the r at the midplane of the flux surface identified by ψ

The vector R defines the sampling of interest for thie interpolation

source
IMAS.SimpleSurfaceType
struct SimpleSurface{T<:Real} <: AbstractFluxSurface{T}
     psi::T
     r::Vector{T}
     z::Vector{T}
     ll::Vector{T}
     fluxexpansion::Vector{T}
     int_fluxexpansion_dl::T
-end

A simplified version of FluxSurface that only has the contour points and what is needed to compute flux surface averages

source
IMAS.FluxSurfaceType
struct FluxSurface{T<:Real} <: AbstractFluxSurface{T}
+end

A simplified version of FluxSurface that only has the contour points and what is needed to compute flux surface averages

source
IMAS.FluxSurfaceType
struct FluxSurface{T<:Real} <: AbstractFluxSurface{T}
     psi::T
     r::Vector{T}
     z::Vector{T}
@@ -253,7 +253,7 @@
     ll::Vector{T}
     fluxexpansion::Vector{T}
     int_fluxexpansion_dl::T
-end
source
IMAS.trace_simple_surfacesFunction
trace_simple_surfaces(
     psi::AbstractVector{T},
     r::AbstractVector{T},
     z::AbstractVector{T},
@@ -263,7 +263,7 @@
     ZA::T,
     wall_r::AbstractVector{T},
     wall_z::AbstractVector{T}
-) where {T<:Real}

Trace flux surfaces and returns vector of SimpleSurface structures. The result contains only the contours and what is needed to perform flux-surface averaging.

source
IMAS.trace_simple_surfaces!Function
trace_simple_surfaces!(
+) where {T<:Real}

Trace flux surfaces and returns vector of SimpleSurface structures. The result contains only the contours and what is needed to perform flux-surface averaging.

source
IMAS.trace_simple_surfaces!Function
trace_simple_surfaces!(
     surfaces::Vector{SimpleSurface{T}},
     psi::AbstractVector{T},
     r::AbstractVector{T},
@@ -276,7 +276,7 @@
     wall_z::AbstractVector{T},
     r_cache::AbstractVector{T}=T[],
     z_cache::AbstractVector{T}=T[])
-) where {T<:Real}

Trace flux surfaces and store in surfaces vector of SimpleSurface structures. The result contains only the contours and what is needed to perform flux-surface averaging.

source
IMAS.trace_surfacesFunction
trace_surfaces(eqt::IMAS.equilibrium__time_slice{T}, wall_r::AbstractVector{T}, wall_z::AbstractVector{T}) where {T<:Real}

Trace flux surfaces and returns vector of FluxSurface structures

source
trace_surfaces(
+) where {T<:Real}

Trace flux surfaces and store in surfaces vector of SimpleSurface structures. The result contains only the contours and what is needed to perform flux-surface averaging.

source
IMAS.trace_surfacesFunction
trace_surfaces(eqt::IMAS.equilibrium__time_slice{T}, wall_r::AbstractVector{T}, wall_z::AbstractVector{T}) where {T<:Real}

Trace flux surfaces and returns vector of FluxSurface structures

source
trace_surfaces(
     psi::AbstractVector{T},
     f::AbstractVector{T},
     r::AbstractVector{T},
@@ -289,7 +289,7 @@
     ZA::T,
     wall_r::AbstractVector{T},
     wall_z::AbstractVector{T}
-) where {T<:Real}
source
IMAS.flux_surfacesFunction
flux_surfaces(eq::equilibrium{T}, wall_r::AbstractVector{T}, wall_z::AbstractVector{T}) where {T<:Real}

Update flux surface averaged and geometric quantities for all time_slices in the equilibrium IDS

source
flux_surfaces(eqt::equilibrium__time_slice{T1}, wall_r::AbstractVector{T2}, wall_z::AbstractVector{T2}) where {T1<:Real,T2<:Real}

Update flux surface averaged and geometric quantities for a given equilibrum IDS time slice.

source
flux_surfaces(eqt::equilibrium__time_slice, wall::IMAS.wall)
source
IMAS.flux_surfaceFunction
flux_surface(eqt::equilibrium__time_slice{T}, psi_level::Real, type::Symbol, wall_r::AbstractVector{T}, wall_z::AbstractVector{T}) where {T<:Real}

Returns a vector with the (r,z) coordiates of flux surface at given psi_level

The type parameter:

  • :any: return all contours
  • :closed: all closed flux-surface that encircle the magnetic axis and do not cross the wall
  • :open: all open flux-surfaces (considerning open even closed flux surfaces that hit the first wall)
  • :open_no_wall: all open flux-surfaces independently of wall
  • :encircling: open flux-surfaces encircling the magnetic axis
source
flux_surface(
+) where {T<:Real}
source
IMAS.flux_surfacesFunction
flux_surfaces(eq::equilibrium{T}, wall_r::AbstractVector{T}, wall_z::AbstractVector{T}) where {T<:Real}

Update flux surface averaged and geometric quantities for all time_slices in the equilibrium IDS

source
flux_surfaces(eqt::equilibrium__time_slice{T1}, wall_r::AbstractVector{T2}, wall_z::AbstractVector{T2}) where {T1<:Real,T2<:Real}

Update flux surface averaged and geometric quantities for a given equilibrum IDS time slice.

source
flux_surfaces(eqt::equilibrium__time_slice, wall::IMAS.wall)
source
IMAS.flux_surfaceFunction
flux_surface(eqt::equilibrium__time_slice{T}, psi_level::Real, type::Symbol, wall_r::AbstractVector{T}, wall_z::AbstractVector{T}) where {T<:Real}

Returns a vector with the (r,z) coordiates of flux surface at given psi_level

The type parameter:

  • :any: return all contours
  • :closed: all closed flux-surface that encircle the magnetic axis and do not cross the wall
  • :open: all open flux-surfaces (considerning open even closed flux surfaces that hit the first wall)
  • :open_no_wall: all open flux-surfaces independently of wall
  • :encircling: open flux-surfaces encircling the magnetic axis
source
flux_surface(
     dim1::AbstractVector{T1},
     dim2::AbstractVector{T1},
     PSI::AbstractArray{T2},
@@ -299,7 +299,7 @@
     fw_z::AbstractVector{T4},
     psi_level::T5,
     type::Symbol
-) where {T1<:Real,T2<:Real,T3<:Real,T4<:Real,T5<:Real}
source
flux_surface(
+) where {T1<:Real,T2<:Real,T3<:Real,T4<:Real,T5<:Real}
source
flux_surface(
     dim1::Union{AbstractVector{T},AbstractRange{T}},
     dim2::Union{AbstractVector{T},AbstractRange{T}},
     cl::Contour.ContourLevel,
@@ -307,31 +307,31 @@
     ZA::T,
     fw_r::AbstractVector{T},
     fw_z::AbstractVector{T},
-    type::Symbol) where {T<:Real}
source
IMAS.flux_surface_avgFunction
flux_surface_avg(quantity::AbstractVector{T}, surface::FluxSurface{T}) where {T<:Real}

Flux surface averaging of a quantity

source
flux_surface_avg(f::F1, surface::FluxSurface{T}) where {F1<:Function, T<:Real}

Flux surface averaging of a function

source
IMAS.volume_integrateFunction
volume_integrate(eqt::IMAS.equilibrium__time_slice, what::AbstractVector{T})::AbstractVector{T} where {T<:Real}

Integrate quantity over volume

source
IMAS.cumlul_volume_integrateFunction
volume_integrate(eqt::IMAS.equilibrium__time_slice, what::AbstractVector{T})::AbstractVector{T} where {T<:Real}

Cumulative integrate quantity over volume

source
IMAS.surface_integrateFunction
surface_integrate(eqt::IMAS.equilibrium__time_slice, what::AbstractVector{T})::AbstractVector{T} where {T<:Real}

Integrate quantity over surface

source
IMAS.cumlul_surface_integrateFunction
surface_integrate(eqt::IMAS.equilibrium__time_slice, what::AbstractVector{T})::AbstractVector{T} where {T<:Real}

Cumulative integrate quantity over surface

source
IMAS.find_x_point!Function
find_x_point!(eqt::IMAS.equilibrium__time_slice{T}, wall_r::AbstractVector{T}, wall_z::AbstractVector{T}) where {T<:Real}

Find the n X-points that are closest to the separatrix

source
IMAS.x_points_inside_wallFunction
x_points_inside_wall(x_points::IDSvector{<:IMAS.equilibrium__time_slice___boundary__x_point}, wall::IMAS.wall)

Returns vector of x_points that are inside of the first wall

source
IMAS.miller_R_a_κ_δ_ζFunction
miller_R_a_κ_δ_ζ(pr, pz, r_at_max_z, max_z, r_at_min_z, min_z, z_at_max_r, max_r, z_at_min_r, min_r)

Returns named tuple with R0, a, κ, δu, δl, ζou, ζol, ζil, ζiu of a contour

source
miller_R_a_κ_δ_ζ(pr::Vector{T}, pz::Vector{T}) where {T<:Real}
source
IMAS.fluxsurface_extremaFunction
fluxsurface_extrema(pr::Vector{T}, pz::Vector{T}) where {T<:Real}

Returns extrema indexes and values of R,Z flux surfaces vectors:

imaxr, iminr,
+    type::Symbol) where {T<:Real}
source
IMAS.flux_surface_avgFunction
flux_surface_avg(quantity::AbstractVector{T}, surface::FluxSurface{T}) where {T<:Real}

Flux surface averaging of a quantity

source
flux_surface_avg(f::F1, surface::FluxSurface{T}) where {F1<:Function, T<:Real}

Flux surface averaging of a function

source
IMAS.volume_integrateFunction
volume_integrate(eqt::IMAS.equilibrium__time_slice, what::AbstractVector{T})::AbstractVector{T} where {T<:Real}

Integrate quantity over volume

source
IMAS.cumlul_volume_integrateFunction
volume_integrate(eqt::IMAS.equilibrium__time_slice, what::AbstractVector{T})::AbstractVector{T} where {T<:Real}

Cumulative integrate quantity over volume

source
IMAS.surface_integrateFunction
surface_integrate(eqt::IMAS.equilibrium__time_slice, what::AbstractVector{T})::AbstractVector{T} where {T<:Real}

Integrate quantity over surface

source
IMAS.cumlul_surface_integrateFunction
surface_integrate(eqt::IMAS.equilibrium__time_slice, what::AbstractVector{T})::AbstractVector{T} where {T<:Real}

Cumulative integrate quantity over surface

source
IMAS.find_x_point!Function
find_x_point!(eqt::IMAS.equilibrium__time_slice{T}, wall_r::AbstractVector{T}, wall_z::AbstractVector{T}) where {T<:Real}

Find the n X-points that are closest to the separatrix

source
IMAS.x_points_inside_wallFunction
x_points_inside_wall(x_points::IDSvector{<:IMAS.equilibrium__time_slice___boundary__x_point}, wall::IMAS.wall)

Returns vector of x_points that are inside of the first wall

source
IMAS.miller_R_a_κ_δ_ζFunction
miller_R_a_κ_δ_ζ(pr, pz, r_at_max_z, max_z, r_at_min_z, min_z, z_at_max_r, max_r, z_at_min_r, min_r)

Returns named tuple with R0, a, κ, δu, δl, ζou, ζol, ζil, ζiu of a contour

source
miller_R_a_κ_δ_ζ(pr::Vector{T}, pz::Vector{T}) where {T<:Real}
source
IMAS.fluxsurface_extremaFunction
fluxsurface_extrema(pr::Vector{T}, pz::Vector{T}) where {T<:Real}

Returns extrema indexes and values of R,Z flux surfaces vectors:

imaxr, iminr,
 imaxz, iminz,
 r_at_max_z, max_z,
 r_at_min_z, min_z,
 z_at_max_r, max_r,
-z_at_min_r, min_r
source
IMAS.luce_squarenessFunction
luce_squareness(pr::AbstractVector{T}, pz::AbstractVector{T}, r_at_max_z::T, max_z::T, r_at_min_z::T, min_z::T, z_at_max_r::T, max_r::T, z_at_min_r::T, min_r::T) where {T<:Real}

Squareness from: "An analytic functional form for characterization and generation of axisymmetric plasma boundaries" T.C. Luce, Plasma Phys. Control. Fusion 55 (2013) http://dx.doi.org/10.1088/0741-3335/55/9/095009

Returns: zetaou, zetaol, zetail, zetaiu

source
IMAS.areal_elongationFunction
areal_elongation(eqt::IMAS.equilibrium__time_slice)

A measure of the plasma elongation based on the averaged cross-sectional area of the plasma, most notably used in the H98y2 scaling

See: https://iopscience.iop.org/article/10.1088/0029-5515/48/9/099801/pdf

source

Physics neoclassical

IMAS.collision_frequenciesFunction
collision_frequencies(cp1d::IMAS.core_profiles__profiles_1d)

Returns named tuple with nue, nui, nu_exch in [1/s]

NOTE: transpiled from the TGYRO collision_rates subroutine

source
IMAS.Sauter_neo2021_bootstrapFunction
Sauter_neo2021_bootstrap(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d; neo_2021::Bool=true, same_ne_ni::Bool=false)

Calculates bootstrap current

  • neo_2021: A.Redl, et al., Phys. Plasma 28, 022502 (2021) instead of O Sauter, et al., Phys. Plasmas 9, 5140 (2002); doi:10.1063/1.1517052 (https://crppwww.epfl.ch/~sauter/neoclassical)

  • sameneni: assume same inverse scale length for electrons and ions

source
IMAS.collisionless_bootstrap_coefficientFunction
collisionless_bootstrap_coefficient(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d)

Returns the collisional bootstrap coefficient Cbs defines as jbootfract = Cbs * sqrt(ϵ) * βp

See: Gi et al., Fus. Eng. Design 89 2709 (2014)

See: Wilson et al., Nucl. Fusion 32 257 (1992)

source
IMAS.nuestarFunction
nuestar(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d)

Calculate the electron collisionality, ν_*e, as a dimensionless measure of the frequency of electron collisions relative to their characteristic transit frequency.

source
IMAS.nuistarFunction
nuistar(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d)

Calculate the ion collisionality, ν_*i, as a dimensionless measure of the frequency of ion collisions relative to their characteristic transit frequency.

source
IMAS.neo_conductivityFunction
neo_conductivity(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d)

Calculates the neo-classical conductivity in 1/(Ohm*meter) based on the NEO 2021 modifcation

source
IMAS.sawtooth_conductivityFunction
sawtooth_conductivity(conductivity::AbstractVector{T}, q::AbstractVector{T}; q_sawtooth::Float64=1.0) where {T<:Real}

Jardin's model for stationary sawteeth to raise q>1

source

Physics nuclear

IMAS.reactivityFunction
reactivity(Ti::AbstractVector{<:Real}, model::String; polarized_fuel_fraction::Real=0.0)

Fusion reactivity coming from H.-S. Bosch and G.M. Hale, Nucl. Fusion 32 (1992) 611. Model can be ["D+T→He4", "D+He3→He4", "D+D→T", "D+D→He3"]")

source
IMAS.D_T_to_He4_reactionsFunction
D_T_to_He4_reactions(cp1d::IMAS.core_profiles__profiles_1d)

Calculates the number of D-T thermal fusion reactions to He4 in [reactions/m³/s]

source
IMAS.D_D_to_He3_reactionsFunction
D_D_to_He3_reactions(dd::IMAS.dd)

Calculates the number of D-D thermal fusion reactions to He3 in [reactions/m³/s]

source
IMAS.D_D_to_T_reactionsFunction
D_D_to_T_reactions(dd::IMAS.dd)

Calculates the number of D-D thermal fusion reactions to T in [reactions/m³/s]

source
IMAS.luce_squarenessFunction
luce_squareness(pr::AbstractVector{T}, pz::AbstractVector{T}, r_at_max_z::T, max_z::T, r_at_min_z::T, min_z::T, z_at_max_r::T, max_r::T, z_at_min_r::T, min_r::T) where {T<:Real}

Squareness from: "An analytic functional form for characterization and generation of axisymmetric plasma boundaries" T.C. Luce, Plasma Phys. Control. Fusion 55 (2013) http://dx.doi.org/10.1088/0741-3335/55/9/095009

Returns: zetaou, zetaol, zetail, zetaiu

source
IMAS.areal_elongationFunction
areal_elongation(eqt::IMAS.equilibrium__time_slice)

A measure of the plasma elongation based on the averaged cross-sectional area of the plasma, most notably used in the H98y2 scaling

See: https://iopscience.iop.org/article/10.1088/0029-5515/48/9/099801/pdf

source

Physics neoclassical

IMAS.collision_frequenciesFunction
collision_frequencies(cp1d::IMAS.core_profiles__profiles_1d)

Returns named tuple with nue, nui, nu_exch in [1/s]

NOTE: transpiled from the TGYRO collision_rates subroutine

source
IMAS.Sauter_neo2021_bootstrapFunction
Sauter_neo2021_bootstrap(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d; neo_2021::Bool=true, same_ne_ni::Bool=false)

Calculates bootstrap current

  • neo_2021: A.Redl, et al., Phys. Plasma 28, 022502 (2021) instead of O Sauter, et al., Phys. Plasmas 9, 5140 (2002); doi:10.1063/1.1517052 (https://crppwww.epfl.ch/~sauter/neoclassical)

  • sameneni: assume same inverse scale length for electrons and ions

source
IMAS.collisionless_bootstrap_coefficientFunction
collisionless_bootstrap_coefficient(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d)

Returns the collisional bootstrap coefficient Cbs defines as jbootfract = Cbs * sqrt(ϵ) * βp

See: Gi et al., Fus. Eng. Design 89 2709 (2014)

See: Wilson et al., Nucl. Fusion 32 257 (1992)

source
IMAS.nuestarFunction
nuestar(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d)

Calculate the electron collisionality, ν_*e, as a dimensionless measure of the frequency of electron collisions relative to their characteristic transit frequency.

source
IMAS.nuistarFunction
nuistar(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d)

Calculate the ion collisionality, ν_*i, as a dimensionless measure of the frequency of ion collisions relative to their characteristic transit frequency.

source
IMAS.neo_conductivityFunction
neo_conductivity(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d)

Calculates the neo-classical conductivity in 1/(Ohm*meter) based on the NEO 2021 modifcation

source
IMAS.sawtooth_conductivityFunction
sawtooth_conductivity(conductivity::AbstractVector{T}, q::AbstractVector{T}; q_sawtooth::Float64=1.0) where {T<:Real}

Jardin's model for stationary sawteeth to raise q>1

source

Physics nuclear

IMAS.reactivityFunction
reactivity(Ti::AbstractVector{<:Real}, model::String; polarized_fuel_fraction::Real=0.0)

Fusion reactivity coming from H.-S. Bosch and G.M. Hale, Nucl. Fusion 32 (1992) 611. Model can be ["D+T→He4", "D+He3→He4", "D+D→T", "D+D→He3"]")

source
IMAS.D_T_to_He4_reactionsFunction
D_T_to_He4_reactions(cp1d::IMAS.core_profiles__profiles_1d)

Calculates the number of D-T thermal fusion reactions to He4 in [reactions/m³/s]

source
IMAS.D_D_to_He3_reactionsFunction
D_D_to_He3_reactions(dd::IMAS.dd)

Calculates the number of D-D thermal fusion reactions to He3 in [reactions/m³/s]

source
IMAS.D_D_to_T_reactionsFunction
D_D_to_T_reactions(dd::IMAS.dd)

Calculates the number of D-D thermal fusion reactions to T in [reactions/m³/s]

source
IMAS.fusion_reaction_sourceFunction
fusion_reaction_source(
     s1d::IMAS.core_sources__source___profiles_1d,
     reactivity::Vector{<:Real},
     in1::Symbol,
     in2::Symbol,
     out::Symbol,
     eV::Float64
-)

Add a fusion reaction source for two isotopes coming in and one coming out

source
IMAS.D_T_to_He4_source!Function
D_T_to_He4_source!(cs::IMAS.core_sources, cp::IMAS.core_profiles; combine_DT::Bool)

Calculates DT fusion heating with an estimation of the alpha slowing down to the ions and electrons, modifies dd.core_sources

source
IMAS.D_D_to_He3_source!Function
D_D_to_He3_source!(cs::IMAS.core_sources, cp::IMAS.core_profiles)

Calculates the He-3 heating source from D-D fusion reactions, estimates energy transfer to ions and electrons, modifies dd.core_sources

source
IMAS.D_D_to_T_source!Function
D_D_to_T_source!(cs::IMAS.core_sources, cp::IMAS.core_profiles)

Calculates the T heating source from D-D fusion reactions, estimates energy transfer to ions and electrons, modifies dd.core_sources

source
IMAS.D_T_to_He4_heatingFunction
D_T_to_He4_power(cp1d::IMAS.core_profiles__profiles_1d; polarized_fuel_fraction::Real=0.0)

Volumetric heating source of He4 particles coming from D-T reactions [W m⁻³]

source
IMAS.D_D_to_He3_heatingFunction
D_D_to_He3_power(cp1d::IMAS.core_profiles__profiles_1d; polarized_fuel_fraction::Real=0.0)

Volumetric heating source of He3 particles coming from D-D reactions [W m⁻³]

source
IMAS.D_D_to_T_heatingFunction
D_D_to_T_power(cp1d::IMAS.core_profiles__profiles_1d; polarized_fuel_fraction::Real=0.0)

Volumetric heating source of T and H particles coming from D-D reactions [W m⁻³]

source
IMAS.D_T_to_He4_plasma_powerFunction
D_T_to_He4_plasma_power(cp1d::IMAS.core_profiles__profiles_1d; polarized_fuel_fraction::Real=0.0)

Total power in He4 from D-T reaction [W]

source
IMAS.fusion_plasma_powerFunction
fusion_plasma_power(cp1d::IMAS.core_profiles__profiles_1d)

Calculates the total fusion power in the plasma in [W]

If D+T plasma, then D+D is neglected

source
fusion_plasma_power(dd::IMAS.dd)
source
IMAS.fusion_powerFunction
fusion_power(cp1d::IMAS.core_profiles__profiles_1d)

Calculates the total fusion power in [W]

If D+T plasma, then D+D is neglected

source
fusion_power(dd::IMAS.dd)
source
IMAS.fusion_neutron_powerFunction
fusion_neutron_power(cp1d::IMAS.core_profiles__profiles_1d)

Calculates the total fusion power in the neutrons [W]

If D+T plasma, then D+D is neglected

source
fusion_neutron_power(dd::IMAS.dd)
source

Physics particles

IMAS.ParticleType
x::T
+)

Add a fusion reaction source for two isotopes coming in and one coming out

source
IMAS.D_T_to_He4_source!Function
D_T_to_He4_source!(cs::IMAS.core_sources, cp::IMAS.core_profiles; combine_DT::Bool)

Calculates DT fusion heating with an estimation of the alpha slowing down to the ions and electrons, modifies dd.core_sources

source
IMAS.D_D_to_He3_source!Function
D_D_to_He3_source!(cs::IMAS.core_sources, cp::IMAS.core_profiles)

Calculates the He-3 heating source from D-D fusion reactions, estimates energy transfer to ions and electrons, modifies dd.core_sources

source
IMAS.D_D_to_T_source!Function
D_D_to_T_source!(cs::IMAS.core_sources, cp::IMAS.core_profiles)

Calculates the T heating source from D-D fusion reactions, estimates energy transfer to ions and electrons, modifies dd.core_sources

source
IMAS.D_T_to_He4_heatingFunction
D_T_to_He4_power(cp1d::IMAS.core_profiles__profiles_1d; polarized_fuel_fraction::Real=0.0)

Volumetric heating source of He4 particles coming from D-T reactions [W m⁻³]

source
IMAS.D_D_to_He3_heatingFunction
D_D_to_He3_power(cp1d::IMAS.core_profiles__profiles_1d; polarized_fuel_fraction::Real=0.0)

Volumetric heating source of He3 particles coming from D-D reactions [W m⁻³]

source
IMAS.D_D_to_T_heatingFunction
D_D_to_T_power(cp1d::IMAS.core_profiles__profiles_1d; polarized_fuel_fraction::Real=0.0)

Volumetric heating source of T and H particles coming from D-D reactions [W m⁻³]

source
IMAS.D_T_to_He4_plasma_powerFunction
D_T_to_He4_plasma_power(cp1d::IMAS.core_profiles__profiles_1d; polarized_fuel_fraction::Real=0.0)

Total power in He4 from D-T reaction [W]

source
IMAS.fusion_plasma_powerFunction
fusion_plasma_power(cp1d::IMAS.core_profiles__profiles_1d)

Calculates the total fusion power in the plasma in [W]

If D+T plasma, then D+D is neglected

source
fusion_plasma_power(dd::IMAS.dd)
source
IMAS.fusion_powerFunction
fusion_power(cp1d::IMAS.core_profiles__profiles_1d)

Calculates the total fusion power in [W]

If D+T plasma, then D+D is neglected

source
fusion_power(dd::IMAS.dd)
source
IMAS.fusion_neutron_powerFunction
fusion_neutron_power(cp1d::IMAS.core_profiles__profiles_1d)

Calculates the total fusion power in the neutrons [W]

If D+T plasma, then D+D is neglected

source
fusion_neutron_power(dd::IMAS.dd)
source

Physics particles

IMAS.ParticleType
x::T
 y::T
 z::T
 δvx::T
 δvy::T
-δvz::T

Cartesian coordinate system centered in (R=0, Z=0); R = sqrt(X^2 + Y^2) Z = Z

source
Missing docstring.

Missing docstring for IMAS.Particle. Check Documenter's build log for details.

IMAS.define_particlesFunction
define_particles(eqt::IMAS.equilibrium__time_slice, psi::Vector{T}, source_1d::Vector{T}, N::Int) where {T<:Real}

Creates a vector of particles from a 1D source (psi, source_1d) launching N particles.

Returns also a scalar (Ipertrace) which is the intensity per trace.

source
IMAS.find_fluxFunction
find_flux(particles::Vector{Particle{T}}, I_per_trace::T, rwall::Vector{T}, zwall::Vector{T}, dr::T, dz::T; ns::Int=10, debug::Bool=false) where {T<:Real}

Returns the flux at the wall of the quantity brought by particles, together with a vector of the surface elements on the wall (wall_s)

I_per_trace is the intensity per trace

(rwall, zwall) are the coordinates of the wall

dr, dz are the grid sizes used for the 2d source generation

ns is the window size

source
IMAS.toroidal_intersectionFunction
toroidal_intersection(r1::Real, z1::Real, r2::Real, z2::Real, x::Real, y::Real, z::Real, vx::Real, vy::Real, vz::Real, v2::Real, vz2::Real) -> Real

Compute the time of intersection between a moving particle and a toroidal surface defined by two points (r1, z1) and (r2, z2).

Returns the smallest positive time at which the particle intersects the surface segment. Returns Inf if no valid intersection occurs.

  • r1, z1: Coordinates of the first endpoint of the toroidal surface segment.
  • r2, z2: Coordinates of the second endpoint of the toroidal surface segment.
  • x, y, z: Current position of the particle in Cartesian coordinates.
  • vx, vy, vz: Velocity components of the particle.
  • v2: Squared radial velocity component, vx^2 + vy^2.
  • vz2: Squared z-velocity component, vz^2.
source

Physics pedestal

Missing docstring.

Missing docstring for IMAS.Particle. Check Documenter's build log for details.

IMAS.define_particlesFunction
define_particles(eqt::IMAS.equilibrium__time_slice, psi::Vector{T}, source_1d::Vector{T}, N::Int) where {T<:Real}

Creates a vector of particles from a 1D source (psi, source_1d) launching N particles.

Returns also a scalar (Ipertrace) which is the intensity per trace.

source
IMAS.find_fluxFunction
find_flux(particles::Vector{Particle{T}}, I_per_trace::T, rwall::Vector{T}, zwall::Vector{T}, dr::T, dz::T; ns::Int=10, debug::Bool=false) where {T<:Real}

Returns the flux at the wall of the quantity brought by particles, together with a vector of the surface elements on the wall (wall_s)

I_per_trace is the intensity per trace

(rwall, zwall) are the coordinates of the wall

dr, dz are the grid sizes used for the 2d source generation

ns is the window size

source
IMAS.toroidal_intersectionFunction
toroidal_intersection(r1::Real, z1::Real, r2::Real, z2::Real, x::Real, y::Real, z::Real, vx::Real, vy::Real, vz::Real, v2::Real, vz2::Real) -> Real

Compute the time of intersection between a moving particle and a toroidal surface defined by two points (r1, z1) and (r2, z2).

Returns the smallest positive time at which the particle intersects the surface segment. Returns Inf if no valid intersection occurs.

  • r1, z1: Coordinates of the first endpoint of the toroidal surface segment.
  • r2, z2: Coordinates of the second endpoint of the toroidal surface segment.
  • x, y, z: Current position of the particle in Cartesian coordinates.
  • vx, vy, vz: Velocity components of the particle.
  • v2: Squared radial velocity component, vx^2 + vy^2.
  • vz2: Squared z-velocity component, vz^2.
source

Physics pedestal

IMAS.blend_core_edge_HmodeFunction
blend_core_edge_Hmode(
     profile::AbstractVector{<:Real},
     rho::AbstractVector{<:Real},
     ped_height::Real,
     ped_width::Real,
     tr_bound0::Real,
     tr_bound1::Real
-)

Blends the core profiles to the pedestal for H-mode profiles, making sure the Z's at trbound0 and trbound1 match the Z's from the original profile

source
IMAS.blend_core_edge_EPEDFunction
blend_core_edge_EPED(
+)

Blends the core profiles to the pedestal for H-mode profiles, making sure the Z's at trbound0 and trbound1 match the Z's from the original profile

source
IMAS.blend_core_edge_EPEDFunction
blend_core_edge_EPED(
     profile::AbstractVector{<:Real},
     rho::AbstractVector{<:Real},
     ped_height::Real,
@@ -340,21 +340,21 @@
     ped_bound::Real;
     expin::Real,
     expout::Real
-)

Blends the core and pedestal for given profile to match pedheight, pedwidth using nmlbound and pedbound as blending boundaries

source
IMAS.blend_core_edge_LmodeFunction
blend_core_edge_Lmode(
+)

Blends the core and pedestal for given profile to match pedheight, pedwidth using nmlbound and pedbound as blending boundaries

source
IMAS.blend_core_edge_LmodeFunction
blend_core_edge_Lmode(
     profile::AbstractVector{<:Real},
     rho::AbstractVector{<:Real},
     ped_height::Real,
     ped_width::Real,
     tr_bound0::Real,
-    tr_bound1::Real)

Blends the core profiles to the pedestal for L-mode profiles, making sure the Z's at tr_bound1 matches the Z's from the original profile

NOTE: pedwidth, trbound0, tr_bound1 are not utilized

source
IMAS.pedestal_finderFunction
pedestal_finder(profile::Vector{T}, psi_norm::Vector{T}; do_plot::Bool=false) where {T<:Real}

Finds the pedetal height and width using the EPED1 definition.

NOTE: The width is limited to be between 0.01 and 0.1. If the width is at the 0.1 boundary it is likely an indication that the profile is not a typical H-mode profile. The height is the value of the profile evaluated at (1.0 - width)

source
IMAS.ped_height_at_09Function
ped_height_at_09(rho::AbstractVector{T}, profile::AbstractVector{T}, height09::T) where {T<:Real}

Scale density profile so that value at rho=0.9 is height09

source

Physics pf_active

Missing docstring.

Missing docstring for IMAS.area. Check Documenter's build log for details.

Missing docstring.

Missing docstring for IMAS.volume. Check Documenter's build log for details.

IMAS.is_ohmic_coilFunction
is_ohmic_coil(coil::IMAS.pf_active__coil)

Returns true/false if coil is part of the OH

source
IMAS.set_coils_functionFunction
set_coils_function(coils::IDSvector{<:IMAS.pf_active__coil}, R0::Float64; force::Bool=false)

Setup the pf_active.coil[:].function

source
Missing docstring.

Missing docstring for IMAS.outline. Check Documenter's build log for details.

Physics profiles

IMAS.pressure_thermalFunction
pressure_thermal(cp1d::IMAS.core_profiles__profiles_1d)

core_profiles thermal pressure

source
pressure_thermal(cp1de::IMAS.core_profiles__profiles_1d___electrons)

electrons thermal pressure

source
pressure_thermal(ion::IMAS.core_profiles__profiles_1d___ion)

ion thermal pressure

source
pressure_thermal(cp1di::IMAS.IDSvector{IMAS.core_profiles__profiles_1d___ion{T}}) where {T<:Real}

thermal pressure for all ions

source
IMAS.beta_tor_thermal_normFunction
beta_tor_thermal_norm(eq::IMAS.equilibrium, cp1d::IMAS.core_profiles__profiles_1d)

Normalised toroidal beta from thermal pressure only, defined as 100 * betatorthermal * a[m] * B0 [T] / ip [MA]

source
IMAS.beta_tor_normFunction
beta_tor_norm(eq::IMAS.equilibrium, cp1d::IMAS.core_profiles__profiles_1d)

Normalised toroidal beta from total pressure, defined as 100 * beta_tor * a[m] * B0 [T] / ip [MA]

source
IMAS.beta_torFunction
beta_tor(eq::IMAS.equilibrium, cp1d::IMAS.core_profiles__profiles_1d; norm::Bool, thermal::Bool)

Toroidal beta, defined as the volume-averaged total perpendicular pressure divided by (B0^2/(2*mu0)), i.e. beta_toroidal = 2 mu0 int(p dV) / V / B0^2

source
beta_tor(pressure_average::Real, Bt::Real)

Calculates Beta_tor from pressure and Bt

source
IMAS.list_ionsFunction
list_ions(ids::IDS, idss::Vararg{<:IDS}; time0::Float64)

List of ions mentioned in multiple IDSs at a given time

source
IMAS.ion_element!Function
ion_element!(
+    tr_bound1::Real)

Blends the core profiles to the pedestal for L-mode profiles, making sure the Z's at tr_bound1 matches the Z's from the original profile

NOTE: pedwidth, trbound0, tr_bound1 are not utilized

source
IMAS.pedestal_finderFunction
pedestal_finder(profile::Vector{T}, psi_norm::Vector{T}; do_plot::Bool=false) where {T<:Real}

Finds the pedetal height and width using the EPED1 definition.

NOTE: The width is limited to be between 0.01 and 0.1. If the width is at the 0.1 boundary it is likely an indication that the profile is not a typical H-mode profile. The height is the value of the profile evaluated at (1.0 - width)

source
IMAS.ped_height_at_09Function
ped_height_at_09(rho::AbstractVector{T}, profile::AbstractVector{T}, height09::T) where {T<:Real}

Scale density profile so that value at rho=0.9 is height09

source

Physics pf_active

Missing docstring.

Missing docstring for IMAS.area. Check Documenter's build log for details.

Missing docstring.

Missing docstring for IMAS.volume. Check Documenter's build log for details.

IMAS.is_ohmic_coilFunction
is_ohmic_coil(coil::IMAS.pf_active__coil)

Returns true/false if coil is part of the OH

source
IMAS.set_coils_functionFunction
set_coils_function(coils::IDSvector{<:IMAS.pf_active__coil}, R0::Float64; force::Bool=false)

Setup the pf_active.coil[:].function

source
Missing docstring.

Missing docstring for IMAS.outline. Check Documenter's build log for details.

Physics profiles

IMAS.pressure_thermalFunction
pressure_thermal(cp1d::IMAS.core_profiles__profiles_1d)

core_profiles thermal pressure

source
pressure_thermal(cp1de::IMAS.core_profiles__profiles_1d___electrons)

electrons thermal pressure

source
pressure_thermal(ion::IMAS.core_profiles__profiles_1d___ion)

ion thermal pressure

source
pressure_thermal(cp1di::IMAS.IDSvector{IMAS.core_profiles__profiles_1d___ion{T}}) where {T<:Real}

thermal pressure for all ions

source
IMAS.beta_tor_thermal_normFunction
beta_tor_thermal_norm(eq::IMAS.equilibrium, cp1d::IMAS.core_profiles__profiles_1d)

Normalised toroidal beta from thermal pressure only, defined as 100 * betatorthermal * a[m] * B0 [T] / ip [MA]

source
IMAS.beta_tor_normFunction
beta_tor_norm(eq::IMAS.equilibrium, cp1d::IMAS.core_profiles__profiles_1d)

Normalised toroidal beta from total pressure, defined as 100 * beta_tor * a[m] * B0 [T] / ip [MA]

source
IMAS.beta_torFunction
beta_tor(eq::IMAS.equilibrium, cp1d::IMAS.core_profiles__profiles_1d; norm::Bool, thermal::Bool)

Toroidal beta, defined as the volume-averaged total perpendicular pressure divided by (B0^2/(2*mu0)), i.e. beta_toroidal = 2 mu0 int(p dV) / V / B0^2

source
beta_tor(pressure_average::Real, Bt::Real)

Calculates Beta_tor from pressure and Bt

source
IMAS.list_ionsFunction
list_ions(ids::IDS, idss::Vararg{<:IDS}; time0::Float64)

List of ions mentioned in multiple IDSs at a given time

source
IMAS.ion_element!Function
ion_element!(
     ion::Union{IMAS.core_profiles__profiles_1d___ion,IMAS.core_sources__source___profiles_1d___ion},
-    ion_symbol::Symbol)

Fills the ion.element structure with the a and z_n information, also updates the ion.label

source
IMAS.ion_propertiesFunction
ion_properties( ion_symbol::Symbol; fast::Bool=false)

Returns named tuple with z_n, a, and label information of a given ion

source
IMAS.atomic_massFunction
atomic_mass(Z::Int, N::Int)

Returns the estimated nucleus mass including the estimated effect of binding energy

source
IMAS.energy_thermalFunction
energy_thermal(cp1d::IMAS.core_profiles__profiles_1d)

Calculates the thermal stored energy

source
IMAS.energy_thermal_pedFunction
energy_thermal_ped(cp1d::IMAS.core_profiles__profiles_1d, su::IMAS.summary)

Calculates the pedestal contribution to the thermal stored energy by integrating over entire domain but with pedestal pressure in the core

source
IMAS.tau_e_thermalFunction
tau_e_thermal(cp1d::IMAS.core_profiles__profiles_1d, sources::IMAS.core_sources; subtract_radiation_losses::Bool=true)

Evaluate thermal energy confinement time

source
tau_e_thermal(dd::IMAS.dd; time0::Float64=dd.global_time, subtract_radiation_losses::Bool=true)
source
IMAS.tau_e_h98Function
tau_e_h98(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d, cs::IMAS.plot_core_sources; subtract_radiation_losses::Bool=true)

H98y2 ITER elmy H-mode confinement time scaling

NOTE: H98y2 uses aereal elongation

See Table 5 in https://iopscience.iop.org/article/10.1088/0029-5515/39/12/302/pdf and https://iopscience.iop.org/article/10.1088/0029-5515/48/9/099801/pdf for additional correction with plasma_volume

source
tau_e_h98(dd::IMAS.dd; time0::Float64=dd.global_time, subtract_radiation_losses::Bool=true)
source
IMAS.tau_e_ds03Function
tau_e_ds03(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d, cs::IMAS.core_sources; subtract_radiation_losses::Bool=true)

Petty's 2003 confinement time scaling

NOTE: Petty uses elongation at the separatrix and makes no distinction between volume and line-average density

source
tau_e_ds03(dd::IMAS.dd; time0::Float64=dd.global_time, subtract_radiation_losses::Bool=true)
source
IMAS.bunitFunction
bunit(eqt1d::IMAS.equilibrium__time_slice___profiles_1d)

Calculate bunit from equilibrium

source
IMAS.greenwald_densityFunction
greenwald_density(eqt::IMAS.equilibrium__time_slice)

Simple greenwald line-averaged density limit

source
greenwald_density(ip::T, minor_radius::T) where {T<:Real}
source
greenwald_density(dd::IMAS.dd)
source
greenwald_density(ps::IMAS.pulse_schedule; time0=global_time(ps))
source
IMAS.greenwald_fractionFunction
greenwald_fraction(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d)

Greewald fraction

source
greenwald_fraction(dd::IMAS.dd)
source
IMAS.ne_lineFunction
ne_line(::Nothing, cp1d::IMAS.core_profiles__profiles_1d)

Calculates the averaged density along rhotornorm (to be used when equilibrium information is not available)

source
ne_line(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d)

Calculates the line averaged density from the equilibrium midplane horizantal line

source
ne_line(eqt::IMAS.equilibrium__time_slice, ne_profile::AbstractVector{<:Real}, rho_ne::AbstractVector{<:Real})
source
ne_line(dd::IMAS.dd; time0::Float64=dd.global_time)
source
ne_line(ps::IMAS.pulse_schedule; time0=global_time(ps))

returns neline from pulseschedule looking first in `pulseschedule.densitycontrol.neline.referenceand thenpulseschedule.densitycontrol.greenwald_fraction.reference`

source
IMAS.ne_vol_avgFunction
ne_vol_avg(cp1d::IMAS.core_profiles__profiles_1d)

Volume averaged electron density

source
Missing docstring.

Missing docstring for IMAS.beta_tor. Check Documenter's build log for details.

IMAS.beta_nFunction
beta_n(beta_tor::Real, minor_radius::Real, Bt::Real, Ip::Real)

Calculates BetaN from beta_tor

source
IMAS.Hmode_profilesFunction
Hmode_profiles(edge::Real, ped::Real, core::Real, ngrid::Int, expin::Real, expout::Real, width::Real; offset::Real=0.0)

Generate H-mode density and temperature profiles evenly spaced in the radial coordinate

  • edge: separatrix value
  • ped: pedestal value
  • core: on-axis value
  • ngrid: number of radial grid points
  • expin: inner core exponent for H-mode pedestal profile
  • expout: outer core exponent for H-mode pedestal profile
  • width: full width of pedestal (from the separatrix to the pedestal itself)
  • offset: offset of the pedestal center
source
Hmode_profiles(edge::Real, ped::Real, ngrid::Int, expin::Real, expout::Real, width::Real)

NOTE: The core value is allowed to float

source
IMAS.Lmode_profilesFunction
Lmode_profiles(edge::Real, ped::Real, core::Real, ngrid::Int, expin::Real, expout::Real, width::Real)

Generate L-mode density and temperature profiles evenly spaced in the radial coordinate

  • edge: separatrix value
  • ped: pedestal value
  • ngrid: number of radial grid points
  • expin: inner core exponent for H-mode pedestal profile
  • expout: outer core exponent for H-mode pedestal profile
  • width: width of pedestal
source
IMAS.A_effectiveFunction
A_effective(cp1d::IMAS.core_profiles__profiles_1d{T}) where {T<:Real}

A_effective towards L to H scaling see G. Birkenmeier et al 2022 Nucl. Fusion 62 086005

source
IMAS.scaling_L_to_H_powerFunction
scaling_L_to_H_power(A_effective::Real, ne_volume::Real, B0::Real, surface_area::Real)

L to H transition power scaling for metal walls and isotope effect according to : G. Birkenmeier et al 2022 Nucl. Fusion 62 086005

inputs in SI and returns power in W

source
scaling_L_to_H_power(cp1d::IMAS.core_profiles__profiles_1d, eqt::IMAS.equilibrium__time_slice)
source
scaling_L_to_H_power(dd::IMAS.dd)
source
IMAS.L_H_thresholdFunction
L_H_threshold(cs::IMAS.core_sources, cp1d::IMAS.core_profiles__profiles_1d, eqt::IMAS.equilibrium__time_slice)

Returns ratio of Psol to Plh

source
L_H_threshold(dd::IMAS.dd)
source
IMAS.satisfies_h_mode_conditionsFunction
satisfies_h_mode_conditions(dd::IMAS.dd; threshold_multiplier::Float64=1.0)

Returns true if the plasma is diverted, has positive triangularity, and Psol > Plh * threshold_multiplier

source
IMAS.ITBFunction
ITB(rho0::T, width::T, height::T, rho::AbstractVector{T}) where {T<:Real}

tanh profile to be added to existing profiles to model Internal Transport Barrier (ITB). The ITB is centered at rho0, with a full width of width and given height

source
IMAS.ITB_profileFunction
ITB_profile(rho::AbstractVector{T}, input_profile::AbstractVector{T}, rho0::T, width::T, height_ratio::T) where {T<:Real}

Add ITB to existing profile. The ITB is centered at rho0, with a full width of width, and a height expressed as a ratio of the input_profile evaluated on axis

source
IMAS.speciesFunction
species(cp1d::IMAS.core_profiles__profiles_1d; only_electrons_ions::Symbol=:all, only_thermal_fast::Symbol=:all)

Returns species index and names (followed by "fast" if densityfast is present), for example:

(0, :electrons)
+    ion_symbol::Symbol)

Fills the ion.element structure with the a and z_n information, also updates the ion.label

source
IMAS.ion_propertiesFunction
ion_properties( ion_symbol::Symbol; fast::Bool=false)

Returns named tuple with z_n, a, and label information of a given ion

source
IMAS.atomic_massFunction
atomic_mass(Z::Int, N::Int)

Returns the estimated nucleus mass including the estimated effect of binding energy

source
IMAS.energy_thermalFunction
energy_thermal(cp1d::IMAS.core_profiles__profiles_1d)

Calculates the thermal stored energy

source
IMAS.energy_thermal_pedFunction
energy_thermal_ped(cp1d::IMAS.core_profiles__profiles_1d, su::IMAS.summary)

Calculates the pedestal contribution to the thermal stored energy by integrating over entire domain but with pedestal pressure in the core

source
IMAS.tau_e_thermalFunction
tau_e_thermal(cp1d::IMAS.core_profiles__profiles_1d, sources::IMAS.core_sources; subtract_radiation_losses::Bool=true)

Evaluate thermal energy confinement time

source
tau_e_thermal(dd::IMAS.dd; time0::Float64=dd.global_time, subtract_radiation_losses::Bool=true)
source
IMAS.tau_e_h98Function
tau_e_h98(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d, cs::IMAS.plot_core_sources; subtract_radiation_losses::Bool=true)

H98y2 ITER elmy H-mode confinement time scaling

NOTE: H98y2 uses aereal elongation

See Table 5 in https://iopscience.iop.org/article/10.1088/0029-5515/39/12/302/pdf and https://iopscience.iop.org/article/10.1088/0029-5515/48/9/099801/pdf for additional correction with plasma_volume

source
tau_e_h98(dd::IMAS.dd; time0::Float64=dd.global_time, subtract_radiation_losses::Bool=true)
source
IMAS.tau_e_ds03Function
tau_e_ds03(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d, cs::IMAS.core_sources; subtract_radiation_losses::Bool=true)

Petty's 2003 confinement time scaling

NOTE: Petty uses elongation at the separatrix and makes no distinction between volume and line-average density

source
tau_e_ds03(dd::IMAS.dd; time0::Float64=dd.global_time, subtract_radiation_losses::Bool=true)
source
IMAS.bunitFunction
bunit(eqt1d::IMAS.equilibrium__time_slice___profiles_1d)

Calculate bunit from equilibrium

source
IMAS.greenwald_densityFunction
greenwald_density(eqt::IMAS.equilibrium__time_slice)

Simple greenwald line-averaged density limit

source
greenwald_density(ip::T, minor_radius::T) where {T<:Real}
source
greenwald_density(dd::IMAS.dd)
source
greenwald_density(ps::IMAS.pulse_schedule; time0=global_time(ps))
source
IMAS.greenwald_fractionFunction
greenwald_fraction(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d)

Greewald fraction

source
greenwald_fraction(dd::IMAS.dd)
source
IMAS.ne_lineFunction
ne_line(::Nothing, cp1d::IMAS.core_profiles__profiles_1d)

Calculates the averaged density along rhotornorm (to be used when equilibrium information is not available)

source
ne_line(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d)

Calculates the line averaged density from the equilibrium midplane horizantal line

source
ne_line(eqt::IMAS.equilibrium__time_slice, ne_profile::AbstractVector{<:Real}, rho_ne::AbstractVector{<:Real})
source
ne_line(dd::IMAS.dd; time0::Float64=dd.global_time)
source
ne_line(ps::IMAS.pulse_schedule; time0=global_time(ps))

returns neline from pulseschedule looking first in `pulseschedule.densitycontrol.neline.referenceand thenpulseschedule.densitycontrol.greenwald_fraction.reference`

source
IMAS.ne_vol_avgFunction
ne_vol_avg(cp1d::IMAS.core_profiles__profiles_1d)

Volume averaged electron density

source
Missing docstring.

Missing docstring for IMAS.beta_tor. Check Documenter's build log for details.

IMAS.beta_nFunction
beta_n(beta_tor::Real, minor_radius::Real, Bt::Real, Ip::Real)

Calculates BetaN from beta_tor

source
IMAS.Hmode_profilesFunction
Hmode_profiles(edge::Real, ped::Real, core::Real, ngrid::Int, expin::Real, expout::Real, width::Real; offset::Real=0.0)

Generate H-mode density and temperature profiles evenly spaced in the radial coordinate

  • edge: separatrix value
  • ped: pedestal value
  • core: on-axis value
  • ngrid: number of radial grid points
  • expin: inner core exponent for H-mode pedestal profile
  • expout: outer core exponent for H-mode pedestal profile
  • width: full width of pedestal (from the separatrix to the pedestal itself)
  • offset: offset of the pedestal center
source
Hmode_profiles(edge::Real, ped::Real, ngrid::Int, expin::Real, expout::Real, width::Real)

NOTE: The core value is allowed to float

source
IMAS.Lmode_profilesFunction
Lmode_profiles(edge::Real, ped::Real, core::Real, ngrid::Int, expin::Real, expout::Real, width::Real)

Generate L-mode density and temperature profiles evenly spaced in the radial coordinate

  • edge: separatrix value
  • ped: pedestal value
  • ngrid: number of radial grid points
  • expin: inner core exponent for H-mode pedestal profile
  • expout: outer core exponent for H-mode pedestal profile
  • width: width of pedestal
source
IMAS.A_effectiveFunction
A_effective(cp1d::IMAS.core_profiles__profiles_1d{T}) where {T<:Real}

A_effective towards L to H scaling see G. Birkenmeier et al 2022 Nucl. Fusion 62 086005

source
IMAS.scaling_L_to_H_powerFunction
scaling_L_to_H_power(A_effective::Real, ne_volume::Real, B0::Real, surface_area::Real)

L to H transition power scaling for metal walls and isotope effect according to : G. Birkenmeier et al 2022 Nucl. Fusion 62 086005

inputs in SI and returns power in W

source
scaling_L_to_H_power(cp1d::IMAS.core_profiles__profiles_1d, eqt::IMAS.equilibrium__time_slice)
source
scaling_L_to_H_power(dd::IMAS.dd)
source
IMAS.L_H_thresholdFunction
L_H_threshold(cs::IMAS.core_sources, cp1d::IMAS.core_profiles__profiles_1d, eqt::IMAS.equilibrium__time_slice)

Returns ratio of Psol to Plh

source
L_H_threshold(dd::IMAS.dd)
source
IMAS.satisfies_h_mode_conditionsFunction
satisfies_h_mode_conditions(dd::IMAS.dd; threshold_multiplier::Float64=1.0)

Returns true if the plasma is diverted, has positive triangularity, and Psol > Plh * threshold_multiplier

source
IMAS.ITBFunction
ITB(rho0::T, width::T, height::T, rho::AbstractVector{T}) where {T<:Real}

tanh profile to be added to existing profiles to model Internal Transport Barrier (ITB). The ITB is centered at rho0, with a full width of width and given height

source
IMAS.ITB_profileFunction
ITB_profile(rho::AbstractVector{T}, input_profile::AbstractVector{T}, rho0::T, width::T, height_ratio::T) where {T<:Real}

Add ITB to existing profile. The ITB is centered at rho0, with a full width of width, and a height expressed as a ratio of the input_profile evaluated on axis

source
IMAS.speciesFunction
species(cp1d::IMAS.core_profiles__profiles_1d; only_electrons_ions::Symbol=:all, only_thermal_fast::Symbol=:all)

Returns species index and names (followed by "fast" if densityfast is present), for example:

(0, :electrons)
 (0, :electrons_fast)
 (1, :DT)
 (2, :Kr83)
 (3, :He4)
 (1, :DT_fast)
-(3, :He4_fast)
source
IMAS.is_quasi_neutralFunction
is_quasi_neutral(cp1d::IMAS.core_profiles__profiles_1d; rtol::Float64=0.001)

Returns true if quasi neutrality is satisfied within a relative tolerance

source
is_quasi_neutral(dd::IMAS.dd)
source
IMAS.enforce_quasi_neutrality!Function
enforce_quasi_neutrality!(cp1d::IMAS.core_profiles__profiles_1d, species::Symbol)

If species is :electrons then updates electrons.density_thermal to meet quasi neutrality condtion.

If species is a ion species, it evaluates the difference in number of charges needed to reach quasineutrality, and assigns positive difference to target ion densitythermal species and negative difference to electrons densitythermal

Also, sets density to the original expression

source
enforce_quasi_neutrality!(dd::IMAS.dd, species::Symbol)
source
IMAS.lump_ions_as_bulk_and_impurityFunction
lump_ions_as_bulk_and_impurity(ions::IMAS.IDSvector{<:IMAS.core_profiles__profiles_1d___ion}, rho_tor_norm::Vector{<:Real})

Changes core_profiles.ion to 2 species, one bulk species (H, D, T) and one combined impurity species

source
IMAS.zeffFunction
zeff(cp1d::IMAS.core_profiles__profiles_1d; temperature_dependent_ionization_state::Bool=true)

Returns plasma effective charge

temperature_dependent_ionization_state evaluates Zeff with average ionization state of an ion at a given temperature

source
IMAS.avgZFunction
avgZ(Z::Float64,Ti::T)::T

Returns average ionization state of an ion at a given temperature

source
IMAS.t_i_averageFunction
t_i_average(cp1d::IMAS.core_profiles__profiles_1d)::Vector{<:Real}

Returns the average ion temperature weighted by each species density over the total number of ion particles

source
Missing docstring.

Missing docstring for IMAS.edge_profile. Check Documenter's build log for details.

IMAS.core_edge_energyFunction
core_edge_energy(cp1d::IMAS.core_profiles__profiles_1d, rho_ped::Real; thermal::Bool=true)

Evaluate stored energy in the core (< rhoped) or the pedestal (> rhoped)

source

Physics radiation

IMAS.radiation_lossesFunction
radiation_losses(sources::IMAS.core_sources)

Evaluate total plasma radiation losses [W] due to bremsstrahlung, synchrotron, and line radiation

source
IMAS.bremsstrahlung_source!Function
bremsstrahlung_source!(dd::IMAS.dd)

Calculates approximate NRL Bremsstrahlung radiation source and modifies dd.core_sources

source
IMAS.rad_syncFunction
rad_sync(ϵ::T, a::T, B0::T, ne::T, Te::T; wall_reflection_coefficient) where {T<:Real}

Synchrotron radiation from Trubnikov, JETP Lett. 16 (1972) 25.0

Transpiled from gacode/tgyro/src/tgyro_rad.f90

See also: Study of heat and synchrotron radiation transport in fusion tokamak plasmas (C. Villar 1997)

source
IMAS.synchrotron_source!Function
synchrotron_source!(dd::IMAS.dd; wall_reflection_coefficient=0.0)

Calculates synchrotron radiation source and modifies dd.core_sources

source
IMAS.adas21Function
adas21(Te, name)

NOTE: Te in [keV] and output is in [erg cm^3 / s]

Chebyshev polynomial fits to ADAS data

  • Transpiled from gacode/tgyro/src/tgyro_rad.f90
  • Lz = Lz_line + Lz_continuum
  • Aurora follows the radiation nomenclature of ADAS (as described here), separating "line" and "continuum" radiation. Line radiation basically comes from ADF11 PLT files and continuum radiation comes from ADF11 PRB files. Bremsstrahlung is included in the continuum term.
  • Supports ["W", "Xe", "Mo", "Kr", "Ni", "Fe", "Ca", "Ar", "Si", "Al", "Ne", "F", "N", "O", "C", "Be", "He", "H", "T", "D", "DT"]
source

Physics sol

IMAS.is_quasi_neutralFunction
is_quasi_neutral(cp1d::IMAS.core_profiles__profiles_1d; rtol::Float64=0.001)

Returns true if quasi neutrality is satisfied within a relative tolerance

source
is_quasi_neutral(dd::IMAS.dd)
source
IMAS.enforce_quasi_neutrality!Function
enforce_quasi_neutrality!(cp1d::IMAS.core_profiles__profiles_1d, species::Symbol)

If species is :electrons then updates electrons.density_thermal to meet quasi neutrality condtion.

If species is a ion species, it evaluates the difference in number of charges needed to reach quasineutrality, and assigns positive difference to target ion densitythermal species and negative difference to electrons densitythermal

Also, sets density to the original expression

source
enforce_quasi_neutrality!(dd::IMAS.dd, species::Symbol)
source
IMAS.lump_ions_as_bulk_and_impurityFunction
lump_ions_as_bulk_and_impurity(ions::IMAS.IDSvector{<:IMAS.core_profiles__profiles_1d___ion}, rho_tor_norm::Vector{<:Real})

Changes core_profiles.ion to 2 species, one bulk species (H, D, T) and one combined impurity species

source
IMAS.zeffFunction
zeff(cp1d::IMAS.core_profiles__profiles_1d; temperature_dependent_ionization_state::Bool=true)

Returns plasma effective charge

temperature_dependent_ionization_state evaluates Zeff with average ionization state of an ion at a given temperature

source
IMAS.avgZFunction
avgZ(Z::Float64,Ti::T)::T

Returns average ionization state of an ion at a given temperature

source
IMAS.t_i_averageFunction
t_i_average(cp1d::IMAS.core_profiles__profiles_1d)::Vector{<:Real}

Returns the average ion temperature weighted by each species density over the total number of ion particles

source
Missing docstring.

Missing docstring for IMAS.edge_profile. Check Documenter's build log for details.

IMAS.core_edge_energyFunction
core_edge_energy(cp1d::IMAS.core_profiles__profiles_1d, rho_ped::Real; thermal::Bool=true)

Evaluate stored energy in the core (< rhoped) or the pedestal (> rhoped)

source

Physics radiation

IMAS.radiation_lossesFunction
radiation_losses(sources::IMAS.core_sources)

Evaluate total plasma radiation losses [W] due to bremsstrahlung, synchrotron, and line radiation

source
IMAS.bremsstrahlung_source!Function
bremsstrahlung_source!(dd::IMAS.dd)

Calculates approximate NRL Bremsstrahlung radiation source and modifies dd.core_sources

source
IMAS.rad_syncFunction
rad_sync(ϵ::T, a::T, B0::T, ne::T, Te::T; wall_reflection_coefficient) where {T<:Real}

Synchrotron radiation from Trubnikov, JETP Lett. 16 (1972) 25.0

Transpiled from gacode/tgyro/src/tgyro_rad.f90

See also: Study of heat and synchrotron radiation transport in fusion tokamak plasmas (C. Villar 1997)

source
IMAS.synchrotron_source!Function
synchrotron_source!(dd::IMAS.dd; wall_reflection_coefficient=0.0)

Calculates synchrotron radiation source and modifies dd.core_sources

source
IMAS.adas21Function
adas21(Te, name)

NOTE: Te in [keV] and output is in [erg cm^3 / s]

Chebyshev polynomial fits to ADAS data

  • Transpiled from gacode/tgyro/src/tgyro_rad.f90
  • Lz = Lz_line + Lz_continuum
  • Aurora follows the radiation nomenclature of ADAS (as described here), separating "line" and "continuum" radiation. Line radiation basically comes from ADF11 PLT files and continuum radiation comes from ADF11 PRB files. Bremsstrahlung is included in the continuum term.
  • Supports ["W", "Xe", "Mo", "Kr", "Ni", "Fe", "Ca", "Ar", "Si", "Al", "Ne", "F", "N", "O", "C", "Be", "He", "H", "T", "D", "DT"]
source

Physics sol

IMAS.OpenFieldLineType
r::Vector{Float64}
 z::Vector{Float64}
 Br::Vector{Float64}
 Bz::Vector{Float64}
@@ -368,7 +368,7 @@
 grazing_angles::Vector{Float64}          # Angle in radiants between B and the wall; grazing angle
 total_flux_expansion::Vector{Float64}    # Total flux expansion
 poloidal_flux_expansion::Vector{Float64} # Poloidal flux expansion
-wall_index::Vector{Int}                  # index in dd.wall where strike points intersect
source
IMAS.solFunction
sol(eqt::IMAS.equilibrium__time_slice, wall_r::AbstractVector{T}, wall_z::AbstractVector{T}; levels::Union{Int,AbstractVector}=20, use_wall::Bool=true) where {T<:Real}

Returns vectors of hfs and lfs OpenFieldLine

If levels is a vector, it has the values of psi from 0 to max psiwallmidplane. The function will modify levels of psi to introduce relevant sol surfaces

source
sol(eqt::IMAS.equilibrium__time_slice, wall::IMAS.wall; levels::Union{Int,AbstractVector}=20, use_wall::Bool=true)
source
sol(dd::IMAS.dd; levels::Union{Int,AbstractVector}=20, use_wall::Bool=true)
source
IMAS.solFunction
sol(eqt::IMAS.equilibrium__time_slice, wall_r::AbstractVector{T}, wall_z::AbstractVector{T}; levels::Union{Int,AbstractVector}=20, use_wall::Bool=true) where {T<:Real}

Returns vectors of hfs and lfs OpenFieldLine

If levels is a vector, it has the values of psi from 0 to max psiwallmidplane. The function will modify levels of psi to introduce relevant sol surfaces

source
sol(eqt::IMAS.equilibrium__time_slice, wall::IMAS.wall; levels::Union{Int,AbstractVector}=20, use_wall::Bool=true)
source
sol(dd::IMAS.dd; levels::Union{Int,AbstractVector}=20, use_wall::Bool=true)
source
IMAS.find_levels_from_PFunction
find_levels_from_P(
     eqt::IMAS.equilibrium__time_slice,
     wall_r::AbstractVector{<:Real},
     wall_z::AbstractVector{<:Real},
@@ -376,19 +376,19 @@
     r::Vector{<:Real},
     q::Vector{<:Real},
     levels::Int
-)

Function for the discretization of the poloidal flux ψ on the SOL, based on an hypotesis of OMP radial transport through arbitrary q(r) returns vector with level of ψ, vector with matching rmidplane and q. Discretization with even steps of P = integralsep^wal 2πrq(r)dr (same power in each flux tube)

source
find_levels_from_P(
+)

Function for the discretization of the poloidal flux ψ on the SOL, based on an hypotesis of OMP radial transport through arbitrary q(r) returns vector with level of ψ, vector with matching rmidplane and q. Discretization with even steps of P = integralsep^wal 2πrq(r)dr (same power in each flux tube)

source
find_levels_from_P(
     eqt::IMAS.equilibrium__time_slice,
     wall::IMAS.wall,
     PSI_interpolant::Interpolations.AbstractInterpolation,
     r::Vector{<:Real},
     q::Vector{<:Real},
     levels::Int
-)
source
find_levels_from_P(dd::IMAS.dd, r::Vector{<:Real}, q::Vector{<:Real}, levels::Int)
source
IMAS.find_levels_from_wallFunction
find_levels_from_wall(
     eqt::IMAS.equilibrium__time_slice,
     wall_r::AbstractVector{<:Real},
     wall_z::AbstractVector{<:Real},
     PSI_interpolant::Interpolations.AbstractInterpolation
-)

Function for that computes the value of psi at the points of the wall mesh in dd

source
find_levels_from_wall(eqt::IMAS.equilibrium__time_slice, wall::IMAS.wall, PSI_interpolant::Interpolations.AbstractInterpolation)
source
find_levels_from_wall(dd::IMAS.dd)
source
IMAS.line_wall_2_wallFunction
line_wall_2_wall(r::AbstractVector{T}, z::AbstractVector{T}, wall_r::AbstractVector{T}, wall_z::AbstractVector{T}, RA::Real, ZA::Real) where {T<:Real}

Returns r, z coordinates of open field line contained within wall, as well as angles of incidence at the strike locations

RA and ZA are the coordinate of the magnetic axis

source
IMAS.identify_strike_surfaceFunction
identify_strike_surface(ofl::OpenFieldLine, divertors::IMAS.divertors)

Returns vector of two tuples with three integers each, identifying the indexes of the divertor/target/tile that the field line intersections

When a field line does not intersect a divertor target, then the tuple returned is (0, 0, 0)

source
IMAS.divertor_totals_from_targetsFunction
divertor_totals_from_targets(divertor::IMAS.divertors__divertor, field::Symbol)

Returns time dependent vectors of :field summed over all divertor targets

source
IMAS.BpolFunction
Bpol(a::T, κ::T, Ip::T) where {T<:Real}

Average poloidal magnetic field magnitude

source
IMAS.Bpol_ompFunction
Bpol_omp(eqt::IMAS.equilibrium__time_slice)

Poloidal magnetic field magnitude evaluated at the outer midplane

source
IMAS.power_solFunction
power_sol(core_sources::IMAS.core_sources, cp1d::IMAS.core_profiles__profiles_1d)

Total power coming out of the SOL [W]

NOTE: This function returns 1.0 [W] if power is less than that so that SOL quantities remain finite

source
power_sol(dd::IMAS.dd)
source
IMAS.widthSOL_loarteFunction
widthSOL_loarte(B0::T, q95::T, Psol::T) where {T<:Real}

Returns midplane power decay length λ_q in meters

source
widthSOL_loarte(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d, core_sources::IMAS.core_sources)
source
widthSOL_loarte(dd::IMAS.dd)
source
IMAS.widthSOL_sieglinFunction
widthSOL_sieglin(R0::T, a::T, Bpol_omp::T, Psol::T, ne_ped::T) where {T<:Real}

Returns integral power decay length λ_int in meters Eich scaling(NF 53 093031) & B. Sieglin PPCF 55 (2013) 124039

source
widthSOL_sieglin(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d, core_sources::IMAS.core_sources)
source
widthSOL_sieglin(dd::IMAS.dd)
source
IMAS.widthSOL_eichFunction
widthSOL_eich(R0::T, a::T, Bpol_omp::T, Psol::T) where {T<:Real}

Returns midplane power decay length λ_q in meters

Eich scaling (NF 53 093031)

source
widthSOL_eich(eqt::IMAS.equilibrium__time_slice, Psol::Real)
source
widthSOL_eich(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d, core_sources::IMAS.core_sources)
source
widthSOL_eich(dd::IMAS.dd)
source
IMAS.q_pol_omp_eichFunction
q_pol_omp_eich(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d, core_sources::IMAS.core_sources)

Poloidal heat flux [W/m²] at the outer midplane based on Eich λ_q

source
q_pol_omp_eich(dd::IMAS.dd)
source
IMAS.q_par_omp_eichFunction
q_par_omp_eich(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d, core_sources::IMAS.core_sources)

Parallel heat flux [W/m²] at the outer midplane based on Eich λ_q

source
q_par_omp_eich(dd::IMAS.dd)
source
Missing docstring.

Missing docstring for IMAS.q_par_omp_eich. Check Documenter's build log for details.

IMAS.find_strike_pointsFunction
find_strike_points(pr::AbstractVector{T1}, pz::AbstractVector{T1}, wall_r::AbstractVector{T2}, wall_z::AbstractVector{T2}) where {T1<:Real, T2<:Real}Real}

Finds strike points and angles of incidence between two paths

source
find_strike_points(
+)

Function for that computes the value of psi at the points of the wall mesh in dd

source
find_levels_from_wall(eqt::IMAS.equilibrium__time_slice, wall::IMAS.wall, PSI_interpolant::Interpolations.AbstractInterpolation)
source
find_levels_from_wall(dd::IMAS.dd)
source
IMAS.line_wall_2_wallFunction
line_wall_2_wall(r::AbstractVector{T}, z::AbstractVector{T}, wall_r::AbstractVector{T}, wall_z::AbstractVector{T}, RA::Real, ZA::Real) where {T<:Real}

Returns r, z coordinates of open field line contained within wall, as well as angles of incidence at the strike locations

RA and ZA are the coordinate of the magnetic axis

source
IMAS.identify_strike_surfaceFunction
identify_strike_surface(ofl::OpenFieldLine, divertors::IMAS.divertors)

Returns vector of two tuples with three integers each, identifying the indexes of the divertor/target/tile that the field line intersections

When a field line does not intersect a divertor target, then the tuple returned is (0, 0, 0)

source
IMAS.divertor_totals_from_targetsFunction
divertor_totals_from_targets(divertor::IMAS.divertors__divertor, field::Symbol)

Returns time dependent vectors of :field summed over all divertor targets

source
IMAS.BpolFunction
Bpol(a::T, κ::T, Ip::T) where {T<:Real}

Average poloidal magnetic field magnitude

source
IMAS.Bpol_ompFunction
Bpol_omp(eqt::IMAS.equilibrium__time_slice)

Poloidal magnetic field magnitude evaluated at the outer midplane

source
IMAS.power_solFunction
power_sol(core_sources::IMAS.core_sources, cp1d::IMAS.core_profiles__profiles_1d)

Total power coming out of the SOL [W]

NOTE: This function returns 1.0 [W] if power is less than that so that SOL quantities remain finite

source
power_sol(dd::IMAS.dd)
source
IMAS.widthSOL_loarteFunction
widthSOL_loarte(B0::T, q95::T, Psol::T) where {T<:Real}

Returns midplane power decay length λ_q in meters

source
widthSOL_loarte(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d, core_sources::IMAS.core_sources)
source
widthSOL_loarte(dd::IMAS.dd)
source
IMAS.widthSOL_sieglinFunction
widthSOL_sieglin(R0::T, a::T, Bpol_omp::T, Psol::T, ne_ped::T) where {T<:Real}

Returns integral power decay length λ_int in meters Eich scaling(NF 53 093031) & B. Sieglin PPCF 55 (2013) 124039

source
widthSOL_sieglin(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d, core_sources::IMAS.core_sources)
source
widthSOL_sieglin(dd::IMAS.dd)
source
IMAS.widthSOL_eichFunction
widthSOL_eich(R0::T, a::T, Bpol_omp::T, Psol::T) where {T<:Real}

Returns midplane power decay length λ_q in meters

Eich scaling (NF 53 093031)

source
widthSOL_eich(eqt::IMAS.equilibrium__time_slice, Psol::Real)
source
widthSOL_eich(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d, core_sources::IMAS.core_sources)
source
widthSOL_eich(dd::IMAS.dd)
source
IMAS.q_pol_omp_eichFunction
q_pol_omp_eich(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d, core_sources::IMAS.core_sources)

Poloidal heat flux [W/m²] at the outer midplane based on Eich λ_q

source
q_pol_omp_eich(dd::IMAS.dd)
source
IMAS.q_par_omp_eichFunction
q_par_omp_eich(eqt::IMAS.equilibrium__time_slice, cp1d::IMAS.core_profiles__profiles_1d, core_sources::IMAS.core_sources)

Parallel heat flux [W/m²] at the outer midplane based on Eich λ_q

source
q_par_omp_eich(dd::IMAS.dd)
source
Missing docstring.

Missing docstring for IMAS.q_par_omp_eich. Check Documenter's build log for details.

IMAS.find_strike_pointsFunction
find_strike_points(pr::AbstractVector{T1}, pz::AbstractVector{T1}, wall_r::AbstractVector{T2}, wall_z::AbstractVector{T2}) where {T1<:Real, T2<:Real}Real}

Finds strike points and angles of incidence between two paths

source
find_strike_points(
     eqt::IMAS.equilibrium__time_slice{T1},
     wall_r::AbstractVector{T2},
     wall_z::AbstractVector{2},
@@ -396,14 +396,14 @@
     strike_surfaces_r::AbstractVector{T4}=wall_r,
     strike_surfaces_z::AbstractVector{T4}=wall_z,
     private_flux_regions::Bool=true
-) where {T1<:Real,T2<:Real,T3<:Real,T4<:Real}

Finds equilibrium strike points and angle of incidence between wall and strike leg

source
find_strike_points(
+) where {T1<:Real,T2<:Real,T3<:Real,T4<:Real}

Finds equilibrium strike points and angle of incidence between wall and strike leg

source
find_strike_points(
     eqt::IMAS.equilibrium__time_slice{T1},
     wall_r::AbstractVector{T2},
     wall_z::AbstractVector{T2},
     psi_first_open::Union{T3,Nothing},
     dv::IMAS.divertors{T1};
     private_flux_regions::Bool=true
-) where {T1<:Real,T2<:Real,T3<:Real}

Return strike points location in the divertors

source
IMAS.find_strike_points!Function
find_strike_points!(
     eqt::IMAS.equilibrium__time_slice{T1},
     wall_r::AbstractVector{T2},
     wall_z::AbstractVector{T2},
@@ -411,17 +411,17 @@
     dv::IMAS.divertors{T1};
     private_flux_regions::Bool=true,
     in_place::Bool=true
-) where {T1<:Real,T2<:Real,T3<:Real}

Adds strike points location to equilibrium IDS and the tiltanglepol in the divertors IDS

source
find_strike_points!(
+) where {T1<:Real,T2<:Real,T3<:Real}

Adds strike points location to equilibrium IDS and the tiltanglepol in the divertors IDS

source
find_strike_points!(
     eqt::IMAS.equilibrium__time_slice{T1},
     wall_r::AbstractVector{T2},
     wall_z::AbstractVector{T2},
     psi_first_open::T3
-) where {T1<:Real,T2<:Real,T3<:Real}
source
find_strike_points!(
+) where {T1<:Real,T2<:Real,T3<:Real}
source
find_strike_points!(
     eqt::IMAS.equilibrium__time_slice{T1},
     wall_r::AbstractVector{T2},
     wall_z::AbstractVector{T2},
     psi_first_open::Nothing
-) where {T1<:Real,T2<:Real}
source

Physics sources

IMAS.fusion_source!Function
fusion_source!(cs::IMAS.core_sources, cp::IMAS.core_profiles; DD_fusion::Bool=false)

Calculates fusion source from D-T and D-D reactions and adds them to dd.core_sources

If D+T plasma, then D+D is neglected

If D+D plasma fusion is included depending on DD_fusion switch

source
fusion_source!(dd::IMAS.dd; DD_fusion::Bool=false)
source
IMAS.ohmic_source!Function
ohmic_source!(dd::IMAS.dd)

Calculates the ohmic source from data in dd.core_profiles and adds it to dd.core_sources

source
IMAS.bootstrap_source!Function
bootstrap_source!(dd::IMAS.dd)

Calculates the bootsrap current source from data in dd.core_profiles and adds it to dd.core_sources

source
IMAS.sources!Function
sources!(dd::IMAS.dd; bootstrap::Bool=true, ohmic::Bool=true, DD_fusion::Bool=false)

Calculates intrisic sources and sinks, and adds them to dd.core_sources

source
IMAS.time_derivative_source!Function
time_derivative_source!(cp1d_new::IMAS.core_profiles__profiles_1d, cp1d_old::IMAS.core_profiles__profiles_1d, Δt::Float64, R_flux_avg::Vector)

Calculates time dependent sources and sinks, and adds them to dd.core_sources

These are the ∂/∂t term in the transport equations.

source
time_derivative_source!(dd::IMAS.dd, cp1d_old::IMAS.core_profiles__profiles_1d, Δt::Float64)
source
IMAS.total_power_sourceFunction
total_power_source(source::IMAS.core_sources__source___profiles_1d)

Returns the total power (electron + ion) for a single source

source
IMAS.total_power_timeFunction
total_power_time(core_sources::IMAS.core_sources, include_indexes::Vector{<:Integer})

Returns tuple of vectors with the total thermal power and time_array for given set of sources selected by identifier.index

source
IMAS.retain_sourceFunction
retain_source(source::IMAS.core_sources__source, all_indexes::Vector{Int}, include_indexes::Vector{Int}, exclude_indexes::Vector{Int})::Bool

Function that decides whether a source should be kept or ignored when totaling sources

source
Missing docstring.

Missing docstring for IMAS.retain_source. Check Documenter's build log for details.

Physics sources

IMAS.fusion_source!Function
fusion_source!(cs::IMAS.core_sources, cp::IMAS.core_profiles; DD_fusion::Bool=false)

Calculates fusion source from D-T and D-D reactions and adds them to dd.core_sources

If D+T plasma, then D+D is neglected

If D+D plasma fusion is included depending on DD_fusion switch

source
fusion_source!(dd::IMAS.dd; DD_fusion::Bool=false)
source
IMAS.ohmic_source!Function
ohmic_source!(dd::IMAS.dd)

Calculates the ohmic source from data in dd.core_profiles and adds it to dd.core_sources

source
IMAS.bootstrap_source!Function
bootstrap_source!(dd::IMAS.dd)

Calculates the bootsrap current source from data in dd.core_profiles and adds it to dd.core_sources

source
IMAS.sources!Function
sources!(dd::IMAS.dd; bootstrap::Bool=true, ohmic::Bool=true, DD_fusion::Bool=false)

Calculates intrisic sources and sinks, and adds them to dd.core_sources

source
IMAS.time_derivative_source!Function
time_derivative_source!(cp1d_new::IMAS.core_profiles__profiles_1d, cp1d_old::IMAS.core_profiles__profiles_1d, Δt::Float64, R_flux_avg::Vector)

Calculates time dependent sources and sinks, and adds them to dd.core_sources

These are the ∂/∂t term in the transport equations.

source
time_derivative_source!(dd::IMAS.dd, cp1d_old::IMAS.core_profiles__profiles_1d, Δt::Float64)
source
IMAS.total_power_sourceFunction
total_power_source(source::IMAS.core_sources__source___profiles_1d)

Returns the total power (electron + ion) for a single source

source
IMAS.total_power_timeFunction
total_power_time(core_sources::IMAS.core_sources, include_indexes::Vector{<:Integer})

Returns tuple of vectors with the total thermal power and time_array for given set of sources selected by identifier.index

source
IMAS.retain_sourceFunction
retain_source(source::IMAS.core_sources__source, all_indexes::Vector{Int}, include_indexes::Vector{Int}, exclude_indexes::Vector{Int})::Bool

Function that decides whether a source should be kept or ignored when totaling sources

source
Missing docstring.

Missing docstring for IMAS.retain_source. Check Documenter's build log for details.

IMAS.new_sourceFunction
new_source(
     source::IMAS.core_sources__source,
     index::Int,
     name::String,
@@ -438,23 +438,23 @@
     current_parallel_inside::Union{AbstractVector,Missing}=missing,
     momentum_tor::Union{AbstractVector,Missing}=missing,
     torque_tor_inside::Union{AbstractVector,Missing}=missing
-)

Populates the IMAS.core_sources__source with given heating, particle, current, momentun profiles

source
IMAS.total_powerFunction
total_power(
+)

Populates the IMAS.core_sources__source with given heating, particle, current, momentun profiles

source
IMAS.total_powerFunction
total_power(
     ps::Union{IMAS.pulse_schedule,IMAS.pulse_schedule__ec,IMAS.pulse_schedule__ic,IMAS.pulse_schedule__lh,IMAS.pulse_schedule__nbi},
     times::AbstractVector{Float64};
-    time_smooth::Float64)

Total injected power interpolated on a given time basis

source

Physics technology

IMAS.coil_technologyFunction
coil_technology(technology::Symbol, coil_type::Symbol)

Return coil parameters from technology and coil type [:oh, :tf, :pf_active]"

source
IMAS.fraction_conductorFunction
fraction_conductor(coil_tech::Union{IMAS.build__pf_active__technology,IMAS.build__oh__technology,IMAS.build__tf__technology})

returns the fraction of (super)conductor in a coil technology

source
IMAS.GAMBL_blanketFunction
GAMBL_blanket(bm::IMAS.blanket__module)

Define layers for the dd.blanket.module for a GAMBL type blanket technology

source

Physics tf

IMAS.tf_rippleFunction
tf_ripple(r, R_tf::Real, N_tf::Integer)

Evaluate fraction of toroidal magnetic field ripple at r [m] generated from N_tf toroidal field coils with outer leg at R_tf [m]

source
IMAS.R_tf_rippleFunction
R_tf_ripple(r, ripple::Real, N_tf::Integer)

Evaluate location of toroidal field coils outer leg R_tf[m] at whichN_tftoroidal field coils generate a given fraction of toroidal magnetic field ripple atr` [m]

source
IMAS.top_view_outlineFunction
top_view_outline(tf::IMAS.build__tf, n::Int=1; cutouts::Bool=false)

returns x,y outline (top view) of the n'th TF coil

source

Physics thermal loads

Physics technology

IMAS.coil_technologyFunction
coil_technology(technology::Symbol, coil_type::Symbol)

Return coil parameters from technology and coil type [:oh, :tf, :pf_active]"

source
IMAS.fraction_conductorFunction
fraction_conductor(coil_tech::Union{IMAS.build__pf_active__technology,IMAS.build__oh__technology,IMAS.build__tf__technology})

returns the fraction of (super)conductor in a coil technology

source
IMAS.GAMBL_blanketFunction
GAMBL_blanket(bm::IMAS.blanket__module)

Define layers for the dd.blanket.module for a GAMBL type blanket technology

source

Physics tf

IMAS.tf_rippleFunction
tf_ripple(r, R_tf::Real, N_tf::Integer)

Evaluate fraction of toroidal magnetic field ripple at r [m] generated from N_tf toroidal field coils with outer leg at R_tf [m]

source
IMAS.R_tf_rippleFunction
R_tf_ripple(r, ripple::Real, N_tf::Integer)

Evaluate location of toroidal field coils outer leg R_tf[m] at whichN_tftoroidal field coils generate a given fraction of toroidal magnetic field ripple atr` [m]

source
IMAS.top_view_outlineFunction
top_view_outline(tf::IMAS.build__tf, n::Int=1; cutouts::Bool=false)

returns x,y outline (top view) of the n'th TF coil

source

Physics thermal loads

IMAS.particle_heat_fluxFunction
particle_heat_flux(
     eqt::IMAS.equilibrium__time_slice,
     SOL::OrderedCollections.OrderedDict{Symbol,Vector{OpenFieldLine}},
     wall_r::AbstractVector{<:Real},
     wall_z::AbstractVector{<:Real},
     r::Vector{<:Real},
     q::Vector{<:Real};
-    merge_wall::Bool=true)

Computes the heat flux on the wall due to the influx of charged particles, using the magnetic equilibrium, the Scrape Off-Layer, the wall, and an hypothesis of the decay of the parallel heat flux at the OMP

source

Physics transport

IMAS.profile_from_z_transportFunction
profile_from_z_transport(
+    merge_wall::Bool=true)

Computes the heat flux on the wall due to the influx of charged particles, using the magnetic equilibrium, the Scrape Off-Layer, the wall, and an hypothesis of the decay of the parallel heat flux at the OMP

source

Physics transport

IMAS.profile_from_z_transportFunction
profile_from_z_transport(
     profile_old::AbstractVector{<:Real},
     rho::AbstractVector{<:Real},
     transport_grid::AbstractVector{<:Real},
     z_transport_grid::AbstractVector{<:Real},
-    rho_ped::Real=0.0)

Updates profileold with the scale lengths given by ztransport_grid

If rho_ped > transport_grid[end] then scale-length is linearly interpolated between transport_grid[end] and rho_ped if rho_ped < transport_grid[end] then scale-length then boundary condition is at transport_grid[end]

source
IMAS.total_fluxesFunction
total_fluxes(
+    rho_ped::Real=0.0)

Updates profileold with the scale lengths given by ztransport_grid

If rho_ped > transport_grid[end] then scale-length is linearly interpolated between transport_grid[end] and rho_ped if rho_ped < transport_grid[end] then scale-length then boundary condition is at transport_grid[end]

source
IMAS.total_fluxesFunction
total_fluxes(
     core_transport::IMAS.core_transport{T},
     cp1d::IMAS.core_profiles__profiles_1d,
     rho_total_fluxes::AbstractVector{<:Real};
-    time0::Float64) where {T<:Real}

Sums up all the fluxes and returns it as a core_transport.model IDS

source
total_fluxes(dd::IMAS.dd, rho_total_fluxes::AbstractVector{<:Real}=dd.core_profiles.profiles_1d[].grid.rho_tor_norm; time0::Float64=dd.global_time)
source

Plot

IMAS.help_plotFunction
help_plot(args...; kw...)

Prints plotting arguments for object that are part of IMAS.

Call help_plot(...) just like you would plot(...)

Returns the plot.

source
IMAS.help_plot!Function
help_plot!(args...; kw...)

Prints plotting arguments for object that are part of IMAS.

Call help_plot!(...) just like you would plot!(...)

Returns the plot.

source

Real

Base.fill!Function
fill!(ids_new::IDS{<:T1}, ids::IDS{<:T2}, field::Symbol) where {T1<:Measurement{<:Real},T2<:Real}

Function used to map fields in IDS{T} to IDS{Measurement{T}}

source
fill!(ids_new::IDS{<:T1}, ids::IDS{<:T2}, field::Symbol) where {T1<:Real,T2<:Measurement{<:Real}}

Function used to map fields in IDS{Measurement{T}} to IDS{T}

source

Signal

IMAS.stepFunction
step(t::Float64)

Unitary step triggered at t=0

source
step(t::Float64, t_start::Float64)

Unitary step triggered at t=t_start

source
IMAS.pulseFunction
pulse(t::Float64)

Unitary pulse with width of 1, starting at t=0

source
pulse(t::Float64, t_start::Float64, Δt::Float64)

Unitary pulse with given width Δt, starting at t=t_start

source
IMAS.rampFunction
ramp(t::Float64)

Unitary ramp from t=0 to t=1

source
ramp(t::Float64, ramp_fraction::Float64)

Unitary ramp

The ramp_fraction defines the fraction of ramp with respect to 1.0 and must be between [0.0,1.0]

NOTE: This function is designed as is to be able to switch between ramp(t, ramp_fraction) and trap(t, ramp_fraction).

source
ramp(t::Float64, t_start::Float64, Δt::Float64)

Unitary ramp of duration Δt, starting at t=t_start

source
IMAS.trapFunction
trap(t::Float64, ramp_fraction::Float64)

Unitary trapezoid

The ramp_fraction defines the fraction of ramp with respect to flattop and must be between [0.0,0.5]

source
trap(t::Float64, t_start::Float64, Δt::Float64, ramp_fraction::Float64)

Unitary trapezoid of duration Δt, starting at t=t_start

The ramp_fraction defines the fraction of ramp with respect to flattop and must be between [0.0,0.5]

source
IMAS.gausFunction
gaus(t::Float64, order::Float64=1.0)

Unitary gaussian

source
gaus(t::Float64, t_start::Float64, Δt::Float64, order::Float64=1.0)

Unitary gaussian centered at t_start and with standard deviation Δt

source
IMAS.betaFunction
beta(t::Float64, mode::Float64)

Unitary beta distribution

The mode [-1.0, 1.0] defines how skewed the distribution is

source
beta(t::Float64, t_start::Float64, Δt::Float64, mode::Float64)

Unitary beta distribution of duration Δt, starting at t=t_start

The mode [-1.0, 1.0] defines how skewed the distribution is

source
IMAS.sequenceFunction
sequence(t::Float64, t_y_sequence::Vector{Tuple{Float64,Float64}}; scheme::Symbol=:linear)

returns interpolated data given a sequence (tuple) of time/value points

source
IMAS.moving_averageFunction
moving_average(data::Vector{<:Real}, window_size::Int)

Calculate the moving average of a data vector using a specified window size. The window size is always rounded up to the closest odd number to maintain symmetry around each data point.

source
moving_average(t::AbstractVector, data::AbstractVector, new_time::AbstractVector; causal::Bool)

Calculate the moving average of a data vector on a new time basis

source
moving_average(time::AbstractVector{Float64}, data::AbstractVector{T}, t0::Float64, width; causal::Bool=false) where {T<:Real}

Calculate the moving average of a data vector at given time with given average width

source
IMAS.highpassfilterFunction
highpassfilter(signals, fs, cutoff, order=4)

Apply butterworth high pass filter of given order to signals sampled with frequency fs

source
IMAS.lowpassfilterFunction
lowpassfilter(signals, fs, cutoff, order=4)

Apply butterworth low pass filter of given order to signals sampled with frequency fs

source

get from

IMAS.get_fromFunction
get_from(dd::IMAS.dd, what::Symbol, from_where::Symbol; time0::Float64=dd.global_time)

IMAS stores the same physical quantities in different IDSs, and get_from() abstracts away the details of which IDS to access, depending on the requested quantity (what) and the specified source (from_where). This is generally useful when coupling different codes/modules/actors.

Supported quantities for what:

  • :ip - Plasma current [A]
    • Possible sources (from_where): :equilibrium, :core_profiles, :pulse_schedule
  • :vacuum_r0_b0- Vacuum magnetic field parameters (major radius r0 [m], toroidal field b0 [T])
    • Possible sources (from_where): :equilibrium, :pulse_schedule
  • :vloop - Loop voltage [V]
    • Possible sources (from_where): :equilibrium, :core_profiles, :pulse_schedule, :controllers__ip
  • :βn - Normalized beta [-]
    • Possible sources (from_where): :equilibrium, :core_profiles
  • :ne_ped - Electron density at the pedestal [m^-3]
    • Possible sources (from_where): :core_profiles, :summary, :pulse_schedule
  • :zeff_ped - Effective charge at the pedestal [-]
    • Possible sources (from_where): :core_profiles, :summary, :pulse_schedule

time0 defines the time point at which to retrieve the value, default is dd.global_time.

Returns the requested physical quantity from the specified location in the IMAS data structure.

source
+ time0::Float64) where {T<:Real}

Sums up all the fluxes and returns it as a core_transport.model IDS

source
total_fluxes(dd::IMAS.dd, rho_total_fluxes::AbstractVector{<:Real}=dd.core_profiles.profiles_1d[].grid.rho_tor_norm; time0::Float64=dd.global_time)
source

Plot

IMAS.help_plotFunction
help_plot(args...; kw...)

Prints plotting arguments for object that are part of IMAS.

Call help_plot(...) just like you would plot(...)

Returns the plot.

source
IMAS.help_plot!Function
help_plot!(args...; kw...)

Prints plotting arguments for object that are part of IMAS.

Call help_plot!(...) just like you would plot!(...)

Returns the plot.

source

Real

Base.fill!Function
fill!(ids_new::IDS{<:T1}, ids::IDS{<:T2}, field::Symbol) where {T1<:Measurement{<:Real},T2<:Real}

Function used to map fields in IDS{T} to IDS{Measurement{T}}

source
fill!(ids_new::IDS{<:T1}, ids::IDS{<:T2}, field::Symbol) where {T1<:Real,T2<:Measurement{<:Real}}

Function used to map fields in IDS{Measurement{T}} to IDS{T}

source

Signal

IMAS.stepFunction
step(t::Float64)

Unitary step triggered at t=0

source
step(t::Float64, t_start::Float64)

Unitary step triggered at t=t_start

source
IMAS.pulseFunction
pulse(t::Float64)

Unitary pulse with width of 1, starting at t=0

source
pulse(t::Float64, t_start::Float64, Δt::Float64)

Unitary pulse with given width Δt, starting at t=t_start

source
IMAS.rampFunction
ramp(t::Float64)

Unitary ramp from t=0 to t=1

source
ramp(t::Float64, ramp_fraction::Float64)

Unitary ramp

The ramp_fraction defines the fraction of ramp with respect to 1.0 and must be between [0.0,1.0]

NOTE: This function is designed as is to be able to switch between ramp(t, ramp_fraction) and trap(t, ramp_fraction).

source
ramp(t::Float64, t_start::Float64, Δt::Float64)

Unitary ramp of duration Δt, starting at t=t_start

source
IMAS.trapFunction
trap(t::Float64, ramp_fraction::Float64)

Unitary trapezoid

The ramp_fraction defines the fraction of ramp with respect to flattop and must be between [0.0,0.5]

source
trap(t::Float64, t_start::Float64, Δt::Float64, ramp_fraction::Float64)

Unitary trapezoid of duration Δt, starting at t=t_start

The ramp_fraction defines the fraction of ramp with respect to flattop and must be between [0.0,0.5]

source
IMAS.gausFunction
gaus(t::Float64, order::Float64=1.0)

Unitary gaussian

source
gaus(t::Float64, t_start::Float64, Δt::Float64, order::Float64=1.0)

Unitary gaussian centered at t_start and with standard deviation Δt

source
IMAS.betaFunction
beta(t::Float64, mode::Float64)

Unitary beta distribution

The mode [-1.0, 1.0] defines how skewed the distribution is

source
beta(t::Float64, t_start::Float64, Δt::Float64, mode::Float64)

Unitary beta distribution of duration Δt, starting at t=t_start

The mode [-1.0, 1.0] defines how skewed the distribution is

source
IMAS.sequenceFunction
sequence(t::Float64, t_y_sequence::Vector{Tuple{Float64,Float64}}; scheme::Symbol=:linear)

returns interpolated data given a sequence (tuple) of time/value points

source
IMAS.moving_averageFunction
moving_average(data::Vector{<:Real}, window_size::Int)

Calculate the moving average of a data vector using a specified window size. The window size is always rounded up to the closest odd number to maintain symmetry around each data point.

source
moving_average(t::AbstractVector, data::AbstractVector, new_time::AbstractVector; causal::Bool)

Calculate the moving average of a data vector on a new time basis

source
moving_average(time::AbstractVector{Float64}, data::AbstractVector{T}, t0::Float64, width; causal::Bool=false) where {T<:Real}

Calculate the moving average of a data vector at given time with given average width

source
IMAS.highpassfilterFunction
highpassfilter(signals, fs, cutoff, order=4)

Apply butterworth high pass filter of given order to signals sampled with frequency fs

source
IMAS.lowpassfilterFunction
lowpassfilter(signals, fs, cutoff, order=4)

Apply butterworth low pass filter of given order to signals sampled with frequency fs

source

get from

IMAS.get_fromFunction
get_from(dd::IMAS.dd, what::Symbol, from_where::Symbol; time0::Float64=dd.global_time)

IMAS stores the same physical quantities in different IDSs, and get_from() abstracts away the details of which IDS to access, depending on the requested quantity (what) and the specified source (from_where). This is generally useful when coupling different codes/modules/actors.

Supported quantities for what:

  • :ip - Plasma current [A]
    • Possible sources (from_where): :equilibrium, :core_profiles, :pulse_schedule
  • :vacuum_r0_b0- Vacuum magnetic field parameters (major radius r0 [m], toroidal field b0 [T])
    • Possible sources (from_where): :equilibrium, :pulse_schedule
  • :vloop - Loop voltage [V]
    • Possible sources (from_where): :equilibrium, :core_profiles, :pulse_schedule, :controllers__ip
  • :βn - Normalized beta [-]
    • Possible sources (from_where): :equilibrium, :core_profiles
  • :ne_ped - Electron density at the pedestal [m^-3]
    • Possible sources (from_where): :core_profiles, :summary, :pulse_schedule
  • :zeff_ped - Effective charge at the pedestal [-]
    • Possible sources (from_where): :core_profiles, :summary, :pulse_schedule

time0 defines the time point at which to retrieve the value, default is dd.global_time.

Returns the requested physical quantity from the specified location in the IMAS data structure.

source
diff --git a/dev/expressions/index.html b/dev/expressions/index.html index a073c6cb..47407738 100644 --- a/dev/expressions/index.html +++ b/dev/expressions/index.html @@ -3,4 +3,4 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-65D8V8C8VQ', {'page_path': location.pathname + location.search + location.hash}); -

Expressions

IMAS.onetime_expressionsConstant
onetime_expressions = Dict{String,Function}()

Expressions that are frozen after first evaluation

  • core_profiles.profiles_1d[:].grid.area
  • core_profiles.profiles_1d[:].grid.psi
  • core_profiles.profiles_1d[:].grid.psi_norm
  • core_profiles.profiles_1d[:].grid.surface
  • core_profiles.profiles_1d[:].grid.volume
  • core_sources.source[:].profiles_1d[:].grid.area
  • core_sources.source[:].profiles_1d[:].grid.psi
  • core_sources.source[:].profiles_1d[:].grid.psi_norm
  • core_sources.source[:].profiles_1d[:].grid.surface
  • core_sources.source[:].profiles_1d[:].grid.volume
  • core_transport.model[:].profiles_1d[:].grid_d.rho_tor_norm
  • core_transport.model[:].profiles_1d[:].grid_flux.area
  • core_transport.model[:].profiles_1d[:].grid_flux.psi
  • core_transport.model[:].profiles_1d[:].grid_flux.psi_norm
  • core_transport.model[:].profiles_1d[:].grid_flux.rho_tor_norm
  • core_transport.model[:].profiles_1d[:].grid_flux.surface
  • core_transport.model[:].profiles_1d[:].grid_flux.volume
source
IMAS.dynamic_expressionsConstant
dynamic_expressions = Dict{String,Function}()

Expressions

  • balance_of_plant.Q_plant
  • balance_of_plant.power_electric_net
  • balance_of_plant.power_electric_plant_operation.total_power
  • build.layer[:].area
  • build.layer[:].end_radius
  • build.layer[:].identifier
  • build.layer[:].outline.r
  • build.layer[:].outline.z
  • build.layer[:].shape
  • build.layer[:].shape_parameters
  • build.layer[:].start_radius
  • build.layer[:].volume
  • build.tf.ripple
  • build.tf.wedge_thickness
  • core_profiles.global_quantities.beta_tor_norm
  • core_profiles.global_quantities.current_bootstrap
  • core_profiles.global_quantities.current_non_inductive
  • core_profiles.global_quantities.current_ohmic
  • core_profiles.global_quantities.ip
  • core_profiles.global_quantities.v_loop
  • core_profiles.profiles_1d[:].conductivity_parallel
  • core_profiles.profiles_1d[:].electrons.density
  • core_profiles.profiles_1d[:].electrons.density_fast
  • core_profiles.profiles_1d[:].electrons.pressure
  • core_profiles.profiles_1d[:].electrons.pressure_fast_parallel
  • core_profiles.profiles_1d[:].electrons.pressure_fast_perpendicular
  • core_profiles.profiles_1d[:].electrons.pressure_thermal
  • core_profiles.profiles_1d[:].ion[:].density
  • core_profiles.profiles_1d[:].ion[:].density_fast
  • core_profiles.profiles_1d[:].ion[:].density_thermal
  • core_profiles.profiles_1d[:].ion[:].pressure
  • core_profiles.profiles_1d[:].ion[:].pressure_fast_parallel
  • core_profiles.profiles_1d[:].ion[:].pressure_fast_perpendicular
  • core_profiles.profiles_1d[:].ion[:].pressure_thermal
  • core_profiles.profiles_1d[:].ion[:].z_ion
  • core_profiles.profiles_1d[:].j_bootstrap
  • core_profiles.profiles_1d[:].j_non_inductive
  • core_profiles.profiles_1d[:].j_ohmic
  • core_profiles.profiles_1d[:].j_tor
  • core_profiles.profiles_1d[:].j_total
  • core_profiles.profiles_1d[:].pressure
  • core_profiles.profiles_1d[:].pressure_ion_total
  • core_profiles.profiles_1d[:].pressure_parallel
  • core_profiles.profiles_1d[:].pressure_perpendicular
  • core_profiles.profiles_1d[:].pressure_thermal
  • core_profiles.profiles_1d[:].t_i_average
  • core_profiles.profiles_1d[:].time
  • core_profiles.profiles_1d[:].zeff
  • core_sources.source[:].profiles_1d[:].current_parallel_inside
  • core_sources.source[:].profiles_1d[:].electrons.energy
  • core_sources.source[:].profiles_1d[:].electrons.particles
  • core_sources.source[:].profiles_1d[:].electrons.particles_inside
  • core_sources.source[:].profiles_1d[:].electrons.power_inside
  • core_sources.source[:].profiles_1d[:].ion[:].particles
  • core_sources.source[:].profiles_1d[:].ion[:].particles_inside
  • core_sources.source[:].profiles_1d[:].j_parallel
  • core_sources.source[:].profiles_1d[:].momentum_tor
  • core_sources.source[:].profiles_1d[:].time
  • core_sources.source[:].profiles_1d[:].torque_tor_inside
  • core_sources.source[:].profiles_1d[:].total_ion_energy
  • core_sources.source[:].profiles_1d[:].total_ion_power_inside
  • core_transport.model[:].profiles_1d[:].time
  • costing.cost_decommissioning.cost
  • costing.cost_decommissioning.system[:].cost
  • costing.cost_direct_capital.cost
  • costing.cost_direct_capital.system[:].cost
  • costing.cost_operations.system[:].yearly_cost
  • costing.cost_operations.yearly_cost
  • divertors.divertor[:].power_black_body.data
  • divertors.divertor[:].power_black_body.time
  • divertors.divertor[:].power_conducted.data
  • divertors.divertor[:].power_conducted.time
  • divertors.divertor[:].power_convected.data
  • divertors.divertor[:].power_convected.time
  • divertors.divertor[:].power_currents.data
  • divertors.divertor[:].power_currents.time
  • divertors.divertor[:].power_incident.data
  • divertors.divertor[:].power_incident.time
  • divertors.divertor[:].power_neutrals.data
  • divertors.divertor[:].power_radiated.data
  • divertors.divertor[:].power_radiated.time
  • divertors.divertor[:].power_recombination_neutrals.data
  • divertors.divertor[:].power_recombination_neutrals.time
  • divertors.divertor[:].power_recombination_plasma.data
  • divertors.divertor[:].power_recombination_plasma.time
  • equilibrium.time_slice[:].boundary.elongation
  • equilibrium.time_slice[:].boundary.elongation_lower
  • equilibrium.time_slice[:].boundary.elongation_upper
  • equilibrium.time_slice[:].boundary.geometric_axis.r
  • equilibrium.time_slice[:].boundary.geometric_axis.z
  • equilibrium.time_slice[:].boundary.minor_radius
  • equilibrium.time_slice[:].boundary.squareness
  • equilibrium.time_slice[:].boundary.squareness_lower_inner
  • equilibrium.time_slice[:].boundary.squareness_lower_outer
  • equilibrium.time_slice[:].boundary.squareness_upper_inner
  • equilibrium.time_slice[:].boundary.squareness_upper_outer
  • equilibrium.time_slice[:].boundary.triangularity
  • equilibrium.time_slice[:].boundary.triangularity_lower
  • equilibrium.time_slice[:].boundary.triangularity_upper
  • equilibrium.time_slice[:].global_quantities.energy_mhd
  • equilibrium.time_slice[:].global_quantities.magnetic_axis.b_field_tor
  • equilibrium.time_slice[:].global_quantities.magnetic_axis.r
  • equilibrium.time_slice[:].global_quantities.magnetic_axis.z
  • equilibrium.time_slice[:].global_quantities.psi_axis
  • equilibrium.time_slice[:].global_quantities.psi_boundary
  • equilibrium.time_slice[:].global_quantities.q_95
  • equilibrium.time_slice[:].global_quantities.q_axis
  • equilibrium.time_slice[:].global_quantities.q_min
  • equilibrium.time_slice[:].global_quantities.vacuum_toroidal_field.b0
  • equilibrium.time_slice[:].global_quantities.vacuum_toroidal_field.r0
  • equilibrium.time_slice[:].profiles_1d.darea_dpsi
  • equilibrium.time_slice[:].profiles_1d.darea_drho_tor
  • equilibrium.time_slice[:].profiles_1d.dpressure_dpsi
  • equilibrium.time_slice[:].profiles_1d.dpsi_drho_tor
  • equilibrium.time_slice[:].profiles_1d.dvolume_dpsi
  • equilibrium.time_slice[:].profiles_1d.dvolume_drho_tor
  • equilibrium.time_slice[:].profiles_1d.f_df_dpsi
  • equilibrium.time_slice[:].profiles_1d.geometric_axis.r
  • equilibrium.time_slice[:].profiles_1d.geometric_axis.z
  • equilibrium.time_slice[:].profiles_1d.j_parallel
  • equilibrium.time_slice[:].profiles_1d.j_tor
  • equilibrium.time_slice[:].profiles_1d.psi_norm
  • equilibrium.time_slice[:].profiles_2d[:].b_field_r
  • equilibrium.time_slice[:].profiles_2d[:].b_field_tor
  • equilibrium.time_slice[:].profiles_2d[:].b_field_z
  • equilibrium.time_slice[:].profiles_2d[:].j_tor
  • equilibrium.time_slice[:].profiles_2d[:].r
  • equilibrium.time_slice[:].profiles_2d[:].z
  • equilibrium.time_slice[:].time
  • limits.all_cleared
  • limits.model[:].cleared
  • pulse_schedule.tf.b_field_tor_vacuum.reference
  • pulse_schedule.tf.b_field_tor_vacuum_r.reference
  • pulse_schedule.tf.r0
  • pulse_schedule.tf.time
  • pulse_schedule.time
  • summary.fusion.power.value
  • summary.global_quantities.beta_pol_mhd.value
  • summary.global_quantities.beta_tor.value
  • summary.global_quantities.beta_tor_mhd.value
  • summary.global_quantities.beta_tor_norm.value
  • summary.global_quantities.beta_tor_norm_mhd.value
  • summary.global_quantities.beta_tor_thermal_norm.value
  • summary.global_quantities.current_bootstrap.value
  • summary.global_quantities.current_non_inductive.value
  • summary.global_quantities.current_ohm.value
  • summary.global_quantities.energy_thermal.value
  • summary.global_quantities.h_98.value
  • summary.global_quantities.ip.value
  • summary.global_quantities.tau_energy.value
  • summary.global_quantities.tau_energy_98.value
  • summary.heating_current_drive.power_launched_ec.value
  • summary.heating_current_drive.power_launched_ic.value
  • summary.heating_current_drive.power_launched_lh.value
  • summary.heating_current_drive.power_launched_nbi.value
  • summary.heating_current_drive.power_launched_total.value
  • summary.local.magnetic_axis.n_e.value
  • summary.local.magnetic_axis.t_e.value
  • summary.local.magnetic_axis.t_i_average.value
  • summary.local.magnetic_axis.zeff.value
  • summary.local.separatrix.n_e.value
  • summary.local.separatrix.t_e.value
  • summary.local.separatrix.t_i_average.value
  • summary.local.separatrix.zeff.value
  • summary.volume_average.n_e.value
  • summary.volume_average.t_e.value
  • summary.volume_average.t_i_average.value
  • summary.volume_average.zeff.value
source
+

Expressions

IMAS.onetime_expressionsConstant
onetime_expressions = Dict{String,Function}()

Expressions that are frozen after first evaluation

  • core_profiles.profiles_1d[:].grid.area
  • core_profiles.profiles_1d[:].grid.psi
  • core_profiles.profiles_1d[:].grid.psi_norm
  • core_profiles.profiles_1d[:].grid.surface
  • core_profiles.profiles_1d[:].grid.volume
  • core_sources.source[:].profiles_1d[:].grid.area
  • core_sources.source[:].profiles_1d[:].grid.psi
  • core_sources.source[:].profiles_1d[:].grid.psi_norm
  • core_sources.source[:].profiles_1d[:].grid.surface
  • core_sources.source[:].profiles_1d[:].grid.volume
  • core_transport.model[:].profiles_1d[:].grid_d.rho_tor_norm
  • core_transport.model[:].profiles_1d[:].grid_flux.area
  • core_transport.model[:].profiles_1d[:].grid_flux.psi
  • core_transport.model[:].profiles_1d[:].grid_flux.psi_norm
  • core_transport.model[:].profiles_1d[:].grid_flux.rho_tor_norm
  • core_transport.model[:].profiles_1d[:].grid_flux.surface
  • core_transport.model[:].profiles_1d[:].grid_flux.volume
source
IMAS.dynamic_expressionsConstant
dynamic_expressions = Dict{String,Function}()

Expressions

  • balance_of_plant.Q_plant
  • balance_of_plant.power_electric_net
  • balance_of_plant.power_electric_plant_operation.total_power
  • build.layer[:].area
  • build.layer[:].end_radius
  • build.layer[:].identifier
  • build.layer[:].outline.r
  • build.layer[:].outline.z
  • build.layer[:].shape
  • build.layer[:].shape_parameters
  • build.layer[:].start_radius
  • build.layer[:].volume
  • build.tf.ripple
  • build.tf.wedge_thickness
  • core_profiles.global_quantities.beta_tor_norm
  • core_profiles.global_quantities.current_bootstrap
  • core_profiles.global_quantities.current_non_inductive
  • core_profiles.global_quantities.current_ohmic
  • core_profiles.global_quantities.ip
  • core_profiles.global_quantities.v_loop
  • core_profiles.profiles_1d[:].conductivity_parallel
  • core_profiles.profiles_1d[:].electrons.density
  • core_profiles.profiles_1d[:].electrons.density_fast
  • core_profiles.profiles_1d[:].electrons.pressure
  • core_profiles.profiles_1d[:].electrons.pressure_fast_parallel
  • core_profiles.profiles_1d[:].electrons.pressure_fast_perpendicular
  • core_profiles.profiles_1d[:].electrons.pressure_thermal
  • core_profiles.profiles_1d[:].ion[:].density
  • core_profiles.profiles_1d[:].ion[:].density_fast
  • core_profiles.profiles_1d[:].ion[:].density_thermal
  • core_profiles.profiles_1d[:].ion[:].pressure
  • core_profiles.profiles_1d[:].ion[:].pressure_fast_parallel
  • core_profiles.profiles_1d[:].ion[:].pressure_fast_perpendicular
  • core_profiles.profiles_1d[:].ion[:].pressure_thermal
  • core_profiles.profiles_1d[:].ion[:].z_ion
  • core_profiles.profiles_1d[:].j_bootstrap
  • core_profiles.profiles_1d[:].j_non_inductive
  • core_profiles.profiles_1d[:].j_ohmic
  • core_profiles.profiles_1d[:].j_tor
  • core_profiles.profiles_1d[:].j_total
  • core_profiles.profiles_1d[:].pressure
  • core_profiles.profiles_1d[:].pressure_ion_total
  • core_profiles.profiles_1d[:].pressure_parallel
  • core_profiles.profiles_1d[:].pressure_perpendicular
  • core_profiles.profiles_1d[:].pressure_thermal
  • core_profiles.profiles_1d[:].t_i_average
  • core_profiles.profiles_1d[:].time
  • core_profiles.profiles_1d[:].zeff
  • core_sources.source[:].profiles_1d[:].current_parallel_inside
  • core_sources.source[:].profiles_1d[:].electrons.energy
  • core_sources.source[:].profiles_1d[:].electrons.particles
  • core_sources.source[:].profiles_1d[:].electrons.particles_inside
  • core_sources.source[:].profiles_1d[:].electrons.power_inside
  • core_sources.source[:].profiles_1d[:].ion[:].particles
  • core_sources.source[:].profiles_1d[:].ion[:].particles_inside
  • core_sources.source[:].profiles_1d[:].j_parallel
  • core_sources.source[:].profiles_1d[:].momentum_tor
  • core_sources.source[:].profiles_1d[:].time
  • core_sources.source[:].profiles_1d[:].torque_tor_inside
  • core_sources.source[:].profiles_1d[:].total_ion_energy
  • core_sources.source[:].profiles_1d[:].total_ion_power_inside
  • core_transport.model[:].profiles_1d[:].time
  • costing.cost_decommissioning.cost
  • costing.cost_decommissioning.system[:].cost
  • costing.cost_direct_capital.cost
  • costing.cost_direct_capital.system[:].cost
  • costing.cost_operations.system[:].yearly_cost
  • costing.cost_operations.yearly_cost
  • divertors.divertor[:].power_black_body.data
  • divertors.divertor[:].power_black_body.time
  • divertors.divertor[:].power_conducted.data
  • divertors.divertor[:].power_conducted.time
  • divertors.divertor[:].power_convected.data
  • divertors.divertor[:].power_convected.time
  • divertors.divertor[:].power_currents.data
  • divertors.divertor[:].power_currents.time
  • divertors.divertor[:].power_incident.data
  • divertors.divertor[:].power_incident.time
  • divertors.divertor[:].power_neutrals.data
  • divertors.divertor[:].power_radiated.data
  • divertors.divertor[:].power_radiated.time
  • divertors.divertor[:].power_recombination_neutrals.data
  • divertors.divertor[:].power_recombination_neutrals.time
  • divertors.divertor[:].power_recombination_plasma.data
  • divertors.divertor[:].power_recombination_plasma.time
  • equilibrium.time_slice[:].boundary.elongation
  • equilibrium.time_slice[:].boundary.elongation_lower
  • equilibrium.time_slice[:].boundary.elongation_upper
  • equilibrium.time_slice[:].boundary.geometric_axis.r
  • equilibrium.time_slice[:].boundary.geometric_axis.z
  • equilibrium.time_slice[:].boundary.minor_radius
  • equilibrium.time_slice[:].boundary.squareness
  • equilibrium.time_slice[:].boundary.squareness_lower_inner
  • equilibrium.time_slice[:].boundary.squareness_lower_outer
  • equilibrium.time_slice[:].boundary.squareness_upper_inner
  • equilibrium.time_slice[:].boundary.squareness_upper_outer
  • equilibrium.time_slice[:].boundary.triangularity
  • equilibrium.time_slice[:].boundary.triangularity_lower
  • equilibrium.time_slice[:].boundary.triangularity_upper
  • equilibrium.time_slice[:].global_quantities.energy_mhd
  • equilibrium.time_slice[:].global_quantities.magnetic_axis.b_field_tor
  • equilibrium.time_slice[:].global_quantities.magnetic_axis.r
  • equilibrium.time_slice[:].global_quantities.magnetic_axis.z
  • equilibrium.time_slice[:].global_quantities.psi_axis
  • equilibrium.time_slice[:].global_quantities.psi_boundary
  • equilibrium.time_slice[:].global_quantities.q_95
  • equilibrium.time_slice[:].global_quantities.q_axis
  • equilibrium.time_slice[:].global_quantities.q_min
  • equilibrium.time_slice[:].global_quantities.vacuum_toroidal_field.b0
  • equilibrium.time_slice[:].global_quantities.vacuum_toroidal_field.r0
  • equilibrium.time_slice[:].profiles_1d.darea_dpsi
  • equilibrium.time_slice[:].profiles_1d.darea_drho_tor
  • equilibrium.time_slice[:].profiles_1d.dpressure_dpsi
  • equilibrium.time_slice[:].profiles_1d.dpsi_drho_tor
  • equilibrium.time_slice[:].profiles_1d.dvolume_dpsi
  • equilibrium.time_slice[:].profiles_1d.dvolume_drho_tor
  • equilibrium.time_slice[:].profiles_1d.f_df_dpsi
  • equilibrium.time_slice[:].profiles_1d.geometric_axis.r
  • equilibrium.time_slice[:].profiles_1d.geometric_axis.z
  • equilibrium.time_slice[:].profiles_1d.j_parallel
  • equilibrium.time_slice[:].profiles_1d.j_tor
  • equilibrium.time_slice[:].profiles_1d.psi_norm
  • equilibrium.time_slice[:].profiles_2d[:].b_field_r
  • equilibrium.time_slice[:].profiles_2d[:].b_field_tor
  • equilibrium.time_slice[:].profiles_2d[:].b_field_z
  • equilibrium.time_slice[:].profiles_2d[:].j_tor
  • equilibrium.time_slice[:].profiles_2d[:].r
  • equilibrium.time_slice[:].profiles_2d[:].z
  • equilibrium.time_slice[:].time
  • limits.all_cleared
  • limits.model[:].cleared
  • pulse_schedule.tf.b_field_tor_vacuum.reference
  • pulse_schedule.tf.b_field_tor_vacuum_r.reference
  • pulse_schedule.tf.r0
  • pulse_schedule.tf.time
  • pulse_schedule.time
  • summary.fusion.power.value
  • summary.global_quantities.beta_pol_mhd.value
  • summary.global_quantities.beta_tor.value
  • summary.global_quantities.beta_tor_mhd.value
  • summary.global_quantities.beta_tor_norm.value
  • summary.global_quantities.beta_tor_norm_mhd.value
  • summary.global_quantities.beta_tor_thermal_norm.value
  • summary.global_quantities.current_bootstrap.value
  • summary.global_quantities.current_non_inductive.value
  • summary.global_quantities.current_ohm.value
  • summary.global_quantities.energy_thermal.value
  • summary.global_quantities.h_98.value
  • summary.global_quantities.ip.value
  • summary.global_quantities.tau_energy.value
  • summary.global_quantities.tau_energy_98.value
  • summary.heating_current_drive.power_launched_ec.value
  • summary.heating_current_drive.power_launched_ic.value
  • summary.heating_current_drive.power_launched_lh.value
  • summary.heating_current_drive.power_launched_nbi.value
  • summary.heating_current_drive.power_launched_total.value
  • summary.local.magnetic_axis.n_e.value
  • summary.local.magnetic_axis.t_e.value
  • summary.local.magnetic_axis.t_i_average.value
  • summary.local.magnetic_axis.zeff.value
  • summary.local.separatrix.n_e.value
  • summary.local.separatrix.t_e.value
  • summary.local.separatrix.t_i_average.value
  • summary.local.separatrix.zeff.value
  • summary.volume_average.n_e.value
  • summary.volume_average.t_e.value
  • summary.volume_average.t_i_average.value
  • summary.volume_average.zeff.value
source
diff --git a/dev/index.html b/dev/index.html index ed18180f..9cdb3ddd 100644 --- a/dev/index.html +++ b/dev/index.html @@ -3,4 +3,4 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-65D8V8C8VQ', {'page_path': location.pathname + location.search + location.hash}); -

IMAS.jl

Physics and math routines

IMAS.jl incorporates a comprehensive set of mathematical, physics, and engineering routines. This eliminates the need for individual packages to re-implement these routines.

Dynamic expressions

IMAS.jl implements the dynamic expressions that ensure consistency and provides an elegant solution to the mismatching-interfaces problem, where preceding models might not furnish all the derived data needed by subsequent models. See under IMAS/src/expressions/.

Plotting

IMAS.jl makes use of Julia's Plots.jl and uses multiple dispatching mechanism to provide contextual (and composable) plotting capabilities throughout the data structure.

Online documentation

For more details, see the online documentation.

Docs

+

IMAS.jl

Physics and math routines

IMAS.jl incorporates a comprehensive set of mathematical, physics, and engineering routines. This eliminates the need for individual packages to re-implement these routines.

Dynamic expressions

IMAS.jl implements the dynamic expressions that ensure consistency and provides an elegant solution to the mismatching-interfaces problem, where preceding models might not furnish all the derived data needed by subsequent models. See under IMAS/src/expressions/.

Plotting

IMAS.jl makes use of Julia's Plots.jl and uses multiple dispatching mechanism to provide contextual (and composable) plotting capabilities throughout the data structure.

Online documentation

For more details, see the online documentation.

Docs

diff --git a/dev/license/index.html b/dev/license/index.html index 94e519b7..8b97cd2d 100644 --- a/dev/license/index.html +++ b/dev/license/index.html @@ -12,4 +12,4 @@ comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier - identification within third-party archives.

Copyright 2024 General Atomics

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

+ identification within third-party archives.

Copyright 2024 General Atomics

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

diff --git a/dev/notice/index.html b/dev/notice/index.html index 9b89a38d..38a4756a 100644 --- a/dev/notice/index.html +++ b/dev/notice/index.html @@ -9,4 +9,4 @@ journal = {arXiv}, title = {{FUSE (Fusion Synthesis Engine): A Next Generation Framework for Integrated Design of Fusion Pilot Plants}}, year = {2024} -}

Trademark Notice

The names "General Atomics", and any associated logos or images, are trademarks of General Atomics. Use of these trademarks without prior written consent from General Atomics is strictly prohibited. Users cannot imply endorsement by General Atomics or contributors to the project simply because the project is part of their work.

Copyright (c) 2024 General Atomics

Version

Version: v2.1

+}

Trademark Notice

The names "General Atomics", and any associated logos or images, are trademarks of General Atomics. Use of these trademarks without prior written consent from General Atomics is strictly prohibited. Users cannot imply endorsement by General Atomics or contributors to the project simply because the project is part of their work.

Copyright (c) 2024 General Atomics

Version

Version: v2.1