Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions process/data_structure/physics_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@
b_plasma_total: float = None
"""Sum of plasma total toroidal + poloidal field (T)"""

e_plasma_magnetic_stored: float = None
"""Plasma stored magnetic energy (J)"""


burnup: float = None
"""fractional plasma burnup"""
Expand Down Expand Up @@ -1392,6 +1395,7 @@ def init_physics_variables():
global b_plasma_poloidal_average
global b_plasma_toroidal_on_axis
global b_plasma_total
global e_plasma_magnetic_stored
global burnup
global burnup_in
global b_plasma_vertical_required
Expand Down Expand Up @@ -1644,6 +1648,7 @@ def init_physics_variables():
b_plasma_poloidal_average = 0.0
b_plasma_toroidal_on_axis = 5.68
b_plasma_total = 0.0
e_plasma_magnetic_stored = 0.0
burnup = 0.0
burnup_in = 0.0
b_plasma_vertical_required = 0.0
Expand Down
3 changes: 2 additions & 1 deletion process/io/plot_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2681,7 +2681,8 @@ def plot_main_plasma_information(
f"$\\Omega_{{\\text{{p}}}}$: {mfile_data.data['res_plasma'].get_scan(scan):.4e} $\\Omega$\n"
f"Plasma resistive diffusion time: {mfile_data.data['t_plasma_res_diffusion'].get_scan(scan):.4f} s\n"
f"Plasma inductance: {mfile_data.data['ind_plasma'].get_scan(scan):.4e} H\n"
f"Plasma normalised internal inductance: {mfile_data.data['ind_plasma_internal_norm'].get_scan(scan):.4f}\n"
f"Plasma stored magnetic energy: {mfile_data.data['e_plasma_magnetic_stored'].get_scan(scan) / 1e9:.4f} GJ\n"
f"Plasma normalised internal inductance: {mfile_data.data['ind_plasma_internal_norm'].get_scan(scan):.4f}"
)

axis.text(
Expand Down
11 changes: 11 additions & 0 deletions process/physics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2544,6 +2544,10 @@ def physics(self):
physics_variables.ind_plasma_internal_norm,
)

physics_variables.e_plasma_magnetic_stored = (
0.5e0 * physics_variables.ind_plasma * physics_variables.plasma_current**2
)

# Calculate auxiliary physics related information
sbar = 1.0e0
(
Expand Down Expand Up @@ -6234,6 +6238,13 @@ def outplas(self):
physics_variables.ind_plasma,
"OP ",
)
po.ovarre(
self.outfile,
"Plasma magnetic energy stored (J)",
"(e_plasma_magnetic_stored)",
physics_variables.e_plasma_magnetic_stored,
"OP ",
)
po.ovarrf(
self.outfile,
"Plasma normalised internal inductance",
Expand Down
Loading