I am working on a computational project about General Relativity. In this process, I want to code 'the stuff' that can be derivable from the metric tensor. So far, I have coded Riemann Tensor, Weyl Tensor, Einstein Tensors, Ricci Tensor, Ricci scalar. What are the other essential/needed quantities in the GR calculations that can be coded?

Some notes to answer the comments:

  1. It's not precisely numerical. I will not solve the Einstein field equations for a given energy stress-energy tensor etc.
  2. The program's purpose is to obtain possible mathematical objects that belong to GR (tensors, etc.) If the user only knows metric tensor and nothing else.
  3. I am using / will use python to calculate these things. It's also kind of a relativistic tool, yes.
  • 2
    $\begingroup$ If it is numerical you need the numerical relativity book, as it is not as straightforward as applying a scheme to a PDE. $\endgroup$ – JamalS May 12 at 21:47
  • 1
    $\begingroup$ What exactly is the application that you're coding for? I think this question is very difficult to answer, because there's a big question mark of "what is the purpose of this program?" Numerically solving GR in an initaial boundary problem is very different from finding the geodesics of a particular spacetime, which is ALSO different from trying to do something like semiclassical gravity on a fixed background, and that is different from trying to create a computer image of what a black hole would look like. $\endgroup$ – Jerry Schirmer May 12 at 22:13
  • 1
    $\begingroup$ Or is this just a "general purpose tool for relativists to use," and it's more an excirsise for you to repllicate the functions of one of the Maple or Mathematica packagess discussed below? $\endgroup$ – Jerry Schirmer May 12 at 22:14
  • 1
    $\begingroup$ @JerrySchirmer I answered some of your questions in the op. $\endgroup$ – SeVenVo1d May 13 at 9:39

I think you know you have a hard job ahead of you. Wishing you success. In order to know the things that physicists need in this area, I would recommend you first see these two packages: xAct (in Wolfram Mathematica) and GRtensor (in Maple). These are really great. Here I summarize some of the most important things (with appropriate links) that come to my mind:

  1. Many essential operations in GR including Covariant derivative, Lie derivative, etc (you can find these in any GR textbook's index part)

  2. Einstein's field equations in flat, de Sitter and anti-de Sitter backgrounds

  3. Geodesic deviation equation and related topics

  4. Hawking radiation (related to the surface gravity)

  5. A code for computing Unruh temperature for accelerating Observer.

  6. Frame dragging

  7. Bekenstein-Hawking entropy formula

  8. Wald entropy (for higher derivative gravity models)

  9. A code for testing Killing vectors

  10. Perhaps some codes for computing Komar mass or ADM mass.

  11. Kretschmann scalar

  12. Christoffel symbols


And, a number of important metrics/coordinates in GR and Cosmology such as

  1. Schwarzschild spacetime metric

  2. Kruskal–Szekeres coordinates

  3. Eddington–Finkelstein coordinates

  4. Kerr spacetime metric

  5. Boyer-Lindquist coordinates (for Kerr spacetime)

  6. Kerr-Newman spacetime metric

  7. Friedmann–Lemaître–Robertson–Walker metric

. . .

For this purpose, I think the "Catalogue of Spacetimes" by Mueller & Grave can help you a lot about this. In this book we read:

The aim of the catalogue is to give a quick reference for students who need some basic facts of the most well-known spacetimes in GR.

In addition, I highly recommend you to search in this site (nLab).

Finally, according to your edit, I have three suggestions:

i) It would be nice if you could define the most commonly used metrics by default in your program (see items 13-19, please).

ii) It would be nice if you consider the possibility of defining metrics in dimensions higher or lower than 4 dimensions (they are very important from different aspects). This feature will increase the usefulness and also the number of users of your program. Some examples of lower/higher dimensional black hole spacetimes are

  1. BTZ black hole metric (in 3 dimensions)

  2. Charged rotating BTZ black hole metric (in 3 dimensions)

  3. Higher dimensional Kerr black hole


iii) It would be nice if you provide a graphical environment (if possible) for your program, in which users can obtain a desired property for their metric by a click. In fact, sometimes it is not easy for undergraduate or even some of graduate students to work with those packages (GRtensor/xAct) and such a program will be useful. For example, see this handy calculator for Hawking radiation of static black holes, which is useful and easy to work (by Viktor Toth, a member here).

Good luck

  • 1
    $\begingroup$ Thanks a lot :) Its a personal-project and I ll try to do my best as I can to do some stuff. I ll definitly try to implement your suggestions, as best I can. For more information about the purpose of the program you can look the op. $\endgroup$ – SeVenVo1d May 13 at 9:43
  • 1
    $\begingroup$ Dear @Free, according to your edit, I added three suggestions. Cheers $\endgroup$ – SG8 May 14 at 10:23
  • 1
    $\begingroup$ Thanks a lot. So far, I have done 11-12 and ii) I am also thinking to add i) and iii) which I think would be great. The only problem is that python sometimes cannot simplify (or I could not find how to do it.) complex mathematical expressions. So that's a bit problematic. I'll also add the essential metrics to the program. Between 1-10, I am not sure I can add them all, but probably I can do some of them. $\endgroup$ – SeVenVo1d May 14 at 19:07
  • 1
    $\begingroup$ I have created the GitHub page. Anyone who would like to use the program can try it... Here is the link github.com/seVenVo1d/General-Relativity-Tensor-Calculations $\endgroup$ – SeVenVo1d May 14 at 19:07
  • 1
    $\begingroup$ I did it :p I think it's really great. You guys can check it out. $\endgroup$ – SeVenVo1d May 19 at 19:34
  • Metric $ds^2$ in Cartesian/Spherical/... coordinates
  • Inverse of the metric
  • Angle between $d^{(1)}x^{\alpha}$ and $d^{(2)}x^{\alpha}$
  • Christoffel symbols
  • Geodesic equations
  • Geodesic equations in Newtonian limit
  • Components of generalized momentum
  • Riemann tensor
  • Ricci tensor
  • Traceless Ricci tensor
  • Ricci scalar
  • Einstein tensor
  • Weyl tensor
  • Some of the identities (e.g Bianchi) and properties
  • $\begingroup$ thanks for you answer. I did most of those but I'll definitly try the others $\endgroup$ – SeVenVo1d May 13 at 9:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.