Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ba4e3b6
:sparkle: Add b_plasma_toroidal_profile variable and initialize in in…
chris-ashe Sep 30, 2025
a76ec21
:sparkle: Add calculation and output for toroidal field profile acros…
chris-ashe Sep 30, 2025
8629a6b
:sparkle: Add function to plot toroidal magnetic field profiles in pl…
chris-ashe Sep 30, 2025
69db254
:sparkle: Add beta_toroidal_profile variable and initialize in init_p…
chris-ashe Sep 30, 2025
47bc10d
:sparkle: Add calculate_plasma_beta method to compute plasma beta fro…
chris-ashe Sep 30, 2025
a01df3e
:sparkle: Add plot_beta_profiles function to visualize beta profiles …
chris-ashe Sep 30, 2025
975c57d
:sparkle: Add poloidal field profile variable and initialize in init_…
chris-ashe Sep 30, 2025
0567706
:sparkle: Add calculation and plotting of poloidal magnetic field pro…
chris-ashe Sep 30, 2025
39748a6
:sparkle: Add b_plasma_total_profile variable and initialize in init_…
chris-ashe Sep 30, 2025
6340905
:sparkle: Update magnetic field profile calculations and adjust profi…
chris-ashe Sep 30, 2025
ac7b403
Add beta_poloidal_profile variable and initialize in init_physics_var…
chris-ashe Sep 30, 2025
489cdc7
:sparkle: Add beta_total_profile variable and initialize in init_phys…
chris-ashe Sep 30, 2025
db52163
:sparkle: Add beta poloidal and total profile calculations and plotti…
chris-ashe Sep 30, 2025
f33a117
:sparkle: Refactor beta profile plotting: separate poloidal profile i…
chris-ashe Oct 2, 2025
f688fab
Calculate new mean poloidal field
chris-ashe Oct 10, 2025
138d9e0
:sparkle: Add b_plasma_poloidal_edge variable and initialize in init_…
chris-ashe Oct 10, 2025
7a12cae
:memo: Update plasma beta documentation: enhance definitions and clar…
chris-ashe Oct 10, 2025
a9944d2
🔄 Rename volume averaged plasma pressure variable to thermal plasma p…
chris-ashe Oct 10, 2025
f10387f
🔄 Rename plasma pressure variable to thermal plasma pressure in multi…
chris-ashe Oct 10, 2025
bdfee77
:sparkle: Add visualization for plasma outer circular flux surface in…
chris-ashe Oct 10, 2025
7f740bd
:sparkle: Add c_plasma_circular variable for circular plasma current …
chris-ashe Oct 10, 2025
4d73c88
🔄 Update plasma pressure variable to thermal plasma pressure and add …
chris-ashe Oct 10, 2025
e5e3b70
:sparkle: Implement calculation for on-axis circular plasma current d…
chris-ashe Oct 10, 2025
d294a9c
:sparkle: Add j_plasma_circular_on_axis variable for central plasma c…
chris-ashe Oct 10, 2025
39df5ff
Add b_plasma_circular_poloidal_profile variable and initialize in ini…
chris-ashe Oct 10, 2025
eca507f
:sparkle: Add b_plasma_circular_poloidal_profile calculation and upda…
chris-ashe Oct 10, 2025
861f496
:sparkle: Add q_circular_profile variable and update init_physics_var…
chris-ashe Oct 10, 2025
c017039
:sparkle: Implement calculation and plotting for circular plasma safe…
chris-ashe Oct 10, 2025
d719ac8
Enhance b_plasma_circular_poloidal_profile calculation and update q_c…
chris-ashe Oct 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion documentation/physics-models/plasma_beta/plasma_beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,19 @@
The efficiency of confinement of plasma pressure by the magnetic field is represented by the ratio:

$$
\beta = \frac{2\mu_0p}{B^2}
\beta(\rho) = \frac{2\mu_0p(\rho)}{\left(B(\rho)\right)^2}
$$

Where $\beta$ is a function of normalised minor radius across the plasma ($\rho$), due to the change in pressure and magnetic field strength.

The standard $\beta$ term used for comparison and to represent the plasma as a whole in many calculations is the volume averaged value given by:

$$
\langle \beta \rangle = \frac{2\mu_0 \langle p \rangle}{\langle B \rangle^2}
$$

Where $\langle p \rangle$ is the volume averaged plasma pressure and $\langle B \rangle$ is the average field.

There are several different measures of this type, arising from different choices of definition and from the need to quantify different equilibrium properties.

In its expanded form of magnetic field components:
Expand Down Expand Up @@ -92,6 +102,20 @@ $$

------------------------

## Definitions

### Volume averaged thermal toroidal beta

$$
\overbrace{\langle \beta_t \rangle}^{\texttt{beta_toroidal_thermal_vol_avg}} = \frac{2\mu_0 \langle p_{\text{thermal}} \rangle}{\underbrace{B_{\text{T,on-axis}}^2}_{\texttt{b_plasma_toroidal_on_axis}}}
$$

### Volume averaged thermal poloidal beta

$$
\langle \beta_p \rangle = \frac{2\mu_0 \langle p_{\text{thermal}} \rangle}{\langle B_{\text{P,average}} \rangle^2}
$$

## Troyon Beta Limit

The Troyon plasma beta limit is given by[^0][^1]:
Expand Down
4 changes: 2 additions & 2 deletions examples/data/large_tokamak_nof_2_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@
Volume_averaged_electron_number_density_(/m3)____________________________ (nd_plasma_electrons_vol_avg)_________________________ 7.79622390002983731e+19
Electron_number_density_on_axis_(/m3)____________________________________ (nd_plasma_electron_on_axis)__________________________ 1.02466460344915771e+20 OP
Line-averaged_electron_number_density_(/m3)______________________________ (nd_electron_line)_________________________ 8.63127495812675338e+19 OP
Plasma_pressure_on_axis_(Pa)_____________________________________________ (pres_plasma_on_axis)___________________________ 7.82668759018785902e+05 OP
Volume_averaged_plasma_pressure_(Pa)_____________________________________ (pres_plasma_vol_avg)_____________ 2.26860509860517632e+05 OP
Plasma_pressure_on_axis_(Pa)_____________________________________________ (pres_plasma_thermal_on_axis)___________________________ 7.82668759018785902e+05 OP
Volume_averaged_plasma_pressure_(Pa)_____________________________________ (pres_plasma_thermal_vol_avg)_____________ 2.26860509860517632e+05 OP
Line-averaged_electron_density_/_Greenwald_density_______________________ (dnla_gw)______________________ 1.19833068191158598e+00 OP
Total_Ion_number_density_(/m3)___________________________________________ (nd_ions_total)________________ 7.06084473006886912e+19 OP
Fuel_ion_number_density_(/m3)____________________________________________ (nd_fuel_ions)_________________ 6.58453241268011663e+19 OP
Expand Down
4 changes: 2 additions & 2 deletions examples/data/large_tokamak_nof_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@
Volume_averaged_electron_number_density_(/m3)____________________________ (nd_plasma_electrons_vol_avg)_________________________ 8.50078961768999158e+19
Electron_number_density_on_axis_(/m3)____________________________________ (nd_plasma_electron_on_axis)__________________________ 1.11814263037413868e+20 OP
Line-averaged_electron_number_density_(/m3)______________________________ (nd_electron_line)_________________________ 9.41418090734859715e+19 OP
Plasma_pressure_on_axis_(Pa)_____________________________________________ (pres_plasma_on_axis)___________________________ 9.10652371594472905e+05 OP
Volume_averaged_plasma_pressure_(Pa)_____________________________________ (pres_plasma_vol_avg)_____________ 2.63957209157818230e+05 OP
Plasma_pressure_on_axis_(Pa)_____________________________________________ (pres_plasma_thermal_on_axis)___________________________ 9.10652371594472905e+05 OP
Volume_averaged_plasma_pressure_(Pa)_____________________________________ (pres_plasma_thermal_vol_avg)_____________ 2.63957209157818230e+05 OP
Line-averaged_electron_density_/_Greenwald_density_______________________ (dnla_gw)______________________ 1.19999999999999951e+00 OP
Total_Ion_number_density_(/m3)___________________________________________ (nd_ions_total)________________ 7.34892735750798868e+19 OP
Fuel_ion_number_density_(/m3)____________________________________________ (nd_fuel_ions)_________________ 6.49714589130413015e+19 OP
Expand Down
67 changes: 62 additions & 5 deletions process/data_structure/physics_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@
beta_toroidal: float = None
"""toroidal beta"""

