Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug in adjust_mass.f90 #768

Merged
merged 1 commit into from
Jan 27, 2025
Merged

fix bug in adjust_mass.f90 #768

merged 1 commit into from
Jan 27, 2025

Conversation

matthiasfabry
Copy link
Contributor

There's a subtle bug in the adjust_mass/adjust_J_lost routine.
When the star is hardly losing mass (say s% star_mdot < -1d-99, which is possible when eg using "Kolb" mass transfer without winds), the mass_lost in the routine still reads 0d0 to floating point precision, and s% adjust_J_q is untouched at 0d0
Later, in timestep.f90, the check is whether s% mstar_dot < 0d0, which it is, it's -1d-99, and then any hard limit is always hit, causing infinite retries.

this is a simple fix to this bug.

@pmocz pmocz self-requested a review January 23, 2025 19:07
@Debraheem
Copy link
Member

nice find!

@pmocz pmocz merged commit 845f79c into main Jan 27, 2025
3 checks passed
@matthiasfabry matthiasfabry deleted the adjust_J_q-bug branch January 30, 2025 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants