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
  1. Modules

Units Module

Units in Warp Factory use functions that scale all values from S.I. units. These functions are called without pass-in values, and thus can also ignore the ().

These functions should be treated as reserved variables, make sure to avoid overlap in variable declarations to use these units properly.

For example, to set the unit scaling for some variable called value, which is implicitly defined in meters, we can say:

value = 1*mm() or value = 1*mm

This scales the value of 1 to mm, which would then be 0.001. This can also be used in the code to define what the units are explicitly in the code structure, such as calling meter which is unitary.

The list of implemented unit scaling functions are:

  • tonne

  • second

  • ms

  • mm

  • meter

  • km

  • kg

  • gram

  • cm

In addition, a few universal constants are used in the same manner as unit scaling. These are:

  • G: Gravitational Constant - 2.99792458×1082.99792458\times10^{8}2.99792458×108 [m/s]

  • c: Speed of Light - 6.67430×10−116.67430\times10^{-11}6.67430×10−11 [m^3 / kg / s^2]

PreviousPlot FunctionsNextContributing

Last updated 1 year ago