moble / PostNewtonian.jl

Orbital dynamics and waveforms for binary black-hole systems, in the post-Newtonian approximation
MIT License
13 stars 0 forks source link

Automatic PN order tracking #49

Closed moble closed 2 months ago

moble commented 3 months ago

I think that it would be much more robust to explicitly include the factors of $1/c$ in all PN expressions, and use them to count the PN order, since that is how PN order is actually defined:

This parameter represents essentially a slow motion estimate $𝜖 ∼ 𝑣/𝑐$, where $𝑣$ denotes a typical internal velocity. By a slight abuse of notation, following Chandrasekhar et al. ..., we shall henceforth write formally $𝜖 ≡ 1/𝑐$, even though $𝜖$ is dimensionless whereas $𝑐$ has the dimension of a velocity. Thus, $1/𝑐 ≪ 1$ in the case of post-Newtonian sources. The small post-Newtonian remainders will be denoted $𝒪(1/𝑐^𝑛)$. Furthermore, ... we shall refer to a small post-Newtonian term with formal order $𝒪(1/𝑐^𝑛)$ relative to the Newtonian acceleration in the equations of motion, as $\frac{𝑛}{2}\text{PN}$.

[Blanchet (2014)]

This would also allow us to use expression that aren't just in $v$, but also in $x$ or even $\gamma$. This could also serve as the mechanism behind computing TaylorT4/T5.

The mechanism I propose is to define $c$ to be an object much like Symbolics. Num or FastDifferentiation.Node (and maybe actually so) that can be multiplied by other numbers, keeping track of the product of the other numbers and the power of $1/c$ in any term. Once PNOrder is known, any power greater than (twice) that number will be set to 0; any lower power will be set to 1. This would be not unlike how TaylorSeries.jl works.

I'm not sure exactly how this would best work. It might require defining

  1. the c object and its products / ratios with other numbers
  2. a Product containing other numbers and $1/c^n$, which can also be multiplied/divided by c, other numbers, or Products.
  3. a Sum containing a series of Products, which can also be multiplied/divided by c, other numbers, Products, or Sums.

Note that I've already done a lot of the work for TaylorT4/T5 in src/utilities/truncated_series_monoid.jl.