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
29 stars 19 forks source link

Rerun for He stars and rapid mass transfer (CO-HeMS and moderate mass ratio HMS-HMS) #313

Closed sgossage closed 3 months ago

sgossage commented 4 months ago

This rerun type is meant to address issues especially associated with stripped He stars that pulsate after core exhaustion. In particular it will impact

This is an extension of PR#275. Changes introduced in this PR compared to that one are indicated by "🚩" below.

General changes (rapid mass transfer and memory allocation errors)

The following included reruns have these general changes:

  1. Enables MESA's dedt-form of its energy equation for rapid mass transfer cases.
  2. lnPgas_flag is also set to .true. at model 1, helping convergence further. 🚩

In addition, when a star's center_gamma (Coulomb coupling parameter, i.e., ratio of Coulomb energy to thermal energy) reaches a value greater than 1, approx. when the model is forming a degenerate core:

  1. Set convective_bdy_weight = 0 to avoid seg. faults & memory alloc. errors, especially on the WD cooling track. 🚩

Lastly,

  1. Go back to the default w_div_w_crit_lim = 0.99 and w_div_w_crit_tol = 0.05. 🚩

At some point we switched to w_div_w_crit_lim = 0.95 and w_div_w_crit_tol = 0.1 during reruns. Some rapidly rotating models find spuriously large mass transfer rates with these values though, and going back to the defaults avoids this.

Changes for stripped He stars (superadiabaticity and pulsations)

The following included reruns have these changes:

These changes are only ever enabled if x_logical_ctrl(7) = .true. in inlist1 or inlist2 for the respective models. These changes are especially relevant to the CO-HeMS and stripped He stars on the HMS-HMS grids.

When a star becomes a stripped He star at HeZAMS (defined in code as when the surface H envelope drops below 5% of the total stellar mass and He nuclear burning is an order of magnitude greater than H nuclear burning power):

  1. Forces MLT++ to operate regardless of Pgas/P, Ledd/L limits (throughout the star) w/ gradT_excess_lambda1 = -1. 🚩
  2. Goes back to the default strength of MLT++ (gradT_excess_f2 = 1d-3). 🚩
  3. Turns on v_flag to enable calculation of cell velocities within star, helping resolve He star pulsations. 🚩

These three changes are only allowed if the star is not undergoing RLOF. This is to avoid anomalous structural behavior due to the sudden changes during mass transfer. If stripping happens during RLOF, we skip these changes.

MESA src changes are here

Google drive test rerun results (will be updated as runs complete)

mkruckow commented 4 months ago

The link to the MESA-INLISTS branch is broken. Am I correct that you talk about the changes here?

sgossage commented 4 months ago

The link to the MESA-INLISTS branch is broken. Am I correct that you talk about the changes here?

Sorry I'd made some changes and renamed the associated branch of MESA-INLISTS. That's the correct link and I've updated the link here in the PR description now

mkruckow commented 4 months ago

Please check, whether 1% H on surface would be a better criterion, c.f. line 1315 in https://github.com/POSYDON-code/POSYDON/blob/development/posydon/utils/common_functions.py, where THRESHOLD_HE_NAKED_ABUNDANCE = 0.01.

sgossage commented 4 months ago

Please check, whether 1% H on surface would be a better criterion,

Thanks Matthias, I've checked this now and using 1% H on surface does produce some issues.

Certain stripped He stars only reach this condition around the time when they RLOF, and switching parameters at that point appears to cause strange behavior. In the attached images you can see that

  1. when using the 1% mass fraction condition, we get erratic behavior at the point the condition is triggered, which coincides roughly with radial expansion + RLOF.
  2. when using the 5% H envelope mass condition, we change parameters well before the radial expansion and RLOF, avoiding these issues.

Using the mass condition (pink dot indicates when suface_h1 < 0.01, the magenta dot is when H envelope mass is 5% of the total stellar mass):

5percent_mass_condition

and using the abundance condition:

abundance_condition

This is just one example where both terminate with gamma_center_limit, but overall using the 1% mass fraction condition leads to more convergence issues (min_timestep or sometimes erroneous cases of L2 overflow due to numerical instability) than when using the alternative envelope mass condition.