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

Add BoostVelocity option to ShapeMap #6363

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

shabibti
Copy link
Contributor

@shabibti shabibti commented Nov 6, 2024

Proposed changes

Allows for boosted Kerr horizons in ShapeMap by adding a boost_velocity argument to gr::Solutions::kerr_schild_radius_from_boyer_lindquist. The previously returned Kerr-Schild radius is now Lorentz boosted before being returned. The new input option BoostVelocity, which takes an array of three doubles, has been added to ShapeMap.

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Copy link
Member

@nilsvu nilsvu left a comment

Choose a reason for hiding this comment

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

Some questions about angles that I have to think about a bit 🤔

struct BoostVelocity {
using type = std::array<double, 3>;
static constexpr Options::String help = {
"Boost velocity to transform horizon with in Cartesian Kerr-Schild "
Copy link
Member

Choose a reason for hiding this comment

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

Fix sentence

@@ -17,9 +17,10 @@ template <typename DataType>
Scalar<DataType> kerr_horizon_radius(
const std::array<DataType, 2>& theta_phi, const double mass,
const std::array<double, 3>& dimensionless_spin) {
Copy link
Member

Choose a reason for hiding this comment

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

Take the boost velocity as an argument here as well, can't hurt

*/
template <typename DataType>
Scalar<DataType> kerr_schild_radius_from_boyer_lindquist(
const double boyer_lindquist_radius,
const std::array<DataType, 2>& theta_phi, double mass,
const std::array<double, 3>& dimensionless_spin);
const std::array<double, 3>& dimensionless_spin,
const std::array<double, 3>& boost_velocity);
Copy link
Member

Choose a reason for hiding this comment

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

Default this to zero, then you don't have to change some places where you call this function with zero boost.

1.0 / (1.0 - (square(boost_velocity_x) + square(boost_velocity_y) +
square(boost_velocity_z)));

Scalar<DataType> unboosted_kerr_schild_radius =
Copy link
Member

Choose a reason for hiding this comment

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

Move this up and return it directly if the boost is zero.

Comment on lines +127 to +129
Scalar<DataVector> boosted_radius = Scalar<DataVector>{
sqrt(square(get<0>(boosted_coords)) + square(get<1>(boosted_coords)) +
square(get<2>(boosted_coords)))};
Copy link
Member

Choose a reason for hiding this comment

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

magnitude(boosted_coords)

// Boosted horizon should be equivalent to applying Lorentz transformation
// on unboosted coordinates.
CHECK_ITERABLE_APPROX(
kerr_schild_radius_from_boyer_lindquist(r_plus, theta_phi, mass,
Copy link
Member

Choose a reason for hiding this comment

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

Maybe I have to think about this more, but I am confused about angles. The angles passed in here should be in the boosted frame I think. So these should be the angles you get when you transform the boosted Cartesian coords to polar coords.

* Kerr-Schild coordinates and find that the boosted Kerr-Schild radius \f$r'\f$
* as a function of angles satisfies
* \f[
* r'^2 = r^2 (1 + \gamma^2 \left( \beta_x\cos\phi\sin\theta +
Copy link
Member

Choose a reason for hiding this comment

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

Are these angles in the boosted or unboosted frame? I think they should be in the boosted frame (see comment in the test below).

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

Successfully merging this pull request may close these issues.

2 participants