beta_toroidal_profile: list[float] = None
"""toroidal beta profile"""

beta_poloidal_profile: list[float] = None
"""poloidal beta profile"""

beta_total_profile: list[float] = None
"""total beta profile"""

beta_thermal: float = None
"""thermal beta"""
Expand Down Expand Up @@ -284,10 +292,24 @@
b_plasma_poloidal_average: float = None
"""Plasma average poloidal field (T)"""

b_plasma_poloidal_edge: float = None
"""Plasma poloidal field at plasma edge (T)"""

b_plasma_toroidal_on_axis: float = None
"""Plasma toroidal field on axis (T) (`iteration variable 2`)"""

b_plasma_toroidal_profile: list[float] = None
"""toroidal field profile in plasma (T)"""

b_plasma_poloidal_profile: list[float] = None
"""poloidal field profile in plasma (T)"""

b_plasma_circular_poloidal_profile: list[float] = None
"""poloidal field profile in circular plasma (T)"""

b_plasma_total_profile: list[float] = None
"""total field profile in plasma (T)"""


b_plasma_total: float = None
"""Sum of plasma total toroidal + poloidal field (T)"""
Expand Down Expand Up @@ -803,7 +825,7 @@
"""margin to vertical stability"""


pres_plasma_on_axis: float = None
pres_plasma_thermal_on_axis: float = None
"""central total plasma pressure (Pa)"""

pres_plasma_total_profile: list[float] = None
Expand All @@ -821,11 +843,14 @@
j_plasma_on_axis: float = None
"""Central plasma current density (A/m2)"""

j_plasma_circular_on_axis: float = None
"""Central plasma current density for a circular plasma (A/m2)"""

n_plasma_profile_elements: int = None
"""Number of elements in plasma profile"""

pres_plasma_vol_avg: float = None
"""Volume averaged plasma pressure (Pa)"""
pres_plasma_thermal_vol_avg: float = None
"""Volume averaged thermal plasma pressure (Pa)"""


f_dd_branching_trit: float = None
Expand Down Expand Up @@ -951,6 +976,9 @@
plasma_current: float = None
"""plasma current (A)"""

c_plasma_circular: float = None
"""Plasma current for circular plasma (A)"""


p_plasma_neutron_mw: float = None
"""Neutron fusion power from just the plasma [MW]"""
Expand Down Expand Up @@ -1097,6 +1125,11 @@
qstar: float = None
"""cylindrical safety factor"""

q_95_circular: float = None
"""Safety factor at 95% flux surface for circular plasma"""

q_circular_profile: list[float] = None
"""safety factor profile for circular plasma"""

rad_fraction_sol: float = None
"""SoL radiation fraction"""
Expand Down Expand Up @@ -1380,6 +1413,9 @@ def init_physics_variables():
global beta_poloidal
global beta_poloidal_eps
global beta_toroidal
global beta_toroidal_profile
global beta_total_profile
global beta_poloidal_profile
global beta_thermal
global beta_thermal_poloidal
global beta_thermal_toroidal
Expand All @@ -1390,7 +1426,12 @@ def init_physics_variables():
global beta_norm_toroidal
global betbm0
global b_plasma_poloidal_average
global b_plasma_poloidal_edge
global b_plasma_toroidal_on_axis
global b_plasma_toroidal_profile
global b_plasma_poloidal_profile
global b_plasma_circular_poloidal_profile
global b_plasma_total_profile
global b_plasma_total
global burnup
global burnup_in
Expand Down Expand Up @@ -1488,12 +1529,13 @@ def init_physics_variables():
global nd_plasma_electron_on_axis
global nd_plasma_ions_on_axis
global m_s_limit
global pres_plasma_on_axis
global pres_plasma_thermal_on_axis
global pres_plasma_total_profile
global pres_plasma_electron_profile
global pres_plasma_ion_total_profile
global pres_plasma_fuel_profile
global j_plasma_on_axis
global j_plasma_circular_on_axis
global n_plasma_profile_elements
global f_dd_branching_trit
global pden_plasma_alpha_mw
Expand Down Expand Up @@ -1526,6 +1568,7 @@ def init_physics_variables():
global pflux_fw_rad_mw
global pden_ion_electron_equilibration_mw
global plasma_current
global c_plasma_circular
global p_plasma_neutron_mw
global p_neutron_total_mw
global pden_neutron_total_mw
Expand Down Expand Up @@ -1556,6 +1599,8 @@ def init_physics_variables():
global tauratio
global q95_min
global qstar
global q_95_circular
global q_circular_profile
global rad_fraction_sol
global rad_fraction_total
global f_nd_alpha_electron
Expand Down Expand Up @@ -1632,6 +1677,9 @@ def init_physics_variables():
beta_poloidal = 0.0
beta_poloidal_eps = 0.0
beta_toroidal = 0.0
beta_toroidal_profile = []
beta_poloidal_profile = []
beta_total_profile = []
beta_thermal = 0.0
beta_thermal_poloidal = 0.0
beta_thermal_toroidal = 0.0
Expand All @@ -1642,7 +1690,12 @@ def init_physics_variables():
beta_norm_toroidal = 0.0
betbm0 = 1.5
b_plasma_poloidal_average = 0.0
b_plasma_poloidal_edge = 0.0
b_plasma_toroidal_on_axis = 5.68
b_plasma_toroidal_profile = []
b_plasma_poloidal_profile = []
b_plasma_circular_poloidal_profile = []
b_plasma_total_profile = []
b_plasma_total = 0.0
burnup = 0.0
burnup_in = 0.0
Expand Down Expand Up @@ -1740,12 +1793,13 @@ def init_physics_variables():
nd_plasma_electron_on_axis = 0.0
nd_plasma_ions_on_axis = 0.0
m_s_limit = 0.3
pres_plasma_on_axis = 0.0
pres_plasma_thermal_on_axis = 0.0
pres_plasma_total_profile = []
pres_plasma_electron_profile = []
pres_plasma_ion_total_profile = []
pres_plasma_fuel_profile = []
j_plasma_on_axis = 0.0
j_plasma_circular_on_axis = 0.0
n_plasma_profile_elements = 500
f_dd_branching_trit = 0.0
pden_plasma_alpha_mw = 0.0
Expand Down Expand Up @@ -1778,6 +1832,7 @@ def init_physics_variables():
pflux_fw_rad_mw = 0.0
pden_ion_electron_equilibration_mw = 0.0
plasma_current = 0.0
c_plasma_circular = 0.0
p_plasma_neutron_mw = 0.0
p_neutron_total_mw = 0.0
pden_neutron_total_mw = 0.0
Expand Down Expand Up @@ -1808,6 +1863,8 @@ def init_physics_variables():
tauratio = 1.0
q95_min = 0.0
qstar = 0.0
q_95_circular = 0.0
q_circular_profile = []
rad_fraction_sol = 0.8
rad_fraction_total = 0.0
f_nd_alpha_electron = 0.1
Expand Down
Loading
Loading