Kerr-Schild in xAct

1,537 views
Skip to first unread message

NoName

unread,
May 15, 2012, 5:32:52 PM5/15/12
to xAct Tensor Computer Algebra
Hello, I am interested in using xAct to perform long calculations
using the Kerr-Schild formulation.

Essentially, what I need is to define a metric as follows:

g[-a,-b] = mink[-a,-b] + H(t,x,y,z)*K[-a]*K[-b]

where mink[-a,-b] is Minkowski's tensor (-1,1,1,1, and all off-
diagonal components are zero), H a scalar field and K[-a] a null,
geodesic and shear-free vector.

I have several questions. First, how do I manually set the values of a
tensor? Since Minkowski's tensor is so simple, I want to set the
numerical values by hand, but I've had no luck finding a way to do
this in the documentation.

I've defined all the tensors and the scalar field, but I don't know
how to set the metric to equal the equation above.

I also would like to have some help to ensure xAct applies the
constraints I have (null, geodesic and shear-free) to the calculation
of the Ricci tensor and Ricci scalar, but we can cross that bridge
when we get to it.


Thank you very much for any help.

NoName

unread,
May 22, 2012, 12:35:49 PM5/22/12
to xAct Tensor Computer Algebra
In the xCoba documentation it says "We need some convenient way to
store all the values of the components of a tensor (or, more
generally, an arbitrary expression). xCoba` provides several tools to
accomplish this, optimised to make full use of the symmetries. This
section describes how to store and use these values, but not how to
compute them. The latter is the object of Section 9 (not yet fully
implemented)."

I figured out how to write the Minkowski tensor, but not the metric.
Does this mean that even if I managed to write the metric the way I
want, xCoba wouldn't be able to calculate the Ricci tensor anyway?

Thanks for any assistance.
Felipe.

Jose

unread,
May 22, 2012, 12:52:38 PM5/22/12
to xAct Tensor Computer Algebra
Hi Felipe,

As usual with xAct, it is best to try to do as much as possible with
xTensor only and then move to xCoba for component computations. In
xTensor you can work with the Minkowski metric using the option
FlatMetric->True in DefMetric. See section 7.7 of xTensorDoc.nb.

Concerning component computations, there is the command MetricCompute
in xCoba to find all curvature tensors of a given metric given in a
coordinated basis. See the example notebook

http://www.xAct.es/xCoba/KerrNewmanExamples.nb

Cheers,
Jose.

NoName

unread,
May 22, 2012, 1:01:36 PM5/22/12
to xAct Tensor Computer Algebra
Hello, thanks for your reply.

Yes, I did find MetricCompute, but I still don't know how to specify a
metric for xTensor or xCoba, since I want it to be a sum of other
tensors that obey certain relations (null, geodesic and shear free).

I of course tried to see the examples KerrNewmanExamples.nb and
Schwarzschild.nb, but the former won't show me anything since I'm
using Mathematica 7.0 (I don't know why only this notebook has
problems and all others don't) and the latter I can't find, the host
site at http://metric.iem.csic.es/Martin-Garcia/xAct/index.html seems
to be down.

In short, all I need is to know how to specify a metric composed of
the sum of other tensors and how to impose relations on those tensors.
I can take it from there.

Thank you again.
Felipe.

NoName

unread,
May 22, 2012, 3:44:32 PM5/22/12
to xAct Tensor Computer Algebra
I tried to directly give an equation for the metric as follows:

ComponentValue[metric[{1,-cartesian},{1,-cartesian}],mink[-1,-1] +
H[]*K[-1]*K[-1]]

I get a few orange messages that I imagine are warnings and not
errors, they say "IndexForm::nouse: Attempting to apply IndexForm on
1."
After a few of those, they are supressed and then I see what looks
like the confirmation of the equation having been entered correctly.

Has the metric been set correctly? I really don't understand what
these orange messages mean.

Felipe.

Barry Wardell

unread,
May 23, 2012, 1:08:38 PM5/23/12
to NoName, xAct Tensor Computer Algebra
Hi Felipe,

You could try using the Metrics package [https://github.com/barrywardell/Metrics]. This includes a collection of common metrics (including Kerr-Schild) and supports loading them into xAct. You would just load the LoadMetric package and then run

LoadMetric["KerrSchild"]

to load the KerrSchild metric. There are some examples in doc/Examples.nb and in tests/tests.nb.

Barry

Jose

unread,
May 23, 2012, 5:00:45 PM5/23/12
to xAct Tensor Computer Algebra
Hi again,

In xCoba you always need to specify the basis you use for component
indices. In your call to ComponentValue you use metric[{1,-cartesian},
{1,-cartesian}] on the left, and that is correct. But you use
mink[-1,-1] and K[-1] on the right and that might be inconsistent if
you have defined mink and K as tensors with DefTensor.

The IndexForm message comes from the fact that the index 1 cannot be
formatted, because its basis is unknown. From the fact that the index
is trying to format I guess that mink and/or K are actually being
defined as tensors and they do not evaluate to anything. xCoba ignores
this formatting problem and continue to give you what you consider a
correct result, but you might find later problems in other
computations because 1 is not a valid index.

I'd recommend to read section 7 of xCoba.nb, "Assigning values to
components".

Cheers,
Jose.

NoName

unread,
May 29, 2012, 3:02:44 PM5/29/12
to xAct Tensor Computer Algebra
I seem to have everything in order, including the 3 tensorial
equations I needed (null, geodesic and shear-free), I gave rules for
the Minkowski tensor and the metric, and when I asked for the Ricci
tensor, xCoba did not report any errors. However, when I asked to see
the Ricci tensor, I got:

TensorValues[Ricci, {{-cartesian, -cartesian}}]

TensorValues::unknown: Unknown input {Ricci,{{-cartesian,-
cartesian}}}.
Throw::nocatch: Uncaught Throw[Null] returned to top level.

I don't understand what the problem is, I see no error reports in the
entire notebook. I was expecting maybe a collection of giant equation
or a message saying the equations are too long to print, but not this.
Can someone please explain the problem?

Regards.
Felipe.

Jose

unread,
Jun 2, 2012, 5:10:09 PM6/2/12
to xAct Tensor Computer Algebra
Hi Felipe,

You have to specify the correct name of the tensor, something like
RicciCD. It cannot be Ricci only because you could be working with
many covariant derivatives at the same time and each one would have
its one Ricci tensor.

Cheers,
Jose.

NoName

unread,
Jun 3, 2012, 1:27:56 AM6/3/12
to xAct Tensor Computer Algebra
Oh, that doesn't give me an error message, thank you very much.

Felipe.
Reply all
Reply to author
Forward
0 new messages