GRTensorJ - Books (physics/0509108)

  • Thread starter robphy
  • Start date
  • #1
robphy
Science Advisor
Homework Helper
Insights Author
Gold Member
5,462
680

Main Question or Discussion Point

This looks like it could be useful...


http://arxiv.org/abs/physics/0509108

A tool for teaching General Relativity
Authors: Kayll Lake
Comments: 6 pages, 5 figures. Further information at this http URL
Subj-class: Physics Education; Computational Physics


GRTensorJ - Books is an active interface to a small part of the computer algebra systems GRTensorII (for Maple) and GRTensorM (for Mathematica) with the specific intent of providing students of General Relativity with an advanced programmable calculator-style tool. All standard functions associated with a classical tensor approach to the subject are available thus reducing these to "elementary functions". This is not a traditional database. The database entries are spacetimes and calculations are done in real time. All spacetimes are referenced directly by equation number in ten current (and classic) texts in notation as close as possible to the original text. The tool is now available free of charge from http://grtensor.org/teaching/ [Broken]
 
Last edited by a moderator:

Answers and Replies

  • #2
Chronos
Science Advisor
Gold Member
11,408
738
  • #3
238
0
Great! It looks like a very useful program (script?). I was just thinking about buying that 'Mathematica for students'.
 
  • #4
ZapperZ
Staff Emeritus
Science Advisor
Education Advisor
Insights Author
35,377
4,155
A tool for teaching General Relativity

This appeared on the e-print arXiv yesterday. I have no idea how valid or valuable this is, but it seems to have some usefullness.

http://arxiv.org/abs/physics/0509108

Zz.
 
  • #5
robphy
Science Advisor
Homework Helper
Insights Author
Gold Member
5,462
680
  • #6
ZapperZ
Staff Emeritus
Science Advisor
Education Advisor
Insights Author
35,377
4,155
Yikes! You're right! Let's see if I can combine them without killing the patient!

Zz.

Edit: the merge was successful, but the patient has a problem with flow and continuity. But you get the idea.....
 
Last edited:
  • #7
Tom Mattson
Staff Emeritus
Science Advisor
Gold Member
5,500
7
ZapperZ said:
Edit: the merge was successful, but the patient has a problem with flow and continuity. But you get the idea.....
It's...it's...ALIVE!
 
  • #8
pervect
Staff Emeritus
Science Advisor
Insights Author
9,635
888
I've found GR-tensor II and maple both to be very useful. I can't really comment on the Mathematica versions, but I would expect them to be very similar in capability. (I think that a few advanced functions might be missing from the Mathematica version of GRTensor II, but I'm not positive if this is still true, especially since it appears that quite a bit of work has been put into the Mathematica version since I last checked.)

I haven't tried out the new interface/package as presented in this paper, the old interface was convienent enough anyway after one got used to it. One does have to beware of some odd subscript ordering for Christoffel symbols in the old package, I'm not sure if this has been changed in the new version (skimming the documents suggested it hadn't). This can be easily worked around with a "grdef" command.

The incorporation of textbook formulas looks interesting, I will have to download the package to see how useful it really is.
 
  • #9
pervect
Staff Emeritus
Science Advisor
Insights Author
9,635
888
I thought I would use this thread to illustrate the GRTensorII old-style interface on an actual problem. The problem consists of setting up a nearly-Newtonian metric, and then performing a coordinate transformation on this metric for a "boost-at-infinity". My inputs are in red text. The output from the program is more readable in it's original non-ascii format. I've inserted a few code tags here and there to give semi-readable information at important points, but the real output is *much* better.

makeg(pmb1);

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]?

> 2;
Enter coordinates as a LIST (eg. [t,r,theta,phi]):
> [t1,x1,y1,z1];
Enter the line element using d[coord] to indicate differentials.
(for example, r^2*(d[theta]^2 + sin(theta)^2*d[phi]^2)
[Type 'exit' to quit makeg]
ds^2 =
> (1-2*Phi0(x1,y1,z1)/c^2)*c^2*d[t1]^2 - (1+2*Phi0(x1,y1,z1)/c^2)*(d[x1]^2+d[y1]^2+d[z1]^2);

If there are any complex valued coordinates, constants or functions
for this spacetime, please enter them as a SET ( eg. { z, psi } ).

Complex quantities [default={}]:
> ;
{}

Code:
                   The values you have entered are:


                    Coordinates = [t1, x1, y1, z1]


                               Metric:


                      [ 2                                 ]
                      [c  - 2 Phi0(x1, y1, z1) , 0 , 0 , 0]
                      [                                   ]
                      [         2 Phi0(x1, y1, z1)        ]
                      [0 , -1 - ------------------ , 0 , 0]
                      [                  2                ]
                      [                 c                 ]
                      [                                   ]
          g[a]  [b] = [             2 Phi0(x1, y1, z1)    ]
                      [0 , 0 , -1 - ------------------ , 0]
                      [                      2            ]
                      [                     c             ]
                      [                                   ]
                      [                 2 Phi0(x1, y1, z1)]
                      [0 , 0 , 0 , -1 - ------------------]
                      [                          2        ]
                      [                         c         ]

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.
> 1;
Information written to: `D:/Grtii/Metrics/pmb1.mpl`
Do you wish to use this spacetime in the current session?
(1=yes [default], other=no):
> 1;
Initializing: pmb1

Default spacetime = pmb1


For the pmb1 spacetime:


Coordinates


x(up)


a
x = [t1, x1, y1, z1]


Line element


2 2 2
ds = (c - 2 Phi0(x1, y1, z1)) d t1

/ 2 Phi0(x1, y1, z1)\ 2
+ |-1 - ------------------| d x1
| 2 |
\ c /

/ 2 Phi0(x1, y1, z1)\ 2
+ |-1 - ------------------| d y1
| 2 |
\ c /

/ 2 Phi0(x1, y1, z1)\ 2
+ |-1 - ------------------| d z1
| 2 |
\ c /

makeg() completed.
> xform := [t(x1,t1) = (t1+x1*beta/c)/sqrt(1-beta^2),x(x1,t1)=(x1+t1*c*beta)/sqrt(1-beta^2),y(y1)=y1,z(z1)=z1];

x1 beta
t1 + -------
c x1 + t1 c beta
xform := [t(x1, t1) = --------------, x(x1, t1) = --------------,
2 1/2 2 1/2
(1 - beta ) (1 - beta )

y(y1) = y1, z(z1) = z1]

> grtransform(pmb1,pmb2,xform);
The new default metric is: pmb2
> grdisplay(g(dn,dn));

For the pmb2 spacetime:


Covariant metric tensor


g(dn, dn)


g [a] =

[ 2 2
[ %2 c beta %1 %2 beta c beta %1
[--------- + ----------- , - ------------- - --------- , 0 ,
[ 2 2 2 2
[1 - beta 1 - beta (1 - beta ) c 1 - beta

]
]
0]
]
]

[ 2
[ %2 beta c beta %1 beta %2 %1
[- ------------- - --------- , -------------- + --------- , 0
[ 2 2 2 2 2
[ (1 - beta ) c 1 - beta c (1 - beta ) 1 - beta

]
]
, 0]
]
]

[0 , 0 , %1 , 0]

[0 , 0 , 0 , %1]

2 Phi0(x1, y1, z1)
%1 := -1 - ------------------
2
c

2
%2 := c - 2 Phi0(x1, y1, z1)

>
> gralter(g(dn,dn));
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 ;) >
> 10;
Applying routine `simplify[sqrt]` to object g(dn,dn)

CPU Time = 0.018

> gralter(g(dn,dn));
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 ;) >
> 14;

Enter function name and arguments as a sequence (seperated by commas)
and indicate position of tensor component in argument list by 'x' (forward quotes).
e.g. for collect(Riemann,r) enter >collect,'x',r;

Enter sequence (followed by ;) >
> collect,'x',Phi0;
Applying routine collect to g(dn,dn)

CPU Time = 0.004

> grdisplay(g(dn,dn));

For the pmb2 spacetime:


Covariant metric tensor


g(dn, dn)

Code:
  g [a]  [b] =

        [           2                       2       2  2
        [(2 + 2 beta ) Phi0(x1, y1, z1)   -c  + beta  c
        [------------------------------ + -------------- ,
        [                   2                        2
        [          -1 + beta                -1 + beta

                                         ]
          4 beta Phi0(x1, y1, z1)        ]
        - ----------------------- , 0 , 0]
                          2              ]
              c (-1 + beta )             ]

        [
        [  4 beta Phi0(x1, y1, z1)
        [- ----------------------- ,
        [                  2
        [      c (-1 + beta )

                   2                          2  2    2         ]
        (2 + 2 beta ) Phi0(x1, y1, z1)   -beta  c  + c          ]
        ------------------------------ + --------------- , 0 , 0]
                         2   2                     2   2        ]
               (-1 + beta ) c            (-1 + beta ) c         ]

        [             2 Phi0(x1, y1, z1)    ]
        [0 , 0 , -1 - ------------------ , 0]
        [                      2            ]
        [                     c             ]

        [                 2 Phi0(x1, y1, z1)]
        [0 , 0 , 0 , -1 - ------------------]
        [                          2        ]
        [                         c         ]

>
 
  • #10
Chronos
Science Advisor
Gold Member
11,408
738
Sorry robphy, I missed your post.
 
  • #11
pervect
Staff Emeritus
Science Advisor
Insights Author
9,635
888
It took me a while to get it up and running, but I found GRTensorJ to be quite useful. (If you don't install it exactly where it wants to be, you have to manually track down a bunch of stuff to make it run right - the installation isn't flexible in this regard.)

It's got a number of tips on simplification methods, and other useful tips, like some of the alias command (which I'd never noticed before), which convert partial derivatives to subscripts (very useful for large expressions).

On the minus side, the display of GRTensorJ is ugly (compared to the native maple version), - it looks just like what I cut and pasted in my previous response - so I probably won't be using it routinely, just as a sort of advanced instructional tool about ways to make GrtII do what I want (instead of what it wants :-)).

The metric files are somewhat useful, though I'm not sure why they felt the need to stamp copyrights all over them.
 
  • #12
George Jones
Staff Emeritus
Science Advisor
Gold Member
7,259
790
Thanks, pervect, for the example with GRTensorII. I downloaded it a few days ago, but I have yet to find time to use it. Maybe this weekend. It looks like your example is going to be very useful to me. Any other tips?

Where is there documentation? Online? In the help files?

Does it work for 2+1 gravity? This is case that currently interests me most.

Regards,
George
 
  • #13
pervect
Staff Emeritus
Science Advisor
Insights Author
9,635
888
George Jones said:
Thanks, pervect, for the example with GRTensorII. I downloaded it a few days ago, but I have yet to find time to use it. Maybe this weekend. It looks like your example is going to be very useful to me. Any other tips?

Where is there documentation? Online? In the help files?

Does it work for 2+1 gravity? This is case that currently interests me most.

Regards,
George
It should work fine for 2+1 gravity, it will handle spaces of arbitrary dimension (not just 4).

There is documentation online, at the homepage

http://grtensor.org/

but I think it's rather old and in postscript. There are also helpfiles with the program, but while they describe how the individual commands work, they don't give much of an overview.

The GrtensorJ program, mentioned in this thread and on the grtensor.org homepage, can be regarded essentially as interactive documentation/demonstration, and looks like a good way to learn the program. It's probably worth installing, especially if you put it where it wants to be (the installation isn't very flexible unfortunately).

The main thing I would warn you about is the unusual notation for Christoffel symbols. It's easy to get around, though, including the following defineiton will allow you to access the symbols as CC(up,dn,dn)

grdef(`CC{ ^a b c} := Chr{b c ^a}`);

Probably the other thing worth mentioning is the importance of simplification. If you get the GrtensorJ program, it talks about this a fair amount,

gr-qc/9601036

also talks about this some.
 
Last edited:
Top