A Python library for differential geometry, mainly based on SymPy
, includes tensor analysis on manifolds, designed for computing fundamental geometric objects such as intrinsic and extrinsic curvatures, geodesics, covariant derivatives, divergences, gradients, Laplacians, and for verifying solutions to Einstein's equations.
In this repository you can find my Manifold and Submanifold class to handle computations within the framework of Differential Geometry. Throughout my academic education, despite attending several classes on General Relativity and Differential Geometry, I have never had the opportunity to directly compute Einstein's equations, which always felt quite strange to me. For this reason, I decided to develop my own library (based on SymPy
) to handle tensorial calculations on manifolds. Additionally, you can find a small notebook where I explicitly verify, step by step, that constant curvature geometries satisfy Einstein's vacuum equations, with a particular focus on the hyperbolic solution. Moreover, a brief insight into the topic of geodesics has also been provided in the Geodesics notebook, where they are first computed symbolically, in the fashion of this library, and then solved numerically using NumPy
methods.
Geodesics of a manifold
Where:
-
$x^\mu$ are local coordinates on the manifold. -
$\Gamma^\mu_{\nu\lambda}$ are the Christoffel symbols of the Levi-Civita connection on the manifold. -
$\tau$ is the affine parameter (arc length) along a curve on the manifold.
Geodesics are intrinsic in a certain sense, meaning that they depend on the metric
In general, the components of a metric
The Christoffel symbols are computed using the formula