-
Notifications
You must be signed in to change notification settings - Fork 192
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
Use SpEC's eccentricity control #6333
base: develop
Are you sure you want to change the base?
Conversation
@sxs-collaboration/spectre-core-devs could one of you take this one? |
65d44ab
to
ec26450
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[not a full review] Seems like some modules need to be fixed. Am I understanding this correctly that we have to have SpEC installed in order to do eccentricity control currently? Should we add an error/warning if somebody tries to use it but their build wasn't configured with SpEC?
Yes that's correct. I'll add some more checks for that (edit: done). For independence from SpEC we'll have to port the code over at some point. |
e52c26b
to
1697c37
Compare
the target eccentricity, using SpEC's OmegaDotEccRemoval.py. Currently | ||
supports only circular target orbits (target eccentricity = 0). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a check that the eccentricity is in fact 0 until we add support for non-zero ecc
output=None, # reads from Inspiral.yaml | ||
): | ||
def eccentricity_control(h5_files, id_input_file_path, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type the arguments
"Omega0", | ||
"adot0", | ||
"D0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to take this opportunity and move away from the names in SpEC to better names? Like initial_angular_velocity
, initial_radial_velocity
, initial_separation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These names are actually used a lot, so I tend towards keeping them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I'm fine with this, but we should be aware that if we want to change the names it's better to do it earlier rather than later while we're still building everything. We'll be even more resistant to change in the future once this is being used
# Call into SpEC's OmegaDotEccRemoval.py | ||
t, Omega, dOmegadt, OmegaVec = ComputeOmegaAndDerivsFromFile(traj_A, traj_B) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a comment that despite the function name, this expects arrays of data, and not filenames
subfile_name_aha_quantities: str = "ObservationAhA.dat", | ||
subfile_name_ahb_quantities: str = "ObservationAhB.dat", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not factor these defaults out as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only factored out the defaults because the lines were too long
|
||
def write_mock_trajectory_data( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have a class tests/Unit/Helpers/PointwiseFunctions/PostNewtonian/BinaryTrajectories.hpp
that can compute low order PN (and Newtonian) trajectories that we use in control system testing. Maybe we should move it to a common location, extend it a bit, and bind it in python to use here (that way we don't rewrite things)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in #6366
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can squash in this last change
target_eccentricity == 0.0 | ||
), "Only circular orbits are supported for eccentricity control yet." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yet
-> currently
"Omega0", | ||
"adot0", | ||
"D0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I'm fine with this, but we should be aware that if we want to change the names it's better to do it earlier rather than later while we're still building everything. We'll be even more resistant to change in the future once this is being used
Proposed changes
Call into SpEC to get eccentricity reduction updates. Replaces the port of an old SpEC script.
Upgrade instructions
Code review checklist
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.
bugfix
ornew feature
if appropriate.Further comments