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 python
requirements by running
python3 -m pip install numpy Pillow pysimplegui sympy
Additionally, you will also need tkinter
and LaTeX
support to run the GTRPy. These can be easily installed by running:
in Fedora
sudo dnf install dvipng python3-tkinter texlive-collection-latex texlive-collection-latexextra
in Ubuntu
sudo apt install dvipng python3-tk texlive-latex-base texlive-latex-extra
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 thedemos
directory.
Current Features
GTR Tensors
Either by using predefined coordinates or by defining the coordinate system yourself, you can calculate:
- Inverse Metric Tensor
- Christoffel Symbol
- Riemann Tensor
- Ricci Tensor
- Ricci Scalar
- Weyl Tensor
- Traceless Ricci Tensor
- Einstein Tensor
- Kretschmann Scalar
Fields
Currently, there are 6 different type of fields that you can carry out operations. These are:
- Scalar Field
- Type (1,0) Vector Field
- Type (0,1) Vector Field
- Type (2,0) Tensor Field
- Type (1,1) Tensor Field
- Type (0,2) Tensor Field
Available Operations in GTRPy
- Print out the equations obtained from each operation by clicking a single button
- Checking the Killing field condition for a given vector field
- Varying the type of a given vector and tensor field
- Calculating Covariant and Lie derivatives for scalar, vector and tensor fields
Overview
4D/Main Page | 3D/Main Page |
---|---|
4D/Scalar Field | 4D/Vector Field | 4D/Tensor Field |
---|---|---|
3D/Scalar Field | 3D/Vector Field | 3D/Tensor Field |
---|---|---|
Upcoming Features
- Gradient, Divergence, Curl and Laplace operations on fields
- Partial and Covariant derivatives of the GTR tensors
- 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
Built Distribution
File details
Details for the file gtrpy-1.7.tar.gz
.
File metadata
- Download URL: gtrpy-1.7.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2244cb77b20744b987f06f2e0a34992694007d1bcc435ea78a8b378b0e59436 |
|
MD5 | eac0f82b2b63e3cbcf7ddf91fa966beb |
|
BLAKE2b-256 | f7847c42108eae36edb12a55f797f1476ebcab8dacbda3d4175aabc98bf001ba |
File details
Details for the file gtrpy-1.7-py3-none-any.whl
.
File metadata
- Download URL: gtrpy-1.7-py3-none-any.whl
- Upload date:
- Size: 143.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b62c1c2c804e6e570d06fa5572edb7289cc0fb2aac1d3dc000e8148040f184d9 |
|
MD5 | d341b3de24eb158307f2e952c8fd4f90 |
|
BLAKE2b-256 | 82265f0f2efa2f4e79dbe76419e34fc5988c117a158d561e892a6abd8d38736f |