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 Theory of Relativity without writing a single line of code. Furthermore, you can apply many operations to 6 different type of fields, in both 3D and 4D.

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 the GTRPy via

python3 -m pip install gtrpy

or, you can directly clone the repository

git clone https://github.com/seVenVo1d/GTRPy.git

Requirements

Install the requirements by running

python3 -m pip install numpy Pillow pysimplegui sympy

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

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

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

from the terminal (it does not matter what directory you are in, if you installed it via pip). The program will create the logs directory, under your current 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

GTR Tensors

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

Fields

Currently, there are 6 different type of fields 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

Available Operations in GTRPy

  1. Print out the equations obtained from each operation by clicking a single button
  2. Checking the Killing field condition for a given vector field
  3. Varying the type of a given vector and tensor field
  4. Calculating Covariant and Lie derivatives for scalar, vector and tensor fields

Overview

4D/Main Page 3D/Main Page
4d_main 3d_main
4D/Scalar Field 4D/Vector Field 4D/Tensor Field
4d_scalar 4d_vector 4d-tensor
3D/Scalar Field 3D/Vector Field 3D/Tensor Field
3d_scalar 3d_vector Screenshot from 2023-01-28 22-47-14

Upcoming Features

  1. Gradient, Divergence, Curl and Laplace operations on fields
  2. Partial and Covariant derivatives of the GTR tensors
  3. Including more coordinate systems

Contributing

I am looking for developers who would like to contribute to the project. If you are interested, feel free to create an issue by stating how would you like to contribute. Any help or idea is welcomed. For more information you can also look at the CONTRIBUTING.md.

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.6.tar.gz (105.9 kB view details)

Uploaded Source

Built Distribution

gtrpy-1.6-py3-none-any.whl (143.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gtrpy-1.6.tar.gz
Algorithm Hash digest
SHA256 3cc344505f859da6ddd4d170d0ecb19c44a043aafac2db885cfc353369572d47
MD5 e944a644484f3ae2e1f6a169fe90b79d
BLAKE2b-256 ea019ed76e24c0dee31eccc3c266c31f58241a0aca0e72bd1bf7467ac8e7b795

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gtrpy-1.6-py3-none-any.whl
  • Upload date:
  • Size: 143.6 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c8f16da3a6ae4ec46e21dba05ff1dd74d03d328b1ac08cc7b0cb48fa670b0b20
MD5 d7e6de09bada45ee93ddca6cd5811a95
BLAKE2b-256 da23ac0d7771fd51ab5929481d522fea5eaafd81641cd58c921cfe375939c128

See more details on using hashes here.

Supported by

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