Large drops in opacity near edges of table
- Dominant language
- Fortran
- Stars
- 249
- Forks
- 82
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 3
Description
This is related to issue: https://github.com/MESAHub/mesa/issues/814
Plotting the opacity as a function of temperature and density using `kap/plotter` (extending the bounds) reveals big drops in the opacity on the left side of the plot, and nans (white) on the bottom below a critical temperature

This is probably unphysical and causes numerical issues. Generally, MESA simulations try to avoid being in this part of parameter space, but sometimes a cell may inevitably land here.
The issue comes from the calculation of the `Compton_Opacity()` (see `Get_eosDT_Results` in `kap_eval.f90`). Specifically, the features are due to `lnfree_e`, which comes from the EOS: see `Get_eosDT_Results()` in `eosdt_eval.f90`
In fact, the features match up with different EOS regions as @Debraheem points out:

So to fix the issue of huge drops in opacity (which would be nice for better numerical control), we will need the EOS to supply better values of `lnfree_e` in the edge regions
Contributor guide
Assessment
This issue has not been assessed yet.