Skip to main content

GTRPy is a python package that allows you to calculate the well-known tensors in general theory of relativity.

Project description

GTRPy

GTRPy is a python package that allows you to calculate the well-known tensors in general relativity, without writing a single line of code. Furthermore, you can apply many operations to 6 different type of fields, in both 4D and 3D.

It's tested for GNU/Linux, however it should also work in MacOS. If you ever encounter with a problem, feel free to create an issue.

Installation

You can easily install GTRPy via

python3 -m pip install gtrpy

Requirements

The base requirements can be downloaded by running

python3 -m pip install numpy Pillow pysimplegui sympy

However, you also need tkinter and LaTeX to properly run the GTRPy. In Fedora, these can be easily installed by running

sudo dnf install python3-tkinter
sudo dnf install texlive-scheme-full

Note that texlive-scheme-full is about 2-4GB and it may take some time to download.

You can look for your distributions package manager and search for an equivalent installation method.

User Guide

To start GTRPy, simply run

python3 -m gtrpy.run

This will create logs directory, which will contain the outputs of the performed operations.

Please take a look at the docs/user_guide.md for a summary of the GTRPy. To see more detailed examples, you can look at the demos directory.

Current Features

GR Tensor Objects

Either by using predefined coordinates, or by defining the coordinate system yourself, you can calculate:

  1. Inverse Metric Tensor
  2. Christoffel Symbol
  3. Riemann Tensor
  4. Ricci Tensor
  5. Ricci Scalar
  6. Weyl Tensor
  7. Traceless Ricci Tensor
  8. Einstein Tensor
  9. Kretschmann Scalar

Field Objects

Currently, there are 6 different field objects that you can carry out operations. These are:

  1. Scalar Field
  2. Type (1,0) Vector Field
  3. Type (0,1) Vector Field
  4. Type (2,0) Tensor Field
  5. Type (1,1) Tensor Field
  6. Type (0,2) Tensor Field

Operations on Fields

  1. Varying the type of a given vector field
  2. Calculating covariant and Lie derivatives for each field object (scalar, vector and tensor)
  3. Checking the Killing field condition for a given vector field

Overview

4D/Main Page 3D/Main Page
4d_main 3d_main
4D/Scalar Field Operations 4D/Vector Field Operations 4D/Tensor Field Operations
4d_scalar 4d_vector 4d_tensor
3D/Scalar Field Operations 3D/Vector Field Operations 3D/Tensor Field Operations
3d_scalar 3d_vector 3d_tensor

Upcoming Features

  1. Raising and lowering indices for a given tensor field
  2. Gradient, Divergence, Curl and Laplace operations on fields
  3. Partial and Covariant derivatives of the GR Tensors (Christoffel Symbol, Riemann Tensor, etc.)
  4. Including more coordinate systems
  5. Adding a button that prints the equations in LaTeX form

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gtrpy-1.3.tar.gz (102.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gtrpy-1.3-py3-none-any.whl (140.8 kB view details)

Uploaded Python 3

File details

Details for the file gtrpy-1.3.tar.gz.

File metadata

  • Download URL: gtrpy-1.3.tar.gz
  • Upload date:
  • Size: 102.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for gtrpy-1.3.tar.gz
Algorithm Hash digest
SHA256 584a5c48f9da74d2786b8cb090d49876459e54b9edf1ae5727397cbaddd15816
MD5 0283551099efca45897fdee7bb463fe9
BLAKE2b-256 df6bc74ad4058e36af6994116a679b7b3355b461dd50e007bb62fce33662972f

See more details on using hashes here.

File details

Details for the file gtrpy-1.3-py3-none-any.whl.

File metadata

  • Download URL: gtrpy-1.3-py3-none-any.whl
  • Upload date:
  • Size: 140.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for gtrpy-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dc9995d7159903b4646199ef820df685f91e70cf30486ea5b795337b05ee49dc
MD5 573f95ccf543865d367d6066f3741953
BLAKE2b-256 fc641fb29ad511df7de049e3feb345163470318a0f8e66426ab1e662ec1a800f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page