Computational General Relativity

Click For Summary

Discussion Overview

The discussion revolves around the development and evaluation of a program designed to compute the Einstein Tensor, specifically the Riemann and Ricci Tensors, in the context of General Relativity. Participants share their experiences with different computational tools and software, express their opinions on the effectiveness of the original program, and suggest alternatives for handling complex algebraic expressions.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes their program for computing the Ricci Tensor and expresses a desire for feedback and improvements, noting its success in deriving the Schwarzschild solution.
  • Another participant suggests using Maxima with wxMaxima for its capabilities in handling complex algebraic expressions and generating LaTeX outputs.
  • A question is raised about the use of Maxima and its ctensor package, indicating interest in its features.
  • One participant recommends testing the software by transforming the Minkowski space metric into unusual coordinates to verify the output of the Riemann tensor.
  • Several participants mention using Mathematica for similar computations, highlighting its effectiveness but also noting the cumbersome nature of evaluating tensors for even simple cases.
  • There is a request for pricing information when recommending software like Mathematica or Maple, indicating a concern for accessibility.

Areas of Agreement / Disagreement

Participants express varying preferences for computational tools, with some favoring Maxima and others preferring Mathematica. There is no consensus on which software is superior, and the discussion reflects multiple competing views on the best approach to computational general relativity.

Contextual Notes

Participants mention limitations in their current tools, such as the potential for encountering difficulties with complex algebraic expressions. There is also a concern regarding the reliability of software sources, particularly for Windows versions of Maxima.

Who May Find This Useful

This discussion may be useful for individuals interested in computational methods in general relativity, particularly those exploring software options for tensor calculations and seeking community feedback on programming approaches.

dylanreynolds1
Messages
2
Reaction score
2
Hello all, first post.

I have come here to get second opinions on the program I have written to compute the Einstein Tensor (the Riemann Tensor and Ricci Tensor). I enjoy looking for solutions to the Einstein Field Equations, however computing them by hand is not realistic. I decided to write a program, but I am by no means a programmer.

The program takes in a particular form of the metric, and outputs the Ricci Tensor. Since I am mostly interested in vacuum solutions at the moment, this is all I need. I have copied in the Python code below, however I am sure there is a better way to display it.

Any ideas about how to make the program better, or how to make a better post on this forum are greatly appreciated, however my main goal is to hear form people who know more about GR than me.

basic1.png

This code has helped me derive the Schwarzschild solution, so it must be at least somewhat accurate. However there may be some small detail that I have missed.

Any help would be much appreciated.
 
Last edited:
  • Like
Likes   Reactions: member 657093 and bcrowell
Physics news on Phys.org
dylanreynolds1 said:
Hello all, first post.

I have come here to get second opinions on the program I have written to compute the Einstein Tensor (the Riemann Tensor and Ricci Tensor). I enjoy looking for solutions to the Einstein Field Equations, however computing them by hand is not realistic. I decided to write a program, but I am by no means a programmer.

The program takes in a particular form of the metric, and outputs the Ricci Tensor. Since I am mostly interested in vacuum solutions at the moment, this is all I need. I have copied in the Python code below, however I am sure there is a better way to display it.

Any ideas about how to make the program better, or how to make a better post on this forum are greatly appreciated, however my main goal is to hear form people who know more about GR than me.

This code has helped me derive the Schwarzschild solution, so it must be at least somewhat accurate. However there may be some small detail that I have missed.

Any help would be much appreciated.
That is all very good but you'll soon run into trouble if you have complicated algebraic expressions that need simplification.

I use Maxima with the windows interface wxMaxima with great success. For free software it is extraordinary. If you can write Python like that you will be able to write scripts that find geodesics, Killing vectors, kinematic decomposition and so on. It also outputs expressions as Latex on demand.

It is available at sourceforge.
 
Last edited:
Have you seen/used Maxima with its ctensor stuff?
 
Cool little project! Although I also would have used maxima and ctensor for this, I'm sure you got some real educational benefit from writing it, which is great. If you want to test whether your software is working correctly, one way to do it would be to write down the Minkowski space metric and then transform into some random, unusual coordinates, then input the metric into your code in that form. It should give zero for the Riemann tensor.

BTW, I hadn't realized that windows versions of maxima were distributed through sourceforge. That's unfortunate, because sourceforge, which was formerly a respected resource in the open-source community, has now degenerated to the point where it has been bundling malware with the binaries it distributes. For linux, maxima is available from more reliable sources, e.g., apt-get for debian and ubuntu.
 
  • Like
Likes   Reactions: PeterDonis
I use Mathematica, because indeed to evaluate the Ricci or Einstein tensor is cumbersome even for simple cases as the spherical symmetric spacetime, leading to the Schwarzschild solution. I was not aware of the free CA maxima. How powerful is that in comparison to Mathematica?
 
vanhees71 said:
I use Mathematica, because indeed to evaluate the Ricci or Einstein tensor is cumbersome even for simple cases as the spherical symmetric spacetime, leading to the Schwarzschild solution. I was not aware of the free CA maxima. How powerful is that in comparison to Mathematica?
I respectfully request to all that future recommendations for Mathematica/Maple be accompanied by pricing information.
 
  • Like
Likes   Reactions: bcrowell

Similar threads

  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 33 ·
2
Replies
33
Views
5K
  • · Replies 186 ·
7
Replies
186
Views
13K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K