-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Event horizons and Johannsen Psaltis (2011) metric (#41)
* added a function for plotting event horizons * added Johannsen-Psaltis metric * minimal docstring for JP metric * updated docs with new metric and examples * bump version
- Loading branch information
Showing
13 changed files
with
227 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "Gradus" | ||
uuid = "c5b7b928-ea15-451c-ad6f-a331a0f3e4b7" | ||
authors = ["fjebaker <[email protected]>"] | ||
version = "0.1.5" | ||
version = "0.1.6" | ||
|
||
[deps] | ||
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
Gradus = "c5b7b928-ea15-451c-ad6f-a331a0f3e4b7" | ||
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" | ||
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" | ||
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,5 @@ isco | |
r_ph | ||
r_mb | ||
r_s | ||
Gradus.event_horizon | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
module __JohannsenPsaltisAD | ||
using ..StaticArrays | ||
|
||
@inline h(r, M, ϵ3, Σ) = ϵ3 * M^3 * r / Σ^2 | ||
@inline Σ(r, a, θ) = r^2 + a^2 * cos(θ)^2 | ||
@inline Δ(r, M, a) = r^2 - 2M * r + a^2 | ||
|
||
@fastmath function metric_components(M, a, ϵ3, rθ) | ||
(r, θ) = rθ | ||
|
||
Σ₀ = Σ(r, a, θ) | ||
h₀ = h(r, M, ϵ3, Σ₀) | ||
sinθ2 = sin(θ)^2 | ||
|
||
tt = -(1 + h₀) * (1 - 2M * r / Σ₀) | ||
rr = Σ₀ * (1 + h₀) / (Δ(r, M, a) + a^2 * sinθ2 * h₀) | ||
θθ = Σ₀ | ||
|
||
term1 = sinθ2 * (r^2 + a^2 + 2a^2 * M * r * sinθ2 / Σ₀) | ||
term2 = h₀ * a^2 * (Σ₀ + 2M * r) * sinθ2^2 / Σ₀ | ||
ϕϕ = term1 + term2 | ||
|
||
tϕ = -2a * M * r * sinθ2 * (1 + h₀) / Σ₀ | ||
|
||
@SVector [tt, rr, θθ, ϕϕ, tϕ] | ||
end | ||
|
||
end # module | ||
|
||
""" | ||
struct JohannsenPsaltisAD{T} <: AbstractAutoDiffStaticAxisSymmetricParams{T} | ||
Johannsen and Psaltis 2011 | ||
$(FIELDS) | ||
""" | ||
@with_kw struct JohannsenPsaltisAD{T} <: AbstractAutoDiffStaticAxisSymmetricParams{T} | ||
@deftype T | ||
"Black hole mass." | ||
M = 1.0 | ||
"Black hole spin." | ||
a = 0.0 | ||
"``\\epsilon_{3}`` deviation parameter." | ||
ϵ3 = 0.0 | ||
end | ||
|
||
GeodesicTracer.metric_components(m::JohannsenPsaltisAD{T}, rθ) where {T} = | ||
__JohannsenPsaltisAD.metric_components(m.M, m.a, m.ϵ3, rθ) | ||
GradusBase.inner_radius(m::JohannsenPsaltisAD{T}) where {T} = m.M + √(m.M^2 - m.a^2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
include("boyer-lindquist-ad.jl") | ||
include("boyer-lindquist-fo.jl") | ||
include("johannsen-ad.jl") | ||
include("johannsen-psaltis-ad.jl") | ||
include("morris-thorne-ad.jl") | ||
include("kerr-refractive-ad.jl") | ||
include("dilaton-axion-ad.jl") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters