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 documentation/source/physics-models/plasma_composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ using input array `f_nd_impurity_electrons(1,...,14)`. The available species alo
As stated above, the number density fractions for hydrogen (all isotopes) and
helium should not be set, as they are calculated by the code. This is to ensure
plasma quasi-neutrality taking into account the fuel ratios
`f_plasma_fuel_deuterium`, `f_plasma_fuel_tritium` and `f_plasma_fuel_helium3`, and the alpha particle fraction `f_nd_alpha_electron` which may
`f_plasma_fuel_deuterium`, `f_plasma_fuel_tritium` and `f_plasma_fuel_helium3`, and the alpha particle fraction `f_nd_alpha_thermal_electron` which may
be input by the user or selected as an iteration variable.

!!! note "Location of impurities"
Expand All @@ -59,8 +59,8 @@ All of the plasma composites are normally given as a fraction of the volume aver

1. **Alpha Ash Portion Calculation**

- Calculate the number density of alpha particles (`nd_plasma_alphas_vol_avg`) using the electron density (`nd_plasma_electrons_vol_avg`) and the alpha particle to electron ratio (`f_nd_alpha_electron`).
- `f_nd_alpha_electron` can be set as an iteration variable (`ixc = 109`) or set directly.
- Calculate the number density of thermal alpha particles (`nd_plasma_alphas_thermal_vol_avg`) using the electron density (`nd_plasma_electrons_vol_avg`) and the alpha particle to electron ratio (`f_nd_alpha_thermal_electron`).
- `f_nd_alpha_thermal_electron` can be set as an iteration variable (`ixc = 109`) or set directly.

$$
n_{\alpha} = \mathtt{f\_nd\_alpha\_electron}\times n_{\text{e}}
Expand Down
2 changes: 1 addition & 1 deletion examples/data/large_tokamak_eval_IN.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ i_plasma_geometry = 0 * switch for plasma cross-sectional shape calculation;
kappa = 1.85 * plasma separatrix elongation (calculated if `i_plasma_geometry = 1-5; 7 or 9-10`)
q95 = 3.7339078193128556 * Safety factor 'near' plasma edge (`iteration variable 18`) equal to q95
q0 = 1.0 * safety factor on axis
f_nd_alpha_electron = 0.060238763988650204 * thermal alpha density/electron density (`iteration variable 109`)
f_nd_alpha_thermal_electron = 0.060238763988650204 * thermal alpha density/electron density (`iteration variable 109`)
rmajor = 8.0 * plasma major radius (m) (`iteration variable 3`)
i_single_null = 1 * switch for single null / double null plasma;
f_sync_reflect = 0.6 * synchrotron wall reflectivity factor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ boundl(60) = 65000.0
boundu(60) = 90000.0
c_tf_turn = 65000.0

* Helium fraction (f_nd_alpha_electron)
* Helium fraction (f_nd_alpha_thermal_electron)
ixc = 109
boundu(109) = 0.1

Expand Down
2 changes: 1 addition & 1 deletion examples/data/large_tokamak_varyrun_IN.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ boundl(60) = 65000.0
boundu(60) = 90000.0
c_tf_turn = 65000.0

* Helium fraction (f_nd_alpha_electron)
* Helium fraction (f_nd_alpha_thermal_electron)
ixc = 109
boundu(109) = 0.1

Expand Down
2 changes: 1 addition & 1 deletion process/core/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def check_process(inputs, data): # noqa: ARG001
if data.impurity_radiation.f_nd_impurity_electrons[1] != 0.1: # noqa: RUF069
raise ProcessValidationError(
"The thermal alpha/electron density ratio should be controlled using"
" f_nd_alpha_electron (itv 109) and not f_nd_impurity_electrons(2)."
" f_nd_alpha_thermal_electron (itv 109) and not f_nd_impurity_electrons(2)."
"f_nd_impurity_electrons(2) should be removed from the input file,"
" or set to the default value 0.1D0."
)
Expand Down
2 changes: 1 addition & 1 deletion process/core/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def bounds(self) -> tuple[NumberType | None, NumberType | None]:
"f_asym": InputVariable("stellarator", float, range=(0.9, 2.0)),
"f_fw_peak": InputVariable("fwbs", float, range=(1.0, 100.0)),
"f_fw_rad_max": InputVariable("constraints", float, range=(0.1, 10)),
"f_nd_alpha_electron": InputVariable("physics", float, range=(1e-12, 1.0)),
"f_nd_alpha_thermal_electron": InputVariable("physics", float, range=(1e-12, 1.0)),
"f_nd_beam_electron": InputVariable("physics", float, range=(0.0, 1.0)),
"f_nd_protium_electrons": InputVariable("physics", float, range=(0.0, 1.0)),
"f_neut_shield": InputVariable("fwbs", float, range=(0.0, 1.0)),
Expand Down
6 changes: 3 additions & 3 deletions process/core/io/mfile/comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"p_coolant_pump_elec_total_mw",
"p_plant_electric_net_mw",
"pflux_fw_neutron_mw",
"f_nd_alpha_electron",
"f_nd_alpha_thermal_electron",
"p_plasma_inner_rad_mw",
"p_plasma_rad_mw",
"p_blkt_nuclear_heat_total_mw",
Expand Down Expand Up @@ -127,7 +127,7 @@
"t_energy_confinement",
"hfact",
"tauelaw",
"f_nd_alpha_electron",
"f_nd_alpha_thermal_electron",
"pflux_fw_neutron_mw",
"p_plasma_inner_rad_mw",
"p_plasma_sync_mw",
Expand Down Expand Up @@ -221,7 +221,7 @@
"p_plant_electric_net_mw",
"pflux_fw_neutron_mw",
"pflux_fw_rad_mw",
"f_nd_alpha_electron",
"f_nd_alpha_thermal_electron",
"p_plasma_inner_rad_mw",
"p_plasma_rad_mw",
"f_c_plasma_bootstrap",
Expand Down
3 changes: 2 additions & 1 deletion process/core/io/obsolete_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"nimp": "n_impurities",
"ssync": "f_sync_reflect",
"rnbeam": "f_nd_beam_electron",
"ralpne": "f_nd_alpha_electron",
"ralpne": "f_nd_alpha_thermal_electron",
"protium": "f_nd_protium_electrons",
"clhsf": "f_z_cryostat",
"ddwex": "dr_cryostat",
Expand Down Expand Up @@ -470,6 +470,7 @@
"fiooic": "f_j_tf_wp_critical_max",
"alstroh": "stress_cs_steel_max",
"i_cs_stress": None,
"f_nd_alpha_electron": "f_nd_alpha_thermal_electron",
}

OBS_VARS_HELP = {
Expand Down
8 changes: 4 additions & 4 deletions process/core/io/plot/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -3876,7 +3876,7 @@ def plot_n_profiles(prof, demo_ranges: bool, mfile: MFile, scan: int):
scan: int :

"""
nd_alphas = mfile.get("nd_plasma_alphas_vol_avg", scan=scan)
nd_alphas = mfile.get("nd_plasma_alphas_thermal_vol_avg", scan=scan)
nd_protons = mfile.get("nd_plasma_protons_vol_avg", scan=scan)
nd_impurities = mfile.get("nd_plasma_impurities_vol_avg", scan=scan)
nd_ions_total = mfile.get("nd_plasma_ions_total_vol_avg", scan=scan)
Expand Down Expand Up @@ -3973,7 +3973,7 @@ def plot_n_profiles(prof, demo_ranges: bool, mfile: MFile, scan: int):
ax_main.plot(
rho,
density_profiles_plotting[1],
label=r"$n_{\alpha}$",
label=r"$n_{\alpha,\text{thermal}}$",
color="#d62728",
linewidth=1.5,
)
Expand Down Expand Up @@ -4125,8 +4125,8 @@ def plot_n_profiles(prof, demo_ranges: bool, mfile: MFile, scan: int):
f"{mfile.get('nd_plasma_fuel_ions_vol_avg', scan=scan):.3e} m$^{{-3}}$"
),
(
r"$\langle n_{\text{alpha}} \rangle $: "
f"{mfile.get('nd_plasma_alphas_vol_avg', scan=scan):.3e} m$^{{-3}}$"
r"$\langle n_{\alpha,\text{thermal}} \rangle $: "
f"{mfile.get('nd_plasma_alphas_thermal_vol_avg', scan=scan):.3e} m$^{{-3}}$"
),
(
r"$\langle n_{\text{impurities}} \rangle $: "
Expand Down
2 changes: 1 addition & 1 deletion process/core/io/variable_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class VariableMetadata:
description="Effective energy confinement time",
units="s",
),
"f_nd_alpha_electron": VariableMetadata(
"f_nd_alpha_thermal_electron": VariableMetadata(
latex=r"$f_\mathrm{\alpha}$",
description="Alpha particle heating fraction",
units="",
Expand Down
2 changes: 1 addition & 1 deletion process/core/solver/iteration_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class IterationVariable:
98: IterationVariable("f_blkt_li6_enrichment", "fwbs", 10.00, 100.0),
104: IterationVariable("fcwr", "constraints", 0.001, 1.0),
108: IterationVariable("breeder_f", "fwbs", 0.060, 1.0),
109: IterationVariable("f_nd_alpha_electron", "physics", 0.05, 0.15),
109: IterationVariable("f_nd_alpha_thermal_electron", "physics", 0.05, 0.15),
114: IterationVariable("len_fw_channel", "fwbs", 0.001, 1.0e3),
119: IterationVariable("temp_plasma_separatrix_kev", "physics", 0.0, 1.0e1),
122: IterationVariable("f_a_cs_turn_steel", "pf_coil", 0.001, 0.950),
Expand Down
2 changes: 1 addition & 1 deletion process/data_structure/numerics.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ class NumericsData:
* (106) NOT USED
* (107) NOT USED
* (108) breeder_f: Volume of Li4SiO4 / (Volume of Be12Ti + Li4SiO4)
* (109) f_nd_alpha_electron: thermal alpha density / electron density
* (109) f_nd_alpha_thermal_electron: thermal alpha density / electron density
* (110) NOT USED
* (111) NOT USED
* (112) NOT USED
Expand Down
8 changes: 4 additions & 4 deletions process/data_structure/physics_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,8 @@ class PhysicsData:
)
"""Array of plasma electron density upper limits values (nₑ,max) [/m³]"""

nd_plasma_alphas_vol_avg: float = 0.0
"""Plasma volume averaged thermal alpha density (⟨n_α⟩) [/m³]""" # noqa: RUF001
nd_plasma_alphas_thermal_vol_avg: float = 0.0
"""Plasma volume averaged thermal alpha density (⟨n_αₜₕ⟩) [/m³]"""

nd_beam_ions: float = 0.0
"""Hot beam ion density, variable (⟨n_beam⟩) [/m³]"""
Expand Down Expand Up @@ -1258,8 +1258,8 @@ class PhysicsData:
rad_fraction_total: float = 0.0
"""Radiation fraction total = SoL + LCFS radiation / total power deposited in plasma"""

f_nd_alpha_electron: float = 0.1
"""thermal alpha density/electron density (`iteration variable 109`)"""
f_nd_alpha_thermal_electron: float = 0.1
"""Thermal alpha density/electron density (⟨n_αₜₕ⟩/⟨nₑ⟩)"""

f_nd_protium_electrons: float = 0.0
"""Seeded f_nd_protium_electrons density / electron density."""
Expand Down
4 changes: 2 additions & 2 deletions process/models/physics/current_drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def iternb(self):
self.data.current_drive.e_beam_kev / self.data.physics.m_beam_amu,
self.data.physics.temp_plasma_electron_vol_avg_kev,
self.data.physics.nd_plasma_electrons_vol_avg,
self.data.physics.f_nd_alpha_electron,
self.data.physics.f_nd_alpha_thermal_electron,
self.data.physics.f_nd_plasma_carbon_electron,
self.data.physics.f_nd_plasma_oxygen_electron,
self.data.physics.f_nd_plasma_iron_argon_electron,
Expand Down Expand Up @@ -283,7 +283,7 @@ def culnbi(self) -> tuple[float, float, float]:
self.data.current_drive.e_beam_kev / self.data.physics.m_beam_amu,
self.data.physics.temp_plasma_electron_vol_avg_kev,
self.data.physics.nd_plasma_electrons_vol_avg,
self.data.physics.f_nd_alpha_electron,
self.data.physics.f_nd_alpha_thermal_electron,
self.data.physics.f_nd_plasma_carbon_electron,
self.data.physics.f_nd_plasma_oxygen_electron,
self.data.physics.f_nd_plasma_iron_argon_electron,
Expand Down
Loading
Loading