Skip to content

Add new negative triangularity confinement time scaling#4386

Open
ajpearcey wants to merge 3 commits into
mainfrom
issue-3825-new-neg-triang-confinement-time
Open

Add new negative triangularity confinement time scaling#4386
ajpearcey wants to merge 3 commits into
mainfrom
issue-3825-new-neg-triang-confinement-time

Conversation

@ajpearcey

Copy link
Copy Markdown
Collaborator

resolves #3825

@ajpearcey ajpearcey requested a review from a team as a code owner June 25, 2026 15:22
@codecov-commenter

codecov-commenter commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.85%. Comparing base (aada716) to head (5a7c071).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
process/models/physics/confinement_time.py 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4386      +/-   ##
==========================================
+ Coverage   48.83%   48.85%   +0.01%     
==========================================
  Files         151      151              
  Lines       29376    29391      +15     
==========================================
+ Hits        14347    14360      +13     
- Misses      15029    15031       +2     

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

@ajpearcey ajpearcey changed the title WIP: Add new negative triangularity confinement time scaling Add new negative triangularity confinement time scaling Jun 25, 2026
@timothy-nunn timothy-nunn requested a review from chris-ashe June 26, 2026 07:40
@timothy-nunn timothy-nunn self-assigned this Jun 26, 2026

@timothy-nunn timothy-nunn 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.

Just one minor style comment. Will ask @chris-ashe to review (or he can suggest someone else)

Comment thread process/models/physics/confinement_time.py
ajpearcey and others added 2 commits June 26, 2026 10:35
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
[^22]: G. Verdoolaege et al., “The updated ITPA global H-mode confinement database: description and analysis,” Nuclear Fusion, vol. 61, no. 7, pp. 076006-076006, Jan. 2021, doi: https://doi.org/10.1088/1741-4326/abdb91.
[^23]: H. Lux, R. Kemp, E. Fable, and R. Wenninger, “Radiation and confinement in 0D fusion systems codes,” Plasma Physics and Controlled Fusion, vol. 58, no. 7, pp. 075001–075001, May 2016, doi: https://doi.org/10.1088/0741-3335/58/7/075001.
[^24]: H. Lux, R. Kemp, D. J. Ward, and M. Sertoli, “Impurity radiation in DEMO systems modelling,” Fusion Engineering and Design, vol. 101, pp. 42–51, Dec. 2015, doi: https://doi.org/10.1016/j.fusengdes.2015.10.002.
[^23]: P. Lunia, A.O. Nelson, and C. Paz-Soldan, "Energy Confinement Time Scaling Law Derived from Paz-Soldan NF 2024", doi: https://arxiv.org/abs/2509.04279v2

@chris-ashe chris-ashe Jun 26, 2026

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.

Can I ask that the references now actually have a descriptive title such as [^paz_soldan_neg]

NSTX_GYRO_BOHM = (48, "Buxton NSTX gyro-Bohm (ST)(H)")
ITPA20 = (49, "ITPA20 (H)")
ITPA20_IL = (50, "ITPA20-IL (H)")
PAZ_SOLDAN_NT = (51, "Paz-Soldan Neg Triang (L)")

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.

Suggested change
PAZ_SOLDAN_NT = (51, "Paz-Soldan Neg Triang (L)")
PAZ_SOLDAN_NT = (51, "Paz-Soldan Negative δ (L)")

)

@staticmethod
def paz_soldan_nt_confinement_time(

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'm aware that the rest of the file dosen't follow the rules but can the variables in this function please follow the style guide as it makes it one less thing to do down the line:

pcur -> cur_plasma_ma
dnla19 -> nd_plasma_electron_line_19


# Paz-Soldan negative triangularity confinement time scaling
elif model == ConfinementTimeModel.PAZ_SOLDAN_NT:
t_electron_confinement = self.paz_soldan_nt_confinement_time(

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.

As another safeguard, can you please pass the variables in via their keyword arguments

p_plasma_loss_mw :
Thermal power lost due to transport through the LCFS [MW]
dnla19 :
Central line-averaged electron density in units of 10**19 m**-3

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.

Suggested change
Central line-averaged electron density in units of 10**19 m**-3
Central line-averaged electron density in units of 10¹⁹/m³


References
----------
Priyansh Lunia, A.O. Nelson, and C. Paz-Soldan, "Energy Confinement Time

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.

Reference should be written as:

[1] Priyansh Lunia, A.O. Nelson, and C. Paz-Soldan, "Energy Confinement Time Scaling Law Derived from Paz-Soldan NF 2024",
doi: https://arxiv.org/abs/2509.04279v2

The text should be left aligned with the left bracket of the [1] in order for it to preview properly in the IDE.

This is the Numpy Standard:
https://numpydoc.readthedocs.io/en/latest/format.html#references

0.0821
* pcur**1.02
* b_plasma_toroidal_on_axis**0.11
* dnla19**0.51

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.

Looking at the reference is this actually meant to be the line averaged or volume averaged?. Also is it meant to be in x20 or x19?

@chris-ashe

Copy link
Copy Markdown
Collaborator

Am confused as to why the regression tests are failing here @timothy-nunn

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New negative triangularity confinement time scaling

4 participants