introduce switch_donor in adjust_mdots #854
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When doing wind-mass transfer with accretion_j_dot, in the case when the direction of mass transfer changes, the accretor does not have its accreted_material_j set. This makes solve_omega_mix fail as j(k) == 0 for the added cells.
This introduces a check during adjust_mdots to prevent this from happening.
If the current donor ends up accreting while the current accretor ends up losing mass, a donor switch is warranted without adjusting anything related to the implicit MT solver. Likely that value is very low anyway (compared to the wind-mass loss rates).
The todo on the equatorial radius is valid, as a critically rotating star has its eq_radius about 17% larger than its volume equivalent radius, much larger than the inacurracy of the fit used for R_min. However, if the star is appreciably roche filling, the concept of an equatorial radius washes away. The point radius (largest extent on the x-axis connecting the stars) would likely be the best approximation here. I could supply those from my Roche integrations.