## Outﬂow

August 15 2009

Abstract

Outﬂow calculates the ﬂow of rest mass density across a SphericalSurface, eg. and apparent horizon or a sphere at “inﬁnity”.

### 1 Introduction

Hydrodynamic simulations should conserve eg. the total rest mass in the system (outside he event horizon, that is). This thorn allow to measure the ﬂux of rest mass across a given SphericalSurface.

### 2 Physical System

The Valencia formalism deﬁnes its $D=\rho W$ variable such that one can deﬁne a total rest mass density as:

$M=\int \sqrt{\gamma }D{d}^{3}x$

and from the EOM of $D$ (see )

$\frac{\partial }{\partial {x}^{0}}\left(\sqrt{\gamma }D\right)+\frac{\partial }{\partial {x}^{i}}\left(\sqrt{\left(}\gamma \right)\alpha D\left({v}^{i}-{\beta }^{i}∕\alpha \right)=0$

one obtains:

$\begin{array}{rcll}Ṁ& =& -{\int }_{V}\frac{\partial }{\partial {x}^{i}}\left(\sqrt{\gamma }\alpha D\left({v}^{i}-{\beta }^{i}∕\alpha \right){d}^{3}x& \text{(1)}\text{}\text{}\\ & =& -{\int }_{\partial V}\sqrt{\gamma }\alpha D\left({v}^{i}-{\beta }^{i}∕\alpha \right)d{\sigma }_{i}& \text{(2)}\text{}\text{}\end{array}$

where ${\sigma }_{i}$ is the ordinary ﬂat space directed surface element of the enclosing surface, eg.

$d{\sigma }_{i}={\stackrel{̂}{r}}_{i}{r}^{2}sin𝜃d𝜃d\varphi$

with ${\stackrel{̂}{r}}_{i}=\left[cos\varphi sin𝜃,sin\varphi sin𝜃,cos\left(𝜃\right)\right]$ for a sphere of radius r.

For a generic SphericalSurface parametrized by $𝜃$ and $\varphi$ one has:

$\begin{array}{rcll}x& =& \stackrel{̄}{r}\left(𝜃,\varphi \right)cos\varphi sin𝜃& \text{(3)}\text{}\text{}\\ y& =& \stackrel{̄}{r}\left(𝜃,\varphi \right)sin\varphi sin𝜃& \text{(4)}\text{}\text{}\\ z& =& \stackrel{̄}{r}\left(𝜃,\varphi \right)cos𝜃& \text{(5)}\text{}\text{}\end{array}$

where $\stackrel{̄}{r}$ is the isotropic radius. Consequently the surface element is

$\begin{array}{rcll}d{\sigma }_{i}& =& {\left(\frac{\partial \stackrel{\to }{\stackrel{̄}{r}}}{\partial 𝜃}×\frac{\partial \stackrel{\to }{\stackrel{̄}{r}}}{\partial \varphi }\right)}_{i}& \text{(6)}\text{}\text{}\\ & =& {\stackrel{̄}{r}}^{2}sin𝜃{\stackrel{̂}{\stackrel{̄}{r}}}_{i}-\frac{\partial \stackrel{̄}{r}}{\partial 𝜃}\stackrel{̄}{r}sin𝜃{\stackrel{̂}{𝜃}}_{i}-\frac{\partial \stackrel{̄}{r}}{\partial \varphi }\stackrel{̄}{r}{\stackrel{̂}{\varphi }}_{i}& \text{(7)}\text{}\text{}\end{array}$

where $\stackrel{̂}{\stackrel{̄}{r}}$, $\stackrel{̂}{𝜃}$ and $\stackrel{̂}{\varphi }$ are the ﬂat space standard unit vectors on the sphere [?].

### 3 Numerical Implementation

We implement the surface integral by interpolating the required quantities (${g}_{ij}$, $\rho$, ${v}^{i}$, ${\beta }^{i}$, $\alpha$) onto the spherical surface and then integrate using a fourth order convergent Newton-Cotes formula.

For the $𝜃$ direction SphericalSurfaces deﬁnes grid points such that

${𝜃}_{i}=-\left({n}_{𝜃}-1∕2\right){\Delta }_{𝜃}+i{\Delta }_{𝜃}\phantom{\rule{2em}{0ex}}0\le i<{N}_{𝜃}-1$

where ${N}_{𝜃}$ is the total number of intervals (sf_ntheta), ${n}_{𝜃}$ is the number of ghost zones in the $𝜃$ direction (nghosttheta) and ${\Delta }_{𝜃}=\frac{\pi }{{N}_{𝜃}-2n𝜃}$. Since with this

we do not have grid points at the end of the interval $\left\{0,\pi \right\}$ we derive an open extended Newton-Cotes formula from Eq. 4.1.14 of  and a third order accurate extrapolative rule (see Maple worksheet). We ﬁnd

$\begin{array}{rcll}{\int }_{{x}_{0}}^{{x}_{N-1}}f\left(x\right)dx& \approx & h\left\{\frac{13}{12}{f}_{1∕2}+\frac{7}{8}{f}_{3∕2}+\frac{25}{24}{f}_{5∕2}+{f}_{7∕2}+{f}_{9∕2}+\cdots +{f}_{N-1-7∕2}& \text{}\\ & & +{f}_{N-1-9∕2}+\frac{25}{24}{f}_{N-1-5∕2}+\frac{7}{8}{f}_{N-1-3∕2}+\frac{13}{12}{f}_{N-1-1∕2}\right\}+O\left(1∕{N}^{4}\right)& \text{(8)}\text{}\text{}\end{array}$

.

For the $\varphi$ direction SphericalSurfaces deﬁnes grid points such that

${\varphi }_{i}=-{n}_{\varphi }{\Delta }_{\varphi }+i{\Delta }_{\varphi }\phantom{\rule{2em}{0ex}}0\le i<{N}_{\varphi }-1$

where ${N}_{\varphi }$ is the total number of intervals (sf_nphi), ${n}_{\varphi }$ is the number of ghost zones in the $\varphi$ direction (nghostphi) and ${\Delta }_{\varphi }=\frac{\pi }{{N}_{\varphi }-2n\varphi }$. With this

we use a simple extended trapezoid rule to achieve spectral convergence due to the periodic nature of $\varphi$ (note: ${x}_{N}={x}_{0}$)

$\begin{array}{rcll}{\int }_{{x}_{0}}^{{x}_{N}}f\left(x\right)dx\approx & h\sum _{i=0}^{N-1}{f}_{i}& & \text{(9)}\text{}\text{}\end{array}$

.

The derivatives of $\stackrel{\to }{\stackrel{̄}{r}}$ along $𝜃$ and $\varphi$ are obtained numerically and require at least two ghost zones in $𝜃$ and $\varphi$.

### 4 Using This Thorn

Right now surface can only be prescribed by SphericalSurfaces, the ﬂux through each surface is output in in a ﬁle outflow_det_%d.asc

#### 4.1 Interaction With Other Thorns

Takes care to schedule itself after SphericalSurfaces_HasBeenSet.

#### 4.2 Examples

See the parameter ﬁle in the test directory. For spherical symmetric infall the ﬂux through all detectors should be equal (since rest mass must be conserved).

### References

   José A. Font, “Numerical Hydrodynamics and Magnetohydrodynamics in General Relativity”, Living Rev. Relativity 11, (2008), 7. URL (cited on August 15. 2009): http://www.livingreviews.org/lrr-2008-7