🐛 Incorrect calculation of line and Bremsstrahlung plasma radiation components
@jonmaddock is already working on this.
Since Sep 22, 2025.
- Dominant language
- Python
- Stars
- 71
- Forks
- 27
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 33
Description
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
- OS:
- Version: 3.2.0
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.