3

I'm aware the title isn't very clear - couldn't think of a better one sorry. I think my problem is best illustrated with the simplest example I can make.

Quit[]

<< xAct`xTensor`
<< xAct`ExpressionManipulation`
<< xAct`xCoba`

Some setup to remove ugly stuff goes here

Index = IndexRange[a, c];
DefManifold[M, 4, Index] (*4D Manifold*)
DefMetric[-1, g[-a, -b], CD];
DefChart[B, M, {0, 1, 2, 3}, {t[], r[], θ[], ϕ[]}]
DefTensor[φ[], M]
DefTensor[φEquation[], M]

ScalarEquation[] = CD[a][CD[-a][φ[]]]

At this point I have the general form of the equation I want (in this example box phi = 0). I now want to write this out in spherical symmetry.

So I say that phi is a function of r alone and declare the functions I'm going to use to decompose my metric:

φ[] // ToBasis[B] // ComponentArray
ComponentValue[%, InChart[%, B][r[]]]
DefScalarFunction[ν]
DefScalarFunction[μ]

I give an explicit form for my metric and its inverse:

MatrixForm[
metricarray = {{-Exp[ν[r[]]], 0, 0, 0}, {0,  1/(1 - 2 μ[r[]]/r[]), 0, 0},
{0, 0, r[]^2, 0}, {0, 0, 0, r[]^2 Sin[θ[]]^2}}];
MetricInBasis[gg, -B, metricarray];
MetricInBasis[gg, B, Inverse[metricarray]];

The problem is that I can't get any further (successfully). I was trying

MetricCompute[gg, B, All]
ChangeCovD[ScalarEquation[], CD, PDB] // ToBasis[B] // TraceBasisDummy // ToValues

But this outputs the Christoffel and inverse metric components just as g[1,1] etc. rather than the values which it calculates just fine if I put a line like:

Christoffel[CD, PDB][a, -b, -c] // ToBasis[B] // ComponentArray // ToValues
m_goldberg
  • 107,779
  • 16
  • 103
  • 257
A C
  • 31
  • 1

0 Answers0