fixed incorrect metal mass fraction array for Freedman lowT opacity tables#993
Conversation
|
Awesome, I'll merge this into a branch so we can get it tested and reopen a pr for that branch into main! I'll try to fix whatever is messing with the build as well on that branch. |
58b84b0
into
MESAHub:bugfix/freedman_kap_tables
|
Perfect! Just in case---I also had to edit the $MESA_DIR/kap/preprocessor/rn_freedman script in order to successfully build & export the correctly-labeled opacity tables in my local MESA installation. I didn't add that file to this commit because there was no existing version of that script in the repo, but it was a very simple change, just substituting the correct Zs for the incorrect ones. |
|
no worries, i've regenerated it in my commit, and some other tweaks. I'm just having some git issues preventing me pushing the lfs files, so i can't commit yet, hopefully it will be solved tomorrow. |
Updated $MESA_DIR/kap/public/kap_def.f90 and $MESA_DIR/kap/preprocessor/src/freedman.f90 to reflect the below:
Louis Siebenaler (cc'd) and I noticed a problem with the preprocessing & evaluation of the Freedman11 low-temperature opacity tables. Specifically, the "Z" values associated with each table, as e.g. enumerated in $MESA_DIR/kap/public/kap_def.f90,
num_kap_lowT_Zs(i) = 7
kap_lowT_Zs(1:num_kap_lowT_Zs(i), i) = [ 0.01d0, 0.02d0, 0.04d0, 0.100d0, 0.200d0, 0.63d0, 1.00d0 ]
are not metal mass fractions. Rather, they are related to number fractions; for example, a Freedman [M/H] value of -0.3 corresponds to a metal number fraction of 10**(-0.3)solar = 0.5solar; [M/H]=0 corresponds to a solar number fraction, etc. It appears that there was a decision made to equate the solar metal number fraction with a metal mass fraction of 0.02 and scale the other values in the array accordingly.
The metal mass fraction array should instead look something like this (with small variations possible depending on which protosolar abundance table you work with; the below values are based on Lodders 2003 table 2):
[M/H] = [-0.3, 0.0, 0.3, 0.7, 1.0, 1.5, 1.7]
Z = [0.0075, 0.0148, 0.029, 0.0698, 0.1303, 0.3215, 0.4288]