# How to calculate some Ricci tensor derived quantities.

I am unsure of the correct way to calculate some Ricci tensor derived quantities, I have tried many different ways but can't get the correct value for the two independent Bach tensor parts U and V (W is zero in four dimensions).

The quantities I am unsure of are labeled "Unsure" in the code below.

var('tpar','lpar')

tpar = 4
lpar = 4

Parallelism().set('tensor',tpar)
Parallelism().set('linbox',lpar)
show(Parallelism())

var('a')

%display latex

viewer3D = 'threejs'  # must be 'threejs', 'jmol', 'tachyon' or None (default)

M = Manifold(4, 'M', latex_name=r'\mathcal{M}', structure='Lorentzian')

MCT = M.open_subset('MCT')  # cartesian
CT.<t,x,y,z> =  MCT.chart(r't:(-oo,+oo) x:(-oo,+oo) y:(-oo,+oo) z:(-oo,+oo)')

MBL = M.open_subset('MBL')  # Boyer-Lindquist
BL.<t,r,th,phi>   = MBL.chart(r't:(-oo,+oo) r:(0,+oo) th:\theta:(0,+pi):periodic phi:\phi:(0,2*pi):periodic) ')
M.declare_union(MBL,MCT)

g = MBL.lorentzian_metric('g')
var('r', 'th')
g00 = -e^(2*r)
g11 = e^(-2*r)
g22 = e^((th+r))
g33 = 0
g03 = 1
g[0, 0] = g00
g[1, 1] = g11
g[2, 2] = g22
g[3, 3] = g33
g[0, 3] = 1/2*g03

Nabla = g.connection()

# http://liu.diva-portal.org/smash/get/diva2:244008/FULLTEXT01.pdf equations 4.52 4.53

v1 = -Nabla(Nabla(g.ricci_scalar()))                           # Unsure
v2 = +(g*(Nabla(Nabla(g.ricci_scalar())))).up(g, 3)['^a_bca']  # Unsure
v3 = -g.ricci_scalar()*g.ricci()
v4 = +1/4*(g*g.ricci_scalar()*g.ricci_scalar())

V = v1 + v2 + v3 + v4
V[:]

u1 = +Nabla(Nabla(g.ricci())).up(g, 3)['^a_bca']                # Unsure
u2 = -1/2*v2
u4 = +2*(g.ricci()*(g.ricci())).up(g, 3)['^a_abc']
u6 = -1/3*(g.ricci_scalar()*g.ricci())
u7 = +1/12*(g*g.ricci_scalar()*g.ricci_scalar())

U = u1 + u2 + u3 + u4 + u5 + u6 + u7

show(' U/2: ', 1/2*U[:], ' V/6: ', 1/6*V[:])

B = (1/2*U)['_bc']+(1/6*V)['_bc']
show('B: ', B[:])
Bach = Nabla(g.cotton()).up(g,3)['^u_aub'] + ((g.schouten().up(g))*(g.weyl().down(g)))['^uv_aubv']
show('Bach: ', Bach[:])


The correct Bach tensor (I have altered the cotton tensor 'convention') is:

[    1163/32*e^(6*r)                   0                   0       25/64*e^(4*r)]
[                  0       -5/32*e^(2*r)                   0                   0]
[                  0                   0 -45/32*e^(5*r + th)                   0]
[      25/64*e^(4*r)                   0                   0                   0]

edit retag close merge delete

The quantities I am unsure of are: v1: R;_bc v2: g_bc * R;_a^a u1: R_bc;_a^a

I have changed my definition of the cotton tensor in metric.py to be:

if self._cotton is None: nabla = self.connection() s = self.schouten() cot = -(n-2)*nabla(s).antisymmetrize(1,2)

1

I am not sure what your question is. Maybe it is a matter of convention about the Cotton and Bach tensors. Your "unsure" quantities v1, v2 and u1 seem correctly evaluated (i.e. the formed expressions agree with those of your comment above).

The cotton convention will mean that the above is not portable to machines where the cotton tensor is given a convention which agrees with maple. It is that v1, v2 and u1 agree with the quantities. I am asking which you think are right. I will keep trying alternatives.

Got this now. With the convention used in the paper I need to reverse the sign of any terms that have an even number of the Ricci scalar plus Ricci tensor terms.. That is v3, v4, u4, u5, u6 and u7. Then negate all of them.

Sort by » oldest newest most voted

var('tpar','lpar')

tpar = 4
lpar = 4

Parallelism().set('tensor',tpar)
Parallelism().set('linbox',lpar)
show(Parallelism())

var('a')

%display latex

viewer3D = 'threejs'  # must be 'threejs', 'jmol', 'tachyon' or None (default)

M = Manifold(4, 'M', latex_name=r'\mathcal{M}', structure='Lorentzian')

MCT = M.open_subset('MCT')  # cartesian
CT.<t,x,y,z> = MCT.chart(r't:(-oo,+oo) x:(-oo,+oo) y:(-oo,+oo) z:(-oo,+oo)')

MBL = M.open_subset('MBL')  # Boyer-Lindquist
t_r_theta_phi = (r't:(-oo,+oo) r:(0,+oo) th:\theta:(0,+pi):periodic '
r'phi:\phi:(0,2*pi):periodic)')
BL.<t, r, th, phi> = MBL.chart(t_r_theta_phi)
M.declare_union(MBL, MCT)

g = MBL.lorentzian_metric('g')

g00 = -e^(2*r)
g11 = e^(-2*r)
g22 = e^(th + r)
g33 = 0
g03 = 1

g[0, 0] = g00
g[1, 1] = g11
g[2, 2] = g22
g[3, 3] = g33
g[0, 3] = 1/2*g03

Nabla = g.connection()

# equations 4.52 and 4.53 in
# http://liu.diva-portal.org/smash/get/diva2:244008/FULLTEXT01.pdf

rho = g.ricci_scalar()
R = g.ricci()

v1 = -Nabla(Nabla(rho))
v2 = +(g*(Nabla(Nabla(rho)))).up(g, 3)['^a_bca']
v3 = +rho*R
v4 = -1/4*(g*rho*rho)

V=(v1+v2+v3+v4)
V[:]

u1 = +Nabla(Nabla(R)).up(g, 3)['^a_bca']
u2 = -1/2*v2
u4 = -2*(R*R.up(g, 1))['^a_abc']
u6 = +1/3*(rho*R)
u7 = -1/12*(g*rho*rho)

U = (u1 + u2 + u3 + u4 + u5 + u6 + u7)

show('U/2:', 1/2*U[:], 'V/6:', 1/6*V[:])

B = (1/2*U)['_bc'] + (1/6*V)['_bc']
show('B:', B[:])
Bach = (Nabla(g.cotton()).up(g, 3)['^u_aub']
+ ((g.schouten().up(g))*(g.weyl().down(g)))['^uv_aubv'])
show('Bach:', Bach[:])
show(g.bach()[:])

more

Good to hear that you could solve your issue. SageMath's conventions for the Shouten and Cotton tensors are explained here and here. Maybe one could add an optional argument to use another convention. Do not hesitate to implement this option yourself in a future version of SageMath.

If you check metric.py you will see that the code for the cotton tensor is wrong and not as the explanation above. I have implemented this myself. Cotton was never tested against a metric that produces a non-zero cotton tensor so this bug had not been caught.

I use this code to calculate the cotton tensor. I have tested it against data from maple. I uploaded a test script to the google support group.

      cot = -(n-2)*nabla(s).antisymmetrize(1,2)


_derived_objects = ('_connection', '_ricci_scalar', '_weyl',
'_schouten', '_cotton', '_cotton_york', '_bach', '_bachU', '_bachV')