POSYDON-code / POSYDON-code/POSYDON
Audit and fix legacy bondi_hoyle implementation bugs
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
- A variable named
he_core_massis populated fromhe_core_radiusand then implicitly converted to a Boolean. - 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. - In the
Kudritzki+2000branch,f_mis assigned as a scalar inside a loop, so an array calculation can apply the last system's factor to all systems. - An unsupported wind-scheme string can reach the calculation with
f_mundefined instead of raising a clearValueError. - The random single-phase treatment and the appropriate orbit-averaged alternative require the physics review already discussed in #829.
- The wind-disc criterion mixes velocities calculated in SI with
const.clightin cgs through an implicit0.01conversion, 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.