-
Notifications
You must be signed in to change notification settings - Fork 24
Add new quench protection constraint #4518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,3 +66,5 @@ env-fork | |
| !documentation/**/*.html | ||
| process/_version.py | ||
| *.ipynb | ||
| cost_conf.toml | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Accidentally commented out? |
||
| # 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 | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1954,6 +1954,32 @@ def constraint_equation_92(constraint_registration, data): | |||||
| ) | ||||||
|
|
||||||
|
|
||||||
| @ConstraintManager.register_constraint(93, "GJ/m3", ">=") | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this not be
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| 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 = ( | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This value is going to be wildly different depending on what type of turn is used. |
||||||
| data.tfcoil.f_a_tf_turn_cable_copper | ||||||
| * data.superconducting_tfcoil.dr_tf_turn | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
| * 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. | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am unsure about the definition of this and it doesn't follow the style guide. Does this mean 0.25 GJ of stored energy per 1 m^3 of copper in the TF coil is the upper limit? |
||
| """TF coil stored energy to copper volume ratio (`constraint equation 93`) """ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we comment the units here, even if it is dimensionless |
||
|
|
||
|
|
||
| CREATE_DICTS_FROM_DATACLASS = ConstraintData | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to try and avoid personalised edits to the .gitignore as this makes it long and confusing