Fix total (plasma + kinetic neutral) deuterium particle balance: wall recombination (corr_neg and bcs(:) type) - #32
Conversation
…ination-corr-neg-from-kinetic-side-same-as-fluid-side updated regtests
…ination-corr-neg-from-kinetic-side-same-as-fluid-side
…ination-corr-neg-from-kinetic-side-same-as-fluid-side
…ination-corr-neg-from-kinetic-side-same-as-fluid-side
…ination-corr-neg-from-kinetic-side-same-as-fluid-side
…ination-corr-neg-from-kinetic-side-same-as-fluid-side and updated regtests accordingly
This reverts commit f3098ad.
…S-5945-make-wall-recombination-corr-neg-from-kinetic-side-same-as-fluid-side
…corr-neg-from-kinetic-side-same-as-fluid-side
| #endif | ||
| !>Lost to recombination (no Brehmstralung) | ||
| local_Prec = local_Prec + r0_corr*r0_corr*(T0_corr*Srec_T_ncs)*BigR *xjac* delta_phi *wst | ||
| local_Prec = local_Prec + r0_corr*r0_corr*(Te0_corr*Srec_T_ncs)*BigR *xjac* delta_phi *wst |
There was a problem hiding this comment.
I think this should be the total temperature. Can you double check?
There was a problem hiding this comment.
Hm, good catch, now I don't know to be honest.
@szmate00 could you check this?
I find these names all a bit confusing. I didn't expect Bremsstrahlung to be an important radiation mechanism for recombination, I thought it was mostly line radiation from the electron dropping down into a lower state. Is the term abused here, or where does it come from? Is it the 3rd electron in the 3 body recombination?
There are the ions and electrons getting neutral, so their energy leaving the plasma side. Now if that was all we cared about we could just use T0 here and be done, but to be consistent with the neutrals side, I think what is instead done is that the ion loss should be calculated here (so actually Ti0 should be used), while the electron losses are calculated separately in the line below (Prb). This is my understanding because there are equivalent terms in elt_matrix_fft (lines 1865, 1914, 2051 and 2054) of model600.
So @szmate00, it should be Ti0 here, right?
There was a problem hiding this comment.
Thank you,m can you correct it please?
There was a problem hiding this comment.
Yes, done. Thanks for the reminder
…corr-neg-from-kinetic-side-same-as-fluid-side
N-Schwarz
left a comment
There was a problem hiding this comment.
Hi @Daniel-Maris , thanks. This looks good, just if you want to be consistent I think it would be better to apply the correction to the total temperature everywhere and also change it in mod_boundary_matrix_open.f90.
| if (present(T_e_raw)) T_e_raw = T_e_temp | ||
| T_e = max(T_e_temp, T_FLOOR) | ||
| if (present(T_e_raw)) T_e_raw = P(ii_Te) * T_norm | ||
| T_e = corr_neg_temp(P(ii_Te)) * T_norm |
There was a problem hiding this comment.
I think to be consistent, we should do the correction on the total temperature. Same below
There was a problem hiding this comment.
Yes, we discussed this before the move to github on the old PR page; I had already committed this but since it changes the underlying fluid mhd model, breaking many regtests in the process, we thought it would be better to do this in a separate PR to make it more clear what this PR is exactly doing and what that PR is exactly doing. If you now prefer to include this in this PR anyway please let me know. I'm planning to do that PR once this is finished to avoid conflicts with this PR
There was a problem hiding this comment.
Sorry, I thought you meant to fix this already here.
We can do this in a later one.
| if(with_impurities) then | ||
| call fields%interp_PRZ(time,i_elm,[var_rho,var_Te,var_rhoimp,var_Ti],4,st(1),st(2),phi,P,P_s,P_t,P_phi,P_time,R,R_s,R_t,Z,Z_s,Z_t) | ||
| Ti = max(P(4)/(K_BOLTZ*MU_ZERO*central_density*1.d20), 1.d0) | ||
| Ti = corr_neg_temp(P(4))/(K_BOLTZ*MU_ZERO*central_density*1.d20) |
There was a problem hiding this comment.
Same here, the correction should be on the total temperature
This PR fixes the total deuterium particle balance (plasma + kinetic neutrals) by using the same correction on the particle side as on the fluid side for negative T and ne (corr_neg rather than previously used max(ne,1e16)), and by taking into account which boundary condition is locally on the fluid side through the bcs(:).
This breaks the reg test so those are updated.
This was already a PR before github, so for details see https://git.iter.org/projects/STAB/repos/jorek/pull-requests/1031/overview and https://jira.iter.org/browse/IMAS-5945 if you have access.