🧲 Add toroidal beta and field profile output#3946
Merged
Conversation
…ics_variables function
…ure and magnetic field
…variables function
b158790 to
dd8493e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3946 +/- ##
==========================================
- Coverage 46.06% 46.01% -0.05%
==========================================
Files 123 123
Lines 28465 28541 +76
==========================================
+ Hits 13112 13134 +22
- Misses 15353 15407 +54 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ot_proc.py; update physics.py to calculate and store toroidal beta profile
dd8493e to
2793925
Compare
…related calculations in physics_variables.py, plot_proc.py, and plasma_profiles.py
acd8d0d to
317566f
Compare
… in physics_variables.py, update related references in plot_proc.py and physics.py
317566f to
43cb57f
Compare
j-a-foster
approved these changes
Oct 22, 2025
Collaborator
j-a-foster
left a comment
There was a problem hiding this comment.
Happy with code and plot proc changes.
clmould
approved these changes
Oct 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds new plasma physics profile variables and corresponding plotting capabilities, enhancing the ability to visualize and analyze spatial variations of key plasma parameters. The main changes include the introduction and calculation of toroidal magnetic field and thermal beta profiles across the plasma, updates to the data structure to support these profiles, and new plotting functions to visualize them. Additionally, existing pressure profile handling has been refactored for clarity and consistency.
❇️ New variables
b_plasma_toroidal_profilebeta_thermal_toroidal_profilePhysics variable enhancements:
Plotting improvements:
plot_proc.py:plot_magnetic_fields_in_plasma(visualizes the toroidal magnetic field profile and key values across the plasma radius) andplot_beta_profiles(plots the thermal beta profile and its volume-averaged value).Pressure profile refactor:
pres_plasma_total_profiletopres_plasma_thermal_total_profilethroughout the codebase for clarity. All relevant plotting and initialization code has been updated to use the new variable.Figure management updates:
These changes improve the code's ability to model, analyze, and visualize detailed spatial profiles of important plasma physics quantities, supporting deeper analysis and improved presentation of simulation results.
Checklist
I confirm that I have completed the following checks: