An Overview of General Relativity computations with DifferentialGeometry

Description


•

The GRTensor package, developed by K. Lake, P. Musgrave and D. Polleny, has long provided the general relativity community with an excellent collection of command for symbolic computations in general relativity. This functionality is also now available within DifferentialGeometry package and with the DifferentialGeometry subpackage Tensor.

•

This worksheet provides a quick introduction to General Relativity computations using DifferentialGeometry.



1. Getting Started


In this section we give a quick illustration of the use of the DifferentialGeometry software to perform a standard calculation in General Relativity. We shall solve the Einstein vaccum equations for spherically symmetric metrics in 4dimensions. We check that the solution is of Petrov type D and we show that there are 4 Killing vectors. First load the DifferentialGeometry package, the Tensor subpackage and the Tools subpackage.
>

with(DifferentialGeometry): with(Tensor): with(Tools):

All calculations in DifferentialGeometry begin by using the DGsetup command to initialize the computational environment. For our illustration we shall use standard spherical coordinates We use the name to designate the computational environment (in this case a 4dimensional manifold) which we are creating.
>

DGsetup([t, r, theta, phi], M1, verbose);

 (1) 
The coordinate vectors and the 1forms are now defined and these can be used to construct general vector fields, differential forms and tensors. Use +/ for addition and substraction, * for scalar multiplication, &t for tensor product and &w for wedge product. The command evalDG is used to insure that these operations are properly performed in DifferentialGeometry.
Here is the usual form for the static (timeindependent), rotational invariant metric that is used as the starting ansatz for solving the Einstein equations. The two functions and will be determined by the Einstein equations
>

g := evalDG( A(r) *dt &t dt + B(r)* dr &t dr + r^2*(dtheta &t dtheta + sin(theta)^2* dphi &t dphi));

 (2) 
To solve the Einstein equations for this metric, we first calculate the Einstein tensor.
>

Ein := EinsteinTensor(g);

 (3) 
The command DGinfo is a utility program that can be used to obtain information about the computational environment and information about various DifferentialGeometry objects. Here we use DGinfoto extract all the coefficients of the Einstein tensor.
>

EinEq := DGinfo(Ein, "CoefficientSet");

 (4) 
Now we use the Maple command pdsolve to integrate these differential equations:
>

Soln := pdsolve(EinEq);

 (5) 
The constant _C1 is essentially the mass of the point source of the gravitional field. The constant _C2 is easily normalized to 1 by a rescaling of time.
>

gS := subs({_C1 =  2*m, _C2= 1},subs(Soln, g));

 (6) 
This is the Schwarzschild metric in standard coordinates. The Einstein tensor vanishes as required.
 (7) 
The metric admits 4 Killing vectors.
>

K := KillingVectors(gS);

 (8) 
>

subs({sqrt(1cos(2*theta)) = sqrt(2)*sin(theta)}, K);

 (9) 
The Petrov type of this metric is "D".
 (10) 
It is often convenient to store the entries of a metric in a symmetric matrix.
>

convert(convert(gS, DGArray), Matrix);

 (11) 


2. Algebraic Manipulations of Tensors


We use a simple metric defined on a 3dimensional space to illustrate some basis algebraic manipulations with tensors.
First define a coordinate chart with coordinates
>

DGsetup([x, y, z], M2);

 (12) 
Define a metric .
>

g2 := evalDG(z*(dx&t dy + dy &t dx) + x^2*dz &t dz);

 (13) 
Calculate the inverse metric
>

h := InverseMetric(g2);

 (14) 
Define a rank 3 tensor.
>

T := evalDG(dx &t D_y &t dz);

 (15) 
Lower the second index of T.
>

RaiseLowerIndices(g2, T, [2]);

 (16) 
Raise the 1st and 3rd indices of T using the inverse metric .
>

RaiseLowerIndices(h, T, [1,3]);

 (17) 
Rearrange the 1st and 2nd indices.
>

RearrangeIndices(T, [[1,2]]);

 (18) 
Symmmetrize over the 1st and 3rd indices
>

SymmetrizeIndices(T, [1, 3], "Symmetric");

 (19) 


3. Derivatives


One can compute the exterior derivative of a differential form, the Lie derivative of any tensor field with respect to a vector field or the covariant derivative of any tensor field with respect to a connection
 (20) 
Define a 1form and calculate the exterior derivative.
>

omega := evalDG(sin(x) *dy + x^2*dz);

 (21) 
>

ExteriorDerivative(omega);

 (22) 
Define a vector field and a tensor and calculate the Lie derivative.
>

X := evalDG(y*D_x + x*D_z);

 (23) 
>

T := evalDG(x^2*D_y &t dz);

 (24) 
 (25) 
Define a connection and calculate the covariant derivative of
>

C:= Connection( a*dx &t D_z &t dy);

 (26) 
>

CovariantDerivative(T, C);

 (27) 


4. Useful Utilities


The DifferentialGeometry package has many useful utilites for working with differential forms and tensors. For example, we can easily construct a general metric as follows. (GenerateSymmetricTensors, DGzip)
 (28) 
>

S := GenerateSymmetricTensors([dx, dy , dz], 2);

 (29) 
>

g := DGzip([a1,a2,a3,a4,a5,a6](x, y, z), S, "plus");

 (30) 
As another example, we can get the components of any tensor with respect to any basis with the command GetComponents.
>

B := evalDG([dx , dx dy, dx +2*dy dz]);

 (31) 
>

alpha := evalDG(dx  3*dy + 5*dz);

 (32) 
>

GetComponents(alpha, B);

 (33) 


5. Curvature Tensors


The Riemann curvature tensor, the Ricci tensor, the Ricci scalar and the Weyl tensor of a metric are easily computed. Here we use the Godel metric.
>

DGsetup([x, y, z, t], M5);

 (34) 
To define the metric, we first define a 1form and then define the metric in terms of the 1form.
>

omega := evalDG(dt + exp(x)*dz);

 (35) 
>

g5 := evalDG(dx &t dx + dy &t dy +1/2*exp(2*x)*dz &t dz  omega &t omega);

 (36) 
Here is the curvature tensor (as a type (1, 3)) tensor.
 (37) 
Here is the Ricci tensor.
 (38) 
Here is the Ricci scalar.
 (39) 


6. Working with Orthonormal Tetrads


Many calculations in General Relativity can be dramatically simplified by defining an orthonormal tetrad and by expressing the metric and all other tensors in terms of this orthonormal tetrad. This is particularly true when a coframe can be chosen with simple structure equations.
A simple illustration of this is provided by the Godel metric from the previous example.
>

DGsetup([x, y, z, t], M6);

 (40) 
>

omega := evalDG(dt + exp(x)*dz);

 (41) 
>

g6 := evalDG(dx &t dx + dy &t dy +1/2*exp(2*x)*dz &t dz  omega &t omega);

 (42) 
>

Omega := evalDG([dx, dy, 1/sqrt(2)*exp(x)*dz, omega]);

 (43) 
We use TensorInnerProduct to check that the forms in the list define an orthonormal tetrad.
>

TensorInnerProduct(g6, Omega, Omega);

 (44) 
The command FrameData calculates the structure equations for this frame and stores the results in a format that can be used by DGsetup.
>

FD := FrameData(Omega, O6);

 (45) 
What is nice about this coframe is that the structure functions are all constant  even though there was an exponetial function in the metric. We run DGsetup again to create a new computational environment which used this coframe and these structure equations.
>

DGsetup(FD, [E], [theta]);

 (46) 
>

newg6 := evalDG(theta1 &t theta1 + theta2 &t theta2 + theta3 &t theta3  theta4 &t theta4);

 (47) 
The curvature tensor and the Ricci tensor take simple forms in terms of this frame.
>

CurvatureTensor(newg6);

 (48) 
 (49) 


7. Working with Null Tetrads and the NewmanPenrose Formalism


The DifferentialGeometry package supported computations in all the different formalisms for general relativity  coordinate calculations, orthonormal tetrads, null tetrads and the NewmanPenrose formalism, and the twocomponent spinor formalism. The tools are readily available for moving from one formalism to another.
In this example we calculate the NewmanPenrose curvature scalars for a metric.
>

DGsetup([r, u, x, y], M7);

 (50) 
>

g7 := evalDG(dr &t du + du &t dr ((2*(3*x*r+m))*du &t du)/r(1/4)*(r^2*dx &t dx)/x^3(1/4)*(r^2*dy &t dy)/x^3);

 (51) 
The command DGGramSchmidt and NullTetrad provide useful tools for constructing null tetrads. Here is the one that we shall use for this example
>

NT := evalDG([D_r, (3*x*r+m)*D_r/r+D_u, I*sqrt(2)*x^(3/2)*D_x/r+sqrt(2)*x^(3/2)*D_y/r, I*sqrt(2)*x^(3/2)*D_x/r+sqrt(2)*x^(3/2)*D_y/r]);

 (52) 
Here are the NewmanPenrose curvature scalars for this null tetrad.
>

NP := NPCurvatureScalars(NT, output = ["WeylScalars"]);

 (53) 


8. Two Component Spinor Formalism


As a quick illustration of the 2component spinor formalism, we calculate the Weyl spinor for the metric from the previous paragraph. To work with spinors we use DGsetup to specify both the coordinates for the spacetime and also the coordinates to be used for the spinors and their complex conjugates.
>

DGsetup([r, u, x, y], [z1, z2, w1, w2], M8);

 (54) 
Here is metric as before.
>

g8 := evalDG(dr &t du + du &t dr ((2*(3*x*r+m))*du &t du)/r(1/4)*(r^2*dx &t dx)/x^3(1/4)*(r^2*dy &t dy)/x^3);

 (55) 
Here is the null tetrad as before.
>

NT := evalDG([D_r, (3*x*r+m)*D_r/r+D_u, I*sqrt(2)*x^(3/2)*D_x/r+sqrt(2)*x^(3/2)*D_y/r, I*sqrt(2)*x^(3/2)*D_x/r+sqrt(2)*x^(3/2)*D_y/r]);

 (56) 
We use the null tetrad to construction an orthonormal tetrad.
>

OT := OrthonormalTetrad(NT);

 (57) 
We use the orthonormal tetrad to define the solder form as a spintensor .
>

sigma := SolderForm(OT);

 (58) 
Here is the null vector as a 2component spinor.
>

convert(D_r, DGspinor, sigma, [1]);

 (59) 
We use SpinorInnerProduct to check that the contracted product reproduces the metric.
>

SpinorInnerProduct(sigma, sigma);

 (60) 
Here is the Weyl spinor.
 (61) 


9. Congruences


Line congruences (especially null congruences) play an important role in the geometric analysis of spacetimes. We continue with the metric from the previous example. We show that the congruence defined by D_ris defines a shearfree principal null direction.
 (62) 
>

V := evalDG((3*x*r+m)*D_r/r+D_u);

 (63) 
>

GRQuery(U, g8, W, "PrincipalNullDirection");

 (64) 
Here are the properties of the null congruence defined by .
>

CongruenceProperties(g8, U, V);

 (65) 


10. ElectroVac Spacetimes


A spacetime is called an electrovac spacetime if there exists an electromagneic field which solves the EinsteinMaxwell field equations. The problem of deciding if a spacetime is electrovac can be solved using the command RainichConditions and RainichElectromagneticField. Here is a simple example.
>

DGsetup([t, x, y, z], M10);

 (66) 
>

g10 := evalDG(4/3*t^2* dx &t dx + t*(exp(2*x)* dy &t dy + exp(2*x)*dz &t dz)  dt &t dt);

 (67) 
Test to see if the Rainich conditions for a spacetime hold.
>

RainichConditions(g10);

 (68) 
We conclude the spacetime is an electrovac spacetime. Here is the electromagnetic field.
>

F := RainichElectromagneticField(g10);

 (69) 
>

F := simplify(F) assuming t > 0;

 (70) 
We check that the Einstein equations are satisfied (See EinsteinTensor, EnergyMomentumTensor).
>

T := EnergyMomentumTensor("Electromagnetic", g10, F); E := EinsteinTensor(g10); E &minus T;

 (71) 
We check that the Maxwell equations (see MatterFieldEquations) are satisfied.
>

MatterFieldEquations("Electromagnetic", g10, F);

 (72) 


11. Exact Solution DataBase


An database of exact solutions of the Einstein equations can be accessed using either the Browse and or the MetricSearch commands from the DifferentialGeometry Library subpackage.


12. Other Features


•

The Segre classification of spacetime can be calculated.

•

The KillingVector and PetrovType commands support casesplitting for metrics which depend upon arbitrary parameters or functions.

•

The LieAlgebras package provides all the tools needed for a complete algebraic analysis of the Killing vectors of a spacetime.

•

The isotropy subalgebra and isotropy type of a Lie algebra of Killing vectors can be determined. These are useful properties for classificating Killing vectors.

•

Futur releases of DifferentialGeometry will include commands for working with the EinsteinYangMills equations and for abstractly solving the Einstein equations on homogeneous spaces and low cohomogeneity manifolds.


