The Open FUSION Toolkit 26.6
An open-source framework for fusion and plasma science and engineering
Loading...
Searching...
No Matches
TokaMaker_TORAX Class Reference

Detailed Description

TokaMaker + TORAX Coupled Pulse Simulation Code.

Public Member Functions

 __init__ (self, t_init, t_final, eqtimes, g_eqdsk_arr, tokamaker_obj, tx_dt=0.1, tm_times=None, last_surface_factor=0.99, truncate_eq=False)
 Initialize the Coupled TokaMaker + TORAX object.
 configure_redirect_to_log (self)
 Step 3/3 of setup to divert noisy outputs to log file.
 fly (self, run_name='tmp', convergence_threshold=-1.0, max_loop=3, output_mode=False, skip_bad_init_eqdsks=False, initial_relax=True, relax=False, relax_kinetics=False, relax_duration=0.1, t_ave_toggle='off', t_ave_window=0.5, t_ave_causal=True, t_ave_ignore_start=0.25, loop0=False, steady_state_mode=False)
 Run TokaMaker_TORAX coupled pulse design loop.
 get_final_timepoint_results (self, eqdsk_save_dir=None)
 Profiles and scalars at the last TokaMaker timepoint of the last completed coupling loop.
 load_pedestal_config (self, pedestal_config)
 Load pedestal config dict and fully replace 'pedestal' in TORAX config.
 load_TORAX_config (self, config)
 Load a TORAX config dict.
 make_movie (self, save_path=None, **kwargs)
 Generate pulse movie from stored psi snapshots.
 plot_coils (self, save_path=None, display=True, **kwargs)
 Plot coil current traces over the pulse.
 plot_lcfs_evolution (self, save_path=None, display=True, one_plot=False, **kwargs)
 Plot time evolution of the LCFS for each pulse phase (rampup, flattop, rampdown).
 plot_profile_evolution (self, save_path=None, display=True, one_plot=False, **kwargs)
 Plot profile evolution over time.
 plot_profiles (self, **kwargs)
 Interactive profile viewer (ipywidgets slider in Jupyter, static otherwise).
 plot_scalars (self, save_path=None, display=True, **kwargs)
 Plot scalar time traces (Ip, Q, Te, ne, power channels, etc.).
 save_res (self)
 Save simulation results to JSON.
 save_state (self, fname)
 Save intermediate simulation state to JSON.
 set_evolve (self, density=True, Ti=True, Te=True, current=True)
 Set variables as either prescribed (False) or evolved (True) for TORAX.
 set_fueling (self, gas_puff_S_total=None, gas_puff_decay_length=None, pellet_deposition_location=None, pellet_width=None, pellet_S_total=None, generic_particle_location=None, generic_particle_width=None, generic_particle_S_total=None)
 Set gas puff and pellet fueling particle sources for TORAX.
 set_heating (self, generic_heat=None, generic_heat_loc=None, generic_heat_width=0.25, nbi_current=False, ecrh=None, ecrh_loc=None, ecrh_width=0.1, ohmic=None, fusion=True, ei_exchange=True)
 Set TORAX heating and source toggles.
 set_Ip (self, Ip)
 Set plasma current (Amps), used for both codes and not evolved by either.
 set_ne (self, n_e, right_bc=None)
 Set electron density profiles and optional right boundary condition.
 set_pedestal (self, set_pedestal=False, T_i_ped=None, T_e_ped=None, n_e_ped=None, ped_top=0.90)
 Set pedestals for ion/electron temperatures and density (legacy API).
 set_plasma_composition (self, Zeff=None, main_ion=None, impurity=None)
 Set plasma effective charge and composition.
 set_Te (self, T_e, right_bc=None)
 Set electron temperature profiles and optional right boundary condition.
 set_Ti (self, T_i, right_bc=None)
 Set ion temperature profiles and optional right boundary condition.
 set_TokaMaker_coil_reg (self, coil_bounds=None, updownsym=False, default_weight=1.0E-1, disable_coils=None, disable_weight=1.0E4, symmetry_weight=1.0E3, disable_virtual_vsc=True, vsc_weight=1.0E4)
 Set coil regularization using the dict-based TokaMaker reg_terms API.
 set_TORAX_grid (self, grid_type, grid)
 Set TORAX grid type and grid points.
 set_transport_coefs (self, chi_min=None, chi_max=None, De_min=None, De_max=None, Ve_min=None, Ve_max=None)
 Set transport coefficient bounds for TORAX.
 set_x_points (self, diverted_times=None, x_point_targets=None, x_point_weight=100.0, strike_point_targets=None)
 Configure diverted window, X-point targets, and optional strike points.
 summary (self, **kwargs)
 Print/display a physics summary of the simulation.

Public Attributes

 lcfs = lcfs
 results = None
 Access simulation results dict.
 state = None
 Access simulation state dict.

Protected Member Functions

 _apply_tm_coil_reg (self, targets=None)
 Internal: build and apply reg_terms from stored config plus per-timestep targets.
 _apply_tx_set_overrides (self, myconfig)
 Apply user set_*() overrides to a TORAX config dict (in place).
 _calc_tx_ffp_ni (self, i)
 Calculate non-inductive FF' profile from TORAX current densities.
 _capture_relax_tx_profiles_from_datatree (self, data_tree, time_val=None)
 Store psi, n_e, T_e, T_i at time_val for debug relax figures / history.
 _capture_steady_state_tx_seed (self, data_tree)
 Store psi, n_e, T_e, T_i at t_final for steady_state_mode next coupling loop.
 _coupling_iteration_is_first (self)
 True on the first TokaMaker_TORAX loop (TORAX uses the seed gEQDSK map).
 _extract_tx_profile (self, data_tree, var_name, time, load_into_state='state', normalize=False, profile_type='linterp')
 Extract a TORAX profile onto self._psi_N with optional time-averaging.
 _extract_tx_scalar (self, data_tree, var_name, time, source='scalars', scale=1.0)
 Extract a scalar value from TORAX with optional time-averaging.
 _extract_tx_scalar_at_rho (self, data_tree, var_name, time, rho_val, rho_coord='rho_norm', scale=1.0)
 Extract a profile value at a specific rho location as a scalar, with time-averaging.
 _extract_tx_scalar_at_rho_timeseries (self, data_tree, var_name, rho_val, rho_coord='rho_norm', scale=1.0)
 Extract a profile-at-fixed-rho time-series with time-averaging.
 _extract_tx_scalar_timeseries (self, data_tree, var_name, source='scalars', scale=1.0)
 Extract a full time-series scalar from TORAX with time-averaging applied at each point.
 _get_time_window (self, time, tx_times)
 Return the (t_start, t_end) averaging window for a given timepoint.
 _get_tx_config (self)
 Generate config object for Torax simulation.
 _interp_tx_profile_onto_psi (self, data_tree, var_name, time, profile_type='linterp')
 Interpolate a single TORAX profile snapshot onto self._psi_N.
 _log (self, msg)
 Write message to log file only.
 _loop0_coarse_tx_main_scope (self)
 Apply loop-0 coarse TORAX grid for main _run_tx; restore after.
 _loop0_coarse_tx_relax_scope (self, stage)
 Apply loop-0 coarse TORAX grid during initial relax only; restore after.
 _pop_tx_grid (self)
 Restore TORAX grid from _push_tx_grid stack.
 _print (self, msg)
 Write message to both stdout and log file.
 _push_tx_grid (self)
 Save current TORAX grid onto stack for later _pop_tx_grid.
 _quiet_tm (self)
 Context manager: redirect C/Fortran-level stdout+stderr to /dev/null.
 _res_update (self, data_tree)
 Populate self._results from TORAX data with time-averaging.
 _run_tm (self)
 Run the GS solve across n timesteps using TokaMaker.
 _run_tx (self)
 Run the TORAX transport simulation.
 _run_tx_relax (self, *, stage, eqdsk_path, prescribed_profiles)
 Short TORAX relax: initial run on the seed EQDSK, or inter-loop on TM i=0 EQDSK.
 _test_eqdsk_tx_config (self, eqdsk, *, quiet=False)
 Return whether TORAX accepts eqdsk as ToraxConfig geometry.
 _tm_prof_input_ped_smooth (self, ffp_prof, pp_prof, p_prof, transition_psi_N=0.6, gauss_sigma=8, blend_width=0.02, sav_window=41, sav_order=3)
 Edge smoothing with Gaussian filter: smooth p profile and take derivative for pp_prof.
 _tm_prof_input_power_flux (self, ffp_prof, pp_prof)
 Generic power-flux shape.
 _tm_prof_input_raw (self, ffp_prof, pp_prof)
 Raw TORAX profiles passed through unchanged.
 _tm_prof_input_sign_flip (self, ffp_prof, pp_prof)
 Sign-flip clipping: clip each profile to its dominant sign.
 _tm_update (self, i)
 Update internal state and coil current results based on results of GS solver.
 _tx_update (self, i, data_tree)
 Update the simulation state from TORAX results at timestep i.
 _zz_doxygen_dummy (self)

Static Protected Member Functions

 _flatten_time_dependent (config)
 Recursively flatten time-dependent config values to their initial value only.
 _loop0_tm_solve_indices (n_tm, stride)
 TokaMaker timestep indices for coupling loop 0 subsampling: endpoints plus every stride-th.
 _numpy_to_plain_python (obj)
 Recursively convert numpy scalars/arrays to plain Python types.
 _relax_flat_profile_to_rho_y (profile_val)
 (rho_norm, y) from a profile_conditions value after merge + flatten.
 _tx_config_merge (base, override)
 Recursively merge override into base TORAX config (in-place).

Protected Attributes

 _chi_max = None
 _chi_min = None
int _cocos = 2
 _coil_bounds = coil_bounds
dict _coil_reg_config
int _current_loop = 0
 _data_tree = data_tree
 _De_max = None
 _De_min = None
bool _debug_mode = False
bool _diagnostics = False
dict _diverted_flags = {}
 _diverted_times = None
 _ecrh_heating = None
 _ecrh_loc = None
 _ecrh_width = None
bool _enable_ei_exchange = True
bool _enable_fusion = True
 _eqdsk_dir = None
bool _eqdsk_dir_is_temp = False
list _eqdsk_skip = []
 _eqtimes = eqtimes
 _evolve_current = None
 _evolve_density = None
 _evolve_Te = None
 _evolve_Ti = None
 _flattop
 _fly_loop0 = bool(loop0)
 _fname_out
 _generic_heat = None
 _generic_heat_loc = None
 _generic_heat_width = None
 _generic_particle_location = generic_particle_location
 _generic_particle_s_total = generic_particle_S_total
 _generic_particle_width = generic_particle_width
 _gp_dl = None
 _gp_s = None
 _impurity = None
 _init_files = g_eqdsk_arr
 _Ip = None
dict _Ip_seed = self._state['Ip'].copy()
 _last_surface_factor = last_surface_factor
 _loaded_config = None
 _log_file = None
bool _logging_configured = False
 _loop0_coarse_tx = self._fly_loop0
 _loop0_relax_coarse_tx = self._fly_loop0
int _loop0_tm_stride = 2 if self._fly_loop0 else 1
 _loop0_tx_face_points = int(DEFAULT_LOOP0_TX_FACE_POINTS)
 _main_ion = None
 _n_e = None
 _n_e_init = None
 _n_e_ped = None
 _nbar = None
 _nbi_heating = None
 _nbi_loc = None
 _ne_right_bc = None
 _normalize_to_nbar = None
 _ohmic_power = None
 _out_dir = None
str _output_file_tag = None
bool _output_mode = False
dict _pax_seed = self._state['pax'].copy()
 _ped_top = None
 _pedestal_config = None
 _pellet_deposition_location = None
 _pellet_s_total = None
 _pellet_width = None
dict _psi_axis_seed = self._state['psi_axis_tm'].copy()
tuple _psi_init = None
dict _psi_lcfs_seed = self._state['psi_lcfs_tm'].copy()
 _psi_N = np.linspace(0.0, 1.0, N_PSI)
dict _psi_warm_start = {}
 _relax = bool(relax)
 _relax_duration = float(relax_duration)
 _relax_kinetics = bool(relax_kinetics)
list _relax_mainrun_profile_history = []
 _relax_profiles_snapshot = None
dict _results = {}
 _run_name = run_name
str _run_timestamp = None
bool _save_outputs = False
 _set_pedestal = None
 _skip_bad_init_eqdsks
dict _state = {}
bool _steady_state_mode = False
 _steady_state_tm_psi_seed = None
 _steady_state_tx_seed = None
 _strike_point_targets = None
 _t_ave_causal
 _t_ave_ignore_start = t_ave_ignore_start
str _t_ave_toggle = 'off':
 _t_ave_window = t_ave_window
 _T_e = None
 _T_e_init = None
 _T_e_ped = None
 _t_final = t_final
 _T_i = None
 _T_i_init = None
 _T_i_ped = None
 _t_init = t_init
 _Te_right_bc = None
 _Ti_right_bc = None
 _tm = tokamaker_obj
dict _tm_psi_on_nodes = {}
list _tm_times = sorted(eqtimes)
 _truncate_eq = truncate_eq
 _tx_dt = tx_dt
list _tx_grid = None
list _tx_grid_stash = []
str _tx_grid_type = None
bool _use_nbi_current = False
 _Ve_max = None
 _Ve_min = None
 _x_point_targets = None
float _x_point_weight = 100.0
 _Zeff = None

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
t_init,
t_final,
eqtimes,
g_eqdsk_arr,
tokamaker_obj,
tx_dt = 0.1,
tm_times = None,
last_surface_factor = 0.99,
truncate_eq = False )

Initialize the Coupled TokaMaker + TORAX object.

Parameters
t_initStart time (s).
t_finalEnd time (s).
eqtimesTime points of each gEQDSK file.
g_eqdsk_arrFilenames of each gEQDSK file.
tokamaker_objPreconfigured TokaMaker object.
tx_dtTime step (s) of TORAX simulation.
tm_timesTime points where TokaMaker solves equilibrium.
last_surface_factorLast surface factor for Torax.
truncate_eqWhether to truncate equilibrium when saving TokaMaker output to EQDSK.

Coupling fly() option loop0: if True, the first coupling pass uses a coarse TORAX grid and subsampled TokaMaker times; if False, that pass is skipped (see fly()).

Member Function Documentation

◆ _apply_tm_coil_reg()

_apply_tm_coil_reg ( self,
targets = None )
protected

Internal: build and apply reg_terms from stored config plus per-timestep targets.

Parameters
targetsDict of {coil_name: current [A/turn]} to use as soft targets, or None for zeros.

◆ _apply_tx_set_overrides()

_apply_tx_set_overrides ( self,
myconfig )
protected

Apply user set_*() overrides to a TORAX config dict (in place).

Only applied when the corresponding attribute is not None (i.e. the user called the setter explicitly; None means fall through to the loaded/base config). Used by both _get_tx_config (coupling loop 0+) and _run_tx_relax so each relax simulation sees the same plasma conditions as the main sim.

Does NOT touch geometry, numerics.{t_initial, t_final, fixed_dt}, or profile_conditions.{psi, initial_psi_mode, initial_psi_from_j} — those are loop-specific and set by the calling method.

Parameters
myconfigConfig dict (modified in place).

◆ _calc_tx_ffp_ni()

_calc_tx_ffp_ni ( self,
i )
protected

Calculate non-inductive FF' profile from TORAX current densities.

The full GS relation is: FF'_total = 2 * mu_0 * (j_tor + p' * <R>) / <1/R>

To avoid double-counting p' when decomposing into inductive/non-inductive: FF'_NI = 2 * mu_0 * j_NI / <1/R> FF'_I = 2 * mu_0 * (j_I + p' * <R>) / <1/R>

Parameters
iTime index
Returns
FF'_NI profile array

◆ _capture_relax_tx_profiles_from_datatree()

_capture_relax_tx_profiles_from_datatree ( self,
data_tree,
time_val = None )
protected

Store psi, n_e, T_e, T_i at time_val for debug relax figures / history.

Updates _relax_profiles_snapshot temporarily so the caller can append a copy to _relax_mainrun_profile_history. Not used to seed inter-loop relax runs (those profiles come from the user config each time).

◆ _capture_steady_state_tx_seed()

_capture_steady_state_tx_seed ( self,
data_tree )
protected

Store psi, n_e, T_e, T_i at t_final for steady_state_mode next coupling loop.

Profile tuples use t_init as the time key (TORAX profile_conditions convention), matching _psi_init / relax snapshots.

◆ _coupling_iteration_is_first()

_coupling_iteration_is_first ( self)
protected

True on the first TokaMaker_TORAX loop (TORAX uses the seed gEQDSK map).

◆ _extract_tx_profile()

_extract_tx_profile ( self,
data_tree,
var_name,
time,
load_into_state = 'state',
normalize = False,
profile_type = 'linterp' )
protected

Extract a TORAX profile onto self._psi_N with optional time-averaging.

Replaces the former _pull_tx_onto_psi. When time-averaging is active the profile is interpolated at every TORAX timestep inside the window and the results are averaged pointwise on the psi_N grid.

Parameters
data_treeTORAX output data tree.
var_nameName of variable (e.g., 'T_i', 'j_ohmic', 'FFprime').
timeTarget time value.
load_into_state'state' → return dict; else return plain array.
normalizeIf True, normalize profile by the core value.
profile_type'linterp' or 'jphi-linterp'.

◆ _extract_tx_scalar()

_extract_tx_scalar ( self,
data_tree,
var_name,
time,
source = 'scalars',
scale = 1.0 )
protected

Extract a scalar value from TORAX with optional time-averaging.

Parameters
data_treeTORAX output data tree.
var_nameAttribute name on data_tree.scalars (or .profiles).
timeTarget time (seconds).
source'scalars' or 'profiles' — which subtree to read from.
scaleMultiplicative factor applied after extraction.
Returns
float — the (optionally averaged) scalar value.

◆ _extract_tx_scalar_at_rho()

_extract_tx_scalar_at_rho ( self,
data_tree,
var_name,
time,
rho_val,
rho_coord = 'rho_norm',
scale = 1.0 )
protected

Extract a profile value at a specific rho location as a scalar, with time-averaging.

Parameters
data_treeTORAX output data tree.
var_nameAttribute name on data_tree.profiles.
timeTarget time (seconds).
rho_valRadial coordinate value to select.
rho_coordName of the rho coordinate ('rho_norm', 'rho_face_norm', etc.).
scaleMultiplicative factor applied after extraction.
Returns
float — the (optionally averaged) scalar value.

◆ _extract_tx_scalar_at_rho_timeseries()

_extract_tx_scalar_at_rho_timeseries ( self,
data_tree,
var_name,
rho_val,
rho_coord = 'rho_norm',
scale = 1.0 )
protected

Extract a profile-at-fixed-rho time-series with time-averaging.

Returns dict {'x': times_list, 'y': values_array}.

◆ _extract_tx_scalar_timeseries()

_extract_tx_scalar_timeseries ( self,
data_tree,
var_name,
source = 'scalars',
scale = 1.0 )
protected

Extract a full time-series scalar from TORAX with time-averaging applied at each point.

Returns dict {'x': times_list, 'y': values_array} suitable for self._results.

Parameters
data_treeTORAX output data tree.
var_nameAttribute name on data_tree.scalars (or .profiles).
source'scalars' or 'profiles'.
scaleMultiplicative factor applied after extraction.

◆ _flatten_time_dependent()

_flatten_time_dependent ( config)
staticprotected

Recursively flatten time-dependent config values to their initial value only.

A dict whose keys are ALL numeric (int/float) is treated as time-dependent: only the entry with the smallest key is retained. Structural dicts (with any string keys) are recursed into. Tuples of form (times_array, values_array) are flattened to the first entry.

◆ _get_time_window()

_get_time_window ( self,
time,
tx_times )
protected

Return the (t_start, t_end) averaging window for a given timepoint.

Respects self._t_ave_toggle, self._t_ave_window, self._t_ave_causal, and self._t_ave_ignore_start. If averaging is disabled for this timepoint the returned window collapses to (time, time).

Parameters
timeThe target timepoint (seconds).
tx_timesSorted numpy array of all available TORAX times.
Returns
(t_start, t_end) — inclusive bounds for the averaging window.

◆ _get_tx_config()

_get_tx_config ( self)
protected

Generate config object for Torax simulation.

Build order

  1. Deep-copy BASE_CONFIG.
  2. Deep-merge the loaded config on top (if load_TORAX_config() was called). Every key in the loaded config overwrites the matching base key; keys only in BASE_CONFIG are kept as-is.
  3. Override geometry (always set to use TokaMaker equilibria). For loop 1+ with injected psi and relax=False, the seed EQDSK is forced at t_initial (psi from initial TORAX relax on seed); if relax=True, loop N relax keeps psi on the TM i=0 surface so TM EQDSK is used.
  4. Override t_initial / t_final / fixed_dt from init params.
  5. Use psi profile from initial TORAX relax (if available) from profile_conditions.
  6. Apply any explicit set_*() overrides (only when the attribute is not None, i.e. the user called the setter after load_TORAX_config).
  7. If relax_kinetics was True for the last relax, override n_e, T_e, T_i with profiles taken from the end of that relax simulation.
  8. If fly(..., steady_state_mode=True) and this is not the first loop, override psi and kinetic profiles with profiles saved from the previous main TORAX run at t_final (see _capture_steady_state_tx_seed).
Returns
Torax config object.

◆ _interp_tx_profile_onto_psi()

_interp_tx_profile_onto_psi ( self,
data_tree,
var_name,
time,
profile_type = 'linterp' )
protected

Interpolate a single TORAX profile snapshot onto self._psi_N.

No averaging, just one timeslice. Returns a plain numpy array on self._psi_N.

◆ _log()

_log ( self,
msg )
protected

Write message to log file only.

◆ _loop0_coarse_tx_main_scope()

_loop0_coarse_tx_main_scope ( self)
protected

Apply loop-0 coarse TORAX grid for main _run_tx; restore after.

◆ _loop0_coarse_tx_relax_scope()

_loop0_coarse_tx_relax_scope ( self,
stage )
protected

Apply loop-0 coarse TORAX grid during initial relax only; restore after.

◆ _loop0_tm_solve_indices()

_loop0_tm_solve_indices ( n_tm,
stride )
staticprotected

TokaMaker timestep indices for coupling loop 0 subsampling: endpoints plus every stride-th.

◆ _numpy_to_plain_python()

_numpy_to_plain_python ( obj)
staticprotected

Recursively convert numpy scalars/arrays to plain Python types.

Used before pformat-saving config dicts so the saved .py files are loadable without numpy (no array([...]) references).

◆ _pop_tx_grid()

_pop_tx_grid ( self)
protected

Restore TORAX grid from _push_tx_grid stack.

Used for reducing grid in loop0.

◆ _print()

_print ( self,
msg )
protected

Write message to both stdout and log file.

◆ _push_tx_grid()

_push_tx_grid ( self)
protected

Save current TORAX grid onto stack for later _pop_tx_grid.

Used for reducing grid in loop0.

◆ _quiet_tm()

_quiet_tm ( self)
protected

Context manager: redirect C/Fortran-level stdout+stderr to /dev/null.

◆ _relax_flat_profile_to_rho_y()

_relax_flat_profile_to_rho_y ( profile_val)
staticprotected

(rho_norm, y) from a profile_conditions value after merge + flatten.

Handles:

  • nested {time: inner} (TORAX time-sliced profiles; flatten keeps one key);
  • (rho, y) static radial tuples;
  • (times, rho, [profiles]) including a single time index.

◆ _res_update()

_res_update ( self,
data_tree )
protected

Populate self._results from TORAX data with time-averaging.

◆ _run_tm()

_run_tm ( self)
protected

Run the GS solve across n timesteps using TokaMaker.

Returns
Tuple (consumed_flux, consumed_flux_integral).

◆ _run_tx()

_run_tx ( self)
protected

Run the TORAX transport simulation.

Returns
Tuple (consumed_flux, consumed_flux_integral).

◆ _run_tx_relax()

_run_tx_relax ( self,
* ,
stage,
eqdsk_path,
prescribed_profiles )
protected

Short TORAX relax: initial run on the seed EQDSK, or inter-loop on TM i=0 EQDSK.

Uses flattened user inputs (_apply_tx_set_overrides + _flatten_time_dependent). If prescribed_profiles is None, psi follows EQDSK initial_psi_mode='geometry' and n_e, T_e, T_i stay as already merged from base / loaded config and _apply_tx_set_overrides (user inputs). If a dict is passed, it must supply psi, n_e, T_e, T_i tuples (advanced; loop N relax uses None so kinetics are always user-specified).

Parameters
stage'initial' or 'interloop' (logging / output names only).
eqdsk_pathPath to gEQDSK for geometry_configs at t_initial.
prescribed_profilesNone, or dict with keys psi, n_e, T_e, T_i (3-tuples).

◆ _test_eqdsk_tx_config()

_test_eqdsk_tx_config ( self,
eqdsk,
* ,
quiet = False )
protected

Return whether TORAX accepts eqdsk as ToraxConfig geometry.

Parameters
quietIf True, do not print or append to the coupling log on failure (used for intermediate-resolution retries in _run_tm). If False, failure is only reported when output_mode is 'debug'.

◆ _tm_prof_input_ped_smooth()

_tm_prof_input_ped_smooth ( self,
ffp_prof,
pp_prof,
p_prof,
transition_psi_N = 0.6,
gauss_sigma = 8,
blend_width = 0.02,
sav_window = 41,
sav_order = 3 )
protected

Edge smoothing with Gaussian filter: smooth p profile and take derivative for pp_prof.

◆ _tm_prof_input_power_flux()

_tm_prof_input_power_flux ( self,
ffp_prof,
pp_prof )
protected

Generic power-flux shape.

◆ _tm_prof_input_raw()

_tm_prof_input_raw ( self,
ffp_prof,
pp_prof )
protected

Raw TORAX profiles passed through unchanged.

◆ _tm_prof_input_sign_flip()

_tm_prof_input_sign_flip ( self,
ffp_prof,
pp_prof )
protected

Sign-flip clipping: clip each profile to its dominant sign.

◆ _tm_update()

_tm_update ( self,
i )
protected

Update internal state and coil current results based on results of GS solver.

Parameters
iTimestep of the solve.

◆ _tx_config_merge()

_tx_config_merge ( base,
override )
staticprotected

Recursively merge override into base TORAX config (in-place).

For every key in override:

  • If both values are dicts, recurse.
  • Otherwise the override value wins. Keys in base that are absent from override are kept as-is.
Parameters
baseDict to merge into (modified in-place).
overrideDict whose keys take precedence.
Returns
base (for convenience).

◆ _tx_update()

_tx_update ( self,
i,
data_tree )
protected

Update the simulation state from TORAX results at timestep i.

If sawtooth averaging is enabled, all profile and scalar extractions use time-averaged methods to smooth sawtooth oscillations.

Parameters
iTimestep index.
data_treeResult object from Torax.

◆ _zz_doxygen_dummy()

_zz_doxygen_dummy ( self)
protected

◆ configure_redirect_to_log()

configure_redirect_to_log ( self)

Step 3/3 of setup to divert noisy outputs to log file.

Captures INFO-level and above.

◆ fly()

fly ( self,
run_name = 'tmp',
convergence_threshold = -1.0,
max_loop = 3,
output_mode = False,
skip_bad_init_eqdsks = False,
initial_relax = True,
relax = False,
relax_kinetics = False,
relax_duration = 0.1,
t_ave_toggle = 'off',
t_ave_window = 0.5,
t_ave_causal = True,
t_ave_ignore_start = 0.25,
loop0 = False,
steady_state_mode = False )

Run TokaMaker_TORAX coupled pulse design loop.

Parameters
convergence_thresholdMax fractional change in consumed flux between loops for convergence.
max_loopHighest counted coupling index to run (inclusive): full-resolution passes use indices 1 … max_loop. The optional cheap pass at index 0 (when loop0=True) is always attempted first and does not count toward this limit. Example: max_loop=3 runs loop 0 (if enabled) then loops 1, 2, and 3 before stopping unless convergence ends earlier.
run_nameName for this run (used in output directory and log file).
output_modeOutput level selector: False (or None), 'minimal', 'normal', or 'debug'.
skip_bad_init_eqdsksIf True, skip broken initial gEQDSK files instead of raising.
initial_relaxIf True (default), run a short TORAX relax on the seed EQDSK before the first coupling TM-TORAX pass (flattened user inputs; psi from geometry unless an inter-loop relax already set psi). If False, skip and start from EQDSK psi / loaded config. When relax is True, this is forced True so initial relax establishes psi before later coupling iterations.
relaxIf True, run an additional short TORAX relax before each coupling iteration with index ≥1, on TM-solved EQDSK (previous_loop).000.eqdsk (fallback: seed), with user n_e, T_e, T_i from loaded config and set_*() and psi from geometry on that EQDSK— avoiding drift from previous TORAX outputs between loops. Default False (backward compatible). Implies initial_relax=True.
relax_kineticsIf False (default), each relax only evolves current; density and ion/electron heat stay fixed at the profiles present before that relax. If True, relax uses the same evolve_* flags as set_evolve() / loaded config. When True, relaxed n_e, T_e, T_i are injected into main TORAX after set_*() like psi.
relax_durationDuration (s) of each relax simulation; timestep is fixed at 0.01 s.
t_ave_toggleTime-averaging mode: 'off' (no averaging), 'flattop' (average only during flat-top), or 'pulse' (average over the whole pulse).
t_ave_windowAveraging window size in seconds. Default 0.5 s.
t_ave_causalIf True, window is entirely behind the timepoint (backward-looking). If False, window is centred on the timepoint.
t_ave_ignore_startIgnore the first N seconds of the pulse when building the averaging window (avoids numerical transients). Default 0.25 s.
loop0If True, run a first coupling pass at index 0 with reduced cost: coarse TORAX radial grid (face_centers linspace, DEFAULT_LOOP0_TX_FACE_POINTS), the same coarse grid on the optional initial relax, and subsampled TokaMaker times (stride 2). If False (default), skip that pass and start coupling at index 1 at full resolution (initial relax is unchanged and controlled only by initial_relax / relax).
steady_state_modeIf False (default), each coupling loop after the first reuses the time-dependent TokaMaker EQDSK sequence from the previous loop (existing behavior). If True, after each completed loop the next loop seeds TORAX with psi and kinetics from the previous main run at t_final, uses the final TokaMaker EQDSK from the previous loop for all TORAX geometry times (flat equilibrium shape in time), warm-starts TokaMaker at i=0 from the previous loop's final psi grid, and runs inter-loop relax on that final EQDSK when relax is True.

◆ get_final_timepoint_results()

get_final_timepoint_results ( self,
eqdsk_save_dir = None )

Profiles and scalars at the last TokaMaker timepoint of the last completed coupling loop.

Call after fly() when TokaMaker has populated state['equil'] at every timestep index.

Profiles use the usual TokaMaker_TORAX flux-surface dict form {'x', 'y', 'type'} (x = normalized poloidal flux when applicable). TokaMaker p_prime and FF_prime are P' and F F' from get_profiles(npsi=...) on the same grid as stored in state. Kinetic profiles and eta come from the TORAX-updated state at that timestep; current densities j_* are TORAX flux-surface profiles (sources for the GS solve).

Scalars: fusion Q from TORAX (last save or live data tree); q95 and q0 from TokaMaker get_q (l_i likewise from get_stats); V_loop from TORAX v_loop_lcfs; Ip is the TokaMaker equilibrium value.

Parameters
eqdsk_save_dirIf set (non-empty str or path-like), write the final TokaMaker equilibrium gEQDSK with save_eqdsk into this directory (created if needed). If None (default), no file is written.
Returns
dict with time, simulation_loop, tm_time_index, profile keys, nested j current profiles, scalar values, coil_currents, coil_currents_by_region, tokamaker_equilibrium (TokaMaker equilibrium instance at this timestep — same reference as state['equil'][tm_time_index]), and eqdsk_path (absolute path string when saved, else None).

◆ load_pedestal_config()

load_pedestal_config ( self,
pedestal_config )

Load pedestal config dict and fully replace 'pedestal' in TORAX config.

TORAX input config documentation: https://torax.readthedocs.io/en/latest/configuration.html#pedestal If provided, this dict is copied to 'myconfig['pedestal']' directly, replacing the full pedestal section from BASE_CONFIG and load_TORAX_config().

Parameters
pedestal_configDictionary in TORAX pedestal config format, or None to clear and fall back to set_pedestal().

◆ load_TORAX_config()

load_TORAX_config ( self,
config )

Load a TORAX config dict.

TORAX input config documentation: https://torax.readthedocs.io/en/latest/configuration.html The loaded config is deep-merged on top of BASE_CONFIG when the simulation config is built. Any key present in the loaded config will override the corresponding BASE_CONFIG key; keys only in BASE_CONFIG are kept as-is. Geometry is always overwritten (eqdsk-based).

Explicit set_*() calls made AFTER load_TORAX_config() will override both the base and the loaded config.

Parameters
configDictionary (TORAX config format).

◆ make_movie()

make_movie ( self,
save_path = None,
** kwargs )

Generate pulse movie from stored psi snapshots.

Parameters
save_pathPath to save MP4 file. If None, does not save.

◆ plot_coils()

plot_coils ( self,
save_path = None,
display = True,
** kwargs )

Plot coil current traces over the pulse.

Parameters
save_pathPath to save figure. If None, does not save.
displayWhether to show the plot.

◆ plot_lcfs_evolution()

plot_lcfs_evolution ( self,
save_path = None,
display = True,
one_plot = False,
** kwargs )

Plot time evolution of the LCFS for each pulse phase (rampup, flattop, rampdown).

Parameters
save_pathPath prefix to save figures. If None, does not save.
displayWhether to show the plots.
one_plotIf True, combine all pulse phases into one figure.

◆ plot_profile_evolution()

plot_profile_evolution ( self,
save_path = None,
display = True,
one_plot = False,
** kwargs )

Plot profile evolution over time.

Parameters
save_pathPath to save figure. If None, does not save.
displayWhether to show the plot.
one_plotIf True, combine all pulse phases into one figure.

◆ plot_profiles()

plot_profiles ( self,
** kwargs )

Interactive profile viewer (ipywidgets slider in Jupyter, static otherwise).

◆ plot_scalars()

plot_scalars ( self,
save_path = None,
display = True,
** kwargs )

Plot scalar time traces (Ip, Q, Te, ne, power channels, etc.).

Parameters
save_pathPath to save figure. If None, does not save.
displayWhether to show the plot.

◆ save_res()

save_res ( self)

Save simulation results to JSON.

◆ save_state()

save_state ( self,
fname )

Save intermediate simulation state to JSON.

Parameters
fnameFilename to save to.

◆ set_evolve()

set_evolve ( self,
density = True,
Ti = True,
Te = True,
current = True )

Set variables as either prescribed (False) or evolved (True) for TORAX.

TORAX input config documentation: https://torax.readthedocs.io/en/latest/configuration.html#numerics

Parameters
densityEvolve density.
TiEvolve ion temperature.
TeEvolve electron temperature.
currentEvolve current.

◆ set_fueling()

set_fueling ( self,
gas_puff_S_total = None,
gas_puff_decay_length = None,
pellet_deposition_location = None,
pellet_width = None,
pellet_S_total = None,
generic_particle_location = None,
generic_particle_width = None,
generic_particle_S_total = None )

Set gas puff and pellet fueling particle sources for TORAX.

TORAX input config documentation: https://torax.readthedocs.io/en/latest/configuration.html#sources

Parameters
gas_puff_S_totalGas puff particle source (particles/s).
gas_puff_decay_lengthGas puff decay length from edge (normalized rho).
pellet_deposition_locationPellet deposition location (normalized rho).
pellet_widthPellet deposition width (normalized rho).
pellet_S_totalPellet particle source (particles/s).
generic_particle_locationGeneric particle source location (normalized rho).
generic_particle_widthGeneric particle source width (normalized rho).
generic_particle_widthGeneric particle source amount (particles/s).

◆ set_heating()

set_heating ( self,
generic_heat = None,
generic_heat_loc = None,
generic_heat_width = 0.25,
nbi_current = False,
ecrh = None,
ecrh_loc = None,
ecrh_width = 0.1,
ohmic = None,
fusion = True,
ei_exchange = True )

Set TORAX heating and source toggles.

TORAX input config documentation: https://torax.readthedocs.io/en/latest/configuration.html#sources

Parameters
generic_heatGeneric heating ({time: power_W}).
generic_heat_locGeneric heating deposition location (normalized rho).
generic_heat_widthGeneric heating deposition width (normalized rho).
nbi_currentEnable NBI current drive estimate from generic heating.
ecrhECRH heating ({time: power_W}).
ecrh_locECRH deposition location (normalized rho).
ecrh_widthECRH deposition width (normalized rho).
ohmicOptional explicit ohmic power ({time: power_W}).
fusionEnable fusion alpha heating source.
ei_exchangeEnable electron-ion energy exchange source.

◆ set_Ip()

set_Ip ( self,
Ip )

Set plasma current (Amps), used for both codes and not evolved by either.

Parameters
ipPlasma current.

◆ set_ne()

set_ne ( self,
n_e,
right_bc = None )

Set electron density profiles and optional right boundary condition.

TORAX input config documentation: https://torax.readthedocs.io/en/latest/configuration.html#profile-conditions

Parameters
n_eElectron density (m^-3).
right_bcRight boundary value at rho=1 (m^-3), scalar or time-varying map.

◆ set_pedestal()

set_pedestal ( self,
set_pedestal = False,
T_i_ped = None,
T_e_ped = None,
n_e_ped = None,
ped_top = 0.90 )

Set pedestals for ion/electron temperatures and density (legacy API).

TORAX input config documentation: https://torax.readthedocs.io/en/latest/configuration.html#pedestal This preserves the original behavior:

  • set_pedestal=True uses model_name='set_T_ped_n_ped'
  • set_pedestal=False uses model_name='no_pedestal'
Parameters
set_pedestalToggle pedestal model on/off.
T_i_pedIon temperature pedestal (time-varying scalar allowed).
T_e_pedElectron temperature pedestal (time-varying scalar allowed).
n_e_pedElectron density pedestal (time-varying scalar allowed).
ped_topPedestal-top location rho_norm_ped_top.

◆ set_plasma_composition()

set_plasma_composition ( self,
Zeff = None,
main_ion = None,
impurity = None )

Set plasma effective charge and composition.

TORAX input config documentation: https://torax.readthedocs.io/en/latest/configuration.html#profile-conditions

Parameters
ZeffEffective charge target.
main_ionMain ion species dict, e.g. {'D': 0.5, 'T': 0.5}.
impurityImpurity species string, e.g. 'Ne', 'Ar', 'W'.

◆ set_Te()

set_Te ( self,
T_e,
right_bc = None )

Set electron temperature profiles and optional right boundary condition.

TORAX input config documentation: https://torax.readthedocs.io/en/latest/configuration.html#profile-conditions

Parameters
T_eElectron temperature (keV).
right_bcRight boundary value at rho=1 (keV), scalar or time-varying map.

◆ set_Ti()

set_Ti ( self,
T_i,
right_bc = None )

Set ion temperature profiles and optional right boundary condition.

TORAX input config documentation: https://torax.readthedocs.io/en/latest/configuration.html#profile-conditions

Parameters
T_iIon temperature (keV).
right_bcRight boundary value at rho=1 (keV), scalar or time-varying map.

◆ set_TokaMaker_coil_reg()

set_TokaMaker_coil_reg ( self,
coil_bounds = None,
updownsym = False,
default_weight = 1.0E-1,
disable_coils = None,
disable_weight = 1.0E4,
symmetry_weight = 1.0E3,
disable_virtual_vsc = True,
vsc_weight = 1.0E4 )

Set coil regularization using the dict-based TokaMaker reg_terms API.

Coil bounds are hard current limits in Amperes per turn (A/turn). The total current in a coil region is I_coil [A/turn] * n_turns, where n_turns comes from the mesh file coil definition.

During the pulse, coil current targets are set automatically: the initial equilibrium currents seed i=0, and each subsequent timestep uses the previous timestep's solved currents as loose targets.

Parameters
coil_boundsDict of {coil_name: [min, max]} hard current bounds [A/turn]. Default ±5 MA/turn.
updownsymEnforce up-down symmetry for coil pairs (U/L naming convention).
default_weightRegularization weight for normal coils (default 0.1).
disable_coilsList of coil name prefixes to disable (e.g. ['DV1', 'DV2']).
disable_weightRegularization weight for disabled coils (default 1e4).
symmetry_weightRegularization weight for symmetry constraints (default 1e3).
disable_virtual_vscDisable the virtual VSC coil (default True).
vsc_weightRegularization weight for disabled VSC (default 1e4).

◆ set_TORAX_grid()

set_TORAX_grid ( self,
grid_type,
grid )

Set TORAX grid type and grid points.

TORAX grid documentation: https://torax.readthedocs.io/en/latest/configuration.html#geometry

Parameters
grid_typeGrid type ('n_rho' or 'face_centers').
gridGrid points (integer or np.array).

◆ set_transport_coefs()

set_transport_coefs ( self,
chi_min = None,
chi_max = None,
De_min = None,
De_max = None,
Ve_min = None,
Ve_max = None )

Set transport coefficient bounds for TORAX.

TORAX input config documentation: https://torax.readthedocs.io/en/latest/configuration.html#transport

Parameters
chi_minMinimum ion thermal diffusivity (m^2/s).
chi_maxMaximum ion thermal diffusivity (m^2/s).
De_minMinimum electron diffusion coefficient (m^2/s).
De_maxMaximum electron diffusion coefficient (m^2/s).
Ve_minMinimum electron thermal velocity (m/s).
Ve_maxMaximum electron thermal velocity (m/s).

◆ set_x_points()

set_x_points ( self,
diverted_times = None,
x_point_targets = None,
x_point_weight = 100.0,
strike_point_targets = None )

Configure diverted window, X-point targets, and optional strike points.

Parameters
diverted_timesTuple (t_start, t_end) defining the diverted plasma window.
x_point_targetsX-point target locations, shape (n_xpoints, 2) with [R, Z] pairs.
x_point_weightWeight for saddle-point constraints.
strike_point_targetsStrike point locations, shape (n_points, 2) with [R, Z] pairs, or None to disable.

◆ summary()

summary ( self,
** kwargs )

Print/display a physics summary of the simulation.

Member Data Documentation

◆ _chi_max

_chi_max = None
protected

◆ _chi_min

_chi_min = None
protected

◆ _cocos

int _cocos = 2
protected

◆ _coil_bounds

_coil_bounds = coil_bounds
protected

◆ _coil_reg_config

dict _coil_reg_config
protected
Initial value:
= {
'coil_bounds': coil_bounds,
'updownsym': updownsym, 'default_weight': default_weight,
'disable_coils': disable_coils, 'disable_weight': disable_weight,
'symmetry_weight': symmetry_weight,
'disable_virtual_vsc': disable_virtual_vsc, 'vsc_weight': vsc_weight,
}

◆ _current_loop

_current_loop = 0
protected

◆ _data_tree

_data_tree = data_tree
protected

◆ _De_max

_De_max = None
protected

◆ _De_min

_De_min = None
protected

◆ _debug_mode

bool _debug_mode = False
protected

◆ _diagnostics

bool _diagnostics = False
protected

◆ _diverted_flags

dict _diverted_flags = {}
protected

◆ _diverted_times

_diverted_times = None
protected

◆ _ecrh_heating

_ecrh_heating = None
protected

◆ _ecrh_loc

_ecrh_loc = None
protected

◆ _ecrh_width

_ecrh_width = None
protected

◆ _enable_ei_exchange

bool _enable_ei_exchange = True
protected

◆ _enable_fusion

bool _enable_fusion = True
protected

◆ _eqdsk_dir

_eqdsk_dir = None
protected

◆ _eqdsk_dir_is_temp

bool _eqdsk_dir_is_temp = False
protected

◆ _eqdsk_skip

list _eqdsk_skip = []
protected

◆ _eqtimes

_eqtimes = eqtimes
protected

◆ _evolve_current

_evolve_current = None
protected

◆ _evolve_density

_evolve_density = None
protected

◆ _evolve_Te

_evolve_Te = None
protected

◆ _evolve_Ti

_evolve_Ti = None
protected

◆ _flattop

_flattop
protected

◆ _fly_loop0

_fly_loop0 = bool(loop0)
protected

◆ _fname_out

_fname_out
protected

◆ _generic_heat

_generic_heat = None
protected

◆ _generic_heat_loc

_generic_heat_loc = None
protected

◆ _generic_heat_width

_generic_heat_width = None
protected

◆ _generic_particle_location

_generic_particle_location = generic_particle_location
protected

◆ _generic_particle_s_total

_generic_particle_s_total = generic_particle_S_total
protected

◆ _generic_particle_width

_generic_particle_width = generic_particle_width
protected

◆ _gp_dl

_gp_dl = None
protected

◆ _gp_s

_gp_s = None
protected

◆ _impurity

_impurity = None
protected

◆ _init_files

_init_files = g_eqdsk_arr
protected

◆ _Ip

_Ip = None
protected

◆ _Ip_seed

dict _Ip_seed = self._state['Ip'].copy()
protected

◆ _last_surface_factor

_last_surface_factor = last_surface_factor
protected

◆ _loaded_config

_loaded_config = None
protected

◆ _log_file

_log_file = None
protected

◆ _logging_configured

bool _logging_configured = False
protected

◆ _loop0_coarse_tx

_loop0_coarse_tx = self._fly_loop0
protected

◆ _loop0_relax_coarse_tx

_loop0_relax_coarse_tx = self._fly_loop0
protected

◆ _loop0_tm_stride

int _loop0_tm_stride = 2 if self._fly_loop0 else 1
protected

◆ _loop0_tx_face_points

_loop0_tx_face_points = int(DEFAULT_LOOP0_TX_FACE_POINTS)
protected

◆ _main_ion

_main_ion = None
protected

◆ _n_e

_n_e = None
protected

◆ _n_e_init

_n_e_init = None
protected

◆ _n_e_ped

_n_e_ped = None
protected

◆ _nbar

_nbar = None
protected

◆ _nbi_heating

_nbi_heating = None
protected

◆ _nbi_loc

_nbi_loc = None
protected

◆ _ne_right_bc

_ne_right_bc = None
protected

◆ _normalize_to_nbar

_normalize_to_nbar = None
protected

◆ _ohmic_power

_ohmic_power = None
protected

◆ _out_dir

_out_dir = None
protected

◆ _output_file_tag

str _output_file_tag = None
protected

◆ _output_mode

bool _output_mode = False
protected

◆ _pax_seed

dict _pax_seed = self._state['pax'].copy()
protected

◆ _ped_top

_ped_top = None
protected

◆ _pedestal_config

_pedestal_config = None
protected

◆ _pellet_deposition_location

_pellet_deposition_location = None
protected

◆ _pellet_s_total

_pellet_s_total = None
protected

◆ _pellet_width

_pellet_width = None
protected

◆ _psi_axis_seed

dict _psi_axis_seed = self._state['psi_axis_tm'].copy()
protected

◆ _psi_init

tuple _psi_init = None
protected

◆ _psi_lcfs_seed

dict _psi_lcfs_seed = self._state['psi_lcfs_tm'].copy()
protected

◆ _psi_N

_psi_N = np.linspace(0.0, 1.0, N_PSI)
protected

◆ _psi_warm_start

dict _psi_warm_start = {}
protected

◆ _relax

_relax = bool(relax)
protected

◆ _relax_duration

_relax_duration = float(relax_duration)
protected

◆ _relax_kinetics

_relax_kinetics = bool(relax_kinetics)
protected

◆ _relax_mainrun_profile_history

list _relax_mainrun_profile_history = []
protected

◆ _relax_profiles_snapshot

_relax_profiles_snapshot = None
protected

◆ _results

_results = {}
protected

◆ _run_name

_run_name = run_name
protected

◆ _run_timestamp

str _run_timestamp = None
protected

◆ _save_outputs

bool _save_outputs = False
protected

◆ _set_pedestal

_set_pedestal = None
protected

◆ _skip_bad_init_eqdsks

_skip_bad_init_eqdsks
protected

◆ _state

_state = {}
protected

◆ _steady_state_mode

_steady_state_mode = False
protected

◆ _steady_state_tm_psi_seed

_steady_state_tm_psi_seed = None
protected

◆ _steady_state_tx_seed

_steady_state_tx_seed = None
protected

◆ _strike_point_targets

_strike_point_targets = None
protected

◆ _t_ave_causal

_t_ave_causal
protected

◆ _t_ave_ignore_start

_t_ave_ignore_start = t_ave_ignore_start
protected

◆ _t_ave_toggle

str _t_ave_toggle = 'off':
protected

◆ _t_ave_window

_t_ave_window = t_ave_window
protected

◆ _T_e

_T_e = None
protected

◆ _T_e_init

_T_e_init = None
protected

◆ _T_e_ped

_T_e_ped = None
protected

◆ _t_final

_t_final = t_final
protected

◆ _T_i

_T_i = None
protected

◆ _T_i_init

_T_i_init = None
protected

◆ _T_i_ped

_T_i_ped = None
protected

◆ _t_init

_t_init = t_init
protected

◆ _Te_right_bc

_Te_right_bc = None
protected

◆ _Ti_right_bc

_Ti_right_bc = None
protected

◆ _tm

_tm = tokamaker_obj
protected

◆ _tm_psi_on_nodes

dict _tm_psi_on_nodes = {}
protected

◆ _tm_times

_tm_times = sorted(eqtimes)
protected

◆ _truncate_eq

_truncate_eq = truncate_eq
protected

◆ _tx_dt

_tx_dt = tx_dt
protected

◆ _tx_grid

list _tx_grid = None
protected

◆ _tx_grid_stash

list _tx_grid_stash = []
protected

◆ _tx_grid_type

_tx_grid_type = None
protected

◆ _use_nbi_current

bool _use_nbi_current = False
protected

◆ _Ve_max

_Ve_max = None
protected

◆ _Ve_min

_Ve_min = None
protected

◆ _x_point_targets

_x_point_targets = None
protected

◆ _x_point_weight

float _x_point_weight = 100.0
protected

◆ _Zeff

_Zeff = None
protected

◆ lcfs

lcfs = lcfs

◆ results

results = None

Access simulation results dict.

◆ state

state = None

Access simulation state dict.


The documentation for this class was generated from the following file: