Warp Factory
  • What is Warp Factory?
  • Overview
    • Installing Warp Factory
    • Workflow
    • Codebase Structure
    • Object Types
    • Frames
  • Examples
    • Metrics
      • M1 - First Metric
      • M2 - Default Metrics
      • M3 - Building a Metric
    • Energy Tensor
      • T1 - First Energy Tensor
      • T2 - Cartoon Methods
      • T3 - GPU Computation
      • T4 - Solver Order
      • T5 - Errors
    • Analysis
      • A1 - Energy Conditions
      • A2 - Metric Scalars
      • A3 - Eval Metric
      • A4 - Momentum Flow
    • Warp Shell
      • W1 Warp Shell Comoving
  • Modules
    • Metrics Module
      • Metric Library
        • metricGet_Minkowski
        • metricGet_Alcubierre
        • metricGet_Lentz
        • metricGet_VanDenBroeck
        • metricGet_WarpShellComoving
        • metricGet_ModifiedTime
        • metricGet_Schwarzschild
      • Metric Functions
        • setMinkowski
        • setMinkowskiThreePlusOne
        • threePlusOneBuilder
        • threePlusOneDecomposer
    • Analyzer Module
      • getMomentumFlowLines
      • doFrameTransfer
      • changeTensorIndex
      • getScalars
      • getEnergyConditions
      • evalMetric
    • Solver Module
      • getEnergyTensor
      • verifyTensor
    • Visualizer Module
      • plotThreePlusOne
      • plotTensor
      • Plot Functions
    • Units Module
  • General
    • Contributing
    • FAQ
    • Citing Warp Factory
Powered by GitBook
On this page
  • Description
  • Method
  • Syntax
  • Input Arguments
  • Output Arguments
  1. Modules
  2. Solver Module

getEnergyTensor

PreviousSolver ModuleNextverifyTensor

Last updated 1 year ago

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}Tμν​ 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) Tμν​=8πGc4​(Rμν​−21​Rgμν​)

where the Ricci scalarRRR is:

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

and the Ricci tensorRμνR_{\mu\nu}Rμν​ 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}Rμν​=−21​∑α,β=03​(∂xα∂xβ∂2gμν​​+∂xμ∂xν∂2gαβ​​−∂xν∂xα∂2gμβ​​−∂xμ∂xα∂2gνβ​​)gαβ

+12∑α,β,γ,δ=03(12∂gαγ∂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}+21​∑α,β,γ,δ=03​(21​∂xμ∂gαγ​​∂xν∂gβδ​​+∂xα∂gμγ​​∂xβ∂gνδ​​−∂xα∂gμγ​​∂xδ∂gνβ​​)gαβgγδ

−14∑α,β,γ,δ=03(∂gνγ∂xμ+∂gμγ∂xν−∂gμν∂xγ)(2∂gβδ∂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}−41​∑α,β,γ,δ=03​(∂xμ∂gνγ​​+∂xν∂gμγ​​−∂xγ∂gμν​​)(2∂xα∂gβδ​​−∂xδ∂gαβ​​)gαβgγδ

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.

Inputs
Format
Type
Description

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

Outputs
Format
Type
Description

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.