-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3388 update the beta limit section of the docs to be up to date and i…
…nclude all models (#3389) * Refactor culblm function to calculate_beta_limit with enhanced documentation and type hints * Update navigation structure in mkdocs.yml for Beta Limit section. Move the fast alpha pressure contribution into the plasma beta docs section * Rename betaft to beta_fast_alpha across the codebase for consistency and clarity * Rename switch variable iculbl to i_beta_component for clarity in beta limit scaling * Rename betalim to beta_limit_upper for clarity and consistency across the codebase * Rename betalim_lower to beta_limit_lower for consistency and clarity across the codebase * Initial input of beta type constraint equations to docs * Rename betpmx to beta_poloidal_max for clarity and consistency across the codebase * Rename fbetap to fbeta_poloidal for clarity and consistency across the codebase * Rename betap to beta_poloidal for clarity and consistency across the codebase * Rename betat to beta_toroidal and add it as a proper physics variable for clarity and consistency across the codebase * Add comment for normalised total beta calculation and update output label for clarity * Rename betath to beta_thermal and add it as a proper physics variable for consistency across the codebase * Add beta_thermal_poloidal and beta_thermal_toroidal variables for thermal beta calculations * Add norm_beta_thermal variable and update output for normalised thermal beta calculation * Rename normalised_total_beta to norm_beta_total and add norm_beta_toroidal and norm_beta_poloidal to update related calculations and references for consistency * Enhance plasma beta documentation and update fast alpha beta calculation notes for clarity * Add more detail for the alpha beta second model and add graph * Rename 'betap' to 'beta_poloidal' in BootstrapFraction parameter classes for clarity to account for new bootstrap scalings * 📝 Update plasma beta documentation to clarify relationships and constraints * Rename norm_beta_thermal to beta_norm_thermal in Python and Fortran files for consistency * Rename norm_beta_toroidal to beta_norm_toroidal in Python and Fortran files for consistency * Rename norm_beta_poloidal to beta_norm_poloidal in Python and Fortran files for consistency * Rename norm_beta_total to beta_norm_total in Python and Fortran files for consistency * 🔄 Rename dnbeta to beta_norm_limit_upper for consistency across data files and scripts * 🔄 Rename gammaft to f_beta_alpha_beam_thermal for consistency in Fortran and data files * 🔄 Rename epbetmax to beta_poloidal_eps_max for consistency across files and documentation * 🔄 Add beta_poloidal_eps calculation and documentation for poloidal beta limit * 🔄 Rename fbetatry to fbeta_max for consistency across data files and documentation * 🔄 Rename ifalphap to i_beta_fast_alpha for consistency across data files and scripts * 🔄 Rename beta_limit_upper to beta_max for consistency across codebase and documentation * 🔄 Rename beta_norm_limit_upper to beta_norm_max for consistency across data files and scripts * 🔄 Update obsolete_vars.py to rename variables for consistency across the codebase * 🔄 Rename beta_limit_lower to beta_min for consistency across the codebase * 🔄 Rename fbetatry_lower to fbeta_min for consistency across the codebase * 🐛 Update minimum beta constraint to work on the total beta and not thermal * 🔄 Rename fbeta to fbeta_poloidal_eps for consistency across the codebase * 🎨 Update plasma_beta.md for clarity and consistency in beta limit descriptions * 🐛 Fix Tholerus pressure peaking parameter and expand docs * Add Menard normalized beta limit plotting script * Add original normalized beta limit plotting script and fix spacing in Menard plot * Add beta_poloidal_max and beta_min to the output file * ❇️ Add calculation for plasma thermal energy derived from thermal beta and create new variable e_plasma_beta_thermal * Rename total_plasma_internal_energy to e_plasma_beta and update references throughout the code * Update output descriptions for plasma thermal energy and total beta energy calculations * 🎨 Refactor plasma thermal energy calculation and remove duplicate code * Update bokeh version requirement to 3.4.0 in development dependencies
- Loading branch information
1 parent
bc0dc68
commit 36523e6
Showing
61 changed files
with
1,782 additions
and
1,061 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
176 changes: 176 additions & 0 deletions
176
...ntation/proc-pages/physics-models/plasma_beta/plasma_alpha_beta_contribution.md
Large diffs are not rendered by default.
Oops, something went wrong.
413 changes: 413 additions & 0 deletions
413
documentation/proc-pages/physics-models/plasma_beta/plasma_beta.md
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
24 changes: 24 additions & 0 deletions
24
documentation/proc-pages/scripts/plotting_scripts/menard_beta_norm_plot.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import numpy as np | ||
from bokeh.models import ColumnDataSource | ||
from bokeh.plotting import figure, output_file, save | ||
|
||
|
||
x = np.linspace(1.0, 5, 500) | ||
y = 3.12 + 3.5 * (1 / x) ** 1.7 | ||
source = ColumnDataSource(data=dict(x=x, y=y)) | ||
|
||
plot = figure( | ||
x_range=(1, 5), | ||
y_range=(2, 8), | ||
width=400, | ||
height=400, | ||
title="Menard Normalized Beta Limit", | ||
) | ||
plot.xaxis.axis_label = r"Aspect ratio, \ $$[A]$$" | ||
plot.yaxis.axis_label = r"Normalized beta limit, \ $$[\beta_N]$$" | ||
|
||
plot.line("x", "y", source=source, line_width=3, line_alpha=0.6) | ||
|
||
# Save the plot as HTML | ||
output_file("menard_beta_norm.html", title="Menard Normalized Beta Limit") | ||
save(plot) |
24 changes: 24 additions & 0 deletions
24
documentation/proc-pages/scripts/plotting_scripts/original_beta_norm_plot.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import numpy as np | ||
from bokeh.models import ColumnDataSource | ||
from bokeh.plotting import figure, output_file, save | ||
|
||
|
||
x = np.linspace(1.0, 5, 500) | ||
y = 2.7 * (1 + 5 * (1 / x) ** 3.5) | ||
source = ColumnDataSource(data=dict(x=x, y=y)) | ||
|
||
plot = figure( | ||
x_range=(1, 5), | ||
y_range=(2, 15), | ||
width=400, | ||
height=400, | ||
title="Original Normalized Beta Limit", | ||
) | ||
plot.xaxis.axis_label = r"Aspect ratio, \ $$[A]$$" | ||
plot.yaxis.axis_label = r"Normalized beta limit, \ $$[\beta_N]$$" | ||
|
||
plot.line("x", "y", source=source, line_width=3, line_alpha=0.6) | ||
|
||
# Save the plot as HTML | ||
output_file("original_beta_norm.html", title="Original Normalized Beta Limit") | ||
save(plot) |
This file contains 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
Oops, something went wrong.