MESAHub / mesa

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

Switch donor function does not support 'Kolb' scheme #545

Open ZepeiX opened 1 year ago

ZepeiX commented 1 year ago

Describe the bug In the 'Kolb' scheme, the switching of the donor star does not occur when the accretor fills the Roche lobe initiating a reverse mass transfer. The accretor can expand arbitrarily..

To Reproduce Evolve two stars with close masses q~0.95 and proper period. Use 'Kolb' scheme

Expected behavior subroutine set_donor_star is able to correctly identify the donor regardless of the mdot scheme being used.

Relevant code In binary_evolve.f90, subroutine set_donor_star: 224 if (b% mdot_scheme == "roche_lobe" .and. & 239 else if (b% mdot_scheme == "contact" .and. &

matthiasfabry commented 1 year ago

Thank you Zepei for raising this issue. @orlox and I will take a look at this as part of a larger overhaul of the binary mass transfer routines. In the meantime, have you found a manual fix for your use case in particular?

ZepeiX commented 1 year ago

Yes, we add the switch function in other_rlo_mdot where we calculate both 'mdot_reverse' and 'mdot_normal'. And a small change in binary_mdot.f90: if (b% mdot_scheme == "roche_lobe" .and. .not. b% use_other_rlo_mdot) then -> if (b% mdot_scheme == "roche_lobe") then

else if (b% mdot_scheme == "contact" .and. .not. b% use_other_rlo_mdot) then -> else if (b% mdot_scheme == "contact") then I am sure there will be a better fix. run_binary_extras.zip