♻️ Move 'dcond' variable into SuperconductorModel - #4644
Open
chris-ashe wants to merge 1 commit into
Open
chris-ashe wants to merge 1 commit into
chris-ashe wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4644 +/- ##
=======================================
Coverage 49.97% 49.98%
=======================================
Files 151 151
Lines 30270 30274 +4
=======================================
+ Hits 15128 15133 +5
+ Misses 15142 15141 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
Can I ask someone from @ukaea/process-model-review to check the new superconductor density values. I feel some of the values before were gravely wrong. |
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 how superconductor material densities are handled throughout the codebase. Instead of using the
dcondarray for density values, the code now retrieves densities directly from theSuperconductorModel. This change improves maintainability and clarity by centralizing material properties. The update also removes thedcondfield from data structures, input definitions, and tests, and updates expected test values to reflect the new density values.The most important changes are:
Core logic and data structure updates
dconddensity array for superconductor materials with lookups fromSuperconductorModel(...).material.densityin all relevant models and calculations, including TF coil, PF coil, and cost models.dcondfield from theTFDatadata structure and from the input variable definitions.Superconductor material definition
SuperconductorMaterialenum to include density as a property, and added adensitydynamic attribute for direct access.Test suite updates
dcondfrom test parameter definitions, monkeypatching, and test logic intest_costs_1990.py,test_pfcoil.py, andtest_sctfcoil.py.Test value updates
SuperconductorModel, ensuring consistency with the refactored logic.These changes centralize material properties for superconductors, reduce redundancy, and make the codebase easier to maintain and extend.…eferences
Description
Checklist
I confirm that I have completed the following checks: