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_Friedmann_equations.sagews
Views: 1045
Friedmann equations
This worksheet demonstrates a few capabilities of SageManifolds (version 0.8) in computations regarding cosmological spacetimes with Friedmann-Lemaître-Robertson-Walker (FLRW) metrics.
It is released under the GNU General Public License version 3.
(c) Michal Bejger, Eric Gourgoulhon (2015)
The corresponding worksheet file can be downloaded from here.
We declare the spacetime M as a 4-dimensional manifold:
We introduce the standard FLRW coordinates:
Assuming that the speed of light c=1, let us define a few variables: Newton's constant , the cosmological constant , the spatial curvature constant , the scale factor , the fluid proper density and the fluid pressure :
The FLRW metric is defined by its components:
A matrix view of the metric components:
The Levi-Civita connection associated with the metric is computed:
Ricci scalar ():
The fluid 4-velocity:
Perfect fluid energy-momentum tensor :
The trace of (we use index notation to denote the double contraction ):
Einstein equation:
Trace-reversed version of the Einstein equation: