Welcome, guest | Sign In | My Account | Store | Cart

Relativistic Rocket Kinematics

Python, 93 lines
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Relativistic Rocket Kinematics
# FB - 20130609
import math
print "Coordinate Time passed (for observer) to reach given speed (velocity):"
print "v0 = 0"
g = float(raw_input("Constant Proper Acceleration in g: "))
a = g * 9.8 # meters / second ** 2
a = a / 3e8 # light-second / second ** 2
a = a * 3.15e7 # light-year / year ** 2
# a = float(raw_input("Constant Proper Acceleration: "))
v = float(raw_input("Speed in c: ")) 
tc = v / a / math.sqrt(1.0 - v * v)
print str(tc) + " years"
print
print "Proper Time passed for the traveller:"
print "v0 = 0"
# g = float(raw_input("Constant Proper Acceleration in g: "))
# a = g * 9.8 # meters / second ** 2
# a = a / 3e8 # light-second / second ** 2
# a = a * 3.15e7 # light-year / year ** 2
# a = float(raw_input("Constant Proper Acceleration: "))
# tc = float(raw_input("Coordinate Time passed for the observer in years: "))
tp = math.asinh(a * tc) / a
print str(tp) + " years"
##print
##print "Distance travelled at given time:"
##print "v0 = 0"
##a = float(raw_input("Constant Proper Acceleration: "))
##t = float(raw_input("Time: "))
##x = (math.sqrt(1.0 + a * a * t * t) - 1.0) / a
##print x
##print
##print "Coordinate Time passed for distant observer:"
##print "v0 = 0"
##a = float(raw_input("Constant Proper Acceleration: "))
##t = float(raw_input("Proper Time passed for the traveller: "))
##tc = math.sinh(a * t) / a
##print tc
##print
##print "Coordinate Time passed to reach given distance:"
##print "v0 = 0"
##a = float(raw_input("Constant Proper Acceleration: "))
##x = float(raw_input("Distance: "))
##tc = (math.sqrt(1.0 + a * a * x * x) - 1.0) / a
##print tc
##print
##print "Speed at given time:"
##print "v0 = 0"
##a = float(raw_input("Constant Proper Acceleration: "))
##t = float(raw_input("Time: ")) 
##v = a * t / math.sqrt(1.0 + a * a * t * t)
##print v
##print
##print "Speed at given time under constant force:"
##print "v0 = 0"
##f = float(raw_input("Force: "))
##m = float(raw_input("Mass: "))
##t = float(raw_input("Time: "))
##v1 = f * t / math.sqrt(m * m - (f * t / c) ** 2.0)
##v2 = f * t / m / math.sqrt(1.0 + (f / m / c) ** 2.0 * t * t) 
##print v1, v2
##print
##print "Distance travelled at given time under constant force:"
##print "v0 = 0"
##f = float(raw_input("Force: "))
##m = float(raw_input("Mass: "))
##t = float(raw_input("Time: "))
##x = c * (m * c / f) * (math.sqrt(1.0 + (f / m / c) ** 2.0 * t * t) - 1.0)
##print x
##print
##print "Acceleration at given time under constant force:"
##print "v0 = 0"
##f = float(raw_input("Force: "))
##m = float(raw_input("Mass: "))
##t = float(raw_input("Time: "))
##a = f / m / math.sqrt(1.0 + (f / m / c) ** 2.0 * t * t) ** 3.0
##print a
##print
##print "Time it takes to reach given speed (velocity) under constant force:"
##print "v0 = 0"
##f = float(raw_input("Force: "))
##m = float(raw_input("Mass: "))
##v = float(raw_input("Speed: ")) 
##t = math.sqrt(v * v * m * m * c * c / (f * f * (c * c - v * v)))
##print t
##print
##print "Time to travel given distance under constant force:"
##print "v0 = 0"
##f = float(raw_input("Force: "))
##m = float(raw_input("Mass: "))
##x = float(raw_input("Distance: ")) 
##t = math.sqrt(((x * f / m + 1.0) ** 2.0 - 1.0) * m * m * c * c / f * f )
##print t

3 comments

FB36 (author) 10 years, 10 months ago  # | flag

For example, how long it would take to reach 99.9% of speed of light using a rocket engine that provides 1 g constant acceleration (from viewpoint of the traveller(s)):

Coordinate Time passed (for observer) to reach given speed (velocity):

v0 = 0

Constant Proper Acceleration in g: 1

Speed in c: 0.999

21.71419414 years

Proper Time passed for the traveller:

v0 = 0

3.69310123154 years

FB36 (author) 10 years, 10 months ago  # | flag

Since we are assuming 1 g constant acceleration, the rocket would also provide artificial gravity for the travellers!

http://en.wikipedia.org/wiki/Space_travel_using_constant_acceleration

FB36 (author) 10 years, 10 months ago  # | flag

Imagine a wide UFO shaped spaceship with engines underneath.

A passenger standing in a room looking out the window on the side of the ship would see stars like long vertical strings moving downwards; not like moving sideways in the movies!

Created by FB36 on Sun, 9 Jun 2013 (MIT)
Python recipes (4591)
FB36's recipes (148)

Required Modules

  • (none specified)

Other Information and Tasks