Calculate Lie derivative in xCoba

20 views
Skip to first unread message

Haruhi Suzumiya (LaplaceSpell)

unread,
Jul 7, 2024, 6:25:27 PM (9 days ago) Jul 7
to xAct Tensor Computer Algebra
Hi, I am new to xCoba in xAct. I have come into a problem on manipulating the result of function `LieD` in xTensor with xCoba. Here is my code:
```
<< xAct`xCoba`;
DefManifold[M, 4, {\[Mu], \[Nu], \[Sigma], \[Alpha], \[Beta], \[Gamma]}];(*Manifold*)
dimM = DimOfManifold[M]; dimMs = dimM - 1 ;
DefChart[nhek, M, {0, 1, 2, 3}, {\[Tau][], y[], \[Theta][], \[Phi][]}, ChartColor -> Blue];
DefConstantSymbol[J, PrintAs -> "J"];
DefScalarFunction[f1, PrintAs -> "f1"]; 
DefScalarFunction[f2,PrintAs -> "f2"]; 
DefScalarFunction[f3, PrintAs -> "f3"];
DefConstantSymbol[w, PrintAs -> "w"];
g = CTensor[
   {{(1 + Cos[\[Theta][]]^2) J^2 (y[]^2 -
         1) - (4 J^2 Sin[\[Theta][]]^2/(1 +
            Cos[\[Theta][]]^2))*(y[] - 1)^2, 0,
     0, (4 J^2 Sin[\[Theta][]]^2*I*(y[] - 1)/(1 + Cos[\[Theta][]]^2))},
    {0, (1 + Cos[\[Theta][]]^2) J^2/(y[]^2 - 1), 0, 0},
    {0, 0, (1 + Cos[\[Theta][]]^2) J^2, 0},
    {(4 J^2 Sin[\[Theta][]]^2*I*(y[] - 1)/(1 + Cos[\[Theta][]]^2)), 0,
      0, (4 J^2 Sin[\[Theta][]]^2/(1 + Cos[\[Theta][]]^2))}}
   , {-nhek, -nhek}];(*NHEK metric*)
SetCMetric[g, nhek, SignatureOfMetric \[RightArrow] {3, 1, 0}];

\[Zeta] = CTensor[Exp[I w \[Tau][]]*{f2[], f1[], 0, f3[]}, {nhek}];

cd = CovDOfMetric[g];

rt = Riemann[cd][-\[Mu], -\[Nu], -\[Alpha], \[Beta]];
h = LieD[\[Zeta][\[Gamma]]][g[-\[Alpha], -\[Beta]]]
```
Then I want to further manipulate h, but then I came into some problem that I cannot raise the index of h
```
h[-\[Alpha], \[Beta]]
```
It tells me that MetricsOfVBundle::missing. But I have already define the metric here.
My question is how to solve such problem, and what is the result of LieD (This is defined in xTensor). Or is there any other methods to do Lie derivative in xCoba (without directly use definition of Lie derivative)?

Thank you in advance!

Leo Stein

unread,
Jul 7, 2024, 7:03:14 PM (9 days ago) Jul 7
to Haruhi Suzumiya (LaplaceSpell), xAct Tensor Computer Algebra
Dear Haruhi,

There is one very subtle issue that is unrelated to xAct/xTensor/xCoba, which I missed at first reading. Notice that in your call to SetCMetric, your last argument is
    SignatureOfMetric \[RightArrow] {3, 1, 0}
instead of
    SignatureOfMetric -> {3, 1, 0}
so SetCMetric is confused. Both the arrow that arises from a->b (which has the FullForm Rule[a,b]) and the arrow that arises from \[RightArrow] look the same, but have different meanings in Mathematica. So your code had never set a CMetric at all. If you remove the semicolon after the call to SetCMetric you will see that it just returns "SetCMetric[...]", that is, it did not evaluate to anything.

There are two more small bits to fix in your code. First, in the vector \[Zeta], each of f1, f2, and f3 are ScalarFunctions, not scalar fields. If you want them to be arbitrary functions of each of your coordinates, they should be e.g. f1[\[Tau][], y[], \[Theta][], \[Phi][]] instead of f1[]. Easier to read shorthand for this is
    scalars = ScalarsOfChart[nhek];
    f1@@scalars (* same as f1[\[Tau][], y[], \[Theta][], \[Phi][]] *)

The last problem is that what you wrote as "h" already has indices, which you must remove to get a CTensor object so that you can move indices up and down. For example, we could write
    hdowndown = LieD[\[Zeta][\[Gamma]]][g[-\[Alpha], -\[Beta]]]
    h = Head[hdowndown];
    hupup = h[\[Alpha], \[Beta]]
and this way h is a CTensor, and hupup has the indices moved.

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/xact/f09a9d23-d44a-438b-a65e-8c5961297f9cn%40googlegroups.com.

Pan Di

unread,
Jul 7, 2024, 10:57:48 PM (8 days ago) Jul 7
to Leo Stein, xAct Tensor Computer Algebra

OMG this is such a nice and clear answer! I have solved my problem ! Thanks Leo !

Sincerely,

Haruhi

Reply all
Reply to author
Forward
0 new messages