Skip to content

Commit

Permalink
Merge pull request #211 from astro-group-bristol/fergus/emda-fixes
Browse files Browse the repository at this point in the history
Fix: missing factor 2 in EMDA metric
  • Loading branch information
fjebaker authored Oct 15, 2024
2 parents d3cf2be + 0a96a29 commit f91ed83
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
14 changes: 8 additions & 6 deletions src/metrics/dilaton-axion-ad.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ A(a, θ, δ, W, Δhat) = δ^2 - Δhat * (W * a * sin(θ))^2
R = M

# check these for the normalisation term R
βb = β / b
βa = β / a
βab = β / (a * b)
βb = β == zero(β) ? zero(β) : β / b
βa = β == zero(β) ? zero(β) : β / a
βab = β == zero(β) ? zero(β) : β / (a * b)

Σ₀ = Σ(r, a, θ)
Δ₀ = Δ(r, R, a)
Δ₀ = Δ(r, 2R, a)
Δhat₀ = Δhat(Δ₀, β, b, r, βb, R)
Σhat₀ = Σhat(Σ₀, β, b, r, βb, a, θ, R)
δ₀ = δ(r, b, a)
Expand Down Expand Up @@ -68,7 +68,9 @@ end

metric_components(m::DilatonAxion{T}, rθ) where {T} =
__DilatonAxionAD.metric_components(m.M, m.a, m.β, m.b, rθ)
inner_radius(m::DilatonAxion{T}) where {T} =
m.M + m.b + ((m.M + m.b)^2 - m.a^2 + m.β^2 - (m.M - 2m.b) * m.M * (m.β / m.b)^2)
function inner_radius(m::DilatonAxion{T}) where {T}
βb = m.β == zero(m.β) ? zero(m.β) : m.β / m.b
m.M + m.b + ((m.M + m.b)^2 - m.a^2 + m.β^2 - (m.M - 2m.b) * m.M * βb^2)
end

export DilatonAxion
6 changes: 5 additions & 1 deletion test/smoke-tests/special-radii.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ using StaticArrays
JohannsenMetric(M = 1.0, a = 0.998, α13 = 1.0),
JohannsenMetric(M = 1.0, a = 0.998, α22 = 1.0),
DilatonAxion(M = 1.0, a = 0.6, β = -0.5, b = 0.1),
KerrMetric(M = 1.0, a = 0.0),
DilatonAxion(M = 1.0, a = 0.0, b = 0.0, β = 0.0),
)

@testset "iscos" begin
Expand All @@ -26,7 +28,9 @@ using StaticArrays
8.99437445480357,
2.8482863127671534,
1.1306596884484472,
32.95283734688169,
29.701502242023523,
6.00000000,
6.00000000,
],
)
isco_r = Gradus.isco(m)
Expand Down

0 comments on commit f91ed83

Please sign in to comment.