ajwheeler / Korg.jl

fast 1D LTE stellar spectral synthesis
https://ajwheeler.github.io/Korg.jl/
BSD 3-Clause "New" or "Revised" License
43 stars 7 forks source link

Korg vs MARCS electron number density #182

Open ajwheeler opened 1 year ago

ajwheeler commented 1 year ago

edit: newer plots are below this post

179 modifies Korg to recalculated the electron number density, rather than taking the value from the model atmosphere at face value.

In general, things look pretty good at the photosphere. "reldiff" here is (recalculated ne/marcs ne) - 1. The dissagreement at low logg/high Teff is no big deal since that part of the Kiel diagram is unphysical. Those marcs atmospheres didn't converge and were filled in with RBF extrapolation, so the thing I'm comparing to probably isn't physically self-consistent. For the M dwarfs, I think the problem is the lack of charged molecules, but I'm not certain. image

If you look at the worst case atmospheric layer, the match is much worse. Again the worst stuff is happening in the part of the Kiel diagram without many stars (low logg/high Teff). In this regime, the worst disagreement is at the bottom of the atmosphere. It's notable that calculated ne/marcs ne is very close to 1, but I haven't been able to come up with a theory of what's going on. image image

Here's the electron number densities in the lowest layer of the atmosphere calculated by Korg (first) and MARCS (second). The Korg electron number densities have "structure" not found in the marcs values which corresponds to a sharp increase in the temperature at tau=100 (plotted third). This seems likely to be driven by the model atmosphere interpolation. image image image

One last plot: This is (recalculated ne/marcs ne) - 1 as a function of $\tau$ across the Kiel diagram. The gray lines show the "zero" for each tiny plot, and the red dot marks the photosphere. image

ajwheeler commented 1 year ago

Changes from #221. (Other plots have changes small enough that they are hard to see.)

image image image image

Until now, my best guess about why Korg consistently underestimates (compared to MARCS) the electron number density in cool stars would have been charged molecules. Unfortunately, these don't exist in large enough quantities to be meaningful electron donors. I'm not sure what else could be the issue. Maybe the equation of state? Other molecules? Something to do with the way they approximate molecular equilibrium constants?

ajwheeler commented 1 year ago

Since this is purely a matter of the equation of state, it's instructive to look at it directly, outside the context of stellar parameters. This plot compares the Korg and MARCS electron pressure (equivalently: electron fraction, electron number density) as a function of temperature and pressure.

image

Things that aren't the problem:

Maybe it has something to do with level dissolution? I'm trying to figure out how it could depend on some, e.g. equillibrium constant, but I'm not seeing how. There aren't any neutral molecules involving Na that exist at number densities close to what would matter for this. Korg doesn't yet include negatively charged molecules in its solver, but those would make the electron fraction lower, and the problem worse.

ajwheeler commented 1 year ago

Bengt Edvardsson kindly provided me with the tables used to calculate the MARCS chemical equilibrium. It turns out that the electron pressure discrepancy can be explained entirely in terms of terms of the Na II number density. (And also the K II number density at temperatures even lower than we see in these atmospheres.) image imageimage

It remains to be seen why exactly these species disagree, but both numerical errors or possibly level dissolution seem like plausible explanations.