{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"# Locally nonrotating frames and NEC\n",
"\n",
"This Jupyter/SageMath notebook is related to the article [Lamy et al, arXiv:1802.01635](https://arxiv.org/abs/1802.01635)."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"'SageMath version 8.1, Release Date: 2017-12-07'"
]
},
"execution_count": 1,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"version()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"%display latex"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"## Metric"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"4-dimensional differentiable manifold M\n"
]
}
],
"source": [
"M = Manifold(4, 'M')\n",
"print(M)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 4,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"M1 = M.open_subset('M_1')\n",
"XBL1. = M1.chart(r't r:(0,+oo) th:(0,pi):\\theta ph:(0,2*pi):\\phi')\n",
"XBL1"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 5,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"M2 = M.open_subset('M_2')\n",
"forget(r>0)\n",
"XBL2. = M2.chart(r't r:(-oo,0) th:(0,pi):\\theta ph:(0,2*pi):\\phi')\n",
"M._top_charts.append(XBL2)\n",
"XBL2"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 6,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"forget(r<0)\n",
"assumptions()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"g = M.lorentzian_metric('g')"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"a, b= var('a b')\n",
"Sigma = r^2 + a^2*cos(th)^2"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 9,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"m=r^3/(r^3+2*b^2)\n",
"m1 = m\n",
"Delta1 = r^2 - 2*m*r + a^2\n",
"g1 = g.restrict(M1)\n",
"g1[0,0] = -(1 - 2*r*m/Sigma)\n",
"g1[0,3] = -2*a*r*sin(th)^2*m/Sigma\n",
"g1[1,1] = Sigma/Delta1\n",
"g1[2,2] = Sigma\n",
"g1[3,3] = (r^2 + a^2 + 2*r*(a*sin(th))^2*m/Sigma)*sin(th)^2\n",
"g.display(XBL1.frame())"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 10,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"g.display_comp(XBL1.frame())"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 11,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"m = -r^3/(-r^3 + 2*b^2)\n",
"m2 = m\n",
"Delta2 = r^2 - 2*m*r + a^2\n",
"g2 = g.restrict(M2)\n",
"g2[0,0] = -(1 - 2*r*m/Sigma)\n",
"g2[0,3] = -2*a*r*sin(th)^2*m/Sigma\n",
"g2[1,1] = Sigma/Delta2\n",
"g2[2,2] = Sigma\n",
"g2[3,3] = (r^2 + a^2 + 2*r*(a*sin(th))^2*m/Sigma)*sin(th)^2\n",
"g.display(XBL2.frame())"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 12,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"g.display_comp(XBL2.frame())"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"## Locally nonrotating frames"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"A1=(r^2+a^2)^2-a^2*Delta1*sin(th)^2\n",
"A2=(r^2+a^2)^2-a^2*Delta2*sin(th)^2"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 14,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"b1=XBL1.frame()\n",
"b1"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 15,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"change_frame = M1.automorphism_field()\n",
"change_frame[:] = [[sqrt(A1/(Sigma*Delta1)),0,0,0],\n",
" [0,sqrt(Delta1/Sigma),0,0],[0,0,1/sqrt(Sigma),0],\n",
" [2*m1*a*r/sqrt(A1*Sigma*Delta1),0,0,sqrt(Sigma/A1)/sin(th)]]; #old covariant basis in terms of the new covariant basis\n",
"e1 = b1.new_frame(change_frame, 'e1') ; e1"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 16,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"b2=XBL2.frame();\n",
"b2"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 17,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"change_frame = M2.automorphism_field()\n",
"change_frame[:] = [[sqrt(A2/(Sigma*Delta2)),0,0,0],\n",
" [0,sqrt(Delta2/Sigma),0,0],[0,0,1/sqrt(Sigma),0],\n",
" [2*m2*a*r/sqrt(A2*Sigma*Delta2),0,0,sqrt(Sigma/A2)/sin(th)]]; #old covariant basis in terms of the new covariant basis\n",
"e2 = b2.new_frame(change_frame, 'e2') ; e2"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 18,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"g.display_comp(e1)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 19,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"g.display_comp(e2)"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"## Energy momentum tensor"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Field of symmetric bilinear forms Ric(g)-unnamed metric on the 4-dimensional differentiable manifold M\n"
]
}
],
"source": [
"Ricci = g.ricci()\n",
"Ricci_scal = g.ricci_scalar()\n",
"G = Ricci-1/2*g*Ricci_scal; print G"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"G1=G.display(e1)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"G2=G.display(e2)"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 23,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"G.display()"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"## Null Energy Condition"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 24,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"k1 = M1.vector_field('k1')\n",
"k1[e1,:] = [1,1,0,0]\n",
"k1.display(e1)"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 25,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"k1d=k1.down(g)\n",
"k1k1=k1d['_a']*k1['^a']\n",
"k1k1.display()"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 26,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"k2 = M2.vector_field('k2')\n",
"k2[e2,:] = [1,1,0,0]\n",
"k2.display(e2)"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 27,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"k2d=k2.down(g)\n",
"k2k2=k2d['_a']*k2['^a']\n",
"k2k2.display()"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 28,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"NN=G['_{ab}']*k1['^a']\n",
"NEC1=8*pi*NN['_a']*k1['^a']\n",
"NEC1.display()"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"execution_count": 29,
"metadata": {
},
"output_type": "execute_result"
}
],
"source": [
"NNN=G['_{ab}']*k2['^a']\n",
"NEC2=8*pi*NNN['_a']*k2['^a']\n",
"NEC2.display()"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"nec1(a,b,r,th)=NEC1.expr()\n",
"nec2(a,b,r,th)=NEC2.expr()"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"a=0.9\n",
"b=1\n",
"plot1=plot((nec1(a,b,r,pi/6), nec1(a,b,r,pi/3), nec1(a,b,r,pi/2)), (r,0,4), \n",
" ymin=-70,ymax=70,\n",
" legend_label=[r'$\\theta=\\frac{\\pi}{6}$',r'$\\theta=\\frac{\\pi}{3}$',\n",
" r'$\\theta=\\frac{\\pi}{2}$'],\n",
" axes_labels=[r'$r/m$',''], plot_points=400)"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"a=0.9\n",
"b=1\n",
"plot2=plot((nec2(a,b,r,pi/6), nec2(a,b,r,pi/3), nec2(a,b,r,pi/2)),(r,-4,0),\n",
" axes_labels=[r'$r/m$',r'$T_{\\hat{\\mu}\\hat{\\nu}}k^{\\hat{\\mu}}k^{\\hat{\\nu}}$'],\n",
" ymin=-70, ymax=70, plot_points=400)"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "038021c57158cb3aa55731cbf005426cb782a5d7"
}
}
],
"source": [
"graph = plot1 + plot2\n",
"show(graph)"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"graph.save('NEC_a=09_b=1.pdf')"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"ww1(a,b,r,th)=-12*((a^6*b^2*r^8 + a^4*b^2*r^10 - 2*a^6*b^4*r^5 - 2*a^4*b^4*r^7 - 2*a^4*b^2*r^9 - 8*a^6*b^6*r^2 - 8*a^4*b^6*r^4 + 8*a^4*b^4*r^6)*sin(th)^4 - (a^6*b^2*r^8 + 4*a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*r^12 + 48*(a^4*b^4 + 2*a^2*b^6)*r^9 + 16*(2*a^4*b^6 + 3*a^2*b^8)*r^6)*cos(th)^2)"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"ww2(a,b,r,th)=12*((a^6*b^2*r^8 + a^4*b^2*r^10 + 2*a^6*b^4*r^5 + 2*a^4*b^4*r^7 - 2*a^4*b^2*r^9 - 8*a^6*b^6*r^2 - 8*a^4*b^6*r^4 - 8*a^4*b^4*r^6)*sin(th)^4 - (a^6*b^2*r^8 + 4*a^4*b^2*r^10 + 3*a^2*b^2*r^12 + 2*a^6*b^4*r^5 - 4*a^4*b^4*r^7 - 6*a^2*b^2*r^11 - 8*a^6*b^6*r^2 - 8*a^4*b^6*r^4 - 8*a^4*b^4*r^6 - 2*(a^4*b^2 + 3*a^2*b^4)*r^9)*sin(th)^2)/(a^2*r^18 + r^20 - 8*a^2*b^2*r^15 + 24*a^2*b^4*r^12 + 2*(a^2 - 4*b^2)*r^17 - 32*a^2*b^6*r^9 + 16*a^2*b^8*r^6 - 12*(a^2*b^2 - 2*b^4)*r^14 + 8*(3*a^2*b^4 - 4*b^6)*r^11 - 16*(a^2*b^6 - b^8)*r^8 + (a^8*r^12 + a^6*r^14 - 8*a^8*b^2*r^9 - 8*a^6*b^2*r^11 - 2*a^6*r^13 + 24*a^8*b^4*r^6 + 24*a^6*b^4*r^8 + 12*a^6*b^2*r^10 - 32*a^8*b^6*r^3 - 32*a^6*b^6*r^5 - 24*a^6*b^4*r^7 + 16*a^8*b^8 + 16*a^6*b^8*r^2 + 16*a^6*b^6*r^4)*cos(th)^6 + (3*a^6*r^14 + 3*a^4*r^16 - 24*a^6*b^2*r^11 - 4*a^4*r^15 + 72*a^6*b^4*r^8 + 24*a^4*b^2*r^12 - 96*a^6*b^6*r^5 - 48*a^4*b^4*r^9 + 48*a^6*b^8*r^2 + 32*a^4*b^6*r^6 + 2*(a^6 - 12*a^4*b^2)*r^13 - 12*(a^6*b^2 - 6*a^4*b^4)*r^10 + 24*(a^6*b^4 - 4*a^4*b^6)*r^7 - 16*(a^6*b^6 - 3*a^4*b^8)*r^4)*cos(th)^4 + (3*a^4*r^16 + 3*a^2*r^18 - 24*a^4*b^2*r^13 - 2*a^2*r^17 + 72*a^4*b^4*r^10 + 12*a^2*b^2*r^14 - 96*a^4*b^6*r^7 - 24*a^2*b^4*r^11 + 48*a^4*b^8*r^4 + 16*a^2*b^6*r^8 + 4*(a^4 - 6*a^2*b^2)*r^15 - 24*(a^4*b^2 - 3*a^2*b^4)*r^12 + 48*(a^4*b^4 - 2*a^2*b^6)*r^9 - 16*(2*a^4*b^6 - 3*a^2*b^8)*r^6)*cos(th)^2)"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
]
}
],
"metadata": {
"kernelspec": {
"display_name": "SageMath 8.1",
"name": "sage-8.1"
},
"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.14"
}
},
"nbformat": 4,
"nbformat_minor": 0
}