Impurity radiation corrections - #4536
Conversation
… tauE calculation Leave plasma power balance impurity radiation un-reduced.
53719e4 to
a9b3913
Compare
|
This appears to independently resolve #3968 (comment). |
Can you clarify this? |
I think he means it should probably be split into a few separate PRs after the initial review discussion. Also I guess the switches wont be needed if we agree on the solution |
This link is to the comment on volume-integration. Was that intended? |
So do we actually need to approve the PR? |
|
no but a review is needed of the content |
grmtrkngtn
left a comment
There was a problem hiding this comment.
Impurity radiation profiles
I agree with the proposed changes to the impurity radiation profiles. Moving the (\rho) weighting from the stored power-density profile into the volume integral is a clear-cut fix.
Core radiation reduction
I also agree with separating the physical core radiation from the reduced value used in the confinement-time calculation. Retaining the option to apply the reduction to the scaling law only seems like a reasonable compromise but the physical power balance must use the full radiation.
Outstanding
The corrected confinement calculation still relies on two input assumptions: radius_plasma_core_norm and
f_p_plasma_core_rad_reduction.
I'm not sure we still still need the latter, why would we ever not subtract the full radiation (why would we use the factor?)
EUROfusion colleagues have also suggested that the effective core boundary could be calculated from the radial power flow rather than prescribed as an input. My understanding is that METIS calculates the cumulative net power, heating minus local radiation, as a function of radius and uses its maximum to determine the effective transport-driving power. Should we investigate this here, or would that be better treated as a separate follow-up to this accounting PR?
|
@mkovari these changes solve #3968 (the issue, not just the comment within the issue) as it separates the power density calculation and its integral. This draft PR is intended to show how the above plots were generated to better understand the problem due to the confusion of multiple issues acting together and the overall effect of the changes I intend to make, which will be a separate PR. These changes are described in the final paragraph of the PR description.
That is how the confinement time scaling law has effectively been modified (according to Lux et. al.) to model the highly-radiative regime: of the core region ( Any calculation of the core boundary is an additional feature. I'd be grateful for a review from @mkovari , @chris-ashe and @ajpearcey . |
mkovari
left a comment
There was a problem hiding this comment.
I can't say I have read it all but I am keen to see what this looks like when merged into main.
|
I would be interested to see how the changed PPB changes the final solution vector for the DEMO-LAR. How big is this shift in the Psep value? Also was the edge radiation also previously excluded in the FW heat load calculations? |
| """total core radiation power per volume (MW/m3)""" | ||
|
|
||
| pden_plasma_core_rad_tauE_mw: float = 0.0 | ||
| """reduced total core radiation power for tauE calculation (MW/m3)""" |
There was a problem hiding this comment.
| """reduced total core radiation power for tauE calculation (MW/m3)""" | |
| """reduced total core radiation power for τₑ calculation [MW/m³]""" |
|
|
||
| crfcdr = (fefcdr * self.data.costs.discount_rate) / (fefcdr - 1.0e0) | ||
| # crfcdr = (fefcdr * self.data.costs.discount_rate) / (fefcdr - 1.0e0) | ||
| crfcdr = 1.0 |
There was a problem hiding this comment.
Not sure why this is now just set to 1
| # but reduced radiation here in confinement time calculation | ||
| if model == ConfinementRadiationLossModel.FULL_RADIATION: | ||
| p_plasma_loss_mw -= self.data.physics.pden_plasma_rad_mw * vol_plasma | ||
| if impurity_radiation.rad_reduction_for_tauE_only: |
There was a problem hiding this comment.
Should this not be in the ConfinementRadiationLossModel.CORE_ONLY condition below?
| rho = 1.0 | ||
| if rho_fix: | ||
| rho = self.plasma_profile.neprofile.profile_x | ||
| self.pden_impurity_rad_total_mw = 2.0e-6 * integrate.simpson( |
There was a problem hiding this comment.
I believe it is better here to rename these variables to have _vol_avg in them as thats the returned value from the integration when multiplying by rho at each point. These values are then multiplied by vol_plasma to get the total radiation power. This should make it more clear as to what is happening
| ) | ||
|
|
||
| # Now idempotent, return | ||
| # Pass model caller and opt params for stability constraint evaluation |
There was a problem hiding this comment.
Not sure about this change, probs best if someone like @timothy-nunn checks it
There was a problem hiding this comment.
This PR does not include objective function 20 so these changes are unnecessary at this point.
Also, call_models_and_write_output returns the objective value and normalised residuals, but I cannot see them being used anywhere in this PR.
I suggest all of these changes in caller can be left for a later PR.
| trying to optimise it. Internally, PROCESS uses `fsolve` (a Newton-Krylov/hybrd | ||
| trying to optimise it. | ||
| """ | ||
| SOLUTION = (-1, "Solution mode (no optimisation)") |
There was a problem hiding this comment.
Did we accidentaly remove solution mode when setting up the enum @jonmaddock @timothy-nunn ?
There was a problem hiding this comment.
Solution mode was removed a long time ago, it was replaced by evaluation mode. This is because solution mode did not produce consistent solutions and so was essentially useless (except for testing, see #4044)
| f_p_plasma_core_rad_reduction = 1.0 | ||
| else: | ||
| # Reduce radiation in PPB as well | ||
| f_p_plasma_core_rad_reduction = f_p_plasma_core_rad_reduction_tauE |
There was a problem hiding this comment.
I assume this will be removed once we put the PR up for the PPB fix?
| ) | ||
|
|
||
| # Total radiation profile (core + edge) | ||
| pden_impurity_rad_total = ( |
There was a problem hiding this comment.
If you multiply the core and edge pden by the total plasma volume and then add them together does it equal pden_impurity_rad_total * vol_plasma?
| x=self.plasma_profile.neprofile.profile_x, | ||
| dx=self.plasma_profile.neprofile.profile_dx, | ||
| ) | ||
| self.pden_impurity_core_rad_total_mw = 2.0e-6 * integrate.simpson( |
There was a problem hiding this comment.
For the core value I think we need to be explicit in stating that this is till done as a full plasma volume integral with the mask of 0's where the core would be. This has always caused confusion as to if the core or edge value is only done as a function of its own volume or that of the total plasma
| elif self.data.numerics.i_process_run_mode == PROCESSRunMode.EVALUATION: | ||
| # No optimisation: | ||
| # solve equality (consistency) constraints only using fsolve (HYBRD) | ||
| # ioptimz == -1: solution |
Demonstrates the effect of various options for impurity radiation and allows their plotting: this is not intended to be merged in its current form, but as an investigation. Primarily, this demonstrates the importance of separating the reduced core radiation used for the confinement time calculation and the total radiation considered in the plasma power balance, which I currently believe is incorrect.
I hope the following figures highlight a few things and justify the actual changes I want to make. They are all made with the DEMO LAR solution point and varying tungsten fractions. Deliberate horizontal "jitter" is applied to the scatter plots to ensure overlapping points are discernable.
Impurity radiation profiles
Radiation power
Separate radiation reduction for confinement time scaling only
Effect on plasma power balance (PPB)
I would like to always use the un-reduced total radiation (core and edge) in the plasma power balance calculation, and the reduced core radiation in the confinement time calculation only. This would mean that
i_rad_lossandf_p_plasma_core_rad_reductionwould only apply to the the confinement time calculation. I'm keen to hear your thoughts.