POSYDON-code / POSYDON-code/POSYDON

[BUG]: step_DCO solver edge case

Open
#912 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discuss
Dominant language
Python
Stars
45
Forks
37
Avg merge
8d 20h
Merged PRs (30d)
5

Description

Describe the bug
In some binaries, I am getting failures due to step_DCO and edge cases on the solver:
Below is an example at 0.45Zsun.
It looks like the final tau value for the integration is negative, while it should be positive.
This is probably because of an interpolation thing.

Traceback (most recent call last):
  File "/srv/beegfs/scratch/users/b/briel/kick_models/software/POSYDON/posydon/popsyn/binarypopulation.py", line 361, in _safe_evolve
    binary.evolve()
  File "/srv/beegfs/scratch/users/b/briel/kick_models/software/POSYDON/posydon/binary_evol/binarystar.py", line 255, in evolve
    self.run_step()
  File "/srv/beegfs/scratch/users/b/briel/kick_models/software/POSYDON/posydon/binary_evol/binarystar.py", line 283, in run_step
    next_step(self)
  File "/srv/beegfs/scratch/users/b/briel/kick_models/software/POSYDON/posydon/binary_evol/DT/double_CO.py", line 138, in __call__
    super().__call__(binary)
  File "/srv/beegfs/scratch/users/b/briel/kick_models/software/POSYDON/posydon/binary_evol/DT/step_detached.py", line 342, in __call__
    self.update_after_evo(t, binary, primary, secondary)
  File "/srv/beegfs/scratch/users/b/briel/kick_models/software/POSYDON/posydon/binary_evol/DT/step_detached.py", line 604, in update_after_evo
    sep_interp, ecc_interp, omega_interp_sec, omega_interp_pri = self.res.sol(t)
                                                                 ^^^^^^^^^^^^^^^
  File "/srv/beegfs/scratch/users/b/briel/kick_models/software/POSYDON/posydon/binary_evol/DT/double_CO.py", line 100, in __call__
    raise ValueError(f"Requested tau={tau:.17e} outside interval "
ValueError: Requested tau=-1.70418458790159960e-01 outside interval [0.00000000000000000e+00, -1.70418458751232849e-01].

Failed Binary Initial Conditions:
S1 mass: 8.713890971266483
S2 mass: 3.642221416404614
S1 state: H-rich_Core_H_burning
S2 state: H-rich_Core_H_burning
orbital period: 39.24871885278157
eccentricity: 0.0
binary state: detached
binary event: detached
S1 natal kick velocity: 151.12586796252674
S1 natal kick azimuthal angle: 5.944619028227051
S1 natal kick polar angle: 1.8887196822706545
S1 natal kick mean anomaly: 5.463076797023101
S2 natal kick velocity: None
S2 natal kick azimuthal angle: None
S2 natal kick polar angle: None
S2 natal kick mean anomaly: None

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.

Research direction

Start with posydon/binary_evol/DT/double_CO.py::call and posydon/binary_evol/DT/step_detached.py::update_after_evo, following the traceback into the interpolation call. Reproduce the failure using the reported binary initial conditions and inspect how the negative tau interval is produced. Done means this edge case no longer raises the out-of-interval ValueError and the final integration tau has the expected sign.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.