Skip to content

Add pressure peaking fraction value - #4483

Merged
je-cook merged 8 commits into
mainfrom
add_pressure_peaking_fraction_value
Aug 21, 2026
Merged

Add pressure peaking fraction value#4483
je-cook merged 8 commits into
mainfrom
add_pressure_peaking_fraction_value

Conversation

@chris-ashe

@chris-ashe chris-ashe commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces several enhancements to how plasma pressure and temperature profiles are calculated, stored, and reported, particularly improving the handling of pedestal profile cases. The main changes include adding new derived quantities (such as central-to-volume-averaged ratios), calculating and outputting pedestal and separatrix pressures, and updating the summary plots and output files to reflect these new metrics.

Enhancements to plasma profile calculations:

  • Added calculation and storage of the ratio of central to volume-averaged plasma electron temperature (f_temp_plasma_electron_on_axis_vol_avg) and plasma thermal pressure (f_pres_plasma_thermal_on_axis_vol_avg). These are now computed in both parabolic and pedestal parameterisations, and in the profile factors calculation.

  • For pedestal profile cases, the code now calculates and stores the plasma thermal pressure at the pedestal (pres_plasma_pedestal_thermal) and at the separatrix (pres_plasma_separatrix_thermal).
    Output and reporting improvements:

  • The output file generation now includes the new ratio quantities and, for pedestal profiles, the pedestal and separatrix pressures.

  • 🐛 Fixed units in the output for plasma thermal energies from [W] to [J] for clarity and correctness.

Plotting and summary display updates:

  • The plasma summary plots now display the new ratios and, when appropriate, show pedestal and separatrix pressures in the plot annotations.

Codebase and import updates:

  • Added necessary imports for PlasmaProfileShapeType to support the new logic for pedestal profile handling.

These changes improve the physical fidelity and reporting of plasma profile data, especially for cases with pedestal structure, and enhance the usability of the output for analysis and validation.## 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 added Physics Relating to the physics models New Variables labels Jul 29, 2026
@codecov-commenter

codecov-commenter commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.58824% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.45%. Comparing base (6b82c17) to head (7e42afe).

Files with missing lines Patch % Lines
process/models/physics/physics.py 0.00% 6 Missing ⚠️
process/core/io/plot/summary.py 25.00% 3 Missing ⚠️
process/models/physics/plasma_profiles.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4483      +/-   ##
==========================================
+ Coverage   49.43%   49.45%   +0.02%     
==========================================
  Files         150      150              
  Lines       29880    29914      +34     
==========================================
+ Hits        14771    14795      +24     
- Misses      15109    15119      +10     

☔ View full report in Codecov by Harness.
📢 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 marked this pull request as ready for review July 29, 2026 10:24
@chris-ashe
chris-ashe requested a review from a team as a code owner July 29, 2026 10:24
@chris-ashe
chris-ashe force-pushed the add_pressure_peaking_fraction_value branch from c0cd8b3 to 542e0ed Compare July 29, 2026 10:29
@timothy-nunn timothy-nunn self-assigned this Jul 31, 2026
@timothy-nunn
timothy-nunn requested a review from a team July 31, 2026 07:44
Comment thread process/data_structure/physics_variables.py
@mkovari

mkovari commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Hi Chris, Could you quote the actual equations from Johner that you have used, or your own derivations? For example in def tcore(), I can see that the result arises from the integral in Appendix C, but the actual derivation of the function is not too obvious.

Comment thread process/models/physics/plasma_profiles.py
@chris-ashe

chris-ashe commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator Author

Hi Chris, Could you quote the actual equations from Johner that you have used, or your own derivations? For example in def tcore(), I can see that the result arises from the integral in Appendix C, but the actual derivation of the function is not too obvious.

Hi @mkovari if this is for the pedestal pressure I have done a very quick estimate via the first derivative at the pedestal point which is normally the local minimum. Though I am thinking if we are able to just take the arithmetic mean of the two pedestal positions for density and temperature and then take a value at that index of the pedestal profile. Though I am open to sugestions on how to calculate. An analytical expression would always be better in this case

@chris-ashe
chris-ashe requested a review from grmtrkngtn August 18, 2026 08:06

@grmtrkngtn grmtrkngtn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the changes are good. The only thing is that I wonder how robustly we can pick out the pedestals across different profiles.

Comment thread process/models/physics/plasma_profiles.py
@je-cook je-cook assigned je-cook and unassigned timothy-nunn Aug 21, 2026
@chris-ashe
chris-ashe force-pushed the add_pressure_peaking_fraction_value branch from 542e0ed to 388373b Compare August 21, 2026 09:23
@chris-ashe
chris-ashe force-pushed the add_pressure_peaking_fraction_value branch from 388373b to 7e42afe Compare August 21, 2026 09:34
@je-cook
je-cook enabled auto-merge (squash) August 21, 2026 09:42
@je-cook
je-cook disabled auto-merge August 21, 2026 09:46
@je-cook
je-cook merged commit 6c2a92a into main Aug 21, 2026
8 of 11 checks passed
@je-cook
je-cook deleted the add_pressure_peaking_fraction_value branch August 21, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Variables Physics Relating to the physics models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants