Skip to content

🔌 Update current drive variables to new style#3615

Merged
timothy-nunn merged 61 commits intomainfrom
update_current_drive_variables_1
Apr 11, 2025
Merged

🔌 Update current drive variables to new style#3615
timothy-nunn merged 61 commits intomainfrom
update_current_drive_variables_1

Conversation

@chris-ashe
Copy link
Copy Markdown
Collaborator

@chris-ashe chris-ashe commented Apr 2, 2025

📝 Doc updates

New unit types for absolute (eta_cd) and normalised current drive efficiencies (eta_cd_norm) have been added to the style guide.


Variable changes

New variables

eta_cd_norm_hcd_secondary

Generic

iefrf -> i_hcd_primary
iefrffix -> i_hcd_secondary
wave_mode -> i_ecrh_wave_mode
harnum -> n_ecrh_harmonic
irfcd -> i_hcd_calculations
echpwr -> p_ecrh_injected_mw
etacd -> eta_hcd_primary_injector_wall_plug
etacdfix -> eta_hcd_secondary_injector_wall_plug

pinjalw -> p_hcd_injected_max
pinjmw -> p_hcd_injected_total_mw
pinjfixmw -> p_hcd_secondary_injected_mw
pinjemw -> p_hcd_injected_electrons_mw
pinjimw -> p_hcd_injected_ions_mw
pheat -> p_hcd_primary_extra_heat_mw
pheatfix -> p_hcd_secondary_extra_heat_mw

Neutral beam

nbshinemw -> p_beam_shine_through_mw
pnbitot -> p_beam_injected_mw
forbitloss -> f_p_beam_orbit_loss
nbshinef -> f_p_beam_shine_through
nbshinefmax -> f_p_beam_shine_through_max
porbitlossmw -> p_beam_orbit_loss_mw
nbshield -> dx_beam_shield
fpion -> f_p_beam_injected_ions
taubeam -> n_beam_decay_lengths_core
beam_current -> c_beam_total
beam_energy -> e_beam_kev
f_tritium_beam -> f_beam_tritium

pnbeam seems to be the same as pnbitot

Efficiencies

etanbi -> eta_beam_injector_wall_plug
etalh -> eta_lowhyb_injector_wall_plug
etaech -> eta_ecrh_injector_wall_plug
gamma_ecrh -> eta_cd_norm_ecrh
gamcd -> eta_cd_norm_hcd_primary
effcd -> eta_cd_hcd_primary
effcdfix -> eta_cd_hcd_secondary

Currents

ps_current_fraction -> f_c_plasma_pfirsch_schluter
bscf_iter89 -> f_c_plasma_bootstrap_iter89
bscf_nevins -> f_c_plasma_bootstrap_nevins
bscf_sauter -> f_c_plasma_bootstrap_sauter
bscf_aries -> f_c_plasma_bootstrap_wilson
bscf_sakai -> f_c_plasma_bootstrap_sakai
bscf_aries -> f_c_plasma_bootstrap_aries
bscf_andrade -> f_c_plasma_bootstrap_andrade
bscf_hoang -> f_c_plasma_bootstrap_hoang
bscf_wong -> f_c_plasma_bootstrap_wong
bootstrap_current_fraction_max -> f_c_plasma_bootstrap_max
bootstrap_current_fraction -> f_c_plasma_bootstrap

diacf_hender -> f_c_plasma_diamagnetic_hender
diacf_scene -> f_c_plasma_diamagnetic_scene
diamagnetic_current_fraction -> f_c_plasma_diamagnetic

plasma_current_internal_fraction -> f_c_plasma_internal

pscf_scene -> f_c_plasma_pfirsch_schluter_scene


🐛 : Bugs

  • gamcd which represents the normalised current drive efficiency was used between the secondary and primary heating systems so if compared one of the current drive values would be wrong, a new variable eta_cd_norm_hcd_secondary has been made to fix this`

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 self-assigned this Apr 2, 2025
@chris-ashe chris-ashe added the HCD Relating to heating and current drive systems label Apr 2, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 2, 2025

Codecov Report

❌ Patch coverage is 35.93750% with 205 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.28%. Comparing base (aac5f4d) to head (5441437).
⚠️ Report is 423 commits behind head on main.

Files with missing lines Patch % Lines
process/current_drive.py 48.69% 98 Missing ⚠️
process/io/plot_proc.py 0.00% 40 Missing ⚠️
process/physics.py 5.00% 38 Missing ⚠️
process/stellarator.py 0.00% 16 Missing ⚠️
process/io/sankey_funcs.py 0.00% 5 Missing ⚠️
process/buildings.py 33.33% 2 Missing ⚠️
process/power.py 60.00% 2 Missing ⚠️
process/scan.py 0.00% 2 Missing ⚠️
process/build.py 50.00% 1 Missing ⚠️
process/objectives.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3615   +/-   ##
=======================================
  Coverage   36.28%   36.28%           
=======================================
  Files          88       88           
  Lines       22067    22069    +2     
=======================================
+ Hits         8006     8008    +2     
  Misses      14061    14061           

☔ 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 requested a review from Copilot April 4, 2025 09:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 86 out of 90 changed files in this pull request and generated 1 comment.

Files not reviewed (4)
  • documentation/proc-pages/physics-models/error.txt: Language not supported
  • examples/data/csv_output_large_tokamak_MFILE.DAT: Language not supported
  • examples/data/large_tokamak_1_MFILE.DAT: Language not supported
  • examples/data/large_tokamak_2_MFILE.DAT: Language not supported
Comments suppressed due to low confidence (1)

documentation/proc-pages/eng-models/heating_and_current_drive/NBI/culham_nb.md:59

  • The word 'clauclated' appears to be a typo; please correct it to 'calculated'.
Power split to the ions and electrons is clauclated with the `cfnbi()` method found [here](../NBI/nbi_overview.md/#ion-coupled-power-cfnbi) and outputs `f_p_beam_injected_ions`

Comment thread documentation/proc-pages/development/standards.md
@chris-ashe chris-ashe force-pushed the update_current_drive_variables_1 branch from 1b0dc35 to cd6b5de Compare April 4, 2025 10:08
@chris-ashe chris-ashe requested a review from Copilot April 4, 2025 12:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 89 out of 92 changed files in this pull request and generated no comments.

Files not reviewed (3)
  • documentation/proc-pages/physics-models/error.txt: Language not supported
  • examples/data/csv_output_large_tokamak_MFILE.DAT: Language not supported
  • examples/data/large_tokamak_1_MFILE.DAT: Language not supported
Comments suppressed due to low confidence (2)

documentation/proc-pages/fusion-devices/stellarator.md:176

  • The new variable name suggests the power is expressed in megawatts, while the description still states it is in Watts. Please update the units in the description or the variable name to maintain consistency.
The value of variable `p_hcd_primary_extra_heat_mw` determines the actual amount of auxiliary heating power (in Watts) to be applied to the plasma. Switch `ignite` may be used if necessary.

documentation/proc-pages/eng-models/heating_and_current_drive/NBI/culham_nb.md:59

  • The word 'clauclated' is misspelled. Please change it to 'calculated'.
Power split to the ions and electrons is clauclated with the \(\mathtt{cfnbi()}\) method found [here](../NBI/nbi_overview.md/#ion-coupled-power-cfnbi) and outputs \(\mathtt{f_p_beam_injected_ions}\)

@chris-ashe chris-ashe changed the title 🚧 Update current drive variables to new style 🔌 Update current drive variables to new style Apr 4, 2025
@chris-ashe chris-ashe requested review from Copilot and j-a-foster April 4, 2025 13:20
@chris-ashe chris-ashe marked this pull request as ready for review April 4, 2025 13:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 89 out of 92 changed files in this pull request and generated no comments.

Files not reviewed (3)
  • documentation/proc-pages/physics-models/error.txt: Language not supported
  • examples/data/csv_output_large_tokamak_MFILE.DAT: Language not supported
  • examples/data/large_tokamak_1_MFILE.DAT: Language not supported
Comments suppressed due to low confidence (1)

documentation/proc-pages/fusion-devices/stellarator.md:176

  • The description mentions power in Watts while the variable name indicates megawatts. Please verify and update the unit description to ensure consistency.
The value of variable `p_hcd_primary_extra_heat_mw` determines the actual amount of auxiliary heating power (in Watts) to be applied to the plasma. Switch `ignite` may be used if necessary.

@chris-ashe chris-ashe added the Documentation Improvements or additions to documentation label Apr 4, 2025
@chris-ashe chris-ashe requested a review from timothy-nunn April 7, 2025 12:07
@chris-ashe chris-ashe force-pushed the update_current_drive_variables_1 branch 2 times, most recently from 3ac1faa to 04c2b55 Compare April 10, 2025 09:35
Comment thread process/io/obsolete_vars.py Outdated
Comment thread process/io/obsolete_vars.py Outdated
Comment thread process/io/obsolete_vars.py
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.

Level 3 errors no longer exist (except for a couple remaining in constraints_equations). These should be raised in the code as ProcessValueErrors

@timothy-nunn timothy-nunn removed the request for review from j-a-foster April 10, 2025 14:29
… in secondary current drive efficiency calculations
…clarity and consistency in current drive calculations
… and consistency in current drive calculations
…y and consistency in current drive calculations
@chris-ashe chris-ashe force-pushed the update_current_drive_variables_1 branch from 5664ebd to 464291e Compare April 10, 2025 14:45
@chris-ashe chris-ashe force-pushed the update_current_drive_variables_1 branch from b473f32 to ee8af04 Compare April 10, 2025 14:51
@chris-ashe chris-ashe force-pushed the update_current_drive_variables_1 branch from b4f56fd to 5441437 Compare April 10, 2025 15:25
@timothy-nunn timothy-nunn merged commit 9d91469 into main Apr 11, 2025
14 of 18 checks passed
@timothy-nunn timothy-nunn deleted the update_current_drive_variables_1 branch April 11, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation HCD Relating to heating and current drive systems New Variables Variable rename

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants