MESAHub / MESAHub/mesa

Large drops in opacity near edges of table

Open
#839 6 comments 0 reactions 2 assignees Claimed by @Debraheem View on GitHub
enhancement eos kap
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

![Image](https://github.com/user-attachments/assets/731d882d-52ba-427b-b31c-cfb9179e8dfe)

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:

![Image](https://github.com/user-attachments/assets/1e55dfbb-0060-4a84-a700-f95528234972)

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.