WarpFactory is a powerful numerical toolkit written in Python for analyzing warp drive spacetimes using Einstein's theory of General Relativity.
Complete MATLAB → Python conversion with 190 unit tests (100% passing), 13 example notebooks, and comprehensive scientific validation. All modules functional and production-ready.
Latest Achievement: Identified 10^10 improvement in warp drive acceleration via multi-shell configuration, plus rigorous validation of published papers.
- 3D finite difference solver for the stress-energy tensor
- Energy condition evaluations for the point-wise Null, Weak, Dominant, and Strong Energy Conditions
- Metric scalar evaluation for the shear, expansion, and vorticity
- Momentum flow visualizations
- GPU utilization for accelerated computations (via CuPy)
- Pure Python implementation using NumPy - no MATLAB required!
pip install -e .pip install -e ".[gpu]"pip install -e ".[viz]"pip install -e ".[gpu,viz,dev,notebooks]"import warpfactory as wf
import numpy as np
# Create an Alcubierre warp drive metric
grid_size = [10, 20, 20, 20] # [t, x, y, z]
world_center = [5, 10, 10, 10]
velocity = 1.0 # Speed in units of c
radius = 2.0
sigma = 0.5
metric = wf.metrics.alcubierre.get_alcubierre_metric(
grid_size, world_center, velocity, radius, sigma
)
# Calculate the stress-energy tensor
energy_tensor = wf.solver.get_energy_tensor(metric)
# Evaluate energy conditions
null_condition = wf.analyzer.get_energy_conditions(
energy_tensor, metric, "Null"
)
# Visualize
wf.visualizer.plot_tensor(energy_tensor)warpfactory/
├── units/ # Physical constants and unit conversions
├── metrics/ # Spacetime metric definitions
│ ├── alcubierre/
│ ├── lentz/
│ ├── minkowski/
│ ├── schwarzschild/
│ └── ...
├── solver/ # Einstein field equation solvers
├── analyzer/ # Energy conditions and metric analysis
├── visualizer/ # Plotting and visualization tools
└── examples/ # Jupyter notebook examples
- Getting Started Guide - Start here if you're new to WarpFactory
- Installation Guide - Detailed installation instructions
- Feature Matrix - Complete feature comparison
- Project Documentation - Full documentation directory
For comprehensive API documentation and interactive tutorials, visit the WarpFactory Documentation.
The Python implementation has been thoroughly validated against published results. See the validation/ directory for validation scripts and detailed reports.
Unit and integration tests are available in the tests/ directory.
- Christopher Helmerich
- Jared Fuchs
- Python Port Contributors
We would like to extend our gratitude to the following individuals for their contributions and code reviews:
- Alexey Bobrick
- Luke Sellers
- Brandon Melcher
- Justin Feng
- Gianni Martire
WarpFactory is released under the MIT License.
If you use WarpFactory in your research, please cite:
@article{warpfactory2024,
title={WarpFactory: Numerical Toolkit for Analyzing Warp Drive Spacetimes},
author={Helmerich, Christopher and Fuchs, Jared},
journal={Classical and Quantum Gravity},
year={2024}
}