getEnergyTensor

Description

The input metric determines the stress-energy tensor by evaluating the field equations. This evaluation does not consider any additions from Λ\Lambda.

Einstein Field Equation

The stress-energy tensor TμνT_{\mu\nu} is found by solving the field equation:

Tμν=c48πG(Rμν12Rgμν)T_{\mu\nu} = \frac{c^4}{8 \pi G} \left( R_{\mu\nu}-\frac{1}{2}R g_{\mu\nu} \right)

where the Ricci scalarRR is:

R=RμνgμνR = R_{\mu\nu} g^{\mu\nu}

and the Ricci tensorRμνR_{\mu\nu} is found directly in terms of derivatives of the metric:

Rμν=12α,β=03(2gμνxαxβ+2gαβxμxν2gμβxνxα2gνβxμxα)gαβ R_{\mu \nu} =-\frac{1}{2} \sum_{\alpha, \beta=0}^3\left(\frac{\partial^2 g_{\mu \nu}}{\partial x^\alpha \partial x^\beta}+\frac{\partial^2 g_{\alpha \beta}}{\partial x^\mu \partial x^\nu}-\frac{\partial^2 g_{\mu \beta}}{\partial x^\nu \partial x^\alpha}-\frac{\partial^2 g_{\nu \beta}}{\partial x^\mu \partial x^\alpha}\right) g^{\alpha \beta}

+12α,β,γ,δ=03(12gαγxμgβδxν+gμγxαgνδxβgμγxαgνβxδ)gαβgγδ +\frac{1}{2} \sum_{\alpha, \beta, \gamma, \delta=0}^3\left(\frac{1}{2} \frac{\partial g_{\alpha \gamma}}{\partial x^\mu} \frac{\partial g_{\beta \delta}}{\partial x^\nu}+\frac{\partial g_{\mu \gamma}}{\partial x^\alpha} \frac{\partial g_{\nu \delta}}{\partial x^\beta}-\frac{\partial g_{\mu \gamma}}{\partial x^\alpha} \frac{\partial g_{\nu \beta}}{\partial x^\delta}\right) g^{\alpha \beta} g^{\gamma \delta}

14α,β,γ,δ=03(gνγxμ+gμγxνgμνxγ)(2gβδxαgαβxδ)gαβgγδ-\frac{1}{4} \sum_{\alpha, \beta, \gamma, \delta=0}^3\left(\frac{\partial g_{\nu \gamma}}{\partial x^\mu}+\frac{\partial g_{\mu \gamma}}{\partial x^\nu}-\frac{\partial g_{\mu \nu}}{\partial x^\gamma}\right)\left(2 \frac{\partial g_{\beta \delta}}{\partial x^\alpha}-\frac{\partial g_{\alpha \beta}}{\partial x^\delta}\right) g^{\alpha \beta} g^{\gamma \delta}

Method

The derivatives of the metric use finite central differencing methods on the spacetime grid.

The grid size defined in the metric must be 5 or greater in any direction for the finite difference to evaluate a derivative on the grid. If the size in a given direction is <5 then the derivative is assumed to be 0.

Syntax

[energy] = getEnergyTensor(metric, tryGPU, diffOrder)

Input Arguments

blue are required inputs.

orange are optional inputs with native default values.

InputsFormatTypeDescription

metric

struct

object

Input metric tensor.

tryGPU

1x1 array

integer

Use the GPU for evaluations, input either 1 for true or 0 for false. The default value is 0.

diffOrder

1x1 array

string

Sets the order of the finite difference method. Accepts either "second" to use second-order or "fourth" to use fourth-order methods. The default value is fourth order.

Output Arguments

OutputsFormatTypeDescription

energy

struct

object

Returns the stress-energy tensor with the same grid and frame as the metric tensor. Note that it returns the contravariant form of the tensor, which can also be found by checking the .index field of the struct.

Last updated