{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Slicing of Kerr spacetime by spacelike submanifolds\n", "\n", "This notebook demonstrates a few capabilities of SageMath in computations regarding embedded submanifolds on the specific example of the 3+1 slicing of Kerr spacetime. The corresponding tools have been developed within the [SageManifolds](https://sagemanifolds.obspm.fr) project (version 1.3, as included in SageMath 8.3).\n", "\n", "Click [here](https://raw.githubusercontent.com/sagemanifolds/SageManifolds/master/Worksheets/v1.3/SM_submanifold_Kerr_slicing.ipynb) to download the notebook file (ipynb format). To run it, you must start SageMath within the Jupyter notebook, via the command `sage -n jupyter`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "*NB:* a version of SageMath at least equal to 8.3 is required to run this notebook:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'SageMath version 8.3, Release Date: 2018-08-03'" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "version()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The first cell defines some notebook options. Parallelism is usefull to speedup calculation of the connection." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "%display latex\n", "Parallelism().set(nproc=8)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Manifolds declaration\n", "\n", "Next cells are used to define the manifolds. In our case, $M$ will be the Kerr spacetime, of which $N$ is a single spacelike submanifold of dimension 3 (hypersurface)." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "4-dimensional Lorentzian manifold M\n" ] } ], "source": [ "M = Manifold(4, 'M', structure=\"Lorentzian\")\n", "print(M)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "3-dimensional pseudo-Riemannian submanifold N embedded in 4-dimensional differentiable manifold M\n" ] } ], "source": [ "N = Manifold(3, 'N', ambient=M, structure=\"Riemannian\")\n", "print(N)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Note the `ambient=M`, used to declare $N$ as a submanifold of $M$.\n", "\n", "We will use a single chart, corresponding to the so-called **Kerr coordinates** (*NB*: they differ from the standard Boyer-Lindquist coordinates):" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "C. = M.chart(r't:(-oo,+oo) r:(0,+oo) th:(0,pi):\\theta ph:(-pi,pi):\\phi')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Spacetime metric" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The metric depends on two quantities: the mass of the black-hole and its angular momentum. These are declared as symbolic variables. $\\rho$ is a shortcut notation." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "m = var('m') # mass\n", "a = var('a') # ratio J/m" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "rho = sqrt(r^2+a^2*cos(th)^2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We set the metric components in the Kerr coordinates introduced above:" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "g = M.metric()\n", "g[0,0], g[1,1], g[2,2] = -(1-2*m*r/rho^2), 1+2*m*r/rho^2, rho^2\n", "g[3,3] = (r^2+a^2+2*a^2*m*r*sin(th)**2/rho^2)*sin(th)^2\n", "g[0,1] = 2*m*r/rho^2\n", "g[0,3] = -2*a*m*r/rho^2*sin(th)^2\n", "g[1,3] = -a*sin(th)^2*(1+2*m*r/rho^2)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[ 2*m*r/(a^2*cos(th)^2 + r^2) - 1 2*m*r/(a^2*cos(th)^2 + r^2) 0 -2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2)]\n", "[ 2*m*r/(a^2*cos(th)^2 + r^2) 2*m*r/(a^2*cos(th)^2 + r^2) + 1 0 -a*(2*m*r/(a^2*cos(th)^2 + r^2) + 1)*sin(th)^2]\n", "[ 0 0 a^2*cos(th)^2 + r^2 0]\n", "[ -2*a*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) -a*(2*m*r/(a^2*cos(th)^2 + r^2) + 1)*sin(th)^2 0 (2*a^2*m*r*sin(th)^2/(a^2*cos(th)^2 + r^2) + a^2 + r^2)*sin(th)^2]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g[:]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's compute the Levi-Civita connection:" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "nab = g.connection()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "List of Christoffel symbols:" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "Gam^t_t,t = -2*(a^2*m^2*r*cos(th)^2 - m^2*r^3)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^t_t,r = -(a^4*m*cos(th)^4 + 2*a^2*m^2*r*cos(th)^2 - 2*m^2*r^3 - m*r^4)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^t_t,th = -2*a^2*m*r*cos(th)*sin(th)/(a^4*cos(th)^4 + 2*a^2*r^2*cos(th)^2 + r^4) \n", "Gam^t_t,ph = 2*(a^3*m^2*r*cos(th)^2 - a*m^2*r^3)*sin(th)^2/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^t_r,r = -2*(a^4*m*cos(th)^4 + a^2*m^2*r*cos(th)^2 - m^2*r^3 - m*r^4)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^t_r,th = -2*a^2*m*r*cos(th)*sin(th)/(a^4*cos(th)^4 + 2*a^2*r^2*cos(th)^2 + r^4) \n", "Gam^t_r,ph = (a^5*m*cos(th)^4 + 2*a^3*m^2*r*cos(th)^2 - 2*a*m^2*r^3 - a*m*r^4)*sin(th)^2/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^t_th,th = -2*m*r^2/(a^2*cos(th)^2 + r^2) \n", "Gam^t_th,ph = 2*a^3*m*r*cos(th)*sin(th)^3/(a^4*cos(th)^4 + 2*a^2*r^2*cos(th)^2 + r^4) \n", "Gam^t_ph,ph = -2*((a^4*m^2*r*cos(th)^2 - a^2*m^2*r^3)*sin(th)^4 + (a^4*m*r^2*cos(th)^4 + 2*a^2*m*r^4*cos(th)^2 + m*r^6)*sin(th)^2)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^r_t,t = (a^2*m*r^2 - 2*m^2*r^3 + m*r^4 - (a^4*m - 2*a^2*m^2*r + a^2*m*r^2)*cos(th)^2)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^r_t,r = (2*a^2*m^2*r*cos(th)^2 - 2*m^2*r^3 - (a^4*m*cos(th)^2 - a^2*m*r^2)*sin(th)^2)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^r_t,ph = -(a^3*m*r^2 - 2*a*m^2*r^3 + a*m*r^4 - (a^5*m - 2*a^3*m^2*r + a^3*m*r^2)*cos(th)^2)*sin(th)^2/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^r_r,r = (2*a^4*m*cos(th)^4 + a^2*m*r^2 - 2*m^2*r^3 - m*r^4 - (a^4*m - 2*a^2*m^2*r + a^2*m*r^2)*cos(th)^2)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^r_r,th = -a^2*cos(th)*sin(th)/(a^2*cos(th)^2 + r^2) \n", "Gam^r_r,ph = ((a^5*m*cos(th)^2 - a^3*m*r^2)*sin(th)^4 + (a^5*r*cos(th)^4 + 2*a*m^2*r^3 + a*r^5 - 2*(a^3*m^2*r - a^3*r^3)*cos(th)^2)*sin(th)^2)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^r_th,th = -(a^2*r - 2*m*r^2 + r^3)/(a^2*cos(th)^2 + r^2) \n", "Gam^r_ph,ph = ((a^4*m*r^2 - 2*a^2*m^2*r^3 + a^2*m*r^4 - (a^6*m - 2*a^4*m^2*r + a^4*m*r^2)*cos(th)^2)*sin(th)^4 - (a^2*r^5 - 2*m*r^6 + r^7 + (a^6*r - 2*a^4*m*r^2 + a^4*r^3)*cos(th)^4 + 2*(a^4*r^3 - 2*a^2*m*r^4 + a^2*r^5)*cos(th)^2)*sin(th)^2)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^th_t,t = -2*a^2*m*r*cos(th)*sin(th)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^th_t,r = -2*a^2*m*r*cos(th)*sin(th)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^th_t,ph = 2*(a^3*m*r + a*m*r^3)*cos(th)*sin(th)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^th_r,r = -2*a^2*m*r*cos(th)*sin(th)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^th_r,th = r/(a^2*cos(th)^2 + r^2) \n", "Gam^th_r,ph = (a^5*cos(th)^5 + 2*a^3*r^2*cos(th)^3 + (2*a^3*m*r + 2*a*m*r^3 + a*r^4)*cos(th))*sin(th)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^th_th,th = -a^2*cos(th)*sin(th)/(a^2*cos(th)^2 + r^2) \n", "Gam^th_ph,ph = -((a^6 - 2*a^4*m*r + a^4*r^2)*cos(th)^5 + 2*(a^4*r^2 - 2*a^2*m*r^3 + a^2*r^4)*cos(th)^3 + (2*a^4*m*r + 4*a^2*m*r^3 + a^2*r^4 + r^6)*cos(th))*sin(th)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^ph_t,t = -(a^3*m*cos(th)^2 - a*m*r^2)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^ph_t,r = -(a^3*m*cos(th)^2 - a*m*r^2)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^ph_t,th = -2*a*m*r*cos(th)/((a^4*cos(th)^4 + 2*a^2*r^2*cos(th)^2 + r^4)*sin(th)) \n", "Gam^ph_t,ph = (a^4*m*cos(th)^2 - a^2*m*r^2)*sin(th)^2/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^ph_r,r = -(a^3*m*cos(th)^2 - a*m*r^2)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^ph_r,th = -(a^3*cos(th)^3 + (2*a*m*r + a*r^2)*cos(th))/((a^4*cos(th)^4 + 2*a^2*r^2*cos(th)^2 + r^4)*sin(th)) \n", "Gam^ph_r,ph = (a^4*r*cos(th)^4 + 2*a^2*r^3*cos(th)^2 + r^5 + (a^4*m*cos(th)^2 - a^2*m*r^2)*sin(th)^2)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) \n", "Gam^ph_th,th = -a*r/(a^2*cos(th)^2 + r^2) \n", "Gam^ph_th,ph = (a^4*cos(th)^5 - 2*(a^2*m*r - a^2*r^2)*cos(th)^3 + (2*a^2*m*r + r^4)*cos(th))/((a^4*cos(th)^4 + 2*a^2*r^2*cos(th)^2 + r^4)*sin(th)) \n", "Gam^ph_ph,ph = -((a^5*m*cos(th)^2 - a^3*m*r^2)*sin(th)^4 + (a^5*r*cos(th)^4 + 2*a^3*r^3*cos(th)^2 + a*r^5)*sin(th)^2)/(a^6*cos(th)^6 + 3*a^4*r^2*cos(th)^4 + 3*a^2*r^4*cos(th)^2 + r^6) " ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "nab.display(only_nonredundant=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Ricci tensor:" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[0 0 0 0]\n", "[0 0 0 0]\n", "[0 0 0 0]\n", "[0 0 0 0]" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "nab.ricci()[:]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This proves that the metric given in cell [8] is indeed solution of the vacuum Einstein equation, as expected of a Kerr metric.\n", "\n", "It's now time to foliate it along the $t$ axis." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Slicing:\n", "\n", "To compute 3+1 quantities, we must first declare an embedding from $N$ to $M$. because we want our foliation to encompass the whole manifold, the embedding must depend on a parameter $\\tau$." ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "tau = var(r'tau') # foliation parameter" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's also declare a chart on $N$." ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [], "source": [ "CN. = N.chart(r'r0:(0,+oo) th0:(0,pi):\\theta_0 ph0:(-pi,pi):\\phi_0')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The embedding used is a very simple one, it simply sets $t = \\tau$." ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "N --> M\n", " (r0, th0, ph0) |--> (t, r, th, ph) = (tau, r0, th0, ph0)" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "phi = N.diff_map(M, {(CN,C):[tau,r0,th0,ph0]})\n", "phi.display()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The two partial inverses are also quite simple:" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "M --> N\n", " (t, r, th, ph) |--> (r0, th0, ph0) = (r, th, ph)" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "phi_inv = M.diff_map(N, {(C,CN):[r,th,ph]})\n", "phi_inv.display()" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "M --> R\n", "(t, r, th, ph) |--> t" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "phi_inv_tau = M.scalar_field({C:t})\n", "phi_inv_tau.display()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The following line registers the embedding, as well as the inverses. This cannot be done during the creation of the manifolds because the embedding `phi` needs exisiting domain and codomain to be created." ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [], "source": [ "N.set_embedding(phi, inverse=phi_inv, var=tau, t_inverse={tau: phi_inv_tau})" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Computing the adapted chart is needed for computing the shift and extrinsic curvature. This create another chart, which in our case is identical to `CN` because of the form of the embedding." ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[Chart (M, (r0_M, th0_M, ph0_M, tau_M))]" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "T = N.adapted_chart()\n", "T" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The induced metric on $N$ (or first fundamental form) is then given by:" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[ (a^2*cos(th0)^2 + 2*m*r0 + r0^2)/(a^2*cos(th0)^2 + r0^2) 0 -(a^3*cos(th0)^2 + 2*a*m*r0 + a*r0^2)*sin(th0)^2/(a^2*cos(th0)^2 + r0^2)]\n", "[ 0 a^2*cos(th0)^2 + r0^2 0]\n", "[ -(a^3*cos(th0)^2 + 2*a*m*r0 + a*r0^2)*sin(th0)^2/(a^2*cos(th0)^2 + r0^2) 0 (2*a^2*m*r0*sin(th0)^4 + (a^2*r0^2 + r0^4 + (a^4 + a^2*r0^2)*cos(th0)^2)*sin(th0)^2)/(a^2*cos(th0)^2 + r0^2)]" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "N.induced_metric()[:]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "And its inverse:" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[(2*a^2*m*r0*sin(th0)^2 + a^2*r0^2 + r0^4 + (a^4 + a^2*r0^2)*cos(th0)^2)/(a^4*cos(th0)^4 + 2*m*r0^3 + r0^4 + 2*(a^2*m*r0 + a^2*r0^2)*cos(th0)^2) 0 a/(a^2*cos(th0)^2 + r0^2)]\n", "[ 0 1/(a^2*cos(th0)^2 + r0^2) 0]\n", "[ a/(a^2*cos(th0)^2 + r0^2) 0 -1/(a^2*sin(th0)^4 - (a^2 + r0^2)*sin(th0)^2)]" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "N.induced_metric().inverse()[:]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The normal vector is given by" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "n = sqrt(a^2*cos(th)^2 + 2*m*r + r^2)/sqrt(a^2*cos(th)^2 + r^2) d/dt - 2*m*r/(sqrt(a^2*cos(th)^2 + 2*m*r + r^2)*sqrt(a^2*cos(th)^2 + r^2)) d/dr" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "N.normal().display()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's check that it is correcly normalized:" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "g(n,n): M --> R\n", " (t, r, th, ph) |--> -1\n", " (r0_M, th0_M, ph0_M, tau_M) |--> -1" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g(N.normal(), N.normal()).display()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The lapse and shift are also easily computed: " ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "N: M --> R\n", " (t, r, th, ph) |--> sqrt(a^2*cos(th)^2 + r^2)/sqrt(a^2*cos(th)^2 + 2*m*r + r^2)\n", " (r0_M, th0_M, ph0_M, tau_M) |--> sqrt(a^2*cos(th0_M)^2 + r0_M^2)/sqrt(a^2*cos(th0_M)^2 + 2*m*r0_M + r0_M^2)" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "N.lapse().display()" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "beta = 2*m*r/(a^2*cos(th)^2 + 2*m*r + r^2) d/dr" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "N.shift().display()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The extrinsic curvature (or second fundamental form) is long to compute because of failed simplifications (see the last component)." ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[ 2*(a^4*m*cos(th0)^4 + a^2*m^2*r0*cos(th0)^2 - m^2*r0^3 - m*r0^4)/((a^4*cos(th0)^4 + 2*a^2*r0^2*cos(th0)^2 + r0^4)*sqrt(a^2*cos(th0)^2 + 2*m*r0 + r0^2)*sqrt(a^2*cos(th0)^2 + r0^2)) 2*sqrt(a^2*cos(th0)^2 + r0^2)*a^2*m*r0*cos(th0)*sin(th0)/((a^4*cos(th0)^4 + 2*a^2*r0^2*cos(th0)^2 + r0^4)*sqrt(a^2*cos(th0)^2 + 2*m*r0 + r0^2)) -(a^5*m*sin(th0)^6 - 2*(a^5*m + a^3*m^2*r0)*sin(th0)^4 + (a^5*m + 2*a^3*m^2*r0 - 2*a*m^2*r0^3 - a*m*r0^4)*sin(th0)^2)/((a^4*cos(th0)^4 + 2*a^2*r0^2*cos(th0)^2 + r0^4)*sqrt(a^2*cos(th0)^2 + 2*m*r0 + r0^2)*sqrt(a^2*cos(th0)^2 + r0^2))]\n", "[ 2*sqrt(a^2*cos(th0)^2 + r0^2)*a^2*m*r0*cos(th0)*sin(th0)/((a^4*cos(th0)^4 + 2*a^2*r0^2*cos(th0)^2 + r0^4)*sqrt(a^2*cos(th0)^2 + 2*m*r0 + r0^2)) 2*m*r0^2/(sqrt(a^2*cos(th0)^2 + 2*m*r0 + r0^2)*sqrt(a^2*cos(th0)^2 + r0^2)) -2*a^3*m*r0*cos(th0)*sin(th0)^3/(sqrt(a^2*cos(th0)^2 + 2*m*r0 + r0^2)*(a^2*cos(th0)^2 + r0^2)^(3/2))]\n", "[ -(a^5*m*sin(th0)^6 - 2*(a^5*m + a^3*m^2*r0)*sin(th0)^4 + (a^5*m + 2*a^3*m^2*r0 - 2*a*m^2*r0^3 - a*m*r0^4)*sin(th0)^2)/((a^4*cos(th0)^4 + 2*a^2*r0^2*cos(th0)^2 + r0^4)*sqrt(a^2*cos(th0)^2 + 2*m*r0 + r0^2)*sqrt(a^2*cos(th0)^2 + r0^2)) -2*a^3*m*r0*cos(th0)*sin(th0)^3/(sqrt(a^2*cos(th0)^2 + 2*m*r0 + r0^2)*(a^2*cos(th0)^2 + r0^2)^(3/2)) -2*((a^4*m^2*r0 - a^4*m*r0^2)*sin(th0)^6 - (a^4*m^2*r0 - 2*a^4*m*r0^2 - a^2*m^2*r0^3 - 2*a^2*m*r0^4)*sin(th0)^4 - (a^4*m*r0^2 + 2*a^2*m*r0^4 + m*r0^6)*sin(th0)^2)*sqrt(-a^2*sin(th0)^2 + a^2 + 2*m*r0 + r0^2)*sqrt(-a^2*sin(th0)^2 + a^2 + r0^2)/(a^8*cos(th0)^8 + 2*m*r0^7 + r0^8 + 2*(a^6*m*r0 + 2*a^6*r0^2)*cos(th0)^6 + 6*(a^4*m*r0^3 + a^4*r0^4)*cos(th0)^4 + 2*(3*a^2*m*r0^5 + 2*a^2*r0^6)*cos(th0)^2)]" ] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "N.second_fundamental_form()[:]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example of 3+1 projection\n", "\n", "It is also possible to project any tensor on $M$ orhogonaly on the submnifold or on the normal vector. This can be useful for example to decompose an energy-impulsion tensor.\n", "\n", "Let's construct a fourth-order tensor from a simple vector field." ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [], "source": [ "v = M.vector_field()\n", "v.add_comp()[:] = [1,1,1,1]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The fourth-order tensor $v\\otimes v\\otimes v\\otimes v$ is then projected twice on the submanifold (on the indices 1 and 3) and twice along the normal vector (indicies 0 and 2). The result is the following second-order tensor on $M$:" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(a^6*cos(th)^6 + 16*m^2*r^4 + 8*m*r^5 + r^6 + (8*a^4*m*r + 3*a^4*r^2)*cos(th)^4 + (16*a^2*m^2*r^2 + 16*a^2*m*r^3 + 3*a^2*r^4)*cos(th)^2)/(a^6*cos(th)^6 + 8*m^3*r^3 + 12*m^2*r^4 + 6*m*r^5 + r^6 + 3*(2*a^4*m*r + a^4*r^2)*cos(th)^4 + 3*(4*a^2*m^2*r^2 + 4*a^2*m*r^3 + a^2*r^4)*cos(th)^2) d/dr*d/dr + (a^4*cos(th)^4 + 4*m*r^3 + r^4 + 2*(2*a^2*m*r + a^2*r^2)*cos(th)^2)/(a^4*cos(th)^4 + 4*m^2*r^2 + 4*m*r^3 + r^4 + 2*(2*a^2*m*r + a^2*r^2)*cos(th)^2) d/dr*d/dth + (a^4*cos(th)^4 + 4*m*r^3 + r^4 + 2*(2*a^2*m*r + a^2*r^2)*cos(th)^2)/(a^4*cos(th)^4 + 4*m^2*r^2 + 4*m*r^3 + r^4 + 2*(2*a^2*m*r + a^2*r^2)*cos(th)^2) d/dr*d/dph + (a^4*cos(th)^4 + 4*m*r^3 + r^4 + 2*(2*a^2*m*r + a^2*r^2)*cos(th)^2)/(a^4*cos(th)^4 + 4*m^2*r^2 + 4*m*r^3 + r^4 + 2*(2*a^2*m*r + a^2*r^2)*cos(th)^2) d/dth*d/dr + (a^2*cos(th)^2 + r^2)/(a^2*cos(th)^2 + 2*m*r + r^2) d/dth*d/dth + (a^2*cos(th)^2 + r^2)/(a^2*cos(th)^2 + 2*m*r + r^2) d/dth*d/dph + (a^4*cos(th)^4 + 4*m*r^3 + r^4 + 2*(2*a^2*m*r + a^2*r^2)*cos(th)^2)/(a^4*cos(th)^4 + 4*m^2*r^2 + 4*m*r^3 + r^4 + 2*(2*a^2*m*r + a^2*r^2)*cos(th)^2) d/dph*d/dr + (a^2*cos(th)^2 + r^2)/(a^2*cos(th)^2 + 2*m*r + r^2) d/dph*d/dth + (a^2*cos(th)^2 + r^2)/(a^2*cos(th)^2 + 2*m*r + r^2) d/dph*d/dph" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "N.mixed_projection(v*v*v*v, [0,2]).display()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "SageMath 8.3", "language": "", "name": "sagemath" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.15" } }, "nbformat": 4, "nbformat_minor": 2 }