Let’s Play simple general relativity

There’s an interesting discussion on Internet Movie Data Base asking about the math of the film Interstellar and Gravitational Time Dilation. I have no comprehension of Albert Einstein’s Field Equations (The definitive book appears to be Gravitation by Thorn Wheeler and Misner if interested), but Wikipedia has a nice simplified version of the equations for when you are “outside a non spinning sphere”


\frac{t0}{tf} = \sqrt{ 1 - \frac{2 G M}{r c^2} }

This gives you the ratio of time passage for two time-clocks, one an ‘ordinary’ clock at a very far neutral distance and a ‘dilated’ clock down in the gravity-well of bent spacetime. You can imagine Romilly’s clock as the ‘ordinary’ clock at a good distance from the gravitationally massive object, the black hole Gargantua. The dilated clock would be the Ranger’s clock as it gets close to Gargantua (or to Miller’s planet, which is really close to Gargantua). The G is Newton’s Constant of Gravitation, and M is the mass of your object, and r is the Radius (distance) of the dilated clock to the center of the object, and then c of course is the speed of light.

Now Gargantua’s situation is not like the wikipedia equation – as Thorn notes in his book The Science of Interstellar, he calculated as if Gargantua was spinning. But maybe we can still maybe play around with the Wikipedia equation to have a bit of fun – and pretend we are on a spaceship and are sending a crew down to the Planet Earth (also, pretending that it is not spinning). Note we are also completely ignoring Special Relativity, where time dilates due to accelleration to high speeds…. We are only playing around with Gravitational Dilation.

Here is some simple python code to play around with the numbers. It starts out by setting M to the mass of the Earth, R to the Radius of the Earth (in other words, we are pretending your dilated clock is at sea level), and G and c standard. Then it plays around with different values for M and r to see what happens.

# Playing around with General Relativity and Gravity Time Dilation
# See http://en.wikipedia.org/wiki/Gravitational_time_dilation
# Very simplified (non-spinning object).
# Units are Newton, Kilogram, and Meter
# All constants taken from Wikipedia articles
# Fraction is used to avoid floating point issues.
import math
from fractions import Fraction


def time_ratio(gravconst,mass,radius,c):
	#print 'G=',gravconst
	#print 'M=',mass
	#print 'r=',radius
	#print 'c=',c
	square_ratio = 1-Fraction(2*gravconst*mass,radius*c**2)
	return math.sqrt(float(square_ratio))

print time_ratio(standard_G,earth_mass,earth_radius,c)
print time_ratio(standard_G,earth_mass*20000000,earth_radius,c)
print time_ratio(standard_G,earth_mass*2000000000,earth_radius,c)
print time_ratio(standard_G,earth_mass,earth_radius/20000000,c)
print time_ratio(standard_G,earth_mass,earth_radius/2000000000,c)

Hopefully I got the arithmetic right, and it will enable a bit of playing around with the numbers. If I am off… please don’t build a rocket ship based on this program!


About donbright

don bright http://github.com/donbright
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s