Conversation
…ly and storage losses. Added their implementation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4089 +/- ##
==========================================
+ Coverage 48.04% 49.61% +1.57%
==========================================
Files 144 148 +4
Lines 30211 29772 -439
==========================================
+ Hits 14515 14772 +257
+ Misses 15696 15000 -696 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@j-a-foster I've pushed my changes here for your review |
chris-ashe
left a comment
There was a problem hiding this comment.
Noticing quite a few large regression changes. Have made some initial minor comments
Unsurprisingly it has changed the PF power profile, though has it changed the PF current profile diagram in plot_proc?
|
I'll add @mkovari to review since he made the original issue |
|
Should've fixed all subscripts in docs now. |
timothy-nunn
left a comment
There was a problem hiding this comment.
Mainly comments on index names
timothy-nunn
left a comment
There was a problem hiding this comment.
Thanks Graeme. Happy with the code, will approve and merge when the others reviewers are happy.
* CI cleanup * move tf data to json file * add biome for json formatting and format * general formatting cleanup * add plotting option to tests * add marker to list * fix python selection * add parallelism * move python version to env workflow level * fix CI
* Rename Fw class to FirstWall and update references throughout the codebase * Add methods to calculate first wall geometry and areas in FirstWall class * Add method to calculate elliptical first wall areas in FirstWall class * Add dz_fw_half variable for first wall half-height in fwbs_variables.py * Add method to apply first wall coverage factors in FirstWall class * Refactor first wall geometry calculations into FirstWall class methods * Requested changes * Refactor first wall area calculations to use first_wall_variables and add first_wall_variables.py
* Add average neutron flux variable for plasma surface * Add average neutron flux calculation for plasma surface * Add average neutron flux display in plasma information plot
* Add PlasmaBeta class and integrate into Physics initialization * Refactor beta normalization calculations to use PlasmaBeta class methods * Add static method to PlasmaBeta for calculating normalized beta * Refactor beta information output to PlasmaBeta class for improved organization * Move total normalised beta calc to outside of calculate_plasma_current * Add static method to PlasmaBeta for calculating plasma energy from beta * Refactor plasma energy calculations to use PlasmaBeta methods for improved clarity and maintainability * Refactor fast alpha beta calculation into PlasmaBeta class and remove redundant function from physics_functions.py * Refactor beta limit calculation into PlasmaBeta class and remove redundant function from physics.py * Refactor poloidal beta calculation to use PlasmaBeta class methods and remove redundant function * Refactor thermal beta normalization calculation to use PlasmaBeta class method * Refactor beta norm max calculation to use PlasmaBeta class property for improved maintainability * Refactor beta norm max calculation to use BetaNormMaxModel Enum method and improve error handling * Update plasma beta documentation to include function references for Wesson, Original Scaling, Menard, Tholerus, and Stambaugh relations * Refactor plasma current documentation for clarity and consistency in variable formatting * Refactor plasma beta calculations into a dedicated run method for improved organization and maintainability * Refactor normalized beta calculations into PlasmaBeta class for improved organization and maintainability
* Fixed negativity in sqrt in costs.py by np.clip. * Introduced a local variable sqrt_p_plant_electric_net_mw in the scope of the method coelc to warn in case p_plant_electric_net_mw is negative. Also caught a third place where sqrt_p_plant_electric_net_mw is needed .(missed earlier as it was commented out) * Update process/costs.py Clarified what's the purpose of the calculation inside the warning. Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com> * Bug fixes so regression test passes - Undid the comment line change (previously over-corrected) --------- Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
* Add PlasmaInductance class and integrate into physics and stellarator models * Refactor internal inductance calculations to use PlasmaInductance class methods and remove redundant static methods * Refactor internal inductance calculation to use IndInternalNormModel and PlasmaInductance class for improved clarity and maintainability * Refactor output of volt-second information into PlasmaInductance class for improved organization and maintainability * Update documentation for PlasmaInductance: add method references to Wesson and Menard relations * Refactor internal inductance calculations: move logic to PlasmaInductance class and streamline execution with run method
* Add method to calculate reduced mass of two particles * Refactor classical distance of closest approach calculation to use reduced mass and relative velocity * Add method to calculate average relative velocity and update usage in detailed physics calculations * ❇️ Add deuteron thermal velocity profile to physics variables * Add deuteron thermal velocity profile calculations to detailed physics * Add electron-deuteron Coulomb logarithm profile to physics variables * Add electron-deuteron Coulomb logarithm calculations and plotting * Add deuteron Larmor frequency profile to physics variables * Add deuteron toroidal Larmor frequency profile calculations and plotting * Add triton thermal velocity profile to physics variables * Add electron-triton Coulomb logarithm profile to physics variables * Add triton Larmor frequency profile to physics variables * Add triton thermal velocity, Larmor frequency, and Coulomb logarithm profiles to physics variables * Add triton velocity, Larmor frequency, and Coulomb logarithm profiles to plotting functions * Update vel_relative parameter to be required in distance calculation method
Hi Michael - the main change in terms of the pf coil power accounting are as follows p_pf_electric_supplies_mw: 1.02 → 3.18 MW (+212%) The PF power profile variables (p_pf_electric_supplies_profile_mw1–4) scale consistently with this change. Do you think this seems reasonable? |
Hi Michael @mkovari could you respond to this comment for review? #4089 (comment) |
|
I am puzzled why there isn't any energy requirement in the charge and discharge phases. All three loss terms should be non-zero:
@ym1906 @timothy-nunn
|
|
@mkovari the character of these profiles is the same on |
chris-ashe
left a comment
There was a problem hiding this comment.
Just a rename to do. Doc changes look good
|
Thanks Chris, should have pushed the last rename now. |



Description
Updates pfpwr equation to account for additional components in pf power management: busbar, power supply and storage system.
Checklist
I confirm that I have completed the following checks: