POSYDON-code / POSYDON-code/POSYDON

Audit and fix legacy bondi_hoyle implementation bugs

Open
#888 0 comments 0 reactions 1 assignee View on GitHub

@tassos25 is already working on this.

Since Aug 14, 2026.

  • #926 by @sgossage — open
bug
Dominant language
Python
Stars
45
Forks
37
Avg merge
8d 20h
Merged PRs (30d)
5

Description

Context

While extracting reusable XRB calculations for #881, several suspicious behaviors were identified in posydon.utils.common_functions.bondi_hoyle. They should be investigated and fixed in a dedicated PR rather than folded into the new-module PR.

Items to investigate

  1. A variable named he_core_mass is populated from he_core_radius and then implicitly converted to a Boolean.
  2. The slow-wind assignment for extended H-rich giants (beta = 0.125) is followed by mass-based assignments that appear to overwrite it for every valid positive stellar mass.
  3. In the Kudritzki+2000 branch, f_m is assigned as a scalar inside a loop, so an array calculation can apply the last system's factor to all systems.
  4. An unsupported wind-scheme string can reach the calculation with f_m undefined instead of raising a clear ValueError.
  5. The random single-phase treatment and the appropriate orbit-averaged alternative require the physics review already discussed in #829.
  6. The wind-disc criterion mixes velocities calculated in SI with const.clight in cgs through an implicit 0.01 conversion, which should be made explicit and tested.

Acceptance criteria

  • Confirm the intended prescriptions from the cited literature before changing behavior.
  • Separate definite implementation bugs from choices of physical approximation.
  • Add scalar and vector regression tests for each confirmed bug.
  • Test H-rich giants, He-rich donors, mixed-temperature arrays, invalid schemes, circular/eccentric systems, and wind-disc outcomes.
  • Keep the repair separate from #881.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.