Dear all,
I have started to learn about the xAct package to do some general relativistic calculations and I am still in the lower part of the learning curve. As the title suggests, this is a very basic question, but I am having a hard time to get the answer. I have installed the package and all its components properly, so there're no issues there.
I started with
<< xAct`xTensor`
<< xAct`xCoba`
<< xAct`xTras`
as I think these will be eventually needed. After that I am simply going ahead in the usual way to define the metric:
DefManifold[M, 4, IndexRange[a, q]]
DefMetric[-1, metric[-a, -b], CD, PrintAs -> "g"]
DefScalarFunction[σ]
DefScalarFunction[$N]
DefScalarFunction[R]
MatrixForm[fm = {
{-E^(2 σ[z[]]), 0, 0, 0},
{0, $N[z[]]^2 E^(2 σ[z[]]), 0, 0},
{0, 0, R[z[]]^2 E^(2 σ[z[]]), 0},
{0, 0, 0, R[z[]]^2 Sin[θ[]]^2 E^(2 σ[z[]])}
}]
MetricInBasis[metric, -B, fm]
MetricCompute[metric, B, All, CVSimplify -> Simplify]
This defined the metric tensor and also assigns a basis vector. It also uses the matrix's elements of "fm" as the metric tensor. So I have defined a given metric. The last input calculates several things together such as Riemann Tensor, Christoffel symbol and so on..
From here on, if I want, I can compute Ricci scalar or any function of it. I can also e.g. find out what are the components of Riemann tensor e.g. But what I can't seem to compute is what is the value of $Rs=R_{abcd}R^{abcd}$ for this given metric. I can only write it in a symbolic form, but not evaluated for the given metric and basis.
I tried commands like
TensorValues[RiemannCD[-B, -B, -B, -B] RiemannCD[B, B, B, B]] //
ToValues[metric]
or
TensorValues[Rs] // ToBasis[B] // ToValues
etc.
but none of these are working. I also can't seem to find any such example anywhere!