Levi-Civita tensor in tensor definitions

791 views
Skip to first unread message

Zach Elgood

unread,
May 12, 2016, 1:40:41 PM5/12/16
to xAct Tensor Computer Algebra
Hello,
I have recently started using xAct and am trying to find a way to implement the Levi-Civita tensor in order to do calculations.  For example, I wish to calculate the curl, so I want to use MakeRule to define a new tensor somewhat like below

MakeRule[{w[-a],epsilon[-a,-b,-c,-d]*u[b]*CD[c][u[d]]},MetricOn->All]

where the epsilon term is the Levi-Civita tensor. I can't seem to find any way to do this, though I may have missed something in the documentation.

Thomas Bäckdahl

unread,
May 12, 2016, 1:46:56 PM5/12/16
to xa...@googlegroups.com
Hi!

You made it almost right.
epsilon is not the Levi-Civita tensor itself, it is a function that takes the metric and gives the Levi-Civita tensor for that metric.
If your metric is called g, then epsilon[g] gives the correct name of the Levi-Civita tensor, which is epsilong in that case.
Hence, change epsilon to epsilon[g] or epsilong in your code, unless your metric is called something else.

Regards
Thomas
--
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.
For more options, visit https://groups.google.com/d/optout.

Leo Stein

unread,
May 12, 2016, 1:46:58 PM5/12/16
to Zach Elgood, xAct Tensor Computer Algebra
Hi Zach,

Every metric defines its own volume form (and they are all proportional to each other; see e.g. MTW Eq. (8.10).

If you named your metric met[-a,-b], then the associated volume form will be named epsilonmet[-a,-b,-c,-d]. You should have seen this name printed out as one of the auxiliary tensors defined by DefMetric[].

You can also access this tensor via epsilon[met][-a,-b,-c,-d] if you want to be more programmatic in some places.

L

--

Zach Elgood

unread,
May 26, 2016, 12:04:44 PM5/26/16
to xAct Tensor Computer Algebra, zache...@gmail.com
Thank you very much for the reply; it works perfectly. One small question. In my example above, I had a separate expression for the tensor u. Let say I have AB = MakeRule[{w[-a], epsilon[met][-a, -b, -c, -d] u[b] CD[c][u[d]]}, 
  MetricOn -> All], so w[-a]/.AB gives the result I wish. If I also had an expression for u, say AA=MakeRule[{u[-a],PD[-a]x},MetricOn->All], how would I be able to substitute that expression into my final tensor. In other words, is it possible to make nested substitutions for the tensors?
Reply all
Reply to author
Forward
0 new messages