uhrwecker / GRDonuts

Toolkit for creating plots and computing stable equipotential surfaces of fluids orbiting a compact stellar object (see Zarotti: Relativistic Hydrodynamics))
MIT License
0 stars 0 forks source link

GRDonuts

Toolkit for creating plots and computing stable equipotential surfaces of fluids orbiting a compact stellar object (see Zarotti: Relativistic Hydrodynamics)

Minimal example

For a minimal example, see main.py.

Code snippets may include:

from spacetime import Schwarzschild from vis import SimplePlotter

pot = Schwarzschild(l=3.9) pl = SimplePlotter() pl.plot(pot)

Developement

See the issues for the current status of the code. If you want to contrubute:

Theoretical background

For perfect fluids, orbiting a compact, spherical, staionary object, the Potential W (in terms of the metric) of the fluid is given by:

W = \frac{1}{2} \sqrt -(g{tt} + 2l g{t \phi} + l^2 g_{\phi \phi} )

This is implemented for various spacetimes (see spacetime directory/). Just import the explicit Potential you want, and instanciate it. In general, this will give you the Potential in terms of the distance r.

Plotting

There a various plotters available in the vis/ directory. Import any Plotter you like, and instaciate it. To plot any potential, simply call Plotter.plot(potential) (see documentary).

Inverse potential and plotting

Currently, for Kerr, Schwarzschild and q-metric spacetimes, there is the possibility to look at the angular distribution, depending on the distance r. This will give you plots for a given value of the potential w. This is found in the inverse/ directory.

For plotting the inverse problem, please see to using one of the inverse plotter in vis/ directory.