Skip to content

Detailed plasma part 3#4099

Merged
timothy-nunn merged 21 commits intomainfrom
detailed_plasma_part_3
Mar 4, 2026
Merged

Detailed plasma part 3#4099
timothy-nunn merged 21 commits intomainfrom
detailed_plasma_part_3

Conversation

@chris-ashe
Copy link
Copy Markdown
Collaborator

@chris-ashe chris-ashe commented Feb 17, 2026

This pull request introduces several new plasma physics variables and expands the visualization capabilities for plasma profile plots. The main improvements are the addition of new variables for deuteron and triton Larmor radii, alpha particle velocities, Coulomb logarithms, and plasma frequencies, as well as new and enhanced plotting functions to visualize these profiles. The changes also reorganize subplot assignments in the main plotting routine to accommodate the new plots.

Additions and enhancements to plasma physics variables:

  • Added new variables in physics_variables.py for deuteron and triton toroidal Larmor radii, alpha particle thermal and birth velocities, deuteron-triton and electron-alpha Coulomb logarithms, deuteron plasma frequency, and upper hybrid frequency.
  • Updated initialization logic in init_physics_variables() to include the new variables.

Plotting and visualization improvements:

  • Added plot_larmor_radius_profile function to visualize deuteron and triton Larmor radius profiles, and integrated it into the main plot routine.
  • Enhanced plot_velocity_profile to plot alpha particle thermal velocity and birth velocity, including a new legend and line style for clarity.
  • Improved plot_electron_frequency_profile to show harmonics of the electron Larmor frequency and upper hybrid frequency, and added a secondary x-axis for physical radius.
  • Expanded plot_plasma_coloumb_logarithms to include deuteron-triton and electron-alpha Coulomb logarithm profiles, with new color coding for each interaction.

Plot layout and figure management:

  • Modified subplot assignments in main_plot and increased the number of figure pages to accommodate the new plots, ensuring each profile is displayed on its own subplot and maintaining clarity in the overall visualization.
image 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 added the Physics Relating to the physics models label Feb 17, 2026
@chris-ashe chris-ashe marked this pull request as ready for review February 17, 2026 14:03
@chris-ashe chris-ashe requested a review from a team as a code owner February 17, 2026 14:03
Copy link
Copy Markdown
Collaborator

@timothy-nunn timothy-nunn left a comment

Choose a reason for hiding this comment

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

Unit test failure needs to be fixed before a proper review is conducted.

Could you also include the plots that have been added/changed

@timothy-nunn timothy-nunn self-assigned this Feb 18, 2026
@chris-ashe chris-ashe force-pushed the detailed_plasma_part_3 branch from a672421 to 06edc98 Compare February 21, 2026 15:30
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 21, 2026

Codecov Report

❌ Patch coverage is 31.93277% with 81 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.26%. Comparing base (b67dc7e) to head (8e5db60).

Files with missing lines Patch % Lines
process/core/io/plot_proc.py 1.47% 67 Missing ⚠️
process/models/physics/physics.py 48.14% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4099      +/-   ##
==========================================
- Coverage   47.28%   47.26%   -0.02%     
==========================================
  Files         139      139              
  Lines       29330    29420      +90     
==========================================
+ Hits        13868    13906      +38     
- Misses      15462    15514      +52     

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

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 with the physics and changes.

Copy link
Copy Markdown
Collaborator

@timothy-nunn timothy-nunn left a comment

Choose a reason for hiding this comment

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

Mainly docstring style

Comment thread process/models/physics/physics.py Outdated
Comment thread process/models/physics/physics.py Outdated
Comment thread tests/unit/test_physics.py
@chris-ashe chris-ashe force-pushed the detailed_plasma_part_3 branch from 02682d1 to 8de647b Compare March 4, 2026 10:16
@chris-ashe chris-ashe requested a review from timothy-nunn March 4, 2026 10:22
@timothy-nunn timothy-nunn merged commit 891e46b into main Mar 4, 2026
8 of 10 checks passed
@timothy-nunn timothy-nunn deleted the detailed_plasma_part_3 branch March 4, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Physics Relating to the physics models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants