Here are some initial conditions which give binaries that experience a common envelope with the primary star as the donor, then a stable mass transfer from the secondary which occurs long enough that the NS which forms from the primary accretes enough mass to collapse into a BH.
thermal_MT_test.h5.zip
The M_dot is turned into a dm as: dm = m_dot dt where dt = porb. In a pdb, you can show that the dm is of order ~1e-8 - 1e-5 Msun, while the thermal dm: dm_therm = M_donor / thermal_timescale porb is of order ~1e-2 - 1e-1. This means that the thermal timescale limit is not being applied.
I think a good place to start is figuring out how to set a gdb conditional statement where we can track the size of dm and/or the timesteps.
Here are some initial conditions which give binaries that experience a common envelope with the primary star as the donor, then a stable mass transfer from the secondary which occurs long enough that the NS which forms from the primary accretes enough mass to collapse into a BH. thermal_MT_test.h5.zip
So -- the issue with our thermally unstable, but dynamically stable mass transfer prescription is that the current code effectively never applies a thermal timescale limit for the donor star's mass loss. We calculate the total amount of mass lost following the Hurley+2002 equation starting at this line: https://github.com/COSMIC-PopSynth/COSMIC/blob/a0ab5ad8df135fd24020fe629780f1e6aa160950/cosmic/src/evolv2.f#L2496
The M_dot is turned into a dm as: dm = m_dot dt where dt = porb. In a pdb, you can show that the dm is of order ~1e-8 - 1e-5 Msun, while the thermal dm: dm_therm = M_donor / thermal_timescale porb is of order ~1e-2 - 1e-1. This means that the thermal timescale limit is not being applied.
I think a good place to start is figuring out how to set a gdb conditional statement where we can track the size of dm and/or the timesteps.