Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Path: TOV.ipynb
Views: 224
Kernel: SageMath 7.3

Tolman-Oppenheimer-Volkoff equations

This Jupyter/SageMath worksheet is relative to the lectures General relativity computations with SageManifolds given at the NewCompStar School 2016 (Coimbra, Portugal).

These computations are based on SageManifolds (v0.9)

Click here to download the worksheet file (ipynb format). To run it, you must start SageMath with the Jupyter notebook, with the command sage -n jupyter

This worksheet is divided in two parts:

  1. Deriving the TOV system from the Einstein equation

  2. Solving the TOV system to get stellar models

First we set up the notebook to display mathematical objects using LaTeX formatting:

%display latex

1. Deriving the TOV system from the Einstein equation

Spacetime

We declare the spacetime manifold MM:

M = Manifold(4, 'M') print(M)