QNM Suite

Einstein.QNMSuite.continued_fraction_lentzMethod
continued_fraction_lentz([TF=Float64], a::Function, b::Function, tol::TF, min_iter::Integer, max_iter::Integer) where {TF<:AbstractFloat}

Compute the continued fraction

\[f(x)=b_0+\frac{a_1}{b_1+\frac{a_2}{b_2+\frac{a_3}{b_3+\frac{a_4}{b_4+\frac{a_5}{b_5+\cdots}}}}}\]

using modified Lentz's method. Translated from duetosymmetry/qnm.

Arguments

  • a: A function that returns the aᵢ terms.
  • b: A function that returns the bᵢ terms.
  • tol: The tolerance for convergence.
  • min_iter: The minimum number of iterations to perform.
  • max_iter: The maximum number of iterations to perform.

Returns

  • fᵢ: The value of the continued fraction.
  • errorᵢ: The estimated error.
  • i: The number of iterations performed.

Examples

Compute the square root of two using continued fractions

\[\sqrt{2} = 1 + \frac{1}{2 + \frac{1}{2 + \frac{1}{2 + \frac{1}{2 + \cdots}}}} \approx 1.414213562373095\]

a(i) = 1
b(i) = i == 0 ? 1 : 2
continued_fraction_lentz(Float64, a, b, 10*eps(Float64), 50, 1000)

Compute Golden Ratio

\[\phi = 1 + \frac{1}{1 + \frac{1}{1 + \frac{1}{1 + \cdots}}} \approx 1.618033988749895\]

a(i) = 1
b(i) = 1
continued_fraction_lentz(Float64, a, b, 10*eps(Float64), 50, 1000)

References

source
Einstein.QNMSuite.qnm_kerrMethod
qnm_kerr(a, s, l, m, ω_guess; kwargs...)

Find the Kerr QNM using Leaver's method for the radial equation and the Cook-Zalutskiy approach for the angular sector. We use the unit $M = G = c = 1$.

Arguments

  • a: Kerr parameter (dimensionless spin parameter, 0 ≤ |a| ≤ 1)
  • s: Spin weight of the field (±2 for gravitational perturbations, ±1 for electromagnetic perturbations, 0 for scalar perturbations)
  • l: Angular momentum quantum number (l ≥ |s|)
  • m: Azimuthal harmonic index (-l ≤ m ≤ l)
  • ω_guess: Initial guess for the QNM frequency

Keyword Arguments

  • n: Overtone number (default: 0 for fundamental mode)
  • A_guess: Initial guess for the angular separation constant (default: nothing)
  • poles: Vector of known poles to subtract from the continued fraction (default: empty)
  • l_max: Maximum angular momentum for angular eigenvalue calculation (default: l + 20)
  • cf_n_inv: Number of inverse terms in the continued fraction (default: 0)
  • cf_N_min: Minimum number of terms in the continued fraction (default: 300)
  • cf_N_max: Maximum number of terms in the continued fraction (default: 100000)
  • cf_tol: Tolerance for continued fraction convergence (default: machine epsilon)
  • nonlinear_algorithm: Algorithm for solving the nonlinear eigenvalue problem (default: RobustMultiNewton with AutoFiniteDiff)
  • angular_matrix_cache: Pre-allocated matrix for angular eigenvalue calculation (default: nothing)
  • kwargs...: Additional keyword arguments passed to the nonlinear solver

Returns

  • Complex{TF}: The complex QNM frequency $\omega$

Examples

a = 0.7
s = 2
l = 2
m = 2
n = 0
ω = 0.532600243551018 - 0.08079287315500766im
l_max = 20

ω_pert = ω + rand(Complex{Float64}) / 1000

ωsol = qnm_kerr(a, s, l, m, ω_pert; n=n, l_max=l_max)

Notes

  • The function uses a combination of Leaver's method for the radial equation and the Cook-Zalutskiy approach for the angular sector
  • The continued fraction method is used to solve the radial equation
  • The angular eigenvalue problem is solved using matrix eigenvalue methods
  • The function returns the complex frequency where the imaginary part is negative (damped modes)
source
Einstein.QNMSuite.qnm_kerr_radialMethod
qnm_kerr_radial(ctx::QNMKerrContext{TR,TI}, A::Complex{TR}, ω::Complex{TR}) where {TR<:AbstractFloat,TI<:Integer}

Calculate the radial function using the Leaver scheme [CZ14].

Arguments

  • ctx: QNMKerrContext object.
  • A::Complex{TR}: Angular separation constant.
  • ω::Complex{TR}: QNM frequency.

Returns

  • inv_cf::Complex{TR}: The inverse continued fraction.
  • error::TR: The error.
  • iter::Integer: The number of iterations.

Leaver scheme

\[\begin{aligned} & D_0=\delta=1+s+2 \xi \\ & D_1=4 p-2 \alpha+\gamma-\delta-2 \\ & D_2=2 \alpha-\gamma+2 \\ & D_3=\alpha(4 p-\delta)-\sigma, \\ & D_4=\alpha(\alpha-\gamma+1) \end{aligned}\]

\[\begin{aligned} \alpha_n & \equiv n^2+\left(D_0+1\right) n+D_0 \\ \beta_n & \equiv-2 n^2+\left(D_1+2\right) n+D_3 \\ \gamma_n & \equiv n^2+\left(D_2-3\right) n+D_4-D_2+2 \end{aligned}\]

The general continued fraction:

\[0=\beta_0-\frac{\alpha_0 \gamma_1}{\beta_1-} \frac{\alpha_1 \gamma_2}{\beta_2-} \frac{\alpha_2 \gamma_3}{\beta_3-} \ldots\]

The truncated version of the continued fraction:

\[\operatorname{Cf}(\mathrm{N}) \equiv \beta_0-\frac{\alpha_0 \gamma_1}{\beta_1-} \frac{\alpha_1 \gamma_2}{\beta_2-} \frac{\alpha_2 \gamma_3}{\beta_3-} \ldots \frac{\alpha_{\mathrm{N}-1} \gamma_{\mathrm{N}}}{\beta_{\mathrm{N}}+\alpha_{\mathrm{N}} \mathrm{r}_{\mathrm{N}}}\]

The nth inversion of this truncated continued fraction:

\[\begin{aligned} \operatorname{Cf}(\mathrm{n} ; \mathrm{N}) \equiv & \beta_n-\frac{\alpha_{n-1} \gamma_n}{\beta_{n-1}-} \frac{\alpha_{n-2} \gamma_{n-1}}{\beta_{n-2}-} \ldots \frac{\alpha_0 \gamma_1}{\beta_0} \\ & -\frac{\alpha_n \gamma_{n+1}}{\beta_{n+1}-} \frac{\alpha_{n+1} \gamma_{n+2}}{\beta_{n+2}-} \cdots \frac{\alpha_{N-1} \gamma_N}{\beta_N+\alpha_N r_N} \end{aligned}\]

with $\operatorname{Cf}(0 ; \mathrm{N}) \equiv \operatorname{Cf}(\mathrm{N})$ and $0 \leq n < N$

References

source
Einstein.QNMSuite.qnm_pep_companionMethod
A, E = qnm_pep_companion(TFC, pep::AbstractVector{<:AbstractMatrix}) where TFC <: Union{AbstractFloat, Complex{<:AbstractFloat}}

Linearizes a polynomial eigenvalue problem (PEP) and returns the companion form, as in the paper by Mehrmann and Voss. More precisely, for a k-th degree PEP with n-by-n coefficient matrices, this returns matrices A and E, both kn-by-kn, corresponding to the linearized problem

\[Ax = λEx\]

References

source
Einstein.QNMSuite.qnm_schw_expansion_dolan_ottewillMethod
qnm_schw_expansion_dolan_ottewill(::Type{TF}, s::TI, l::TI, n::TI) where {TF<:AbstractFloat,TI<:Integer}

Compute the high $\ell$ asymptotic expansion of Schwarzschild QNM frequency, using the method of Dolan and Ottewill [DO09].

The QNM frequency can be written as an expansion in inverse powers of $L=\ell+\frac{1}{2}$

\[\omega_{l n}=\varpi_{-1}^{(n)} L+\varpi_0^{(n)}+\varpi_1^{(n)} L^{-1}+\varpi_2^{(n)} L^{-2}+\ldots\]

The lowest expansion coefficients for arbitrary spin $\beta=1-s^2$ and arbitrary overtone number $n$ are given by

\[\begin{aligned} & \sqrt{27} \varpi_{-1}^{(n)}=1 \\ & \sqrt{27} \varpi_0^{(n)}=-i N \\ & \sqrt{27} \varpi_1^{(n)}=\frac{\beta}{3}-\frac{5 N^2}{36}-\frac{115}{432} \\ & \sqrt{27} \varpi_2^{(n)}=-i N\left[\frac{\beta}{9}+\frac{235 N^2}{3888}-\frac{1415}{15552}\right] \\ & \sqrt{27} \varpi_3^{(n)}=-\frac{\beta^2}{27}+\frac{204 N^2+211}{3888} \beta+\frac{854160 N^4-1664760 N^2-776939}{40310784} \\ & \sqrt{27} \varpi_4^{(n)}=i N\left[\frac{\beta^2}{27}+\frac{1100 N^2-2719}{46656} \beta+\frac{11273136 N^4-52753800 N^2+66480535}{2902376448}\right] \end{aligned}\]

Arguments

  • TF: Type of the floating-point number.
  • s: Spin weight of the field of interest.
  • l: Multipole number of interest.
  • n: Overtone number of interest.

References

source