Notebook Status: Validated
Validation Notes: This module has been validated to exhibit convergence to zero of the Hamiltonian and momentum constraint violation at the expected order to the exact solution (see plots at bottom of the exact initial data validation start-to-finish tutorial notebook; momentum constraint violation in non-$\phi$ directions is zero), and all quantities have been validated against the original SENR code.
UIUC black holes have the advantage of finite coordinate radius in the maximal spin limit. It is therefore excellent for studying very highly spinning black holes. This module sets the UIUC black hole at the origin.
BSSN.UIUCBlackHole
NRPy+ moduleFirst, we will import the core modules of Python/NRPy+ and specify the main gridfunctions that we will need. Second, we set some basic NRPy+ parameters. E.g., set the spatial dimension parameter to 3.
Inputs for initial data:
Additional variables needed for spacetime evolution:
# Step P0: Load needed modules
import sympy as sp # SymPy: The Python computer algebra package upon which NRPy+ depends
import NRPy_param_funcs as par # NRPy+: Parameter interface
import indexedexp as ixp # NRPy+: Symbolic indexed expression (e.g., tensors, vectors, etc.) support
# All gridfunctions will be written in terms of spherical coordinates (r, th, ph):
r,th,ph = sp.symbols('r th ph', real=True)
thismodule = "UIUCBlackHole"
# Step 0: Set spatial dimension (must be 3 for BSSN)
DIM = 3
par.set_parval_from_str("grid::DIM",DIM)
# Step 1: Set psi, the conformal factor:
# The UIUC initial data represent a Kerr black hole with mass M
# and dimensionless spin chi in UIUC quasi-isotropic coordinates,
# see https://arxiv.org/abs/1001.4077
# Input parameters:
M,chi = par.Cparameters("REAL", thismodule, ["M","chi"],[1.0,0.99])
# Spin per unit mass
a = M*chi
Boyer-Lindquist radii of the outer (+) and inner (−) horizons of the BH, defined under equation 1 in Liu, Etienne, & Shapiro (2009) as $$ r_{\pm} = M \pm \sqrt{M^2 - a^2}$$
# Defined under equation 1 in Liu, Etienne, & Shapiro (2009)
# https://arxiv.org/pdf/1001.4077.pdf
# Boyer - Lindquist outer horizon
rp = M + sp.sqrt(M**2 - a**2)
# Boyer - Lindquist inner horizon
rm = M - sp.sqrt(M**2 - a**2)
Define $r_{BL}$, equation 11 of Liu, Etienne, & Shapiro (2009), using the radial coordinate $r$:
$$ r_{BL} = r \left( 1 + \frac{r_+}{4r}\right)^2. $$# Boyer - Lindquist radius in terms of UIUC radius
# Eq. 11
# r_{BL} = r * ( 1 + r_+ / 4r )^2
rBL = r*(1 + rp / (4*r))**2
Quantities used to calculate the spatial metric $\gamma_{ij}$, found under equation 2 of Liu, Etienne, & Shapiro (2009): $$ \Sigma = r_{BL}^2 + a^2 \cos^2 \theta, $$
$$ \Delta = r_{BL}^2 - 2Mr_{BL} + a^2, $$$$ A = \left(r_{BL}^2 + a^2\right)^2 - \Delta a^2 \sin^2 \theta. $$# Expressions found below Eq. 2
# Sigma = r_{BL}^2 + a^2 cos^2 theta
SIG = rBL**2 + a**2*sp.cos(th)**2
# Delta = r_{BL}^2 - 2Mr_{BL} + a^2
DEL = rBL**2 - 2*M*rBL + a**2
# A = (r_{BL}^2 + a^2)^2 - Delta a^2 sin^2 theta
AA = (rBL**2 + a**2)**2 - DEL*a**2*sp.sin(th)**2
The line element, defined in equation 13 of Liu, Etienne, & Shapiro (2009):
$$ ds^2 = \frac{\Sigma\left(r + \frac{r_+}{4}\right)^2 } {r^3 \left(r_{BL} - r_- \right)} dr^2 + \Sigma d\theta^2 + \frac{ A \sin^2 \theta }{\Sigma} d\phi^2 $$# *** The ADM 3-metric in spherical basis ***
gammaSphDD = ixp.zerorank2()
# Declare the nonzero components of the 3-metric (Eq. 13):
# ds^2 = Sigma (r + r_+/4)^2 / ( r^3 (r_{BL} - r_- ) * dr^2 +
# Sigma d theta^2 + (A sin^2 theta) / Sigma * d\phi^2
gammaSphDD[0][0] = ((SIG*(r + rp/4)**2)/(r**3*(rBL - rm)))
gammaSphDD[1][1] = SIG
gammaSphDD[2][2] = AA/SIG*sp.sin(th)**2
Nonzero components of the extrinsic curvature, equation 14 of Liu, Etienne, & Shapiro (2009):
$$ K_{r\phi} = K_{\phi r} = \frac{Ma\sin^2\theta}{\Sigma\sqrt{A\Sigma}} \ \left[3r^4_{BL} + 2a^2 r^2_{BL} - a^4 - a^2 \left(r^2_{BL} - a^2\right) \sin^2 \theta\right] \ \left(1 + \frac{r_+}{4r}\right) \frac{1}{\sqrt{r(r_{BL} - r_-)}} $$# *** The physical trace-free extrinsic curvature in spherical basis ***
# Nonzero components of the extrinsic curvature K, given by
# Eq. 14 of Liu, Etienne, & Shapiro, https://arxiv.org/pdf/1001.4077.pdf:
KSphDD = ixp.zerorank2() # K_{ij} = 0 for these initial data
# K_{r phi} = K_{phi r} = (Ma sin^2 theta) / (Sigma sqrt{A Sigma}) *
# [3r^4_{BL} + 2a^2 r^2_{BL} - a^4 - a^2 (r^2_{BL} - a^2) sin^2 theta] *
# (1 + r_+ / 4r) (1 / sqrt{r(r_{BL} - r_-)})
KSphDD[0][2] = KSphDD[2][0] = (M*a*sp.sin(th)**2)/(SIG*sp.sqrt(AA*SIG))*\
(3*rBL**4 + 2*a**2*rBL**2 - a**4- a**2*(rBL**2 - a**2)*\
sp.sin(th)**2)*(1 + rp/(4*r))*1/sp.sqrt(r*(rBL - rm))
Nonzero components of the extrinsic curvature, equation 15 of Liu, Etienne, & Shapiro (2009):
$$ K_{\theta\phi} = K_{\phi\theta} = -\frac{2a^3 Mr_{BL}\cos\theta \sin^3\theta} {\Sigma \sqrt{A\Sigma} } \left(r - \frac{r_+}{4}\right) \sqrt {\frac{r_{BL} - r_-}{r} } $$# Components of the extrinsic curvature K, given by
# Eq. 15 of Liu, Etienne, & Shapiro, https://arxiv.org/pdf/1001.4077.pdf:
# K_{theta phi} = K_{phi theta} = -(2a^3 Mr_{BL} cos theta sin^3 theta) /
# (Sigma sqrt{A Sigma}) x (r - r_+ / 4) sqrt{(r_{BL} - r_-) / r }
KSphDD[1][2] = KSphDD[2][1] = -((2*a**3*M*rBL*sp.cos(th)*sp.sin(th)**3)/ \
(SIG*sp.sqrt(AA*SIG)))*(r - rp/4)*sp.sqrt((rBL - rm)/r)
alphaSph = sp.sympify(1)
betaSphU = ixp.zerorank1() # We generally choose \beta^i = 0 for these initial data
BSphU = ixp.zerorank1() # We generally choose B^i = 0 for these initial data
# Validated against original SENR: KSphDD[0][2], KSphDD[1][2], gammaSphDD[2][2], gammaSphDD[0][0], gammaSphDD[1][1]
# print(sp.mathematica_code(gammaSphDD[1][1]))
BSSN.UIUCBlackHole
NRPy+ module [Back to top]¶Here, as a code validation check, we verify agreement in the SymPy expressions for UIUC black hole initial data between
# First we import reference_metric, which is
# needed since BSSN.UIUCBlackHole calls
# BSSN.ADM_Exact_Spherical_or_Cartesian_to_BSSNCurvilinear, which
# depends on reference_metric:
import reference_metric as rfm # NRPy+: Reference metric support
rfm.reference_metric()
import BSSN.UIUCBlackHole as uibh
uibh.UIUCBlackHole()
print("Consistency check between Brill-Lindquist tutorial and NRPy+ BSSN.BrillLindquist module. ALL SHOULD BE ZERO.")
print("alphaSph - uibh.alphaSph = "+str(sp.simplify(alphaSph - uibh.alphaSph)))
for i in range(DIM):
print("betaSphU["+str(i)+"] - uibh.betaSphU["+str(i)+"] = "+\
str(sp.simplify(betaSphU[i] - uibh.betaSphU[i])))
print("BSphU["+str(i)+"] - uibh.BaSphU["+str(i)+"] = "+str(sp.simplify(BSphU[i] - uibh.BSphU[i])))
for j in range(DIM):
print("gammaSphDD["+str(i)+"]["+str(j)+"] - uibh.gammaSphDD["+str(i)+"]["+str(j)+"] = "+\
str(sp.simplify(gammaSphDD[i][j] - uibh.gammaSphDD[i][j])))
print("KSphDD["+str(i)+"]["+str(j)+"] - uibh.KSphDD["+str(i)+"]["+str(j)+"] = "+\
str(sp.simplify(KSphDD[i][j] - uibh.KSphDD[i][j])))
Consistency check between Brill-Lindquist tutorial and NRPy+ BSSN.BrillLindquist module. ALL SHOULD BE ZERO. alphaSph - uibh.alphaSph = 0 betaSphU[0] - uibh.betaSphU[0] = 0 BSphU[0] - uibh.BaSphU[0] = 0 gammaSphDD[0][0] - uibh.gammaSphDD[0][0] = 0 KSphDD[0][0] - uibh.KSphDD[0][0] = 0 gammaSphDD[0][1] - uibh.gammaSphDD[0][1] = 0 KSphDD[0][1] - uibh.KSphDD[0][1] = 0 gammaSphDD[0][2] - uibh.gammaSphDD[0][2] = 0 KSphDD[0][2] - uibh.KSphDD[0][2] = 0 betaSphU[1] - uibh.betaSphU[1] = 0 BSphU[1] - uibh.BaSphU[1] = 0 gammaSphDD[1][0] - uibh.gammaSphDD[1][0] = 0 KSphDD[1][0] - uibh.KSphDD[1][0] = 0 gammaSphDD[1][1] - uibh.gammaSphDD[1][1] = 0 KSphDD[1][1] - uibh.KSphDD[1][1] = 0 gammaSphDD[1][2] - uibh.gammaSphDD[1][2] = 0 KSphDD[1][2] - uibh.KSphDD[1][2] = 0 betaSphU[2] - uibh.betaSphU[2] = 0 BSphU[2] - uibh.BaSphU[2] = 0 gammaSphDD[2][0] - uibh.gammaSphDD[2][0] = 0 KSphDD[2][0] - uibh.KSphDD[2][0] = 0 gammaSphDD[2][1] - uibh.gammaSphDD[2][1] = 0 KSphDD[2][1] - uibh.KSphDD[2][1] = 0 gammaSphDD[2][2] - uibh.gammaSphDD[2][2] = 0 KSphDD[2][2] - uibh.KSphDD[2][2] = 0
The following code cell converts this Jupyter notebook into a proper, clickable $\LaTeX$-formatted PDF file. After the cell is successfully run, the generated PDF may be found in the root NRPy+ tutorial directory, with filename Tutorial-ADM_Initial_Data-UIUC_BlackHole.pdf (Note that clicking on this link may not work; you may need to open the PDF file through another means.)
import cmdline_helper as cmd # NRPy+: Multi-platform Python command-line interface
cmd.output_Jupyter_notebook_to_LaTeXed_PDF("Tutorial-ADM_Initial_Data-UIUC_BlackHole")
Created Tutorial-ADM_Initial_Data-UIUC_BlackHole.tex, and compiled LaTeX file to PDF file Tutorial-ADM_Initial_Data-UIUC_BlackHole.pdf