Raising and lowering indices with charts in xCoba

985 views
Skip to first unread message

Philippe Berger

unread,
Mar 26, 2014, 3:08:18 PM3/26/14
to xa...@googlegroups.com
I am new to xAct and am trying to use xCoba to do some simple calculations on a flat FRW background, but I don't want get involved with the 3+1 splitting of xPand right now. First I define a Chart and then I define MetricInBasis. MetricCompute then goes and computes all the nice things we like, like the inverse of the metric. You'd think that the package can now raise and lower indices with this metric but it's not working with the naive way I'm trying. Let's say I define a vector u,

DefTensor[u[-a],M]

and then I go and identify it with the Hubble flow, in the coordinate basis,

ComponentValue[ComponentArray[u,{-B}],{-A[t[]],0,0,0}]

This works just fine, if I ask for TensorValues[u] it has made the proper indentifications.

But then if I go and ask for

ComponentArray[u[{a,B}]] // ToValues

it doesn't know what those values are. It wasn't able to invert the vector with metric. Maybe the problem is that I have circumvented bases (cartesian or polar) and have gone straight to Chart with coordinates t[],x[],y[],z[]. Also I hope with this simple application I'm not defeating the purpose of xAct all together.

Thanks for any suggestions!

Alfonso García-Parrado Gómez-Lobo

unread,
Mar 26, 2014, 5:25:42 PM3/26/14
to Philippe Berger, xa...@googlegroups.com
Hi,


> Let's say I define a vector u,
>
>
> DefTensor[u[-a],M]
>
>
> and then I go and identify it with the Hubble flow, in the coordinate
> basis,
>
>
> ComponentValue[ComponentArray[u,{-B}],{-A[t[]],0,0,0}]
>
>
> This works just fine, if I ask for TensorValues[u] it has made the
> proper indentifications.
>
>
> But then if I go and ask for
>
>
> ComponentArray[u[{a,B}]] // ToValues
>
>
> it doesn't know what those values are. It wasn't able to invert the
> vector with metric. Maybe the problem is that I have circumvented
> bases (cartesian or polar) and have gone straight to Chart with
> coordinates t[],x[],y[],z[]. Also I hope with this simple application
> I'm not defeating the purpose of xAct all together.
>
If you give values to the components of u with the indices downstairs
then the components with the indices upstairs are not computed
automatically, despite having used MetricCompute to compute the
components of the metric and its inverse. You have to compute the
components with the indices upstairs separately. There are a number of
different ways of doing this, my favorite one is by means of MakeRule.
Here is the code adapted to your situation (g = metric tensor):

In:=
u[a]==(u[a]/.MakeRule[{u[-a],u[-a]},MetricOn->All,ContractMetrics->False])

Out= u[a]==g[a,b]u[-b]

In:= ToValues@ComponentArray[TraceBasisDummy/@(ToBasis[B]/@%)]

Out= List of components of u with indices upstairs.

If you have further questions or need additional help with this code,
please post a notebook with (a sample) of your computations.

Regards,

Alfonso.

Reply all
Reply to author
Forward
0 new messages