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
  • Computing Energy Conditions
  • Get Metric and Energy Tensor
  • Get Energy Conditions Map
  • Plot Energy Conditions
  • Returning Vectors
  1. Examples
  2. Analysis

A1 - Energy Conditions

Computing Energy Conditions

Get Metric and Energy Tensor

%% Alcubierre
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);

% Compute energy tensor
EnergyTensor = getEnergyTensor(Metric);

Get Energy Conditions Map

[nullEnergyCondition] = getEnergyConditions(EnergyTensor,Metric,"Null");
[weakEnergyCondition] = getEnergyConditions(EnergyTensor,Metric,"Weak");
[strongEnergyCondition] = getEnergyConditions(EnergyTensor,Metric,"Strong");
[dominantEnergyCondition] = getEnergyConditions(EnergyTensor,Metric,"Dominant");

Plot Energy Conditions

surfq(nullEnergyCondition(1,:,:,10),'EdgeColor','none')
title('Null')

surfq(weakEnergyCondition(1,:,:,10),'EdgeColor','none')
title('Weak')

surfq(strongEnergyCondition(1,:,:,10),'EdgeColor','none')
title('Strong')

surfq(strongEnergyCondition(1,:,:,10),'EdgeColor','none')
title('Domiant')

Returning Vectors

You can also return the energy conditions per vector sampled at each point in the spacetime by specifying the return vector option to true.

numAngularVec = 100;
numTimeVec = 10;

[nullMap, nullVecMap, vectorField] = getEnergyConditions(EnergyTensor,Metric,"Null",numAngularVec,numTimeVec,1);

We can now plot the violation amount scaled to a quiver plot along each of the sampled directions.

% Normalize the violation amount for plotting
nullVecMap = nullVecMap./max(abs(nullVecMap),[],'all');

% Define the spacetime point to sample
samplePoint = [1,5,5,5];

figure()
hold on
for i = 1:size(vectorField,2)
    quiver3(0,0,0, ...
        vectorField(2,i), vectorField(3,i), vectorField(4,i), ...
        nullVecMap(samplePoint(1),samplePoint(2),samplePoint(3),samplePoint(4),i),'r')     
end
title('Normalized Null Violation For Observer Orientations')
PreviousAnalysisNextA2 - Metric Scalars

Last updated 1 year ago