Skip to content

Conversation

@chris-ashe
Copy link
Collaborator

@chris-ashe chris-ashe commented Oct 9, 2025

This pull request refactors and standardizes the naming conventions for CroCo cable and REBCO tape geometry variables throughout the codebase, updates related documentation, and introduces a new plotting function for CroCo cable geometry. The changes improve code clarity, consistency, and maintainability, and provide better documentation and visualization of CroCo cable geometry.

A new function calculate_croco_cable_geometry() has been made to specifically calculate the cable dimensions

🔄 Variable renaming and standardization (most impactful):

  • All REBCO tape and CroCo cable geometry variables have been renamed for clarity and consistency, replacing ambiguous names like rebco_thickness, copper_thick, croco_od, and croco_thick with standardized names:

croco_od -> dia_croco_strand
croco_thick -> dx_croco_strand_copper
rebco_thickness -> dx_hts_tape_rebco
copper_thick -> dx_hts_tape_copper
hastelloy_thickness -> dx_hts_tape_hastelloy
stack_thickness -> dx_croco_strand_tape_stack
tape_thickness -> dx_hts_tape_total
tape_width -> dr_hts_tape
tapes -> n_croco_strand_hts_tapes
rebco_area -> a_croco_strand_rebco
hastelloy_area -> a_croco_strand_hastelloy
solder_area -> a_croco_strand_solder
croco_id -> dia_croco_strand_tape_region
copper_area -> a_croco_strand_copper_total

croco() ->calculate_croco_cable_geometry()

❇️ New variables

a_croco_strand

Documentation updates:

  • Updated the documentation in superconductors.md to describe the CroCo cable geometry calculation with clear variable mappings to code identifiers, improving traceability between theory and implementation.

CroCo cable geometry plotting:

  • Added a new function plot_corc_cable_geometry to process/io/plot_proc.py for visualizing CroCo strand geometry, including copper jacket, solder, HTS tape stack, and individual tape layers.
image

Data structure and initialization improvements:

  • Updated initialization and grouping of CroCo and REBCO tape geometry variables in process/data_structure/rebco_variables.py to use the new standardized names and added descriptive comments for each variable.

Function and interface updates:

  • Updated all function calls and interfaces in relevant modules (e.g., superconpf, supercon_croco) to use the new variable names, ensuring consistency and reducing confusion.

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@codecov-commenter
Copy link

codecov-commenter commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 56.00000% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.84%. Comparing base (9fc4b8b) to head (69ab458).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
process/io/plot_proc.py 6.45% 29 Missing ⚠️
process/superconductors.py 51.72% 14 Missing ⚠️
process/superconducting_tf_coil.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3891      +/-   ##
==========================================
- Coverage   46.40%   44.84%   -1.56%     
==========================================
  Files         123      123              
  Lines       28173    30511    +2338     
==========================================
+ Hits        13073    13684     +611     
- Misses      15100    16827    +1727     

☔ View full report in Codecov by Sentry.
📢 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 marked this pull request as ready for review October 13, 2025 16:21
…ed clarity and consistency across the codebase
…es for improved clarity and consistency across the codebase
…ferences for improved clarity and consistency across the codebase
…and update references in 'calculate_croco_cable_geometry' function for consistency
…ate references for clarity in CroCo strand area calculations
@chris-ashe chris-ashe marked this pull request as draft October 14, 2025 07:34
@chris-ashe chris-ashe marked this pull request as ready for review October 14, 2025 08:13
Copy link
Collaborator

@timothy-nunn timothy-nunn left a comment

Choose a reason for hiding this comment

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

Couple of questions/minor changes. Havent checked documentation/eng-models/superconductors.md

Copy link
Collaborator

@j-a-foster j-a-foster left a comment

Choose a reason for hiding this comment

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

Happy with the image attached to the PR.

@timothy-nunn timothy-nunn merged commit b28f6b8 into main Oct 15, 2025
26 of 27 checks passed
@timothy-nunn timothy-nunn deleted the refactor_croco branch October 15, 2025 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants