Physics[g_] - The g_ tensor
|
Calling Sequence
|
|
g_[]
g_[, matrix]
g_[keyword]
convert(expression, g_)
|
|
Parameters
|
|
_mu, nu_
|
-
|
the indices, as names representing integer numbers between 0 and the spacetime dimension, they can also be the numbers themselves
|
matrix
|
-
|
optional, returns the matrix form for the given (covariant or contravariant) indices; if passed without indices it returns the covariant metric
|
keyword
|
-
|
optional, it an be determinant, line_element matrix, nonzero, or any portion of a known metric name to launch a search in the metric's database
|
expression
|
-
|
an algebraic expression involving tensors (e.g. Christoffel) to be rewritten in terms of the metric g_ and its derivatives
|
|
|
|
|
Description
|
|
•
|
The g_[mu, nu], displayed as (without _ in between and its indices), is a computational representation for the spacetime metric tensor. When Physics is loaded, the dimension of spacetime is set to 4 and the metric is automatically set to be galilean, representing a Minkowski spacetime with signature (-, -, -, +).
|
•
|
When working in curvilinear coordinates so that the components of the Christoffel symbols are not zero it is sometimes convenient to rewrite tensorial expressions in terms of the metric g_ and its derivatives. For example, this is the case of the Christoffel symbols and any of the general relativity tensors that are defined in terms of them. For this purpose you can use convert(expression, g_) - see the Examples section.
|
•
|
You can change the value of the metric g_ in different ways, using Setup or, when choosing a predefined set of values, you can also change the metric using g_ itself, indexing it with the related metric name; for example as in g_[Minkowski]. The predefined sets are: arbitrary, Euclidean, Minkowski, Schwarzschild Tolman or related to the metrics of Chapter 12 of Exact Solutions of Einstein's Field Equations - see references at the end. Note that you can pass the keyword incomplete or misspelled, in which case a searchtext is performed among the keywords understood by g_ and if a match is found the metric is set accordingly, or if many matches are found then corresponding information is displayed on the screen. See g_ for examples. Using predefined sets, either through Setup or g_, automatically sets the necessary systems of coordinates and differentiation variables for the spacetime differentiation operator d_ accordingly.
|
•
|
Computations performed with the Physics package commands take into account Einstein's sum rule for repeated indices - see `.` and Simplify. The distinction between covariant and contravariant indices in the input of tensors is done by prefixing contravariant ones with ~, say as in ~mu; in the output, contravariant indices are displayed as superscripts. For contracted indices, you can enter them one covariant and one contravariant. Note however that - provided that the spacetime metric is galilean (Euclidean or Minkowski), or the object is a tensor also in curvilinear coordinates - this distinction in the input is not relevant, and so contracted indices can be entered as both covariant or both contravariant, in which case they will be automatically rewritten as one covariant and one contravariant. Tensors can have spacetime and space indices at the same time. To change the type of letter used to represent spacetime or space indices see Setup.
|
•
|
During a Maple session, the value of any component of the general relativity tensors of Physics, that is: Christoffel, the covariant derivative D_, Einstein, Ricci, Riemann and Weyl, automatically follow the value or any changes introduced in the components of g_, the spacetime metric, provided these changes are made using Setup or g_ itself.
|
•
|
Besides being indexed with two indices, g_ accepts the following keywords as an index:
|
–
|
determinant: when passed alone, g_returns the determinant of the all-covariant metric g[mu, nu] . If this keyword is passed together with indices, that can be covariant or contravariant, the resulting determinant takes into account the character of the indices.
|
–
|
line_element: (synonym: lineelement) when passed alone, g_ returns the line element for the current metric expressing the differentials of the coordinates using d_.
|
–
|
matrix: (synonym: Matrix, array, Array, or no indices whatsoever, as in g_[]) returns a Matrix that when indexed with numerical values from 1 to the dimension of spacetime it returns the value of each of the components of g_. If this keyword is passed together with indices, that can be covariant or contravariant, the resulting Matrix takes into account the character of the indices.
|
–
|
nonzero: returns a set of equations, with the left-hand-side as a sequence of two positive numbers identifying the element of and the corresponding value in the right-hand-side. Note that this set is actually the output of the ArrayElems command when passing to it the Matrix obtained with the keyword matrix.
|
–
|
<metric name>: some predefined sets of values for the spacetime metric can be used by giving the metric name or a portion of it; currently these are Euclidean, Minkowski, Tolman, Schwarzschild and the metrics of Chapter 12 of Exact Solutions of Einstein's Field Equations (second edition).
|
•
|
Some automatic checking and normalization are carried out each time you enter g_[...]. The checking is concerned with possible unexpected values of the indices. The automatic normalization takes into account the symmetry of g_[mu,nu] with respect to interchanging the positions of the indices mu and nu.
|
•
|
The %g_ command is the inert form of g_, so it represents the same tensor but entering it does not result in performing any computation. To perform the related computations as if %g_ were g_, use value.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
When Physics is initialized, the default spacetime metric is of Minkowski type. You can see the metric querying Setup, as in Setup(metric), or directly entering the metric as g_[], with no indices
>
|
|
| (2) |
The corresponding line element
>
|
|
| (3) |
The default spacetime of the Physics package is a Minkowski spacetime with dimension 4, so the values 0 and 4 represent the same object
>
|
|
| (4) |
>
|
|
| (5) |
The symmetry property of g_ is automatically taken into account when the indices have symbolic values
>
|
|
| (6) |
By default, spacetime indices are represented by greek letters and the dimension of spacetime is 4 - you can query about that via
>
|
|
| (7) |
Set the space indices to be represented by lowercaselatin letters till h
>
|
|
| (8) |
The trace of g_ is equal to the dimension; note the use of the sum rule for repeated indices, both for spacetime and space only indices
>
|
|
| (9) |
>
|
|
| (10) |
>
|
|
| (11) |
>
|
|
| (12) |
Check now the nonzero components of Christoffel, used to construct the g_ tensor entering the definition of g_: because the default spacetime is of Minkowski type, there are none
>
|
|
| (13) |
Hence
>
|
|
| (14) |
and the same is valid for all the general relativity tensors defined in terms of Christoffel and derivatives of the metric g_.
To set the scenario as a curved spacetime set the metric using Setup, for instance indicating the square of the spacetime interval. This can be done directly from g_, choose for example the keyword Tolman; it automatically implies on setting spherical coordinates as the differentiation variables for d_
>
|
|
| (15) |
The corresponding line element
>
|
|
| (16) |
So now
>
|
|
| (17) |
>
|
|
| (18) |
Or for the contravariant components (note you indicate the contravariant character of index prefixing with ~)
>
|
|
| (19) |
The matrix form
>
|
|
| (20) |
Or, for the matrix components of the all contravariant , which as a matrix is equal to the inverse of the all-covariant ,
>
|
|
| (21) |
The metric can also be set using Setup in different ways. Here we enter it by passing the square of the spacetime interval, also called the line element. Because the spacetime coordinates were automatically set to spherical when entering g_[Tolman] you do not need to set the coordinates again. To query about the coordinates use Setup or Coordinates:
>
|
|
| (22) |
>
|
|
| (23) |
Set now the metric to be
>
|
|
| (24) |
>
|
|
| (25) |
(Note that this equation in the output by Setup can be directly used as input for Setup; this is useful to perform minor changes to the metric when desired.)
>
|
|
| (26) |
>
|
|
| (27) |
The all-covariant metric matrix
>
|
|
| (28) |
The determinant of the all-covariant metric
>
|
|
| (29) |
The nonzero components
>
|
|
| (30) |
The nonzero components of the inverse of the metric, that is, the all-contravariant
>
|
|
| (31) |
The general relativity tensors, or expressions involving them, can be expressed in terms of the metric g_ and its derivatives. For that purpose use convert(... g_) as in
>
|
|
| (32) |
>
|
|
| (33) |
Define a tensor for illustration purposes
>
|
|
| (34) |
The covariant derivative of the contravariant vector and its expansion, or rewriting in terms of d_,g_ or Christoffel symbols
>
|
|
| (35) |
>
|
|
| (36) |
>
|
|
| (37) |
>
|
|
| (38) |
>
|
|
| (39) |
>
|
|
| (40) |
Alternatively, spacetime derivatives of the metric can be expressed in terms of Christoffel symbols
>
|
|
| (41) |
>
|
|
| (42) |
In the same line, all of Einstein, Ricci, Riemann and Weyl tensors can be expressed in terms of Christoffel symbols, and so in terms of the metric g_ and its derivatives, for instance,
>
|
|
| (43) |
>
|
|
| (44) |
>
|
|
| (45) |
To compute with a representation for g_ without actually performing the operation, use the inert form %g_. To afterwards perform the operation use value
>
|
|
| (46) |
>
|
|
| (47) |
It is possible to set the metric searching the database of DifferentialGeometry directly from g_. For example
>
|
|
You can now refine the search accordingly, for example choose and automatically set the metric [12, 38, 1] including the corresponding coordinates
>
|
|
| (48) |
The simplification of contracted indices is normally performed using Simplify but you can also perform it using the `.` operator. Define first some spacetime tensors.
>
|
|
| (49) |
Compare the difference between `*` and `.`
>
|
|
| (50) |
>
|
|
| (51) |
So g_[alpha, mu] . A[mu] equivalent to Simplify(g_[alpha, mu] * A[mu], indices). This functionality is particularly useful when handling larger expressions where you want contraction to be simplified only in some places. Consider the following product
>
|
|
| (52) |
You can always Simplify the whole product, as in
>
|
|
| (53) |
Using Physics[`.`], however, you can achieve either the same, or any more selective simplification. Replacing the first `*` by `.`,
>
|
|
| (54) |
Likely (note the parenthesis to indicate the desired order of precedence between `.` and `*`)
>
|
|
| (55) |
and replacing `*` and `.` in the middle of the expression,
>
|
|
| (56) |
When one of the sides of `.` is a nested expression, the simplification of contracted indices is performed recursively, compare for instance
>
|
|
| (57) |
>
|
|
| (58) |
Set the spacetime metric to be the Schwarzschild metric and consider the contraction of all the indices of the Riemann tensor
>
|
|
| (59) |
>
|
|
| (60) |
>
|
|
| (61) |
>
|
|
|
|
See Also
|
|
`.`, ArrayElems, Christoffel, convert, Coordinates, D_, d_, DifferentialGeometry[Tensor][g_], Einstein, Matrix, Physics, Physics conventions, Physics examples, Ricci, Riemann, Setup, Typesetting, value, Weyl
|
|
References
|
|
|
Landau, L.D., and Lifshitz, E.M. The Classical Theory of Fields, Course of Theoretical Physics Volume 2, fourth revised English edition. Elsevier, 1975.
|
|
Stephani, H., Kramer, D., MacCallum, M., Hoenselaers, C. Herlt, E. Exact Solutions of Einstein's Field Equations, Cambridge Monographs on Mathematical Physics, second edition. Cambridge University Press, 2003.
|
|
|