Group Abstract Group Abstract

Message Boards Message Boards

Mathematica for General Relativity and Gravity research

GROUPS:
Dear community members,

I'm currently try to use Wolfram Mathematica to some gravity research. But i can't find built-in methods do differential geometry calculations in Mathematica.
For example, is there any way to compute Einstein or Ricci tensor by metric? Or something more complicate, like create manifold, some medium with fixed state equation and write Einstein equations for this system?

Thanks,

Boris Latosh
POSTED BY: Boris Latosh
Answer
5 months ago
There are some old Mathematica (v 4) notebooks for doing GR at this link:

http://web.physics.ucsb.edu/~gravitybook/mathematica.html

I've updated and run one of them myself and it worked fine,
working from the pdf version.  It may be possible to run the notebook itself
but I didn't try that.
POSTED BY: Frank Kampas
Answer
5 months ago
How does one work from a pdf version?
POSTED BY: Douglas Youvan
Answer
5 months ago
You might want to have a look at this:

http://www.wolfram.com/books/profile.cgi?id=7182

M.
POSTED BY: Marco Thiel
Answer
5 months ago
Great! Thank to everybody! This will do for beginning!
POSTED BY: Boris Latosh
Answer
5 months ago
Please take a look at the new Symbolic Tensors functionality introduced in version 9. Specifically:
To get started with basic examples read through this page: TensorProduct
POSTED BY: Sam Carrettie
Answer
5 months ago
I looked at the TensorProduct page and didn't see a component-based definition of TensorProduct.
POSTED BY: Frank Kampas
Answer
5 months ago
You may want to look through this thread on Mathematica StackExchange:

http://mathematica.stackexchange.com/questions/8895/how-to-calculate-scalar-curvature-ricci-tensor-and-christoffel-symbols-in-mathem/

which has material that may help you get going (as well as having some additional possibly useful links)
POSTED BY: David Reiss
Answer
5 months ago
I did not need this type of functionality in the past, so unfortunately I cannot tell you which packages are the most useful.

But you'll find a list of tensor-related packages here on Mathematica.SE.

The list can be edited by the public wiki-style, so if you put some time into trying one of these packages, you can add a paragraph to the wiki post describing your experiences.
POSTED BY: Szabolcs Horvat
Answer
5 months ago
Here's my rewrite of one of the notebooks at http://web.physics.ucsb.edu/~gravitybook/mathematica.html.
 rewritten from http://web.physics.ucsb.edu/~gravitybook/math/curvature.pdf
 
 In[5]:= n = 4;
 
 In[6]:= coord = {r, \[Theta], \[Phi], t};
 
 In[8]:= metric = DiagonalMatrix[{(1 - 2 m/r)^-1, r^2, r^2 Sin[\[Theta]]^2,
     2 m/r - 1}];
 
In[10]:= inversemetric = Simplify @ Inverse[metric];

In[12]:= affine = Simplify @
   Table[1/2 Sum[
      inversemetric[[i,
        s]]*(D[metric[[s, j]], coord[[k]]] + D[metric[[s, k]], coord[[j]]] -
         D[metric[[j, k]], coord[[s]]]), {s, n}], {i, n}, {j, n}, {k, n}];

In[14]:= riemann = Simplify @
   Table[D[affine[[i, j, l]], coord[[k]]] - D[affine[[i, j, k]], coord[[l]]] +
      Sum[affine[[s, j, l]] affine[[i, k, s]] -
       affine[[s, j, k]] affine[[i, l, s]], {s, n}], {i, n}, {j, n}, {k,
     n}, {l, n}];

In[15]:= ricci = Simplify @ Table[Sum[riemann[[i, j, i, l]], {i, n}], {j, n}, {l, n}]

Out[15]= {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}

In[16]:= scalar = Simplify[Sum[inversemetric[[i, j]] ricci[[i, j]], {i, n}, {j, n}]]

Out[16]= 0

In[17]:= einstein = ricci - 1/2 scalar*metric

Out[17]= {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}
It shows that the Schwarzschild metric satisifes the Einstein equation.  I didn't show the components of the 3rd and 4th rank tensors here.
POSTED BY: Frank Kampas
Answer
5 months ago