# metricGet\_Alcubierre

## Description

Create the Alcubierre warp solution in a defined spacetime grid.

<details>

<summary>Alcubierre Metric</summary>

The Alcubierre metric uses only a single shift vector which is defined by a shape function $$f(r\_s)$$:

$$f(r\_s) = \frac{\tanh(\sigma(r\_s + R)) - \tanh(\sigma(r\_s - R))}{2 \tanh (\sigma R)}$$

where $$r\_s$$is the coordinate center defined as:

$$r\_s = \[(x-x\_s(t))^2 + y^2 + z^2]^{1/2}$$

where $$x\_s(t)$$ moves through spacetime at a rate of $$v$$ along $$x$$. The shift vector $$\beta\_1$$ is then defined using the shape function:

$$\beta\_1 = v  \ f(r\_s)$$

The metric is then given (in the line element representation) by:

$$ds^2 = -1+v^2 f(r\_s)^2 \ dt^2 + 2 v f(r\_s) \ dx dt + dx^2 + dy^2 + dz^2$$

</details>

For more details on the Alcubierre metric, please read:

{% embed url="<https://arxiv.org/abs/gr-qc/0009013>" %}

## Method

The metric is constructed using the parameters of the Alcubierre metric in the user-defined spacetime grid parameters.

{% hint style="info" %}
The comoving version of this metric called `metricGet_AlcubierreComoving` has the same inputs but requires that the <mark style="color:blue;">`gridSize`</mark> along t = 1 and will return the metric in the Galilean comoving frame.
{% endhint %}

## Syntax

`[`<mark style="color:green;">`metric`</mark>`] = metricGet_Alcubierre(`<mark style="color:blue;">`gridSize`</mark>`,`<mark style="color:blue;">`worldCenter`</mark>`,`<mark style="color:blue;">`v`</mark>`,`<mark style="color:blue;">`R`</mark>`,`<mark style="color:blue;">`sigma`</mark>`,`` `<mark style="color:orange;">`gridScale`</mark>`)`

`[`<mark style="color:green;">`metric`</mark>`] = metricGet_AlcubierreComoving(`<mark style="color:blue;">`gridSize`</mark>`,`<mark style="color:blue;">`worldCenter`</mark>`,`<mark style="color:blue;">`v`</mark>`,`<mark style="color:blue;">`R`</mark>`,`<mark style="color:blue;">`sigma`</mark>`,`` `<mark style="color:orange;">`gridScale`</mark>`)`

### Input Arguments

{% hint style="info" %} <mark style="color:blue;">blue</mark> are required inputs.

<mark style="color:orange;">orange</mark> are optional inputs with native default values.
{% endhint %}

<table><thead><tr><th width="213">Inputs</th><th width="133">Format</th><th width="92">Type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:blue;"><code>gridSize</code></mark></td><td>1x4 array</td><td>integer</td><td><p>The size of the world specified as:</p><p></p><p><span class="math">[t, x, y, z]</span> </p></td></tr><tr><td><mark style="color:blue;"><code>worldCenter</code></mark></td><td>1x4 array</td><td>double</td><td><p>The center of the world, which defines the center of <span class="math">r_s</span> as a 4-vector, specified as:</p><p></p><p><span class="math">[t,x,y,z]</span></p></td></tr><tr><td><mark style="color:blue;"><code>v</code></mark></td><td>1x1 array</td><td>double</td><td>Speed of the warp drive, given as a factor of c.</td></tr><tr><td><mark style="color:blue;"><code>R</code></mark></td><td>1x1 array</td><td>double</td><td>Radius of the warp bubble.</td></tr><tr><td><mark style="color:blue;"><code>sigma</code></mark></td><td>1x1 array</td><td>double</td><td>Width parameter of the warp bubble.</td></tr><tr><td><mark style="color:orange;"><code>gridScale</code></mark></td><td>1x4 array</td><td>double</td><td><p>Unit scaling factor of the grid dimensions defined relative to <mark style="color:blue;"><code>gridSize</code></mark>.  This determines the resolution of the grid along each dimension. Specified as:</p><p></p><p><span class="math">[t_{scale}, x_{scale}, y_{scale}, z_{scale}]</span></p><p></p><p> <strong>The default value is [1, 1, 1, 1].</strong></p></td></tr></tbody></table>

### Output Arguments

<table><thead><tr><th width="151">Outputs</th><th width="113.33333333333331">Format</th><th width="88">Type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:green;"><code>metric</code></mark></td><td>struct</td><td>object</td><td>Alcubierre solution returned as the metric tensor object.</td></tr></tbody></table>
