Skip to content

3145 sauter geometry without using the sauter plasma current#3490

Merged
timothy-nunn merged 39 commits intomainfrom
3145-sauter-geometry-without-using-the-sauter-plasma-current
Jan 27, 2025
Merged

3145 sauter geometry without using the sauter plasma current#3490
timothy-nunn merged 39 commits intomainfrom
3145-sauter-geometry-without-using-the-sauter-plasma-current

Conversation

@chris-ashe
Copy link
Copy Markdown
Collaborator

@chris-ashe chris-ashe commented Jan 21, 2025

Description

Moved shaping factor calculation into calculate_current_coefficient_peng()

Namespace changes

Functions

geomty() -> plasma_geometry()
xparam() -> plasma_angles_arcs()
xvol() -> plasma_volume()
xsecta() -> plasma_cross_section()


Variables

  • iscrp -> i_plasma_wall_gap
  • plasma_volume -> vol_plasma
  • cvol -> f_vol_plasma
  • ishape -> i_plasma_geometry
  • qlim -> q95_min
  • pperim -> len_plasma_poloidal
  • sarea -> a_plasma_surface
  • xarea -> a_plasma_poloidal
  • sareao -> a_plasma_surface_outboard
  • cwrmax -> f_r_conducting_wall
  • fcwr -> fr_conducting_wall

✨ New additions

  • i_plasma_shape: Sets whether to use the Sauter or original PROCESS plasma shape
  • plasma_poloidal_perimeter: New function added to calculate the perimeter instead of being loose code

🐛 Bugs

  • Sauter geometry model was not being called correctly due to capitalisation:

self.Sauter_geometry(   

self.sauter_geometry(   
  • The plasma_geometry() function in plasma_geometry was taking in the 95% values for elongation and triangularity and then finding the separatrix values with the 1989 ITER guideline values, even though the selected configuration of i_plasma_geometry may not use it.

Output differences

OUT.DAT

The below is the geometry output for the large tokamak regression test

New:

image

Old:

image

plot_proc

Large tokamak regression test

New:

image

Old:

image


ST regression test

New:

image

Old:

image

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 linked an issue Jan 21, 2025 that may be closed by this pull request
…calculation into a separate method and rename parameters for clarity
@chris-ashe chris-ashe force-pushed the 3145-sauter-geometry-without-using-the-sauter-plasma-current branch from b9a0888 to 2e9e7f2 Compare January 21, 2025 10:37
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 21, 2025

Codecov Report

❌ Patch coverage is 45.76271% with 96 lines in your changes missing coverage. Please review.
✅ Project coverage is 30.59%. Comparing base (39d9db4) to head (dc71429).
⚠️ Report is 530 commits behind head on main.

Files with missing lines Patch % Lines
process/geometry/plasma_geometry.py 0.00% 27 Missing ⚠️
process/physics.py 25.00% 27 Missing ⚠️
process/plasma_geometry.py 75.00% 20 Missing ⚠️
process/io/plot_proc.py 0.00% 15 Missing ⚠️
process/divertor.py 0.00% 3 Missing ⚠️
process/physics_functions.py 77.77% 2 Missing ⚠️
process/caller.py 0.00% 1 Missing ⚠️
process/stellarator.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3490      +/-   ##
==========================================
- Coverage   30.60%   30.59%   -0.01%     
==========================================
  Files          80       80              
  Lines       19248    19272      +24     
==========================================
+ Hits         5890     5897       +7     
- Misses      13358    13375      +17     

☔ 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 self-assigned this Jan 21, 2025
@chris-ashe chris-ashe force-pushed the 3145-sauter-geometry-without-using-the-sauter-plasma-current branch from 14e17f1 to f52d265 Compare January 21, 2025 15:29
… clarity update expected surface area variable in stellarator tests
… kappa_95 to kappa for consistency update related plotting functions
@chris-ashe chris-ashe force-pushed the 3145-sauter-geometry-without-using-the-sauter-plasma-current branch from 04b57a0 to 7665b17 Compare January 21, 2025 15:33
@chris-ashe chris-ashe force-pushed the 3145-sauter-geometry-without-using-the-sauter-plasma-current branch from cf03c50 to 7980162 Compare January 21, 2025 15:54
@chris-ashe chris-ashe changed the title 🚧 3145 sauter geometry without using the sauter plasma current 3145 sauter geometry without using the sauter plasma current Jan 21, 2025
@chris-ashe chris-ashe marked this pull request as ready for review January 21, 2025 16:35
Copy link
Copy Markdown
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.

Besides some minor comments, it all looks good.

Comment thread documentation/proc-pages/physics-models/plasma_geometry.md Outdated
Comment thread documentation/proc-pages/physics-models/plasma_geometry.md
Comment thread documentation/proc-pages/physics-models/plasma_geometry.md Outdated
Comment thread documentation/proc-pages/physics-models/plasma_geometry.md Outdated
Comment thread documentation/proc-pages/physics-models/plasma_geometry.md Outdated
Comment thread documentation/proc-pages/physics-models/plasma_geometry.md Outdated
@chris-ashe chris-ashe requested review from jonmaddock and removed request for timothy-nunn January 23, 2025 15:00
Copy link
Copy Markdown
Contributor

@jonmaddock jonmaddock left a comment

Choose a reason for hiding this comment

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

This is really well-written and clear, and the new Sauter geometry looks great in plot_proc! A few minor requests/questions only.

Comment thread process/geometry/plasma_geometry.py Outdated
Comment thread process/geometry/plasma_geometry.py
Comment thread process/geometry/plasma_geometry.py
Comment thread process/io/plot_proc.py
Comment thread process/physics.py Outdated
Comment thread process/plasma_geometry.py Outdated
Comment thread process/plasma_geometry.py
Comment thread process/plasma_geometry.py
Copy link
Copy Markdown
Contributor

@jonmaddock jonmaddock left a comment

Choose a reason for hiding this comment

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

Looking good, just the one docstring change please. Also, conflicts need resolving.

Comment thread process/geometry/plasma_geometry.py
@chris-ashe chris-ashe force-pushed the 3145-sauter-geometry-without-using-the-sauter-plasma-current branch from ee5976e to 9d72046 Compare January 27, 2025 14:10
Copy link
Copy Markdown
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 for this to be merged.

@timothy-nunn timothy-nunn merged commit 001411f into main Jan 27, 2025
@timothy-nunn timothy-nunn deleted the 3145-sauter-geometry-without-using-the-sauter-plasma-current branch January 27, 2025 15:07
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.

Sauter geometry without using the Sauter plasma current

5 participants