Open tbody-cfs opened 1 year ago
Tag @mikekryjak
Thanks @tbody-cfs. I wonder if folks over at SOLPS or SOLEDGE do this for their fixed fraction model, I'll ask around and see! To implement this, I think we would need to:
radas
and put those curves inNi
get calculated from Ne
, the local temperature and the mean charge state curveRight now Ni
is set equal to Ne
through the quasineutrality
component:
https://github.com/bendudson/hermes-3/blob/19d7a94b23bbf46c6747b5b0c0d30f934c464038/src/quasineutral.cxx#L23-L40
As you can see, it already has the machinery to account for an impurity species density and charge in this way. However, it's built for impurity transport where each charge state corresponds to a separately evolved species. This means that while it accounts for the density of each species, the charge state is a constant number. I guess we would need a way to do the opposite: an evolving charge field but a constant density. We can then modify the fixed_fraction_radiation
component to use the radas
curves to calculate the charge. I'm not sure if this is the easiest way, as nowhere else in the code does charge evolve...
I have never dealt with impurity transport so it's very possible I'm also missing something else. @bendudson what do you think?
Hey @tbody-cfs and @mikekryjak
This should be possible using existing machinery: If the fixed fraction model sets density and mean charge state of the impurity, then the quasineutral
component will ensure that the impurity charge is taken into account.
To do this the electron density needs to be set last, using the charge density of the ions. Electron density is often evolved because the polarization drift can be ignored for electrons, but when multiple ions are evolved or the charge state of a fixed-fraction impurity is included, then ion densities must be evolved. For example here: https://github.com/bendudson/hermes-3/blob/master/examples/tokamak/recycling-dthe/BOUT.inp#L30 the electron density is set last, using quasineutrality, with all ion species appearing in the component list before the electrons.
We'll need to calculate the mean charge state of the impurity, but I think RADAS already calculates this, and it can be an additional fitted curve.
Related to #128 Radas also gives the (mean charge) curve. In a hot, strongly-seeded SOL, a non-negligible fraction of electrons in the SOL will be associated with the impurity (c_z * = fraction of electrons associated with impurity).
Is it worth/possible to account for this dilution?
At a minimum, it might be worth writing out the dilution into the output, even if we don't use it, to make sure that we haven't associated >100% of electrons in SOL with the impurity :)