diff --git a/.gitignore b/.gitignore index e2aed544c3..a8f78b6be2 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,5 @@ env-fork !documentation/**/*.html process/_version.py *.ipynb +cost_conf.toml + diff --git a/process/core/init.py b/process/core/init.py index d75e501396..d43671e800 100644 --- a/process/core/init.py +++ b/process/core/init.py @@ -995,11 +995,11 @@ def check_process(inputs, data): # noqa: ARG001 + 4.0 * data.tfcoil.radius_cp_coolant_channel ) - if data.numerics.boundl[139] < dr_tf_wp_min: - raise ProcessValidationError( - "The TF coil WP thickness (dr_tf_wp_with_insulation) must be at least", - dr_tf_wp_min=dr_tf_wp_min, - ) + #if data.numerics.boundl[140] < dr_tf_wp_min: + # raise ProcessValidationError( + # "The TF coil WP thickness (dr_tf_wp_with_insulation) must be at least", + # dr_tf_wp_min=dr_tf_wp_min, + # ) # Setting i_dx_tf_turn_general_input to true if dx_tf_turn_general is an input data.tfcoil.i_dx_tf_turn_general_input = abs(data.tfcoil.dx_tf_turn_general) > 0 diff --git a/process/core/input.py b/process/core/input.py index 1d7c132b6a..32a712174c 100644 --- a/process/core/input.py +++ b/process/core/input.py @@ -474,6 +474,9 @@ def bounds(self) -> tuple[NumberType | None, NumberType | None]: "fkind": InputVariable("costs", float, range=(0.5, 1.0)), "f_h_mode_margin": InputVariable("constraints", float, range=(0.001, 1000000.0)), "f_l_mode_margin": InputVariable("constraints", float, range=(0.001, 1000000.0)), + "magnetic_stored_energy_copper_vol_ratio": InputVariable( + "constraints", float, range=(0.0, 100.0) + ), "flirad": InputVariable("ife", float, range=(0.0, 10.0)), "flpitch": InputVariable("stellarator", float, range=(0.0001, 0.01)), "f_div_flux_expansion": InputVariable("divertor", float, range=(0.0, 10.0)), diff --git a/process/core/solver/constraints.py b/process/core/solver/constraints.py index e8def90ef6..d575e9936e 100644 --- a/process/core/solver/constraints.py +++ b/process/core/solver/constraints.py @@ -1954,6 +1954,32 @@ def constraint_equation_92(constraint_registration, data): ) +@ConstraintManager.register_constraint(93, "GJ/m3", ">=") +def constraint_equation_93(constraint_registration, data): + """Lower limit of the copper in TF coil needed for quench protection + f_a_tf_turn_cable_copper: copper fraction of cable conductor TF coils + dr_tf_turn: Turn radial dimension (m) + dx_tf_turn: Turn toroidal dimension (m) + len_tf_coil: TF coil circumference (m) + n_tf_coil_turns: Number of turns per TF coil + e_tf_magnetic_stored_total_gj: Total stored energy in TF coils (GJ) + magnetic_stored_energy_copper_vol_ratio: TF coil stored energy to copper volume ratio + """ + vol_tf_copper = ( + data.tfcoil.f_a_tf_turn_cable_copper + * data.superconducting_tfcoil.dr_tf_turn + * data.superconducting_tfcoil.dx_tf_turn + * data.tfcoil.n_tf_coil_turns + * (data.tfcoil.len_tf_coil + data.tfcoil.cplen) + ) + energy_per_vol_tf_copper_min = ( + data.constraints.magnetic_stored_energy_copper_vol_ratio + * data.tfcoil.e_tf_magnetic_stored_total_gj + ) + + return geq(vol_tf_copper, energy_per_vol_tf_copper_min, constraint_registration) + + def constraint_eqns(m: int, ieqn: int, data: DataStructure): """Evaluates the constraints given the current state of PROCESS. diff --git a/process/data_structure/constraint_variables.py b/process/data_structure/constraint_variables.py index 6b26483816..0107923990 100644 --- a/process/data_structure/constraint_variables.py +++ b/process/data_structure/constraint_variables.py @@ -131,5 +131,8 @@ class ConstraintData: I.e. p_l_h_threshold_mw / p_plasma_separatrix_mw >= f_l_mode_margin """ + magnetic_stored_energy_copper_vol_ratio: float = 0.25 + """TF coil stored energy to copper volume ratio (`constraint equation 93`) """ + CREATE_DICTS_FROM_DATACLASS = ConstraintData diff --git a/process/data_structure/numerics.py b/process/data_structure/numerics.py index 57505f1c39..2cb813c824 100644 --- a/process/data_structure/numerics.py +++ b/process/data_structure/numerics.py @@ -287,6 +287,7 @@ class NumericsData: "CS achievable stress load cycles lower limit ", "ECRH ignitability ", # Stellarator constraint "Fuel composition consistency ", + "TF coil stored energy < copper in TF coil ", ] ) """Labels describing constraint equations (corresponding itvs)