EinsteinPy Documentation

repository·main·Indexed 20 days ago

https://github.com/einsteinpy/einsteinpy

A Python package for General Relativity and gravitational physics. It provides symbolic tools via SymPy and numerical tools for metric calculations, geodesics, and spacetime visualization. Key features include support for Schwarzschild, Kerr, and Kerr-Newman metrics, Robertson-Walker geometry, and specialized ODE integrators like FANTASY. The library includes modules for coordinate transformations, physical constants, and both static and interactive geodesic plotting using Plotly.

Tokens
28.8K
Snippets
94
Records
149
Agent score
71%

What's inside EinsteinPy

  1. Overview of EinsteinPy

    main

    EinsteinPy is an open-source pure Python package designed for studying General Relativity and gravitational physics. It supports both symbolic and numerical approaches:

    • Symbolic Calculations: Built on top of SymPy, it allows users to access predefined metrics or define custom ones. It supports computing quantities like metric tensors, Christoffel symbols, Riemann Curvature tensor, Ricci tensor, and stress-energy tensors.
    • Numerical Calculations: Provides tools for calculating and visualizing geodesics, metric singularities, and hypersurface embeddings in specific spacetimes.
  2. Overview of EinsteinPy capabilities

    main

    EinsteinPy is an open-source Python package designed for studying General Relativity and gravitational physics. It supports two primary modes of operation:

    1. Symbolic Calculations: Built on top of SymPy, it allows users to access predefined metrics or define custom ones. It supports computing quantities such as:
      • Metric tensors
      • Christoffel symbols
      • Riemann Curvature tensor
      • Ricci tensor
      • Stress-energy tensor
    2. Numerical Calculations: Provides tools for calculating and visualizing:
      • Geodesics
      • Metric singularities
      • Hypersurface embeddings in specific spacetimes
  3. Use the Metric module for space-time geometries

    main
    The metric module in EinsteinPy provides classes to represent various space-time geometries. You can use these classes to work with different metrics such as Schwarzschild, Kerr, and Kerr-Newman. The module is structured around a base metric class that defines the interface for specific geometric implementations.
  4. Use the Symbolic Relativity Module for General Relativity calculations

    main

    The einsteinpy.symbolic module provides a suite of classes designed for performing symbolic mathematical calculations related to General Relativity. It allows users to define and manipulate geometric objects such as tensors, vectors, and metrics to derive complex relativistic quantities.

    The module is organized into several specialized sub-modules:

    • Predefined objects: Access to common predefined relativistic structures.
    • Helpers: Utility functions for symbolic manipulation.
    • Constants: Physical and mathematical constants used in relativity.
    • Geometric Objects: Classes for defining and calculating:
      • tensor: General tensor operations.
      • vector: Vector field representations.
      • metric: Metric tensors.
      • christoffel: Christoffel symbols (connection coefficients).
      • riemann: Riemann curvature tensor.
      • ricci: Ricci tensor and Ricci scalar.
      • einstein: Einstein tensor.
      • stress_energy_momentum: Stress-energy tensor.
      • weyl: Weyl tensor.
      • schouten: Schouten tensor.
  5. Explore EinsteinPy plotting capabilities

    main

    The plotting module in EinsteinPy provides classes for generating both static and interactive visualizations for relativistic physics phenomena. Specifically, you can use this module to produce plots for:

    • Geodesics: Visualizing the paths of particles or light in curved spacetime.
    • Hypersurface Embeddings: Visualizing how hypersurfaces are embedded in higher-dimensional spaces.
    • Black Hole Shadows: Visualizing the appearance of black hole shadows and ray-tracing results.

    Detailed API documentation for each sub-module can be found in the specific indices for geodesic, hypersurface, and rays.