pystein.curvature module
Symbolic Curvature Utilities
This module provides functions for computing components of various curvature-related tensors, such as Christoffel symbols, Riemann Tensor, and Ricci Tensor. While the sympy module does offer analogous functions in the sympy.diffgeom subpackage, there is an obnoxious bug in that derivatives must be take with respect to coordinate functions as opposed to the identical symbol. We remediate that shortcoming here, allowing for maximal interoperability with the other sympy utilies for solving differential equations and computing derivatives.
- pystein.curvature.christoffel_symbol_component(lam: int, mu: int, nu: int, metric: pystein.metric.Metric) sympy.core.expr.Expr
Compute a component of the Chrisoffel symbol for a particular metric corresponding to
G_mn^l = 1/2 g^ms (p_m g_ns + p_n g_sm - p_s g_mn)
- Parameters
lam – int, Upper index of Christoffel symbol
mu – int, lower left index of Christoffel symbol
nu – int, lower right index of Christoffel symbol
metric – Metric
- Returns
Expression of the G_mn^l
- pystein.curvature.compute_components(metric: pystein.metric.Metric, non_trivial: bool = True)
- pystein.curvature.display_components(cps)
- pystein.curvature.einstein_tensor_component(mu: int, nu: int, metric: pystein.metric.Metric)
Compute a component of the Einstein Tensor for a particular metric corresponding to
G_mn = R_mn - (1/2) R g_mn
- Parameters
mu – int, lower left index of Einstein Tensor
nu – int, lower right index of Einstein Tensor
metric – Metric
- Returns
Expression of the G_mn
- pystein.curvature.ricci_scalar(metric: pystein.metric.Metric, simplify_intermediate: bool = False) sympy.core.expr.Expr
Compute the Ricci Scalar for a particular metric corresponding to
R = R^l_l = g^mn R_mn
- Parameters
metric – Metric
- Returns
Expression of R
- pystein.curvature.ricci_tensor_component(mu: int, nu: int, metric: pystein.metric.Metric, simplify_intermediate: bool = False)
Compute a component of the Ricci Tensor for a particular metric corresponding to
R_mn = R_m^l_ln
- Parameters
mu – int, lower left index of Ricci Tensor
nu – int, lower right index of Ricci Tensor
metric – Metric
- Returns
Expression of the R_mn
- pystein.curvature.riemann_tensor_component(rho: int, sig: int, mu: int, nu: int, metric: pystein.metric.Metric, simplify_intermediate: bool = False) sympy.core.expr.Expr
Compute a component of the Riemann Tensor for a particular metric corresponding to
R^r_smn = p_m G_ns^r - p_n G_ms^r + G_ml^r G_ns^l - G_nl^r G_ms^l
- Parameters
rho – int, Upper index of the Riemann Tensor
sig – int, lower left index of Riemann Tensor
mu – int, lower middle index of Riemann Tensor
nu – int, lower right index of Riemann Tensor
metric – Metric
- Returns
Expression of the R^r_smn