Closed jschwab closed 3 years ago
I know what this is about and I can work on it.
Essentially when losing mass if we just remove the angular momentum from the removed layers we can significantly underestimate angular momentum loss. Typically we'd expect angular momentum loss rate to be ~j_surf*Mdot (and I do find this by going to puny timesteps). But the outer layers removed in a single step can cover a large range of radii (particularly in stars with radiative envelopes), and the deeper layers have a surface j much smaller than j_surf.
To work around this we just scale down angular momentum in deeper layers of the star in a continuous way, such that the angular momentum lost corresponds to j_surf*Mdot. However under some extreme circumstances the algorithm really needs to dig deep, requiring to take away angular momentum from layers that are too deep. This can happen with some inflated envelopes. In Mathieu's case he's finding the algorithm is correcting jdot practically down to the core, which ain't good.
The solution is to just add a timestep control. We don't want this correction to operate too deep into the star, so we just create a normal and a hard limit with specific mass coordinates to constrain this correction. Seeing this time operating will also make people aware of the presence of this numerical fudge.
Great. Very helpful! I'll add you (and this) to my email thread with Mathieu.
14917 has the aforementioned timestep limit included. Will wait to hear back from Mathieu to see how it works for him and close this issue if that goes well.
Mathieu appears to be happy with the results he's getting right now. Closing this issue.
Mathieu Renzo reports:
MWE.tar.gz
@orlox and/or @adamjermyn : Thoughts? I didn't understand if this was informational or indicative of a serious problem.