Skip to content

Change pedestal pressure calculation to use normalized pedestal radii - #4731

Open
chris-ashe wants to merge 1 commit into
mainfrom
4727-bug-calculation-of-pedestal-pressure-variance
Open

chris-ashe wants to merge 1 commit into
mainfrom
4727-bug-calculation-of-pedestal-pressure-variance

Conversation

@chris-ashe

Copy link
Copy Markdown
Member

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 requested a review from je-cook November 5, 2026 08:45
@chris-ashe
chris-ashe requested a review from a team as a code owner November 5, 2026 08:45
@chris-ashe chris-ashe added Profiles Relating to the plasma profiles Bug Something isnt working labels Nov 5, 2026
@chris-ashe chris-ashe linked an issue Nov 5, 2026 that may be closed by this pull request
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.35%. Comparing base (5e52d67) to head (681922d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4731      +/-   ##
==========================================
- Coverage   50.36%   50.35%   -0.02%     
==========================================
  Files         181      181              
  Lines       30666    30659       -7     
==========================================
- Hits        15444    15437       -7     
  Misses      15222    15222              

☔ 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.

@je-cook
je-cook requested a review from a team November 5, 2026 15:02
@je-cook

je-cook commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

The code here is not really the main change, the idea needs a modeller to have a look

@je-cook je-cook changed the title Refactor pedestal pressure calculation to use normalized pedestal radii Change pedestal pressure calculation to use normalized pedestal radii Nov 5, 2026
@ajpearcey

ajpearcey commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

So we are assuming that if $\rho_{n,ped}$ and $\rho_{t,ped}$ are not equal the peak pressure is at the smaller rho of the two positions? Is a simple argument for this for arbitrary $T$ and $n$ profiles I do not see. I see this is also what we did before, right it just wasn't explicit in the comment.

I see you want to make the calculation simpler to avoid this bug. how was the bug changing the answer before?

Addendum: If we switched the order we call calculate_profile_factors and calculate_parabolic_profile_factors and we not easily compute all of this from the ideal gas law and chain rule?

@chris-ashe

Copy link
Copy Markdown
Member Author

So we are assuming that if ρ n , p e d and ρ t , p e d are not equal the peak pressure is at the smaller rho of the two positions? Is a simple argument for this for arbitrary T and n profiles I do not see. I see this is also what we did before, right it just wasn't explicit in the comment.

I see you want to make the calculation simpler to avoid this bug. how was the bug changing the answer before?

Addendum: If we switched the order we call calculate_profile_factors and calculate_parabolic_profile_factors and we not easily compute all of this from the ideal gas law and chain rule?

Have made a play around graph for the pressure here:

https://www.desmos.com/calculator/428370dffa

The assumption that the pedestal point will always generally be at the lowest rho value, seems to be true upon inspection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isnt working Profiles Relating to the plasma profiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Calculation of pedestal pressure variance

4 participants