From f939f245774a199e3334d03c974c44bd924f3c1e Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 16:21:45 +0100 Subject: [PATCH 01/28] Rename `fradpwr` to `f_p_plasma_separatrix_rad_max` across multiple files for consistency --- process/core/input.py | 4 ++- process/core/io/obsolete_vars.py | 1 + process/core/solver/constraints.py | 31 +++++-------------- .../data_structure/constraint_variables.py | 5 +-- .../input_files/st_regression.IN.DAT | 2 +- .../input_files/stellarator_helias.IN.DAT | 2 +- 6 files changed, 16 insertions(+), 29 deletions(-) diff --git a/process/core/input.py b/process/core/input.py index 644078ef83..2fe07187a8 100644 --- a/process/core/input.py +++ b/process/core/input.py @@ -464,7 +464,9 @@ def __post_init__(self): "heat_transport", float, range=(0.0, 0.2) ), "fracture_toughness": InputVariable("cs_fatigue", float, range=(0.1, 100000000.0)), - "fradpwr": InputVariable("constraints", float, range=(0.0, 1.0)), + "f_p_plasma_separatrix_rad_max": InputVariable( + "constraints", float, range=(0.0, 1.0) + ), "f_radius_beam_tangency_rmajor": InputVariable( "current_drive", float, range=(0.5, 2.0) ), diff --git a/process/core/io/obsolete_vars.py b/process/core/io/obsolete_vars.py index 9afa1ff419..c14ed1d363 100644 --- a/process/core/io/obsolete_vars.py +++ b/process/core/io/obsolete_vars.py @@ -457,6 +457,7 @@ "dr_hts_tape": "dr_tf_hts_tape", "coppera_m2_max": "tf_coppera_m2_max", "f_ster_div_single": None, + "fradpwr": "f_p_plasma_separatrix_rad_max", } OBS_VARS_HELP = { diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index 4f33c2a930..71052cc6ee 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -572,34 +572,17 @@ def constraint_equation_16(constraint_registration, data): ) -@ConstraintManager.register_constraint(17, "MW/m³", "<=") +@ConstraintManager.register_constraint(17, "", "<=") def constraint_equation_17(constraint_registration, data): - """Equation for radiation power upper limit + """Equation for plasma radiation fraction upper limit - f_p_alpha_plasma_deposited: fraction of alpha power deposited in plasma - p_hcd_injected_total_mw: total auxiliary injected power (MW) - vol_plasma: plasma volume (m³) - pden_alpha_total_mw: alpha power per volume (MW/m³) - pden_non_alpha_charged_mw: non-alpha charged particle fusion power per volume (MW/m³) - pden_plasma_ohmic_mw: ohmic heating power per volume (MW/m³) - pden_plasma_rad_mw: total radiation power per volume (MW/m³) - fradpwr: core radiation power limit scale - - fradpwr adds a margin to the constraint constraint such that - - pden_plasma_rad_mw / pradmaxpv <= fradpwr + f_p_plasma_separatrix_rad: plasma radiation fraction at the separatrix + f_p_plasma_separatrix_rad_max: maximum allowed plasma radiation fraction at the + separatrix """ - # Maximum possible power/vol_plasma that can be radiated (local) - pradmaxpv = ( - data.current_drive.p_hcd_injected_total_mw / data.physics.vol_plasma - + data.physics.pden_alpha_total_mw * data.physics.f_p_alpha_plasma_deposited - + data.physics.pden_non_alpha_charged_mw - + data.physics.pden_plasma_ohmic_mw - ) - return leq( - data.physics.pden_plasma_rad_mw / pradmaxpv, - data.constraints.fradpwr, + data.physics.f_p_plasma_separatrix_rad, + data.constraints.f_p_plasma_separatrix_rad_max, constraint_registration, ) diff --git a/process/data_structure/constraint_variables.py b/process/data_structure/constraint_variables.py index b55a45b772..549c56d54b 100644 --- a/process/data_structure/constraint_variables.py +++ b/process/data_structure/constraint_variables.py @@ -18,8 +18,9 @@ class ConstraintData: fdene: float = 1.0 """Scaling value for density limit (constraint equation 5)""" - fradpwr: float = 1.0 - """Scaling value for radiation power upper limit (constraint equation 17)""" + f_p_plasma_separatrix_rad_max: float = 1.0 + """Maximum allowed plasma radiation fraction at the separatrix + (`constraint equation 17`)""" fiooic: float = 0.7 """Constraint margin for TF coil operating current / critical current ratio diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index 967e8da19f..ce7b7370d4 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -562,7 +562,7 @@ icc = 17 * JUSTIFICATION: Limit for plasma stability * VARIABLES: Rest calculated in-situ -fradpwr = 0.64 +f_p_plasma_separatrix_rad_max = 0.64 * DESCRIPTION: Radiation power upper limit constraint scale (constraint equation 17) * JUSTIFICATION: Scales the bound of constraint equation 17 diff --git a/tests/regression/input_files/stellarator_helias.IN.DAT b/tests/regression/input_files/stellarator_helias.IN.DAT index 1ca02320e9..b234c8389d 100644 --- a/tests/regression/input_files/stellarator_helias.IN.DAT +++ b/tests/regression/input_files/stellarator_helias.IN.DAT @@ -130,7 +130,7 @@ i_confinement_time = 38 *Switch for energy confinement time scaling law (38: ISS f_sync_reflect = 0.6 *Synchrotron wall reflectivity factor f_temp_plasma_ion_electron = 0.95 *Ion temperature / electron temperature -fradpwr = 1. +f_p_plasma_separatrix_rad_max = 1. *--------------Stellarator Variables---------------* From e755d27a3304533d20268e3dd1e937577e832fb9 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 17:09:30 +0100 Subject: [PATCH 02/28] Rename `fdene` to `f_nd_plasma_electron_limit_max` for clarity and consistency across the codebase --- .../source/fusion-devices/stellarator.md | 2 +- .../source/physics-models/plasma_density.md | 2 +- examples/data/large_tokamak_eval_IN.DAT | 2 +- process/core/input.py | 4 +++- process/core/solver/constraints.py | 21 ++++++++++++------- .../data_structure/constraint_variables.py | 4 ++-- tests/integration/data/large_tokamak_IN.DAT | 2 +- .../data/large_tokamak_eval.IN.DAT | 2 +- .../input_files/large_tokamak_eval.IN.DAT | 2 +- .../input_files/large_tokamak_nof.IN.DAT | 2 +- .../input_files/low_aspect_ratio_DEMO.IN.DAT | 4 ++-- 11 files changed, 28 insertions(+), 19 deletions(-) diff --git a/documentation/source/fusion-devices/stellarator.md b/documentation/source/fusion-devices/stellarator.md index 4687498df3..08efebf285 100644 --- a/documentation/source/fusion-devices/stellarator.md +++ b/documentation/source/fusion-devices/stellarator.md @@ -131,7 +131,7 @@ The density limit relevant to certain stellarators experiments has been proposed $n_{max} = 0.25(PB_0/R_0a^2_p)^{1/2}$ -where $n$ is the line-averaged electron density in units of $10^{20} m^{-3}$, $p$ is the absorbed heating power (MW), $B_0$ is the on-axis field (t), $R_0$ is the major radius (m), and $a_p$ is the plasma minor radius (m). To enforce the Sudo density limit, turn on constraint equation no. 5 (`fdene != 1` can be used to scale the constraint bound). +where $n$ is the line-averaged electron density in units of $10^{20} m^{-3}$, $p$ is the absorbed heating power (MW), $B_0$ is the on-axis field (t), $R_0$ is the major radius (m), and $a_p$ is the plasma minor radius (m). To enforce the Sudo density limit, turn on constraint equation no. 5 (`f_nd_plasma_electron_limit_max != 1` can be used to scale the constraint bound). Note that the Sudo limit is a radiation based density limit and it is unclear how well this limit extrapolates to reactor parameters, especially as no impurity dependence e.g. is present in the Sudo model. PROCESS features an impurity dependent radiation module already which can be used with `icc=17` and by setting the `f_nd_impurity_electrons` vector. diff --git a/documentation/source/physics-models/plasma_density.md b/documentation/source/physics-models/plasma_density.md index 5b07350b93..7b87649713 100644 --- a/documentation/source/physics-models/plasma_density.md +++ b/documentation/source/physics-models/plasma_density.md @@ -5,7 +5,7 @@ calculated in the run routine `density_limit.run()`, which is called by `physics This constraint can be activated by stating `icc = 5` in the input file. -The value of `i_density_limit` can be set to apply the relevant limit. The variable `fdene` can be set to scale the constraint bound: `nd_plasma_electrons_vol_avg` / `nd_plasma_electrons_max` <= `fdene` (or `nd_plasma_electron_line` / `nd_plasma_electrons_max` <= `fdene` if `i_density_limit = 7`). +The value of `i_density_limit` can be set to apply the relevant limit. The variable `f_nd_plasma_electron_limit_max` can be set to scale the constraint bound: `nd_plasma_electrons_vol_avg` / `nd_plasma_electrons_max` <= `f_nd_plasma_electron_limit_max` (or `nd_plasma_electron_line` / `nd_plasma_electrons_max` <= `f_nd_plasma_electron_limit_max` if `i_density_limit = 7`). For the `i_density_limit = 1-5,8` scalings we scale the function output by the separatrix to volume averaged electron density so that we can set the limit on the volume averaged. **Therefore it is recommended to only use these scalings with an H-mode profile (`i_plasma_pedestal == 1`) otherwise the separatrix density (`nd_plasma_separatrix_electron`) will not be calculated.** diff --git a/examples/data/large_tokamak_eval_IN.DAT b/examples/data/large_tokamak_eval_IN.DAT index 464a9a84ba..05c52c00ab 100644 --- a/examples/data/large_tokamak_eval_IN.DAT +++ b/examples/data/large_tokamak_eval_IN.DAT @@ -92,7 +92,7 @@ dr_shld_blkt_gap = 0.02 * gap between vacuum vessel and blanket (m) *---------------Constraint Variables---------------* b_tf_inboard_max = 14.0 * maximum peak toroidal field (T) (`constraint equation 25`) -fdene = 1.2 * density limit constraint scale (constraint equation 5) +f_nd_plasma_electron_limit_max = 1.2 * density limit constraint scale (constraint equation 5) fiooic = 0.65 * margin for TF coil operating current / critical current ratio fjohc = 0.6 * margin for central solenoid current at end-of-flattop fjohc0 = 0.6 * margin for central solenoid current at beginning of pulse diff --git a/process/core/input.py b/process/core/input.py index 2fe07187a8..9e24c19122 100644 --- a/process/core/input.py +++ b/process/core/input.py @@ -432,7 +432,9 @@ def __post_init__(self): "fcuohsu": InputVariable("pf_coil", float, range=(0.0, 1.0)), "fcupfsu": InputVariable("pf_coil", float, range=(0.0, 1.0)), "f_a_tf_turn_cable_copper": InputVariable("tfcoil", float, range=(0.0, 1.0)), - "fdene": InputVariable("constraints", float, range=(0.001, 10.0)), + "f_nd_plasma_electron_limit_max": InputVariable( + "constraints", float, range=(0.001, 10.0) + ), "fiooic": InputVariable("constraints", float, range=(0.001, 1.0)), "fjohc": InputVariable("constraints", float, range=(0.001, 1.0)), "fjohc0": InputVariable("constraints", float, range=(0.001, 1.0)), diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index 71052cc6ee..344d6a224d 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -8,6 +8,7 @@ from process.core import constants from process.core.exceptions import ProcessError, ProcessValueError from process.core.model import DataStructure +from process.models.physics.density_limit import DensityLimitModel from process.models.physics.physics import BetaComponentLimits from process.models.tfcoil.base import TFConductorModel @@ -377,9 +378,9 @@ def constraint_equation_4(constraint_registration, data): @ConstraintManager.register_constraint(5, "/m³", "<=") def constraint_equation_5(constraint_registration, data): - """Equation for density upper limit + """Equation for electron density upper limit - fdene: density limit scale + f_nd_plasma_electron_limit_max: density limit scale nd_plasma_electrons_vol_avg: electron density (/m³) nd_plasma_electrons_max: density limit (/m³) nd_plasma_electron_line: line averaged electron density (/m³) @@ -393,21 +394,27 @@ def constraint_equation_5(constraint_registration, data): - 6 Hugill-Murakami Mq limit; - 7 Greenwald limit - fdene scales the constraint such that: - nd_plasma_electrons_vol_avg / nd_plasma_electrons_max <= fdene. + f_nd_plasma_electron_limit_max scales the constraint such that: + nd_plasma_electrons_vol_avg / nd_plasma_electrons_max <= f_nd_plasma_electron_limit_max. (Except when i_density_limit=7 when nd_plasma_electron_line is used, not nd_plasma_electrons_vol_avg) """ # Apply Greenwald limit to line-averaged density - if data.physics.i_density_limit == 7: + if data.physics.i_density_limit == DensityLimitModel.GREENWALD: return leq( data.physics.nd_plasma_electron_line, - (data.physics.nd_plasma_electrons_max * data.constraints.fdene), + ( + data.physics.nd_plasma_electrons_max + * data.constraints.f_nd_plasma_electron_limit_max + ), constraint_registration, ) return leq( data.physics.nd_plasma_electrons_vol_avg, - (data.physics.nd_plasma_electrons_max * data.constraints.fdene), + ( + data.physics.nd_plasma_electrons_max + * data.constraints.f_nd_plasma_electron_limit_max + ), constraint_registration, ) diff --git a/process/data_structure/constraint_variables.py b/process/data_structure/constraint_variables.py index 549c56d54b..c63b5d6bf6 100644 --- a/process/data_structure/constraint_variables.py +++ b/process/data_structure/constraint_variables.py @@ -15,8 +15,8 @@ class ConstraintData: b_tf_inboard_max: float = 12.0 """maximum peak toroidal field (T) (`constraint equation 25`)""" - fdene: float = 1.0 - """Scaling value for density limit (constraint equation 5)""" + f_nd_plasma_electron_limit_max: float = 1.0 + """Max allowed fraction of electron density limit (`constraint equation 5`)""" f_p_plasma_separatrix_rad_max: float = 1.0 """Maximum allowed plasma radiation fraction at the separatrix diff --git a/tests/integration/data/large_tokamak_IN.DAT b/tests/integration/data/large_tokamak_IN.DAT index 40eea2ece1..6264f1f9eb 100644 --- a/tests/integration/data/large_tokamak_IN.DAT +++ b/tests/integration/data/large_tokamak_IN.DAT @@ -145,7 +145,7 @@ sig_tf_wp_max = 7.5E8 * Allowable maximum shear stress in TF coil conduit (Tr *---------------------* icc = 5 ixc = 6 * nd_plasma_electrons_vol_avg [m-3] -fdene = 1.2 * density limit constraint scale (constraint equation 5) +f_nd_plasma_electron_limit_max = 1.2 * density limit constraint scale (constraint equation 5) nd_plasma_electrons_vol_avg = 7.5E19 * Neutron wall load upper limit * diff --git a/tests/integration/data/large_tokamak_eval.IN.DAT b/tests/integration/data/large_tokamak_eval.IN.DAT index 9b41d2fe5a..a28dcc26d2 100644 --- a/tests/integration/data/large_tokamak_eval.IN.DAT +++ b/tests/integration/data/large_tokamak_eval.IN.DAT @@ -92,7 +92,7 @@ dr_shld_blkt_gap = 0.02 * gap between vacuum vessel and blanket (m) *---------------Constraint Variables---------------* b_tf_inboard_max = 14.0 * maximum peak toroidal field (T) (`constraint equation 25`) -fdene = 1.2 * density limit constraint scale (constraint equation 5) +f_nd_plasma_electron_limit_max = 1.2 * density limit constraint scale (constraint equation 5) fiooic = 0.65 fjohc = 0.6 fjohc0 = 0.6 diff --git a/tests/regression/input_files/large_tokamak_eval.IN.DAT b/tests/regression/input_files/large_tokamak_eval.IN.DAT index e11c591ae0..e93d26fac2 100644 --- a/tests/regression/input_files/large_tokamak_eval.IN.DAT +++ b/tests/regression/input_files/large_tokamak_eval.IN.DAT @@ -92,7 +92,7 @@ dr_shld_blkt_gap = 0.02 * gap between vacuum vessel and blanket (m) *---------------Constraint Variables---------------* b_tf_inboard_max = 14.0 * maximum peak toroidal field (T) (`constraint equation 25`) -fdene = 1.2 * density limit constraint scale (constraint equation 5) +f_nd_plasma_electron_limit_max = 1.2 * density limit constraint scale (constraint equation 5) fiooic = 0.65 * margin for TF coil operating current / critical current ratio fjohc = 0.6 * margin for central solenoid current at end-of-flattop fjohc0 = 0.6 * margin for central solenoid current at beginning of pulse diff --git a/tests/regression/input_files/large_tokamak_nof.IN.DAT b/tests/regression/input_files/large_tokamak_nof.IN.DAT index 663fd28fe5..33a3dda2a6 100644 --- a/tests/regression/input_files/large_tokamak_nof.IN.DAT +++ b/tests/regression/input_files/large_tokamak_nof.IN.DAT @@ -152,7 +152,7 @@ sig_tf_wp_max = 7.5E8 * Allowable maximum shear stress in TF coil conduit (Tr *---------------------* icc = 5 ixc = 6 * nd_plasma_electrons_vol_avg [m-3] -fdene = 1.2 * density limit constraint scale (constraint equation 5) +f_nd_plasma_electron_limit_max = 1.2 * density limit constraint scale (constraint equation 5) nd_plasma_electrons_vol_avg = 7.5E19 * Neutron wall load upper limit * diff --git a/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT b/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT index 03d4ab16ae..6e1b297bdc 100644 --- a/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT +++ b/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT @@ -181,10 +181,10 @@ beta_total_vol_avg = 3.71965626913446160e-02 ixc = 6 nd_plasma_electrons_vol_avg = 6.88360041658364314e+19 * DESCRIPTION: Electron density (/m3) -* JUSTIFICATION: Density is constrained by fdene +* JUSTIFICATION: Density is constrained by f_nd_plasma_electron_limit_max *ixc = 9 -fdene = 1.2 +f_nd_plasma_electron_limit_max = 1.2 *boundu(9) = 1.2 * DESCRIPTION: margin for density limit (used to set max greenwald fraction) * JUSTIFICATION: Used with icc=5 to enforce density limit From cb6db609ea27e68f23b85375fc8597ad8f492663 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 17:10:40 +0100 Subject: [PATCH 03/28] Fix constraint_equation_6 to use beta_poloidal_eps for improved accuracy --- process/core/solver/constraints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index 344d6a224d..094af3cd4d 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -428,7 +428,7 @@ def constraint_equation_6(constraint_registration, data): beta_poloidal: poloidal beta """ return leq( - (data.physics.eps * data.physics.beta_poloidal_vol_avg), + (data.physics.beta_poloidal_eps), data.physics.beta_poloidal_eps_max, constraint_registration, ) From 52012dd48943ef6b63154aa0402d91d618db7c70 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 17:14:28 +0100 Subject: [PATCH 04/28] Rename `aplasmin` to `rminor_min` for consistency and clarity across the codebase --- process/core/input.py | 2 +- process/core/io/obsolete_vars.py | 1 + process/core/solver/constraints.py | 4 ++-- process/data_structure/build_variables.py | 4 ++-- tests/regression/input_files/st_regression.IN.DAT | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/process/core/input.py b/process/core/input.py index 9e24c19122..6650ea3515 100644 --- a/process/core/input.py +++ b/process/core/input.py @@ -169,7 +169,7 @@ def __post_init__(self): "alstroh": InputVariable("pf_coil", float, range=(1000000.0, 100000000000.0)), "amortization": InputVariable("costs", float, range=(1.0, 50.0)), "anginc": InputVariable("divertor", float, range=(0.0, 1.5707)), - "aplasmin": InputVariable("build", float, range=(0.01, 10.0)), + "rminor_min": InputVariable("build", float, range=(0.01, 10.0)), "aux_build_h": InputVariable("buildings", float, range=(1.0, 100.0)), "aux_build_l": InputVariable("buildings", float, range=(10.0, 1000.0)), "aux_build_w": InputVariable("buildings", float, range=(10.0, 1000.0)), diff --git a/process/core/io/obsolete_vars.py b/process/core/io/obsolete_vars.py index c14ed1d363..1a21b62352 100644 --- a/process/core/io/obsolete_vars.py +++ b/process/core/io/obsolete_vars.py @@ -458,6 +458,7 @@ "coppera_m2_max": "tf_coppera_m2_max", "f_ster_div_single": None, "fradpwr": "f_p_plasma_separatrix_rad_max", + "aplasmin": "rminor_min", } OBS_VARS_HELP = { diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index 094af3cd4d..84a20c944d 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -640,11 +640,11 @@ def constraint_equation_21(constraint_registration, data): """Equation for minor radius lower limit rminor: plasma minor radius (m) - aplasmin: minimum minor radius (m) + rminor_min: minimum minor radius (m) """ return geq( data.physics.rminor, - data.build.aplasmin, + data.build.rminor_min, constraint_registration, ) diff --git a/process/data_structure/build_variables.py b/process/data_structure/build_variables.py index 7b0c16d3d0..85042bfe4d 100644 --- a/process/data_structure/build_variables.py +++ b/process/data_structure/build_variables.py @@ -11,8 +11,8 @@ class InboardBlanketConfiguration(IntEnum): @dataclass(slots=True) class BuildData: - aplasmin: float = 0.25 - """minimum minor radius (m)""" + rminor_min: float = 0.25 + """Minimum allowed minor radius (m)""" available_radial_space: float = 0.0 """Minimal radial space between plasma and coils (m)""" diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index ce7b7370d4..450e6e5343 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -166,9 +166,9 @@ aspect = 1.8 *icc = 21 * DESCRIPTION: Constraint equation for plasma minor radius lower limit * JUSTIFICATION: Turned off, dont care about lower limit -* VARIABLES: aplasmin (minimum minor radius (m)), rminor calculated in-situ +* VARIABLES: rminor_min (minimum minor radius (m)), rminor calculated in-situ -*aplasmin = 0 +*rminor_min = 0 * DESCRIPTION: Minimum minor radius (m) (icc=21) * JUSTIFICATION: Not used, using a defined minor radius From adfcb14750cdd1fcd4d572afac09c2fc7fe92fe2 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 17:27:42 +0100 Subject: [PATCH 05/28] Refactor beta variable names and descriptions for clarity and consistency in physics and constraint data structures --- process/core/solver/constraints.py | 11 ++----- .../data_structure/constraint_variables.py | 2 +- process/data_structure/physics_variables.py | 32 +++++++++---------- 3 files changed, 19 insertions(+), 26 deletions(-) diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index 84a20c944d..d53d17a16e 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -721,20 +721,13 @@ def constraint_equation_24(constraint_registration, data): value = data.physics.beta_total_vol_avg # Here, the beta limit applies to only the thermal component, not the fast alpha or neutral beam parts elif data.physics.i_beta_component == BetaComponentLimits.THERMAL: - value = ( - data.physics.beta_total_vol_avg - - data.physics.beta_fast_alpha - - data.physics.beta_beam - ) + value = data.physics.beta_thermal_vol_avg # Beta limit applies to thermal + neutral beam: components of the total beta, i.e. excludes alphas elif data.physics.i_beta_component == BetaComponentLimits.THERMAL_AND_BEAM: value = data.physics.beta_total_vol_avg - data.physics.beta_fast_alpha # Beta limit applies to toroidal beta elif data.physics.i_beta_component == BetaComponentLimits.TOROIDAL: - value = ( - data.physics.beta_total_vol_avg - * (data.physics.b_plasma_total / data.physics.b_plasma_toroidal_on_axis) ** 2 - ) + value = data.physics.beta_toroidal_vol_avg return leq( value, diff --git a/process/data_structure/constraint_variables.py b/process/data_structure/constraint_variables.py index c63b5d6bf6..44626e7243 100644 --- a/process/data_structure/constraint_variables.py +++ b/process/data_structure/constraint_variables.py @@ -7,7 +7,7 @@ class ConstraintData: """minimum auxiliary power (MW) (`constraint equation 40`)""" beta_poloidal_max: float = 0.19 - """maximum poloidal beta (`constraint equation 48`)""" + """Maximum allowed poloidal beta (⟨βₚ⟩<) (`constraint equation 48`)""" big_q_plasma_min: float = 10.0 """minimum fusion gain Q (`constraint equation 28`)""" diff --git a/process/data_structure/physics_variables.py b/process/data_structure/physics_variables.py index 43af54e6a7..f7408f0f7e 100644 --- a/process/data_structure/physics_variables.py +++ b/process/data_structure/physics_variables.py @@ -132,52 +132,52 @@ class PhysicsData: """multiplier for beam-background fusion calculation""" beta_total_vol_avg: float = 0.042 - """Volume averaged total plasma beta (`iteration variable 5`) (calculated if stellarator)""" + """Volume averaged total plasma beta (⟨β⟩) (`iteration variable 5`) (calculated if stellarator)""" beta_fast_alpha: float = 0.0 - """fast alpha beta component""" + """Fast alpha beta component (β_alpha)""" beta_vol_avg_max: float = 0.0 - """Max allowable volume averaged beta""" + """Max allowable volume averaged beta (⟨β⟩<)""" beta_vol_avg_min: float = 0.0 - """Minimum allowable volume averaged beta""" + """Minimum allowable volume averaged beta (⟨β⟩>)""" beta_beam: float = 0.0 - """neutral beam beta component""" + """Neutral beam beta component (β_beam)""" beta_poloidal_vol_avg: float = 0.0 - """poloidal beta""" + """Volume averaged poloidal beta (⟨βₚ⟩)""" beta_poloidal_eps: float = 0.0 - """Poloidal beta and inverse aspcet ratio product""" + """Poloidal beta and inverse aspcet ratio product (⟨βₚ⟩*ε)""" beta_toroidal_vol_avg: float = 0.0 - """Plasma volume averaged toroidal beta""" + """Volume averaged toroidal beta (⟨βₜ⟩)""" beta_thermal_toroidal_profile: list[float] = field(default_factory=list) - """toroidal beta profile""" + """Toroidal beta profile""" beta_thermal_vol_avg: float = 0.0 - """Plasma volume averaged thermal beta""" + """Volume averaged thermal beta (⟨βₜₕ⟩)""" beta_thermal_poloidal_vol_avg: float = 0.0 - """Plasma volume averaged poloidal thermal beta""" + """Volume averaged poloidal thermal beta (⟨βₚₜₕ⟩)""" beta_thermal_toroidal_vol_avg: float = 0.0 - """Plasma volume averaged toloidal thermal beta""" + """Volume averaged toroidal thermal beta (⟨βₜₕ⟩)""" beta_norm_total: float = 0.0 - """normaised total beta""" + """Normalised total beta (βₙ)""" beta_norm_thermal: float = 0.0 - """normaised thermal beta""" + """Normalised thermal beta (βₙₜₕ)""" beta_norm_toroidal: float = 0.0 - """normaised toroidal beta""" + """Normalised toroidal beta (βₙₜ)""" beta_norm_poloidal: float = 0.0 - """normaised poloidal beta""" + """Normalised poloidal beta (βₙₚ)""" e_plasma_beta_thermal: float = 0.0 """Plasma thermal energy derived from thermal beta""" From ac468365a4795f31efb9a35270ce9df6a2f6ef62 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 17:29:12 +0100 Subject: [PATCH 06/28] Update constraint_equation_25 to use b_tf_inboard_peak_with_ripple for improved accuracy --- process/core/solver/constraints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index d53d17a16e..943e1180f0 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -744,7 +744,7 @@ def constraint_equation_25(constraint_registration, data): b_tf_inboard_peak_symmetric: mean peak field at TF coil (T) """ return leq( - data.tfcoil.b_tf_inboard_peak_symmetric, + data.tfcoil.b_tf_inboard_peak_with_ripple, data.constraints.b_tf_inboard_max, constraint_registration, ) From 7d7749be01668230b19c115ae8c2ba83d9344c2f Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 17:33:04 +0100 Subject: [PATCH 07/28] Refactor temperature calculations in constraint equations to use constants.TEMP_ROOM for consistency --- process/core/constants.py | 3 +-- process/core/solver/constraints.py | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/process/core/constants.py b/process/core/constants.py index 100fe4d657..383fe8218a 100644 --- a/process/core/constants.py +++ b/process/core/constants.py @@ -269,8 +269,7 @@ """Density of Tungsten [kg/m3]""" TEMP_ROOM = 293.15 -""" Room temperature in Kelvin -Assume the room is at 20 degrees Celsius +""" Room temperature in Kelvin. Assuming the room is at 20 degrees Celsius """ RMU0 = 1.256637062e-6 diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index 943e1180f0..325a9907f2 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -1018,8 +1018,8 @@ def constraint_equation_43(constraint_registration, data): raise ProcessValueError("Do not use constraint 43 if itart=0") if data.tfcoil.i_tf_sup == TFConductorModel.WATER_COOLED_COPPER: - temp_cp_average = data.tfcoil.temp_cp_average - 273.15 - tcpav2 = data.tfcoil.tcpav2 - 273.15 + temp_cp_average = data.tfcoil.temp_cp_average - constants.TEMP_ROOM + tcpav2 = data.tfcoil.tcpav2 - constants.TEMP_ROOM else: temp_cp_average = data.tfcoil.temp_cp_average tcpav2 = data.tfcoil.tcpav2 @@ -1041,8 +1041,8 @@ def constraint_equation_44(constraint_registration, data): raise ProcessValueError("Do not use constraint 44 if itart=0") if data.tfcoil.i_tf_sup == TFConductorModel.WATER_COOLED_COPPER: # ! Copper case - temp_cp_max = data.tfcoil.temp_cp_max - 273.15 - temp_cp_peak = data.tfcoil.temp_cp_peak - 273.15 + temp_cp_max = data.tfcoil.temp_cp_max - constants.TEMP_ROOM + temp_cp_peak = data.tfcoil.temp_cp_peak - constants.TEMP_ROOM else: temp_cp_max = data.tfcoil.temp_cp_max temp_cp_peak = data.tfcoil.temp_cp_peak From 0d927d0a830bfa40d1f7c5386c6ae05e4650bd11 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 17:37:27 +0100 Subject: [PATCH 08/28] Rename `nflutf` to `flu_tf_neutron_fast_peak` for clarity and consistency across the codebase --- process/core/solver/constraints.py | 4 ++-- process/data_structure/fwbs_variables.py | 2 +- process/models/stellarator/stellarator.py | 16 ++++++++-------- .../regression/input_files/st_regression.IN.DAT | 2 +- .../unit/models/stellarator/test_stellarator.py | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index 325a9907f2..a4d1699a91 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -1159,10 +1159,10 @@ def constraint_equation_53(constraint_registration, data): """Equation for fast neutron fluence on TF coil upper limit nflutfmax: max fast neutron fluence on TF coil (n/m²) - nflutf: peak fast neutron fluence on TF coil superconductor (n/m²) + flu_tf_neutron_fast_peak: peak fast neutron fluence on TF coil superconductor (n/m²) """ return leq( - data.fwbs.nflutf, + data.fwbs.flu_tf_neutron_fast_peak, data.constraints.nflutfmax, constraint_registration, ) diff --git a/process/data_structure/fwbs_variables.py b/process/data_structure/fwbs_variables.py index 860161499e..0936ff3a6e 100644 --- a/process/data_structure/fwbs_variables.py +++ b/process/data_structure/fwbs_variables.py @@ -222,7 +222,7 @@ class FWBSData: - =2 'large' """ - nflutf: float = 0.0 + flu_tf_neutron_fast_peak: float = 0.0 """peak fast neutron fluence on TF coil superconductor [n m^-2] """ npdiv: int = 2 diff --git a/process/models/stellarator/stellarator.py b/process/models/stellarator/stellarator.py index f8ead7965b..ebfce3adb3 100644 --- a/process/models/stellarator/stellarator.py +++ b/process/models/stellarator/stellarator.py @@ -455,7 +455,7 @@ def blanket_neutronics(self): _, _, _, - self.data.fwbs.nflutf, + self.data.fwbs.flu_tf_neutron_fast_peak, _, _, _, @@ -701,7 +701,7 @@ def st_fwbs(self, output: bool): coilhtmx, dpacop, htheci, - self.data.fwbs.nflutf, + self.data.fwbs.flu_tf_neutron_fast_peak, pheci, pheco, ptfiwp, @@ -1441,8 +1441,8 @@ def st_fwbs(self, output: bool): po.ovarre( self.outfile, "Maximum neutron fluence (n/m2)", - "(nflutf)", - self.data.fwbs.nflutf, + "(flu_tf_neutron_fast_peak)", + self.data.fwbs.flu_tf_neutron_fast_peak, ) po.ovarre( self.outfile, @@ -1681,7 +1681,7 @@ def sc_tf_coil_nuclear_heating_iter90(self): copper stabiliser displacements/atom htheci : peak TF coil case heating (MW/m3) - nflutf : + flu_tf_neutron_fast_peak : maximum neutron fluence (n/m2) pheci : inboard coil case heating (MW) @@ -1708,7 +1708,7 @@ def sc_tf_coil_nuclear_heating_iter90(self): pheci = 0.0 pheco = 0.0 raddose = 0.0 - nflutf = 0.0 + flu_tf_neutron_fast_peak = 0.0 dpacop = 0.0 p_tf_nuclear_heat_mw = 0.0 @@ -1826,7 +1826,7 @@ def sc_tf_coil_nuclear_heating_iter90(self): # Maximum neutron fluence in superconductor (n/m**2) - nflutf = ( + flu_tf_neutron_fast_peak = ( fpsdt * fact[3] * self.data.physics.pflux_fw_neutron_mw @@ -1852,7 +1852,7 @@ def sc_tf_coil_nuclear_heating_iter90(self): coilhtmx, dpacop, htheci, - nflutf, + flu_tf_neutron_fast_peak, pheci, pheco, ptfiwp, diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index 450e6e5343..33078d4c00 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -1451,7 +1451,7 @@ tftmp = 20.0 *icc = 53 * DESCRIPTION: Constraint equation for fast neutron fluence on TF coil upper limit * JUSTIFICATION: Turned off, do not care about TF coil fluence. -* VARIABLES: nflutfmax(max fast neutron fluence on TF coil (n/m2)),nflutf calculated in situ +* VARIABLES: nflutfmax(max fast neutron fluence on TF coil (n/m2)),flu_tf_neutron_fast_peak calculated in situ * nflutfmax = * DESCRIPTION: max fast neutron fluence on TF coil (n/m2) (`blktmodel>0`) (`constraint equation 53`) diff --git a/tests/unit/models/stellarator/test_stellarator.py b/tests/unit/models/stellarator/test_stellarator.py index e999ef959f..49f0931905 100644 --- a/tests/unit/models/stellarator/test_stellarator.py +++ b/tests/unit/models/stellarator/test_stellarator.py @@ -2277,7 +2277,7 @@ def test_sctfcoil_nuclear_heating_iter90( coilhtmx, dpacop, htheci, - nflutf, + flu_tf_neutron_fast_peak, pheci, pheco, ptfiwp, @@ -2289,7 +2289,7 @@ def test_sctfcoil_nuclear_heating_iter90( assert coilhtmx == pytest.approx(sctfcoilnuclearheatingiter90param.expected_coilhtmx) assert dpacop == pytest.approx(sctfcoilnuclearheatingiter90param.expected_dpacop) assert htheci == pytest.approx(sctfcoilnuclearheatingiter90param.expected_htheci) - assert nflutf == pytest.approx(sctfcoilnuclearheatingiter90param.expected_nflutf) + assert flu_tf_neutron_fast_peak == pytest.approx(sctfcoilnuclearheatingiter90param.expected_nflutf) assert pheci == pytest.approx(sctfcoilnuclearheatingiter90param.expected_pheci) assert pheco == pytest.approx(sctfcoilnuclearheatingiter90param.expected_pheco) assert ptfiwp == pytest.approx(sctfcoilnuclearheatingiter90param.expected_ptfiwp) From ff8b981cffce807947593e00bedb45c38e7c99f1 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 17:40:26 +0100 Subject: [PATCH 09/28] Rename `nflutfmax` to `flu_tf_neutron_fast_max` for clarity and consistency across the codebase --- .../large_tokamak_varied_min_net_electric_IN.DAT | 2 +- examples/data/large_tokamak_varyrun_IN.DAT | 2 +- process/core/input.py | 2 +- process/core/io/obsolete_vars.py | 1 + process/core/io/plot/summary.py | 2 +- process/core/solver/constraints.py | 4 ++-- process/data_structure/constraint_variables.py | 4 ++-- process/models/availability.py | 8 ++++---- process/models/tfcoil/superconducting.py | 14 +++++++------- tests/integration/data/large_tokamak_eval.IN.DAT | 2 +- .../input_files/large_tokamak_eval.IN.DAT | 2 +- .../input_files/large_tokamak_nof.IN.DAT | 2 +- .../input_files/low_aspect_ratio_DEMO.IN.DAT | 2 +- tests/regression/input_files/st_regression.IN.DAT | 4 ++-- tests/unit/models/stellarator/test_stellarator.py | 4 +++- tests/unit/models/test_availability.py | 2 +- tests/unit/models/tfcoil/test_sctfcoil.py | 4 ++-- 17 files changed, 32 insertions(+), 29 deletions(-) diff --git a/examples/data/large_tokamak_varied_min_net_electric_IN.DAT b/examples/data/large_tokamak_varied_min_net_electric_IN.DAT index 62bca42a29..852d54e620 100644 --- a/examples/data/large_tokamak_varied_min_net_electric_IN.DAT +++ b/examples/data/large_tokamak_varied_min_net_electric_IN.DAT @@ -572,4 +572,4 @@ f_a_tf_turn_cable_space_extra_void = 0.3 i_tf_sc_mat = 1 * max fluence in the TF coil -nflutfmax = 1e22 +flu_tf_neutron_fast_maxutron_fast_max = 1e22 diff --git a/examples/data/large_tokamak_varyrun_IN.DAT b/examples/data/large_tokamak_varyrun_IN.DAT index 9aacab06e3..21ca8509a8 100644 --- a/examples/data/large_tokamak_varyrun_IN.DAT +++ b/examples/data/large_tokamak_varyrun_IN.DAT @@ -572,4 +572,4 @@ f_a_tf_turn_cable_space_extra_void = 0.3 i_tf_sc_mat = 1 * max fluence in the TF coil -nflutfmax = 1e22 +flu_tf_neutron_fast_maxutron_fast_max = 1e22 diff --git a/process/core/input.py b/process/core/input.py index 6650ea3515..bfe45192e1 100644 --- a/process/core/input.py +++ b/process/core/input.py @@ -590,7 +590,7 @@ def __post_init__(self): "nd_plasma_pedestal_electron": InputVariable("physics", float, range=(0.0, 1e21)), "nd_plasma_separatrix_electron": InputVariable("physics", float, range=(0.0, 1e21)), "i_nd_plasma_pedestal_separatrix": InputVariable("physics", int, choices=[0, 1]), - "nflutfmax": InputVariable("constraints", float, range=(0.0, 1e24)), + "flu_tf_neutron_fast_max": InputVariable("constraints", float, range=(0.0, 1e24)), "j_tf_coil_full_area": InputVariable("tfcoil", float, range=(10000.0, 1000000000.0)), "f_a_cs_turn_steel": InputVariable("pf_coil", float, range=(0.001, 0.999)), "f_z_cs_tf_internal": InputVariable("pf_coil", float, range=(0.0, 2.0)), diff --git a/process/core/io/obsolete_vars.py b/process/core/io/obsolete_vars.py index 1a21b62352..ef70f77b23 100644 --- a/process/core/io/obsolete_vars.py +++ b/process/core/io/obsolete_vars.py @@ -459,6 +459,7 @@ "f_ster_div_single": None, "fradpwr": "f_p_plasma_separatrix_rad_max", "aplasmin": "rminor_min", + "nflutfmax": "flu_tf_neutron_fast_max", } OBS_VARS_HELP = { diff --git a/process/core/io/plot/summary.py b/process/core/io/plot/summary.py index f70c1bb1cc..24babbe153 100644 --- a/process/core/io/plot/summary.py +++ b/process/core/io/plot/summary.py @@ -15641,7 +15641,7 @@ def main_plot( temp_quench_max=m_file.get("temp_tf_conductor_quench_max", scan=scan), cu_rrr=m_file.get("rrr_tf_cu", scan=scan), t_quench_detection=m_file.get("t_tf_quench_detection", scan=scan), - fluence=m_file.get("nflutfmax", scan=scan), + fluence=m_file.get("flu_tf_neutron_fast_max", scan=scan), j_operating=m_file.get("j_tf_wp", scan=scan), a_tf_turn_cable_space=m_file.get( "a_tf_turn_cable_space_no_void", scan=scan diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index a4d1699a91..477eaf7de1 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -1158,12 +1158,12 @@ def constraint_equation_52(constraint_registration, data): def constraint_equation_53(constraint_registration, data): """Equation for fast neutron fluence on TF coil upper limit - nflutfmax: max fast neutron fluence on TF coil (n/m²) + flu_tf_neutron_fast_max: max fast neutron fluence on TF coil (n/m²) flu_tf_neutron_fast_peak: peak fast neutron fluence on TF coil superconductor (n/m²) """ return leq( data.fwbs.flu_tf_neutron_fast_peak, - data.constraints.nflutfmax, + data.constraints.flu_tf_neutron_fast_max, constraint_registration, ) diff --git a/process/data_structure/constraint_variables.py b/process/data_structure/constraint_variables.py index 44626e7243..29aaf2b7c6 100644 --- a/process/data_structure/constraint_variables.py +++ b/process/data_structure/constraint_variables.py @@ -59,8 +59,8 @@ class ConstraintData: f_p_beam_shine_through_max: float = 1e-3 """maximum neutral beam shine-through fraction (`constraint equation 59`)""" - nflutfmax: float = 1.0e23 - """max fast neutron fluence on TF coil (n/m2) (`blktmodel>0`) (`constraint equation 53`) + flu_tf_neutron_fast_max: float = 1.0e23 + """Max allowed fast neutron fluence on TF coil (n/m²) (`blktmodel>0`) (`constraint equation 53`) Also used for demontable magnets (itart = 1) and superconducting coils (i_tf_sup = 1) and quench protection To set the CP lifetime (`constraint equation 85`) diff --git a/process/models/availability.py b/process/models/availability.py index aca0568a3f..f5a01d20c6 100644 --- a/process/models/availability.py +++ b/process/models/availability.py @@ -1337,9 +1337,9 @@ def avail_st(self, output: bool): if self.data.tfcoil.i_tf_sup == TFConductorModel.SUPERCONDUCTING: po.ovarre( self.outfile, - "Max fast neutron fluence on TF coil (n/m2)", - "(nflutfmax)", - self.data.constraints.nflutfmax, + "Max allowed fast neutron fluence on TF coil (n/m²)", + "(flu_tf_neutron_fast_max)", + self.data.constraints.flu_tf_neutron_fast_max, "OP ", ) po.ovarre( @@ -1463,7 +1463,7 @@ def cp_lifetime(self): if self.data.fwbs.neut_flux_cp <= 0.0 else min( ( - self.data.constraints.nflutfmax + self.data.constraints.flu_tf_neutron_fast_max / (self.data.fwbs.neut_flux_cp * YEAR_SECONDS) ), self.data.costs.life_plant, diff --git a/process/models/tfcoil/superconducting.py b/process/models/tfcoil/superconducting.py index 1af8bf61f1..0375fd7cc1 100644 --- a/process/models/tfcoil/superconducting.py +++ b/process/models/tfcoil/superconducting.py @@ -1054,8 +1054,8 @@ def output_tf_superconductor_info(self): po.ovarre( self.outfile, "Max allowed fast neutron fluence on TF coil (n/m²)", - "(nflutfmax)", - self.data.constraints.nflutfmax, + "(flu_tf_neutron_fast_max)", + self.data.constraints.flu_tf_neutron_fast_max, "OP ", ) po.ovarre( @@ -1211,7 +1211,7 @@ def quench_heat_protection_current_density( b_tf_inboard_peak: float, cu_rrr: float, t_tf_quench_detection: float, - nflutfmax: float, + flu_tf_neutron_fast_max: float, ) -> tuple[float, float]: """Calculates the maximum conductor current density limited by the protection limit, and the discharge voltage for a TF coil. @@ -1242,7 +1242,7 @@ def quench_heat_protection_current_density( Copper residual-resistance-ratio t_tf_quench_detection : float Quench detection time (s) - nflutfmax : float + flu_tf_neutron_fast_max : float End-of-life neutron fluence in the copper (1/m²) Returns @@ -1275,7 +1275,7 @@ def quench_heat_protection_current_density( temp_quench_max=temp_tf_conductor_quench_max, cu_rrr=cu_rrr, t_quench_detection=t_tf_quench_detection, - fluence=nflutfmax, + fluence=flu_tf_neutron_fast_max, ) ) @@ -2712,7 +2712,7 @@ def run(self, output: bool = False): b_tf_inboard_peak=self.data.tfcoil.b_tf_inboard_peak_with_ripple, cu_rrr=self.data.tfcoil.rrr_tf_cu, t_tf_quench_detection=self.data.tfcoil.t_tf_quench_detection, - nflutfmax=self.data.constraints.nflutfmax, + flu_tf_neutron_fast_max=self.data.constraints.flu_tf_neutron_fast_max, ) ) @@ -4360,7 +4360,7 @@ def run(self, output: bool = False): b_tf_inboard_peak=self.data.tfcoil.b_tf_inboard_peak_with_ripple, cu_rrr=self.data.tfcoil.rrr_tf_cu, t_tf_quench_detection=self.data.tfcoil.t_tf_quench_detection, - nflutfmax=self.data.constraints.nflutfmax, + flu_tf_neutron_fast_max=self.data.constraints.flu_tf_neutron_fast_max, ) ) diff --git a/tests/integration/data/large_tokamak_eval.IN.DAT b/tests/integration/data/large_tokamak_eval.IN.DAT index a28dcc26d2..6107d41ac3 100644 --- a/tests/integration/data/large_tokamak_eval.IN.DAT +++ b/tests/integration/data/large_tokamak_eval.IN.DAT @@ -382,7 +382,7 @@ temp_cs_superconductor_margin_min = 1.5 * minimum allowable temperature margin ; tmargmin = 1.5 * minimum allowable temperature margin ; TFC AND CS (K) v_tf_coil_dump_quench_max_kv = 10.0 * max voltage across TF coil during quench (kV) (`iteration variable 52`) f_a_tf_turn_cable_space_extra_void = 0.3 * coolant fraction of TFC 'cable' (`i_tf_sup=1`); or of TFC leg (`i_tf_ssup=0`) -nflutfmax = 1e22 * max fluence in the TF coil +flu_tf_neutron_fast_max = 1e22 * max fluence in the TF coil *-----------------Times Variables------------------* diff --git a/tests/regression/input_files/large_tokamak_eval.IN.DAT b/tests/regression/input_files/large_tokamak_eval.IN.DAT index e93d26fac2..1683fe6484 100644 --- a/tests/regression/input_files/large_tokamak_eval.IN.DAT +++ b/tests/regression/input_files/large_tokamak_eval.IN.DAT @@ -384,7 +384,7 @@ temp_cs_superconductor_margin_min = 1.5 * minimum allowable temperature margin ; tmargmin = 1.5 * minimum allowable temperature margin ; TFC AND CS (K) v_tf_coil_dump_quench_max_kv = 10.0 * max voltage across TF coil during quench (kV) (`iteration variable 52`) f_a_tf_turn_cable_space_extra_void = 0.3 * coolant fraction of TFC 'cable' (`i_tf_sup=1`); or of TFC leg (`i_tf_ssup=0`) -nflutfmax = 1e22 * max fluence in the TF coil +flu_tf_neutron_fast_max = 1e22 * max fluence in the TF coil *-----------------Times Variables------------------* diff --git a/tests/regression/input_files/large_tokamak_nof.IN.DAT b/tests/regression/input_files/large_tokamak_nof.IN.DAT index 33a3dda2a6..8e12a48daa 100644 --- a/tests/regression/input_files/large_tokamak_nof.IN.DAT +++ b/tests/regression/input_files/large_tokamak_nof.IN.DAT @@ -583,4 +583,4 @@ f_a_tf_turn_cable_space_extra_void = 0.3 i_tf_sc_mat = 1 * max fluence in the TF coil -nflutfmax = 1e22 +flu_tf_neutron_fast_max = 1e22 diff --git a/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT b/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT index 6e1b297bdc..75d38d97aa 100644 --- a/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT +++ b/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT @@ -635,7 +635,7 @@ bkt_life_csf = 1 * DESCRIPTION: Switch for whether blanket model feeds n_cycle_min * JUSTIFICATION: choose to make the constraint on blanket and CS the same -nflutfmax = 0.0 +flu_tf_neutron_fast_max = 0.0 * DESCRIPTION: max fast neutron fluence on TF coil (n/m2) used in quench protection * JUSTIFICATION: zero to align with older quench protection model diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index 33078d4c00..99b2227447 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -1451,9 +1451,9 @@ tftmp = 20.0 *icc = 53 * DESCRIPTION: Constraint equation for fast neutron fluence on TF coil upper limit * JUSTIFICATION: Turned off, do not care about TF coil fluence. -* VARIABLES: nflutfmax(max fast neutron fluence on TF coil (n/m2)),flu_tf_neutron_fast_peak calculated in situ +* VARIABLES: flu_tf_neutron_fast_max(max fast neutron fluence on TF coil (n/m2)),flu_tf_neutron_fast_peak calculated in situ -* nflutfmax = +* flu_tf_neutron_fast_max = * DESCRIPTION: max fast neutron fluence on TF coil (n/m2) (`blktmodel>0`) (`constraint equation 53`) * Also used for demontable magnets (itart = 1) and superconducting coils (i_tf_sup = 1) * To set the CP lifetime (`constraint equation 85`) diff --git a/tests/unit/models/stellarator/test_stellarator.py b/tests/unit/models/stellarator/test_stellarator.py index 49f0931905..d96f68a0e4 100644 --- a/tests/unit/models/stellarator/test_stellarator.py +++ b/tests/unit/models/stellarator/test_stellarator.py @@ -2289,7 +2289,9 @@ def test_sctfcoil_nuclear_heating_iter90( assert coilhtmx == pytest.approx(sctfcoilnuclearheatingiter90param.expected_coilhtmx) assert dpacop == pytest.approx(sctfcoilnuclearheatingiter90param.expected_dpacop) assert htheci == pytest.approx(sctfcoilnuclearheatingiter90param.expected_htheci) - assert flu_tf_neutron_fast_peak == pytest.approx(sctfcoilnuclearheatingiter90param.expected_nflutf) + assert flu_tf_neutron_fast_peak == pytest.approx( + sctfcoilnuclearheatingiter90param.expected_nflutf + ) assert pheci == pytest.approx(sctfcoilnuclearheatingiter90param.expected_pheci) assert pheco == pytest.approx(sctfcoilnuclearheatingiter90param.expected_pheco) assert ptfiwp == pytest.approx(sctfcoilnuclearheatingiter90param.expected_ptfiwp) diff --git a/tests/unit/models/test_availability.py b/tests/unit/models/test_availability.py index 61a7cd47d9..638d1bedd5 100644 --- a/tests/unit/models/test_availability.py +++ b/tests/unit/models/test_availability.py @@ -623,7 +623,7 @@ def test_cp_lifetime(monkeypatch, availability, i_tf_sup, exp): """ monkeypatch.setattr(availability.data.tfcoil, "i_tf_sup", i_tf_sup) - monkeypatch.setattr(availability.data.constraints, "nflutfmax", 1.0e23) + monkeypatch.setattr(availability.data.constraints, "flu_tf_neutron_fast_max", 1.0e23) monkeypatch.setattr(availability.data.fwbs, "neut_flux_cp", 5.0e14) monkeypatch.setattr(availability.data.costs, "cpstflnc", 20.0) monkeypatch.setattr(availability.data.physics, "pflux_fw_neutron_mw", 5.0) diff --git a/tests/unit/models/tfcoil/test_sctfcoil.py b/tests/unit/models/tfcoil/test_sctfcoil.py index 3634fbdc9d..a0b7708815 100644 --- a/tests/unit/models/tfcoil/test_sctfcoil.py +++ b/tests/unit/models/tfcoil/test_sctfcoil.py @@ -135,7 +135,7 @@ def test_protect(protectparam, sctfcoil): b_tf_inboard_peak=protectparam.peak_field, cu_rrr=protectparam.cu_rrr, t_tf_quench_detection=protectparam.detection_time, - nflutfmax=protectparam.fluence, + flu_tf_neutron_fast_max=protectparam.fluence, ) assert ajwpro == pytest.approx(protectparam.expected_ajwpro) @@ -377,7 +377,7 @@ def test_supercon(superconparam, monkeypatch, cicc_sctfcoil): ) monkeypatch.setattr( - cicc_sctfcoil.data.constraints, "nflutfmax", superconparam.fluence + cicc_sctfcoil.data.constraints, "flu_tf_neutron_fast_max", superconparam.fluence ) monkeypatch.setattr( From 93960a65b56bc5c8669b607c90f44e84573f4ed7 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 17:45:24 +0100 Subject: [PATCH 10/28] Rename `pseprmax` to `p_plasma_separatrix_rmajor_max_mw` for clarity and consistency; update related references in constraints and input files. --- process/core/input.py | 4 +++- process/core/io/obsolete_vars.py | 1 + process/core/solver/constraints.py | 11 ++++++----- process/data_structure/constraint_variables.py | 4 ++-- .../input_files/spherical_tokamak_eval.IN.DAT | 2 +- tests/regression/input_files/st_regression.IN.DAT | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/process/core/input.py b/process/core/input.py index bfe45192e1..52a2b0217f 100644 --- a/process/core/input.py +++ b/process/core/input.py @@ -639,7 +639,9 @@ def __post_init__(self): "pres_fw_coolant": InputVariable("fwbs", float, range=(100000.0, 100000000.0)), "prn1": InputVariable("divertor", float, range=(0.0, 1.0)), "psepbqarmax": InputVariable("constraints", float, range=(1.0, 50.0)), - "pseprmax": InputVariable("constraints", float, range=(1.0, 60.0)), + "p_plasma_separatrix_rmajor_max_mw": InputVariable( + "constraints", float, range=(1.0, 60.0) + ), "ptargf": InputVariable("ife", float, range=(0.1, 100.0)), "temp_cp_max": InputVariable("tfcoil", float, range=(4.0, 573.15)), "ptfnucmax": InputVariable("constraints", float, range=(1e-06, 1.0)), diff --git a/process/core/io/obsolete_vars.py b/process/core/io/obsolete_vars.py index ef70f77b23..73eecead89 100644 --- a/process/core/io/obsolete_vars.py +++ b/process/core/io/obsolete_vars.py @@ -460,6 +460,7 @@ "fradpwr": "f_p_plasma_separatrix_rad_max", "aplasmin": "rminor_min", "nflutfmax": "flu_tf_neutron_fast_max", + "pseprmax": "p_plasma_separatrix_rmajor_max_mw", } OBS_VARS_HELP = { diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index 477eaf7de1..206d8c418e 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -1184,15 +1184,16 @@ def constraint_equation_54(constraint_registration, data): @ConstraintManager.register_constraint(56, "MW/m", "<=") def constraint_equation_56(constraint_registration, data): - """Equation for power through separatrix / major radius upper limit + """Equation for Pₛₑₚ / R₀ upper limit - pseprmax: maximum ratio of power crossing the separatrix to plasma major radius (Psep/R) (MW/m) + p_plasma_separatrix_rmajor_max_mw: maximum ratio of power crossing the separatrix to + plasma major radius (Pₛₑₚ / R₀) [MW/m] p_plasma_separatrix_mw: power to be conducted to the divertor region (MW) - rmajor: plasma major radius (m) + """ return leq( - (data.physics.p_plasma_separatrix_mw / data.physics.rmajor), - data.constraints.pseprmax, + data.physics.p_plasma_separatrix_rmajor_mw, + data.constraints.p_plasma_separatrix_rmajor_max_mw, constraint_registration, ) diff --git a/process/data_structure/constraint_variables.py b/process/data_structure/constraint_variables.py index 29aaf2b7c6..ebdbbf222d 100644 --- a/process/data_structure/constraint_variables.py +++ b/process/data_structure/constraint_variables.py @@ -84,8 +84,8 @@ class ConstraintData: psepbqarmax: float = 9.5 """maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`)""" - pseprmax: float = 25.0 - """maximum ratio of power crossing the separatrix to plasma major radius (Psep/R) (MW/m) + p_plasma_separatrix_rmajor_max_mw: float = 25.0 + """Maximum allowed ratio of power crossing the separatrix to plasma major radius (Pₛₑₚ / R₀) [MW/m] (`constraint equation 56`) """ diff --git a/tests/regression/input_files/spherical_tokamak_eval.IN.DAT b/tests/regression/input_files/spherical_tokamak_eval.IN.DAT index 40f9065f20..2e7bb63b1e 100644 --- a/tests/regression/input_files/spherical_tokamak_eval.IN.DAT +++ b/tests/regression/input_files/spherical_tokamak_eval.IN.DAT @@ -100,7 +100,7 @@ i_bldgs_size = 0 * switch between routines estimating building sizes (0 = defaul pflux_fw_rad_max = 1.2 * Maximum permitted radiation wall load (MW/m^2) (`constraint equation 67`) f_fw_rad_max = 1.0 * peaking factor for radiation wall load (`constraint equation 67`) p_fusion_total_max_mw = 2500.0 * maximum fusion power (MW) (`constraint equation 9`) -pseprmax = 40.0 * maximum ratio of power crossing the separatrix to plasma major radius (Psep/R) (MW/m) +p_plasma_separatrix_rmajor_max_mw = 40.0 * maximum ratio of power crossing the separatrix to plasma major radius (Psep/R) (MW/m) f_alpha_energy_confinement_min = 5.0 * Lower limit on taup/taueff the ratio of alpha particle to energy confinement p_plant_electric_net_required_mw = 100.0 * minimum net electric diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index 99b2227447..075d84e1c4 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -691,7 +691,7 @@ icc = 56 * JUSTIFICATION: Divertor protection * VARIABLES: rmajor. p_plasma_separatrix_mw calculated in situ -pseprmax = 40.0 +p_plasma_separatrix_rmajor_max_mw = 40.0 * DESCRIPTION: Maximum ratio of Psep/R (MW/m) (icc=56) * JUSTIFICATION: From 26950dc52ab3b5c4440f45832d4b5a55e07756b2 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 17:48:04 +0100 Subject: [PATCH 11/28] Rename `avail_min` to `f_t_plant_available_min` for clarity and consistency; update related references in constraints, cost variables, and input files. --- process/core/input.py | 2 +- process/core/io/obsolete_vars.py | 1 + process/core/solver/constraints.py | 4 ++-- process/data_structure/cost_variables.py | 4 ++-- tests/regression/input_files/st_regression.IN.DAT | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/process/core/input.py b/process/core/input.py index 52a2b0217f..0ef273a5c4 100644 --- a/process/core/input.py +++ b/process/core/input.py @@ -177,7 +177,7 @@ def __post_init__(self): "auxcool_l": InputVariable("buildings", float, range=(10.0, 1000.0)), "auxcool_w": InputVariable("buildings", float, range=(10.0, 1000.0)), "p_hcd_injected_min_mw": InputVariable("constraints", float, range=(0.01, 100.0)), - "avail_min": InputVariable("costs", float, range=(0.0, 1.0)), + "f_t_plant_available_min": InputVariable("costs", float, range=(0.0, 1.0)), "b_crit_upper_nbti": InputVariable("tfcoil", float, range=(0.0, 30.0)), "p_plant_electric_base": InputVariable( "heat_transport", float, range=(1000000.0, 10000000000.0) diff --git a/process/core/io/obsolete_vars.py b/process/core/io/obsolete_vars.py index 73eecead89..a059a8bb19 100644 --- a/process/core/io/obsolete_vars.py +++ b/process/core/io/obsolete_vars.py @@ -461,6 +461,7 @@ "aplasmin": "rminor_min", "nflutfmax": "flu_tf_neutron_fast_max", "pseprmax": "p_plasma_separatrix_rmajor_max_mw", + "avail_min": "f_t_plant_available_min", } OBS_VARS_HELP = { diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index 206d8c418e..be9b109e3a 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -1231,11 +1231,11 @@ def constraint_equation_61(constraint_registration, data): """Equation for availability lower limit f_t_plant_available: Total plant availability fraction - avail_min: Minimum availability + f_t_plant_available_min: Minimum availability """ return geq( data.costs.f_t_plant_available, - data.costs.avail_min, + data.costs.f_t_plant_available_min, constraint_registration, ) diff --git a/process/data_structure/cost_variables.py b/process/data_structure/cost_variables.py index 3efd8bd58c..cc285feb60 100644 --- a/process/data_structure/cost_variables.py +++ b/process/data_structure/cost_variables.py @@ -406,8 +406,8 @@ class CostData: bktcycles: float = 1.0e3 """Number of fusion cycles to reach allowable DPA from DEMO fw/blanket lifetime calculation""" - avail_min: float = 0.75 - """Minimum availability (`constraint equation 61`)""" + f_t_plant_available_min: float = 0.75 + """Minimum allowed plant availability (`constraint equation 61`)""" tok_build_cost_per_vol: float = 1283.0 """Unit cost for tokamak complex buildings, including building and site services ($/m3)""" diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index 075d84e1c4..0f21b156d4 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -1638,7 +1638,7 @@ i_pf_conductor = 0 *icc = 60 * DESCRIPTION: Constraint equation for Central Solenoid s/c temperature margin lower limit * JUSTIFICATION: Turned off, do not care about temp lower limit -* VARIABLES: avail_min (Minimum availability), f_t_plant_available calculated in-situ +* VARIABLES: f_t_plant_available_min (Minimum availability), f_t_plant_available calculated in-situ *temp_cs_superconductor_margin_min = * DESCRIPTION: Minimum allowable temp margin: CS (K) (icc = 60) @@ -3166,7 +3166,7 @@ i_plant_availability = 0 * JUSTIFICATION: Turned off, do not care about availability limit * VARIABLES: temp_cs_superconductor_margin_min (Minimum allowable temperature margin in CS (K)), temp_cs_superconductor_margin calculated in-situ -*avail_min = +*f_t_plant_available_min = * DESCRIPTION: Minimum availability (`constraint equation 61`) * JUSTIFICATION: testing From 9e1e9d367cbdc978ddea44c7e28ff6ccae374902 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 17:54:53 +0100 Subject: [PATCH 12/28] Update f_alpha_energy_confinement_min description for clarity and consistency --- process/core/solver/constraints.py | 2 +- process/data_structure/constraint_variables.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index be9b109e3a..2da2ce1c45 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -1249,7 +1249,7 @@ def constraint_equation_62(constraint_registration, data): f_alpha_energy_confinement_min: Lower limit on f_alpha_energy_confinement the ratio of alpha particle to energy confinement times """ return geq( - data.physics.t_alpha_confinement / data.physics.t_energy_confinement, + data.physics.f_alpha_energy_confinement, data.constraints.f_alpha_energy_confinement_min, constraint_registration, ) diff --git a/process/data_structure/constraint_variables.py b/process/data_structure/constraint_variables.py index ebdbbf222d..5fda9071b4 100644 --- a/process/data_structure/constraint_variables.py +++ b/process/data_structure/constraint_variables.py @@ -108,7 +108,7 @@ class ConstraintData: """allowable neutron wall-load (MW/m2) (`constraint equation 8`)""" f_alpha_energy_confinement_min: float = 5.0 - """Lower limit on f_alpha_energy_confinement the ratio of alpha particle to energy confinement + """Minimum allowed value for f_alpha_energy_confinement, the ratio of alpha particle to energy confinement times (`constraint equation 62`) """ From 27557e2af78b6a1e18c474975447ea8aac1eb0fe Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 17:56:55 +0100 Subject: [PATCH 13/28] Rename `f_alpha_energy_confinement` to `f_t_alpha_energy_confinement` for clarity and consistency; update related references across multiple files. --- examples/data/large_tokamak_eval_IN.DAT | 2 +- .../data/large_tokamak_varied_min_net_electric_IN.DAT | 2 +- examples/data/large_tokamak_varyrun_IN.DAT | 2 +- process/core/io/plot/summary.py | 2 +- process/core/solver/constraints.py | 6 +++--- process/data_structure/constraint_variables.py | 2 +- process/data_structure/numerics.py | 2 +- process/data_structure/physics_variables.py | 4 ++-- process/models/physics/confinement_time.py | 6 +++--- process/models/physics/physics.py | 8 ++++---- process/models/stellarator/stellarator.py | 2 +- tests/integration/data/large_tokamak_eval.IN.DAT | 2 +- tests/regression/input_files/large_tokamak_eval.IN.DAT | 2 +- tests/regression/input_files/large_tokamak_nof.IN.DAT | 2 +- tests/regression/input_files/st_regression.IN.DAT | 2 +- tests/regression/input_files/stellarator_helias.IN.DAT | 2 +- 16 files changed, 24 insertions(+), 24 deletions(-) diff --git a/examples/data/large_tokamak_eval_IN.DAT b/examples/data/large_tokamak_eval_IN.DAT index 05c52c00ab..ef803c9f00 100644 --- a/examples/data/large_tokamak_eval_IN.DAT +++ b/examples/data/large_tokamak_eval_IN.DAT @@ -101,7 +101,7 @@ p_fusion_total_max_mw = 3000 * maximum fusion power (MW) (`constraint equation psepbqarmax = 10.0 * maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`) t_burn_min = 7200.0 * minimum burn time (s) (KE - no longer itv;; see issue #706) pflux_fw_neutron_max_mw = 2.0 * allowable neutron wall-load (MW/m2) (`constraint equation 8`) -f_alpha_energy_confinement_min = 5.0 * Lower limit on f_alpha_energy_confinement the ratio of alpha particle to energy confinement +f_alpha_energy_confinement_min = 5.0 * Lower limit on f_t_alpha_energy_confinementnt the ratio of alpha particle to energy confinement *-------------------Constraints--------------------* diff --git a/examples/data/large_tokamak_varied_min_net_electric_IN.DAT b/examples/data/large_tokamak_varied_min_net_electric_IN.DAT index 852d54e620..d5469d3558 100644 --- a/examples/data/large_tokamak_varied_min_net_electric_IN.DAT +++ b/examples/data/large_tokamak_varied_min_net_electric_IN.DAT @@ -104,7 +104,7 @@ tmargmin = 1.5 icc = 60 temp_cs_superconductor_margin_min = 1.5 -* Lower limit on f_alpha_energy_confinement (ratio alpha particle/energy confinement times) * +* Lower limit on f_t_alpha_energy_confinement (ratio alpha particle/energy confinement times) * *-------------------------------------------------------------------------------* icc = 62 f_alpha_energy_confinement_min = 5.0 diff --git a/examples/data/large_tokamak_varyrun_IN.DAT b/examples/data/large_tokamak_varyrun_IN.DAT index 21ca8509a8..e0c7b1f951 100644 --- a/examples/data/large_tokamak_varyrun_IN.DAT +++ b/examples/data/large_tokamak_varyrun_IN.DAT @@ -104,7 +104,7 @@ tmargmin = 1.5 icc = 60 temp_cs_superconductor_margin_min = 1.5 -* Lower limit on f_alpha_energy_confinement (ratio alpha particle/energy confinement times) * +* Lower limit on f_t_alpha_energy_confinement (ratio alpha particle/energy confinement times) * *-------------------------------------------------------------------------------* icc = 62 f_alpha_energy_confinement_min = 5.0 diff --git a/process/core/io/plot/summary.py b/process/core/io/plot/summary.py index 24babbe153..8ef10f6530 100644 --- a/process/core/io/plot/summary.py +++ b/process/core/io/plot/summary.py @@ -2819,7 +2819,7 @@ def plot_main_plasma_information( f"Lawson Triple product: {mfile.get('nttau', scan=scan):.4e} keV·s/m³\n" f"Transport loss power assumed in scaling law: {mfile.get('p_plasma_loss_mw', scan=scan):.4f} MW\n" f"Plasma thermal energy (inc. $\\alpha$), $W$: {mfile.get('e_plasma_beta', scan=scan) / 1e9:.4f} GJ\n" - f"Alpha particle confinement time: {mfile.get('t_alpha_confinement', scan=scan):.4f} s | $\\tau_{{\\alpha}}/\\tau_{{e}}$: {mfile.get('f_alpha_energy_confinement', scan=scan):.4f}" + f"Alpha particle confinement time: {mfile.get('t_alpha_confinement', scan=scan):.4f} s | $\\tau_{{\\alpha}}/\\tau_{{e}}$: {mfile.get('f_t_alpha_energy_confinement', scan=scan):.4f}" ) axis.text( diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index 2da2ce1c45..31631a40a7 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -1242,14 +1242,14 @@ def constraint_equation_61(constraint_registration, data): @ConstraintManager.register_constraint(62, "", ">=") def constraint_equation_62(constraint_registration, data): - """Lower limit on f_alpha_energy_confinement the ratio of alpha particle to energy confinement times + """Lower limit on f_t_alpha_energy_confinement the ratio of alpha particle to energy confinement times t_alpha_confinement: alpha particle confinement time (s) t_energy_confinement: global thermal energy confinement time (sec) - f_alpha_energy_confinement_min: Lower limit on f_alpha_energy_confinement the ratio of alpha particle to energy confinement times + f_alpha_energy_confinement_min: Lower limit on f_t_alpha_energy_confinement the ratio of alpha particle to energy confinement times """ return geq( - data.physics.f_alpha_energy_confinement, + data.physics.f_t_alpha_energy_confinement, data.constraints.f_alpha_energy_confinement_min, constraint_registration, ) diff --git a/process/data_structure/constraint_variables.py b/process/data_structure/constraint_variables.py index 5fda9071b4..5d12693fee 100644 --- a/process/data_structure/constraint_variables.py +++ b/process/data_structure/constraint_variables.py @@ -108,7 +108,7 @@ class ConstraintData: """allowable neutron wall-load (MW/m2) (`constraint equation 8`)""" f_alpha_energy_confinement_min: float = 5.0 - """Minimum allowed value for f_alpha_energy_confinement, the ratio of alpha particle to energy confinement + """Minimum allowed value for f_t_alpha_energy_confinement, the ratio of alpha particle to energy confinement times (`constraint equation 62`) """ diff --git a/process/data_structure/numerics.py b/process/data_structure/numerics.py index 427467d30e..754ea1d71e 100644 --- a/process/data_structure/numerics.py +++ b/process/data_structure/numerics.py @@ -321,7 +321,7 @@ class NumericsData: * (59) Neutral beam shine-through fraction upper limit (NBI) (itv 105,6,19,4 ) * (60) Central solenoid temperature margin lower limit (SCTF) (itv 106) * (61) Minimum availability value (itv 107) - * (62) f_alpha_energy_confinement the ratio of particle to energy confinement times (itv 110) + * (62) f_t_alpha_energy_confinement the ratio of particle to energy confinement times (itv 110) * (63) The number of ITER-like vacuum pumps n_iter_vacuum_pumps < tfno (itv 111) * (64) Zeff less than or equal to zeff_max (itv 112) * (65) Dump time set by VV loads (itv 56, 113) diff --git a/process/data_structure/physics_variables.py b/process/data_structure/physics_variables.py index f7408f0f7e..6f6bd400ee 100644 --- a/process/data_structure/physics_variables.py +++ b/process/data_structure/physics_variables.py @@ -977,8 +977,8 @@ class PhysicsData: t_alpha_confinement: float = 0.0 """alpha particle confinement time (sec)""" - f_alpha_energy_confinement: float = 0.0 - """alpha particle to energy confinement time ratio""" + f_t_alpha_energy_confinement: float = 0.0 + """Alpha particle to energy confinement time ratio""" temp_plasma_electron_vol_avg_kev: float = 12.9 """volume averaged electron temperature (keV) (`iteration variable 4`)""" diff --git a/process/models/physics/confinement_time.py b/process/models/physics/confinement_time.py index 8c0b3f7dcd..d48a16334f 100644 --- a/process/models/physics/confinement_time.py +++ b/process/models/physics/confinement_time.py @@ -1379,13 +1379,13 @@ def output_confinement_time_info(self): po.ovarrf( self.outfile, "Alpha particle to energy confinement time ratio (τ_α/τₑ)", # noqa: RUF001 - "(f_alpha_energy_confinement)", - self.data.physics.f_alpha_energy_confinement, + "(f_t_alpha_energy_confinement)", + self.data.physics.f_t_alpha_energy_confinement, "OP ", ) po.ovarrf( self.outfile, - "Lower limit on f_alpha_energy_confinement ((τ_α/τₑ)>)", # noqa: RUF001 + "Lower limit on f_t_alpha_energy_confinement ((τ_α/τₑ)>)", # noqa: RUF001 "(f_alpha_energy_confinement_min)", self.data.constraints.f_alpha_energy_confinement_min, ) diff --git a/process/models/physics/physics.py b/process/models/physics/physics.py index a22c163cf9..91dfb5eb7f 100644 --- a/process/models/physics/physics.py +++ b/process/models/physics/physics.py @@ -895,7 +895,7 @@ def run(self): self.data.physics.molflow_plasma_fuelling_required, self.data.physics.rndfuel, self.data.physics.t_alpha_confinement, - self.data.physics.f_alpha_energy_confinement, + self.data.physics.f_t_alpha_energy_confinement, ) = self.phyaux( self.data.physics.aspect, self.data.physics.nd_plasma_fuel_ions_vol_avg, @@ -1445,7 +1445,7 @@ def phyaux( (nucleus-pairs/sec). - rndfuel (float): Fuel burnup rate (reactions/s). - t_alpha_confinement (float): Alpha particle confinement time (s). - - f_alpha_energy_confinement (float): Fraction of alpha energy confinement. + - f_t_alpha_energy_confinement (float): Fraction of alpha energy confinement. This subroutine calculates extra physics related items needed by other parts of the code. @@ -1491,7 +1491,7 @@ def phyaux( # Required fuelling rate (fuel ion pairs/second) (previously Amps) molflow_plasma_fuelling_required = rndfuel / burnup - f_alpha_energy_confinement = t_alpha_confinement / t_energy_confinement + f_t_alpha_energy_confinement = t_alpha_confinement / t_energy_confinement return ( burnup, @@ -1500,7 +1500,7 @@ def phyaux( molflow_plasma_fuelling_required, rndfuel, t_alpha_confinement, - f_alpha_energy_confinement, + f_t_alpha_energy_confinement, ) @staticmethod diff --git a/process/models/stellarator/stellarator.py b/process/models/stellarator/stellarator.py index ebfce3adb3..120f3510ab 100644 --- a/process/models/stellarator/stellarator.py +++ b/process/models/stellarator/stellarator.py @@ -2290,7 +2290,7 @@ def st_phys(self, output): self.data.physics.molflow_plasma_fuelling_required, self.data.physics.rndfuel, self.data.physics.t_alpha_confinement, - self.data.physics.f_alpha_energy_confinement, + self.data.physics.f_t_alpha_energy_confinement, ) = self.physics.phyaux( self.data.physics.aspect, self.data.physics.nd_plasma_fuel_ions_vol_avg, diff --git a/tests/integration/data/large_tokamak_eval.IN.DAT b/tests/integration/data/large_tokamak_eval.IN.DAT index 6107d41ac3..722fc97b63 100644 --- a/tests/integration/data/large_tokamak_eval.IN.DAT +++ b/tests/integration/data/large_tokamak_eval.IN.DAT @@ -101,7 +101,7 @@ p_fusion_total_max_mw = 3000 * maximum fusion power (MW) (`constraint equation psepbqarmax = 10.0 * maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`) t_burn_min = 7200.0 * minimum burn time (s) (KE - no longer itv;; see issue #706) pflux_fw_neutron_max_mw = 2.0 * allowable neutron wall-load (MW/m2) (`constraint equation 8`) -f_alpha_energy_confinement_min = 5.0 * Lower limit on f_alpha_energy_confinement the ratio of alpha particle to energy confinement +f_alpha_energy_confinement_min = 5.0 * Lower limit on f_t_alpha_energy_confinement the ratio of alpha particle to energy confinement *-------------------Constraints--------------------* diff --git a/tests/regression/input_files/large_tokamak_eval.IN.DAT b/tests/regression/input_files/large_tokamak_eval.IN.DAT index 1683fe6484..7ab9076d13 100644 --- a/tests/regression/input_files/large_tokamak_eval.IN.DAT +++ b/tests/regression/input_files/large_tokamak_eval.IN.DAT @@ -101,7 +101,7 @@ p_fusion_total_max_mw = 3000 * maximum fusion power (MW) (`constraint equation psepbqarmax = 10.0 * maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`) t_burn_min = 7200.0 * minimum burn time (s) (KE - no longer itv;; see issue #706) pflux_fw_neutron_max_mw = 2.0 * allowable neutron wall-load (MW/m2) (`constraint equation 8`) -f_alpha_energy_confinement_min = 5.0 * Lower limit on f_alpha_energy_confinement the ratio of alpha particle to energy confinement +f_alpha_energy_confinement_min = 5.0 * Lower limit on f_t_alpha_energy_confinement the ratio of alpha particle to energy confinement *-------------------Constraints--------------------* diff --git a/tests/regression/input_files/large_tokamak_nof.IN.DAT b/tests/regression/input_files/large_tokamak_nof.IN.DAT index 8e12a48daa..53c535542c 100644 --- a/tests/regression/input_files/large_tokamak_nof.IN.DAT +++ b/tests/regression/input_files/large_tokamak_nof.IN.DAT @@ -114,7 +114,7 @@ tmargmin = 1.5 icc = 60 temp_cs_superconductor_margin_min = 1.5 -* Lower limit on f_alpha_energy_confinement (ratio alpha particle/energy confinement times) * +* Lower limit on f_t_alpha_energy_confinement (ratio alpha particle/energy confinement times) * *-------------------------------------------------------------------------------* icc = 62 f_alpha_energy_confinement_min = 5.0 diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index 0f21b156d4..1b683bc554 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -412,7 +412,7 @@ icc = 15 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ icc = 62 -* DESCRIPTION: f_alpha_energy_confinement ratio of particle to energy confinement times +* DESCRIPTION: f_t_alpha_energy_confinement ratio of particle to energy confinement times * JUSTIFICATION: Used to constrain helium fraction * VARIABLES: t_energy_confinement,t_alpha_confinement calculated in-situ diff --git a/tests/regression/input_files/stellarator_helias.IN.DAT b/tests/regression/input_files/stellarator_helias.IN.DAT index b234c8389d..e4a8352f80 100644 --- a/tests/regression/input_files/stellarator_helias.IN.DAT +++ b/tests/regression/input_files/stellarator_helias.IN.DAT @@ -44,7 +44,7 @@ icc = 82 * icc_toroidalbuild * Radial build consistency for stellarators (itv 172 f_avspace) icc = 83 * icc_placeforblanket -* f_alpha_energy_confinement the ratio of particle to energy confinement times (itv 110) +* f_t_alpha_energy_confinement the ratio of particle to energy confinement times (itv 110) icc = 62 * icc_thermalHe f_alpha_energy_confinement_min = 4 * tau_He/tau_E From 8c34c36142fbf8e0f64edcd0358599f3f56128e8 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 17:58:38 +0100 Subject: [PATCH 14/28] Rename `f_alpha_energy_confinement_min` to `f_t_alpha_energy_confinement_min` for clarity and consistency; update all related references across multiple files. --- documentation/source/fusion-devices/stellarator.md | 2 +- documentation/source/physics-models/plasma_confinement.md | 2 +- examples/data/large_tokamak_eval_IN.DAT | 2 +- examples/data/large_tokamak_varied_min_net_electric_IN.DAT | 2 +- examples/data/large_tokamak_varyrun_IN.DAT | 2 +- process/core/input.py | 2 +- process/core/io/obsolete_vars.py | 3 ++- process/core/io/plot/scans.py | 2 +- process/core/io/variable_metadata.py | 2 +- process/core/scan.py | 6 +++--- process/core/solver/constraints.py | 4 ++-- process/data_structure/constraint_variables.py | 2 +- process/data_structure/scan_variables.py | 2 +- process/models/physics/confinement_time.py | 4 ++-- tests/integration/data/large_tokamak_eval.IN.DAT | 2 +- tests/regression/input_files/large_tokamak_eval.IN.DAT | 2 +- tests/regression/input_files/large_tokamak_nof.IN.DAT | 2 +- tests/regression/input_files/spherical_tokamak_eval.IN.DAT | 2 +- tests/regression/input_files/st_regression.IN.DAT | 2 +- tests/regression/input_files/stellarator_helias.IN.DAT | 2 +- 20 files changed, 25 insertions(+), 24 deletions(-) diff --git a/documentation/source/fusion-devices/stellarator.md b/documentation/source/fusion-devices/stellarator.md index 08efebf285..41eace1cd6 100644 --- a/documentation/source/fusion-devices/stellarator.md +++ b/documentation/source/fusion-devices/stellarator.md @@ -74,7 +74,7 @@ ixc = 10 * "ISS04 Renormalization Factor" (can also be fixed) ixc = 50 * Coil current density, aka winding pack thickness (required!) ixc = 59 * Winding Pack copper fraction ixc = 56 * Exponential Quench Dumping Time -ixc = 109 * Thermal alpha particle pressure (iterated to consistency, use together with `f_alpha_energy_confinement_min`) +ixc = 109 * Thermal alpha particle pressure (iterated to consistency, use together with `f_t_alpha_energy_confinement_min`) ixc = 169 * Achievable Temperature of the ECRH at the ignition point ``` diff --git a/documentation/source/physics-models/plasma_confinement.md b/documentation/source/physics-models/plasma_confinement.md index 0ff4ec3e9e..7746d3954c 100644 --- a/documentation/source/physics-models/plasma_confinement.md +++ b/documentation/source/physics-models/plasma_confinement.md @@ -705,7 +705,7 @@ The constraint uses the loss power and thermal densities hence the inclusion of This constraint can be activated by stating `icc = 62` in the input file. -The value of `f_alpha_energy_confinement_min` can be set to the desired minimum total ratio between the alpha confinement and energy confinement times. +The value of `f_t_alpha_energy_confinement_min` can be set to the desired minimum total ratio between the alpha confinement and energy confinement times. [^1]: N. A. Uckan, International Atomic Energy Agency, Vienna (Austria) and ITER Physics Group, "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990. [^2]: T.C. Hender et al., 'Physics Assessment of the European Reactor Study', AEA FUS 172, 1992. diff --git a/examples/data/large_tokamak_eval_IN.DAT b/examples/data/large_tokamak_eval_IN.DAT index ef803c9f00..584ee133e8 100644 --- a/examples/data/large_tokamak_eval_IN.DAT +++ b/examples/data/large_tokamak_eval_IN.DAT @@ -101,7 +101,7 @@ p_fusion_total_max_mw = 3000 * maximum fusion power (MW) (`constraint equation psepbqarmax = 10.0 * maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`) t_burn_min = 7200.0 * minimum burn time (s) (KE - no longer itv;; see issue #706) pflux_fw_neutron_max_mw = 2.0 * allowable neutron wall-load (MW/m2) (`constraint equation 8`) -f_alpha_energy_confinement_min = 5.0 * Lower limit on f_t_alpha_energy_confinementnt the ratio of alpha particle to energy confinement +f_t_alpha_energy_confinement_min = 5.0 * Lower limit on f_t_alpha_energy_confinementnt the ratio of alpha particle to energy confinement *-------------------Constraints--------------------* diff --git a/examples/data/large_tokamak_varied_min_net_electric_IN.DAT b/examples/data/large_tokamak_varied_min_net_electric_IN.DAT index d5469d3558..b1dd1fc48e 100644 --- a/examples/data/large_tokamak_varied_min_net_electric_IN.DAT +++ b/examples/data/large_tokamak_varied_min_net_electric_IN.DAT @@ -107,7 +107,7 @@ temp_cs_superconductor_margin_min = 1.5 * Lower limit on f_t_alpha_energy_confinement (ratio alpha particle/energy confinement times) * *-------------------------------------------------------------------------------* icc = 62 -f_alpha_energy_confinement_min = 5.0 +f_t_alpha_energy_confinement_min = 5.0 * dump time constraint for VV stresses * *--------------------------------------* diff --git a/examples/data/large_tokamak_varyrun_IN.DAT b/examples/data/large_tokamak_varyrun_IN.DAT index e0c7b1f951..9e4abd1079 100644 --- a/examples/data/large_tokamak_varyrun_IN.DAT +++ b/examples/data/large_tokamak_varyrun_IN.DAT @@ -107,7 +107,7 @@ temp_cs_superconductor_margin_min = 1.5 * Lower limit on f_t_alpha_energy_confinement (ratio alpha particle/energy confinement times) * *-------------------------------------------------------------------------------* icc = 62 -f_alpha_energy_confinement_min = 5.0 +f_t_alpha_energy_confinement_min = 5.0 * dump time constraint for VV stresses * *--------------------------------------* diff --git a/process/core/input.py b/process/core/input.py index 0ef273a5c4..3df543bede 100644 --- a/process/core/input.py +++ b/process/core/input.py @@ -385,7 +385,7 @@ def __post_init__(self): "tfcoil", float, range=(100000000.0, 10000000000000.0) ), "f_a_tf_cool_outboard": InputVariable("tfcoil", float, range=(0.0, 1.0)), - "f_alpha_energy_confinement_min": InputVariable( + "f_t_alpha_energy_confinement_min": InputVariable( "constraints", float, range=(1.0, 100.0) ), "f_asym": InputVariable("stellarator", float, range=(0.9, 2.0)), diff --git a/process/core/io/obsolete_vars.py b/process/core/io/obsolete_vars.py index a059a8bb19..c2a77317cc 100644 --- a/process/core/io/obsolete_vars.py +++ b/process/core/io/obsolete_vars.py @@ -182,7 +182,7 @@ "d_vv_in": "dr_vv_inboard", "d_vv_out": "dr_vv_outboard", "iblnkith": "i_blkt_inboard", - "taulimit": "f_alpha_energy_confinement_min", + "taulimit": "f_t_alpha_energy_confinement_min", "isc": "i_confinement_time", "iradloss": "i_rad_loss", "iinvqd": None, @@ -462,6 +462,7 @@ "nflutfmax": "flu_tf_neutron_fast_max", "pseprmax": "p_plasma_separatrix_rmajor_max_mw", "avail_min": "f_t_plant_available_min", + "f_alpha_energy_confinement_min": "f_t_alpha_energy_confinement_min", } OBS_VARS_HELP = { diff --git a/process/core/io/plot/scans.py b/process/core/io/plot/scans.py index 09d7ea0d62..0ea06cb267 100644 --- a/process/core/io/plot/scans.py +++ b/process/core/io/plot/scans.py @@ -107,7 +107,7 @@ def plot_scan( 28: "b_plasma_toroidal_on_axis", 29: "radius_plasma_core_norm", 30: "", # OBSOLETE - 31: "f_alpha_energy_confinement_min", + 31: "f_t_alpha_energy_confinement_min", 32: "epsvmc", 33: "ttarget", 34: "qtargettotal", diff --git a/process/core/io/variable_metadata.py b/process/core/io/variable_metadata.py index aed8636100..69795448e7 100644 --- a/process/core/io/variable_metadata.py +++ b/process/core/io/variable_metadata.py @@ -54,7 +54,7 @@ class VariableMetadata: description="Average electron temperature", units="keV", ), - "f_alpha_energy_confinement_min": VariableMetadata( + "f_t_alpha_energy_confinement_min": VariableMetadata( latex=r"$max : \frac{\tau_\mathrm{\alpha}}{\tau_\mathrm{E}}$", description="Ratio of alpha heating time to energy confinement time", units="", diff --git a/process/core/scan.py b/process/core/scan.py index b2da1471e0..4abb9609da 100644 --- a/process/core/scan.py +++ b/process/core/scan.py @@ -88,8 +88,8 @@ def _missing_(cls, var): "b_plasma_toroidal_on_axis", "Tor._field_on_axis_(T)", 28 ) coreradius = ScanVariable("coreradius", "Core_radius", 29) - f_alpha_energy_confinement_min = ScanVariable( - "f_alpha_energy_confinement_min", "t_alpha_confinement/taueff_lower_limit", 31 + f_t_alpha_energy_confinement_min = ScanVariable( + "f_t_alpha_energy_confinement_min", "t_alpha_confinement/taueff_lower_limit", 31 ) epsvmc = ScanVariable("epsvmc", "VMCON error tolerance", 32) boundu129 = ScanVariable("boundu(129)", " Neon upper limit", 38) @@ -1150,7 +1150,7 @@ def scan_select(self, nwp, swp, iscn): case 29: self.data.impurity_radiation.radius_plasma_core_norm = swp[iscn - 1] case 31: - self.data.constraints.f_alpha_energy_confinement_min = swp[iscn - 1] + self.data.constraints.f_t_alpha_energy_confinement_min = swp[iscn - 1] case 32: self.data.numerics.epsvmc = swp[iscn - 1] case 38: diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index 31631a40a7..d30e3f67fd 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -1246,11 +1246,11 @@ def constraint_equation_62(constraint_registration, data): t_alpha_confinement: alpha particle confinement time (s) t_energy_confinement: global thermal energy confinement time (sec) - f_alpha_energy_confinement_min: Lower limit on f_t_alpha_energy_confinement the ratio of alpha particle to energy confinement times + f_t_alpha_energy_confinement_min: Lower limit on f_t_alpha_energy_confinement the ratio of alpha particle to energy confinement times """ return geq( data.physics.f_t_alpha_energy_confinement, - data.constraints.f_alpha_energy_confinement_min, + data.constraints.f_t_alpha_energy_confinement_min, constraint_registration, ) diff --git a/process/data_structure/constraint_variables.py b/process/data_structure/constraint_variables.py index 5d12693fee..1857b1d029 100644 --- a/process/data_structure/constraint_variables.py +++ b/process/data_structure/constraint_variables.py @@ -107,7 +107,7 @@ class ConstraintData: pflux_fw_neutron_max_mw: float = 1.0 """allowable neutron wall-load (MW/m2) (`constraint equation 8`)""" - f_alpha_energy_confinement_min: float = 5.0 + f_t_alpha_energy_confinement_min: float = 5.0 """Minimum allowed value for f_t_alpha_energy_confinement, the ratio of alpha particle to energy confinement times (`constraint equation 62`) """ diff --git a/process/data_structure/scan_variables.py b/process/data_structure/scan_variables.py index 9e8703ffbe..2a9fb041df 100644 --- a/process/data_structure/scan_variables.py +++ b/process/data_structure/scan_variables.py @@ -63,7 +63,7 @@ class ScanData:
  • 28 b_plasma_toroidal_on_axis
  • 29 radius_plasma_core_norm
  • 30 fimpvar # OBSOLETE -
  • 31 f_alpha_energy_confinement_min +
  • 31 f_t_alpha_energy_confinement_min
  • 32 epsvmc
  • 33 ttarget
  • 34 qtargettotal diff --git a/process/models/physics/confinement_time.py b/process/models/physics/confinement_time.py index d48a16334f..3068cb39ee 100644 --- a/process/models/physics/confinement_time.py +++ b/process/models/physics/confinement_time.py @@ -1386,8 +1386,8 @@ def output_confinement_time_info(self): po.ovarrf( self.outfile, "Lower limit on f_t_alpha_energy_confinement ((τ_α/τₑ)>)", # noqa: RUF001 - "(f_alpha_energy_confinement_min)", - self.data.constraints.f_alpha_energy_confinement_min, + "(f_t_alpha_energy_confinement_min)", + self.data.constraints.f_t_alpha_energy_confinement_min, ) po.oblnkl(self.outfile) diff --git a/tests/integration/data/large_tokamak_eval.IN.DAT b/tests/integration/data/large_tokamak_eval.IN.DAT index 722fc97b63..6b89e3964d 100644 --- a/tests/integration/data/large_tokamak_eval.IN.DAT +++ b/tests/integration/data/large_tokamak_eval.IN.DAT @@ -101,7 +101,7 @@ p_fusion_total_max_mw = 3000 * maximum fusion power (MW) (`constraint equation psepbqarmax = 10.0 * maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`) t_burn_min = 7200.0 * minimum burn time (s) (KE - no longer itv;; see issue #706) pflux_fw_neutron_max_mw = 2.0 * allowable neutron wall-load (MW/m2) (`constraint equation 8`) -f_alpha_energy_confinement_min = 5.0 * Lower limit on f_t_alpha_energy_confinement the ratio of alpha particle to energy confinement +f_t_alpha_energy_confinement_min = 5.0 * Lower limit on f_t_alpha_energy_confinement the ratio of alpha particle to energy confinement *-------------------Constraints--------------------* diff --git a/tests/regression/input_files/large_tokamak_eval.IN.DAT b/tests/regression/input_files/large_tokamak_eval.IN.DAT index 7ab9076d13..8de83649ad 100644 --- a/tests/regression/input_files/large_tokamak_eval.IN.DAT +++ b/tests/regression/input_files/large_tokamak_eval.IN.DAT @@ -101,7 +101,7 @@ p_fusion_total_max_mw = 3000 * maximum fusion power (MW) (`constraint equation psepbqarmax = 10.0 * maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`) t_burn_min = 7200.0 * minimum burn time (s) (KE - no longer itv;; see issue #706) pflux_fw_neutron_max_mw = 2.0 * allowable neutron wall-load (MW/m2) (`constraint equation 8`) -f_alpha_energy_confinement_min = 5.0 * Lower limit on f_t_alpha_energy_confinement the ratio of alpha particle to energy confinement +f_t_alpha_energy_confinement_min = 5.0 * Lower limit on f_t_alpha_energy_confinement the ratio of alpha particle to energy confinement *-------------------Constraints--------------------* diff --git a/tests/regression/input_files/large_tokamak_nof.IN.DAT b/tests/regression/input_files/large_tokamak_nof.IN.DAT index 53c535542c..858003bacb 100644 --- a/tests/regression/input_files/large_tokamak_nof.IN.DAT +++ b/tests/regression/input_files/large_tokamak_nof.IN.DAT @@ -117,7 +117,7 @@ temp_cs_superconductor_margin_min = 1.5 * Lower limit on f_t_alpha_energy_confinement (ratio alpha particle/energy confinement times) * *-------------------------------------------------------------------------------* icc = 62 -f_alpha_energy_confinement_min = 5.0 +f_t_alpha_energy_confinement_min = 5.0 * dump time constraint for VV stresses * *--------------------------------------* diff --git a/tests/regression/input_files/spherical_tokamak_eval.IN.DAT b/tests/regression/input_files/spherical_tokamak_eval.IN.DAT index 2e7bb63b1e..22d59307f8 100644 --- a/tests/regression/input_files/spherical_tokamak_eval.IN.DAT +++ b/tests/regression/input_files/spherical_tokamak_eval.IN.DAT @@ -101,7 +101,7 @@ pflux_fw_rad_max = 1.2 * Maximum permitted radiation wall load (MW/m^2) (`constr f_fw_rad_max = 1.0 * peaking factor for radiation wall load (`constraint equation 67`) p_fusion_total_max_mw = 2500.0 * maximum fusion power (MW) (`constraint equation 9`) p_plasma_separatrix_rmajor_max_mw = 40.0 * maximum ratio of power crossing the separatrix to plasma major radius (Psep/R) (MW/m) -f_alpha_energy_confinement_min = 5.0 * Lower limit on taup/taueff the ratio of alpha particle to energy confinement +f_t_alpha_energy_confinement_min = 5.0 * Lower limit on taup/taueff the ratio of alpha particle to energy confinement p_plant_electric_net_required_mw = 100.0 * minimum net electric *-------------------Constraints--------------------* diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index 1b683bc554..46130efae1 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -416,7 +416,7 @@ icc = 62 * JUSTIFICATION: Used to constrain helium fraction * VARIABLES: t_energy_confinement,t_alpha_confinement calculated in-situ -f_alpha_energy_confinement_min = 5.0 +f_t_alpha_energy_confinement_min = 5.0 * DESCRIPTION: Ratio of Alpha Particle to Energy Confinement times (icc=62) * JUSTIFICATION: Default based on JET diff --git a/tests/regression/input_files/stellarator_helias.IN.DAT b/tests/regression/input_files/stellarator_helias.IN.DAT index e4a8352f80..96426a3033 100644 --- a/tests/regression/input_files/stellarator_helias.IN.DAT +++ b/tests/regression/input_files/stellarator_helias.IN.DAT @@ -46,7 +46,7 @@ icc = 83 * icc_placeforblanket * f_t_alpha_energy_confinement the ratio of particle to energy confinement times (itv 110) icc = 62 * icc_thermalHe -f_alpha_energy_confinement_min = 4 * tau_He/tau_E +f_t_alpha_energy_confinement_min = 4 * tau_He/tau_E *** QUENCH LIMITS *** From a6ed966c9c5a92ea689aa60ae37b420d0ee3b167 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 18:02:31 +0100 Subject: [PATCH 15/28] Rename `zeff_max` to `n_charge_plasma_effective_vol_avg_max` for clarity and consistency; update all related references across multiple files. --- process/core/input.py | 4 +++- process/core/io/obsolete_vars.py | 3 ++- process/core/solver/constraints.py | 4 ++-- process/data_structure/constraint_variables.py | 2 +- process/data_structure/numerics.py | 2 +- tests/regression/input_files/st_regression.IN.DAT | 4 ++-- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/process/core/input.py b/process/core/input.py index 3df543bede..045de20440 100644 --- a/process/core/input.py +++ b/process/core/input.py @@ -945,7 +945,9 @@ def __post_init__(self): "wsvfac": InputVariable("buildings", float, range=(0.9, 3.0)), "xi_ebw": InputVariable("current_drive", float, range=(0.0, 1.0)), "xpertin": InputVariable("divertor", float, range=(0.0, 10.0)), - "zeff_max": InputVariable("constraints", float, range=(1.0, 10.0)), + "n_charge_plasma_effective_vol_avg_max": InputVariable( + "constraints", float, range=(1.0, 10.0) + ), "blktmodel": InputVariable("fwbs", int, choices=[0, 1]), "blkttype": InputVariable("fwbs", int, choices=[1, 2, 3]), "breedmat": InputVariable("fwbs", int, choices=[1, 2, 3]), diff --git a/process/core/io/obsolete_vars.py b/process/core/io/obsolete_vars.py index c2a77317cc..af04219ff7 100644 --- a/process/core/io/obsolete_vars.py +++ b/process/core/io/obsolete_vars.py @@ -360,7 +360,7 @@ "tmax_croco": "temp_croco_quench_max", "vdalw": "v_tf_coil_dump_quench_max_kv", "vvhealw": None, - "zeffmax": "zeff_max", + "zeffmax": "n_charge_plasma_effective_vol_avg_max", "f_a_fw_hcd": "f_a_fw_outboard_hcd", "fpumpblkt": "f_p_blkt_coolant_pump_total_heat", "fpumpshld": "f_p_shld_coolant_pump_total_heat", @@ -463,6 +463,7 @@ "pseprmax": "p_plasma_separatrix_rmajor_max_mw", "avail_min": "f_t_plant_available_min", "f_alpha_energy_confinement_min": "f_t_alpha_energy_confinement_min", + "zeff_max": "n_charge_plasma_effective_vol_avg_max", } OBS_VARS_HELP = { diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index d30e3f67fd..62f163805d 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -1273,12 +1273,12 @@ def constraint_equation_63(constraint_registration, data): def constraint_equation_64(constraint_registration, data): """Upper limit on Zeff - zeff_max: maximum value for Zeff + n_charge_plasma_effective_vol_avg_max: maximum value for Zeff n_charge_plasma_effective_vol_avg: plasma effective charge """ return leq( data.physics.n_charge_plasma_effective_vol_avg, - data.constraints.zeff_max, + data.constraints.n_charge_plasma_effective_vol_avg_max, constraint_registration, ) diff --git a/process/data_structure/constraint_variables.py b/process/data_structure/constraint_variables.py index 1857b1d029..d8c0a661e1 100644 --- a/process/data_structure/constraint_variables.py +++ b/process/data_structure/constraint_variables.py @@ -112,7 +112,7 @@ class ConstraintData: times (`constraint equation 62`) """ - zeff_max: float = 3.6 + n_charge_plasma_effective_vol_avg_max: float = 3.6 """maximum value for Zeff (`constraint equation 64`)""" f_h_mode_margin: float = 1.0 diff --git a/process/data_structure/numerics.py b/process/data_structure/numerics.py index 754ea1d71e..ac545c615b 100644 --- a/process/data_structure/numerics.py +++ b/process/data_structure/numerics.py @@ -323,7 +323,7 @@ class NumericsData: * (61) Minimum availability value (itv 107) * (62) f_t_alpha_energy_confinement the ratio of particle to energy confinement times (itv 110) * (63) The number of ITER-like vacuum pumps n_iter_vacuum_pumps < tfno (itv 111) - * (64) Zeff less than or equal to zeff_max (itv 112) + * (64) Zeff less than or equal to n_charge_plasma_effective_vol_avg_max (itv 112) * (65) Dump time set by VV loads (itv 56, 113) * (66) Limit on rate of change of energy in poloidal field (Use iteration variable 65(t_plant_pulse_plasma_current_ramp_up), 115) diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index 46130efae1..bc5825ca77 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -621,9 +621,9 @@ f_nd_impurity_electrons(14) = 5e-05 *Tungsten *icc = 64 * DESCRIPTION: Upper limit on Zeff * JUSTIFICATION: Turned off, dont care about maximum effective charge -* VARIABLES: zeff_max (maximum value for Zeff), zeff calculated in-situ +* VARIABLES: n_charge_plasma_effective_vol_avg_max (maximum value for Zeff), zeff calculated in-situ -*zeff_max = +*n_charge_plasma_effective_vol_avg_max = * DESCRIPTION: Maximum value for Zeff (`constraint equation 64`) * JUSTIFICATION: Not set, not using icc = 64 From 14755bac27055fe449ae96e3915d30bc574c28bf Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 22:45:54 +0100 Subject: [PATCH 16/28] Rename `psepbqarmax` to `p_div_bt_q_aspect_rmajor_max_mw` for clarity and consistency; update all related references across multiple files. --- examples/data/large_tokamak_eval_IN.DAT | 2 +- examples/data/large_tokamak_varied_min_net_electric_IN.DAT | 2 +- examples/data/large_tokamak_varyrun_IN.DAT | 2 +- process/core/input.py | 4 +++- process/core/io/obsolete_vars.py | 1 + process/core/solver/constraints.py | 6 +++--- process/data_structure/constraint_variables.py | 4 ++-- tests/integration/data/large_tokamak_eval.IN.DAT | 2 +- tests/regression/input_files/large_tokamak_eval.IN.DAT | 2 +- tests/regression/input_files/large_tokamak_nof.IN.DAT | 2 +- tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT | 2 +- tests/regression/input_files/st_regression.IN.DAT | 2 +- 12 files changed, 17 insertions(+), 14 deletions(-) diff --git a/examples/data/large_tokamak_eval_IN.DAT b/examples/data/large_tokamak_eval_IN.DAT index 584ee133e8..1e60fd4241 100644 --- a/examples/data/large_tokamak_eval_IN.DAT +++ b/examples/data/large_tokamak_eval_IN.DAT @@ -98,7 +98,7 @@ fjohc = 0.6 * margin for central solenoid current at end-of-flattop fjohc0 = 0.6 * margin for central solenoid current at beginning of pulse p_plant_electric_net_required_mw = 400.0 * required net electric power (MW) (`constraint equation 16`) p_fusion_total_max_mw = 3000 * maximum fusion power (MW) (`constraint equation 9`) -psepbqarmax = 10.0 * maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`) +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`) t_burn_min = 7200.0 * minimum burn time (s) (KE - no longer itv;; see issue #706) pflux_fw_neutron_max_mw = 2.0 * allowable neutron wall-load (MW/m2) (`constraint equation 8`) f_t_alpha_energy_confinement_min = 5.0 * Lower limit on f_t_alpha_energy_confinementnt the ratio of alpha particle to energy confinement diff --git a/examples/data/large_tokamak_varied_min_net_electric_IN.DAT b/examples/data/large_tokamak_varied_min_net_electric_IN.DAT index b1dd1fc48e..92ae23800a 100644 --- a/examples/data/large_tokamak_varied_min_net_electric_IN.DAT +++ b/examples/data/large_tokamak_varied_min_net_electric_IN.DAT @@ -128,7 +128,7 @@ icc = 81 *------------------* icc = 68 -psepbqarmax = 10.0 +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* diff --git a/examples/data/large_tokamak_varyrun_IN.DAT b/examples/data/large_tokamak_varyrun_IN.DAT index 9e4abd1079..348b4c2363 100644 --- a/examples/data/large_tokamak_varyrun_IN.DAT +++ b/examples/data/large_tokamak_varyrun_IN.DAT @@ -128,7 +128,7 @@ icc = 81 *------------------* icc = 68 -psepbqarmax = 10.0 +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* diff --git a/process/core/input.py b/process/core/input.py index 045de20440..95d73dd2be 100644 --- a/process/core/input.py +++ b/process/core/input.py @@ -638,7 +638,9 @@ def __post_init__(self): "pres_div_chamber_burn": InputVariable("vacuum", float, range=(0.0, 10.0)), "pres_fw_coolant": InputVariable("fwbs", float, range=(100000.0, 100000000.0)), "prn1": InputVariable("divertor", float, range=(0.0, 1.0)), - "psepbqarmax": InputVariable("constraints", float, range=(1.0, 50.0)), + "p_div_bt_q_aspect_rmajor_max_mw": InputVariable( + "constraints", float, range=(1.0, 50.0) + ), "p_plasma_separatrix_rmajor_max_mw": InputVariable( "constraints", float, range=(1.0, 60.0) ), diff --git a/process/core/io/obsolete_vars.py b/process/core/io/obsolete_vars.py index af04219ff7..960ae02ea9 100644 --- a/process/core/io/obsolete_vars.py +++ b/process/core/io/obsolete_vars.py @@ -464,6 +464,7 @@ "avail_min": "f_t_plant_available_min", "f_alpha_energy_confinement_min": "f_t_alpha_energy_confinement_min", "zeff_max": "n_charge_plasma_effective_vol_avg_max", + "psepbqarmax": "p_div_bt_q_aspect_rmajor_max_mw", } OBS_VARS_HELP = { diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index 62f163805d..cd65eaec3c 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -1329,7 +1329,7 @@ def constraint_equation_67(constraint_registration, data): def constraint_equation_68(constraint_registration, data): """Upper limit on Psep scaling (PₛₑₚBₜ / q₉₅AR₀) - psepbqarmax: maximum permitted value of ratio of PₛₑₚBₜ / q₉₅AR₀ (MWT/m) + p_div_bt_q_aspect_rmajor_max_mw: maximum permitted value of ratio of PₛₑₚBₜ / q₉₅AR₀ (MWT/m) p_plasma_separatrix_mw: Power to conducted to the divertor region (MW) b_plasma_toroidal_on_axis: toroidal field on axis (T) (iteration variable 2) q95: safety factor q at 95% flux surface @@ -1351,7 +1351,7 @@ def constraint_equation_68(constraint_registration, data): * data.physics.rmajor ) ), - data.constraints.psepbqarmax, + data.constraints.p_div_bt_q_aspect_rmajor_max_mw, constraint_registration, ) @@ -1363,7 +1363,7 @@ def constraint_equation_68(constraint_registration, data): ) / (data.physics.q95 * data.physics.aspect * data.physics.rmajor) ), - data.constraints.psepbqarmax, + data.constraints.p_div_bt_q_aspect_rmajor_max_mw, constraint_registration, ) diff --git a/process/data_structure/constraint_variables.py b/process/data_structure/constraint_variables.py index d8c0a661e1..c96eb77472 100644 --- a/process/data_structure/constraint_variables.py +++ b/process/data_structure/constraint_variables.py @@ -81,8 +81,8 @@ class ConstraintData: p_fusion_total_max_mw: float = 1.5e3 """maximum fusion power (MW) (`constraint equation 9`)""" - psepbqarmax: float = 9.5 - """maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`)""" + p_div_bt_q_aspect_rmajor_max_mw: float = 9.5 + """Max allowed value of PₛₑₚBₜ / q₉₅AR₀ [MWT/m] (`constraint equation 68`)""" p_plasma_separatrix_rmajor_max_mw: float = 25.0 """Maximum allowed ratio of power crossing the separatrix to plasma major radius (Pₛₑₚ / R₀) [MW/m] diff --git a/tests/integration/data/large_tokamak_eval.IN.DAT b/tests/integration/data/large_tokamak_eval.IN.DAT index 6b89e3964d..8b8c34e373 100644 --- a/tests/integration/data/large_tokamak_eval.IN.DAT +++ b/tests/integration/data/large_tokamak_eval.IN.DAT @@ -98,7 +98,7 @@ fjohc = 0.6 fjohc0 = 0.6 p_plant_electric_net_required_mw = 400.0 * required net electric power (MW) (`constraint equation 16`) p_fusion_total_max_mw = 3000 * maximum fusion power (MW) (`constraint equation 9`) -psepbqarmax = 10.0 * maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`) +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`) t_burn_min = 7200.0 * minimum burn time (s) (KE - no longer itv;; see issue #706) pflux_fw_neutron_max_mw = 2.0 * allowable neutron wall-load (MW/m2) (`constraint equation 8`) f_t_alpha_energy_confinement_min = 5.0 * Lower limit on f_t_alpha_energy_confinement the ratio of alpha particle to energy confinement diff --git a/tests/regression/input_files/large_tokamak_eval.IN.DAT b/tests/regression/input_files/large_tokamak_eval.IN.DAT index 8de83649ad..b0860c6889 100644 --- a/tests/regression/input_files/large_tokamak_eval.IN.DAT +++ b/tests/regression/input_files/large_tokamak_eval.IN.DAT @@ -98,7 +98,7 @@ fjohc = 0.6 * margin for central solenoid current at end-of-flattop fjohc0 = 0.6 * margin for central solenoid current at beginning of pulse p_plant_electric_net_required_mw = 400.0 * required net electric power (MW) (`constraint equation 16`) p_fusion_total_max_mw = 3000 * maximum fusion power (MW) (`constraint equation 9`) -psepbqarmax = 10.0 * maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`) +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`) t_burn_min = 7200.0 * minimum burn time (s) (KE - no longer itv;; see issue #706) pflux_fw_neutron_max_mw = 2.0 * allowable neutron wall-load (MW/m2) (`constraint equation 8`) f_t_alpha_energy_confinement_min = 5.0 * Lower limit on f_t_alpha_energy_confinement the ratio of alpha particle to energy confinement diff --git a/tests/regression/input_files/large_tokamak_nof.IN.DAT b/tests/regression/input_files/large_tokamak_nof.IN.DAT index 858003bacb..e1cd7ba171 100644 --- a/tests/regression/input_files/large_tokamak_nof.IN.DAT +++ b/tests/regression/input_files/large_tokamak_nof.IN.DAT @@ -138,7 +138,7 @@ icc = 81 *------------------* icc = 68 -psepbqarmax = 10.0 +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* diff --git a/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT b/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT index 75d38d97aa..28c48c5a41 100644 --- a/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT +++ b/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT @@ -464,7 +464,7 @@ pflux_fw_neutron_max_mw = 8.0 * DESCRIPTION: Allowable wall-load (mw/m2) (icc=8) * JUSTIFICATION: Used with icc=8 to set the enforced max allowable wall load -psepbqarmax = 6.0 +p_div_bt_q_aspect_rmajor_max_mw = 6.0 * DESCRIPTION: maximum ratio of Psep*Bt/qAR (MWT/m) (icc=68) * JUSTIFICATION: diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index bc5825ca77..e2341b3665 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -678,7 +678,7 @@ i_single_null = 0 *icc = 68 * DESCRIPTION: Upper limit on Psep scaling (PsepB/qAR) * JUSTIFICATION: Turned off, just using Psep/R constraint -* VARIABLES: psepbqarmax (maximum permitted value of ratio of Psep*Bt/qAR (MWT/m)). Rest calculated in-situ +* VARIABLES: p_div_bt_q_aspect_rmajor_max_mw (maximum permitted value of ratio of Psep*Bt/qAR (MWT/m)). Rest calculated in-situ *psepbqarmaX * DESCRIPTION: maximum ratio of Psep*Bt/qAR (MWT/m) (`constraint equation 68`) From 16663e357a80021ff04ccb34a3ed1fb928e4e8e5 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 2 Jun 2026 22:47:43 +0100 Subject: [PATCH 17/28] Update constraint_equation_68 to use p_div_bt_q_aspect_rmajor_mw; improve docstring for p_div_bt_q_aspect_rmajor_mw --- process/core/solver/constraints.py | 8 +------- process/data_structure/physics_variables.py | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index cd65eaec3c..dcc7cd196a 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -1356,13 +1356,7 @@ def constraint_equation_68(constraint_registration, data): ) return leq( - ( - ( - data.physics.p_plasma_separatrix_mw - * data.physics.b_plasma_toroidal_on_axis - ) - / (data.physics.q95 * data.physics.aspect * data.physics.rmajor) - ), + data.physics.p_div_bt_q_aspect_rmajor_mw, data.constraints.p_div_bt_q_aspect_rmajor_max_mw, constraint_registration, ) diff --git a/process/data_structure/physics_variables.py b/process/data_structure/physics_variables.py index 6f6bd400ee..4194201981 100644 --- a/process/data_structure/physics_variables.py +++ b/process/data_structure/physics_variables.py @@ -710,7 +710,7 @@ class PhysicsData: """Power to conducted to the divertor region per major radius (MW/m)""" p_div_bt_q_aspect_rmajor_mw: float = 0.0 - """EU DEMO divertor protection parameter (MW/T/m)""" + """EU DEMO divertor protection parameter (PₛₑₚBₜ / q₉₅AR₀) [MWT/m]""" p_div_lower_separatrix_mw: float = 0.0 """Separatrix power conducted to the lower divertor region (calculated if `i_single_null = 0`) (MW)""" From 251bb7c289b5e752a976042602f30cc97e530cc5 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Wed, 3 Jun 2026 08:34:19 +0100 Subject: [PATCH 18/28] Update some docstrings --- .../data_structure/constraint_variables.py | 2 +- process/data_structure/physics_variables.py | 158 +++++++++--------- 2 files changed, 80 insertions(+), 80 deletions(-) diff --git a/process/data_structure/constraint_variables.py b/process/data_structure/constraint_variables.py index c96eb77472..7986752ac9 100644 --- a/process/data_structure/constraint_variables.py +++ b/process/data_structure/constraint_variables.py @@ -90,7 +90,7 @@ class ConstraintData: """ ptfnucmax: float = 1e-3 - """maximum nuclear heating in TF coil (MW/m3) (`constraint equation 54`)""" + """Maximum allowed nuclear heating in TF coil [MW/m³] (`constraint equation 54`)""" tbrmin: float = 1.1 """minimum tritium breeding ratio (`constraint equation 52`)""" diff --git a/process/data_structure/physics_variables.py b/process/data_structure/physics_variables.py index 4194201981..b15d9e6651 100644 --- a/process/data_structure/physics_variables.py +++ b/process/data_structure/physics_variables.py @@ -105,28 +105,28 @@ class PhysicsData: """Total mass of the plasma (kg)""" alphaj: float = 1.0 - """current profile index""" + """Plasma current profile index (⍺ⱼ)""" # noqa: RUF001 alphaj_wesson: float = None """Wesson-like current profile index""" alphan: float = 0.25 - """density profile index""" + """Plasma density profile index (⍺ₙ)""" # noqa: RUF001 alphap: float = 0.0 - """pressure profile index""" + """Plasma pressure profile index (⍺ₚ)""" # noqa: RUF001 fusden_alpha_total: float = 0.0 - """Alpha particle production rate per unit volume, from plasma and beams [particles/m3/sec]""" + """Alpha particle production rate per unit volume, from plasma and beams [particles/m³/sec]""" fusden_plasma_alpha: float = 0.0 - """Alpha particle production rate per unit volume, just from plasma [particles/m3/sec]""" + """Alpha particle production rate per unit volume, just from plasma [particles/m³/sec]""" alphat: float = 0.5 - """temperature profile index""" + """Plasma temperature profile index (⍺ₜ)""" # noqa: RUF001 aspect: float = 2.907 - """aspect ratio (`iteration variable 1`)""" + """Plasma aspect ratio (A) (`iteration variable 1`) """ beamfus0: float = 1.0 """multiplier for beam-background fusion calculation""" @@ -189,22 +189,22 @@ class PhysicsData: """Plasma surface average poloidal field (T)""" b_plasma_toroidal_on_axis: float = 5.68 - """Plasma toroidal field on axis (T) (`iteration variable 2`)""" + """Plasma toroidal field on axis (Bᴛ(R₀)) [T] (`iteration variable 2`)""" b_plasma_inboard_toroidal: float = 0.0 - """Plasma inboard toroidal field (T)""" + """Plasma inboard toroidal field (Bᴛ(R₀-a)) [T]""" b_plasma_outboard_toroidal: float = 0.0 - """Plasma outboard toroidal field (T)""" + """Plasma outboard toroidal field (Bᴛ(R₀+a)) [T]""" b_plasma_toroidal_profile: list[float] = field(default_factory=list) - """toroidal field profile in plasma (T)""" + """Plasma toroidal field profile (Bᴛ(r)) [T]""" b_plasma_total: float = 0.0 - """Sum of plasma total toroidal + poloidal field (T)""" + """Sum of plasma total toroidal + poloidal field (Bₜₒₜ) [T]""" e_plasma_magnetic_stored: float = 0.0 - """Plasma stored magnetic energy (J)""" + """Plasma stored magnetic energy [J]""" burnup: float = 0.0 """fractional plasma burnup""" @@ -213,7 +213,7 @@ class PhysicsData: """fractional plasma burnup user input""" b_plasma_vertical_required: float = 0.0 - """Vertical field needed for plasma equilibrium (T)""" + """Vertical field needed for plasma equilibrium (Bᵥ) [T]""" c_beta: float = 0.5 """Destabalisation parameter for i_beta_norm_max=4 beta limit""" @@ -230,10 +230,10 @@ class PhysicsData: """ nd_plasma_electrons_vol_avg: float = 9.8e19 - """Plasma volume averaged electron density (/m3) (`iteration variable 6`)""" + """Plasma volume averaged electron density (⟨nₑ⟩) [/m³] (`iteration variable 6`)""" nd_plasma_fuel_ions_vol_avg: float = 0.0 - """Plasma volume averaged fuel ion density (/m3)""" + """Plasma volume averaged fuel ion density (⟨n_fuel⟩) [/m³]""" dlamee: float = 0.0 """electron-electron coulomb logarithm""" @@ -244,16 +244,16 @@ class PhysicsData: nd_plasma_electron_max_array: list[float] = field( default_factory=lambda: np.zeros(8, dtype=np.float64) ) - """Array of plasma electron density upper limits values (/m3)""" + """Array of plasma electron density upper limits values (nₑ,max) [/m³]""" nd_plasma_alphas_vol_avg: float = 0.0 - """Plasma volume averaged thermal alpha density (/m3)""" + """Plasma volume averaged thermal alpha density (⟨n_α⟩) [/m³]""" # noqa: RUF001 nd_beam_ions: float = 0.0 - """hot beam ion density, variable (/m3)""" + """Hot beam ion density, variable (⟨n_beam⟩) [/m³]""" nd_beam_ions_out: float = 0.0 - """hot beam ion density from calculation (/m3)""" + """Hot beam ion density from calculation [/m³]""" beta_norm_max: float = 3.5 """Troyon-like coefficient for beta scaling""" @@ -274,25 +274,25 @@ class PhysicsData: """Stambaugh-like coefficient for beta scaling""" nd_plasma_electrons_max: float = 0.0 - """Plasma electron max density limit (/m3)""" + """Plasma electron max density limit (nₑ,max) [/m³]""" nd_plasma_ions_total_vol_avg: float = 0.0 - """Plasma volume averaged total ion density (/m3)""" + """Plasma volume averaged total ion density (⟨n_i⟩) [/m³]""" nd_plasma_electron_line: float = 0.0 - """Plasma line averaged electron density (/m3)""" + """Plasma line averaged electron density (⟨nₑ⟩_line) [/m³]""" nd_plasma_protons_vol_avg: float = 0.0 - """Plasma volume averaged proton ash density (/m3)""" + """Plasma volume averaged proton ash density (⟨n_p⟩) [/m³]""" ntau: float = 0.0 - """Fusion double product (s/m3)""" + """Fusion double product [s/m³]""" nTtau: float = 0.0 - """Lawson triple product [keV s / m3]""" + """Lawson triple product [keV s / m³]""" nd_plasma_impurities_vol_avg: float = 0.0 - """Plasma volume averaged impurity (Z > 2) ion density (/m3)""" + """Plasma volume averaged impurity (Z > 2) ion density (⟨n_imp⟩) [/m³]""" gradient_length_ne: float = None """Max. normalised gradient length in el. density (i_plasma_pedestal==0 only)""" @@ -306,7 +306,7 @@ class PhysicsData: """ eps: float = 0.34399724802 - """inverse aspect ratio""" + """Plasma inverse aspect ratio (ε)""" f_c_plasma_auxiliary: float = 0.0 """fraction of plasma current produced by auxiliary current drive""" @@ -488,31 +488,32 @@ class PhysicsData: """ nd_plasma_pedestal_electron: float = 4.0e19 - """electron density of pedestal [m⁻³] (`i_plasma_pedestal==1)""" + """Plasma electron density at pedestal (nₑ,pedestal) [/m³] (`i_plasma_pedestal==1)""" nd_plasma_separatrix_electron: float = 3.0e19 - """electron density at separatrix [m⁻³] (`i_plasma_pedestal==1)""" + """Plasma electron density at separatrix (nₑ,sep) [/m³] (`i_plasma_pedestal==1)""" i_nd_plasma_pedestal_separatrix: int = 1 """switch for pedestal and separatrix density calculation: - =0 User input pedestal and separatrix density - =1 Calculate pedestal and separatrix density as fraction of Greenwald limit (see `f_nd_plasma_pedestal_greenwald` and `f_nd_plasma_separatrix_greenwald`) """ - + + alpha_crit: float = 0.0 """critical ballooning parameter value""" nd_plasma_separatrix_electron_eich_max: float = 0.0 - """Eich critical electron density at separatrix [m⁻³]""" + """Eich critical electron density at separatrix [/m³]""" plasma_res_factor: float = 1.0 """plasma resistivity pre-factor""" radius_plasma_pedestal_density_norm: float = 1.0 - """Normalised radius of density pedestal (`i_plasma_pedestal==1`)""" + """PPlasma normalised radius of density pedestal (ρₙ,pedestal) (`i_plasma_pedestal==1`)""" radius_plasma_pedestal_temp_norm: float = 1.0 - """Normalised radius of temperature pedestal (`i_plasma_pedestal==1`)""" + """Plasma normalised radius of temperature pedestal (ρₜ,pedestal) (`i_plasma_pedestal==1`)""" rho_te_max: float = 0.0 """r/a where the temperature gradient is largest (`i_plasma_pedestal==0`)""" @@ -521,24 +522,24 @@ class PhysicsData: """r/a where the density gradient is largest (`i_plasma_pedestal==0`)""" tbeta: float = 2.0 - """temperature profile index beta (`i_plasma_pedestal==1)""" + """Plasma temperature profile index beta (βₜ) (`i_plasma_pedestal==1)""" temp_plasma_pedestal_kev: float = 1.0 - """Plasma electron temperature of pedestal (keV) (`i_plasma_pedestal==1`)""" + """Plasma electron temperature of pedestal (Tₑ,pedestal) [keV] (`i_plasma_pedestal==1`)""" temp_plasma_separatrix_kev: float = 0.1 - """Plasma electron temperature at separatrix (keV) (`i_plasma_pedestal==1`) calculated if reinke + """Plasma electron temperature at separatrix (Tₑ,ₛₑₚ) [keV] (`i_plasma_pedestal==1`) calculated if reinke criterion is used (`icc=78`) """ i_beta_norm_max: int = 1 - """Switch for maximum normalised beta scaling:""" + """Switch for maximum normalised beta scaling (βₙ)""" i_ind_plasma_internal_norm: int = 0 - """Switch for plasma normalised internal inductance scaling:""" + """Switch for plasma normalised internal inductance scaling (lᵢ)""" i_alphaj: int = 0 - """Switch for current profile index scaling:""" + """Switch for plasma current profile index scaling (αⱼ) """ i_rad_loss: int = 1 """switch for radiation loss term usage in power balance (see User Guide): @@ -549,7 +550,7 @@ class PhysicsData: """ i_confinement_time: int = 34 - """switch for energy confinement time scaling law""" + """Switch for plasma energy confinement time scaling law (τₑ)""" i_plasma_wall_gap: int = 1 """Switch for plasma-first wall clearances at the mid-plane: @@ -599,13 +600,13 @@ class PhysicsData: """ plasma_square: float = 0.0 - """plasma squareness used by Sauter plasma shape""" + """Plasma squareness (ζ)""" kappa: float = 1.792 - """plasma separatrix elongation (calculated if `i_plasma_geometry = 1-5, 7 or 9-10`)""" + """Plasma separatrix elongation (κₐ) (calculated if `i_plasma_geometry = 1-5, 7 or 9-10`)""" kappa95: float = 1.6 - """plasma elongation at 95% surface (calculated if `i_plasma_geometry = 0-3, 6, or 8-10`)""" + """Plasma elongation at 95% surface (κ₉₅) (calculated if `i_plasma_geometry = 0-3, 6, or 8-10`)""" kappa_ipb: float = 0.0 """Separatrix elongation calculated for IPB scalings""" @@ -620,31 +621,31 @@ class PhysicsData: """margin to vertical stability""" pres_plasma_thermal_on_axis: float = 0.0 - """Plasma central thermal pressure (no fast ions or beam pressure) (Pa)""" + """Plasma central thermal pressure (p₀) (no fast ions or beam pressure) [Pa]""" pres_plasma_thermal_total_profile: list[float] = field(default_factory=list) - """Profile of total pressure in plasma (Pa)""" + """Profile of total pressure in plasma [Pa]""" pres_plasma_electron_profile: list[float] = field(default_factory=list) - """Profile of electron pressure in plasma (Pa)""" + """Profile of electron pressure in plasma [Pa]""" pres_plasma_ion_total_profile: list[float] = field(default_factory=list) - """Profile of ion pressure in plasma (Pa)""" + """Profile of ion pressure in plasma [Pa]""" pres_plasma_fuel_profile: list[float] = field(default_factory=list) - """Profile of fuel pressure in plasma (Pa)""" + """Profile of fuel pressure in plasma [Pa]""" j_plasma_on_axis: float = 0.0 - """Central plasma current density (A/m2)""" + """Central plasma current density (j₀) [A/m²]""" j_plasma_bootstrap_sauter_profile: list[float] = field(default_factory=list) - """Profile of bootstrap current density in plasma using Sauter et al scaling (A/m2)""" + """Profile of bootstrap current density in plasma using Sauter et al scaling [A/m²]""" n_plasma_profile_elements: int = 501 """Number of elements in plasma profile""" pres_plasma_thermal_vol_avg: float = None - """Volume averaged thermal plasma pressure (no fast ions or beam pressure) (Pa)""" + """Volume averaged thermal plasma pressure (⟨p⟩) (no fast ions or beam pressure) [Pa]""" f_dd_branching_trit: float = 0.0 """branching ratio for DD -> T""" @@ -743,7 +744,7 @@ class PhysicsData: """ion/electron equilibration power per volume (MW/m3)""" plasma_current: float = 0.0 - """plasma current (A)""" + """Plasma current (Iₚ) [A]""" c_plasma_peng_analytic: float = 0.0 """Peng analytic plasma current (A)""" @@ -815,10 +816,10 @@ class PhysicsData: """SOL radiation power (MW) (`stellarator only`)""" pden_plasma_sync_mw: float = 0.0 - """synchrotron radiation power per volume (MW/m3)""" + """Plasma synchrotron radiation power per unit volume [MW/m³]""" p_plasma_sync_mw: float = 0.0 - """Total synchrotron radiation power from plasma (MW)""" + """Total synchrotron radiation power from plasma (Pₛₙ) [MW]""" i_l_h_threshold: int = 19 """switch for L-H mode power threshold scaling to use (see l_h_threshold_powers for list)""" @@ -871,11 +872,10 @@ class PhysicsData: """ion transport power per volume (MW/m3)""" q0: float = 1.0 - """Safety factor on axis""" + """Plasma safety factor on axis (q₀)""" q95: float = 0.0 - """Safety factor at 95% flux surface (iteration variable 18) (unless icurr=2 (ST current scaling), - in which case q95 = mean edge safety factor qbar) + """Plasma safety factor at 95% flux surface (q₉₅) (`iteration variable 18`) """ molflow_plasma_fuelling_required: float = 0.0 @@ -885,10 +885,10 @@ class PhysicsData: """tauratio /1.0/ : ratio of He and pellet particle confinement times""" q95_min: float = 0.0 - """lower limit for edge safety factor""" + """Plasmalower limit for edge safety factor""" qstar: float = 0.0 - """cylindrical safety factor""" + """Plasma cylindrical safety factor (qcyl)""" rad_fraction_sol: float = 0.8 """SoL radiation fraction""" @@ -918,10 +918,10 @@ class PhysicsData: """plasma inductance (H)""" rmajor: float = 8.14 - """plasma major radius (m) (`iteration variable 3`)""" + """Plasma major radius (R₀) [m] (`iteration variable 3`)""" rminor: float = 0.0 - """plasma minor radius (m)""" + """Plasma minor radius (a) [m]""" f_nd_beam_electron: float = 0.005 """hot beam density / n_e (`iteration variable 7`)""" @@ -981,37 +981,37 @@ class PhysicsData: """Alpha particle to energy confinement time ratio""" temp_plasma_electron_vol_avg_kev: float = 12.9 - """volume averaged electron temperature (keV) (`iteration variable 4`)""" + """Plasma volume averaged electron temperature (⟨Tₑ⟩) [keV] (`iteration variable 4`)""" temp_plasma_electron_on_axis_kev: float = 0.0 - """central electron temperature (keV)""" + """Plasma central electron temperature (Tₑ₀) [keV]""" temp_plasma_electron_density_weighted_kev: float = 0.0 - """density weighted average electron temperature (keV)""" + """Density weighted average electron temperature (⟨Tₑ⟩_n) [keV]""" temp_plasma_electron_line_avg_kev: float = None """Line averaged electron temperature (keV)""" temp_plasma_ion_vol_avg_kev: float = 12.9 - """volume averaged ion temperature (keV). N.B. calculated from temp_plasma_electron_vol_avg_kev if `f_temp_plasma_ion_electron > 0.0`""" + """Volume averaged ion temperature (⟨Tᵢ⟩) [keV]. N.B. calculated from temp_plasma_electron_vol_avg_kev if `f_temp_plasma_ion_electron > 0.0`""" temp_plasma_ion_on_axis_kev: float = 0.0 - """central ion temperature (keV)""" + """Plasma central ion temperature (Tᵢ₀) [keV]""" temp_plasma_ion_density_weighted_kev: float = 0.0 - """density weighted average ion temperature (keV)""" + """Plasma density weighted average ion temperature (⟨Tᵢ⟩_n) [keV]""" f_temp_plasma_ion_electron: float = 1.0 - """ion temperature / electron temperature(used to calculate temp_plasma_ion_vol_avg_kev if `f_temp_plasma_ion_electron > 0.0`""" + """Plasma ratio of ion temperature to electron temperature (used to calculate temp_plasma_ion_vol_avg_kev if `f_temp_plasma_ion_electron > 0.0`)""" triang: float = 0.36 - """plasma separatrix triangularity (calculated if `i_plasma_geometry = 1, 3-5 or 7`)""" + """Plasma separatrix triangularity (δₐ) (calculated if `i_plasma_geometry = 1, 3-5 or 7`)""" triang95: float = 0.24 - """plasma triangularity at 95% surface (calculated if `i_plasma_geometry = 0-2, 6, 8 or 9`)""" + """Plasma triangularity at 95% surface (δ₉₅) (calculated if `i_plasma_geometry = 0-2, 6, 8 or 9`)""" vol_plasma: float = 0.0 - """plasma volume (m3)""" + """Plasma volume [m³]""" vs_plasma_burn_required: float = 0.0 """V-s needed during flat-top (heat + burn times) (Wb)""" @@ -1029,28 +1029,28 @@ class PhysicsData: """Plasma resistive flux consumption for plasma current ramp-up (Vs)(Wb)""" vs_plasma_total_required: float = 0.0 - """total V-s needed (Wb)""" + """Total V-s needed for full plasma pulse [Wb]""" pflux_fw_neutron_mw: float = 0.0 - """average neutron wall load (MW/m2)""" + """Average FW neutron wall load [MW/m²]""" pflux_plasma_surface_neutron_avg_mw: float = 0.0 - """Average neutron flux at plasma surface (MW/m2)""" + """Average neutron flux at plasma surface [MW/m²]""" wtgpd: float = 0.0 - """mass of fuel used per day (g)""" + """Mass of fuel used per day [g]""" a_plasma_poloidal: float = 0.0 - """plasma poloidal cross-sectional area [m^2]""" + """Plasma poloidal cross-sectional area [m²]""" n_charge_plasma_effective_vol_avg: float = 0.0 - """Volume averaged plasma effective charge""" + """Volume averaged plasma effective charge (⟨Zₑ⟩)""" n_charge_plasma_effective_profile: list[float] = field(default_factory=list) """Profile of plasma effective charge""" n_charge_plasma_effective_mass_weighted_vol_avg: float = 0.0 - """Plasma mass-weighted volume averaged plasma effective charge""" + """Plasma mass-weighted volume averaged plasma effective charge (⟨Zₑ⟩ₘ)""" len_plasma_debye_electron_profile: list[float] = field(default_factory=list) """Profile of electron Debye length in plasma (m)""" From c92fd1014d15264d33b8dbcde2e908c7bb16a637 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Mon, 8 Jun 2026 09:49:02 +0100 Subject: [PATCH 19/28] Post rebase fixes --- process/data_structure/physics_variables.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/process/data_structure/physics_variables.py b/process/data_structure/physics_variables.py index b15d9e6651..3eade41c81 100644 --- a/process/data_structure/physics_variables.py +++ b/process/data_structure/physics_variables.py @@ -498,8 +498,7 @@ class PhysicsData: - =0 User input pedestal and separatrix density - =1 Calculate pedestal and separatrix density as fraction of Greenwald limit (see `f_nd_plasma_pedestal_greenwald` and `f_nd_plasma_separatrix_greenwald`) """ - - + alpha_crit: float = 0.0 """critical ballooning parameter value""" From 773519e111f200e1c28c669d8d28e9459c08d62f Mon Sep 17 00:00:00 2001 From: mn3981 Date: Mon, 15 Jun 2026 11:09:22 +0100 Subject: [PATCH 20/28] Refactor variable names for clarity and consistency; update related references across multiple files --- examples/data/large_tokamak_IN.DAT | 6 +++--- examples/data/scan_example_file_IN.DAT | 6 +++--- process/core/io/obsolete_vars.py | 1 + tests/integration/data/large_tokamak_1_MFILE.DAT | 8 ++++---- tests/integration/data/large_tokamak_2_MFILE.DAT | 8 ++++---- tests/integration/data/large_tokamak_3_MFILE.DAT | 8 ++++---- tests/integration/data/large_tokamak_4_MFILE.DAT | 8 ++++---- tests/integration/data/large_tokamak_IN.DAT | 6 +++--- tests/integration/data/large_tokamak_MFILE.DAT | 12 ++++++------ tests/integration/data/ref_IN.DAT | 6 +++--- tests/integration/data/scan_2D_MFILE.DAT | 4 ++-- tests/integration/data/scan_MFILE.DAT | 8 ++++---- tests/unit/data/large_tokamak_IN.DAT | 8 ++++---- tests/unit/data/large_tokamak_MFILE.DAT | 8 ++++---- 14 files changed, 49 insertions(+), 48 deletions(-) diff --git a/examples/data/large_tokamak_IN.DAT b/examples/data/large_tokamak_IN.DAT index b489fca8ab..c1ea3b0158 100644 --- a/examples/data/large_tokamak_IN.DAT +++ b/examples/data/large_tokamak_IN.DAT @@ -107,7 +107,7 @@ temp_cs_superconductor_margin_min = 1.5 * Lower limit on f_alpha_energy_confinement (ratio alpha particle/energy confinement times) * *-------------------------------------------------------------------------------* icc = 62 -f_alpha_energy_confinement_min = 5.0 +f_t_alpha_energy_confinement_minin = 5.0 * dump time constraint for VV stresses * *--------------------------------------* @@ -128,7 +128,7 @@ icc = 81 *------------------* icc = 68 -psepbqarmax = 10.0 +p_div_bt_q_aspect_rmajor_max_mwaspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* @@ -572,4 +572,4 @@ f_a_tf_turn_cable_space_extra_void = 0.3 i_tf_sc_mat = 1 * max fluence in the TF coil -nflutfmax = 1e22 +flu_tf_neutron_fast_maxutron_fast_max = 1e22 diff --git a/examples/data/scan_example_file_IN.DAT b/examples/data/scan_example_file_IN.DAT index b732bc05c6..22fbbaae75 100644 --- a/examples/data/scan_example_file_IN.DAT +++ b/examples/data/scan_example_file_IN.DAT @@ -118,7 +118,7 @@ temp_cs_superconductor_margin_min = 1.5 * Lower limit on f_alpha_energy_confinement (ratio alpha particle/energy confinement times) * *-------------------------------------------------------------------------------* icc = 62 -f_alpha_energy_confinement_min = 5.0 +f_t_alpha_energy_confinement_minin = 5.0 * dump time constraint for VV stresses * *--------------------------------------* @@ -138,7 +138,7 @@ icc = 81 *------------------* icc = 68 -psepbqarmax = 10.0 +p_div_bt_q_aspect_rmajor_max_mwaspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* @@ -582,4 +582,4 @@ f_a_tf_turn_cable_space_extra_void = 0.3 i_tf_sc_mat = 1 * max fluence in the TF coil -nflutfmax = 1e22 +flu_tf_neutron_fast_maxutron_fast_max = 1e22 diff --git a/process/core/io/obsolete_vars.py b/process/core/io/obsolete_vars.py index 960ae02ea9..42dd24d99c 100644 --- a/process/core/io/obsolete_vars.py +++ b/process/core/io/obsolete_vars.py @@ -465,6 +465,7 @@ "f_alpha_energy_confinement_min": "f_t_alpha_energy_confinement_min", "zeff_max": "n_charge_plasma_effective_vol_avg_max", "psepbqarmax": "p_div_bt_q_aspect_rmajor_max_mw", + "fdene": "f_nd_plasma_electron_limit_max", } OBS_VARS_HELP = { diff --git a/tests/integration/data/large_tokamak_1_MFILE.DAT b/tests/integration/data/large_tokamak_1_MFILE.DAT index 21cfd31616..dbb0d50bc8 100644 --- a/tests/integration/data/large_tokamak_1_MFILE.DAT +++ b/tests/integration/data/large_tokamak_1_MFILE.DAT @@ -495,7 +495,7 @@ Radiation_power_subtracted_from_plasma_power_balance_(MW)_______________ ______________________________ 9.1650E+01 OP Alpha_particle_confinement_time_(s)_____________________________________ (t_alpha_confinement)________________________ 2.2270E+01 Alpha_particle/energy_confinement_time_ratio____________________________ (f_alpha_energy_confinement)_________________ 6.9512E+00 - Lower_limit_on_taup/taueff______________________________________________ (f_alpha_energy_confinement_min)____________________ 5.0000E+00 + Lower_limit_on_taup/taueff______________________________________________ (f_t_alpha_energy_confinement_min)____________________ 5.0000E+00 Total_energy_confinement_time_including_radiation_loss_(s)______________ (t_energy_confinement_beta)______ 2.8018E+00 Normalized_plasma_pressure_beta_as_defined_by_McDonald_et_al____________ (beta_mcdonald)_______________ 3.4553E-02 OP Normalized_ion_Larmor_radius____________________________________________ (rho_star)____________________ 1.9603E-03 OP @@ -1230,7 +1230,7 @@ icc = 11 *---------------------* icc = 5 ixc = 6 * nd_plasma_electrons_vol_avg [m-3] -fdene = 1.2 +f_nd_plasma_electron_limit_max = 1.2 nd_plasma_electrons_vol_avg = 7.5E19 * Neutron wall load upper limit * @@ -1346,7 +1346,7 @@ temp_cs_superconductor_margin_min = 1.5 *-------------------------------------------------------------------------------* icc = 62 ixc = 110 * falpha_energy_confinement -f_alpha_energy_confinement_min = 5.0 +f_t_alpha_energy_confinement_min = 5.0 * dump time constraint for VV stresses * *--------------------------------------* @@ -1373,7 +1373,7 @@ ixc = 154 *fne0 icc = 68 ixc = 117 *fpsepbqar -psepbqarmax = 10.0 +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* diff --git a/tests/integration/data/large_tokamak_2_MFILE.DAT b/tests/integration/data/large_tokamak_2_MFILE.DAT index ea96b941f9..a9e501d395 100644 --- a/tests/integration/data/large_tokamak_2_MFILE.DAT +++ b/tests/integration/data/large_tokamak_2_MFILE.DAT @@ -496,7 +496,7 @@ Radiation_power_subtracted_from_plasma_power_balance_(MW)_______________ ______________________________ 9.1650E+01 OP Alpha_particle_confinement_time_(s)_____________________________________ (t_alpha_confinement)________________________ 2.2270E+01 Alpha_particle/energy_confinement_time_ratio____________________________ (f_alpha_energy_confinement)_________________ 6.9512E+00 - Lower_limit_on_taup/taueff______________________________________________ (f_alpha_energy_confinement_min)____________________ 5.0000E+00 + Lower_limit_on_taup/taueff______________________________________________ (f_t_alpha_energy_confinement_min)____________________ 5.0000E+00 Total_energy_confinement_time_including_radiation_loss_(s)______________ (t_energy_confinement_beta)______ 2.8018E+00 Normalized_plasma_pressure_beta_as_defined_by_McDonald_et_al____________ (beta_mcdonald)_______________ 3.4553E-02 OP Normalized_ion_Larmor_radius____________________________________________ (rho_star)____________________ 1.9603E-03 OP @@ -1231,7 +1231,7 @@ icc = 11 *---------------------* icc = 5 ixc = 6 * nd_plasma_electrons_vol_avg [m-3] -fdene = 1.2 +f_nd_plasma_electron_limit_max = 1.2 nd_plasma_electrons_vol_avg = 7.5E19 * Neutron wall load upper limit * @@ -1347,7 +1347,7 @@ temp_cs_superconductor_margin_min = 1.5 *-------------------------------------------------------------------------------* icc = 62 ixc = 110 * falpha_energy_confinement -f_alpha_energy_confinement_min = 5.0 +f_t_alpha_energy_confinement_min = 5.0 * dump time constraint for VV stresses * *--------------------------------------* @@ -1374,7 +1374,7 @@ ixc = 154 *fne0 icc = 68 ixc = 117 *fpsepbqar -psepbqarmax = 10.0 +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* diff --git a/tests/integration/data/large_tokamak_3_MFILE.DAT b/tests/integration/data/large_tokamak_3_MFILE.DAT index 9308665da5..f01e3e2599 100644 --- a/tests/integration/data/large_tokamak_3_MFILE.DAT +++ b/tests/integration/data/large_tokamak_3_MFILE.DAT @@ -496,7 +496,7 @@ Radiation_power_subtracted_from_plasma_power_balance_(MW)_______________ ______________________________ 9.1650E+01 OP Alpha_particle_confinement_time_(s)_____________________________________ (t_alpha_confinement)________________________ 2.2270E+01 Alpha_particle/energy_confinement_time_ratio____________________________ (f_alpha_energy_confinement)_________________ 6.9512E+00 - Lower_limit_on_taup/taueff______________________________________________ (f_alpha_energy_confinement_min)____________________ 5.0000E+00 + Lower_limit_on_taup/taueff______________________________________________ (f_t_alpha_energy_confinement_min)____________________ 5.0000E+00 Total_energy_confinement_time_including_radiation_loss_(s)______________ (t_energy_confinement_beta)______ 2.8018E+00 Normalized_plasma_pressure_beta_as_defined_by_McDonald_et_al____________ (beta_mcdonald)_______________ 3.4553E-02 OP Normalized_ion_Larmor_radius____________________________________________ (rho_star)____________________ 1.9603E-03 OP @@ -1231,7 +1231,7 @@ icc = 11 *---------------------* icc = 5 ixc = 6 * nd_plasma_electrons_vol_avg [m-3] -fdene = 1.2 +f_nd_plasma_electron_limit_max = 1.2 nd_plasma_electrons_vol_avg = 7.5E19 * Neutron wall load upper limit * @@ -1347,7 +1347,7 @@ temp_cs_superconductor_margin_min = 1.5 *-------------------------------------------------------------------------------* icc = 62 ixc = 110 * falpha_energy_confinement -f_alpha_energy_confinement_min = 5.0 +f_t_alpha_energy_confinement_min = 5.0 * dump time constraint for VV stresses * *--------------------------------------* @@ -1374,7 +1374,7 @@ ixc = 154 *fne0 icc = 68 ixc = 117 *fpsepbqar -psepbqarmax = 10.0 +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* diff --git a/tests/integration/data/large_tokamak_4_MFILE.DAT b/tests/integration/data/large_tokamak_4_MFILE.DAT index ff28d0ee40..75a2a26a09 100644 --- a/tests/integration/data/large_tokamak_4_MFILE.DAT +++ b/tests/integration/data/large_tokamak_4_MFILE.DAT @@ -496,7 +496,7 @@ Radiation_power_subtracted_from_plasma_power_balance_(MW)_______________ ______________________________ 9.1650E+01 OP Alpha_particle_confinement_time_(s)_____________________________________ (t_alpha_confinement)________________________ 2.2270E+01 Alpha_particle/energy_confinement_time_ratio____________________________ (f_alpha_energy_confinement)_________________ 6.9512E+00 - Lower_limit_on_taup/taueff______________________________________________ (f_alpha_energy_confinement_min)____________________ 5.0000E+00 + Lower_limit_on_taup/taueff______________________________________________ (f_t_alpha_energy_confinement_min)____________________ 5.0000E+00 Total_energy_confinement_time_including_radiation_loss_(s)______________ (t_energy_confinement_beta)______ 2.8018E+00 Normalized_plasma_pressure_beta_as_defined_by_McDonald_et_al____________ (beta_mcdonald)_______________ 3.4553E-02 OP Normalized_ion_Larmor_radius____________________________________________ (rho_star)____________________ 1.9603E-03 OP @@ -1231,7 +1231,7 @@ icc = 11 *---------------------* icc = 5 ixc = 6 * nd_plasma_electrons_vol_avg [m-3] -fdene = 1.2 +f_nd_plasma_electron_limit_max = 1.2 nd_plasma_electrons_vol_avg = 7.5E19 * Neutron wall load upper limit * @@ -1347,7 +1347,7 @@ temp_cs_superconductor_margin_min = 1.5 *-------------------------------------------------------------------------------* icc = 62 ixc = 110 * falpha_energy_confinement -f_alpha_energy_confinement_min = 5.0 +f_t_alpha_energy_confinement_min = 5.0 * dump time constraint for VV stresses * *--------------------------------------* @@ -1374,7 +1374,7 @@ ixc = 154 *fne0 icc = 68 ixc = 117 *fpsepbqar -psepbqarmax = 10.0 +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* diff --git a/tests/integration/data/large_tokamak_IN.DAT b/tests/integration/data/large_tokamak_IN.DAT index 6264f1f9eb..aaf0c0581e 100644 --- a/tests/integration/data/large_tokamak_IN.DAT +++ b/tests/integration/data/large_tokamak_IN.DAT @@ -110,7 +110,7 @@ temp_cs_superconductor_margin_min = 1.5 * Lower limit on f_alpha_energy_confinement (ratio alpha particle/energy confinement times) * *-------------------------------------------------------------------------------* icc = 62 -f_alpha_energy_confinement_min = 5.0 +f_t_alpha_energy_confinement_min = 5.0 * dump time constraint for VV stresses * *--------------------------------------* @@ -131,7 +131,7 @@ icc = 81 *------------------* icc = 68 -psepbqarmax = 10.0 +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* @@ -576,4 +576,4 @@ f_a_tf_turn_cable_space_extra_void = 0.3 i_tf_sc_mat = 1 * max fluence in the TF coil -nflutfmax = 1e22 +flu_tf_neutron_fast_max = 1e22 diff --git a/tests/integration/data/large_tokamak_MFILE.DAT b/tests/integration/data/large_tokamak_MFILE.DAT index c6d18ec1ea..8bdc9bdc76 100644 --- a/tests/integration/data/large_tokamak_MFILE.DAT +++ b/tests/integration/data/large_tokamak_MFILE.DAT @@ -15659,7 +15659,7 @@ Radiation_power_subtracted_from_plasma_heating_power_balance_(MW)________ ______ H*_non-radiation_corrected_______________________________________________ (hstar)________________________ 1.41633752669338220e+00 OP Alpha_particle_confinement_time_(τ_α)_(s)________________________________ (t_alpha_confinement)__________ 2.03803719777290411e+01 OP Alpha_particle_to_energy_confinement_time_ratio_(τ_α/τₑ)_________________ (f_alpha_energy_confinement)___ 6.50286869855014071e+00 OP -Lower_limit_on_f_alpha_energy_confinement_((τ_α/τₑ)>)____________________ (f_alpha_energy_confinement_min)_ 5.00000000000000000e+00 +Lower_limit_on_f_alpha_energy_confinement_((τ_α/τₑ)>)____________________ (f_t_alpha_energy_confinement_min)_ 5.00000000000000000e+00 # Energy confinement times, and required H-factors : # Normalized_plasma_pressure_beta_as_defined_by_McDonald_et_al_____________ (beta_mcdonald)________________ 3.89403914328839487e-02 OP Normalized_ion_Larmor_radius_____________________________________________ (rho_star)_____________________ 2.09465052879505287e-03 OP @@ -35121,7 +35121,7 @@ Vacuum_Vessel_stress_on_quench_(Pa)______________________________________ (vv_st Maximum_allowed_voltage_during_quench_due_to_insulation_(kV)_____________ (v_tf_coil_dump_quench_max_kv)_ 1.00000000000000000e+01 Actual_quench_voltage_(kV)_______________________________________________ (v_tf_coil_dump_quench_kv)_____ 8.36818226644945184e+00 OP Maximum_winding_pack_current_density_for_protection_(A/m²)_______________ (j_tf_wp_quench_heat_max)______ 2.08453953790650927e+07 OP -Max_allowed_fast_neutron_fluence_on_TF_coil_(n/m²)_______________________ (nflutfmax)____________________ 1.00000000000000000e+22 OP +Max_allowed_fast_neutron_fluence_on_TF_coil_(n/m²)_______________________ (flu_tf_neutron_fast_max)____________________ 1.00000000000000000e+22 OP Residual_resistivity_ratio_of_TF_coil_copper_____________________________ (rrr_tf_cu)____________________ 1.00000000000000000e+02 OP # TF coils # Allowable_maximum_shear_stress_in_TF_coil_case_(Tresca_criterion)_(Pa)___ (sig_tf_case_max)______________ 7.50000000000000000e+08 @@ -36014,7 +36014,7 @@ temp_cs_superconductor_margin_min = 1.5 * Lower limit on f_alpha_energy_confinement (ratio alpha particle/energy confinement times) * *-------------------------------------------------------------------------------* icc = 62 -f_alpha_energy_confinement_min = 5.0 +f_t_alpha_energy_confinement_min = 5.0 * dump time constraint for VV stresses * *--------------------------------------* @@ -36035,7 +36035,7 @@ icc = 81 *------------------* icc = 68 -psepbqarmax = 10.0 +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* @@ -36049,7 +36049,7 @@ sig_tf_wp_max = 7.5E8 * Allowable maximum shear stress in TF coil conduit (Tr *---------------------* icc = 5 ixc = 6 * nd_plasma_electrons_vol_avg [m-3] -fdene = 1.2 * density limit constraint scale (constraint equation 5) +f_nd_plasma_electron_limit_max = 1.2 * density limit constraint scale (constraint equation 5) nd_plasma_electrons_vol_avg = 7.5E19 * Neutron wall load upper limit * @@ -36480,4 +36480,4 @@ f_a_tf_turn_cable_space_extra_void = 0.3 i_tf_sc_mat = 1 * max fluence in the TF coil -nflutfmax = 1e22 +flu_tf_neutron_fast_max = 1e22 diff --git a/tests/integration/data/ref_IN.DAT b/tests/integration/data/ref_IN.DAT index f102227f8d..28d0714b34 100644 --- a/tests/integration/data/ref_IN.DAT +++ b/tests/integration/data/ref_IN.DAT @@ -103,7 +103,7 @@ dr_shld_blkt_gap = 0.02 * gap between vacuum vessel and blanket (m) *---------------Constraint Variables---------------* fbeta_max = 0.4815 * F-value for beta limit -fdene = 1.2 * F-value for density limit +f_nd_plasma_electron_limit_max = 1.2 * F-value for density limit fp_fusion_total_max_mw = 1 * F-value for maximum fusion power fjohc = 0.25 * F-value for central solenoid current at end-of-flattop fjohc0 = 0.25 * F-value for central solenoid current at beginning of pulse @@ -117,7 +117,7 @@ fpflux_fw_neutron_max_mw = 0.1312 * F-value for maximum wall load p_plant_electric_net_required_mw = 500.0 * Required net electric power (mw) t_burn_min = 7.2e3 * Minimum burn time (s) pflux_fw_neutron_max_mw = 8.0 * Allowable wall-load (mw/m2) -psepbqarmax = 9.2 * maximum ratio of Psep*Bt/qAR (MWT/m) +p_div_bt_q_aspect_rmajor_max_mw = 9.2 * maximum ratio of Psep*Bt/qAR (MWT/m) *------------------Cost Variables------------------* @@ -314,7 +314,7 @@ t_plant_pulse_burn = 1.0d4 * Burn time (s) (calculated if i_pulsed_plant=1) temp_plasma_electron_vol_avg_keV = 1.2330E+01 beta = 3.1421E-02 nd_plasma_electrons_vol_avg = 7.4321E+19 - fdene = 1.2000E+00 + f_nd_plasma_electron_limit_max = 1.2000E+00 oacdcp = 8.6739E+06 dr_tf_inboard = 1.2080E+00 fpflux_fw_neutron_max_mw = 1.3100E-01 diff --git a/tests/integration/data/scan_2D_MFILE.DAT b/tests/integration/data/scan_2D_MFILE.DAT index 0e720d4c21..10151377ce 100644 --- a/tests/integration/data/scan_2D_MFILE.DAT +++ b/tests/integration/data/scan_2D_MFILE.DAT @@ -17522,7 +17522,7 @@ icc = 11 *---------------------* icc = 5 ixc = 6 * nd_plasma_electrons_vol_avg [m-3] -fdene = 1.2 +f_nd_plasma_electron_limit_max = 1.2 nd_plasma_electrons_vol_avg = 7.5E19 * Neutron wall load upper limit * @@ -17667,7 +17667,7 @@ ixc = 154 *fne0 icc = 68 ixc = 117 *fpsepbqar -psepbqarmax = 10.0 +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* diff --git a/tests/integration/data/scan_MFILE.DAT b/tests/integration/data/scan_MFILE.DAT index a090d0a7e8..f5d92b7f00 100644 --- a/tests/integration/data/scan_MFILE.DAT +++ b/tests/integration/data/scan_MFILE.DAT @@ -9012,7 +9012,7 @@ ixc = 4 * temp_plasma_electron_vol_avg_keV boundu(4) = 150.0 ixc = 5 * beta ixc = 6 * nd_plasma_electrons_vol_avg -ixc = 9 * fdene +ixc = 9 * f_nd_plasma_electron_limit_max boundu(9) = 1.2 ixc = 13 * dr_tf_inboard boundl(13) = 1.4 @@ -9104,7 +9104,7 @@ dr_shld_blkt_gap = 0.02 * gap between vacuum vessel and blanket (m) *---------------Constraint Variables---------------* fbeta_max = 0.4815 * F-value for beta limit -fdene = 1.2 * F-value for density limit +f_nd_plasma_electron_limit_max = 1.2 * F-value for density limit fp_fusion_total_max_mw = 1 * F-value for maximum fusion power fjohc = 0.25 * F-value for central solenoid current at end-of-flattop fjohc0 = 0.25 * F-value for central solenoid current at beginning of pulse @@ -9118,7 +9118,7 @@ fpflux_fw_neutron_max_mw = 0.1312 * F-value for maximum wall load p_plant_electric_net_required_mw = 500.0 * Required net electric power (mw) t_burn_min = 7.2e3 * Minimum burn time (s) pflux_fw_neutron_max_mw = 8.0 * Allowable wall-load (mw/m2) -psepbqarmax = 9.2 * maximum ratio of Psep*Bt/qAR (MWT/m) +p_div_bt_q_aspect_rmajor_max_mw = 9.2 * maximum ratio of Psep*Bt/qAR (MWT/m) *------------------Cost Variables------------------* @@ -9316,7 +9316,7 @@ t_plant_pulse_burn = 1.0d4 * Burn time (s) (calculated if i_pulsed_plant=1) temp_plasma_electron_vol_avg_keV = 1.2330E+01 beta = 3.1421E-02 nd_plasma_electrons_vol_avg = 7.4321E+19 - fdene = 1.2000E+00 + f_nd_plasma_electron_limit_max = 1.2000E+00 oacdcp = 8.6739E+06 dr_tf_inboard = 1.2080E+00 fpflux_fw_neutron_max_mw = 1.3100E-01 diff --git a/tests/unit/data/large_tokamak_IN.DAT b/tests/unit/data/large_tokamak_IN.DAT index 40eea2ece1..aaf0c0581e 100644 --- a/tests/unit/data/large_tokamak_IN.DAT +++ b/tests/unit/data/large_tokamak_IN.DAT @@ -110,7 +110,7 @@ temp_cs_superconductor_margin_min = 1.5 * Lower limit on f_alpha_energy_confinement (ratio alpha particle/energy confinement times) * *-------------------------------------------------------------------------------* icc = 62 -f_alpha_energy_confinement_min = 5.0 +f_t_alpha_energy_confinement_min = 5.0 * dump time constraint for VV stresses * *--------------------------------------* @@ -131,7 +131,7 @@ icc = 81 *------------------* icc = 68 -psepbqarmax = 10.0 +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* @@ -145,7 +145,7 @@ sig_tf_wp_max = 7.5E8 * Allowable maximum shear stress in TF coil conduit (Tr *---------------------* icc = 5 ixc = 6 * nd_plasma_electrons_vol_avg [m-3] -fdene = 1.2 * density limit constraint scale (constraint equation 5) +f_nd_plasma_electron_limit_max = 1.2 * density limit constraint scale (constraint equation 5) nd_plasma_electrons_vol_avg = 7.5E19 * Neutron wall load upper limit * @@ -576,4 +576,4 @@ f_a_tf_turn_cable_space_extra_void = 0.3 i_tf_sc_mat = 1 * max fluence in the TF coil -nflutfmax = 1e22 +flu_tf_neutron_fast_max = 1e22 diff --git a/tests/unit/data/large_tokamak_MFILE.DAT b/tests/unit/data/large_tokamak_MFILE.DAT index ae84746444..4655babbb9 100644 --- a/tests/unit/data/large_tokamak_MFILE.DAT +++ b/tests/unit/data/large_tokamak_MFILE.DAT @@ -6642,7 +6642,7 @@ Radiation_power_subtracted_from_plasma_power_balance_(MW)________________ ______ H*_non-radiation_corrected_______________________________________________ (hstar)________________________ 1.10238022229611166e+00 OP Alpha_particle_confinement_time_(s)______________________________________ (t_alpha_confinement)__________ 2.06324613124898733e+01 OP Alpha_particle/energy_confinement_time_ratio_____________________________ (f_alpha_energy_confinement)___ 6.58586617734714519e+00 OP -Lower_limit_on_f_alpha_energy_confinement________________________________ (f_alpha_energy_confinement_min)_ 5.00000000000000000e+00 +Lower_limit_on_f_alpha_energy_confinement________________________________ (f_t_alpha_energy_confinement_min)_ 5.00000000000000000e+00 # Energy confinement times, and required H-factors : # Normalized_plasma_pressure_beta_as_defined_by_McDonald_et_al_____________ (beta_mcdonald)________________ 3.84667911988001016e-02 OP Normalized_ion_Larmor_radius_____________________________________________ (rho_star)_____________________ 2.07847482385001801e-03 OP @@ -7650,7 +7650,7 @@ icc = 11 *---------------------* icc = 5 ixc = 6 * nd_plasma_electrons_vol_avg [m-3] -fdene = 1.2 +f_nd_plasma_electron_limit_max = 1.2 nd_plasma_electrons_vol_avg = 7.5E19 * Neutron wall load upper limit * @@ -7764,7 +7764,7 @@ temp_cs_superconductor_margin_min = 1.5 *-------------------------------------------------------------------------------* icc = 62 ixc = 110 * falpha_energy_confinement -f_alpha_energy_confinement_min = 5.0 +f_t_alpha_energy_confinement_min = 5.0 * dump time constraint for VV stresses * *--------------------------------------* @@ -7791,7 +7791,7 @@ ixc = 154 *fne0 icc = 68 ixc = 117 *fpsepbqar -psepbqarmax = 10.0 +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* From 4bdb5edccdec4819c1dfd9e7bd082e16501169ee Mon Sep 17 00:00:00 2001 From: mn3981 Date: Mon, 15 Jun 2026 11:17:05 +0100 Subject: [PATCH 21/28] Rename `fiooic` to `f_j_tf_wp_critical_max` for clarity and consistency; update all related references across multiple files. --- .../source/eng-models/tf-coil-superconducting.md | 2 +- documentation/source/fusion-devices/stellarator.md | 2 +- examples/data/large_tokamak_eval_IN.DAT | 2 +- process/core/input.py | 2 +- process/core/io/plot/scans.py | 2 +- process/core/scan.py | 4 +++- process/core/solver/constraints.py | 8 ++++---- process/data_structure/constraint_variables.py | 4 ++-- process/data_structure/scan_variables.py | 2 +- process/models/stellarator/coils/calculate.py | 4 ++-- process/models/stellarator/coils/output.py | 11 ++++++++--- tests/integration/data/large_tokamak_1_MFILE.DAT | 4 ++-- tests/integration/data/large_tokamak_2_MFILE.DAT | 4 ++-- tests/integration/data/large_tokamak_3_MFILE.DAT | 4 ++-- tests/integration/data/large_tokamak_4_MFILE.DAT | 4 ++-- tests/integration/data/large_tokamak_IN.DAT | 2 +- tests/integration/data/large_tokamak_MFILE.DAT | 2 +- tests/integration/data/large_tokamak_eval.IN.DAT | 2 +- tests/integration/data/ref_IN.DAT | 2 +- tests/integration/data/scan_2D_MFILE.DAT | 4 ++-- tests/integration/data/scan_MFILE.DAT | 4 ++-- .../regression/input_files/large_tokamak_eval.IN.DAT | 2 +- tests/regression/input_files/large_tokamak_nof.IN.DAT | 2 +- .../input_files/low_aspect_ratio_DEMO.IN.DAT | 2 +- tests/regression/input_files/st_regression.IN.DAT | 2 +- .../regression/input_files/stellarator_helias.IN.DAT | 2 +- tests/unit/data/large_tokamak_IN.DAT | 2 +- tests/unit/data/large_tokamak_MFILE.DAT | 4 ++-- 28 files changed, 49 insertions(+), 42 deletions(-) diff --git a/documentation/source/eng-models/tf-coil-superconducting.md b/documentation/source/eng-models/tf-coil-superconducting.md index 4ff84bb9a2..e6a5c2ca1b 100644 --- a/documentation/source/eng-models/tf-coil-superconducting.md +++ b/documentation/source/eng-models/tf-coil-superconducting.md @@ -237,7 +237,7 @@ The toroidal field falls off at a rate $1/R$, with the peak value occurring at t Three constraints are relevant to the operating current density $J_{\mbox{op}}$ in the TF coils. -- Criticial current (`constraint 33`): $f_{\text{iooic}}J_{\mbox{op}}$ must not exceed the critical value $J_{\mbox{crit}}$ where `fiooic` is a margin on the constraint that defaults to `0.7`. +- Criticial current (`constraint 33`): $f_{\text{iooic}}J_{\mbox{op}}$ must not exceed the critical value $J_{\mbox{crit}}$ where `f_j_tf_wp_critical_max` is a margin on the constraint that defaults to `0.7`. - Temperature margin (`constraint 36`) -- The critical current density $J_{\mbox{crit}}$ falls with the temperature of the superconductor. The temperature margin $\Delta T$ is the difference between the current sharing temperature (at which $J_{\mbox{crit}}$ would be equal to $J_{\mbox{op}}$) and the operating temperature. The minimum allowed $\Delta T$ diff --git a/documentation/source/fusion-devices/stellarator.md b/documentation/source/fusion-devices/stellarator.md index 41eace1cd6..c3885f6435 100644 --- a/documentation/source/fusion-devices/stellarator.md +++ b/documentation/source/fusion-devices/stellarator.md @@ -226,7 +226,7 @@ f_a_tf_turn_cable_copper = 0.7 *Copper fraction of cable conductor (TF coils), S tftmp = 4.75 *Peak helium coolant temperature in TF coils and PF coils (K) temp_tf_cryo = 4.75 * Temperature in TF coils, required for plant efficiency (K) f_a_tf_turn_cable_space_extra_void = 0.3 *Coolant fraction of TF coil leg (itfsup=0) this is the same for conductor and strand! -fiooic = 0.78 * Fraction TF coil critical current to operation current (constraint margin) +f_j_tf_wp_critical_max = 0.78 * Fraction TF coil critical current to operation current (constraint margin) v_tf_coil_dump_quench_max_kv = 12.64 * Max voltage across tf coil during quench (kV) t_tf_superconductor_quench = 20 * Dump time (should be iteration variable) dr_tf_nose_case = 0.1 * Thickness TF Coil case (for stellarators: Also for toroidal direction) diff --git a/examples/data/large_tokamak_eval_IN.DAT b/examples/data/large_tokamak_eval_IN.DAT index 1e60fd4241..54f08dcb5c 100644 --- a/examples/data/large_tokamak_eval_IN.DAT +++ b/examples/data/large_tokamak_eval_IN.DAT @@ -93,7 +93,7 @@ dr_shld_blkt_gap = 0.02 * gap between vacuum vessel and blanket (m) b_tf_inboard_max = 14.0 * maximum peak toroidal field (T) (`constraint equation 25`) f_nd_plasma_electron_limit_max = 1.2 * density limit constraint scale (constraint equation 5) -fiooic = 0.65 * margin for TF coil operating current / critical current ratio +f_j_tf_wp_critical_max_wp_critical_max = 0.65 * margin for TF coil operating current / critical current ratio fjohc = 0.6 * margin for central solenoid current at end-of-flattop fjohc0 = 0.6 * margin for central solenoid current at beginning of pulse p_plant_electric_net_required_mw = 400.0 * required net electric power (MW) (`constraint equation 16`) diff --git a/process/core/input.py b/process/core/input.py index 95d73dd2be..301d8b60d6 100644 --- a/process/core/input.py +++ b/process/core/input.py @@ -435,7 +435,7 @@ def __post_init__(self): "f_nd_plasma_electron_limit_max": InputVariable( "constraints", float, range=(0.001, 10.0) ), - "fiooic": InputVariable("constraints", float, range=(0.001, 1.0)), + "f_j_tf_wp_critical_max": InputVariable("constraints", float, range=(0.001, 1.0)), "fjohc": InputVariable("constraints", float, range=(0.001, 1.0)), "fjohc0": InputVariable("constraints", float, range=(0.001, 1.0)), "fdiva": InputVariable("divertor", float, range=(0.1, 2.0)), diff --git a/process/core/io/plot/scans.py b/process/core/io/plot/scans.py index 0ea06cb267..08010849b7 100644 --- a/process/core/io/plot/scans.py +++ b/process/core/io/plot/scans.py @@ -91,7 +91,7 @@ def plot_scan( 11: "beta_norm_max", 12: "f_c_plasma_bootstrap_max", 13: "boundu(10)", - 14: "fiooic", + 14: "f_j_tf_wp_critical_max", 16: "rmajor", 17: "b_tf_inboard_peak_symmetric", # b_tf_inboard_max the maximum T field upper limit is the scan variable 18: "eta_cd_norm_hcd_primary_max", diff --git a/process/core/scan.py b/process/core/scan.py index 4abb9609da..2b455fc819 100644 --- a/process/core/scan.py +++ b/process/core/scan.py @@ -67,7 +67,9 @@ def _missing_(cls, var): "f_c_plasma_bootstrap_max", "Bootstrap_fraction", 12 ) boundu10 = ScanVariable("boundu(10)", "H_factor_upper_bound", 13) - fiooic = ScanVariable("fiooic", "TFC_Iop_/_Icrit_margin", 14) + f_j_tf_wp_critical_max = ScanVariable( + "f_j_tf_wp_critical_max", "TFC_Iop_/_Icrit_margin", 14 + ) rmajor = ScanVariable("rmajor", "Plasma_major_radius_(m)", 16) b_tf_inboard_max = ScanVariable("b_tf_inboard_max", "Max_toroidal_field_(T)", 17) eta_cd_norm_hcd_primary_max = ScanVariable( diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index dcc7cd196a..290c5b453e 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -867,16 +867,16 @@ def constraint_equation_33(constraint_registration, data): args : output structure : residual error; constraint value; - fiooic: margin for TF coil operating current / critical + f_j_tf_wp_critical_max: margin for TF coil operating current / critical j_tf_wp_critical: critical current density for winding pack (A/m²) j_tf_wp: winding pack current density (A/m²) - fiooic scales the constraint such that: - j_tf_wp / j_tf_wp_critical <= fiooic. + f_j_tf_wp_critical_max scales the constraint such that: + j_tf_wp / j_tf_wp_critical <= f_j_tf_wp_critical_max. """ return leq( data.tfcoil.j_tf_wp, - (data.tfcoil.j_tf_wp_critical * data.constraints.fiooic), + (data.tfcoil.j_tf_wp_critical * data.constraints.f_j_tf_wp_critical_max), constraint_registration, ) diff --git a/process/data_structure/constraint_variables.py b/process/data_structure/constraint_variables.py index 7986752ac9..d688529985 100644 --- a/process/data_structure/constraint_variables.py +++ b/process/data_structure/constraint_variables.py @@ -22,8 +22,8 @@ class ConstraintData: """Maximum allowed plasma radiation fraction at the separatrix (`constraint equation 17`)""" - fiooic: float = 0.7 - """Constraint margin for TF coil operating current / critical current ratio + f_j_tf_wp_critical_max: float = 0.7 + """Max allowed ratio of TF winding pack current density to critical current density (`constraint equation 33`) """ diff --git a/process/data_structure/scan_variables.py b/process/data_structure/scan_variables.py index 2a9fb041df..11752674d3 100644 --- a/process/data_structure/scan_variables.py +++ b/process/data_structure/scan_variables.py @@ -46,7 +46,7 @@ class ScanData:
  • 11 beta_norm_max
  • 12 f_c_plasma_bootstrap_max
  • 13 boundu(10: hfact) -
  • 14 fiooic +
  • 14 f_j_tf_wp_critical_max
  • 16 rmajor
  • 15 NOT USED
  • 17 b_tf_inboard_max diff --git a/process/models/stellarator/coils/calculate.py b/process/models/stellarator/coils/calculate.py index 0a0638588d..3bd26a9324 100644 --- a/process/models/stellarator/coils/calculate.py +++ b/process/models/stellarator/coils/calculate.py @@ -155,7 +155,7 @@ def st_coil(stellarator, output: bool, data: DataStructure): coppera_m2_max=data.rebco.coppera_m2_max, f_a_scu_of_wp=f_a_scu_of_wp, f_vv_actual=f_vv_actual, - fiooic=data.constraints.fiooic, + f_j_tf_wp_critical_max=data.constraints.f_j_tf_wp_critical_max, inductance=inductance, max_force_density=data.tfcoil.max_force_density, max_force_density_mnm=max_force_density_mnm, @@ -423,7 +423,7 @@ def winding_pack_total_size( ) # Get here a temperature margin from data.tfcoil.tmargtf. # The operation current density weighted with the global iop/icrit fraction - lhs[:] = data.constraints.fiooic * jcrit_vector + lhs[:] = data.constraints.f_j_tf_wp_critical_max * jcrit_vector # Superconductor fraction in wp fraction_area_superconductor_of_wp = ( diff --git a/process/models/stellarator/coils/output.py b/process/models/stellarator/coils/output.py index 2744413723..ce165bc929 100644 --- a/process/models/stellarator/coils/output.py +++ b/process/models/stellarator/coils/output.py @@ -12,7 +12,7 @@ def write( coppera_m2_max, f_a_scu_of_wp, f_vv_actual, - fiooic, + f_j_tf_wp_critical_max, inductance, max_force_density, max_force_density_mnm, @@ -56,7 +56,7 @@ def write( f_vv_actual : - fiooic : + f_j_tf_wp_critical_max : inductance : @@ -352,7 +352,12 @@ def write( "(c_tf_turn)", data.tfcoil.c_tf_turn, ) - po.ovarre(stellarator.outfile, "jop/jcrit", "(fiooic)", fiooic) + po.ovarre( + stellarator.outfile, + "jop/jcrit", + "(f_j_tf_wp_critical_max)", + f_j_tf_wp_critical_max, + ) po.ovarre( stellarator.outfile, "Current density in conductor area (A/m2)", diff --git a/tests/integration/data/large_tokamak_1_MFILE.DAT b/tests/integration/data/large_tokamak_1_MFILE.DAT index dbb0d50bc8..e866bb4888 100644 --- a/tests/integration/data/large_tokamak_1_MFILE.DAT +++ b/tests/integration/data/large_tokamak_1_MFILE.DAT @@ -1310,9 +1310,9 @@ f_j_cs_start_pulse_end_flat_top = 0.9 * I_op/I_Crit TF coil limit * *---------------------------* icc = 33 -ixc = 50 * fiooic +ixc = 50 * f_j_tf_wp_critical_max boundu(50) = 1.0 -fiooic = 0.65 +f_j_tf_wp_critical_max = 0.65 * Dump voltage upper limit * *--------------------------* diff --git a/tests/integration/data/large_tokamak_2_MFILE.DAT b/tests/integration/data/large_tokamak_2_MFILE.DAT index a9e501d395..db3e54e84c 100644 --- a/tests/integration/data/large_tokamak_2_MFILE.DAT +++ b/tests/integration/data/large_tokamak_2_MFILE.DAT @@ -1311,9 +1311,9 @@ f_j_cs_start_pulse_end_flat_top = 0.9 * I_op/I_Crit TF coil limit * *---------------------------* icc = 33 -ixc = 50 * fiooic +ixc = 50 * f_j_tf_wp_critical_max boundu(50) = 1.0 -fiooic = 0.65 +f_j_tf_wp_critical_max = 0.65 * Dump voltage upper limit * *--------------------------* diff --git a/tests/integration/data/large_tokamak_3_MFILE.DAT b/tests/integration/data/large_tokamak_3_MFILE.DAT index f01e3e2599..394d734077 100644 --- a/tests/integration/data/large_tokamak_3_MFILE.DAT +++ b/tests/integration/data/large_tokamak_3_MFILE.DAT @@ -1311,9 +1311,9 @@ f_j_cs_start_pulse_end_flat_top = 0.9 * I_op/I_Crit TF coil limit * *---------------------------* icc = 33 -ixc = 50 * fiooic +ixc = 50 * f_j_tf_wp_critical_max boundu(50) = 1.0 -fiooic = 0.65 +f_j_tf_wp_critical_max = 0.65 * Dump voltage upper limit * *--------------------------* diff --git a/tests/integration/data/large_tokamak_4_MFILE.DAT b/tests/integration/data/large_tokamak_4_MFILE.DAT index 75a2a26a09..23bd457605 100644 --- a/tests/integration/data/large_tokamak_4_MFILE.DAT +++ b/tests/integration/data/large_tokamak_4_MFILE.DAT @@ -1311,9 +1311,9 @@ f_j_cs_start_pulse_end_flat_top = 0.9 * I_op/I_Crit TF coil limit * *---------------------------* icc = 33 -ixc = 50 * fiooic +ixc = 50 * f_j_tf_wp_critical_max boundu(50) = 1.0 -fiooic = 0.65 +f_j_tf_wp_critical_max = 0.65 * Dump voltage upper limit * *--------------------------* diff --git a/tests/integration/data/large_tokamak_IN.DAT b/tests/integration/data/large_tokamak_IN.DAT index aaf0c0581e..a2e9a8be19 100644 --- a/tests/integration/data/large_tokamak_IN.DAT +++ b/tests/integration/data/large_tokamak_IN.DAT @@ -85,7 +85,7 @@ fjohc = 0.7 * I_op/I_Crit TF coil limit * *---------------------------* icc = 33 -fiooic = 0.70 * margin for TF coil operating current / critical current ratio +f_j_tf_wp_critical_max = 0.70 * margin for TF coil operating current / critical current ratio * Dump voltage upper limit * *--------------------------* diff --git a/tests/integration/data/large_tokamak_MFILE.DAT b/tests/integration/data/large_tokamak_MFILE.DAT index 8bdc9bdc76..8573225b4b 100644 --- a/tests/integration/data/large_tokamak_MFILE.DAT +++ b/tests/integration/data/large_tokamak_MFILE.DAT @@ -35989,7 +35989,7 @@ fjohc = 0.7 * I_op/I_Crit TF coil limit * *---------------------------* icc = 33 -fiooic = 0.70 * margin for TF coil operating current / critical current ratio +f_j_tf_wp_critical_max = 0.70 * margin for TF coil operating current / critical current ratio * Dump voltage upper limit * *--------------------------* diff --git a/tests/integration/data/large_tokamak_eval.IN.DAT b/tests/integration/data/large_tokamak_eval.IN.DAT index 8b8c34e373..3216eb9446 100644 --- a/tests/integration/data/large_tokamak_eval.IN.DAT +++ b/tests/integration/data/large_tokamak_eval.IN.DAT @@ -93,7 +93,7 @@ dr_shld_blkt_gap = 0.02 * gap between vacuum vessel and blanket (m) b_tf_inboard_max = 14.0 * maximum peak toroidal field (T) (`constraint equation 25`) f_nd_plasma_electron_limit_max = 1.2 * density limit constraint scale (constraint equation 5) -fiooic = 0.65 +f_j_tf_wp_critical_max = 0.65 fjohc = 0.6 fjohc0 = 0.6 p_plant_electric_net_required_mw = 400.0 * required net electric power (MW) (`constraint equation 16`) diff --git a/tests/integration/data/ref_IN.DAT b/tests/integration/data/ref_IN.DAT index 28d0714b34..91856f515a 100644 --- a/tests/integration/data/ref_IN.DAT +++ b/tests/integration/data/ref_IN.DAT @@ -330,7 +330,7 @@ t_plant_pulse_burn = 1.0d4 * Burn time (s) (calculated if i_pulsed_plant=1) f_c_plasma_non_inductive = 3.9566E-01 fstrcase = 1.0000E+00 fstrcond = 9.2007E-01 - fiooic = 6.3437E-01 + f_j_tf_wp_critical_max = 6.3437E-01 fvdump = 1.0000E+00 v_tf_coil_dump_quench_max_kv = 1.0000E+01 fjprot = 1.0000E+00 diff --git a/tests/integration/data/scan_2D_MFILE.DAT b/tests/integration/data/scan_2D_MFILE.DAT index 10151377ce..9a6f036125 100644 --- a/tests/integration/data/scan_2D_MFILE.DAT +++ b/tests/integration/data/scan_2D_MFILE.DAT @@ -17604,9 +17604,9 @@ f_j_cs_start_pulse_end_flat_top = 0.9 * I_op/I_Crit TF coil limit * *---------------------------* icc = 33 -ixc = 50 * fiooic +ixc = 50 * f_j_tf_wp_critical_max boundu(50) = 1.0 -fiooic = 0.65 +f_j_tf_wp_critical_max = 0.65 * Dump voltage upper limit * *--------------------------* diff --git a/tests/integration/data/scan_MFILE.DAT b/tests/integration/data/scan_MFILE.DAT index f5d92b7f00..2518856925 100644 --- a/tests/integration/data/scan_MFILE.DAT +++ b/tests/integration/data/scan_MFILE.DAT @@ -9036,7 +9036,7 @@ boundu(42) = 0.1 ixc = 44 * f_c_plasma_non_inductive ixc = 48 * fstrcase ixc = 49 * fstrcond -ixc = 50 * fiooic +ixc = 50 * f_j_tf_wp_critical_max boundu(50) = 1.0 ixc = 51 * fvdump ixc = 52 * v_tf_coil_dump_quench_max_kv @@ -9332,7 +9332,7 @@ t_plant_pulse_burn = 1.0d4 * Burn time (s) (calculated if i_pulsed_plant=1) f_c_plasma_non_inductive = 3.9566E-01 fstrcase = 1.0000E+00 fstrcond = 9.2007E-01 - fiooic = 6.3437E-01 + f_j_tf_wp_critical_max = 6.3437E-01 fvdump = 1.0000E+00 v_tf_coil_dump_quench_max_kv = 1.0000E+01 fjprot = 1.0000E+00 diff --git a/tests/regression/input_files/large_tokamak_eval.IN.DAT b/tests/regression/input_files/large_tokamak_eval.IN.DAT index b0860c6889..69361b658b 100644 --- a/tests/regression/input_files/large_tokamak_eval.IN.DAT +++ b/tests/regression/input_files/large_tokamak_eval.IN.DAT @@ -93,7 +93,7 @@ dr_shld_blkt_gap = 0.02 * gap between vacuum vessel and blanket (m) b_tf_inboard_max = 14.0 * maximum peak toroidal field (T) (`constraint equation 25`) f_nd_plasma_electron_limit_max = 1.2 * density limit constraint scale (constraint equation 5) -fiooic = 0.65 * margin for TF coil operating current / critical current ratio +f_j_tf_wp_critical_max = 0.65 * margin for TF coil operating current / critical current ratio fjohc = 0.6 * margin for central solenoid current at end-of-flattop fjohc0 = 0.6 * margin for central solenoid current at beginning of pulse p_plant_electric_net_required_mw = 400.0 * required net electric power (MW) (`constraint equation 16`) diff --git a/tests/regression/input_files/large_tokamak_nof.IN.DAT b/tests/regression/input_files/large_tokamak_nof.IN.DAT index e1cd7ba171..7fb159b8b8 100644 --- a/tests/regression/input_files/large_tokamak_nof.IN.DAT +++ b/tests/regression/input_files/large_tokamak_nof.IN.DAT @@ -92,7 +92,7 @@ fjohc0 = 1.0 * I_op/I_Crit TF coil limit * *---------------------------* icc = 33 -fiooic = 1.0 * margin for TF coil operating current / critical current ratio +f_j_tf_wp_critical_max = 1.0 * margin for TF coil operating current / critical current ratio * Dump voltage upper limit * *--------------------------* diff --git a/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT b/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT index 28c48c5a41..cf3ffd6b5b 100644 --- a/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT +++ b/tests/regression/input_files/low_aspect_ratio_DEMO.IN.DAT @@ -241,7 +241,7 @@ f_c_plasma_non_inductive = 4.92677875380845121e-01 * DESCRIPTION: fraction of the plasma current produced by non-inductive means * JUSTIFICATION: We have a pulsed reactor so this can vary -fiooic = 1.0 +f_j_tf_wp_critical_max = 1.0 * DESCRIPTION: margin for TF coil operating current / critical current density ratio * JUSTIFICATION: Constraint equation 33 is used diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index e2341b3665..6ed771e795 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -893,7 +893,7 @@ icc = 33 * JUSTIFICATION: A quench must be avoided * VARIABLES: j_tf_wp & j_tf_wp_critical (critical current) calculated in-situ -fiooic = 0.7 +f_j_tf_wp_critical_max = 0.7 * DESCRIPTION: Constraint margin for TF superconductor operating current / critical current density * JUSTIFICATION: Margin of 0.7 for engineering reliability diff --git a/tests/regression/input_files/stellarator_helias.IN.DAT b/tests/regression/input_files/stellarator_helias.IN.DAT index 96426a3033..db6a453e34 100644 --- a/tests/regression/input_files/stellarator_helias.IN.DAT +++ b/tests/regression/input_files/stellarator_helias.IN.DAT @@ -98,7 +98,7 @@ hfact = 1.0 *H-factor on energy confinement times boundu(10) = 1.2 * ixc = 50 * itv_fiooic -fiooic = 0.8 +f_j_tf_wp_critical_max = 0.8 ixc = 109 * f_nd_alpha_electron: thermal alpha density / electron density boundl(109) = 0.0001 diff --git a/tests/unit/data/large_tokamak_IN.DAT b/tests/unit/data/large_tokamak_IN.DAT index aaf0c0581e..a2e9a8be19 100644 --- a/tests/unit/data/large_tokamak_IN.DAT +++ b/tests/unit/data/large_tokamak_IN.DAT @@ -85,7 +85,7 @@ fjohc = 0.7 * I_op/I_Crit TF coil limit * *---------------------------* icc = 33 -fiooic = 0.70 * margin for TF coil operating current / critical current ratio +f_j_tf_wp_critical_max = 0.70 * margin for TF coil operating current / critical current ratio * Dump voltage upper limit * *--------------------------* diff --git a/tests/unit/data/large_tokamak_MFILE.DAT b/tests/unit/data/large_tokamak_MFILE.DAT index 4655babbb9..1927e4dad2 100644 --- a/tests/unit/data/large_tokamak_MFILE.DAT +++ b/tests/unit/data/large_tokamak_MFILE.DAT @@ -7730,9 +7730,9 @@ f_j_cs_start_pulse_end_flat_top = 0.9 * I_op/I_Crit TF coil limit * *---------------------------* icc = 33 -ixc = 50 * fiooic +ixc = 50 * f_j_tf_wp_critical_max boundu(50) = 1.0 -fiooic = 0.65 +f_j_tf_wp_critical_max = 0.65 * Dump voltage upper limit * *--------------------------* From f85a7b86d60996f9fb39c9a9fc03d082030cdb03 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Mon, 15 Jun 2026 11:58:48 +0100 Subject: [PATCH 22/28] Enhance documentation and improve calculations in plasma models - Updated docstrings for clarity, including detailed descriptions of parameters and return values. - Refactored power calculations in the PlasmaExhaust class to use a new method for radiation fraction calculation. --- examples/data/large_tokamak_IN.DAT | 6 +-- process/core/solver/constraints.py | 2 +- process/models/physics/exhaust.py | 70 +++++++++++++++++++++--------- process/models/physics/physics.py | 7 +-- 4 files changed, 57 insertions(+), 28 deletions(-) diff --git a/examples/data/large_tokamak_IN.DAT b/examples/data/large_tokamak_IN.DAT index c1ea3b0158..38f685a562 100644 --- a/examples/data/large_tokamak_IN.DAT +++ b/examples/data/large_tokamak_IN.DAT @@ -107,7 +107,7 @@ temp_cs_superconductor_margin_min = 1.5 * Lower limit on f_alpha_energy_confinement (ratio alpha particle/energy confinement times) * *-------------------------------------------------------------------------------* icc = 62 -f_t_alpha_energy_confinement_minin = 5.0 +f_t_alpha_energy_confinement_min = 5.0 * dump time constraint for VV stresses * *--------------------------------------* @@ -128,7 +128,7 @@ icc = 81 *------------------* icc = 68 -p_div_bt_q_aspect_rmajor_max_mwaspect_rmajor_max_mw = 10.0 +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* @@ -572,4 +572,4 @@ f_a_tf_turn_cable_space_extra_void = 0.3 i_tf_sc_mat = 1 * max fluence in the TF coil -flu_tf_neutron_fast_maxutron_fast_max = 1e22 +flu_tf_neutron_fast_max = 1e22 diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index 290c5b453e..f2d8b56f33 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -1271,7 +1271,7 @@ def constraint_equation_63(constraint_registration, data): @ConstraintManager.register_constraint(64, "", "<=") def constraint_equation_64(constraint_registration, data): - """Upper limit on Zeff + """Upper limit on volume averaged plasma effective charge Zeff n_charge_plasma_effective_vol_avg_max: maximum value for Zeff n_charge_plasma_effective_vol_avg: plasma effective charge diff --git a/process/models/physics/exhaust.py b/process/models/physics/exhaust.py index 2b3a30e321..81237cb122 100644 --- a/process/models/physics/exhaust.py +++ b/process/models/physics/exhaust.py @@ -95,7 +95,7 @@ def calculate_separatrix_power( p_plasma_rad_mw: float, ) -> float: """ - Calculate the power crossing the separatrix (P_sep). + Calculate the power crossing the separatrix (Pₛₑₚ). Parameters ---------- @@ -130,19 +130,19 @@ def calculate_psep_over_r_metric( p_plasma_separatrix_mw: float, rmajor: float ) -> float: """ - Calculate the power crossing the separatrix per unit major radius (P_sep/R). + Calculate the power crossing the separatrix per unit major radius (Pₛₑₚ / R₀). Parameters ---------- p_plasma_separatrix_mw : float - Power crossing the separatrix (MW). + Power crossing the separatrix (Pₛₑₚ) [MW]. rmajor : float - Plasma major radius (m). + Plasma major radius (R₀) [m]. Returns ------- float - Power crossing the separatrix per unit major radius (MW/m). + Power crossing the separatrix per unit major radius (Pₛₑₚ / R₀) [MW/m]. """ return p_plasma_separatrix_mw / rmajor @@ -155,38 +155,66 @@ def calculate_eu_demo_re_attachment_metric( rmajor: float, ) -> float: """Calculate the EU DEMO divertor protection re-attachment metric for plasma - exhaust. + exhaust (PₛₑₚBₜ / q₉₅AR₀). Parameters ---------- p_plasma_separatrix_mw : float - Power crossing the separatrix (MW). + Power crossing the separatrix (Pₛₑₚ) [MW]. b_plasma_toroidal_on_axis : float - Toroidal magnetic field on axis (T). + Toroidal magnetic field on axis (Bₜ) [T]. q95 : float - Safety factor at 95% flux surface. + Safety factor at 95% flux surface (q₉₅). aspect : float - Aspect ratio of the plasma. + Aspect ratio of the plasma (A). rmajor : float - Plasma major radius (m). + Plasma major radius (R₀) [m]. Returns ------- float - EU DEMO re-attachment metric (MW T /m). + EU DEMO re-attachment metric (PₛₑₚBₜ / q₉₅AR₀) [MW T /m]. References ---------- - - M. Siccinio, G. Federici, R. Kembleton, H. Lux, F. Maviglia, and J. Morris, - "Figure of merit for divertor protection in the preliminary design of the - EU-DEMO reactor," Nuclear Fusion, vol. 59, no. 10, pp. 106026-106026, - Jul. 2019, doi: https://doi.org/10.1088/1741-4326/ab3153. - - - H. Zohm et al., - "A stepladder approach to a tokamak fusion power plant," - Nuclear Fusion, vol. 57, no. 8, pp. 086002-086002, May 2017, - doi: https://doi.org/10.1088/1741-4326/aa739e. + [1] M. Siccinio, G. Federici, R. Kembleton, H. Lux, F. Maviglia, and J. Morris, + "Figure of merit for divertor protection in the preliminary design of the + EU-DEMO reactor," Nuclear Fusion, vol. 59, no. 10, pp. 106026-106026, + Jul. 2019, doi: https://doi.org/10.1088/1741-4326/ab3153. + + [2] H. Zohm et al., + "A stepladder approach to a tokamak fusion power plant," + Nuclear Fusion, vol. 57, no. 8, pp. 086002-086002, May 2017, + doi: https://doi.org/10.1088/1741-4326/aa739e. """ return (p_plasma_separatrix_mw * b_plasma_toroidal_on_axis) / ( q95 * aspect * rmajor ) + + @staticmethod + def calculate_radiation_fraction( + p_plasma_rad_mw: float, p_plasma_heating_mw: float + ) -> float: + """ + Calculate the radiation fraction of the plasma. + + Parameters + ---------- + p_plasma_rad_mw : float + Radiated power from plasma (MW). + p_plasma_heating_mw : float + Total plasma heating power (MW). + + Returns + ------- + float + Radiation fraction of the plasma. + """ + if p_plasma_heating_mw == 0: + logger.warning( + "Total plasma heating power is zero, " + "cannot calculate radiation fraction." + ) + return 0.0 + + return p_plasma_rad_mw / p_plasma_heating_mw diff --git a/process/models/physics/physics.py b/process/models/physics/physics.py index 91dfb5eb7f..2f5a4845a6 100644 --- a/process/models/physics/physics.py +++ b/process/models/physics/physics.py @@ -1004,9 +1004,10 @@ def run(self): + self.data.current_drive.p_hcd_injected_total_mw ) self.data.physics.f_p_plasma_separatrix_rad = ( - 1.0e6 - * self.data.physics.p_plasma_rad_mw - / self.data.physics.p_plasma_heating_total_mw + self.exhaust.calculate_radiation_fraction( + p_plasma_rad_mw=self.data.physics.p_plasma_rad_mw, + p_plasma_heating_mw=self.data.physics.p_plasma_heating_total_mw, + ) ) self.data.physics.rad_fraction_total = ( self.data.physics.f_p_plasma_separatrix_rad From 07d94fa6babf9266712bbdf5ab724172c20b254b Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 18 Jun 2026 09:52:12 +0100 Subject: [PATCH 23/28] Refactor constraint equations to utilize PlasmaBeta and PlasmaExhaust for improved calculations --- process/core/solver/constraints.py | 45 ++++++++++++++++-------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index f2d8b56f33..67372d8736 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -9,7 +9,8 @@ from process.core.exceptions import ProcessError, ProcessValueError from process.core.model import DataStructure from process.models.physics.density_limit import DensityLimitModel -from process.models.physics.physics import BetaComponentLimits +from process.models.physics.exhaust import PlasmaExhaust +from process.models.physics.physics import BetaComponentLimits, PlasmaBeta from process.models.tfcoil.base import TFConductorModel ConstraintSymbolType = Literal["=", ">=", "<="] @@ -204,21 +205,24 @@ def constraint_equation_1(constraint_registration, data): T_i: density weighted average ion temperature [keV] B_{tot}: total toroidal + poloidal field [T] """ - return eq( - # Density weighted temperature is used here as 〈nT〉 != 〈n〉_V * 〈T〉_V - ( - data.physics.beta_fast_alpha - + data.physics.beta_beam - + 2.0e3 - * constants.RMU0 - * constants.ELECTRON_CHARGE + # Density weighted temperature is used here as 〈nT〉 != 〈n〉_V * 〈T〉_V + beta_thermal_total_vol_avg = PlasmaBeta.calculate_plasma_beta( + pres_plasma=( + constants.KILOELECTRON_VOLT * ( data.physics.nd_plasma_electrons_vol_avg * data.physics.temp_plasma_electron_density_weighted_kev + data.physics.nd_plasma_ions_total_vol_avg * data.physics.temp_plasma_ion_density_weighted_kev ) - / data.physics.b_plasma_total**2 + ), + b_field=data.physics.b_plasma_total, + ) + return eq( + ( + data.physics.beta_fast_alpha + + data.physics.beta_beam + + beta_thermal_total_vol_avg ), data.physics.beta_total_vol_avg, constraint_registration, @@ -1339,18 +1343,17 @@ def constraint_equation_68(constraint_registration, data): q95_fixed: fixed safety factor q at 95% flux surface """ if data.constraints.i_q95_fixed == 1: + p_div_bt_q_aspect_rmajor_mw = ( + PlasmaExhaust.calculate_eu_demo_re_attachment_metric( + p_plasma_separatrix_mw=data.physics.p_plasma_separatrix_mw, + b_plasma_toroidal_on_axis=data.physics.b_plasma_toroidal_on_axis, + q95=data.constraints.q95_fixed, + aspect=data.physics.aspect, + rmajor=data.physics.rmajor, + ) + ) return leq( - ( - ( - data.physics.p_plasma_separatrix_mw - * data.physics.b_plasma_toroidal_on_axis - ) - / ( - data.constraints.q95_fixed - * data.physics.aspect - * data.physics.rmajor - ) - ), + (p_div_bt_q_aspect_rmajor_mw), data.constraints.p_div_bt_q_aspect_rmajor_max_mw, constraint_registration, ) From debd2803441f537ba9de882f46b9d604c45a13f2 Mon Sep 17 00:00:00 2001 From: Christopher Ashe <91618944+chris-ashe@users.noreply.github.com> Date: Fri, 19 Jun 2026 10:08:12 +0100 Subject: [PATCH 24/28] Update examples/data/scan_example_file_IN.DAT Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com> --- examples/data/scan_example_file_IN.DAT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/data/scan_example_file_IN.DAT b/examples/data/scan_example_file_IN.DAT index 22fbbaae75..035449b613 100644 --- a/examples/data/scan_example_file_IN.DAT +++ b/examples/data/scan_example_file_IN.DAT @@ -118,7 +118,7 @@ temp_cs_superconductor_margin_min = 1.5 * Lower limit on f_alpha_energy_confinement (ratio alpha particle/energy confinement times) * *-------------------------------------------------------------------------------* icc = 62 -f_t_alpha_energy_confinement_minin = 5.0 +f_t_alpha_energy_confinement_min = 5.0 * dump time constraint for VV stresses * *--------------------------------------* From ceeaa08f13bedbe9dae82fd57748bec0334d073f Mon Sep 17 00:00:00 2001 From: Christopher Ashe <91618944+chris-ashe@users.noreply.github.com> Date: Fri, 19 Jun 2026 10:09:37 +0100 Subject: [PATCH 25/28] Update process/data_structure/physics_variables.py Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com> --- process/data_structure/physics_variables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/data_structure/physics_variables.py b/process/data_structure/physics_variables.py index 3eade41c81..42a1b785f4 100644 --- a/process/data_structure/physics_variables.py +++ b/process/data_structure/physics_variables.py @@ -126,7 +126,7 @@ class PhysicsData: """Plasma temperature profile index (⍺ₜ)""" # noqa: RUF001 aspect: float = 2.907 - """Plasma aspect ratio (A) (`iteration variable 1`) """ + """Plasma aspect ratio (A) (`iteration variable 1`)""" beamfus0: float = 1.0 """multiplier for beam-background fusion calculation""" From eee7550150c150a8d8d352cea65b28fa1fb64632 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Fri, 19 Jun 2026 10:19:18 +0100 Subject: [PATCH 26/28] Update plasma heating power documentation and calculation in PhysicsData and Physics model --- process/data_structure/physics_variables.py | 2 +- process/models/physics/physics.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/process/data_structure/physics_variables.py b/process/data_structure/physics_variables.py index 42a1b785f4..8bcb2cd059 100644 --- a/process/data_structure/physics_variables.py +++ b/process/data_structure/physics_variables.py @@ -39,7 +39,7 @@ class PhysicsData: """[J]""" p_plasma_heating_total_mw: float = 0.0 - """[W]""" + """Total heating power given to the plasma (Pₕₑₐₜ) [MW]""" t_energy_confinement_beta: float = 0.0 """[s]""" diff --git a/process/models/physics/physics.py b/process/models/physics/physics.py index 2f5a4845a6..e1b769945e 100644 --- a/process/models/physics/physics.py +++ b/process/models/physics/physics.py @@ -996,7 +996,7 @@ def run(self): self.data.physics.plomw = self.data.physics.flo * self.data.physics.ptarmw # Calculate some derived quantities that may not have been defined earlier - self.data.physics.p_plasma_heating_total_mw = 1e6 * ( + self.data.physics.p_plasma_heating_total_mw = ( self.data.physics.f_p_alpha_plasma_deposited * self.data.physics.p_alpha_total_mw + self.data.physics.p_non_alpha_charged_mw From 22a3bad5715e1ea2dd54196a69f1944ab3038629 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Fri, 19 Jun 2026 10:32:06 +0100 Subject: [PATCH 27/28] Fix typo in max fluence variable name in large tokamak input files --- examples/data/large_tokamak_eval_IN.DAT | 2 +- examples/data/large_tokamak_varied_min_net_electric_IN.DAT | 2 +- examples/data/large_tokamak_varyrun_IN.DAT | 2 +- examples/data/scan_example_file_IN.DAT | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/data/large_tokamak_eval_IN.DAT b/examples/data/large_tokamak_eval_IN.DAT index 54f08dcb5c..c70165313c 100644 --- a/examples/data/large_tokamak_eval_IN.DAT +++ b/examples/data/large_tokamak_eval_IN.DAT @@ -93,7 +93,7 @@ dr_shld_blkt_gap = 0.02 * gap between vacuum vessel and blanket (m) b_tf_inboard_max = 14.0 * maximum peak toroidal field (T) (`constraint equation 25`) f_nd_plasma_electron_limit_max = 1.2 * density limit constraint scale (constraint equation 5) -f_j_tf_wp_critical_max_wp_critical_max = 0.65 * margin for TF coil operating current / critical current ratio +f_j_tf_wp_critical_max = 0.65 * margin for TF coil operating current / critical current ratio fjohc = 0.6 * margin for central solenoid current at end-of-flattop fjohc0 = 0.6 * margin for central solenoid current at beginning of pulse p_plant_electric_net_required_mw = 400.0 * required net electric power (MW) (`constraint equation 16`) diff --git a/examples/data/large_tokamak_varied_min_net_electric_IN.DAT b/examples/data/large_tokamak_varied_min_net_electric_IN.DAT index 92ae23800a..969c0f5872 100644 --- a/examples/data/large_tokamak_varied_min_net_electric_IN.DAT +++ b/examples/data/large_tokamak_varied_min_net_electric_IN.DAT @@ -572,4 +572,4 @@ f_a_tf_turn_cable_space_extra_void = 0.3 i_tf_sc_mat = 1 * max fluence in the TF coil -flu_tf_neutron_fast_maxutron_fast_max = 1e22 +flu_tf_neutron_fast_max = 1e22 diff --git a/examples/data/large_tokamak_varyrun_IN.DAT b/examples/data/large_tokamak_varyrun_IN.DAT index 348b4c2363..4f37c1e43d 100644 --- a/examples/data/large_tokamak_varyrun_IN.DAT +++ b/examples/data/large_tokamak_varyrun_IN.DAT @@ -572,4 +572,4 @@ f_a_tf_turn_cable_space_extra_void = 0.3 i_tf_sc_mat = 1 * max fluence in the TF coil -flu_tf_neutron_fast_maxutron_fast_max = 1e22 +flu_tf_neutron_fast_max = 1e22 diff --git a/examples/data/scan_example_file_IN.DAT b/examples/data/scan_example_file_IN.DAT index 035449b613..1d27399602 100644 --- a/examples/data/scan_example_file_IN.DAT +++ b/examples/data/scan_example_file_IN.DAT @@ -138,7 +138,7 @@ icc = 81 *------------------* icc = 68 -p_div_bt_q_aspect_rmajor_max_mwaspect_rmajor_max_mw = 10.0 +p_div_bt_q_aspect_rmajor_max_mw = 10.0 * TF coil stress limits * *-----------------------* From 10cd0fa6640ef48301b6c5bc4c0023abb6e07a28 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Fri, 19 Jun 2026 11:06:54 +0100 Subject: [PATCH 28/28] Implement total plasma heating power calculation and add unit test --- examples/data/scan_example_file_IN.DAT | 2 +- process/models/physics/physics.py | 54 ++++++++++++++++++++--- tests/unit/models/physics/test_physics.py | 14 ++++++ 3 files changed, 64 insertions(+), 6 deletions(-) diff --git a/examples/data/scan_example_file_IN.DAT b/examples/data/scan_example_file_IN.DAT index 1d27399602..addb0436d9 100644 --- a/examples/data/scan_example_file_IN.DAT +++ b/examples/data/scan_example_file_IN.DAT @@ -582,4 +582,4 @@ f_a_tf_turn_cable_space_extra_void = 0.3 i_tf_sc_mat = 1 * max fluence in the TF coil -flu_tf_neutron_fast_maxutron_fast_max = 1e22 +flu_tf_neutron_fast_max = 1e22 diff --git a/process/models/physics/physics.py b/process/models/physics/physics.py index e1b769945e..203d1c38a1 100644 --- a/process/models/physics/physics.py +++ b/process/models/physics/physics.py @@ -997,11 +997,13 @@ def run(self): # Calculate some derived quantities that may not have been defined earlier self.data.physics.p_plasma_heating_total_mw = ( - self.data.physics.f_p_alpha_plasma_deposited - * self.data.physics.p_alpha_total_mw - + self.data.physics.p_non_alpha_charged_mw - + self.data.physics.p_plasma_ohmic_mw - + self.data.current_drive.p_hcd_injected_total_mw + self.calculate_total_plasma_heating_power( + f_p_alpha_plasma_deposited=self.data.physics.f_p_alpha_plasma_deposited, + p_alpha_total_mw=self.data.physics.p_alpha_total_mw, + p_non_alpha_charged_mw=self.data.physics.p_non_alpha_charged_mw, + p_plasma_ohmic_mw=self.data.physics.p_plasma_ohmic_mw, + p_hcd_injected_total_mw=self.data.current_drive.p_hcd_injected_total_mw, + ) ) self.data.physics.f_p_plasma_separatrix_rad = ( self.exhaust.calculate_radiation_fraction( @@ -2201,6 +2203,13 @@ def outplas(self): ) po.oblnkl(self.outfile) + po.ovarre( + self.outfile, + "Total heating power given to the plasma (Pₕₑₐₜ) [MW]", + "(p_plasma_heating_total_mw)", + self.data.physics.p_plasma_heating_total_mw, + "OP ", + ) po.ovarre( self.outfile, "Ohmic heating power (MW)", @@ -2968,6 +2977,41 @@ def calculate_plasma_masses( m_plasma, ) + @staticmethod + def calculate_total_plasma_heating_power( + f_p_alpha_plasma_deposited: float, + p_alpha_total_mw: float, + p_non_alpha_charged_mw: float, + p_plasma_ohmic_mw: float, + p_hcd_injected_total_mw: float, + ) -> float: + """Calculate the total plasma heating power (Pₕₑₐₜ). + + Parameters + ---------- + f_p_alpha_plasma_deposited : float + Fraction of alpha power deposited in plasma. + p_alpha_total_mw : float + Total alpha power (MW). + p_non_alpha_charged_mw : float + Non-alpha charged particle heating power (MW). + p_plasma_ohmic_mw : float + Ohmic heating power (MW). + p_hcd_injected_total_mw : float + Total heating power from HCD injection (MW). + + Returns + ------- + float + Total plasma heating power (MW). + """ + return ( + f_p_alpha_plasma_deposited * p_alpha_total_mw + + p_non_alpha_charged_mw + + p_plasma_ohmic_mw + + p_hcd_injected_total_mw + ) + def res_diff_time(rmajor, res_plasma, kappa95): """Calculates resistive diffusion time diff --git a/tests/unit/models/physics/test_physics.py b/tests/unit/models/physics/test_physics.py index 5abbd0b352..03efd856d5 100644 --- a/tests/unit/models/physics/test_physics.py +++ b/tests/unit/models/physics/test_physics.py @@ -9,6 +9,7 @@ from process.models.physics.impurity_radiation import initialise_imprad from process.models.physics.physics import ( DetailedPhysics, + Physics, PlasmaBeta, PlasmaInductance, calculate_cylindrical_safety_factor, @@ -63,6 +64,19 @@ def test_ps_fraction_scene(): assert pscf == pytest.approx(-0.0135, abs=0.0001) +def test_calculate_total_plasma_heating_power(): + """Test calculate_total_plasma_heating_power().""" + p_plasma_heating_total_mw = Physics.calculate_total_plasma_heating_power( + f_p_alpha_plasma_deposited=0.25, + p_alpha_total_mw=40.0, + p_non_alpha_charged_mw=3.0, + p_plasma_ohmic_mw=5.0, + p_hcd_injected_total_mw=7.0, + ) + + assert p_plasma_heating_total_mw == pytest.approx(25.0) + + class BootstrapFractionIter89Param(NamedTuple): aspect: Any = None