Skip to content

Input of Spacetimes

akwilson19 edited this page Jul 28, 2019 · 7 revisions

Spacetimes are specified within GRTensorIII through use of the spacetime() command. Once created they can be saved to a file using the grsaveg() command and loaded with grload().

The spacetime command allows for the specification of the metric tensor, and requires:

  1. A name for spacetime
  2. The co-ordinates for the spacetime (the number of co-ordinates define the dimension of the spacetime)
  3. The metric of the spacetime defined either by the line element or the explicit components of the metric,

The spacetime command is of the form:

spacetime(schw, coord=[t,r,theta,phi], ds=-f(r)*d[t]^2+1/f(r)*d[r]^2+r^2*d[theta]^2+r^2*sin(theta)^2*d[phi]^2);

or

spacetime(schw, coord=[t,r,theta,phi],g[t,t]=-f(r), g[r,r]=1/f(r), g[theta,theta]=r^2, g[phi,phi]=r^2*sin(theta)^2);

Once a spacetime has been defined, then components of built-in tensors or definitions of a new tensor can be computed, simplified, and displayed.

If the spacetime command is used more than once in a Maple worksheet, the most recently defined spacetime will be considered the default for all commands. To change the default to a previously defined spacetime the grmetric() command can be used with the spacetime name i.e. grmetric(schw);

A spacetime can be saved to a file using grsaveg( name, "path"). The file will be saved in path as the file name.mpl

The command grload() will open a file chooser to allow a previously saved spacetime to be loaded into a Mapleworksheet.