Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ env-fork
!documentation/**/*.html
process/_version.py
*.ipynb
cost_conf.toml

10 changes: 5 additions & 5 deletions process/core/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions process/core/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down
26 changes: 26 additions & 0 deletions process/core/solver/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
3 changes: 3 additions & 0 deletions process/data_structure/constraint_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions process/data_structure/numerics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)<UL>
Expand Down Expand Up @@ -389,6 +390,7 @@ class NumericsData:
* (90) Lower Limit on number of stress load cycles for CS
* (91) Checking if the design point is ECRH ignitable
* (92) D/T/He3 ratio in fuel sums to 1
* (93) Lower limit of the copper in TF coil needed for quench protection
"""

ixc: list[int] = field(default_factory=lambda: np.array([0] * IPNVARS))
Expand Down
2 changes: 1 addition & 1 deletion process/data_structure/scan_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""Maximum number of scan points"""


IPNSCNV = 81
IPNSCNV = 82
"""Number of available scan variables"""


Expand Down
3 changes: 3 additions & 0 deletions process/models/tfcoil/superconducting.py
Original file line number Diff line number Diff line change
Expand Up @@ -3130,7 +3130,10 @@ def tf_cable_in_conduit_superconductor_properties(
logger.error(
f"""Negative Iop/Icrit for TF coil
jsc: {j_superconductor}
c_tf_turn: {c_tf_turn}
c_turn_cables_critical: {c_turn_cables_critical}
f_c_tf_turn_operating_critical: {f_c_tf_turn_operating_critical}
a_tf_turn_cable_space_effective: {a_tf_turn_cable_space_effective}
j_superconductor_critical: {j_superconductor_critical}
Check conductor dimensions. Cable space area a_tf_turn_cable_space
likely gone negative. a_tf_turn_cable_space: {a_tf_turn_cable_space}
Expand Down
Loading