-
Notifications
You must be signed in to change notification settings - Fork 12
🔄 Update reaction variables to new style #3656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3656 +/- ##
==========================================
- Coverage 36.36% 35.09% -1.27%
==========================================
Files 88 88
Lines 22108 24951 +2843
==========================================
+ Hits 8039 8757 +718
- Misses 14069 16194 +2125 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…cy across variables
…ency across variables
…ency across variables
…stency across variables
… consistency across variables
…ency across variables
…sistency across variables
…onsistency across variables
…tency across variables
…ncy across variables
… for consistency across variables
0a3a8e9
to
e4afc65
Compare
… multiple files for clarity and consistency
176c682
to
e0ab864
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates reaction variable names and related constants for fusion power calculations to conform with the new PROCESS style guide. Key changes include renaming variables (e.g. from fusion_power to p_fusion_total_mw and ffuspow to fp_fusion_total_max_mw), updating associated documentation examples, and modifying input data files to reflect the new naming conventions.
Reviewed Changes
Copilot reviewed 78 out of 78 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
process/costs_2015.py | Updated cost scaling to use the new fusion power variable. |
process/costs.py | Changed fusion power references for cost calculations to the new variable names. |
process/availability.py | Revised fusion power scaling in availability calculations in line with the new style. |
examples/scan.ipynb, examples/plot_solutions.ipynb | Updated command-line and in-notebook references for fusion power variables. |
examples/data/*.DAT | Renamed fusion power variables in input data to match the updated naming convention. |
documentation/proc-pages/physics-models/* | Updated documentation to describe the new variable names and scaling factors. |
documentation/proc-pages/development/* | Adjusted standards and constraint equation documentation along with the variable renames. |
Comments suppressed due to low confidence (1)
documentation/proc-pages/development/add-vars.md:256
- Verify that the updated scaling factor expression correctly reflects the intended calculation. Using p_fusion_total_max_mw in both the numerator and denominator may simplify unexpectedly, so please ensure this is the desired behavior.
args%cc = 1.0D0 - fp_fusion_total_max_mw * p_fusion_total_max_mw/p_fusion_total_mw
d875006
to
5bd4fe7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with the variable name changes - all in line with the standard guide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
* 📝 Add guidelines for fusion rates and fusion rate densities in style guide * 🔄 Rename fusion_power to p_fusion_total_mw * 🔄 Rename dt_power_total to p_dt_total_mw for consistency across variables * 🔄 Rename dt_power_plasma to p_plasma_dt_mw for consistency across variables * 🔄 Rename dd_power to p_dd_total_mw for consistency across variables * 🔄 Rename dhe3_power to p_dhe3_total_mw for consistency across variables * 🔄 Rename fusion_rate_density_total to fusden_total for consistency across variables * 🔄 Rename fusion_rate_density_plasma to fusden_plasma for consistency across variables * 🔄 Rename alpha_rate_density_total to fusden_alpha_total for consistency across variables * 🔄 Rename alpha_rate_density_plasma to fusden_plasma_alpha for consistency across variables * 🔄 Rename alpha_power_total to p_alpha_total_mw for consistency across variables * 🔄 Rename alpha_power_density_total to pden_alpha_total_mw for consistency across variables * 🔄 Rename alpha_power_plasma to p_plasma_alpha_mw for consistency across variables * 🔄 Rename alpha_power_density_plasma to pden_plasma_alpha_mw for consistency across variables * 🔄 Rename alpha_power_beams to p_beam_alpha_mw for consistency across variables * 🔄 Rename alpha_power_electron_density to f_pden_alpha_electron_mw for consistency across variables * 🔄 Rename alpha_power_ions_density to f_pden_alpha_ions_mw for consistency across variables * 🔄 Rename neutron_power_total to p_neutron_total_mw for consistency across variables * 🔄 Rename neutron_power_density_total to pden_neutron_total_mw for consistency across variables * 🔄 Rename neutron_power_plasma to p_plasma_neutron_mw for consistency across variables * 🔄 Rename neutron_power_density_plasma to pden_plasma_neutron_mw for consistency across variables * 🔄 Rename neutron_power_beams to p_beam_neutron_mw for consistency across variables * 🔄 Rename non_alpha_charged_power to p_non_alpha_charged_mw for consistency across variables * 🔄 Rename charged_particle_power to p_charged_particle_mw for consistency across variables * 🔄 Rename total_power_deposited_in_plasma to p_plasma_heating_total_mw for consistency across variables * 🔄 Rename powfmax to p_fusion_total_max_mw * 🔄 Rename ffuspow to fp_fusion_total_max_mw * 🔄 Rename charged_power_density to pden_charged_particle_mw * 🐛 Fix energy fraction of power from beam to total dt energy * ❇️ Add p_beam_neutron_mw variable for neutron power from hot neutral beam ions * 🐛 Make p_beam_neutron calculation use proper ratios * Update test files with new variables * 📝 update output with new variables * 🐛 Rename pden_charged_particle_mw to pden_non_alpha_charged_mw across multiple files for clarity and consistency * 📝 Add new obsolete variable mappings for fusion power in obsolete_vars.py * Remove redundant statement about alpha power coupling in plasma heating * Rename powfmax to p_fusion_total_max_mw for clarity in fusion power limits
* 📝 Add guidelines for fusion rates and fusion rate densities in style guide * 🔄 Rename fusion_power to p_fusion_total_mw * 🔄 Rename dt_power_total to p_dt_total_mw for consistency across variables * 🔄 Rename dt_power_plasma to p_plasma_dt_mw for consistency across variables * 🔄 Rename dd_power to p_dd_total_mw for consistency across variables * 🔄 Rename dhe3_power to p_dhe3_total_mw for consistency across variables * 🔄 Rename fusion_rate_density_total to fusden_total for consistency across variables * 🔄 Rename fusion_rate_density_plasma to fusden_plasma for consistency across variables * 🔄 Rename alpha_rate_density_total to fusden_alpha_total for consistency across variables * 🔄 Rename alpha_rate_density_plasma to fusden_plasma_alpha for consistency across variables * 🔄 Rename alpha_power_total to p_alpha_total_mw for consistency across variables * 🔄 Rename alpha_power_density_total to pden_alpha_total_mw for consistency across variables * 🔄 Rename alpha_power_plasma to p_plasma_alpha_mw for consistency across variables * 🔄 Rename alpha_power_density_plasma to pden_plasma_alpha_mw for consistency across variables * 🔄 Rename alpha_power_beams to p_beam_alpha_mw for consistency across variables * 🔄 Rename alpha_power_electron_density to f_pden_alpha_electron_mw for consistency across variables * 🔄 Rename alpha_power_ions_density to f_pden_alpha_ions_mw for consistency across variables * 🔄 Rename neutron_power_total to p_neutron_total_mw for consistency across variables * 🔄 Rename neutron_power_density_total to pden_neutron_total_mw for consistency across variables * 🔄 Rename neutron_power_plasma to p_plasma_neutron_mw for consistency across variables * 🔄 Rename neutron_power_density_plasma to pden_plasma_neutron_mw for consistency across variables * 🔄 Rename neutron_power_beams to p_beam_neutron_mw for consistency across variables * 🔄 Rename non_alpha_charged_power to p_non_alpha_charged_mw for consistency across variables * 🔄 Rename charged_particle_power to p_charged_particle_mw for consistency across variables * 🔄 Rename total_power_deposited_in_plasma to p_plasma_heating_total_mw for consistency across variables * 🔄 Rename powfmax to p_fusion_total_max_mw * 🔄 Rename ffuspow to fp_fusion_total_max_mw * 🔄 Rename charged_power_density to pden_charged_particle_mw * 🐛 Fix energy fraction of power from beam to total dt energy * ❇️ Add p_beam_neutron_mw variable for neutron power from hot neutral beam ions * 🐛 Make p_beam_neutron calculation use proper ratios * Update test files with new variables * 📝 update output with new variables * 🐛 Rename pden_charged_particle_mw to pden_non_alpha_charged_mw across multiple files for clarity and consistency * 📝 Add new obsolete variable mappings for fusion power in obsolete_vars.py * Remove redundant statement about alpha power coupling in plasma heating * Rename powfmax to p_fusion_total_max_mw for clarity in fusion power limits
Description
Since the restructuring of the fusion reactions done in #3345 came before the style guide the variable did not match. They have now been re-worded to fit the style guide.
Documentation enhancements:
fusrat_
) and fusion rate densities (fusden_
) instandards.md
.✨ New variables
p_beam_neutron_mw
(See bugs section below)fusrat_total
p_beam_dt_mw
🔄 Variable changes
Constriant
powfmax
->p_fusion_total_max_mw
ffuspow
->fp_fusion_total_max_mw
Total Powers
fusion_power
->p_fusion_total_mw
dt_power_total
->p_dt_total_mw
dt_power_plasma
->p_plasma_dt_mw
dd_power
->p_dd_total_mw
dhe3_power
->p_dhe3_total_mw
Rates
fusion_rate_density_total
->fusden_total
fusion_rate_density_plasma
->fusden_plasma
alpha_rate_density_total
->fusden_alpha_total
alpha_rate_density_plasma
->fusden_alpha_plasma
Alpha power
alpha_power_total
->p_alpha_total_mw
alpha_power_density_total
->pden_alpha_total_mw
alpha_power_plasma
->p_plasma_alpha_mw
alpha_power_density_plasma
->pden_plasma_alpha_mw
alpha_power_beams
->p_beam_alpha_mw
alpha_power_electron_density
->f_pden_alpha_electron_mw
alpha_power_ions_density
->f_pden_alpha_ions_mw
Neutron Power
neutron_power_total
->p_neutron_total_mw
neutron_power_density_total
->pden_neutron_total_mw
neutron_power_plasma
->p_plasma_neutron_mw
neutron_power_density_plasma
->pden_plasma_neutron_mw
neutron_power_beams
->p_beam_neutron_mw
Charged particle power
non_alpha_charged_power
->p_non_alpha_charged_mw
charged_particle_power
->p_charged_particle_mw
charged_power_density
->pden_charged_particle_mw
📝 Output changes
🐛 Bugs
The calculation of the total fusion power from the beam just used
5
as the multiplication power instead of using the proper ratio found inconstants.f90
❌
✅
The beam neutron power was being calculated in output (
outplas()
) instead of in the code. It was also using the wrong energy sharing fraction like for the alpha power above. This❌
✅
✅
Checklist
I confirm that I have completed the following checks: