{ "cells": [ { "cell_type": "markdown", "id": "924647b5", "metadata": {}, "source": [ "# Curvature tensor in the Oppenheimer-Snyder interior\n", "\n", "This Jupyter/SageMath notebook is relative to the lectures\n", "[Geometry and physics of black holes](https://luth.obspm.fr/~luthier/gourgoulhon/bh16/).\n", "\n", "The computations make use of tools developed through the [SageManifolds project](https://sagemanifolds.obspm.fr)." ] }, { "cell_type": "code", "execution_count": 1, "id": "5ddd1cfa", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'SageMath version 9.5.beta7, Release Date: 2021-11-18'" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "version()" ] }, { "cell_type": "code", "execution_count": 2, "id": "78d72dbb", "metadata": {}, "outputs": [], "source": [ "%display latex" ] }, { "cell_type": "markdown", "id": "78442919", "metadata": {}, "source": [ "## Interior spacetime for Oppenheimer-Snyder collapse from rest" ] }, { "cell_type": "code", "execution_count": 3, "id": "cb58f904", "metadata": {}, "outputs": [], "source": [ "M = Manifold(4, 'M', structure='Lorentzian')" ] }, { "cell_type": "markdown", "id": "51a8288a", "metadata": {}, "source": [ "Chart of conformal coordinates:" ] }, { "cell_type": "code", "execution_count": 4, "id": "2fec6556", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(M,({\\eta}, {\\chi}, {\\theta}, {\\varphi})\\right)\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(M,({\\eta}, {\\chi}, {\\theta}, {\\varphi})\\right)$$" ], "text/plain": [ "Chart (M, (et, ch, th, ph))" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "CC. = M.chart(r\"et:(0,pi):\\eta ch:(0,pi/2):\\chi th:(0,pi):\\theta ph:(0,2*pi):periodic:\\varphi\")\n", "CC" ] }, { "cell_type": "code", "execution_count": 5, "id": "7fca69ef", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}{\\eta} :\\ \\left( 0 , \\pi \\right) ;\\quad {\\chi} :\\ \\left( 0 , \\frac{1}{2} \\, \\pi \\right) ;\\quad {\\theta} :\\ \\left( 0 , \\pi \\right) ;\\quad {\\varphi} :\\ \\left[ 0 , 2 \\, \\pi \\right] \\mbox{(periodic)}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}{\\eta} :\\ \\left( 0 , \\pi \\right) ;\\quad {\\chi} :\\ \\left( 0 , \\frac{1}{2} \\, \\pi \\right) ;\\quad {\\theta} :\\ \\left( 0 , \\pi \\right) ;\\quad {\\varphi} :\\ \\left[ 0 , 2 \\, \\pi \\right] \\mbox{(periodic)}$$" ], "text/plain": [ "et: (0, pi); ch: (0, 1/2*pi); th: (0, pi); ph: [0, 2*pi] (periodic)" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "CC.coord_range()" ] }, { "cell_type": "code", "execution_count": 6, "id": "f7eee45f", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}g = -\\frac{1}{4} \\, a_{0}^{2} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}^{2} \\mathrm{d} {\\eta}\\otimes \\mathrm{d} {\\eta} + \\frac{1}{4} \\, a_{0}^{2} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}^{2} \\mathrm{d} {\\chi}\\otimes \\mathrm{d} {\\chi} + \\frac{1}{4} \\, a_{0}^{2} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}^{2} \\sin\\left({\\chi}\\right)^{2} \\mathrm{d} {\\theta}\\otimes \\mathrm{d} {\\theta} + \\frac{1}{4} \\, a_{0}^{2} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}^{2} \\sin\\left({\\chi}\\right)^{2} \\sin\\left({\\theta}\\right)^{2} \\mathrm{d} {\\varphi}\\otimes \\mathrm{d} {\\varphi}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}g = -\\frac{1}{4} \\, a_{0}^{2} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}^{2} \\mathrm{d} {\\eta}\\otimes \\mathrm{d} {\\eta} + \\frac{1}{4} \\, a_{0}^{2} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}^{2} \\mathrm{d} {\\chi}\\otimes \\mathrm{d} {\\chi} + \\frac{1}{4} \\, a_{0}^{2} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}^{2} \\sin\\left({\\chi}\\right)^{2} \\mathrm{d} {\\theta}\\otimes \\mathrm{d} {\\theta} + \\frac{1}{4} \\, a_{0}^{2} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}^{2} \\sin\\left({\\chi}\\right)^{2} \\sin\\left({\\theta}\\right)^{2} \\mathrm{d} {\\varphi}\\otimes \\mathrm{d} {\\varphi}$$" ], "text/plain": [ "g = -1/4*a0^2*(cos(et) + 1)^2 det⊗det + 1/4*a0^2*(cos(et) + 1)^2 dch⊗dch + 1/4*a0^2*(cos(et) + 1)^2*sin(ch)^2 dth⊗dth + 1/4*a0^2*(cos(et) + 1)^2*sin(ch)^2*sin(th)^2 dph⊗dph" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g = M.metric()\n", "a0 = var('a0', domain='real')\n", "cf = a0^2/4*(1 + cos(et))^2\n", "g[0,0] = - cf\n", "g[1,1] = cf\n", "g[2,2] = cf*sin(ch)^2\n", "g[3,3] = cf*sin(ch)^2*sin(th)^2\n", "g.display()" ] }, { "cell_type": "markdown", "id": "6b12411d", "metadata": {}, "source": [ "### Ricci tensor" ] }, { "cell_type": "code", "execution_count": 7, "id": "0075be13", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\begin{array}{lcl} \\mathrm{Ric}\\left(g\\right)_{ \\, {\\eta} \\, {\\eta} }^{ \\phantom{\\, {\\eta}}\\phantom{\\, {\\eta}} } & = & \\frac{3}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Ric}\\left(g\\right)_{ \\, {\\chi} \\, {\\chi} }^{ \\phantom{\\, {\\chi}}\\phantom{\\, {\\chi}} } & = & \\frac{3}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Ric}\\left(g\\right)_{ \\, {\\theta} \\, {\\theta} }^{ \\phantom{\\, {\\theta}}\\phantom{\\, {\\theta}} } & = & -\\frac{3 \\, {\\left({\\left(\\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + 5 \\, \\sin\\left({\\chi}\\right)^{2}\\right)} \\sin\\left({\\eta}\\right)^{4} + 16 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} - 4 \\, {\\left(3 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + 5 \\, \\sin\\left({\\chi}\\right)^{2}\\right)} \\sin\\left({\\eta}\\right)^{2} + 16 \\, \\sin\\left({\\chi}\\right)^{2}\\right)}}{\\sin\\left({\\eta}\\right)^{6} - 6 \\, {\\left(\\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{4} + 16 \\, {\\left(2 \\, \\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{2} - 32 \\, \\cos\\left({\\eta}\\right) - 32} \\\\ \\mathrm{Ric}\\left(g\\right)_{ \\, {\\varphi} \\, {\\varphi} }^{ \\phantom{\\, {\\varphi}}\\phantom{\\, {\\varphi}} } & = & -\\frac{3 \\, {\\left({\\left(\\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + 5 \\, \\sin\\left({\\chi}\\right)^{2}\\right)} \\sin\\left({\\eta}\\right)^{4} + 16 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} - 4 \\, {\\left(3 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + 5 \\, \\sin\\left({\\chi}\\right)^{2}\\right)} \\sin\\left({\\eta}\\right)^{2} + 16 \\, \\sin\\left({\\chi}\\right)^{2}\\right)} \\sin\\left({\\theta}\\right)^{2}}{\\sin\\left({\\eta}\\right)^{6} - 6 \\, {\\left(\\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{4} + 16 \\, {\\left(2 \\, \\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{2} - 32 \\, \\cos\\left({\\eta}\\right) - 32} \\end{array}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\begin{array}{lcl} \\mathrm{Ric}\\left(g\\right)_{ \\, {\\eta} \\, {\\eta} }^{ \\phantom{\\, {\\eta}}\\phantom{\\, {\\eta}} } & = & \\frac{3}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Ric}\\left(g\\right)_{ \\, {\\chi} \\, {\\chi} }^{ \\phantom{\\, {\\chi}}\\phantom{\\, {\\chi}} } & = & \\frac{3}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Ric}\\left(g\\right)_{ \\, {\\theta} \\, {\\theta} }^{ \\phantom{\\, {\\theta}}\\phantom{\\, {\\theta}} } & = & -\\frac{3 \\, {\\left({\\left(\\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + 5 \\, \\sin\\left({\\chi}\\right)^{2}\\right)} \\sin\\left({\\eta}\\right)^{4} + 16 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} - 4 \\, {\\left(3 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + 5 \\, \\sin\\left({\\chi}\\right)^{2}\\right)} \\sin\\left({\\eta}\\right)^{2} + 16 \\, \\sin\\left({\\chi}\\right)^{2}\\right)}}{\\sin\\left({\\eta}\\right)^{6} - 6 \\, {\\left(\\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{4} + 16 \\, {\\left(2 \\, \\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{2} - 32 \\, \\cos\\left({\\eta}\\right) - 32} \\\\ \\mathrm{Ric}\\left(g\\right)_{ \\, {\\varphi} \\, {\\varphi} }^{ \\phantom{\\, {\\varphi}}\\phantom{\\, {\\varphi}} } & = & -\\frac{3 \\, {\\left({\\left(\\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + 5 \\, \\sin\\left({\\chi}\\right)^{2}\\right)} \\sin\\left({\\eta}\\right)^{4} + 16 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} - 4 \\, {\\left(3 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + 5 \\, \\sin\\left({\\chi}\\right)^{2}\\right)} \\sin\\left({\\eta}\\right)^{2} + 16 \\, \\sin\\left({\\chi}\\right)^{2}\\right)} \\sin\\left({\\theta}\\right)^{2}}{\\sin\\left({\\eta}\\right)^{6} - 6 \\, {\\left(\\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{4} + 16 \\, {\\left(2 \\, \\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{2} - 32 \\, \\cos\\left({\\eta}\\right) - 32} \\end{array}$$" ], "text/plain": [ "Ric(g)_et,et = 3/(cos(et) + 1) \n", "Ric(g)_ch,ch = 3/(cos(et) + 1) \n", "Ric(g)_th,th = -3*((cos(et)*sin(ch)^2 + 5*sin(ch)^2)*sin(et)^4 + 16*cos(et)*sin(ch)^2 - 4*(3*cos(et)*sin(ch)^2 + 5*sin(ch)^2)*sin(et)^2 + 16*sin(ch)^2)/(sin(et)^6 - 6*(cos(et) + 3)*sin(et)^4 + 16*(2*cos(et) + 3)*sin(et)^2 - 32*cos(et) - 32) \n", "Ric(g)_ph,ph = -3*((cos(et)*sin(ch)^2 + 5*sin(ch)^2)*sin(et)^4 + 16*cos(et)*sin(ch)^2 - 4*(3*cos(et)*sin(ch)^2 + 5*sin(ch)^2)*sin(et)^2 + 16*sin(ch)^2)*sin(th)^2/(sin(et)^6 - 6*(cos(et) + 3)*sin(et)^4 + 16*(2*cos(et) + 3)*sin(et)^2 - 32*cos(et) - 32) " ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Ric = g.ricci()\n", "Ric.display_comp()" ] }, { "cell_type": "markdown", "id": "3cc417d3", "metadata": {}, "source": [ "Some trigonometric simplifications are in order:" ] }, { "cell_type": "code", "execution_count": 8, "id": "4b39da26", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\begin{array}{lcl} \\mathrm{Ric}\\left(g\\right)_{ \\, {\\eta} \\, {\\eta} }^{ \\phantom{\\, {\\eta}}\\phantom{\\, {\\eta}} } & = & \\frac{3}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Ric}\\left(g\\right)_{ \\, {\\chi} \\, {\\chi} }^{ \\phantom{\\, {\\chi}}\\phantom{\\, {\\chi}} } & = & \\frac{3}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Ric}\\left(g\\right)_{ \\, {\\theta} \\, {\\theta} }^{ \\phantom{\\, {\\theta}}\\phantom{\\, {\\theta}} } & = & \\frac{3 \\, \\sin\\left({\\chi}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Ric}\\left(g\\right)_{ \\, {\\varphi} \\, {\\varphi} }^{ \\phantom{\\, {\\varphi}}\\phantom{\\, {\\varphi}} } & = & \\frac{3 \\, \\sin\\left({\\chi}\\right)^{2} \\sin\\left({\\theta}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\end{array}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\begin{array}{lcl} \\mathrm{Ric}\\left(g\\right)_{ \\, {\\eta} \\, {\\eta} }^{ \\phantom{\\, {\\eta}}\\phantom{\\, {\\eta}} } & = & \\frac{3}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Ric}\\left(g\\right)_{ \\, {\\chi} \\, {\\chi} }^{ \\phantom{\\, {\\chi}}\\phantom{\\, {\\chi}} } & = & \\frac{3}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Ric}\\left(g\\right)_{ \\, {\\theta} \\, {\\theta} }^{ \\phantom{\\, {\\theta}}\\phantom{\\, {\\theta}} } & = & \\frac{3 \\, \\sin\\left({\\chi}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Ric}\\left(g\\right)_{ \\, {\\varphi} \\, {\\varphi} }^{ \\phantom{\\, {\\varphi}}\\phantom{\\, {\\varphi}} } & = & \\frac{3 \\, \\sin\\left({\\chi}\\right)^{2} \\sin\\left({\\theta}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\end{array}$$" ], "text/plain": [ "Ric(g)_et,et = 3/(cos(et) + 1) \n", "Ric(g)_ch,ch = 3/(cos(et) + 1) \n", "Ric(g)_th,th = 3*sin(ch)^2/(cos(et) + 1) \n", "Ric(g)_ph,ph = 3*sin(ch)^2*sin(th)^2/(cos(et) + 1) " ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Ric.apply_map(lambda x: x.subs({sin(et): sqrt(1 - cos(et)^2)}).factor())\n", "Ric.display_comp()" ] }, { "cell_type": "code", "execution_count": 9, "id": "9b97672b", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\begin{array}{llcl} \\mathrm{r}\\left(g\\right):& M & \\longrightarrow & \\mathbb{R} \\\\ & \\left({\\eta}, {\\chi}, {\\theta}, {\\varphi}\\right) & \\longmapsto & \\frac{24}{4 \\, a_{0}^{2} \\cos\\left({\\eta}\\right) - {\\left(a_{0}^{2} \\cos\\left({\\eta}\\right) + 3 \\, a_{0}^{2}\\right)} \\sin\\left({\\eta}\\right)^{2} + 4 \\, a_{0}^{2}} \\end{array}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\begin{array}{llcl} \\mathrm{r}\\left(g\\right):& M & \\longrightarrow & \\mathbb{R} \\\\ & \\left({\\eta}, {\\chi}, {\\theta}, {\\varphi}\\right) & \\longmapsto & \\frac{24}{4 \\, a_{0}^{2} \\cos\\left({\\eta}\\right) - {\\left(a_{0}^{2} \\cos\\left({\\eta}\\right) + 3 \\, a_{0}^{2}\\right)} \\sin\\left({\\eta}\\right)^{2} + 4 \\, a_{0}^{2}} \\end{array}$$" ], "text/plain": [ "r(g): M → ℝ\n", " (et, ch, th, ph) ↦ 24/(4*a0^2*cos(et) - (a0^2*cos(et) + 3*a0^2)*sin(et)^2 + 4*a0^2)" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g.ricci_scalar().display()" ] }, { "cell_type": "code", "execution_count": 10, "id": "ac3cbad5", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}-\\frac{24}{{\\left(\\cos\\left({\\eta}\\right) \\sin\\left({\\eta}\\right)^{2} + 3 \\, \\sin\\left({\\eta}\\right)^{2} - 4 \\, \\cos\\left({\\eta}\\right) - 4\\right)} a_{0}^{2}}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}-\\frac{24}{{\\left(\\cos\\left({\\eta}\\right) \\sin\\left({\\eta}\\right)^{2} + 3 \\, \\sin\\left({\\eta}\\right)^{2} - 4 \\, \\cos\\left({\\eta}\\right) - 4\\right)} a_{0}^{2}}$$" ], "text/plain": [ "-24/((cos(et)*sin(et)^2 + 3*sin(et)^2 - 4*cos(et) - 4)*a0^2)" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "R = g.ricci_scalar().expr().factor()\n", "R" ] }, { "cell_type": "code", "execution_count": 11, "id": "9b4632c9", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\frac{24}{a_{0}^{2} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}^{3}}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\frac{24}{a_{0}^{2} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}^{3}}$$" ], "text/plain": [ "24/(a0^2*(cos(et) + 1)^3)" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "R = R.subs({sin(et): sqrt(1 - cos(et)^2)})\n", "R.factor()" ] }, { "cell_type": "markdown", "id": "2885c89a", "metadata": {}, "source": [ "### Einstein tensor" ] }, { "cell_type": "code", "execution_count": 12, "id": "f0851b92", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}G = \\left( \\frac{6}{\\cos\\left({\\eta}\\right) + 1} \\right) \\mathrm{d} {\\eta}\\otimes \\mathrm{d} {\\eta}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}G = \\left( \\frac{6}{\\cos\\left({\\eta}\\right) + 1} \\right) \\mathrm{d} {\\eta}\\otimes \\mathrm{d} {\\eta}$$" ], "text/plain": [ "G = 6/(cos(et) + 1) det⊗det" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "G = Ric - R/2*g\n", "G.set_name('G')\n", "G.display()" ] }, { "cell_type": "markdown", "id": "c0b2047f", "metadata": {}, "source": [ "### Energy momentum tensor" ] }, { "cell_type": "markdown", "id": "18cf9818", "metadata": {}, "source": [ "The fluid 4-velocity:" ] }, { "cell_type": "code", "execution_count": 13, "id": "62b3c71a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}u = \\frac{2}{a_{0} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}} \\frac{\\partial}{\\partial {\\eta} }\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}u = \\frac{2}{a_{0} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}} \\frac{\\partial}{\\partial {\\eta} }$$" ], "text/plain": [ "u = 2/(a0*(cos(et) + 1)) ∂/∂et" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "u = M.vector_field(2/(a0*(1+cos(et))), 0, 0, 0, name='u')\n", "u.display()" ] }, { "cell_type": "markdown", "id": "90dc966f", "metadata": {}, "source": [ "Check that $u$ is a unit vector:" ] }, { "cell_type": "code", "execution_count": 14, "id": "110c951b", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}-1\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}-1$$" ], "text/plain": [ "-1" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g(u,u).expr()" ] }, { "cell_type": "code", "execution_count": 15, "id": "a40e10e2", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left( -\\frac{1}{2} \\, a_{0} \\cos\\left({\\eta}\\right) - \\frac{1}{2} \\, a_{0} \\right) \\mathrm{d} {\\eta}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left( -\\frac{1}{2} \\, a_{0} \\cos\\left({\\eta}\\right) - \\frac{1}{2} \\, a_{0} \\right) \\mathrm{d} {\\eta}$$" ], "text/plain": [ "(-1/2*a0*cos(et) - 1/2*a0) det" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "uf = u.down(g)\n", "uf.display()" ] }, { "cell_type": "code", "execution_count": 16, "id": "bd61771a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}T = \\frac{3}{4 \\, {\\left(\\pi + \\pi \\cos\\left({\\eta}\\right)\\right)}} \\mathrm{d} {\\eta}\\otimes \\mathrm{d} {\\eta}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}T = \\frac{3}{4 \\, {\\left(\\pi + \\pi \\cos\\left({\\eta}\\right)\\right)}} \\mathrm{d} {\\eta}\\otimes \\mathrm{d} {\\eta}$$" ], "text/plain": [ "T = 3/4/(pi + pi*cos(et)) det⊗det" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "rho = 3/(pi*a0^2*(1 + cos(et))^3)\n", "T = rho*uf*uf\n", "T.set_name('T')\n", "T.display()" ] }, { "cell_type": "markdown", "id": "2886f857", "metadata": {}, "source": [ "### Check of Einstein equation" ] }, { "cell_type": "code", "execution_count": 17, "id": "e1958327", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\mathrm{True}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\mathrm{True}$$" ], "text/plain": [ "True" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "G == 8*pi*T" ] }, { "cell_type": "markdown", "id": "88193833", "metadata": {}, "source": [ "### Riemann tensor" ] }, { "cell_type": "code", "execution_count": 18, "id": "94a93c3f", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\begin{array}{lcl} \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\eta}} \\, {\\chi} \\, {\\eta} \\, {\\chi} }^{ \\, {\\eta} \\phantom{\\, {\\chi}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\chi}} } & = & -\\frac{1}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\eta}} \\, {\\theta} \\, {\\eta} \\, {\\theta} }^{ \\, {\\eta} \\phantom{\\, {\\theta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\theta}} } & = & \\frac{\\cos\\left({\\eta}\\right)^{2} \\sin\\left({\\chi}\\right)^{2} + 2 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + \\sin\\left({\\chi}\\right)^{2}}{{\\left(\\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{2} - 4 \\, \\cos\\left({\\eta}\\right) - 4} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\eta}} \\, {\\varphi} \\, {\\eta} \\, {\\varphi} }^{ \\, {\\eta} \\phantom{\\, {\\varphi}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\varphi}} } & = & \\frac{{\\left(\\cos\\left({\\eta}\\right)^{2} \\sin\\left({\\chi}\\right)^{2} + 2 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + \\sin\\left({\\chi}\\right)^{2}\\right)} \\sin\\left({\\theta}\\right)^{2}}{{\\left(\\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{2} - 4 \\, \\cos\\left({\\eta}\\right) - 4} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\chi}} \\, {\\eta} \\, {\\eta} \\, {\\chi} }^{ \\, {\\chi} \\phantom{\\, {\\eta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\chi}} } & = & -\\frac{1}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\chi}} \\, {\\theta} \\, {\\chi} \\, {\\theta} }^{ \\, {\\chi} \\phantom{\\, {\\theta}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\theta}} } & = & \\frac{2 \\, \\sin\\left({\\chi}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\chi}} \\, {\\varphi} \\, {\\chi} \\, {\\varphi} }^{ \\, {\\chi} \\phantom{\\, {\\varphi}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\varphi}} } & = & \\frac{2 \\, \\sin\\left({\\chi}\\right)^{2} \\sin\\left({\\theta}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\theta}} \\, {\\eta} \\, {\\eta} \\, {\\theta} }^{ \\, {\\theta} \\phantom{\\, {\\eta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\theta}} } & = & \\frac{\\cos\\left({\\eta}\\right)^{5} + 5 \\, \\cos\\left({\\eta}\\right)^{4} + 10 \\, \\cos\\left({\\eta}\\right)^{3} + 10 \\, \\cos\\left({\\eta}\\right)^{2} + 5 \\, \\cos\\left({\\eta}\\right) + 1}{\\sin\\left({\\eta}\\right)^{6} - 6 \\, {\\left(\\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{4} + 16 \\, {\\left(2 \\, \\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{2} - 32 \\, \\cos\\left({\\eta}\\right) - 32} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\theta}} \\, {\\chi} \\, {\\chi} \\, {\\theta} }^{ \\, {\\theta} \\phantom{\\, {\\chi}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\theta}} } & = & \\frac{2 \\, {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}}{\\sin\\left({\\eta}\\right)^{2} - 2 \\, \\cos\\left({\\eta}\\right) - 2} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\theta}} \\, {\\varphi} \\, {\\theta} \\, {\\varphi} }^{ \\, {\\theta} \\phantom{\\, {\\varphi}} \\phantom{\\, {\\theta}} \\phantom{\\, {\\varphi}} } & = & -\\frac{2 \\, {\\left(\\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + \\sin\\left({\\chi}\\right)^{2}\\right)} \\sin\\left({\\theta}\\right)^{2}}{\\sin\\left({\\eta}\\right)^{2} - 2 \\, \\cos\\left({\\eta}\\right) - 2} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\varphi}} \\, {\\eta} \\, {\\eta} \\, {\\varphi} }^{ \\, {\\varphi} \\phantom{\\, {\\eta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\varphi}} } & = & \\frac{\\cos\\left({\\eta}\\right)^{5} + 5 \\, \\cos\\left({\\eta}\\right)^{4} + 10 \\, \\cos\\left({\\eta}\\right)^{3} + 10 \\, \\cos\\left({\\eta}\\right)^{2} + 5 \\, \\cos\\left({\\eta}\\right) + 1}{\\sin\\left({\\eta}\\right)^{6} - 6 \\, {\\left(\\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{4} + 16 \\, {\\left(2 \\, \\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{2} - 32 \\, \\cos\\left({\\eta}\\right) - 32} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\varphi}} \\, {\\chi} \\, {\\chi} \\, {\\varphi} }^{ \\, {\\varphi} \\phantom{\\, {\\chi}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\varphi}} } & = & \\frac{2 \\, {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}}{\\sin\\left({\\eta}\\right)^{2} - 2 \\, \\cos\\left({\\eta}\\right) - 2} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\varphi}} \\, {\\theta} \\, {\\theta} \\, {\\varphi} }^{ \\, {\\varphi} \\phantom{\\, {\\theta}} \\phantom{\\, {\\theta}} \\phantom{\\, {\\varphi}} } & = & \\frac{2 \\, {\\left(\\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + \\sin\\left({\\chi}\\right)^{2}\\right)}}{\\sin\\left({\\eta}\\right)^{2} - 2 \\, \\cos\\left({\\eta}\\right) - 2} \\end{array}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\begin{array}{lcl} \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\eta}} \\, {\\chi} \\, {\\eta} \\, {\\chi} }^{ \\, {\\eta} \\phantom{\\, {\\chi}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\chi}} } & = & -\\frac{1}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\eta}} \\, {\\theta} \\, {\\eta} \\, {\\theta} }^{ \\, {\\eta} \\phantom{\\, {\\theta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\theta}} } & = & \\frac{\\cos\\left({\\eta}\\right)^{2} \\sin\\left({\\chi}\\right)^{2} + 2 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + \\sin\\left({\\chi}\\right)^{2}}{{\\left(\\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{2} - 4 \\, \\cos\\left({\\eta}\\right) - 4} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\eta}} \\, {\\varphi} \\, {\\eta} \\, {\\varphi} }^{ \\, {\\eta} \\phantom{\\, {\\varphi}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\varphi}} } & = & \\frac{{\\left(\\cos\\left({\\eta}\\right)^{2} \\sin\\left({\\chi}\\right)^{2} + 2 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + \\sin\\left({\\chi}\\right)^{2}\\right)} \\sin\\left({\\theta}\\right)^{2}}{{\\left(\\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{2} - 4 \\, \\cos\\left({\\eta}\\right) - 4} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\chi}} \\, {\\eta} \\, {\\eta} \\, {\\chi} }^{ \\, {\\chi} \\phantom{\\, {\\eta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\chi}} } & = & -\\frac{1}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\chi}} \\, {\\theta} \\, {\\chi} \\, {\\theta} }^{ \\, {\\chi} \\phantom{\\, {\\theta}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\theta}} } & = & \\frac{2 \\, \\sin\\left({\\chi}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\chi}} \\, {\\varphi} \\, {\\chi} \\, {\\varphi} }^{ \\, {\\chi} \\phantom{\\, {\\varphi}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\varphi}} } & = & \\frac{2 \\, \\sin\\left({\\chi}\\right)^{2} \\sin\\left({\\theta}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\theta}} \\, {\\eta} \\, {\\eta} \\, {\\theta} }^{ \\, {\\theta} \\phantom{\\, {\\eta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\theta}} } & = & \\frac{\\cos\\left({\\eta}\\right)^{5} + 5 \\, \\cos\\left({\\eta}\\right)^{4} + 10 \\, \\cos\\left({\\eta}\\right)^{3} + 10 \\, \\cos\\left({\\eta}\\right)^{2} + 5 \\, \\cos\\left({\\eta}\\right) + 1}{\\sin\\left({\\eta}\\right)^{6} - 6 \\, {\\left(\\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{4} + 16 \\, {\\left(2 \\, \\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{2} - 32 \\, \\cos\\left({\\eta}\\right) - 32} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\theta}} \\, {\\chi} \\, {\\chi} \\, {\\theta} }^{ \\, {\\theta} \\phantom{\\, {\\chi}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\theta}} } & = & \\frac{2 \\, {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}}{\\sin\\left({\\eta}\\right)^{2} - 2 \\, \\cos\\left({\\eta}\\right) - 2} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\theta}} \\, {\\varphi} \\, {\\theta} \\, {\\varphi} }^{ \\, {\\theta} \\phantom{\\, {\\varphi}} \\phantom{\\, {\\theta}} \\phantom{\\, {\\varphi}} } & = & -\\frac{2 \\, {\\left(\\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + \\sin\\left({\\chi}\\right)^{2}\\right)} \\sin\\left({\\theta}\\right)^{2}}{\\sin\\left({\\eta}\\right)^{2} - 2 \\, \\cos\\left({\\eta}\\right) - 2} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\varphi}} \\, {\\eta} \\, {\\eta} \\, {\\varphi} }^{ \\, {\\varphi} \\phantom{\\, {\\eta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\varphi}} } & = & \\frac{\\cos\\left({\\eta}\\right)^{5} + 5 \\, \\cos\\left({\\eta}\\right)^{4} + 10 \\, \\cos\\left({\\eta}\\right)^{3} + 10 \\, \\cos\\left({\\eta}\\right)^{2} + 5 \\, \\cos\\left({\\eta}\\right) + 1}{\\sin\\left({\\eta}\\right)^{6} - 6 \\, {\\left(\\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{4} + 16 \\, {\\left(2 \\, \\cos\\left({\\eta}\\right) + 3\\right)} \\sin\\left({\\eta}\\right)^{2} - 32 \\, \\cos\\left({\\eta}\\right) - 32} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\varphi}} \\, {\\chi} \\, {\\chi} \\, {\\varphi} }^{ \\, {\\varphi} \\phantom{\\, {\\chi}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\varphi}} } & = & \\frac{2 \\, {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}}{\\sin\\left({\\eta}\\right)^{2} - 2 \\, \\cos\\left({\\eta}\\right) - 2} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\varphi}} \\, {\\theta} \\, {\\theta} \\, {\\varphi} }^{ \\, {\\varphi} \\phantom{\\, {\\theta}} \\phantom{\\, {\\theta}} \\phantom{\\, {\\varphi}} } & = & \\frac{2 \\, {\\left(\\cos\\left({\\eta}\\right) \\sin\\left({\\chi}\\right)^{2} + \\sin\\left({\\chi}\\right)^{2}\\right)}}{\\sin\\left({\\eta}\\right)^{2} - 2 \\, \\cos\\left({\\eta}\\right) - 2} \\end{array}$$" ], "text/plain": [ "Riem(g)^et_ch,et,ch = -1/(cos(et) + 1) \n", "Riem(g)^et_th,et,th = (cos(et)^2*sin(ch)^2 + 2*cos(et)*sin(ch)^2 + sin(ch)^2)/((cos(et) + 3)*sin(et)^2 - 4*cos(et) - 4) \n", "Riem(g)^et_ph,et,ph = (cos(et)^2*sin(ch)^2 + 2*cos(et)*sin(ch)^2 + sin(ch)^2)*sin(th)^2/((cos(et) + 3)*sin(et)^2 - 4*cos(et) - 4) \n", "Riem(g)^ch_et,et,ch = -1/(cos(et) + 1) \n", "Riem(g)^ch_th,ch,th = 2*sin(ch)^2/(cos(et) + 1) \n", "Riem(g)^ch_ph,ch,ph = 2*sin(ch)^2*sin(th)^2/(cos(et) + 1) \n", "Riem(g)^th_et,et,th = (cos(et)^5 + 5*cos(et)^4 + 10*cos(et)^3 + 10*cos(et)^2 + 5*cos(et) + 1)/(sin(et)^6 - 6*(cos(et) + 3)*sin(et)^4 + 16*(2*cos(et) + 3)*sin(et)^2 - 32*cos(et) - 32) \n", "Riem(g)^th_ch,ch,th = 2*(cos(et) + 1)/(sin(et)^2 - 2*cos(et) - 2) \n", "Riem(g)^th_ph,th,ph = -2*(cos(et)*sin(ch)^2 + sin(ch)^2)*sin(th)^2/(sin(et)^2 - 2*cos(et) - 2) \n", "Riem(g)^ph_et,et,ph = (cos(et)^5 + 5*cos(et)^4 + 10*cos(et)^3 + 10*cos(et)^2 + 5*cos(et) + 1)/(sin(et)^6 - 6*(cos(et) + 3)*sin(et)^4 + 16*(2*cos(et) + 3)*sin(et)^2 - 32*cos(et) - 32) \n", "Riem(g)^ph_ch,ch,ph = 2*(cos(et) + 1)/(sin(et)^2 - 2*cos(et) - 2) \n", "Riem(g)^ph_th,th,ph = 2*(cos(et)*sin(ch)^2 + sin(ch)^2)/(sin(et)^2 - 2*cos(et) - 2) " ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Riem = g.riemann()\n", "Riem.display_comp(only_nonredundant=True)" ] }, { "cell_type": "code", "execution_count": 19, "id": "9b6eb133", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\begin{array}{lcl} \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\eta}} \\, {\\chi} \\, {\\eta} \\, {\\chi} }^{ \\, {\\eta} \\phantom{\\, {\\chi}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\chi}} } & = & -\\frac{1}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\eta}} \\, {\\theta} \\, {\\eta} \\, {\\theta} }^{ \\, {\\eta} \\phantom{\\, {\\theta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\theta}} } & = & -\\frac{\\sin\\left({\\chi}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\eta}} \\, {\\varphi} \\, {\\eta} \\, {\\varphi} }^{ \\, {\\eta} \\phantom{\\, {\\varphi}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\varphi}} } & = & -\\frac{\\sin\\left({\\chi}\\right)^{2} \\sin\\left({\\theta}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\chi}} \\, {\\eta} \\, {\\eta} \\, {\\chi} }^{ \\, {\\chi} \\phantom{\\, {\\eta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\chi}} } & = & -\\frac{1}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\chi}} \\, {\\theta} \\, {\\chi} \\, {\\theta} }^{ \\, {\\chi} \\phantom{\\, {\\theta}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\theta}} } & = & \\frac{2 \\, \\sin\\left({\\chi}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\chi}} \\, {\\varphi} \\, {\\chi} \\, {\\varphi} }^{ \\, {\\chi} \\phantom{\\, {\\varphi}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\varphi}} } & = & \\frac{2 \\, \\sin\\left({\\chi}\\right)^{2} \\sin\\left({\\theta}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\theta}} \\, {\\eta} \\, {\\eta} \\, {\\theta} }^{ \\, {\\theta} \\phantom{\\, {\\eta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\theta}} } & = & -\\frac{1}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\theta}} \\, {\\chi} \\, {\\chi} \\, {\\theta} }^{ \\, {\\theta} \\phantom{\\, {\\chi}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\theta}} } & = & -\\frac{2}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\theta}} \\, {\\varphi} \\, {\\theta} \\, {\\varphi} }^{ \\, {\\theta} \\phantom{\\, {\\varphi}} \\phantom{\\, {\\theta}} \\phantom{\\, {\\varphi}} } & = & \\frac{2 \\, \\sin\\left({\\chi}\\right)^{2} \\sin\\left({\\theta}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\varphi}} \\, {\\eta} \\, {\\eta} \\, {\\varphi} }^{ \\, {\\varphi} \\phantom{\\, {\\eta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\varphi}} } & = & -\\frac{1}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\varphi}} \\, {\\chi} \\, {\\chi} \\, {\\varphi} }^{ \\, {\\varphi} \\phantom{\\, {\\chi}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\varphi}} } & = & -\\frac{2}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\varphi}} \\, {\\theta} \\, {\\theta} \\, {\\varphi} }^{ \\, {\\varphi} \\phantom{\\, {\\theta}} \\phantom{\\, {\\theta}} \\phantom{\\, {\\varphi}} } & = & -\\frac{2 \\, \\sin\\left({\\chi}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\end{array}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\begin{array}{lcl} \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\eta}} \\, {\\chi} \\, {\\eta} \\, {\\chi} }^{ \\, {\\eta} \\phantom{\\, {\\chi}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\chi}} } & = & -\\frac{1}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\eta}} \\, {\\theta} \\, {\\eta} \\, {\\theta} }^{ \\, {\\eta} \\phantom{\\, {\\theta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\theta}} } & = & -\\frac{\\sin\\left({\\chi}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\eta}} \\, {\\varphi} \\, {\\eta} \\, {\\varphi} }^{ \\, {\\eta} \\phantom{\\, {\\varphi}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\varphi}} } & = & -\\frac{\\sin\\left({\\chi}\\right)^{2} \\sin\\left({\\theta}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\chi}} \\, {\\eta} \\, {\\eta} \\, {\\chi} }^{ \\, {\\chi} \\phantom{\\, {\\eta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\chi}} } & = & -\\frac{1}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\chi}} \\, {\\theta} \\, {\\chi} \\, {\\theta} }^{ \\, {\\chi} \\phantom{\\, {\\theta}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\theta}} } & = & \\frac{2 \\, \\sin\\left({\\chi}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\chi}} \\, {\\varphi} \\, {\\chi} \\, {\\varphi} }^{ \\, {\\chi} \\phantom{\\, {\\varphi}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\varphi}} } & = & \\frac{2 \\, \\sin\\left({\\chi}\\right)^{2} \\sin\\left({\\theta}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\theta}} \\, {\\eta} \\, {\\eta} \\, {\\theta} }^{ \\, {\\theta} \\phantom{\\, {\\eta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\theta}} } & = & -\\frac{1}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\theta}} \\, {\\chi} \\, {\\chi} \\, {\\theta} }^{ \\, {\\theta} \\phantom{\\, {\\chi}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\theta}} } & = & -\\frac{2}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\theta}} \\, {\\varphi} \\, {\\theta} \\, {\\varphi} }^{ \\, {\\theta} \\phantom{\\, {\\varphi}} \\phantom{\\, {\\theta}} \\phantom{\\, {\\varphi}} } & = & \\frac{2 \\, \\sin\\left({\\chi}\\right)^{2} \\sin\\left({\\theta}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\varphi}} \\, {\\eta} \\, {\\eta} \\, {\\varphi} }^{ \\, {\\varphi} \\phantom{\\, {\\eta}} \\phantom{\\, {\\eta}} \\phantom{\\, {\\varphi}} } & = & -\\frac{1}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\varphi}} \\, {\\chi} \\, {\\chi} \\, {\\varphi} }^{ \\, {\\varphi} \\phantom{\\, {\\chi}} \\phantom{\\, {\\chi}} \\phantom{\\, {\\varphi}} } & = & -\\frac{2}{\\cos\\left({\\eta}\\right) + 1} \\\\ \\mathrm{Riem}\\left(g\\right)_{ \\phantom{\\, {\\varphi}} \\, {\\theta} \\, {\\theta} \\, {\\varphi} }^{ \\, {\\varphi} \\phantom{\\, {\\theta}} \\phantom{\\, {\\theta}} \\phantom{\\, {\\varphi}} } & = & -\\frac{2 \\, \\sin\\left({\\chi}\\right)^{2}}{\\cos\\left({\\eta}\\right) + 1} \\end{array}$$" ], "text/plain": [ "Riem(g)^et_ch,et,ch = -1/(cos(et) + 1) \n", "Riem(g)^et_th,et,th = -sin(ch)^2/(cos(et) + 1) \n", "Riem(g)^et_ph,et,ph = -sin(ch)^2*sin(th)^2/(cos(et) + 1) \n", "Riem(g)^ch_et,et,ch = -1/(cos(et) + 1) \n", "Riem(g)^ch_th,ch,th = 2*sin(ch)^2/(cos(et) + 1) \n", "Riem(g)^ch_ph,ch,ph = 2*sin(ch)^2*sin(th)^2/(cos(et) + 1) \n", "Riem(g)^th_et,et,th = -1/(cos(et) + 1) \n", "Riem(g)^th_ch,ch,th = -2/(cos(et) + 1) \n", "Riem(g)^th_ph,th,ph = 2*sin(ch)^2*sin(th)^2/(cos(et) + 1) \n", "Riem(g)^ph_et,et,ph = -1/(cos(et) + 1) \n", "Riem(g)^ph_ch,ch,ph = -2/(cos(et) + 1) \n", "Riem(g)^ph_th,th,ph = -2*sin(ch)^2/(cos(et) + 1) " ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Riem.apply_map(lambda x: x.subs({sin(et): sqrt(1 - cos(et)^2)}).factor())\n", "Riem.display_comp(only_nonredundant=True)" ] }, { "cell_type": "markdown", "id": "5c084b31", "metadata": {}, "source": [ "### Kretschmann scalar" ] }, { "cell_type": "code", "execution_count": 20, "id": "a0024e82", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\begin{array}{llcl} & M & \\longrightarrow & \\mathbb{R} \\\\ & \\left({\\eta}, {\\chi}, {\\theta}, {\\varphi}\\right) & \\longmapsto & -\\frac{960 \\, {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}}{{\\left(a_{0}^{4} \\cos\\left({\\eta}\\right) + 7 \\, a_{0}^{4}\\right)} \\sin\\left({\\eta}\\right)^{6} - 64 \\, a_{0}^{4} \\cos\\left({\\eta}\\right) - 8 \\, {\\left(3 \\, a_{0}^{4} \\cos\\left({\\eta}\\right) + 7 \\, a_{0}^{4}\\right)} \\sin\\left({\\eta}\\right)^{4} - 64 \\, a_{0}^{4} + 16 \\, {\\left(5 \\, a_{0}^{4} \\cos\\left({\\eta}\\right) + 7 \\, a_{0}^{4}\\right)} \\sin\\left({\\eta}\\right)^{2}} \\end{array}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\begin{array}{llcl} & M & \\longrightarrow & \\mathbb{R} \\\\ & \\left({\\eta}, {\\chi}, {\\theta}, {\\varphi}\\right) & \\longmapsto & -\\frac{960 \\, {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}}{{\\left(a_{0}^{4} \\cos\\left({\\eta}\\right) + 7 \\, a_{0}^{4}\\right)} \\sin\\left({\\eta}\\right)^{6} - 64 \\, a_{0}^{4} \\cos\\left({\\eta}\\right) - 8 \\, {\\left(3 \\, a_{0}^{4} \\cos\\left({\\eta}\\right) + 7 \\, a_{0}^{4}\\right)} \\sin\\left({\\eta}\\right)^{4} - 64 \\, a_{0}^{4} + 16 \\, {\\left(5 \\, a_{0}^{4} \\cos\\left({\\eta}\\right) + 7 \\, a_{0}^{4}\\right)} \\sin\\left({\\eta}\\right)^{2}} \\end{array}$$" ], "text/plain": [ "M → ℝ\n", "(et, ch, th, ph) ↦ -960*(cos(et) + 1)/((a0^4*cos(et) + 7*a0^4)*sin(et)^6 - 64*a0^4*cos(et) - 8*(3*a0^4*cos(et) + 7*a0^4)*sin(et)^4 - 64*a0^4 + 16*(5*a0^4*cos(et) + 7*a0^4)*sin(et)^2)" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "K = Riem.down(g)['_{abcd}'] * Riem.up(g)['^{abcd}']\n", "K.display()" ] }, { "cell_type": "code", "execution_count": 21, "id": "a19bc1da", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}-\\frac{960 \\, {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}}{{\\left(\\cos\\left({\\eta}\\right) \\sin\\left({\\eta}\\right)^{6} + 7 \\, \\sin\\left({\\eta}\\right)^{6} - 24 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\eta}\\right)^{4} - 56 \\, \\sin\\left({\\eta}\\right)^{4} + 80 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\eta}\\right)^{2} + 112 \\, \\sin\\left({\\eta}\\right)^{2} - 64 \\, \\cos\\left({\\eta}\\right) - 64\\right)} a_{0}^{4}}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}-\\frac{960 \\, {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}}{{\\left(\\cos\\left({\\eta}\\right) \\sin\\left({\\eta}\\right)^{6} + 7 \\, \\sin\\left({\\eta}\\right)^{6} - 24 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\eta}\\right)^{4} - 56 \\, \\sin\\left({\\eta}\\right)^{4} + 80 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\eta}\\right)^{2} + 112 \\, \\sin\\left({\\eta}\\right)^{2} - 64 \\, \\cos\\left({\\eta}\\right) - 64\\right)} a_{0}^{4}}$$" ], "text/plain": [ "-960*(cos(et) + 1)/((cos(et)*sin(et)^6 + 7*sin(et)^6 - 24*cos(et)*sin(et)^4 - 56*sin(et)^4 + 80*cos(et)*sin(et)^2 + 112*sin(et)^2 - 64*cos(et) - 64)*a0^4)" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "K = K.expr().factor()\n", "K" ] }, { "cell_type": "code", "execution_count": 22, "id": "6b6948dc", "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\frac{960}{a_{0}^{4} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}^{6}}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\frac{960}{a_{0}^{4} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}^{6}}$$" ], "text/plain": [ "960/(a0^4*(cos(et) + 1)^6)" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "K = K.subs({sin(et): sqrt(1 - cos(et)^2)}).factor()\n", "K" ] }, { "cell_type": "markdown", "id": "42f6fc2c", "metadata": {}, "source": [ "### Ricci squared" ] }, { "cell_type": "code", "execution_count": 23, "id": "88023abd", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\begin{array}{llcl} & M & \\longrightarrow & \\mathbb{R} \\\\ & \\left({\\eta}, {\\chi}, {\\theta}, {\\varphi}\\right) & \\longmapsto & -\\frac{576}{a_{0}^{4} \\sin\\left({\\eta}\\right)^{6} - 32 \\, a_{0}^{4} \\cos\\left({\\eta}\\right) - 6 \\, {\\left(a_{0}^{4} \\cos\\left({\\eta}\\right) + 3 \\, a_{0}^{4}\\right)} \\sin\\left({\\eta}\\right)^{4} - 32 \\, a_{0}^{4} + 16 \\, {\\left(2 \\, a_{0}^{4} \\cos\\left({\\eta}\\right) + 3 \\, a_{0}^{4}\\right)} \\sin\\left({\\eta}\\right)^{2}} \\end{array}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\begin{array}{llcl} & M & \\longrightarrow & \\mathbb{R} \\\\ & \\left({\\eta}, {\\chi}, {\\theta}, {\\varphi}\\right) & \\longmapsto & -\\frac{576}{a_{0}^{4} \\sin\\left({\\eta}\\right)^{6} - 32 \\, a_{0}^{4} \\cos\\left({\\eta}\\right) - 6 \\, {\\left(a_{0}^{4} \\cos\\left({\\eta}\\right) + 3 \\, a_{0}^{4}\\right)} \\sin\\left({\\eta}\\right)^{4} - 32 \\, a_{0}^{4} + 16 \\, {\\left(2 \\, a_{0}^{4} \\cos\\left({\\eta}\\right) + 3 \\, a_{0}^{4}\\right)} \\sin\\left({\\eta}\\right)^{2}} \\end{array}$$" ], "text/plain": [ "M → ℝ\n", "(et, ch, th, ph) ↦ -576/(a0^4*sin(et)^6 - 32*a0^4*cos(et) - 6*(a0^4*cos(et) + 3*a0^4)*sin(et)^4 - 32*a0^4 + 16*(2*a0^4*cos(et) + 3*a0^4)*sin(et)^2)" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Ric2 = Ric['_{ab}'] * Ric.up(g)['^{ab}']\n", "Ric2.display()" ] }, { "cell_type": "code", "execution_count": 24, "id": "525192a1", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}-\\frac{576}{{\\left(\\sin\\left({\\eta}\\right)^{6} - 6 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\eta}\\right)^{4} - 18 \\, \\sin\\left({\\eta}\\right)^{4} + 32 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\eta}\\right)^{2} + 48 \\, \\sin\\left({\\eta}\\right)^{2} - 32 \\, \\cos\\left({\\eta}\\right) - 32\\right)} a_{0}^{4}}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}-\\frac{576}{{\\left(\\sin\\left({\\eta}\\right)^{6} - 6 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\eta}\\right)^{4} - 18 \\, \\sin\\left({\\eta}\\right)^{4} + 32 \\, \\cos\\left({\\eta}\\right) \\sin\\left({\\eta}\\right)^{2} + 48 \\, \\sin\\left({\\eta}\\right)^{2} - 32 \\, \\cos\\left({\\eta}\\right) - 32\\right)} a_{0}^{4}}$$" ], "text/plain": [ "-576/((sin(et)^6 - 6*cos(et)*sin(et)^4 - 18*sin(et)^4 + 32*cos(et)*sin(et)^2 + 48*sin(et)^2 - 32*cos(et) - 32)*a0^4)" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "S = Ric2.expr().factor()\n", "S" ] }, { "cell_type": "code", "execution_count": 25, "id": "78081fd0", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\frac{576}{a_{0}^{4} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}^{6}}\$" ], "text/latex": [ "$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\frac{576}{a_{0}^{4} {\\left(\\cos\\left({\\eta}\\right) + 1\\right)}^{6}}$$" ], "text/plain": [ "576/(a0^4*(cos(et) + 1)^6)" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "S = S.subs({sin(et): sqrt(1 - cos(et)^2)})\n", "S.factor()" ] } ], "metadata": { "kernelspec": { "display_name": "SageMath 9.5.beta7", "language": "sage", "name": "sagemath" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, "nbformat_minor": 5 }