Skip to content
Open
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
6 changes: 3 additions & 3 deletions process/data_structure/physics_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@
pflux_fw_neutron_mw: float = None
"""average neutron wall load (MW/m2)"""

plfux_plasma_surface_neutron_avg_mw: float = None
pflux_plasma_surface_neutron_avg_mw: float = None
"""Average neutron flux at plasma surface (MW/m2)"""


Expand Down Expand Up @@ -1651,7 +1651,7 @@ def init_physics_variables():
vs_plasma_res_ramp, \
vs_plasma_total_required, \
pflux_fw_neutron_mw, \
plfux_plasma_surface_neutron_avg_mw, \
pflux_plasma_surface_neutron_avg_mw, \
wtgpd, \
a_plasma_poloidal, \
n_charge_plasma_effective_vol_avg, \
Expand Down Expand Up @@ -1921,7 +1921,7 @@ def init_physics_variables():
vs_plasma_res_ramp = 0.0
vs_plasma_total_required = 0.0
pflux_fw_neutron_mw = 0.0
plfux_plasma_surface_neutron_avg_mw = 0.0
pflux_plasma_surface_neutron_avg_mw = 0.0
wtgpd = 0.0
a_plasma_poloidal = 0.0
n_charge_plasma_effective_vol_avg = 0.0
Expand Down
2 changes: 1 addition & 1 deletion process/io/plot_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2901,7 +2901,7 @@ def plot_main_plasma_information(

textstr_neutron = (
f"$P_{{\\text{{n,total}}}}$ {mfile.get('p_neutron_total_mw', scan=scan):.2f} MW \n"
f"$\\phi_{{\\text{{n,avg}}}}$ {mfile.get('plfux_plasma_surface_neutron_avg_mw', scan=scan):.3f} MW/m²"
f"$\\phi_{{\\text{{n,avg}}}}$ {mfile.get('pflux_plasma_surface_neutron_avg_mw', scan=scan):.3f} MW/m²"
)

axis.text(
Expand Down
84 changes: 84 additions & 0 deletions process/models/fw.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from process.data_structure import (
blanket_library,
build_variables,
constraint_variables,
divertor_variables,
first_wall_variables,
fwbs_variables,
Expand Down Expand Up @@ -97,6 +98,42 @@ def run(self):
fwbs_variables.radius_fw_channel_180_bend,
) = self.blanket_library.calculate_pipe_bend_radius(i_ps=1)

# ==============================

# First wall power fluxes

# ==============================

if physics_variables.i_pflux_fw_neutron == 1:
physics_variables.pflux_fw_neutron_mw = (
physics_variables.ffwal
* physics_variables.pflux_plasma_surface_neutron_avg_mw
)
else:
physics_variables.pflux_fw_neutron_mw = (
physics_variables.p_neutron_total_mw / first_wall_variables.a_fw_total
)

if physics_variables.i_pflux_fw_neutron == 1:
physics_variables.pflux_fw_rad_mw = (
physics_variables.ffwal
* physics_variables.p_plasma_rad_mw
/ physics_variables.a_plasma_surface
)
else:
physics_variables.pflux_fw_rad_mw = (
physics_variables.p_plasma_rad_mw / build_variables.a_fw_total
)

constraint_variables.pflux_fw_rad_max_mw = (
physics_variables.pflux_fw_rad_mw * constraint_variables.f_fw_rad_max
)

# Power transported to the first wall by escaped alpha particles
physics_variables.p_fw_alpha_mw = physics_variables.p_alpha_total_mw * (
1.0e0 - physics_variables.f_p_alpha_plasma_deposited
)

@staticmethod
def calculate_first_wall_half_height(
z_plasma_xpoint_lower: float,
Expand Down Expand Up @@ -902,3 +939,50 @@ def output_fw_pumping(self):
fwbs_variables.temp_fw_peak,
"OP ",
)

def output_fw_surface_loads(self):
"""Outputs the first wall surface load details to the output file."""
po.oheadr(self.outfile, "First wall surface loads")

po.ovarre(
self.outfile,
"Nominal mean radiation load on vessel first-wall (MW/m^2)",
"(pflux_fw_rad_mw)",
physics_variables.pflux_fw_rad_mw,
"OP ",
)
po.ovarre(
self.outfile,
"Peaking factor for radiation first-wall load",
"(f_fw_rad_max)",
constraint_variables.f_fw_rad_max,
"IP ",
)
po.ovarre(
self.outfile,
"Maximum permitted radiation first-wall load (MW/m^2)",
"(pflux_fw_rad_max)",
constraint_variables.pflux_fw_rad_max,
"IP ",
)
po.ovarre(
self.outfile,
"Peak radiation wall load (MW/m^2)",
"(pflux_fw_rad_max_mw)",
constraint_variables.pflux_fw_rad_max_mw,
"OP ",
)
po.ovarre(
self.outfile,
"Fast alpha particle power incident on the first-wall (MW)",
"(p_fw_alpha_mw)",
physics_variables.p_fw_alpha_mw,
"OP ",
)
po.ovarre(
self.outfile,
"Nominal mean neutron load on vessel first-wall (MW/m^2)",
"(pflux_fw_neutron_mw)",
physics_variables.pflux_fw_neutron_mw,
"OP ",
)
142 changes: 4 additions & 138 deletions process/models/physics/physics.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@
from process import constants
from process import process_output as po
from process.data_structure import (
build_variables,
constraint_variables,
current_drive_variables,
divertor_variables,
fwbs_variables,
impurity_radiation_module,
numerics,
physics_variables,
Expand Down Expand Up @@ -2279,38 +2277,6 @@ def physics(self):
i_beta_fast_alpha=physics_variables.i_beta_fast_alpha,
)

# Nominal mean neutron wall load on entire first wall area including divertor and beam holes
# Note that 'a_fw_total' excludes these, so they have been added back in.
if physics_variables.i_pflux_fw_neutron == 1:
physics_variables.pflux_fw_neutron_mw = (
physics_variables.ffwal
* physics_variables.p_neutron_total_mw
/ physics_variables.a_plasma_surface
)
else:
if divertor_variables.n_divertors == 2:
# Double null configuration
physics_variables.pflux_fw_neutron_mw = (
(
1.0e0
- fwbs_variables.f_a_fw_outboard_hcd
- 2.0e0 * fwbs_variables.f_ster_div_single
)
* physics_variables.p_neutron_total_mw
/ build_variables.a_fw_total
)
else:
# Single null Configuration
physics_variables.pflux_fw_neutron_mw = (
(
1.0e0
- fwbs_variables.f_a_fw_outboard_hcd
- fwbs_variables.f_ster_div_single
)
* physics_variables.p_neutron_total_mw
/ build_variables.a_fw_total
)

# Calculate ion/electron equilibration power

physics_variables.pden_ion_electron_equilibration_mw = rether(
Expand Down Expand Up @@ -2411,7 +2377,7 @@ def physics(self):
- physics_variables.p_plasma_rad_mw
)

physics_variables.plfux_plasma_surface_neutron_avg_mw = (
physics_variables.pflux_plasma_surface_neutron_avg_mw = (
physics_variables.p_neutron_total_mw / physics_variables.a_plasma_surface
)

Expand Down Expand Up @@ -2446,11 +2412,6 @@ def physics(self):
physics_variables.kappa95,
)

# Power transported to the first wall by escaped alpha particles
physics_variables.p_fw_alpha_mw = physics_variables.p_alpha_total_mw * (
1.0e0 - physics_variables.f_p_alpha_plasma_deposited
)

# Density limit
(
physics_variables.nd_plasma_electron_max_array,
Expand Down Expand Up @@ -2578,59 +2539,6 @@ def physics(self):

# ============================================================

# MDK
# Nominal mean photon wall load on entire first wall area including divertor and beam holes
# Note that 'a_fw_total' excludes these, so they have been added back in.
if physics_variables.i_pflux_fw_neutron == 1:
physics_variables.pflux_fw_rad_mw = (
physics_variables.ffwal
* physics_variables.p_plasma_rad_mw
/ physics_variables.a_plasma_surface
)
else:
if divertor_variables.n_divertors == 2:
# Double Null configuration in - including SoL radiation
physics_variables.pflux_fw_rad_mw = (
(
1.0e0
- fwbs_variables.f_a_fw_outboard_hcd
- 2.0e0 * fwbs_variables.f_ster_div_single
)
* physics_variables.p_plasma_rad_mw
/ build_variables.a_fw_total
+ (
1.0e0
- fwbs_variables.f_a_fw_outboard_hcd
- 2.0e0 * fwbs_variables.f_ster_div_single
)
* physics_variables.rad_fraction_sol
* physics_variables.p_plasma_separatrix_mw
/ (build_variables.a_fw_total)
)
else:
# Single null configuration - including SoL radaition
physics_variables.pflux_fw_rad_mw = (
(
1.0e0
- fwbs_variables.f_a_fw_outboard_hcd
- fwbs_variables.f_ster_div_single
)
* physics_variables.p_plasma_rad_mw
/ build_variables.a_fw_total
+ (
1.0e0
- fwbs_variables.f_a_fw_outboard_hcd
- fwbs_variables.f_ster_div_single
)
* physics_variables.rad_fraction_sol
* physics_variables.p_plasma_separatrix_mw
/ build_variables.a_fw_total
)

constraint_variables.pflux_fw_rad_max_mw = (
physics_variables.pflux_fw_rad_mw * constraint_variables.f_fw_rad_max
)

# Calculate the target imbalances
# find the total power into the targets
physics_variables.ptarmw = physics_variables.p_plasma_separatrix_mw * (
Expand Down Expand Up @@ -5088,54 +4996,12 @@ def outplas(self):
physics_variables.f_p_plasma_separatrix_rad,
"OP ",
)
po.ovarre(
self.outfile,
"Nominal mean radiation load on vessel first-wall (MW/m^2)",
"(pflux_fw_rad_mw)",
physics_variables.pflux_fw_rad_mw,
"OP ",
)
po.ovarre(
self.outfile,
"Average neutron flux at plasma surface (MW/m^2)",
"(plfux_plasma_surface_neutron_avg_mw)",
physics_variables.plfux_plasma_surface_neutron_avg_mw,
"OP ",
)

po.ovarre(
self.outfile,
"Peaking factor for radiation first-wall load",
"(f_fw_rad_max)",
constraint_variables.f_fw_rad_max,
"IP ",
)
po.ovarre(
self.outfile,
"Maximum permitted radiation first-wall load (MW/m^2)",
"(pflux_fw_rad_max)",
constraint_variables.pflux_fw_rad_max,
"IP ",
)
po.ovarre(
self.outfile,
"Peak radiation wall load (MW/m^2)",
"(pflux_fw_rad_max_mw)",
constraint_variables.pflux_fw_rad_max_mw,
"OP ",
)
po.ovarre(
self.outfile,
"Fast alpha particle power incident on the first-wall (MW)",
"(p_fw_alpha_mw)",
physics_variables.p_fw_alpha_mw,
"OP ",
)
po.ovarre(
self.outfile,
"Nominal mean neutron load on vessel first-wall (MW/m^2)",
"(pflux_fw_neutron_mw)",
physics_variables.pflux_fw_neutron_mw,
"Average neutron flux at plasma surface (MW/m^2)",
"(pflux_plasma_surface_neutron_avg_mw)",
physics_variables.pflux_plasma_surface_neutron_avg_mw,
"OP ",
)

Expand Down
3 changes: 3 additions & 0 deletions process/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ def write(models, _outfile):
# First wall geometry
models.fw.output_fw_geometry()

# First wall surface loads
models.fw.output_fw_surface_loads()

# First wall pumping
models.fw.output_fw_pumping()

Expand Down
Loading