components of equations of motion using an ansatz ( for the metric and for Electromagnetic field) ( xTensor, xCoba)

227 views
Skip to first unread message

Zakaria

unread,
Nov 7, 2022, 7:15:11 AM11/7/22
to xAct Tensor Computer Algebra
Hi to evryone,

I'm having a problem in obtaining my equations of motion for ( Einstein Maxwell gravity ) in components using an ansatz for the metric and for the electromagnetic field :
the problem is in the ansatz for the electromagnetic field 
I want to send A[a] -> to this ansatz { V[r],0,0,0} but nothing works.

I joint my notebook, in case someone has an idea about that

Thank you very much

Best
Zakaria
Einstein maxwell gravity.nb

Jose

unread,
Nov 7, 2022, 12:01:00 PM11/7/22
to xAct Tensor Computer Algebra
Hi,

I attach a modified version of your notebook with a possible way to do this. It can be done in a slightly simpler way using SetCMetric instead of DefMetric, but this shows what I think is the correct way to go here.

Cheers,
Jose.
Einstein_Maxwell_gravity__Modified.nb

Zakaria

unread,
Nov 8, 2022, 6:42:19 AM11/8/22
to xAct Tensor Computer Algebra
Hi ,
Thank you so much ! thats so clear, pedagogical and simple, that helps also to resolve another question, I was looking how to do that  for scalar Gauss Bonnet because I had some problems using (Defmetric, Metriccompute, Tobasis, Tovalues ...etc).

This package is the best and I'm keeping advertising it to evryone around me . 
Thank you for being interactif and helpful

Cheers
Zakaria

Zakaria

unread,
Nov 8, 2022, 12:10:49 PM11/8/22
to xAct Tensor Computer Algebra
Sorry I noticed a problem, the equations didnt remplace the value of the Ricciscalar, so I though maybe I need to add it in the rules, but even after doing that it does not work, and it keeps giving me "R" ( Ricciscalar) in the equations of the background .

I don't know how to avoid this problem

Thank you 

Jose

unread,
Nov 8, 2022, 4:37:41 PM11/8/22
to xAct Tensor Computer Algebra
It just requires adding one more rule for the Ricci scalar. You need a rule per object to be replaced.

Notebook reattached.

Cheers,
Jose.

Einstein_Maxwell_gravity__Modified2.nb

Zakaria Belkhadria

unread,
Jan 30, 2023, 11:05:34 AM1/30/23
to xAct Tensor Computer Algebra
Hi,
Thank you it worked very well.

Now I'm modifying the notebook to use it for Einstein Scalar Gauss bonnet gravity, I though it will also work, but apparently its much more complicated, the last line to calculate the components of Eom takes enormous time to do it and It will never give you the results.

Can you tell me please if there is another way to make it faster or we need to change the method to metricbasis ?

I attached the notebook

Have a nice day

Zakaria
draft eom gauss bonnet.nb

Jose

unread,
Feb 8, 2023, 8:39:10 PM2/8/23
to xAct Tensor Computer Algebra
Hi,

There were three issues:

1) You were using a phi function without first declaring it with DefScalarFunction.

2) You have a sum of 26 objects on which to do various things. It helps to construct a list of those objects, manipulate them individually, and then add them.

3) When results start being not small, using Simplify may take longer than we'd like. It tries hard to get you a simple result. Using Together may give already good enough initial results.

See the attached notebook with comments at the end.

Cheers,
Jose.

draft eom gauss bonnet.nb
Reply all
Reply to author
Forward
0 new messages