Add specific dr_cs_bore variable#4437
Open
chris-ashe wants to merge 9 commits into
Open
Conversation
…ess and use dr_cs_bore instead
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4437 +/- ##
=======================================
Coverage 48.64% 48.64%
=======================================
Files 151 151
Lines 29673 29673
=======================================
+ Hits 14433 14434 +1
+ Misses 15240 15239 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Collaborator
|
Given the logic change in |
| + 2.0 * self.data.build.dr_cs_tf_gap | ||
| + self.data.build.dr_cs | ||
| ) | ||
| * (2.0 * self.data.build.dr_cs_bore + self.data.build.dr_cs) |
Collaborator
There was a problem hiding this comment.
Is dr_cs_bore being used here before it is set?
timothy-nunn
requested changes
Jul 16, 2026
| @@ -1723,6 +1687,22 @@ def calculate_radial_build(self, output: bool): | |||
| + self.data.build.dr_cs_precomp | |||
Collaborator
There was a problem hiding this comment.
dr_cs_precomp is being used here but calculated below!
Collaborator
|
@j-a-foster sorry to ask for another, could you just check the re-ordering in |
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 refactors the codebase to consistently use a new variable,
dr_cs_bore, to represent the central solenoid (CS) bore radius, replacing the previous use ofdr_borefor this purpose. The changes improve clarity and accuracy in the modeling of the CS geometry, update all related calculations, plotting routines, and tests, and provide more precise documentation for these variables.Variable refactoring and improved clarity:
dr_cs_boreinBuildDatato explicitly represent the CS bore radius, updated its documentation, and ensured it is set appropriately in the radial build calculations (process/data_structure/build_variables.py,process/models/build.py).dr_cs_boreinstead ofdr_borewhen referring to the CS bore, including function signatures, calculations, and docstrings (process/models/geometry/pfcoil.py,process/models/pfcoil.py,process/core/io/plot/summary.py).dr_cs_borewhere appropriate (process/models/pfcoil.py).Testing updates:
dr_cs_boreinstead ofdr_borefor the CS bore radius, ensuring test consistency with the new variable naming and logic (tests/unit/models/test_pfcoil.py).Plotting improvements:
process/core/io/plot/summary.py).These changes make the codebase more maintainable and reduce ambiguity around the meaning of the bore radius variables, ensuring that the CS bore and other bore-related quantities are clearly distinguished.## Description
Checklist
I confirm that I have completed the following checks: