Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <cstddef>
7 :
8 : #include "DataStructures/DataBox/Prefixes.hpp"
9 : #include "DataStructures/DataVector.hpp"
10 : #include "DataStructures/Tensor/Tensor.hpp"
11 : #include "DataStructures/Variables.hpp"
12 : #include "Evolution/Systems/CurvedScalarWave/Tags.hpp"
13 : #include "NumericalAlgorithms/LinearOperators/PartialDerivatives.hpp"
14 : #include "Utilities/Gsl.hpp"
15 :
16 : namespace CurvedScalarWave::Worldtube {
17 : /*!
18 : * \brief Computes the puncture/singular field \f$\Psi^\mathcal{P}\f$ of a
19 : * scalar charge on a generic orbit in Schwarzschild spacetime.
20 : * described in \cite Detweiler2003.
21 : *
22 : * \details The field is computed using a Detweiler-Whiting singular
23 : * Green's function and perturbatively expanded in the geodesic distance from
24 : * the particle. It solves the inhomogeneous wave equation
25 : *
26 : * \f{align*}{
27 : * \Box \Psi^\mathcal{P} = -4 \pi q \int \sqrt{-g} \delta^4(x^i, z(\tau)) d \tau
28 : * \f}
29 : *
30 : * where \f$q\f$ is the scalar charge and \f$z(\tau)\f$ is the worldline of the
31 : * particle. The expression is expanded up to a certain order in geodesic
32 : * distance and transformed to Kerr-Schild coordinates.
33 : *
34 : * The function given here assumes that the particle has scalar charge \f$q=1\f$
35 : * and is on a fixed geodesic orbit. It returns the
36 : * singular field at the requested coordinates as well as its time and spatial
37 : * derivative. For non-geodesic orbits, corresponding acceleration terms have to
38 : * be added to the puncture field.
39 : *
40 : * \note The expressions were computed with Mathematica and optimized by
41 : * applying common subexpression elimination with sympy. The memory allocations
42 : * of temporaries were optimized manually.
43 : */
44 1 : void puncture_field(
45 : gsl::not_null<Variables<tmpl::list<
46 : CurvedScalarWave::Tags::Psi, ::Tags::dt<CurvedScalarWave::Tags::Psi>,
47 : ::Tags::deriv<CurvedScalarWave::Tags::Psi, tmpl::size_t<3>,
48 : Frame::Inertial>>>*>
49 : result,
50 :
51 : const tnsr::I<DataVector, 3, Frame::Inertial>& centered_coords,
52 : const tnsr::I<double, 3>& particle_position,
53 : const tnsr::I<double, 3>& particle_velocity,
54 : const tnsr::I<double, 3>& particle_acceleration, double bh_mass,
55 : size_t order);
56 :
57 : /*!
58 : * \brief Computes the puncture/singular field \f$\Psi^\mathcal{P}\f$ of a
59 : * scalar charge on a generic orbit in Schwarzschild spacetime.
60 : * described in \cite Detweiler2003.
61 : *
62 : * \details The appropriate expression can be found in Eq. (36) of
63 : * \cite Wittek:2024gxn. For non-geodesic orbits, there are
64 : * additional contributions, see `acceleration_terms_0`.
65 : */
66 1 : void puncture_field_0(
67 : gsl::not_null<Variables<tmpl::list<
68 : CurvedScalarWave::Tags::Psi, ::Tags::dt<CurvedScalarWave::Tags::Psi>,
69 : ::Tags::deriv<CurvedScalarWave::Tags::Psi, tmpl::size_t<3>,
70 : Frame::Inertial>>>*>
71 : result,
72 : const tnsr::I<DataVector, 3, Frame::Inertial>& centered_coords,
73 : const tnsr::I<double, 3>& particle_position,
74 : const tnsr::I<double, 3>& particle_velocity,
75 : const tnsr::I<double, 3>& particle_acceleration, double bh_mass);
76 :
77 : /*!
78 : * \brief Computes the puncture/singular field \f$\Psi^\mathcal{P}\f$ of a
79 : * scalar charge on a generic orbit in Schwarzschild spacetime.
80 : * described in \cite Detweiler2003.
81 : *
82 : * \details For non-geodesic orbits, there are additional contributions, see
83 : * `acceleration_terms_0`.
84 : */
85 1 : void puncture_field_1(
86 : gsl::not_null<Variables<tmpl::list<
87 : CurvedScalarWave::Tags::Psi, ::Tags::dt<CurvedScalarWave::Tags::Psi>,
88 : ::Tags::deriv<CurvedScalarWave::Tags::Psi, tmpl::size_t<3>,
89 : Frame::Inertial>>>*>
90 : result,
91 : const tnsr::I<DataVector, 3, Frame::Inertial>& centered_coords,
92 : const tnsr::I<double, 3>& particle_position,
93 : const tnsr::I<double, 3>& particle_velocity,
94 : const tnsr::I<double, 3>& particle_acceleration, double bh_mass);
95 :
96 : /*!
97 : * \brief Computes the acceleration terms of a puncture/singular field
98 : * \f$\Psi^\mathcal{P}\f$ of a scalar charge on a generic orbit in Schwarzschild
99 : * spacetime up to zeroth order in coordinate distance.
100 : * \details The appropriate expression can be found in Eq. (37) of
101 : * \cite Wittek:2024gxn. The values ft, fx, fy are the time, x and y component
102 : * of the self force per unit mass evaluated at the position of the particle;
103 : * dt_ft, dt_fx, dt_fy are the respective total time derivatives. The code in
104 : * this function was auto-generated by generating the full expressions with
105 : * Mathematica and employing common subexpression elimination with sympy. The
106 : * mathematica file and generating script can be found at
107 : * https://github.com/nikwit/puncture-field.
108 : */
109 1 : void acceleration_terms_0(
110 : gsl::not_null<Variables<tmpl::list<
111 : CurvedScalarWave::Tags::Psi, ::Tags::dt<CurvedScalarWave::Tags::Psi>,
112 : ::Tags::deriv<CurvedScalarWave::Tags::Psi, tmpl::size_t<3>,
113 : Frame::Inertial>>>*>
114 : result,
115 : const tnsr::I<DataVector, 3, Frame::Inertial>& centered_coords,
116 : const tnsr::I<double, 3>& particle_position,
117 : const tnsr::I<double, 3>& particle_velocity,
118 : const tnsr::I<double, 3>& particle_acceleration, double ft, double fx,
119 : double fy, double dt_ft, double dt_fx, double dt_fy, double bh_mass);
120 :
121 : /*!
122 : * \brief Computes the acceleration terms of a puncture/singular field
123 : * \f$\Psi^\mathcal{P}\f$ of a scalar charge on a generic orbit in Schwarzschild
124 : * spacetime up to first order in coordinate distance (i.e. zeroth and first
125 : * order).
126 : * \details The appropriate expression can be found in Eq. (37) of
127 : * \cite Wittek:2024gxn. The values ft, fx, fy are the time, x and y component
128 : * of the self force per unit mass evaluated at the position of the particle;
129 : * dt_ft, dt_fx, dt_fy are the respective total time derivatives. The code in
130 : * this function was auto-generated by generating the full expressions with
131 : * Mathematica and employing common subexpression elimination with sympy. The
132 : * mathematica file and generating script can be found at
133 : * https://github.com/nikwit/puncture-field.
134 : *
135 : */
136 1 : void acceleration_terms_1(
137 : gsl::not_null<Variables<tmpl::list<
138 : CurvedScalarWave::Tags::Psi, ::Tags::dt<CurvedScalarWave::Tags::Psi>,
139 : ::Tags::deriv<CurvedScalarWave::Tags::Psi, tmpl::size_t<3>,
140 : Frame::Inertial>>>*>
141 : result,
142 : const tnsr::I<DataVector, 3, Frame::Inertial>& centered_coords,
143 : const tnsr::I<double, 3>& particle_position,
144 : const tnsr::I<double, 3>& particle_velocity,
145 : const tnsr::I<double, 3>& particle_acceleration, double ft, double fx,
146 : double fy, double dt_ft, double dt_fx, double dt_fy, double Du_ft,
147 : double Du_fx, double Du_fy, double dt_Du_ft, double dt_Du_fx,
148 : double dt_Du_fy, double bh_mass);
149 : } // namespace CurvedScalarWave::Worldtube
|