Describe the bug
Currently the total, core and edge radiation are calculated as follows in impurity_radiation.py for calculate_radiation_loss_profiles():
pden_impurity_rad_total = self.pimp_profile * self.rho
pden_impurity_core_rad_total = self.pimp_profile * (
self.rho
* fradcore(
self.rho,
impurity_radiation_module.radius_plasma_core_norm,
impurity_radiation_module.f_p_plasma_core_rad_reduction,
)
)
self.pden_impurity_rad_profile = np.add(
self.pden_impurity_rad_profile, pden_impurity_rad_total
)
self.pden_impurity_core_rad_profile = np.add(
self.pden_impurity_core_rad_profile, pden_impurity_core_rad_total
)
The total raidaition is calculated first, followed by the core (which may have a reduction factor applied). The edge is then calculated as the difference between the core and the total as in calculate_radiation_powers() :
pden_plasma_outer_rad_mw = (
imp_rad.pden_impurity_rad_total_mw - imp_rad.pden_impurity_core_rad_total_mw
)
This means a deficit of core radiation is instantly transferred to the edge even if the profiles are not consitent with this.
This can be seen in the large_tokamak file which shows that the majority of the radiation is in the edge when the radiation profile shows the contrary
Steps to reproduce
Present in all runs
Expected behaviour
The core and edge radiation components should be calculated first and then added together to produce the total. It is perfectly fine to add a core radiation change via f_p_plasma_core_rad_reduction to take into account the radiation data assumptions.
Environment
Additional context
Describe the bug
Currently the total, core and edge radiation are calculated as follows in
impurity_radiation.pyforcalculate_radiation_loss_profiles():The total raidaition is calculated first, followed by the core (which may have a reduction factor applied). The edge is then calculated as the difference between the core and the total as in
calculate_radiation_powers():This means a deficit of core radiation is instantly transferred to the edge even if the profiles are not consitent with this.
This can be seen in the large_tokamak file which shows that the majority of the radiation is in the edge when the radiation profile shows the contrary
Steps to reproduce
Present in all runs
Expected behaviour
The core and edge radiation components should be calculated first and then added together to produce the total. It is perfectly fine to add a core radiation change via
f_p_plasma_core_rad_reductionto take into account the radiation data assumptions.Environment
Additional context