Skip to content

Conversation

@chris-ashe
Copy link
Collaborator

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

This pull request updates both the documentation and implementation for plasma pressure and temperature profile calculations, with a focus on clarifying the distinction between central and volume-averaged quantities and ensuring that density-weighted temperatures are used consistently in calculations. The changes improve scientific clarity, correct some formulae, and align the code with the updated documentation.

Documentation improvements and clarifications:

  • Clarified the definitions and notation for density-weighted and volume-averaged temperatures, introducing explicit symbols and updating the profile factor formula to use f_temp_plasma_electron_density_vol_avg instead of the ambiguous pcoef.
  • Expanded the explanation for calculating central and volume-averaged plasma thermal pressure, emphasizing the use of density-weighted temperatures and correcting the description of the pressure profile factor for parabolic profiles.

Code consistency and scientific accuracy:

  • Updated the calculation of central plasma pressure in process/plasma_profiles.py to use the correct energy conversion constant and clarified the formula.
  • Modified the calculation of volume-averaged plasma thermal pressure to use the density-weighted temperatures and volume-averaged densities for electrons and ions, ensuring the result matches the updated scientific explanation.

These changes ensure that the documentation and code are aligned, and that the scientific calculations reflect best practices for plasma profile modeling.…ile independent

Description

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.

@chris-ashe chris-ashe self-assigned this Oct 17, 2025
@chris-ashe chris-ashe added Bug Physics Relating to the physics models labels Oct 17, 2025
@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.18%. Comparing base (62a64c4) to head (5369e10).

Files with missing lines Patch % Lines
process/io/plot_proc.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3938      +/-   ##
==========================================
- Coverage   46.19%   46.18%   -0.01%     
==========================================
  Files         123      123              
  Lines       28358    28362       +4     
==========================================
  Hits        13100    13100              
- Misses      15258    15262       +4     

☔ 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 bug_volume_averge_thermal_pressure branch from 21a0f2f to 3ba98ac Compare October 17, 2025 13:17
@chris-ashe chris-ashe force-pushed the bug_volume_averge_thermal_pressure branch from fda8dc3 to ee753f6 Compare October 21, 2025 12:29
@chris-ashe chris-ashe marked this pull request as ready for review October 21, 2025 12:29
…tures and clarify assumptions for parabolic profiles
@chris-ashe chris-ashe force-pushed the bug_volume_averge_thermal_pressure branch from ee753f6 to 2d4bba9 Compare October 21, 2025 12:30
@chris-ashe chris-ashe requested review from j-a-foster and jonmaddock and removed request for jonmaddock October 24, 2025 13:00
Copy link
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 changes.

@timothy-nunn timothy-nunn merged commit 633a49e into main Oct 28, 2025
14 of 18 checks passed
@timothy-nunn timothy-nunn deleted the bug_volume_averge_thermal_pressure branch October 28, 2025 09:16
@je-cook je-cook added the Bug Something isnt working label Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isnt working Physics Relating to the physics models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants