From 217062c9c135a545398773687fdae55a9f3deaac Mon Sep 17 00:00:00 2001 From: Eric Gourgoulhon Date: Tue, 7 May 2024 17:34:00 +0200 Subject: [PATCH 1/2] Fix sign error in the Kerr metric of the manifold catalog --- src/sage/manifolds/catalog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/manifolds/catalog.py b/src/sage/manifolds/catalog.py index bb09ed8885d..039a76ccee6 100644 --- a/src/sage/manifolds/catalog.py +++ b/src/sage/manifolds/catalog.py @@ -129,10 +129,10 @@ def Kerr(m=1, a=0, coordinates="BL", names=None): [Chart (M, (t, r, th, ph))] sage: K.metric().display() g = (2*m*r/(a^2*cos(th)^2 + r^2) - 1) dt⊗dt - + 2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) dt⊗dph + - 2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) dt⊗dph + (a^2*cos(th)^2 + r^2)/(a^2 - 2*m*r + r^2) dr⊗dr + (a^2*cos(th)^2 + r^2) dth⊗dth - + 2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) dph⊗dt + - 2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) dph⊗dt + (2*a^2*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) + a^2 + r^2)*sin(th)^2 dph⊗dph sage: K. = manifolds.Kerr() @@ -205,7 +205,7 @@ def Kerr(m=1, a=0, coordinates="BL", names=None): g[0, 0], g[1, 1], g[2, 2], g[3, 3] = -(1-2*m*r/rho**2), \ rho**2/(r**2-2*m*r+a**2), rho**2, \ (r**2+a**2+2*m*r*a**2/rho**2*sin(th)**2)*sin(th)**2 - g[0, 3] = 2*m*r*a*sin(th)**2/rho**2 + g[0, 3] = -2*m*r*a*sin(th)**2/rho**2 return M raise NotImplementedError("coordinates system not implemented, see help" From 5731edb1d0ef0998874a79d800406a8587032b34 Mon Sep 17 00:00:00 2001 From: Eric Gourgoulhon Date: Thu, 9 May 2024 16:31:40 +0200 Subject: [PATCH 2/2] Add comments in the Kerr doctests --- src/sage/manifolds/catalog.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sage/manifolds/catalog.py b/src/sage/manifolds/catalog.py index 039a76ccee6..91b0997de7b 100644 --- a/src/sage/manifolds/catalog.py +++ b/src/sage/manifolds/catalog.py @@ -127,6 +127,9 @@ def Kerr(m=1, a=0, coordinates="BL", names=None): 4-dimensional Lorentzian manifold M sage: K.atlas() [Chart (M, (t, r, th, ph))] + + The Kerr metric in Boyer-Lindquist coordinates (cf. :wikipedia:`Kerr_metric`):: + sage: K.metric().display() g = (2*m*r/(a^2*cos(th)^2 + r^2) - 1) dt⊗dt - 2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) dt⊗dph @@ -135,6 +138,8 @@ def Kerr(m=1, a=0, coordinates="BL", names=None): - 2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) dph⊗dt + (2*a^2*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) + a^2 + r^2)*sin(th)^2 dph⊗dph + The Schwarzschild spacetime with the mass parameter set to 1:: + sage: K. = manifolds.Kerr() sage: K 4-dimensional Lorentzian manifold M @@ -144,6 +149,9 @@ def Kerr(m=1, a=0, coordinates="BL", names=None): sage: K.default_chart().coord_range() t: (-oo, +oo); r: (0, +oo); th: (0, pi); ph: [-pi, pi] (periodic) + + The Kerr spacetime in Kerr coordinates:: + sage: m, a = var('m, a') sage: K. = manifolds.Kerr(m, a, coordinates="Kerr") sage: K