MESAHub / mesa

Modules for Experiments in Stellar Astrophysics
http://mesastar.org
GNU Lesser General Public License v2.1
145 stars 39 forks source link

FPE: log(negative) in skye_thermodynamics.f90 pack_for_export #98

Closed rjfarmer closed 4 years ago

rjfarmer commented 4 years ago

Turning on fpe checking in make_env, in pack_for_export we take log(e) (line 146) but e<0:

erad=360600187.4415682 egas=-142407630739436.44 eele=225381587086946.31

F_ion_gas = -413450326327850 F_ideal_ion = -54669276763610.039 F_coul = -358781049564239.94

temp = 1935999.9999999937 dens = 294.74502867774248 abar=56 zbar=26

adamjermyn commented 4 years ago

Thanks for this. I think this means we should nudge the edge of Skye a bit higher in T.

The problem is that Skye's energy and entropy become negative in the region where matter forms bound states, which varies a bit by composition. On the composition I used to define the current boundaries (50/50 C/O) this (rho,T) isn't an issue, but on other compositions it can be.

Eventually we'll have screening corrections that stop the Coulomb term from becoming large + negative in this region. For now best to just cut it out, and I'll add that to my list to do.

-Adam

On Sat, Oct 10, 2020 at 6:29 AM, Robert Farmer < notifications@github.com > wrote:

Turning on fpe checking in make_env, in pack_for_export we take log(e) (line 146) but e<0:

erad=360600187.4415682 egas=-142407630739436.44 eele=225381587086946.31

F_ion_gas = -413450326327850 F_ideal_ion = -54669276763610.039 F_coul = -358781049564239.94

temp = 1935999.9999999937 dens = 294.74502867774248 abar=56 zbar=26

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub ( https://github.com/MESAHub/mesa/issues/98 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/ABPR5H5TAVB3OKQGR3ECI6LSKAZQLANCNFSM4SK7FWCQ ).

adamjermyn commented 4 years ago

I'm closing this because it's not a bug in Skye, it's a limitation of the input physics. We should be careful of this in determining the blend location, but there's nothing to be done for now.

If you disagree feel free to reopen.