Repository navigation
Refactor constraint_equation_2 to use total plasma power balance in MW - #4631
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4631 +/- ##
==========================================
- Coverage 50.01% 49.74% -0.28%
==========================================
Files 151 151
Lines 30123 30297 +174
==========================================
+ Hits 15066 15070 +4
- Misses 15057 15227 +170 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
grmtrkngtn
left a comment
There was a problem hiding this comment.
I agree this is a good change in principle, one suggestion to clarify the name of the variable for transport from the core.
|
I agree that the constraint should be modified to use power instead of power density.
Where has the ignition logic gone? I never liked it but you seem to have just deleted it. |
The ignition check is now obsolete as the plasma heating term has the injected power term in it which would be zero in the ignited case |
What about the ohmic heating - isn't that handled differently for the ignited case? |
The ohmic term is in there also. There will still be ohmic power |
By definition an ignited plasma has not external heating at all - not even ohmic heating. |
grmtrkngtn
left a comment
There was a problem hiding this comment.
Now it looks good to me.
This pull request updates the plasma power balance constraint equation in
constraints.pyto use total power units (MW) instead of power density (MW/m³), and simplifies the calculation logic. The changes streamline the code by removing per-volume calculations and ignition model branching, and by using more descriptive variable names.Constraint Equation Refactor:
"MW/m³"to"MW"to reflect total plasma power rather than power per volume.p_plasma_lossandp_plasma_heatingdirectly.p_plasma_loss, using more consistent variable names.Code Documentation and Cleanup:
Checklist
I confirm that I have completed the following checks: