Skip to content

Update pfcoil_variables.f90 variables for clarity#3538

Merged
timothy-nunn merged 70 commits intomainfrom
update_pfcoil_variables_for_clarity
Mar 7, 2025
Merged

Update pfcoil_variables.f90 variables for clarity#3538
timothy-nunn merged 70 commits intomainfrom
update_pfcoil_variables_for_clarity

Conversation

@chris-ashe
Copy link
Copy Markdown
Collaborator

@chris-ashe chris-ashe commented Feb 11, 2025

This PR changes the vast majority of the variables found in pfcoil_variables.f90 in attempt to make them more verbose, descriptive and easier to understand. This is due to many of the PF variables still being in the old Fortran style.

These changes are not exhaustive and the new variable name may not represent the variable exactly as its new name is inferred from its previous. Therefore some variables may change again in the future if their naming is found to not be accurate.

Namespace changes

Variables

Numbers

  • ncirt -> n_pf_cs_plasma_circuits
  • turns -> n_pf_coil_turns
  • nohc -> n_cs_pf_coils
  • ncls -> n_pf_coils_in_group
  • ngrpmx -> n_pf_groups_max
  • ngrp -> n_pf_coil_groups
  • nclsmx -> n_pf_coils_in_group_max
  • ngc -> n_pf_coils_max

Geometry

For the six vertical and radial variables there was a lot of name mangling when doing find and replace as the variables aren't verbose enough to what exactly they are for

  • ra -> r_pf_coil_inner
  • rb -> r_pf_coil_outer
  • rpf -> r_pf_coil_middle
  • rohc -> r_cs_middle
  • ipfloc -> i_pf_location
  • zh -> z_pf_coil_upper
  • zl -> z_pf_coil_lower
  • zpf -> z_pf_coil_middle
  • pfrmax -> r_pf_coil_outer_max
  • a_oh_turn -> a_cs_turn
  • areaoh -> a_cs_poloidal
  • vf -> f_a_pf_coil_void
  • vfohc -> f_a_cs_void

Structures

  • wtc -> m_pf_coil_conductor
  • whtpf -> m_pf_coil_conductor_total
  • wts -> m_pf_coil_structure
  • whtpfs -> m_pf_coil_structure_total
  • oh_steel_frac -> f_a_cs_steel
  • pfmmax -> m_pf_coil_max

Currents

  • cohbop -> j_cs_pulse_start
  • rjpfalw -> j_pf_wp_critical
  • coheof -> j_cs_flat_top_end
  • ric -> c_pf_cs_coils_peak_ma
  • curpfb -> c_pf_cs_coil_pulse_start_ma
  • curpff -> c_pf_cs_coil_flat_top_ma
  • curpfs -> c_pf_cs_coil_pulse_end_ma
  • rjpfalw -> j_pf_wp_critical
  • cpt -> c_pf_coil_turn
  • cptdin -> c_pf_coil_turn_peak_input
  • rjconpf -> j_pf_coil_wp_peak
  • rjohc -> j_cs_critical_flat_top_end
  • rjohc0 -> j_cs_critical_pulse_start
  • jscoh_bop -> j_cs_conductor_critical_pulse_start
  • jsocoh_eof -> j_cs_conductor_critical_flat_top_end
  • fcohbof -> f_j_cs_start_end_flat_top
  • fcohbop -> f_j_cs_start_pulse_end_flat_top
  • fvssu -> fvs_cs_pf_total_ramp

Magnetic fields

  • bmaxcs_lim -> b_cs_limit_max
  • fbmaxcs -> fb_cs_limit_max
  • bpf -> b_pf_coil_peak
  • bmaxoh0 -> b_cs_peak_pulse_start
  • bmaxoh -> b_cs_peak_flat_top_end

Volt-seconds / Fluxes

  • vsohsu -> vs_cs_ramp
  • vsohbn -> vs_cs_burn
  • vsefsu -> vs_pf_coils_total_ramp
  • vssu -> vs_cs_pf_total_ramp
  • vsefbn -> vs_pf_coils_total_burn
  • vsbn -> vs_cs_pf_total_burn
  • vseft -> vs_pf_coils_total_pulse
  • vsoh -> vs_cs_total_pulse
  • vstot -> vs_cs_pf_total_pulse

  • tmargoh -> temp_cs_margin
  • pfclres -> rho_pf_coil
  • isumatoh -> i_cs_superconductor
  • isumatpf -> i_pf_superconductor
  • ohhghf -> f_z_cs_tf_internal
  • sxlg -> ind_pf_cs_plasma_mutual
  • ipfres -> i_pf_superconductor
  • powohres -> p_cs_resisitive_flat_top
  • powpfres -> p_pf_coil_resisitve_total_flat_top

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.

@chris-ashe chris-ashe changed the title Update pfcoil variables for clarity 🚧 Update pfcoil_variables.f90 variables for clarity Feb 11, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 11, 2025

Codecov Report

Attention: Patch coverage is 64.58333% with 17 lines in your changes missing coverage. Please review.

Project coverage is 31.21%. Comparing base (a33e522) to head (b9d8166).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
process/sctfcoil.py 0.00% 7 Missing ⚠️
process/io/plot_proc.py 0.00% 4 Missing ⚠️
process/init.py 62.50% 3 Missing ⚠️
process/costs.py 90.90% 1 Missing ⚠️
process/power.py 88.88% 1 Missing ⚠️
process/structure.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3538   +/-   ##
=======================================
  Coverage   31.21%   31.21%           
=======================================
  Files          83       83           
  Lines       19935    19935           
=======================================
  Hits         6223     6223           
  Misses      13712    13712           

☔ 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 force-pushed the update_pfcoil_variables_for_clarity branch 2 times, most recently from 4ba1e0c to 472d191 Compare February 11, 2025 21:47
@chris-ashe chris-ashe added Documentation Improvements or additions to documentation PF Coils CS Coil labels Feb 12, 2025
@chris-ashe chris-ashe self-assigned this Feb 12, 2025
@chris-ashe chris-ashe force-pushed the update_pfcoil_variables_for_clarity branch 3 times, most recently from eeeea5e to 5f5c472 Compare February 19, 2025 14:38
@chris-ashe chris-ashe changed the title 🚧 Update pfcoil_variables.f90 variables for clarity Update pfcoil_variables.f90 variables for clarity Feb 19, 2025
@chris-ashe chris-ashe marked this pull request as ready for review February 19, 2025 14:49
@chris-ashe chris-ashe force-pushed the update_pfcoil_variables_for_clarity branch from fa820c8 to ff4cffd Compare February 19, 2025 15:04
Copy link
Copy Markdown
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.

Integration tests failing and one regression input file still contains obsolete variables.

Also a random file has been added, I have commented a '?'

"ipfres": "i_pf_conductor",
"fvssu": "fvs_cs_pf_total_ramp",
"fbmaxcs": "fb_cs_limit_max",
"fcohbop": "f_j_cs_start_pulse_end_flat_top",
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.

Can't this just be None too?

Comment thread st_regression.IN.DAT:Zone.Identifier Outdated
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.

?

@chris-ashe chris-ashe force-pushed the update_pfcoil_variables_for_clarity branch from ff4cffd to a746230 Compare March 6, 2025 09:37
@timothy-nunn timothy-nunn merged commit 60635ad into main Mar 7, 2025
@timothy-nunn timothy-nunn deleted the update_pfcoil_variables_for_clarity branch March 7, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CS Coil Documentation Improvements or additions to documentation PF Coils Variable rename

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants