xCoba basic question

779 views
Skip to first unread message

miliosan

unread,
Oct 2, 2010, 5:29:50 AM10/2/10
to xAct Tensor Computer Algebra
Hi,
I'm trying to use xCoba to compute values for expressions involving a
metric, its derivatives, and a scalar field. I'm working in a FLRW
universe. After computing, with MetricCompute, all the tensors of GR,
I'm not be able to valuate a simple expression. I use ToValues, for
example:

ToValues[metric[a, b] PD[-b][PD[-a][\[Phi][]]] +metric[a, b]
metric[c, d] PD[-a][\[Phi][]]PD[-d][metric[-b, -c]]],

gives me:

ChristoffelPDB[{3, B}, -b, -a] metric[a, b] + Basis[-a, {3, B}]
metric[a, b] metric[c, d] PD[-d][metric[-b, -c]].

Also if I put:
ToValues[metric[a,b]]

it doesn't display any result (I know for the metric there is a better
way to display its components), but I can think it like a general
expression, and I want only that ToValues substitutes the values seted
for the metric in the expression.
What is the way to do it?

Thank you!

TB

unread,
Oct 2, 2010, 12:22:38 PM10/2/10
to xAct Tensor Computer Algebra
Hi!
I think your problem is that you have abstract indices in your
expressions. You can not get a value of an abstract tensor, you can
only have values with respect to a basis.

For instance you can define a coordinate basis by
DefChart[B4,M4,{0,1,2,3},{t[],r[],\[Theta][],\[Phi][]}]
or something similar.
Then if you compute
TableOfComponents[g[-a, -b], B4]
you can take
ToValues[%]
on that to get your values.

You can also do somehting like
g[-a, -b] // SeparateBasis[B4] // TraceBasisDummy // ToValues
to expand the metric in the basis.

I hope this gives you an idea of how things might be done. If you have
more questions - keep asking.

Regards
Thomas

miliosan

unread,
Oct 2, 2010, 6:05:01 PM10/2/10
to xAct Tensor Computer Algebra
Thanks Thomas,
your solution work well, except with expressions involving
derivatives.. I understood the difference between abstract and basis
index, but I can't evaluate this:

PD[-a][metric[-b,-c]]

Here I have three abstract indices, when I want to replace these with
basis index the result contain terms like this:

ChristoffelPDchart[{a,chart}][-{b,chart},-c]

that I cannot evaluate. In the guide motivate these terms observing
that v[-a]PD[-b][v[a]] is not equal to v[-{a,chart}]PD[-b][{a,chart}],
but I think it's equal to v[-{a,chart}]PD[-{b,chart}][{a,chart}]. And
this is the expression I want..

I've also tried a brutal ReplaceIndex, it works with this example, but
it doesn't with more complicated tensors (I tried with RicciScalar),
in the sense that leave the same expression with all abstract index..

Any hint?

Thanks!
Emilio

Alfonso Garcia-Parrado

unread,
Oct 3, 2010, 12:40:21 PM10/3/10
to miliosan, xAct Tensor Computer Algebra
Hi Emilio,

> Thanks Thomas,
> your solution work well, except with expressions involving
> derivatives.. I understood the difference between abstract and basis
> index, but I can't evaluate this:
>
> PD[-a][metric[-b,-c]]
>
> Here I have three abstract indices, when I want to replace these with
> basis index the result contain terms like this:
>
> ChristoffelPDchart[{a,chart}][-{b,chart},-c]
>
> that I cannot evaluate.

Use ToBasis[chart]@ToBasis[chart][PD[-a][metric[-b,-c]]]. This gives you
something with no abstract indices. See section 2.4 of the file
xCobaDoc.nb for further explanations.

Regards,

Alfonso.

miliosan

unread,
Oct 4, 2010, 4:46:59 AM10/4/10
to xAct Tensor Computer Algebra
Hi Alonso,
your way give something without abstract indices, but now how can I
evaluate the components of this?

ChristoffelPDchart[{a,chart}][-{b,chart},-{c,chart}]

I have values only for ChristoffelCDPDchart.. Have I to define the
basis in coordinates explicitly? And, in this case, how can I do this?

Thank you!

On 3 Ott, 18:40, Alfonso Garcia-Parrado <alfo...@math.uminho.pt>
wrote:

Alfonso Garcia-Parrado

unread,
Oct 4, 2010, 2:01:13 PM10/4/10
to miliosan, xa...@googlegroups.com
Hi Emilio,

> Hi Alonso,
> your way give something without abstract indices, but now how can I
> evaluate the components of this?
>
> ChristoffelPDchart[{a,chart}][-{b,chart},-{c,chart}]
>


Use the command ComponentArray. This will return a multi-dimensional
array computed by giving all possible values to the basis indices.

I would advise you to study carefully the documentation file xCobaDoc.nb
in the Documentation directory, where you will find detailed
explanations about how to handle components within xCoba (in particular
about the usage of ComponentArray, which I just sketched here).

> I have values only for ChristoffelCDPDchart.. Have I to define the
> basis in coordinates explicitly? And, in this case, how can I do this?
>

It seems that the problem which you described in your first post shares
many similarities with the example worked out in the example file
KerrNewmanExamples.nb under the directory xCoba of the xAct root
directory. Again I recommend you to look into this example file in
detail. If after that you still have specific questions, I would ask you
to post a notebook with your computations, indicating where the
difficulties are.

Best regards,

Alfonso.


Reply all
Reply to author
Forward
0 new messages