♻️ Refactor plasma toroidal ripple#3905
Merged
timothy-nunn merged 9 commits intomainfrom Nov 3, 2025
Merged
Conversation
a69375f to
5f5ff46
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3905 +/- ##
==========================================
- Coverage 46.19% 46.01% -0.18%
==========================================
Files 123 123
Lines 28589 28723 +134
==========================================
+ Hits 13206 13217 +11
- Misses 15383 15506 +123 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
70fe73a to
d3dc8fc
Compare
Collaborator
timothy-nunn
left a comment
There was a problem hiding this comment.
Happy with code, just one question then good for merge
… tests for robustness
d331b34 to
41a826d
Compare
…date related sections for clarity
41a826d to
64b44e1
Compare
timothy-nunn
approved these changes
Nov 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request makes several improvements and refactors related to the handling and visualization of toroidal field (TF) coil geometry and ripple calculations in the codebase. The changes enhance the modularity and clarity of the TF coil ripple calculation, introduce new variables for more detailed coil geometry modeling, and improve the plotting of coil properties.
❇️ New variables
dx_tf_side_case_peak: Maximum side case thickness on the inboard TF coilTF coil ripple calculation refactor and improvements:
plasma_outboard_edge_toroidal_ripplemethod inprocess/build.pyto accept all required parameters explicitly, removing reliance on global variables and improving documentation and clarity of the calculation. This includes a clearer distinction between analytical and numerical models and more robust handling of input ranges.plasma_outboard_edge_toroidal_rippleincalculate_radial_buildto pass the new expanded parameter list, ensuring correct data flow and improving maintainability.superconducting_tf_coil_variablestoprocess/build.pyto support the expanded parameterization.TF coil geometry variable enhancements:
dx_tf_side_case_peaktotfcoil_variables.pyto represent the peak thickness of the TF coil sidewall case, along with initialization and global declaration updates.Plotting and visualization improvements:
plot_superconducting_tf_wpinplot_proc.pyto plot the maximum toroidal width including the side case using the newdx_tf_side_case_peakvariable, and to display this value in the coil casing information textbox.🐛 Bugs
Quite a handful of TF side case geometry was being calculated in-situ. This has now been replaced with the actual variables taken from the TF class.
❌
✅
The WP centre was being calculated incorrectly as it was using the inboard edge and then adding half of the total WP thickness which includes the insulation and gap and is not just the conductor region.
❌
✅
🎨 Output changes
A new toroidal rupple map has been added to
plot_procOther minor changes:
Buildtoplot_proc.pyfor future extensibility.Checklist
I confirm that I have completed the following checks: