6
$\begingroup$

I would like to use an open source computer algebra system (CAS) for research in general relativity. Kindly suggest a good choice between Ipython and Sage. I am more interested in the theoretical aspect rather than numerical computations.

$\endgroup$

Before answering, please see our policy on resource recommendation questions. Please write substantial answers that detail the style, content, and prerequisites of the book, paper or other resource. Explain the nature of the resource so that readers can decide which one is best suited for them rather than relying on the opinions of others. Answers containing only a reference to a book or paper will be removed!

  • 6
    $\begingroup$ Are you aware of Cadabra? Also see its home page here and also this paper as a summary for tensor algebra in GR: Brewin, L.C., 2010, "A brief introduction to Cadabra: A tool for tensor computations in General Relativity", Computer Physics Communications [P], vol 181, Elsevier BV, Amsterdam Netherlands, pp. 489-498. It's written in C++ though, and I think its only interface is TeX. $\endgroup$ – WetSavannaAnimal Jan 18 '15 at 11:05
  • 1
    $\begingroup$ There is also Maxima/wxMaxima, which comes with tensor packages (I use ctensor a lot), andrejv.github.io/wxmaxima $\endgroup$ – m4r35n357 Jan 18 '15 at 16:52
  • 2
    $\begingroup$ "Symbolic and Numerical Analysis in General Relativity with Open Source Computer Algebra Systems" arxiv.org/abs/1703.09738 $\endgroup$ – Mafra Mar 30 '17 at 23:27
8
$\begingroup$

There are only two open source GR/tensor packages that I am aware of, Cadabra (coordinate-free) and Maxima/xwMaxima (coordinate based, ctensor, itensor and atensor packages)

$\endgroup$
  • 1
    $\begingroup$ Cadabra is no longer 'coordinate-free' only; you can also do component computations in explicit coordinates in the 2.x series. $\endgroup$ – Kasper Peeters Sep 22 '18 at 10:03
3
$\begingroup$

I would not recommend either of the choices you mentioned. If you have Mathematica, and your needs in general relativity are fairly basic (computing connections, curvature, geodesics), then I recommend using the notebooks from Hartle's text freely available here.


If your needs are more advanced, or you need something more capable, I would suggest using xAct and all its packages which include features such as,

  • Generic tensor manipulation
  • High order gravitational perturbation theory
  • Tensor spherical harmonics
  • Spinor computations in G.R.
  • Exterior calculus

I have used the packages several times for computations, and not only is xAct capable of many feats, it is also quite fast$^\dagger$ and very well-documented. Every package comes with examples as well and notebooks to help you get started. The only downside: there's a bit of a learning curve. However, the authors created a Google group/forum for users to help each other.


$\dagger$ I can attest to this given that I had to use it for computations in $d=26$.

$\endgroup$
  • 1
    $\begingroup$ The OP asked specifically for Open Source packages. $\endgroup$ – m4r35n357 Jan 18 '15 at 16:53
  • $\begingroup$ @m4r35n357 Both packages have Mathematica source code available. If by open source, you are referring to the fact that Mathematica itself is not open source, then you're right, but so what? The primary reason to want open source is to customize ones tools, and the packages allow one to do that, so there's no issue. Of course, there's also a moral reason to want open source, but that shouldn't enter into one's decisions in selecting tools for research in theoretical physics. $\endgroup$ – JamalS Jan 18 '15 at 20:04
  • 1
    $\begingroup$ The OP asked specifically for Open Source packages. There is no definition of open source that fits Mathematica add-ons. I can't use them, and most probably the OP can't either. Why else would he be asking for an open source package? $\endgroup$ – m4r35n357 Jan 18 '15 at 20:45
  • 1
    $\begingroup$ @m4r35n357 Do you realize SE answers aren't just for the OP, but for anyone that may be interested in the topic? $\endgroup$ – JamalS Jan 18 '15 at 20:49
  • 2
    $\begingroup$ "Open source" is becoming synonymous with "free." The primary reason to prefer such is because most researchers and universities don't have enough money to give everyone all the proprietary software they might ask for. Note that all science is done in collaboration, and there's no better way to annoy collaborators than to tell them they have to spend their own money to use the code you've written. $\endgroup$ – user10851 Jan 19 '15 at 0:04
2
$\begingroup$

Recently this paper came out on arXiv: Symbolic tensor calculus on manifolds: a SageMath implementation.

It describes how differentiable manifolds, vector and tensor fields classes are implemented in SageMath (via the SageManifold project) and how you can use them.

$\endgroup$
1
$\begingroup$

I have been developing a toolkit; spacetimeengine as a research tool. It is extremely lightweight but fully focused on General Relativity.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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