/Alcubierre-Warp-Drive

Python implmentation of Alcubierre's metric using Numpy and Matplotlib.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Alcubierre-Warp-Drive 🚀

A Python implmentation of Alcubierre's metric using Numpy and Matplotlib. Warp Image

Implementation:

Alcubierre defines the following,

vars

in which

equations

with parameters R>0 and σ>0. Alcubierre's metric is then written as,

metric

Alcubierre later derives an expression using the extrinsic curvature tensor Kij (9) showing the expansion (12) as

θ = vs (xs / rs)(d𝑓 / drs)


In Python I defined the derivatives of r(s) & 𝑓(rs) as

def d_rs(x, rho, xs=15):
    return ((x - xs)**2 + rho**2)**(1/2)
    
def d_frs(rs, sigma=8, R=1):
    a = sigma * (np.tanh((R + rs)*sigma)**2 - 1)
    b = sigma * ((np.tanh(-(R - rs)*sigma)**2 - 1) / np.tanh(R * sigma))
    return (-1/2) * (a - b)

where θ

def theta(x, p, xs=15, s=8, R=1):
    vs = R
    drs = d_rs(x, p, xs)
    dfrs = d_frs(drs, s, R)

    return vs * ((x - xs) / drs) * dfrs

References:

Updates:

  • Added code to animate the graph.
  • Added contours for each axis.