TensoriaCalc

Welcome!

This page hosts my Mathematica package TensoriaCalc, which tackles (semi-)Riemannian tensor calculus problems encountered in general relativity, cosmology, and field theory. Currently, it calculates geometric objects - Christoffel symbols, the Riemann curvature tensor, Ricci tensor and scalar, etc. - given a metric and the relevant coordinates; and performs basic operations such as covariant derivatives of tensors.  Development is ongoing, and is expected to continue for the foreseeable future.

TensoriaCalc was the outgrowth of tensorial calculations I performed during my own theoretical physics research. It also parallels a closely related effort to develop an abstract tensor manipulation package similar to xAct, but also allowing for concrete computations such as the ones peformed by TensoriaCalc.

This package is certainly not the first, and probably won't be the last, of such tensor calculation packages. While it does not contain many sophisticated features yet, what distinguishes it from the rest of the free packages currently available is, I have tried to maintain a consistency with the Mathematica language itself. Provided one is already comfortable with Mathematica, this consistency translates into an ease of use. For example, there is never a need to "load" a metric, nor is there some very particular way to enter one. In TensoriaCalc, a metric is defined by simply feeding the function Metric a List of coordinates used, and either the usual quadratic form of coordinate differentials or a square matrix representing the metric components themselves. Multiple geometries can be defined readily without conflict. Moreover, the expert Mathematica programmer will find it easy to build on (or modify) the code for her/his own tensorial calculations.

Please do feel free to use and/or modify this code, but only for the purposes of scientific research. If you do so, I only ask that you cite the URL of this webpage in your publication(s), and also drop me a note. Definitely write to me if you find any bugs! Of course, questions, comments, suggestions, etc., are most welcomed too.

Updates and bugs fix history can be found in the last section of the TensoriaCalc.nb notebook, which can be downloaded below.


TensoriaCalc Code

Follow these two steps to get TensoriaCalc up and running. Note that I wrote this package in Mathematica 8/9/10, and have tested it on my Windows 7 machine.
  • TensoriaCalc    First download the .nb file below. Open it in Mathematica and Save the file. This will create a TensoriaCalc.m file which can be loaded directly from any Mathematica session.
  • TensoriaCalc User's Guide (May 2016: this guide is rather dated.)    Next, download the User's Guide to get yourself familiar with the main features of TensoriaCalc. In it, I walk you through the primary functions in the package via concrete examples and lots of comments embedded in the Mathematica code itself.
Acknowledgements

While developing this code, I have taken inspiration from the following: FeynCalcgrt, and xAct.

Future developments

As of December 2011, I have also written TensoriaLite, which is an abstract tensor manipulation package containing some basic FeynCalc-like features -- for instance, it is able to compute the N-graviton Feynman rules for the Einstein-Hilbert lagrangian. I hope to release it at some point, so stay tuned! The long term goal is to combine it with TensoriaCalc (and call the unified package Tensoria), but that may have to wait until I get a more stable job than a postdoc... ;-)