12.07.2015 Views

Simple Nature - Light and Matter

Simple Nature - Light and Matter

Simple Nature - Light and Matter

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1 import math2 def tmoon(vi,ri,rf,n):3 bigg=6.67e-11 # gravitational constant4 me=5.97e24 # mass of earth5 mm=7.35e22 # mass of moon6 rm=3.84e8 # earth-moon distance7 r=ri8 v=vi9 dr = (rf-ri)/n10 e=-bigg*me/ri-bigg*mm/(rm-ri)+.5*vi**211 t=012 for i in range(n):13 u_old = -bigg*me/r-bigg*mm/(rm-r)14 k_old = e - u_old15 v_old = math.sqrt(2.*k_old)16 r = r+dr17 u = -bigg*me/r-bigg*mm/(rm-r)18 k = e - u19 v = math.sqrt(2.*k)20 v_avg = .5*(v_old+v)21 dt=dr/v_avg22 t=t+dt23 return t>>> re=6.378e6 # radius of earth>>> rm=1.74e6 # radius of moon>>> ri=re+3.363e5 # re+initial altitude>>> rf=3.8e8-rm # earth-moon distance minus rm>>> vi=1.083e4 # initial velocity>>> print(tmoon(vi,ri,rf,1000)/3600.) # convert seconds to hours59.654047441976552This is pretty decent agreement, considering the wildly inaccuratetrajectory assumed. It’s interesting to see how much the durationof the trip changes if we increase the initial velocity by only tenpercent:>>> vi=1.2e4>>> print(tmoon(vi,ri,rf,1000)/3600.)18.177752636111677The most important reason for using the lower speed was thatif something had gone wrong, the ship would have been able towhip around the moon <strong>and</strong> take a “free return” trajectory back tothe earth, without having to do any further burns. At a higherspeed, the ship would have had so much kinetic energy that inthe absence of any further engine burns, it would have escapedfrom the earth-moon system. The Apollo 13 mission had to take afree return trajectory after an explosion crippled the spacecraft.Section 2.3 Gravitational Phenomena 107

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!