xCoba does not calculate tensors with MetricCompute

65 views
Skip to first unread message

Albin Nilsson

unread,
Jan 17, 2018, 3:52:52 AM1/17/18
to xAct Tensor Computer Algebra
I have followed the example in KerrNewmanExamples.nb and tried to set up a similar environment for my metric. 

I have a spherically symmetric spacetime containing arbitrary functions:

MatrixForm[Metric = {
{-Exp[-2r Phi[r]], 0,0,0},
{0,1/(1-b(r)/r), 0,0},
{0,0,r^2,0},
{0,0,0,r^2 Sin[Theta]^2}
}]


and I am trying to calculate all the tensors using MetricCompute: (I have followed all the steps in the example, defined coordinate chart CC, manifold etc. If I copy the metric from the example to my code, it works)

MetricCompute[Metric, CC, All, CVsimplify -> Simplify]

This command gives the following output:

** DefTensor: Defining weight +2 density DetmetricCC[]. Determinant.
** DefTensor: Defining tensor ChristoffelCDPDCC[a,-b,-c].

and nothing else. If I run

MetricCompute[metric,CC,"Riemann"[-1,-1,-1,-1],CVSimplify-> Simplify]

nothing at all happens.


Does anyone have any idea as to what is going on?
Thanks in advance!




Jose

unread,
Jan 17, 2018, 10:27:33 AM1/17/18
to xAct Tensor Computer Algebra
Hi,

Note that in xCoba the metric field must be given in terms of coordinate fields, so you need to express Metric in terms of the scalar field r[], and not just r. Try changing r to r[] and Theta to Theta[] in the definition of Metric.

Note you also need to declare b and Phi using DefScalarFunction.

In general, it is always a better idea to send full code for a minimal example that reproduces the problem, so that we can run it.

Cheers,
Jose.

Albin Nilsson

unread,
Jan 26, 2018, 9:33:05 AM1/26/18
to xAct Tensor Computer Algebra
Hi, 

this solved the problem, thanks!
Reply all
Reply to author
Forward
0 new messages