Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/sage/SageManifolds/SM_Tolman-Oppenheimer-Volkoff_equations.sagews
Views: 1062
Tolman-Oppenheimer-Volkoff equations
This worksheet illustrates some features of SageManifolds (v0.8) on the derivation of the Tolman-Oppenheimer-Volkoff equations (spherically symmetric, stationary solution of general relativity).
We will calculate the Einstein equations for a corresponding spherically symmetric, stationary metric . In the above, is the Ricci tensor, is the Ricci scalar, and is the energy-momentum tensor (left side of Einstein's equations describe the geometry of spacetime, and the right side the matter in the spacetime).
We first declare the spacetime Mas a general 4dimensional manifold
with the standard spherical coordinates (X
denotes the coordinate chart on M
):
In order to define a general spherically symmetric, stationary metric one needs a few auxiliary functions of the radial coordinate - metric functions and , matter pressure and energy density , as well as the mass enclosed within the sphere of the radius :
In general, such metric reads as follows:
which works assuming that the physical constants G=c=1. Let's introduce G and c as variables to obtain the dimensional version of the equations:
From the Newtonian weak field limit considerations (Newtonian force far from the source) one may simplify the above expression and replace with , as well as explicitly put in front of . Then
The Ricci tensor is a result of a method ricci()
acting on the metric g
:
For example, the component is
Ricci scalar is obtained by the ricci_scalar()
method acting on g
:
It is the trace of the Ricci tensor, :
Left side of the Einstein equations is
Now for the energy-momentum tensor, :
We can check if it is indeed the timelike 4-vector by checking by contracting it with the metric g
using a method contract()
:
The product can be also obtained in much a simpler way, by just invoking
Let's now adopt in perfect fluid form:
Three components of the Einstein equations are as follows - the one:
A small reorganization of the first equation, using the function solve() to solve for :
Using SageManifolds ExpressionNice to display the derivatives in textbook form:
Radial component of Einstein's equations, :
For the third equation we use radial part of the energy-momentum conservation equation . First, to define the energy-momentum tensor itself:
Connection for the covariant derivative, and the printout of the non-vanishing Christoffel symbols:
The following calculates the radial component of :
Solve for :
Finally, the three TOV equations: