Manifolds Catalog

A catalog of manifolds to rapidly create various simple manifolds.

The current entries to the catalog are obtained by typing manifolds.<tab>, where <tab> indicates pressing the tab key. They are:

AUTHORS:

  • Florentin Jaffredo (2018) : initial version
sage.manifolds.catalog.Kerr(m=1, a=0, coordinates='BL', names=None)

Generate a Kerr spacetime.

A Kerr spacetime is a 4 dimensional manifold describing a rotating black hole. Two coordinate systems are implemented: Boyer-Lindquist and Kerr (3+1 version).

The shortcut operator .<,> can be used to specify the coordinates.

INPUT:

  • m – (default: 1) mass of the black hole in natural units (\(c=1\), \(G=1\))
  • a – (default: 0) angular momentum in natural units; if set to 0, the resulting spacetime corresponds to a Schwarzschild black hole
  • coordinates – (default: "BL") either "BL" for Boyer-Lindquist coordinates or "Kerr" for Kerr coordinates (3+1 version)
  • names – (default: None) name of the coordinates, automatically set by the shortcut operator

OUTPUT:

  • Lorentzian manifold

EXAMPLES:

sage: m, a = var('m, a')
sage: K = manifolds.Kerr(m, a)
sage: K
4-dimensional Lorentzian manifold M
sage: K.atlas()
[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
 + (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^2*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) + a^2 + r^2)*sin(th)^2 dph*dph

sage: K.<t, r, th, ph> = manifolds.Kerr()
sage: K
4-dimensional Lorentzian manifold M
sage: K.metric().display()
g = (2/r - 1) dt*dt + r^2/(r^2 - 2*r) dr*dr
 + r^2 dth*dth + r^2*sin(th)^2 dph*dph
sage: K.default_chart().coord_range()
t: (-oo, +oo); r: (0, +oo); th: (0, pi); ph: [-pi, pi] (periodic)

sage: m, a = var('m, a')
sage: K.<t, r, th, ph> = manifolds.Kerr(m, a, coordinates="Kerr")
sage: K
4-dimensional Lorentzian manifold M
sage: K.atlas()
[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*m*r/(a^2*cos(th)^2 + r^2) dt*dr
 - 2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) dt*dph
 + 2*m*r/(a^2*cos(th)^2 + r^2) dr*dt
 + (2*m*r/(a^2*cos(th)^2 + r^2) + 1) dr*dr
 - a*(2*m*r/(a^2*cos(th)^2 + r^2) + 1)*sin(th)^2 dr*dph
 + (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
 - a*(2*m*r/(a^2*cos(th)^2 + r^2) + 1)*sin(th)^2 dph*dr
 + (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.default_chart().coord_range()
t: (-oo, +oo); r: (0, +oo); th: (0, pi); ph: [-pi, pi] (periodic)
sage.manifolds.catalog.Minkowski(positive_spacelike=True, names=None)

Generate a Minkowski space of dimension 4.

By default the signature is set to \((- + + +)\), but can be changed to \((+ - - -)\) by setting the optionnal argument positive_spacelike to False. The shortcut operator .<,> can be used to specify the coordinates.

INPUT:

  • positive_spacelike – (default: True) if False, then the spacelike vectors yield a negative sign (i.e., the signature is \((+ - - - )\))
  • names – (default: None) name of the coordinates, automatically set by the shortcut operator

OUTPUT:

  • Lorentzian manifold of dimension 4 with (flat) Minkowskian metric

EXAMPLES:

sage: M.<t, x, y, z> = manifolds.Minkowski()
sage: M.metric()[:]
[-1  0  0  0]
[ 0  1  0  0]
[ 0  0  1  0]
[ 0  0  0  1]

sage: M.<t, x, y, z> = manifolds.Minkowski(False)
sage: M.metric()[:]
[ 1  0  0  0]
[ 0 -1  0  0]
[ 0  0 -1  0]
[ 0  0  0 -1]
sage.manifolds.catalog.Sphere(dim=None, radius=1, names=None, stereo2d=False, stereo_lim=None)

Generate a sphere embedded in Euclidean space.

The shortcut operator .<,> can be used to specify the coordinates.

INPUT:

  • dim – (optional) the dimension of the sphere; if not specified, equals to the number of coordinate names
  • radius – (default: 1) radius of the sphere
  • names – (default: None) name of the coordinates, automatically set by the shortcut operator
  • stereo2d – (default: False) if True, defines only the stereographic charts, only implemented in 2d
  • stereo_lim – (default: None) parameter used to restrict the span of the stereographic charts, so that they don’t cover the whole sphere; valid domain will be x**2 + y**2 < stereo_lim**2

OUTPUT:

  • Riemannian manifold

EXAMPLES:

sage: S.<th, ph> = manifolds.Sphere()
sage: S
2-dimensional Riemannian submanifold S embedded in the Euclidean
 space E^3
sage: S.atlas()
[Chart (S, (th, ph))]
sage: S.metric().display()
gamma = dth*dth + sin(th)^2 dph*dph

sage: S = manifolds.Sphere(2, stereo2d=True)  # long time
sage: S  # long time
2-dimensional Riemannian submanifold S embedded in the Euclidean
 space E^3
sage: S.metric().display()  # long time
gamma = 4/(x^4 + y^4 + 2*(x^2 + 1)*y^2 + 2*x^2 + 1) dx*dx
 + 4/(x^4 + y^4 + 2*(x^2 + 1)*y^2 + 2*x^2 + 1) dy*dy
sage.manifolds.catalog.Torus(R=2, r=1, names=None)

Generate a 2-dimensional torus embedded in Euclidean space.

The shortcut operator .<,> can be used to specify the coordinates.

INPUT:

  • R – (default: 2) distance form the center to the center of the tube
  • r – (default: 1) radius of the tube
  • names – (default: None) name of the coordinates, automatically set by the shortcut operator

OUTPUT:

  • Riemannian manifold

EXAMPLES:

sage: T.<theta, phi> = manifolds.Torus(3, 1)
sage: T
2-dimensional Riemannian submanifold T embedded in the Euclidean
 space E^3
sage: T.atlas()
[Chart (T, (theta, phi))]
sage: T.embedding().display()
T --> E^3
   (theta, phi) |--> (X, Y, Z) = ((cos(theta) + 3)*cos(phi),
                                  (cos(theta) + 3)*sin(phi),
                                  sin(theta))
sage: T.metric().display()
gamma = dtheta*dtheta + (cos(theta)^2 + 6*cos(theta) + 9) dphi*dphi