Skip to content

Add new quench protection constraint - #4518

Open
ajpearcey wants to merge 2 commits into
mainfrom
new-mag-constraints
Open

Add new quench protection constraint#4518
ajpearcey wants to merge 2 commits into
mainfrom
new-mag-constraints

Conversation

@ajpearcey

Copy link
Copy Markdown
Collaborator

Adds new quench protection metric.

@ajpearcey ajpearcey self-assigned this Aug 13, 2026
@ajpearcey
ajpearcey requested a review from a team as a code owner August 13, 2026 10:12
@ajpearcey ajpearcey added the TF Coil Toroidal field coil label Aug 13, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.32%. Comparing base (d6ce17a) to head (ed86a5b).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4518      +/-   ##
==========================================
+ Coverage   49.21%   49.32%   +0.10%     
==========================================
  Files         151      150       -1     
  Lines       29673    29774     +101     
==========================================
+ Hits        14604    14685      +81     
- Misses      15069    15089      +20     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chris-ashe
chris-ashe self-requested a review August 13, 2026 13:23

@chris-ashe chris-ashe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things about understanding of the constraint. Alot of the calcs need to be put into the specific TF configuration class

)


@ConstraintManager.register_constraint(93, "GJ/m3", ">=")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this not be <= as it places an upper limit on the stored energy to copper ratio?

)


@ConstraintManager.register_constraint(93, "GJ/m3", ">=")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@ConstraintManager.register_constraint(93, "GJ/m3", ">=")
@ConstraintManager.register_constraint(93, "GJ/", ">=")

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 = (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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. f_a_tf_turn_cable_copper only represents the area fraction of copper in a superconducting strand in CICC configuration.

"""
vol_tf_copper = (
data.tfcoil.f_a_tf_turn_cable_copper
* data.superconducting_tfcoil.dr_tf_turn

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a_tf_turn could just be used here

Comment thread process/core/init.py
"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:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidentally commented out?

I.e. p_l_h_threshold_mw / p_plasma_separatrix_mw >= f_l_mode_margin
"""

magnetic_stored_energy_copper_vol_ratio: float = 0.25

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TF Coil Toroidal field coil

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants