POSYDON-code / POSYDON

POSYDON is a next-generation single and binary-star population synthesis code incorporating full stellar structure and evolution modeling with the use of MESA.
BSD 3-Clause "New" or "Revised" License
30 stars 19 forks source link

PopSynth: Some systems never reach `END` or `maxtime` #196

Closed maxbriel closed 11 months ago

maxbriel commented 1 year ago

Problem Some systems do not reach the end_step or the maxtime. These systems reach step_detached after the first SN and are predicting CC2, but never go to step_SN to perform the secondary CC. However, it seems that the step_times is very long in this detached_step. Is there a limit for this? It's unclear to me why the step is so long.

Solution Unclear yet what causes this issue. Requires better triaging.

Example binary time state step_names event S1_mass S2_mass orbital_period eccentricity metallicity step_times
0.000000e+00 detached initial_cond ZAMS 19.787769 7.638741 3007.865561 0.000000 0.00142 0.000000
1.074928e+07 detached step_HMS_HMS CC1 10.702904 7.952004 4126.577676 0.000000 0.00142 0.040344
1.074928e+07 detached step_SN NaN 10.160206 7.952004 4133.574689 0.406023 0.00142 0.000409
4.299914e+07 detached step_detached CC2 10.160206 7.805195 3531.647171 0.301874 0.00142 137.303454
maxbriel commented 1 year ago

The binary can be found in the population file:230914/POSYDON_data/tutorials/population-synthesis/example/1.00e-01_Zsun_population.h5

with binary_index = 216931

maxbriel commented 11 months ago

It looks like these are correctly parsed, when ran using BinaryStar, see code below. A different orbital_period is found after step_HMS_HMS.

Since this is not reproducible, I will close this issue.

from posydon.binary_evol.simulationproperties import SimulationProperties
from posydon.popsyn.io import simprop_kwargs_from_ini

sim_kwargs = simprop_kwargs_from_ini('population.ini', verbose=True)
metallicity = {'metallicity':0.1,}
sim_kwargs['step_HMS_HMS'][1].update(metallicity)
sim_kwargs['step_CO_HeMS'][1].update(metallicity)
sim_kwargs['step_CO_HMS_RLO'][1].update(metallicity)
sim_kwargs['step_CO_HeMS_RLO'][1].update(metallicity)
sim_kwargs['step_detached'][1].update(metallicity)
sim_kwargs['step_disrupted'][1].update(metallicity)
sim_kwargs['step_merged'][1].update(metallicity)
sim_kwargs['step_initially_single'][1].update(metallicity)
sim_pop = SimulationProperties(**sim_kwargs)
sim_pop.load_steps(verbose=False)

STAR1 = SingleStar(**{'mass': 19.787769, 'state': 'H-rich_Core_H_burning',\
                                     'natal_kick_array': [24.464803, 0.666314, 1.954698, 5.598975]})
STAR2 = SingleStar(**{'mass' : 7.638741, 'state' : 'H-rich_Core_H_burning'})
BINARY = BinaryStar(STAR1, STAR2,
                    **{'time': 0.0, 'state': 'detached', 'event': 'ZAMS', 'orbital_period':3007.865561, 'eccentricity': 0.0},
                    properties = sim_pop)

BINARY.evolve()
BINARY.to_df()[['state', 'event', 'S1_mass', 'S2_mass', 'orbital_period', 'S1_state', 'S2_state']]
Binary_parse