You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is related to other issues, e.g. #493 - in trying to address the issues with macro-atoms, I think I've found a bug in the matrix ionization code when macro-atoms are used.
What I thought was supposed to happen is that, inside the loop over electron density, the ionization rate matrix for simple ions is calculated followed by a call to macro_pops to get the macro-atom level populations and ionization states. However, it seems to me that the densities that are copied over to the newden array and these overwrite the macro-atom ones:
for (nn=0; nn<nions; nn++)
{
newden[nn] =0.0; // initialise the array element/* if the ion is being treated by macro_pops then use the populations just computed */if ((ion[nn].macro_info==1) && (geo.macro_simple==0) && (geo.macro_ioniz_mode==1))
{
newden[nn] =xplasma->density[nn] / elem_dens[ion[nn].z];
}
for (mm=0; mm<nrows; mm++) // inner loop over the elements of the population array
{
if (xion[mm] ==nn) // if this element contains the population of the ion is question
{
newden[nn] =populations[mm]; // get the population
}
}
if (newden[nn] <DENSITY_MIN) // this wil also capture the case where population doesnt have a value for this ionnewden[nn] =DENSITY_MIN;
}
free (populations);
Sorry to raise another issue, but this one is potentially pretty important. Hopefully I've misunderstood something here.
The text was updated successfully, but these errors were encountered:
Note that this doesn't affect in published work, but it does affect your TDE runs @saultyevil - it's not exactly "wrong" but it's not how we meant to do things and is inconsistent with the way we do stuff in the old non-matrix ion modes.
jhmatthews
pushed a commit
to jhmatthews/sirocco
that referenced
this issue
Apr 23, 2019
This is related to other issues, e.g. #493 - in trying to address the issues with macro-atoms, I think I've found a bug in the matrix ionization code when macro-atoms are used.
What I thought was supposed to happen is that, inside the loop over electron density, the ionization rate matrix for simple ions is calculated followed by a call to macro_pops to get the macro-atom level populations and ionization states. However, it seems to me that the densities that are copied over to the newden array and these overwrite the macro-atom ones:
Sorry to raise another issue, but this one is potentially pretty important. Hopefully I've misunderstood something here.
The text was updated successfully, but these errors were encountered: