Message Boards Message Boards

0
|
74 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Using indices to define the metric and Ricci tensor

Posted 17 hours ago

I try to write MA code to define a new modified Einstein tensor:

$ G'_{\mu\nu} = G_{\mu\nu}- \frac{1}{3} \left[ \left( \frac{1}{4} R^2 + \nabla_\sigma \nabla^\sigma R \right) g_{\mu\nu} + R R_{\mu\nu} - \nabla_\mu \nabla_\nu R \right], $

Where $G_{\mu\nu}$ is the usual Einstein tensor, $R$ is the Ricci scalar and $R_{\mu\nu}$ is the Ricci tensor.

In the following code, the usual $G_{\mu\nu}$ is calculated. To add $ G'_{\mu\nu}$ to the code, I added $R^2$ with:

scalar2 = 
 Simplify[Sum[
   inversemetric[[i, l]] inversemetric[[j, s]] ricci[[i, j]] ricci[[
     l, s]] , {i, 1, n}, {j, 1, n}, {l, 1, n}, {s, 1, n}] ]

And a new modified Einstein tensor:

einstein3:=einstein - (1/3) ( (1/4) Sum [ scalar2 * metric +   metric[[i,j]]* metric[[l,s]]   * (D[scalar,coord[l]]* D[scalar,coord[s]] - affine[[l,s,k]] * D[scalar,coord[k]]  )+ scalar * ricci- (D[scalar,coord[i]]* D[scalar,coord[j]] - affine[[i,j,k]] * D[scalar,coord[k]]), {i,1,4},{j,1,4},{l,1,4},{k,1,4},{s,1,4} ] )

My question about the first and the third terms, are they written correctly in this way, or should I use indices and write:

$R^2 g_{\mu\nu} \to $ scalar2 * metric[[i,j]]

$R R_{\mu\nu} \to $ scalar*ricci[[i,j]]

Because I got different Einstein’s tensor components when I use or don’t use metric and Ricci tensor indices, so what is the correct MA code formula?

Also the first term is:

$g_{\mu\nu} \nabla_\sigma \nabla^\sigma R = g_{\mu\nu} g^{\sigma \rho} \nabla_\sigma \nabla_\rho R = g_{\mu\nu} g^{\sigma \rho} \left( \partial_\sigma \partial_\rho - \Gamma^\lambda_{\sigma\rho} \partial_\lambda \right) R,$

And the forth term:

$\nabla_\mu \nabla_\nu R= \left( \partial_\mu \partial_\nu - \Gamma^\lambda_{\mu\nu} \partial_\lambda \right) R,$

which are given in terms of indices in the MA code.

So any help to write the correct MA code for $G’_{\mu\nu}$ is so much appreciated!

Code

Clear[coord, metric,inversemetric, affine, riemann, ricci, scalar, einstein,r,θ,ϕ,t]
 
n:=4

coord := {r,θ,ϕ,t}

metric:={{- a[t]^2,0,0,0},{0,a[t]^2,0,0},{0,0,a[t]^2,0},{0,0,0,a[t]^2}}

inversemetric=Simplify[Inverse[metric]]

affine:=affine=Simplify[Table[(1/2)*Sum[(inversemetric[[i,s]])*
(D[metric[[s,j]],coord[[k]] ]+ D[metric[[s,k]],coord[[j]] ]-D[metric[[j,k]],coord[[s]] ]),{s,1,n}], {i,1,n},{j,1,n},{k,1,n}] ]


riemann:=riemann=Simplify[Table[
D[affine[[i,j,l]],coord[[k]] ]-D[affine[[i,j,k]],coord[[l]] ]+
Sum[affine[[s,j,l]] affine[[i,k,s]]-affine[[s,j,k]] affine[[i,l,s]],
{s,1,n}], {i,1,n},{j,1,n},{k,1,n},{l,1,n}] ]


ricci:=ricci=Simplify[Table[Sum[riemann[[i,j,i,l]],{i,1,n}],{j,1,n},{l,1,n}] ]

scalar=Simplify[Sum[inversemetric[[i,j]]ricci[[i,j]],{i,1,n},{j,1,n}] ]

einstein:=einstein=Simplify[ricci-(1/2)scalar*metric]

listeinstein:=Table[If[UnsameQ[einstein[[j,l]],0],{ToString[G[j,l]],einstein[[j,l]]}] ,{j,1,n},{l,1,j}]

TableForm[Partition[DeleteCases[Flatten[listeinstein],Null],2],TableSpacing->{2,2}]

I'm asking here about using the indices to define the metric $g_{\mu\nu}$ or the ricci tensor.

POSTED BY: Safinaz Salem
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract