Questions tagged [xact]

Questions about xAct, a suite of packages for tensor computer algebra, which includes the packages xCore, xPerm, xTensor, and xCoba.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

xAct: How to identify and split module dummy indices?

Hi I'm using the package xAct but I'm running into an issue. It seems that before using //ChristoffelToGradMetric the christoffel connection has indices (which can ...
user avatar
  • 1
0 votes
0 answers
61 views

Counting multiple $-sign string indices in output and replacing them by normal indices

I'm using the package xTensor in xAct. My issue is that inside a module indices are replaced by strings of the form $##### which make the final output unreadable. In a related post Print expressions ...
user avatar
  • 1
1 vote
0 answers
23 views

Commutation of the partial derivatives on scalar in xAct

I do not know how to automatically commute partial derivatives on a scalar and simplify it. For example, if I have: $$\partial_a \partial_b \partial_c f- \partial_c \partial_a \partial_b f $$ where $f$...
user avatar
  • 57
2 votes
1 answer
46 views

Symbolic representation of large output

The package xAct does something really nice when it handles large outputs, which is to represent the expression as a symbol and display that symbol when the cursor hovers over it. For example, ...
user avatar
  • 413
1 vote
0 answers
42 views

How to use VarD to vary $\partial T$

I know that how the VarD works which is $ VarD[T, covd][expr] $. What about when I want to vary to a partial of a tensor ($\partial T)$? Let me say a simple question I wanted to test: $ L = \partial_{...
user avatar
  • 57
2 votes
1 answer
59 views

in xAct, how to set the components of a tensor to be zero

OBASuppose there is a vector $A^{a}$ appears in the result in different component form like $A^{\mu},A^{\nu},A^{\alpha}...$, I want all of them to be zero because the components of the tensor are zero,...
user avatar
  • 33
3 votes
1 answer
86 views

how to split indices for a Spinor object?

I am wondering if anybody can help me with my question. My main relation is from gravity and is known as self-dual Riemann. When it is written in the Spinorial form it is like: $$G_{\mu \nu \alpha\...
user avatar
  • 57
1 vote
1 answer
38 views

xAct : how to define f to be a function of two variables?

f is a function of the coordinates x and y, how can I use the command DefScalarFunction to do this? ...
user avatar
  • 33
0 votes
0 answers
30 views

calculate the component of a tensor-like quantity using xCoba,and how to use ContactBasis ,TraceBasisDummy

I am trying to do perturbation, it involved terms like this: $\partial_{l}(g^{lp} g^{kq} h_{pq}) (\partial_{i}g_{jk}) $ I want to obtain the simplified result of the components {i,j} all other indices ...
user avatar
  • 33
0 votes
0 answers
16 views

"Uncaught Throw[Null]","VBundleOfMetric" and "MetricsOfVBundle" when using package "xAct"

The codes are below: Remove["Global`*"] Then: ...
user avatar
2 votes
0 answers
55 views

Manipulating tensorial terms with xAct, ToCanonical is not perfoming well

I am trying to calculate perturbations of some complicated Lagrangians. Using xAct and more specifically VarD to perform the perturbations the expressions become ...
user avatar
  • 21
2 votes
0 answers
52 views

Not able to impose rules on xPert perturbations

Whenever I try to define rules to xPert perturbations, they seem not to work at all. For instance, I am interested in considering traceless and divergence-free perturbations and defining ...
user avatar
1 vote
0 answers
68 views

xAct tensor product

I am a beginner of xAct for computation in GR. I am doing component computation in specified charts, and quite often I need to extract the list of components by the function ...
user avatar
2 votes
2 answers
225 views

xAct xCoba: How to extract components of CTensors correctly

I'm working in a specific chart ch with a metric and associated covariant derivative cd: ...
user avatar
  • 23
0 votes
0 answers
49 views

amount of Riemann scalar on a spherical shell in xAct

how can I Calculate the amount of Riemann scalar on a spherical shell? (i used xCoba and I defined a manifold, then I defined a metric and a chart with theta and phi coordinates but I don't know how ...
user avatar
0 votes
0 answers
52 views

velocity four-vector definition by xAct

I want to define the velocity vector by the following relation and evaluate the norm of the vector by using the Minkowski metric. I have defined the tensor x (position tensor) in xAct, but I don't ...
user avatar
2 votes
1 answer
82 views

Calculating the Laplacian operator using xCoba

I would like to attempt to calculate the laplacian operator using index notation and shoow that it gives the usually expected laplacian in spherical coordinates. I am able to do most of the steps ...
user avatar
  • 635
2 votes
1 answer
124 views

Dealing with covariant derivatives (xCoba)

I do not understand why the output of the two commands: ...
user avatar
2 votes
2 answers
106 views

Taking partial derivatives of a scalar function with a defined basis and chart in xCoba/xAct

I want to work in the Schwarzchild metric in 2 dimensions with the coordinates $v, r, \theta$. My hope was that I could define a scalar function made up of 2 other scalar functions: $$\Psi(v,r,\theta) ...
user avatar
  • 635
1 vote
0 answers
59 views

Perturbation of Einstein tensor around a fixed background in Xact [duplicate]

I want to compute Ricci tensor expansion around a fixed curved background. It is easy to find the formal expansion around the background metric, but I have a reference metric with known components and ...
user avatar
  • 149
0 votes
0 answers
98 views

Metric perturbation calculations in xAct

Any hints to calculating the following two-point function, which is not time-ordered, in xAct? $$ \begin{equation} <h_{\mu\nu}(x) h_{\alpha\beta}(y)> \end{equation} $$ ...
user avatar
1 vote
0 answers
56 views

Use xTensor to do the Ricci decomposition

I am new to xTensor. I would like to perform the Ricci decomposition with xTensor, but I do not have any clue. I want to replace the full expression $R_{i,j,k,l}=S_{i,j,k,l}+E_{i,j,k,l}+W_{i,j,k,l}$ ...
user avatar
2 votes
0 answers
58 views

Covariant divergence in xAct

I'm using xAct for calculation of expansion scalar for Kerr in Boyer-Linquist coordinates. Expansion scalar is given as a covariant divergence: with where \Delta and \Sigma are defined as In the ...
user avatar
3 votes
1 answer
76 views

Neglecting higher order derivatives terms in xAct

For some gravity theory coupled to a scalar field $\phi$, I obtain, in xAct, the equations of motion $$\mathcal{E}_{ab}=R_{ab} (\nabla_{c}\phi \nabla^{c}\phi) + 2 R \nabla_{a}\phi\nabla_{b}\phi + 6 \...
user avatar
4 votes
1 answer
144 views

Evaluating covariant derivative terms of a scalar function (xAct, xTras)

I am trying to use xAct package to calculate certain mixing terms of $\nabla_{\chi} b$ of a scalar function $b[ \tau, r, \theta, \phi]$ for a modified metric. Here is my Code: ...
user avatar
1 vote
0 answers
92 views

Basis object appearing

I want to calculate explicitly an expression involving covariant derivatives of a Riemann tensor. However, in the output I get Basis with indices generated, which I am not sure how to get rid off and ...
user avatar
  • 111
1 vote
0 answers
54 views

Problem initializing xTensor package

I am using Mathematica 12.2 on Windows 10 and I am using the xTensor package for my tensor calculations. However, since today, I cannot run the xTensor package. I get the following error. Can anybody ...
user avatar
  • 111
1 vote
1 answer
167 views

Converting tensorial expressions in xAcT to LaTeX

I'm trying to convert tensorial expressions from xAct to LaTeX format using the TeXForm command. This seems to work fine when using covariant derivatives (As in Copy xAct expression to LaTeX). However,...
user avatar
0 votes
0 answers
74 views

How To Define An Outer Product (in xAct)?

I am working with xAct / xCoba / xTras and I would like to construct a matrix out of a vector. So, I have a vector V on a manifold ...
user avatar
  • 151
2 votes
1 answer
144 views

Contracting a Tensor with a CTensor in xAct

I'm trying to contract two tensors that I made in xAct to get a simple result. First I set up a Cartesian space ...
user avatar
  • 765
1 vote
0 answers
166 views

How to define a divergence-free vector or a traceless tensor in xAct?

I'm trying to implement a Friedmann-Lemaître-Robertson-Walker metric + a perturbation in a scalar-vector-tensor split in mathematica, using xAct. The S-V-T decomposition comes with some rules for the ...
user avatar
  • 151
1 vote
0 answers
204 views

Equation of Motion: Perturb Scalar Field and flat FLRW Metric (xAct)

Is there a way to get the equations of motion (eom) of a scalar field from a Lagrangian in a perturbed FLRW metric? I want to perturb the field as well as the metric to 1st order. What I did so far: ...
user avatar
  • 151
1 vote
0 answers
76 views

Product of manifolds with non−zero non−diagonal boxes in the metric

I'm trying to construct in xAct a metric like this where $g_{\mu\nu}$ is 4-dimentional, and $g_{MN}$ - 5-dimentional, $A_\mu$ - 4-vector and $\phi$ is a scalar field. I already tried to do it like ...
user avatar
  • 11
2 votes
0 answers
39 views

Mathematica parallelization error

I am trying to parallelize some code in Mathematica 11.3 under Ubuntu 20.04, but I get the following errors: the code is a s follows: ...
user avatar
  • 6,104
18 votes
3 answers
441 views

Coordinate-free derivative

Given the function \begin{align*} f \colon \mathbb{R}^n &\to \mathbb{R}^n\\ v&\mapsto \dfrac{v}{\|v\|}, \end{align*} I would like to compute the derivative of $f$, that is $df(v)$. It is ...
user avatar
  • 13.6k
1 vote
1 answer
201 views

How to associate a tetrad as a basis of a metric mathematica

It's my first time here, and it's the first time that I try to work with Mathematica, so I am a bit lost! If somebody could help me I'll always be grateful! I need to define a generale basis for a ...
user avatar
2 votes
0 answers
152 views

How to define tensors similar to Riemann tensor in xAct xTensor xTras

I'm working on a project where we deal with objects very similar to Riemann tensor. In fact they are Christoffel symbols for higher spins. I'm using xTras for modeling problems in wolfram mathematica. ...
user avatar
1 vote
0 answers
96 views

How can I define a metric with (+,-,-,-) signature in xTensor

Can I define the metric with (+,-,-,-) sign by using the DefMetric[1,metric[-a,-b], CD]? Does "1" in the first place refer to the sign of the time component of the metric or the determinent. If it ...
user avatar
2 votes
1 answer
116 views

use CTensor to define new tensor

I have defined two CTensor (h and H), ...
user avatar
2 votes
1 answer
355 views

xAct working with an unspecified function

I am trying to use xCoba with a diagonal metric depending on an unspecified function f[r], but I get the errors: CTensor::...
user avatar
  • 6,104
1 vote
1 answer
791 views

Defined a "mixed metric" in Xact/Xcoba

I would like to be able to define a metric of this form in XAct, : $$G_{AB}dX^A dX^B = g_{\mu\nu}(x^\mu,y^i)dx^\mu dx^\nu+h_{ij}(y^i)dy^i dy^j$$ So that I can have the general form of the different ...
user avatar
  • 123
2 votes
0 answers
261 views

Contraction of tensors in chart (xCoba)

I have to do some calculations on modified gravity in xAct. The question is how to construct tensors, made of other tensors with contraction in particular chart. Without chart it can be done with <...
user avatar
2 votes
1 answer
417 views

Defining a tensor from an expression of other tensors in xAct

There's been a number of people asking how to set a tensor-valued variable in xAct; equivalently, how to define a new tensor from an expression of existing tensors. For example, a very simple ...
user avatar
1 vote
1 answer
162 views

Is it possible to defining a scalar with CTensor?

I have a tensor (rank zero) or a scalar $\phi$ which defined as DefTensor[\[Phi][], M] on manifold $M$. After defining the metric, how can I use ...
user avatar
3 votes
1 answer
584 views

How to compute functional derivative against vector in xAct, xTensor or xTras?

I want to compute the functional derivative against vectors. For example, I have an object that looks like this $R = h_{ijkl}a^i a^j a^k a^l$ I need to compute $\frac{\delta R}{\delta a^p}= 4 h_{...
user avatar
2 votes
1 answer
371 views

Kretschmann scalar in xTensor and xCoba

How do I calculate the Kretschmann scalar $K=R_{abcd}R^{abcd}$ with xTensor and xCoba? I have found the functions Kretschmann and ...
user avatar
  • 6,104
2 votes
1 answer
515 views

How to work with Levi civita tensor in xAxt?

Is there any command to work with the Levici vita tensor? In fact, I found LeviCivitaTensor, however, in calculations it doesn't seem practical. see the example: <...
user avatar
1 vote
0 answers
50 views

Derivatives with dummy indices not commutative after 3d derivative?

Recently I've encountered the following issue in xAct. I've defined the Manifold and tensors in the following manner Then consider the following expressions. In the case where there are 2 ...
user avatar
1 vote
0 answers
66 views

How to combine symmetrized tensor expressions into single expression in xAct

Let's sayI have the following expression in xAct where covariant derivatives are commutative, $\epsilon$ and $h$ are symmetric tensors. As we can see this expression is equivalent to If we ...
user avatar
2 votes
0 answers
125 views

How to remove the Riemann tensor derivatives using Bianchi identity?

For the third-order Lovelock gravity, after varying the Lagrangian versus the metric, I found some derivatives of the Riemann tensor which should not be appeared. How can I remove them? Maybe using ...
user avatar