Gravitation Simulator



The initial conditions are set up for a demonstration of a variety of orbits in the Schwarzschild metric for Schwarzschild ("Schwarzschild") and Painleve ("Painleve") coordinates as compared to Newtonian orbits with the same initial conditions. Note that the Painleve coordinates begin with slightly higher momentum as compared to Schwarzild as there is a difference in the definition of time. For a further discussion of the physics of this applet, see farther down this page.

This is horrible!!! Your browser doesn't seem to support applets! Maybe you should get a new one. I use Microsoft's Internet Explorer because I am a SHEEP.



The above is a new version of the software and is a bit experimental. It uses a 4th order Runge-Kutta numerical differential equation algorithm. The "ds" button is supposed to change the initial conditions from dx/dt to dx/ds and back, but I think it's got a sign problem somewhere in the calculation. I need to debug this. Also, I want to add a 4th line of buttons and or text to the above. This will give room to calculate the angular momentum for the Schwarzschild and Painleve cases. If L^2 is less than 12, the particle goes to the singularity (or gets stuck on the horizon). If L^2 > 12, then the particle escapes. I'm kind of interested to see how this works with tachyons.

Conservation of Angular Momentum: 16 Newtonian orbits begin all with the same angular momentum, but with differing radial momentum. The orbits that get closer to the star run faster, the farther out ones run slower, but they all return to the same point because Newtonian gravity does not precess (to first order).

Relativistic Precession: A Newtonian and a Schwarzschild orbit begin with the same initial conditions. The red Newtonian orbit does not precess while the green Schwarzschild orbit overshoots. Note that precession is in the direction of the orbit. By the time the green particle again reaches its maximum radius (perihelion), it has covered 380 degrees instead of 360. This is an illustration of the three primary tests of general relativity, the perihelion precession of Mercury.

Deflection of light by gravity: In the Schwarzschild metric, (red) light is deflected twice as much as (green) light in Newtonian gravity. If you change the initial conditions and rerun the simulation closer to the star, the deflection will increase and the 2 to 1 ratio will become higher. This is an illustration of one of the three primary tests of general relativity, the deflection of light by the sun.

Knife-edge Black hole orbits: If a Schwarzschild orbit begins with an angular momentum less than about 2 sqrt(3) per unit mass, it will spiral into a black hole of mass 1. If the orbit has just barely enough angular momentum, the orbit will precess drastically. This simulation begins with 16 Schwarzschild particles with quite nearly the same angular momentum, and all with barely enough to escape the black hole. The small differences in angular momentum become big differences in precession, and therefore in position. Precession around a black hole goes to infinity as the angular momentum approaches the limit. If you wish to check the accuracy of the simulation, remember that this simulation uses velocities dx/dt. All GR textbooks, when discussing orbits, use the affine (proper time) parameter so their velocities are given as dx/ds. To convert between them, divide dx/ds by dt/ds to give dx/dt.

Absorption Cross Section: In Newtonian gravity, it is not possible to fall into the singularity except by having no angular momentum at all. Schwarzschild orbits need 2 sqrt(3) as a minimum angular momentum to escape. Sixteen massless red Newtonian particles and sixteen massless green Schwarzschild particles approach a black hole. All 16 Newtonian particles escape, but some of the Schwarzschild do. Also, note that the Schwarzschild particles are delayed, relative to the Newtonian ones. This delay is an extreme example of the Shapiro delay the fourth test of general relativity.

Event Horizon, Painleve coordinates: A black hole can be described with many coordinate systems. The most common and familiar is the Schwarzschild coordinates. These coordinates have an event horizon where orbits terminate. But this is just a coordinate singularity, actual particles would continue on to the singularity at r=0. Painleve coordinates are identical to Schwarzschild coordinates except that events have their time adjusted according to their radial distance. The orbits of the two coordinates are therefore identical, but the coordinate time when a particle reaches a point in the orbit is different. This simulation begins with 8 Schwarzschild and 8 Painleve particles with identical initial conditions. Moving in towards the black hole, the Painleve particles race ahead of the Schwarzschild particles and terminate on the singularity at r=0. The Schwarzschild particles terminate on the event horizon. Note: Painleve and Schwarschild coordinates differ in radial velocity. The initial conditions here were chosen to have zero radial velocity. If the initial conditions are changed so that the radial velocities are not identical, then the Painleve and Schwarzschild orbits will be different (physical) orbits, and the paths will diverge.

r=6 Inner edge of accretion disk. The value r=6 is special for black holes as it is the innermost stable circular orbit (ISCO). Inside this orbit, very small changes to a circular orbit will cause it to become very non circular. In this simulation six Schwarzschild and six Painleve particles begin. Half begin barely inside r=6, the other half begin barely outside. The three particles inside r=6 are on unstable orbits that fall into the singularity. The three outisde particles travel on approximately circular orbits. To see the outer orbits complete a circle, click "edit" so that the simulation does not stop too soon. Note that the Painleve orbits lead the Schwarzschild orbits when the particles have radii less than their initial condition, while the opposite holds true when the radii is greater. This is due to the difference in how the two coordinates treat time.

