Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHE Logic Fix for Issue #1303 #1321

Merged
merged 7 commits into from
Jan 14, 2025
Merged

CHE Logic Fix for Issue #1303 #1321

merged 7 commits into from
Jan 14, 2025

Conversation

veome22
Copy link
Collaborator

@veome22 veome22 commented Jan 10, 2025

Amended the CHE logic so that the determination of CHE uses the OrbitalAngularVelocity() rather than m_Star->Omega(). This allows stars to change into CHE even if they don't have any spin, as can happen when TIDES_PRESCRIPTION is NONE.

For the binary shown in Issue #1303 ,

./COMPAS/src/COMPAS --random-seed 4907 -n 1  
--metallicity 0.0017724805683766772  
--initial-mass-1 41.997969179405416 --initial-mass-2 41.997969179405416  
--semi-major-axis 0.06926436655793679  
--chemically-homogeneous-evolution-mode PESSIMISTIC  
--enhance-CHE-lifetimes-luminosities TRUE  
--scale-CHE-mass-loss-with-surface-helium-abundance TRUE  
--enable-rotationally-enhanced-mass-loss TRUE  
--scale-terminal-wind-velocity-with-metallicity-power 0.0  
--mass-change-fraction 0.005 --radial-change-fraction 0.005  
--tides-prescription NONE  
--pulsational-pair-instability-prescription HENDRIKS  
--PPI-CO-Core-Shift-Hendriks 1.111111 --PPI-upper-limit 80.0 --PISN-lower-limit 80.0  
--common-envelope-formalism TWO_STAGE 
--wolf-rayet-multiplier 1.291550

the output becomes:

0: DCO formed: (Chemically_Homogeneous -> Black_Hole) + (Chemically_Homogeneous -> Black_Hole)

… orbital frequency, and then set the stellar spin if required
@veome22 veome22 linked an issue Jan 10, 2025 that may be closed by this pull request
@veome22 veome22 added bug Something isn't working severity_moderate This is a moderately severe bug urgency_moderate This is a moderately urgent issue labels Jan 10, 2025
…ars to be synchronized while conserving total angular momentum
@veome22
Copy link
Collaborator Author

veome22 commented Jan 10, 2025

Also made the CHE treatment conserve angular momentum by moving all the spin-related code to ProcessTides(). I have used almost the same routine as PERFECT tides, but slightly modified to allow for only one star to be synchronized while no tides are applied to non-CHE stars.

@veome22 veome22 added the enhancement New feature or request label Jan 10, 2025
Copy link
Collaborator

@ilyamandel ilyamandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had clearly made a mistake. I should have updated the angular frequency of the stars when setting them up (see around lines 190-198 of BaseBinaryStar.cpp) and I did not. Thank you for catching that.

I think it's important to realise and clearly state (I'd even add it to the changelog comments and to whatsnew, so we don't forget) that you are now making the assumption that all stars in binaries with sufficiently rapid initial angular frequencies are going to be set as CHE, whatever the tides option, and that this initialisation does not conserve total angular momentum. I am generally OK with that (presumably, tides were efficient pre-ZAMS, a part of the stellar evolution we don't consider), but I'd ask for two changes:

  • Don't do this if the initial rotational frequency of stars is explicitly specified. Presumably, if the user actively chooses a value, they have a reason for doing so. In that case, we should only evolve those angular frequencies under the action of tides, and not by fiat.

  • Update the comment on lines 302--310, it's no longer accurate.

Oh, and you'll need to merge in dev and update the changelog accordingly.

Copy link
Collaborator

@ilyamandel ilyamandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P.S. One small possible update to tidal synchronisation of CHE stars (again, I like your general approach!):

// no (real) root found, synchronize CHE stars ignoring angular momentum conservation
if (m_Star1->StellarType() == STELLAR_TYPE::CHEMICALLY_HOMOGENEOUS){m_Star1->SetOmega(omega);}
if (m_Star2->StellarType() == STELLAR_TYPE::CHEMICALLY_HOMOGENEOUS){m_Star2->SetOmega(omega);}

In this case, you probably want the stars to be forced to have the orbital angular frequency. Right now, you are giving them a negative omega, which was just meant as an indication that no root was found.

@veome22 veome22 requested a review from ilyamandel January 14, 2025 17:55
Copy link
Collaborator

@jeffriley jeffriley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks @veome22

Copy link
Collaborator

@ilyamandel ilyamandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic -- thank you, @veome22 ! I'll now pull this into dev.

@ilyamandel ilyamandel merged commit e512bd8 into dev Jan 14, 2025
3 checks passed
@ilyamandel ilyamandel deleted the 1303-che-fix branch January 14, 2025 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request severity_moderate This is a moderately severe bug urgency_moderate This is a moderately urgent issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduction in production of BHBH from CHE
3 participants