- #1

- 1,420

- 112

## Summary:

- I'm trying to simulate a super-sized accelerating light-clock in Python.

## Main Question or Discussion Point

So this what I found out: One cycle takes less coordinate time, and less proper time according to the lower mirror when the clock accelerates. Proper time per one cycle does not seem to get larger with more cycles, although coordinate time per one cycle does get larger.

So what do you think, is this a real phenomenon?

Output of low acceleration run:

Output of higher acceleration run:

So what do you think, is this a real phenomenon?

Output of low acceleration run:

Code:

```
accelerations are: 0.001 0.001
proper time and coordinate time are:
0.799840042654 0.799840127936
```

Code:

```
accelerations are: 1.0 0.7143
proper time and coordinate time are:
0.672944473242 0.724897959184
```

Python:

```
from math import sqrt ,asinh
c=1.0
def gamma(a,t):
return sqrt( 1 + (a*t/c)*(a*t/c) )
def d(a,t):
return (c**2 / a) * (gamma(a,t) -1)
def T(a,t):
return (c/a)*asinh(a*t/c)
def v(a,t):
return a*t / gamma(a,t)
def properaccelerationatheight(a,h):
return a / (1 + ( (a*h) / c**2 ) )
#tstep1 and tstep2 return a varying timestep
def tstep1():
global a2,t,h,p
dist = abs( d(a2,t) + h - p)
return dist / (10*c)
def tstep2():
global a1,t,p
dist = abs( d(a1,t) - p)
return dist / (20*c)
# h is the height of the light-clock, a1 and a2 are proper accelerations of the mirrors
h = 0.4 * c
for a1 in [0.001, 1.0]:
a2 = properaccelerationatheight(a1,h)
print '\naccelerations are:',round(a1,4),round(a2,4)
# t is coordinate time, p is the position of a light pulse
t=0.0
p=0.0
for i in xrange(44444):
dt=tstep1()
p += dt*c
t+=dt
for i in xrange(44444):
dt=tstep2()
p -= dt*c
t+=dt
print 'proper time and coordinate time are:'
print T(a1,t), t
```