Calculating e.g. Euler density or Riemann tensor's square for a given metric using xAct package

267 views
Skip to first unread message

Debajyoti Sarkar

unread,
Jul 28, 2016, 10:40:50 AM7/28/16
to xAct Tensor Computer Algebra
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!

Leo Stein

unread,
Jul 28, 2016, 8:53:37 PM7/28/16
to Debajyoti Sarkar, xAct Tensor Computer Algebra
Dear Debajyoti,

Please see some of the example files, e.g. KerrNewmanExamples.nb for an idea of how to use the 'original' xCoba tools. However I would recommend using the updated CTensor tools, which are not documented as well. There are a large number of examples in the file xCobaDoc2.nb which is part of the distribution. Especially look at some of the examples in Sections 4 and 5. Once you have input a metric `metric` and its Levi-Civita derivative `cd = CovDOfMetric[metric]`, these computations are as simple as e.g. for the Kretschmann
  Riemann[cd][-a,-b,-c,-d] Riemann[cd][a,b,c,d]
and for the Euler density (in 4 dimensions)
  Riemann[cd][-a,-b,-c,-d] Riemann[cd][a,b,c,d] - 4 Ricci[cd][-a,-b] Ricci[cd][a,b] + RicciScalar[cd][]^2

Best
Leo

--
You received this message because you are subscribed to the Google Groups "xAct Tensor Computer Algebra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xact+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Debajyoti Sarkar

unread,
Jul 29, 2016, 8:30:16 AM7/29/16
to Leo Stein, xa...@googlegroups.com
Dear Leo

Thanks so much for your reply!! I looked at the Kerr-Newman example before (which was on the webpage) but it didn't help me much. However, some of the section 5 examples of xcobadoc2.nb (which I somehow didn't know existed) were really helpful. In fact, the commands there are a bit different from what I knew so far. Anyway, thanks again! Now I can compute any combination of such curvature quantities..

Best,
Deb



--
Dr. Debajyoti Sarkar
Arnold Sommerfeld Center
Ludwig Maximilian University

Room 316
Fakultät für Physik
Theoretische Physik
Theresienstr. 37
80333 München
Reply all
Reply to author
Forward
0 new messages