Set up a coordinate system to work with - the first one to be set is automatically taken as the differentiation variables for d_, the covariant derivative D_ and the dAlembertian
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
Check the nonzero components of Christoffel, used to construct the Weyl tensor entering the definition of Weyl: because the default spacetime is of Minkowski type, there are none
Hence
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. In this example, we also choose to work in spherical coordinates, so consider for instance the metric defined by
To avoid the repeated display of the functionality in in the following examples and have the display of derivatives in jet notation, indexed, use CompactDisplay
Now when the indices are not numerical, Weyl returns itself after normalizing its indices taking advantage of their symmetry properties, so that different forms of the same tensor enter computations in the same manner, for example, if you interchange the positions as in
The definition of the Weyl scalars in terms of the null vectors l_, n_, m_ and mb_ of the Newman-Penrose formalism (see Tetrads), and the scalars themselves for the spacetime metric (9)
Note that these scalars depend on the choice of orientation for the axis of the tetrad system of references. To change the tetrad or that orientation of axis see Tetrads:-TransformTetrad. These same scalars can be computed with the Tetrads:-WeylScalars, which, when called with no arguments, it computes the scalars for the tetrad set, so the same way as Weyl[scalars] above
The scalars above are constructed using the scalars definition shown lines above departing from the tetrad
With WeylScalars, however, you can also compute the scalars for any given tetrad. Construct, for example, one possible different form of a tetrad, say one for which , via
To verify that a 4 x 4 matrix is a valid tetrad, i.e., satisfies the tetrad definition,
you can use IsTetrad
Now, without setting this tetrad using Setup, compute the corresponding Weyl scalars:
We see in this result the expected . When the tetrad is what you want or produces the Weyl scalars you expect, you can set it the standard way using Setup, as in Setup(tetrad ...) where the right-hand side is the 4x4 matrix.
Back to the Weyl tensor, to express it in terms of the Riemann tensor, the Christoffel symbols and its derivatives, or the metric g_ itself, use convert
Check the value of , say for , = 2, = 2, = 4
Check now the value of , with the 1st index contravariant, for the same values of the indices (note you enter the value of the contravariant index prefixed by ~)
To compute with a representation for Weyl without actually performing the operation, use the inert form %Weyl. To afterwards perform the operation use value
The all-covariant and all-contravariant components of the Weyl tensor as Arrays
The (nonzero) Array elements of any these arrays can be computed using ArrayElems.
The nonzero values of and of (note you enter the character of the contravariant indices prefixed by ~)
This is the array form of (note you enter the character of the contravariant indices prefixed by ~)
To use this array, because its components were computed already taking into account the (covariant/contravariant) character of its indices, you do not need to indicate furthermore that character. So for we have
>
|
|
Compare with the output obtained entering Weyl[~1, 2, 2, 4] in eq (14)
Verify that the Weyl tensor vanishes when contracted on a pair of indices; take for instance the 1st and 3rd indices, you can see the corresponding matrix (note the first index as contravariant)
Add the four matrices completing the contraction of indices
In different contexts it is sometimes necessary to classify the spacetime, for instance performing a PetrovType classification, or the SegreType classification of the Ricci tensor. These classification commands are in the Tetrads package. For example, for the spacetime considered, we have