Open StuartBenjamin opened 2 months ago
Hi Stuart, This check was originally to make sure that we don't end up with negative SOL heat fluxes (which leads to very weird results — i.e. negative impurity concentrations, etc). Enforcing Pin > Prad probably makes more sense. Could you open a PR with this change?
Hi I'm using this popcon code to do a tearing study for ARC (MHD RPP) and I was confused by the function
require_P_rad_less_than_P_in
. In the SPARC prl,require_P_rad_less_than_P_in
takesP_in
, andP_rad
and enforcesP_rad <= P_in
by re-writingP_rad
if necessary. HoweverP_rad
is rigorously calculated based on Bremsstrahlung and Synchrotron and input impurity concentrations, whileP_in
is calculated fromsolve_energy_confinement_scaling_for_input_power
which is a heuristic fit based on a database study. IfP_rad
>P_in
, I believeP_in
should be raised to get to a steady state. While this might violate the chosen energy confinement scaling, it's more physical thanP_rad
being reduced which fails power balance altogether.To make sure I wasn't missing something I checked through the followup functions
calc_min_P_radiation_from_fraction
,calc_P_radiation_from_core_seeded_impurity
,calc_core_seeded_impurity_concentration
to see if they had an option to lower impurity concentration ifP_rad >= P_in
, but they only had the option to raise impurity concentration. Maybe I'm missing something down the line that resolves the issue but I can't see it at the moment.I also realise we can optionally remove these points by masking
calc_f_rad_core==1
, however since these points fail power-balance and someone using the code might miss this issue, I think the function should be removed or replaced with require_P_in_greater_than_P_rad. What do you think?