Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : namespace CurvedScalarWave::Worldtube {
7 :
8 : namespace detail {
9 :
10 : void check_alpha(double alpha);
11 :
12 : void check_delta(double delta);
13 : } // namespace detail
14 :
15 : /*!
16 : * \brief A smoothly broken power law that falls off to a constant value
17 : * for larger radii.
18 : *
19 : * \details The function is given by Eq. (3) of \cite Wittek:2024pis
20 : *
21 : * \begin{equation}
22 : * f(r) = R_\infty \left(\frac{r}{r_b}\right)^{\alpha} \left( 1 +
23 : * \left(\frac{r}{r_b}\right)^{1 / \Delta}\right)^{-\alpha\Delta}.
24 : * \end{equation}
25 : *
26 : * For radii $r \ll r_b$, the function obeys the power law $f(r) \propto
27 : * r^{\alpha}$. For radii $r \gg r_b$, the function asymptotes to $R_\infty$.
28 : * The parameter $\Delta$ determines the width of the transition region with a
29 : * larger value of $\Delta$ leading to a more gradual transition.
30 : *
31 : * This function is used to control the worldtube radius for more eccentric
32 : * orbits so the radius does not grow too large during the apoapsis passage
33 : * as this does not lead to performance gains and can cause problems with the
34 : * domain.
35 : */
36 1 : double smooth_broken_power_law(double orbit_radius, double alpha,
37 : double radius_at_inf, double rb, double delta);
38 : /*!
39 : * \brief Returns the analytical derivative of `smooth_broken_power_law`.
40 : */
41 1 : double smooth_broken_power_law_derivative(double orbit_radius, double alpha,
42 : double radius_at_inf, double rb,
43 : double delta);
44 : } // namespace CurvedScalarWave::Worldtube
|