Elementary rudiments of GRTensorII:
This is a brief introduction only. For more interesting examples consult the demonstrations page on the Web.
For more detailed information consult the help pages and Release Notes.
The following (optional) line allows the worksheet to be re-executed.
> restart:
We now load the GRTensorII package:
> grtw():
The current environment can be checked as follows:
> groptions();
grOptionAlterSize = false
grOptionCoordNames = true
grOptionDefaultSimp = 8
grOptionDisplayLimit = 5000
grOptionLLSC = true
grOptionMetricPath = `e:/Grtii(6)/Metrics`
grOptionqloadPath = (not assigned)
grOptionTermSize = 100
grOptionTrace = false
grOptionTimeStamp = true
grOptionVerbose = false
grOptionWindows = true
grOptionDefaultSimp values: 0=None, 1=simplify, 2=simplify[trig],
3=simplify[power] 4=simplify[hypergeom], 5=simplify[radical],
6=expand, 7=factor, 8=normal, 9=sort, 10=simplify[sqrt]
11=simplify[trigsin]
We now use makeg to create a file (schwarz) which is the Schwarzschild exterior metric in curvature coordinates. Here we choose to enter the line
element directly:
> makeg(schwarz);
Makeg 2.0: GRTensor metric/basis entry utility
To quit makeg, type 'exit' at any prompt.
Do you wish to enter a 1) metric [g(dn,dn)],
2) line element [ds],
3) non-holonomic basis [e(1)...e(n)], or
4) NP tetrad [l,n,m,mbar]?
makeg> 2;
makeg> [r,theta,phi,t];
makeg> d[r]^2/(1-2*m/r)+r^2*(d[theta]^2+sin(theta)^2*d[phi]^2)-(1-2*m/r)*d[t]^2;
makeg> {};
makeg> 5;
> The Schwarzschild exterior metric in curvature coordinates;
You may choose to 0) Use the metric WITHOUT saving it,
1) Save the metric as it is,
2) Correct an element of the metric,
3) Re-enter the metric,
4) Add/change constraint equations,
5) Add a text description, or
6) Abandon this metric and return to Maple.
makeg> 1;
We choose not to load it so as to demonstrate the loading procedure.
makeg> 0;
We now load the metric we have created:
> qload(schwarz);
To see what objects are predefined, load the help library (?grtensor; for information on the help system, readlib(griihelp); to load the help library) and do ?grt_objects;. Here we calculate and display (grcalcd) the covariant Ricci tensor (R(dn,dn)) and Kretschmann scalar (RiemSq).
> grcalcd(R(dn,dn),RiemSq);
Created definition for R(dn,dn,up,up)
Normally you would not want to display an object without further simplification (see below).
Let us use the definition facility (grdef) to define the covariant Einstein tensor:
> grdef(`E{a b}:=R{a b}-Ricciscalar*g{a b}/2`);
This object is already defined. The new definition has been ignored.
Notice that the attempt was ignored because the 2-tensor "E" is predefined. (It is the"electric part" of the Weyl tensor, described in ?grt_operators;). Let's use "En":
> grdef(`En{a b}:=R{a b}-Ricciscalar*g{a b}/2`);
Created definition for En(dn,dn)
Now let us ask for the mixed components. The definition for these is created automatically:
> grcalcd(En(dn,up));
Created definition for En(dn,up)
Spacetimes which are implicitly defined are handled by the application of constraints. Consider the Kruskal-Szekeres metric:
> qload(krn);
Since objects calculated for this metric must be simplified (at least by the application of constraints) we calculate some objects without displaying them (grcalc):
> grcalc(R(dn,dn),RiemSq);
To simplify the objects we apply gralter. If no routine is given, a menu of options is given as shown below. Refer to the help on gralter. The argument _ is shorthand for the previous objects (in this case R(dn,dn) and RiemSq).
> gralter(_);
Component simplification of a GRTensorII object:
(use ?name for help on a particular simplification routine)
Choose which routine to apply:
0) none
1) simplify() try all simplification techniques
2) simplify[trig] apply trig simplification
3) simplify[power] simplify powers, exp and ln
4) simplify[hypergeom] simplify hypergeometric functions
5) simplify[radical] convert radicals,log,exp to canonical form
6) expand()
7) factor()
8) normal()
9) sort()
10) simplify[sqrt,symbolic] allows sqrt(r^2) = r
11) simplify[trigsin] trig simp biased to sin
12) Apply constraint equations
13) Apply constraints repeatedly
14) other user specified routine
Number of routine to apply (followed by ;) >
gralter> 13;
We now display the objects:
> grdisplay(_);
Let us now do a basis calculation. We use a covariant basis here:
> qload(schwb);
The basis components are distinguished by the prefix b. For example, let's calculate the mixed basis components of the Weyl tensor:
> grcalc(C(bdn,bdn,bup,bup));
Created definition for C(bdn,bdn,bup,bup)
Created definition for rot(bdn,bup,bdn)
Created a definition for e(bdn,dn,pdn)
> grdisplay(_);
The Newman-Penrose formalism can be used from a contravariant or a covariant null tetrad. We start with the contravariant tetrad:
> qload(npschw);
Let's calculate the Ricci scalars:
> grcalcd(RicciSc);
`Basis/tetrad related object definitions`
`Last modified 23 January 2001`
From a covariant tetrad let us calculate the Petrov type:
> qload(npcschw);
> grcalcd(Petrov);
Since we were not careful to ensure that the Weyl scalars were in fully simplifed form, we ask for a report:
> PetrovReport();
Notice that we have 5 spacetimes active in this session (schwarz, krn, schwb, npschw, npcschw). The current default is npcschw (the last one loaded). We can calculate an object for any one of the spacetimes (e.g. the Weyl invariant W1R for krn)
> grcalc(W1R[krn]);
Scalar invariant library.
Last modified 25 March 1997.
> gralter(_,13);
Component simplification of a GRTensorII object:
Applying routine `Apply constraints repeatedly` to object W1R
> grdisplay(_);
Let us load another implicit form of the metric
> qload(israel);
We define a differential invariant:
> grdef(`DiRiem:=R{a b ^c ^d ; e}*R{c d ^a ^b ; ^e}`);
Created a definition for R(dn,dn,up,up,cdn)
Created a definition for R(dn,dn,up,up,cdn)
Created definition for R(dn,dn,up,up,cup)
Created definition for DiRiem
> grcalc(DiRiem);
> gralter(_,13);
Component simplification of a GRTensorII object:
Applying routine `Apply constraints repeatedly` to object DiRiem
> grdisplay(_);
Notice that the invariant vanishes at u=0 (r(0,w)=2m), a property of this object that holds more generally.
Whereas we have interactively defined this invariant here, it is also predefined in the differential invariants library dinvar as diRiem. Do grlib(dinvar); to load the library.
We can also change the default spacetime with grmetric. Let's go back to schwarz and CREATE a null tetrad:
> grmetric(schwarz);
Default metric is now schwarz.
> nptetrad([r,t]);
The metric signature of the schwarz spacetime is +2.
In order to create an NP-tetrad, the signature of g(dn,dn) will be changed to -2.
Continue? (1=yes [default], other=no) :
nptetrad> 1;
The situation here (in Schwarzschild) is unusually simple. The basis vectors would normally require further simplification for efficient use.
>