Skip to content

About

Black hole photon orbit calculator using Physics-Informed Neural Networks (PINNs)

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

102 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

            ███                                ████   ███                             
           ░░░                                ░░███  ░░░                              
 ████████  ████  ████████   ████████    █████  ░███  ████   ██████   ██████  ████████ 
░░███░░███░░███ ░░███░░███ ░░███░░███  ███░░   ░███ ░░███  ███░░███ ███░░███░░███░░███
 ░███ ░███ ░███  ░███ ░███  ░███ ░███ ░░█████  ░███  ░███ ░███ ░░░ ░███████  ░███ ░░░ 
 ░███ ░███ ░███  ░███ ░███  ░███ ░███  ░░░░███ ░███  ░███ ░███  ███░███░░░   ░███     
 ░███████  █████ ████ █████ ████ █████ ██████  █████ █████░░██████ ░░██████  █████    
 ░███░░░  ░░░░░ ░░░░ ░░░░░ ░░░░ ░░░░░ ░░░░░░  ░░░░░ ░░░░░  ░░░░░░   ░░░░░░  ░░░░░     
 ░███                                                                                 
 █████                                                                                
░░░░░                                                                              

Python PyTorch NumPy SciPy

Introduction

This module can be used to train a Physics-Informed Neural Network (PINN) to solve the following nonlinear ordinary differential equation (ODE),

$$\overset{\textstyle\cdot\cdot}{u} \: + \: u - \: 3 \: \frac{u^2}{2} = 0 ,$$

which describes the orbit of photons in a Schwarzschild spacetime about a spherically symmetric body, where

$$u = \frac{r_s }{ r},$$

and $r_s$ is the Schwarzschild radius.

Installation

The notebooks can run within Colab and as well as locally using the following commands:

conda update conda
conda create -n slicer python=3.11
conda activate slicer
conda install jupyterlab notebook
conda install pytorch
conda install matplotlib
conda install pandas

Then clone the repository in the activated environment, here called slicer,

git clone https://github.com/soot-bit/pinnslicer.git
cd pinnslicer

then install the project in editable mode (installs dependencies too) using,

pip install -e .

About

Black hole photon orbit calculator using Physics-Informed Neural Networks (PINNs)

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Contributors

Languages