Update some constraints vars#4299
Conversation
a242795 to
68421ee
Compare
1cadd90 to
b8076fd
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4299 +/- ##
=======================================
Coverage 48.79% 48.79%
=======================================
Files 151 151
Lines 29383 29396 +13
=======================================
+ Hits 14337 14344 +7
- Misses 15046 15052 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
f8b768b to
611674f
Compare
| @@ -1005,9 +1005,10 @@ def run(self): | |||
| + self.data.current_drive.p_hcd_injected_total_mw | |||
| ) | |||
| self.data.physics.f_p_plasma_separatrix_rad = ( | |||
There was a problem hiding this comment.
Have noticed now, p_heat above had the _mw suffix but will still being output in Watts. Have removed the 1e6 from that at clarified the docstring. The units should align now
| - data.physics.beta_fast_alpha | ||
| - data.physics.beta_beam | ||
| ) | ||
| value = data.physics.beta_thermal_vol_avg |
There was a problem hiding this comment.
Were beta_fast_alpha and beta_beam always 0 before?
This constraint is active in the large tokamak eval file with i_beta_component = 1 and it does not appear to be changing the constraint value in the MFile.
There was a problem hiding this comment.
This shouldnt change any value in the regression. Its just to use the actual calculated variable instead of doing redundant calculation
There was a problem hiding this comment.
This is the definition on line 3193 of physics.py
self.data.physics.beta_thermal_vol_avg = (
self.data.physics.beta_total_vol_avg
- self.data.physics.beta_fast_alpha
- self.data.physics.beta_beamThere was a problem hiding this comment.
Can a modeller or two please review the changes to the constraints in this file, specifically 1, 17, 24, 56, 62, 68
There was a problem hiding this comment.
@j-a-foster Can you please take a look?
…iles for consistency
…nsistency across the codebase
…ency in physics and constraint data structures
…r improved accuracy
…tants.TEMP_ROOM for consistency
…ency across the codebase
…stency across the codebase
…and consistency; update related references in constraints and input files.
…stency; update related references in constraints, cost variables, and input files.
… for clarity and consistency; update related references across multiple files.
…ent_min` for clarity and consistency; update all related references across multiple files.
…ity and consistency; update all related references across multiple files.
… and consistency; update all related references across multiple files.
…rove docstring for p_div_bt_q_aspect_rmajor_mw
…eferences across multiple files
…cy; update all related references across multiple files.
- Updated docstrings for clarity, including detailed descriptions of parameters and return values. - Refactored power calculations in the PlasmaExhaust class to use a new method for radiation fraction calculation.
… for improved calculations
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
cb91810 to
ceeaa08
Compare
…ata and Physics model
ce05696 to
e7485b3
Compare
e7485b3 to
22a3bad
Compare
6a2d98c to
10cd0fa
Compare
j-a-foster
left a comment
There was a problem hiding this comment.
Reviewed the constraint equation changes and all look good to me. Happy with the other changes.
64d5835 to
10cd0fa
Compare

This pull request focuses on standardizing and updating variable names across the codebase and input files for improved clarity and consistency, especially for constraint and physics-related parameters. It also updates documentation to reflect these new names and ensures all example input files use the revised identifiers.
Variable Renaming and Consistency
process/core/input.pyand all example input files to use clearer, more descriptive identifiers for key constraints and physics parameters, such as:fdene→f_nd_plasma_electron_limit_maxfiooic→f_j_tf_wp_critical_maxpsepbqarmax→p_div_bt_q_aspect_rmajor_max_mwnflutfmax→flu_tf_neutron_fast_maxf_alpha_energy_confinement_min→f_t_alpha_energy_confinement_minzeff_max→n_charge_plasma_effective_vol_avg_maxaplasmin->rminor_minavail_min->f_t_plant_available_minfradpwr->f_p_plasma_seperatrix_rad_maxpseprmax->p_plasma_separatrix_rmajor_max_mwDocumentation Updates
Example Input File Modernization
Minor Improvements
These changes collectively improve the maintainability and clarity of the codebase by enforcing consistent naming conventions and ensuring that documentation and examples are up to date.
Checklist
I confirm that I have completed the following checks: