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
  • Eval Metric
  • Metric
  • Energy Tensor
  • Eulerian Energy Tensor
  • Null Energy Condition
  • Weak Energy Condition
  • Strong Energy Condition
  • Dominant Energy Condition
  • Expansion Scalar
  • Shear Scalar
  • Vorticity Scalar
  1. Examples
  2. Analysis

A3 - Eval Metric

Eval Metric

evalMetric computes

  1. The energy tensor

  2. The Eulerian energy tensor

  3. The null, weak, strong, and dominant energy conditions

  4. The expansion, shear, and vorticity scalars,

All in 1 line of code.

%% Make Metric
gridSize = [1 20 20 20];
worldCenter = (gridSize+1)./2;
velocity = 0.5;
R = 5;
sigma = 0.5;
Metric = metricGet_AlcubierreComoving(gridSize,worldCenter,velocity,R,sigma);

%% Run evalMetric
[Evaluation] = evalMetric(Metric);

Get field names

fieldnames(Evaluation)

Metric

plotTensor(Evaluation.metric, 0)

Energy Tensor

plotTensor(Evaluation.energyTensor, 0)

Eulerian Energy Tensor

plotTensor(Evaluation.energyTensorEulerian, 0)

Null Energy Condition

surfq(Evaluation.null(1,3:end-2,3:end-2,round(worldCenter(4))))
title("Null")
view(2)
xlim([1 gridSize(2)-4])
ylim([1 gridSize(3)-4])

Weak Energy Condition

surfq(Evaluation.weak(1,3:end-2,3:end-2,round(worldCenter(4))))
title("Weak")
view(2)
xlim([1 gridSize(2)-4])
ylim([1 gridSize(3)-4])

Strong Energy Condition

surfq(Evaluation.strong(1,3:end-2,3:end-2,round(worldCenter(4))))
title("Strong")
view(2)
xlim([1 gridSize(2)-4])
ylim([1 gridSize(3)-4])ab

Dominant Energy Condition

surfq(Evaluation.dominant(1,3:end-2,3:end-2,round(worldCenter(4))))
title("Dominant")
view(2)
xlim([1 gridSize(2)-4])
ylim([1 gridSize(3)-4])

Expansion Scalar

surfq(Evaluation.expansion(1,:,:,round(worldCenter(4))))
title("Expansion Scalar")
view(2)
xlim([1 gridSize(2)])
ylim([1 gridSize(3)])

Shear Scalar

surfq(Evaluation.shear(1,:,:,round(worldCenter(4))))
title("Shear Scalar")
view(2)
xlim([1 gridSize(2)])
ylim([1 gridSize(3)])

Vorticity Scalar

surfq(Evaluation.vorticity(1,:,:,round(worldCenter(4))))
title("Vorticity Scalar")
view(2)
xlim([1 gridSize(2)])
ylim([1 gridSize(3)])

Vorticity should always be 0.

PreviousA2 - Metric ScalarsNextA4 - Momentum Flow

Last updated 1 year ago