Skip to content

🔄 Rename classic physics variables 2#3886

Merged
timothy-nunn merged 30 commits intomainfrom
rename_classic_physics_variables_2
Oct 21, 2025
Merged

🔄 Rename classic physics variables 2#3886
timothy-nunn merged 30 commits intomainfrom
rename_classic_physics_variables_2

Conversation

@chris-ashe
Copy link
Copy Markdown
Collaborator

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

Description

🔄 Renames

Fuel fractions have been made more clear to show that they explicitly represent the plasma fuel

  • f_deuterium -> f_plasma_fuel_deuterium
  • f_tritium -> f_plasma_fuel_tritium
  • f_helium3 -> f_plasma_fuel_helium3

$\beta$ values have been re-done to make it more clear that they are the volume averaged values

  • beta -> beta_total_vol_avg
  • beta_toroidal -> beta_toroidal_vol_avg
  • beta_poloidal -> beta_poloidal_vol_avg
  • beta_thermal -> beta_thermal_vol_avg
  • beta_max -> beta_vol_avg_max
  • beta_min -> beta_vol_avg_min
  • beta_thermal_poloidal -> beta_thermal_poloidal_vol_avg
  • beta_thermal_toroidal -> beta_thermal_toroidal_vol_avg

The plasma pressures have been re-done to make it more verbose that they are the thermal pressures and not the total which includes fast particles and beam pressure

  • pres_plasma_vol_avg -> pres_plasma_thermal_vol_avg
  • pres_plasma_on_axis -> pres_plasma_thermal_on_axis

Plasma number densities have been redone to make them more verbose. It is now clear they belong to the plasma and that they represent the volume averaged densities

  • nd_alphas -> nd_plasma_alphas_vol_avg

  • nd_protons -> nd_plasma_protons_vol_avg

  • nd_fuel_ions -> nd_plasma_fuel_ions_vol_avg

  • nd_ions_total -> nd_plasma_ions_total_vol_avg

  • nd_impurities -> nd_plasma_impurities_vol_avg

  • dlimt -> nd_plasma_electron_max_array

  • dnelimt -> nd_plasma_electrons_max

  • nd_electron_line -> nd_plasma_electron_line


  • pcoef -> f_temp_plasma_electron_density_vol_avg

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
Copy Markdown

codecov-commenter commented Oct 7, 2025

Codecov Report

❌ Patch coverage is 68.27586% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.72%. Comparing base (0028693) to head (40ffce9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
process/io/plot_proc.py 0.00% 16 Missing ⚠️
process/physics.py 66.66% 12 Missing ⚠️
process/current_drive.py 0.00% 6 Missing ⚠️
process/constraints.py 0.00% 5 Missing ⚠️
process/plasma_profiles.py 57.14% 3 Missing ⚠️
process/stellarator.py 50.00% 3 Missing ⚠️
process/physics_functions.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3886      +/-   ##
==========================================
- Coverage   46.42%   45.72%   -0.70%     
==========================================
  Files         123      123              
  Lines       28212    28664     +452     
==========================================
+ Hits        13098    13108      +10     
- Misses      15114    15556     +442     

☔ 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 rename_classic_physics_variables_2 branch from 59b14bb to c7fd39c Compare October 16, 2025 14:39
…files for consistency in plasma density calculations.
…ity and consistency in plasma temperature calculations
…vol_avg` across multiple files to enhance clarity and maintain consistency in the codebase.
…l_vol_avg` across multiple files, including data files, physics calculations, and tests.
…on_line` across multiple files to enhance clarity and maintain consistency in the codebase.
…tiple files for clarity and consistency in plasma impurity density calculations.
…larity and consistency in plasma beta calculations.
…larity and consistency in plasma beta calculations.
…cross multiple files for clarity and consistency in plasma beta calculations.
…cross multiple files for clarity and consistency in plasma beta calculations.
…iles for clarity and consistency in plasma density limit calculations.
… for clarity and consistency in plasma density limit calculations.
@chris-ashe chris-ashe marked this pull request as ready for review October 17, 2025 16:29
Copy link
Copy Markdown
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 doc changes.


dlimit: list[float] = None
"""density limit (/m3) as calculated using various models"""
nd_plasma_electron_max_array: list[float] = None
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.

Is there a reason that some variables are ..._electron_... and others are ..._electrons_...?

dlimit: list[float] = None
"""density limit (/m3) as calculated using various models"""
nd_plasma_electron_max_array: list[float] = None
"""Plasma electron density max limit model array (/m3)"""
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.

I think this description is a little unclear

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.

You have updated the old mappings but have not included any of the new mappings

@timothy-nunn
Copy link
Copy Markdown
Collaborator

@timothy-nunn timothy-nunn merged commit 62a64c4 into main Oct 21, 2025
14 of 18 checks passed
@timothy-nunn timothy-nunn deleted the rename_classic_physics_variables_2 branch October 21, 2025 10:06
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.

4 participants