Vous êtes sur la page 1sur 1

Motion of a particle under central force (Planetary motion)

We consider the central force, f = −k / r 2 with k = 1 . Now, x and y-


components of the force can be written as f x = xf / r = − x / r 3 and
f y = yf / r = − y / r 3 , where r 2 = x 2 + y 2 . Next we consider Newton’s law:
dv
f =m
dt
with m = 1 .
dv x
Thus we have f x = ⇒ dv x = f x dt = −x / r 3 dt and dv y = f y dt = − y / r 3 dt . We
dt
implement the last two steps in the following program and
evaluate velocity components in successive times and
wherefrom we obtain the position x, y.

[Source: Book - “From Newton to Mandelbrot” by D. Stauffer and H.E.


Stanley (Pub. Spinger)]

C Motion of a particle in the central force field


open(1,file='planet.dat')
write(*,*)'Give vx,vy,dt'
read(*,*)vx,vy,dt
x=0.0
y=1.0
ncount=0
10 r2=x*x+y*y
r3=dt/(r2*sqrt(r2))
vx=vx-x*r3
vy=vy-y*r3
x=x+dt*vx
y=y+dt*vy
write(1,*)x,y
ncount=ncount+1
if(ncount.lt.1000)go to 10
stop
end

• The data stored in the file ‘planet.dat’ can be plotted (through Origin or any
such software) to see the closed elliptical planetary oribit.

Abhijit Kar Gupta, kg.abhi@gmail.com

Vous aimerez peut-être aussi