r <6 No stable circular orbits. Even when r < 6 it is possible to have circular orbits but they are knife-edge balanced. In this simulation 15 orbits are simulated in Painleve coordinates. Nine have too much angular momentum to be circular, five have two little, and one is very close to just right. The particles with too little angular momentum just barely fall into the black hole. The particles with just a little too much angular momentum make orbits that are far from circular.

When the "Newton" check box is on, test particles following Newton's law of gravitation will appear leaving red tracks. When the "Schwarzschild" check box is on, test particles following Einstein's law of gravitation according to the Schwarzschild metric with Schwarzschild coordinates will appear leaving green tracks. When the "Painleve" button is on, test particles following Einstein's law of gravitation according to the Schwarzschild metric with Painleve coordinates will appear leaving blue tracks.

In Painleve coordinates, particles can fall through to the singularity at the origin. In Schwarzschild coordinates, they get stuck on the "event horizon". The advantage of Schwarzschild coordinates is that they diagonalize the metric. Painleve coordinates have off off diagonal components (i.e. dr dt). The reason that Painleve coordinates are particularly interesting is a long story that deals with the unification of quantum mechanics with gravitation. I've typed up my thoughts on this here.

The equations of motion for all three particle types are written in Newtonian form, that is, as a = F/m. This is usual for Newton's gravitation but it is not terribly common in Einstein's gravitation. Orbits in Einstein's gravitation are usually written with "geodesic equations" that use Christoffel symbols. The geodesic equations are 2nd order differential equations where the differentiation is with respect to an affine parameter, either a multiple of proper time or proper distance, according as the particle is massive or massless. There are four geodesic equations; the extra one is for coordinate time t, which is, like the others, a function of the affine parameter.

Instead, here, the equations of motion for Einstein's gravitation were obtained by applying the calculus of variations to the integral over coordinate time of ds/dt = \sqrt ((ds/dt)^2). This gives 3 equations of motion (2nd order differential equations where the derivative is with respect to coordinate time t), in x, y, z. These can be numerically inegrated the same way the Newtonian equations are. This works because the proper time is extremized over the end points of sufficiently short paths, and the calculus of variations finds differential equations that define extremal paths.

The Painleve equations of motion are fairly simple:
[011] and [011]
In the above, the numbers on the right give the powers of r associated with that term. The Newtonian term is the third row. Note that there are quite a large number of terms that have lower than the Newtonian contribution, but they involve velocity. I'll type in the Schwarzschild equations of motion when I find the time.

If the use of Cartesian coordinates in black holes is unfamiliar to you, then you would do well to read the paper by Hamilton and Lisle.

Eventually I will produce another applet for 3-dimensional simulations of rotating black holes. These will use "Doran-Cartesian" coordinates that are similar to Painleve- Cartesian except they give the Kerr-Newman metric. That simulation will demonstrate the Lennse-Thirring or frame dragging, effects that Gravity Probe B is currently trying to measure.

Painleve coordinates are used at Cambridge University's Gauge Gravity group . The orbits are the same as that of the Schwarzschild metric except for the time coordinate. Consequently, the particles move at different speeds along the same paths. In particular, particles in the Painleve-Gullstrand coordinates reach the singularity in finite coordinate time. Eventually I will convert the Painleve coordinates to "Doran-Cartesian" coordinates, which describe the Kerr metric, that is, a rotating black hole.

"Size": The size, in pixels, of the central gravitating body.

"Slower": Make the simulation run slower, thereby improving accuracy.

"Faster": Make the simulation run faster, at a loss in accuracy.

"Erase": Redraw the picture and put the test bodies back to their initial positions and velocities.

"Stop/Go": Stop or start the simulation.

"N (1-10)": The number of test bodies, between 1 and 10, for each gravity type.

"Initial Conditions": The (average) initial conditions for the test particles, with (X,Y) giving the initial position and (Vx,Vy) giving the initial velocity.

"+/- Spread over N": The N test bodies will be spread evenly over a range of initial conditions. The maximum and minimum initial conditions will be given by the average initial conditions plus or minus this row of numbers.

"X,Y": The initial X and Y positions (2nd row) and the spread in the initial positions for the N test bodies (3rd row).

"V_x,V_y": The initial velocities in X and Y directions (2nd row) and the spread in the initial velocities for the N test bodies (3rd row).

Notes: The test masses do not interact. If you let a test mass get too close to the singularity, if I didn't look for divide by zero well enough it could gain an unphysical amount of momentum and hike off to infinity forthwith.

Things to add: The Cambridge University theorists refer to their gravity theory, like Newton's as a "flat space" theory. The reason for this term is too subtle to discuss here, but in short, it implies that one can always choose a Cartesian chart. I am providing the .java source code to anyone who wishes to play around with it for their own theory of gravity.

The simulation is by a very simple integration and is subject to numerical error. For this reason, if you let it run long enough, or hit the "Faster" button enough, you will eventually see unphysical orbits. For example, the Newtonian orbits will begin to precess or fail to conserve energy. This can lead to quite beautiful effects.

This is one of a fairly large number of physics and other websites run by Carl Brannnen. Some are shown here: BrannenWorks.com/About.html.