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

Follow-on issues from GW radiation update #1199

Open
ilyamandel opened this issue Aug 25, 2024 · 3 comments
Open

Follow-on issues from GW radiation update #1199

ilyamandel opened this issue Aug 25, 2024 · 3 comments

Comments

@ilyamandel
Copy link
Collaborator

There are a few follow-on issues from #1080 (not problems with that PR itself, but things that became apparent while working on it) that I am listing below so we don't forget them:

  1. I don't think the following is what we want to do going forward (BaseBinaryStar.cpp):

if ((m_Star1->IsOneOf({ STELLAR_TYPE::MASSLESS_REMNANT }) || m_Star2->IsOneOf({ STELLAR_TYPE::MASSLESS_REMNANT })) || p_Dt < NUCLEAR_MINIMUM_TIMESTEP) {
p_Dt = NUCLEAR_MINIMUM_TIMESTEP; // but not less than minimum
}

We may want to continue evolving merger products (which would be characterised by one component becoming the merger product and the other being a massless remnant). We don't want to take tiny timesteps in that case; on the contrary, the timestep should be driven exclusively by the dt passed back by the star which is not a massless remnant.

  1. In retrospect, I think it was a suboptimal implementation decision to equate a negative semi-major axis with the binary being unbound, and we should fix that in the future. Otherwise, we end up having to use hacks such as setting the semi-major axis to small positive numbers as the binary approaches GW-driven merger.

  2. I am worried that we may be resetting m_SemiMajorAxisPrev and m_EccentricityPrev multiple times per time step (e.g., what if we have mass transfer and GW emission happening simultaneously?), so these values could end up being overwritten in a way that may not match the developer's or user's expectations. The longer-term solution is to apply all changes to the orbit (from MT, tides, GWs) once per time step.

  3. Now that we have a new ChooseTimestep() function in BaseBinaryStar to account for GWs, we should use the same functionality for tides.

@veome22
Copy link
Collaborator

veome22 commented Aug 26, 2024

@ilyamandel I would be happy to add the timestep code for tides. Quick question-- what would you think about defining global variables such m_DOmega1Dt_tidal, m_DOmega2Dt_tidal, etc. as in the GW code? I've been avoiding it, but it would reduce the number of computations per timestep.

@ilyamandel
Copy link
Collaborator Author

Thank you, @veome22 !
To be honest, I can't recall why global variables were really necessary for either tides or GWs -- why can't the functions that compute them just return them to the caller in a tuple? -- but if you think they are needed, go for it.

@veome22
Copy link
Collaborator

veome22 commented Sep 1, 2024

Hi @ilyamandel. My current internal implementation of tidal timesteps calls the relevant functions, but the evolution can become painfully slow for the strongest tides. I expect that calculating everything only once and then storing as global variables would increase overhead, but hopefully cut down the run time. I can test both implementations and let you know the time difference, if any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants