diff --git a/process/core/input.py b/process/core/input.py index 31b6c6f6cd..bd490eead0 100644 --- a/process/core/input.py +++ b/process/core/input.py @@ -1186,6 +1186,7 @@ def bounds(self) -> tuple[NumberType | None, NumberType | None]: "f_len_sol_power_decay_inboard_outboard": InputVariable( "physics", float, range=(0.01, 2.0) ), + "molflow_plasma_fuelling": InputVariable("physics", float, range=(1.0e20, 1.0e23)), } diff --git a/process/core/io/plot/summary.py b/process/core/io/plot/summary.py index 212f2f1e94..3a27cce530 100644 --- a/process/core/io/plot/summary.py +++ b/process/core/io/plot/summary.py @@ -2976,7 +2976,7 @@ def plot_main_plasma_information( f" - Average mass of all plasma ions: {mfile.get('m_ions_total_amu', scan=scan):.3f} amu\n" f"Fuel mass: {mfile.get('m_plasma_fuel_ions', scan=scan) * 1000:.4f} g\n" f" - Average mass of all fuel ions: {mfile.get('m_fuel_amu', scan=scan):.3f} amu\n\n" - f"Fueling rate: {mfile.get('molflow_plasma_fuelling_required', scan=scan):.3e} nucleus-pairs/s\n" + f"Fueling rate: {mfile.get('molflow_plasma_fuelling', scan=scan):.3e} nucleus-pairs/s\n" f"Fuel burn-up rate: {mfile.get('rndfuel', scan=scan):.3e} reactions/s \n" f"Burn-up fraction: {mfile.get('burnup', scan=scan):.4f} \n" ) diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index c5d786d0f8..08792a461e 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -1981,6 +1981,20 @@ def constraint_equation_92(constraint_registration, data): ) +@ConstraintManager.register_constraint(93, "", "=") +def constraint_equation_93(constraint_registration, data): + """Fuel-ion equilibrium constraint. + + Requires the plasma fuelling rate to equal the fuelling rate required + for fuel-ion equilibrium. + """ + return eq( + data.physics.molflow_plasma_fuelling, + data.physics.molflow_plasma_fuelling_equilibrium, + constraint_registration, + ) + + def constraint_eqns(m: int, ieqn: int, data: DataStructure): """Evaluates the constraints given the current state of PROCESS. diff --git a/process/core/solver/iteration_variables.py b/process/core/solver/iteration_variables.py index fd468c5537..5a2dc0ee68 100644 --- a/process/core/solver/iteration_variables.py +++ b/process/core/solver/iteration_variables.py @@ -239,6 +239,12 @@ class IterationVariable: 175: IterationVariable("kappa", "physics", 0.00, 10.00), 176: IterationVariable("f_st_coil_aspect", "stellarator", 0.70, 1.30), 177: IterationVariable("f_a_tf_turn_cable_space_extra_void", "tfcoil", 0.01, 1.0), + 178: IterationVariable( + "molflow_plasma_fuelling", + "physics", + 1.0e20, + 1.0e23, + ), } diff --git a/process/data_structure/numerics.py b/process/data_structure/numerics.py index 85785576a4..cc2c175b03 100644 --- a/process/data_structure/numerics.py +++ b/process/data_structure/numerics.py @@ -292,6 +292,7 @@ class NumericsData: "CS achievable stress load cycles lower limit ", "ECRH ignitability ", # Stellarator constraint "Fuel composition consistency ", + "Fuel ion equilibrium ", ] ) """Labels describing constraint equations (corresponding itvs)