Nbody6
erel3.f
Go to the documentation of this file.
1  SUBROUTINE erel3(IM,EB,SEMI)
2 *
3 *
4 * Dominant two-body energy in three-body system.
5 * ----------------------------------------------
6 *
7  IMPLICIT REAL*8 (a-h,m,o-z)
8  common/azreg/ time3,tmax,q(8),p(8),r1,r2,r3,energy,m(3),x3(3,3),
9  & xdot3(3,3),cm(10),c11,c12,c19,c20,c24,c25,
10  & nstep3,name3(3),kz15,kz27
11  common/azcoll/ rk(3),qk(8),pk(8),icall,icoll,ndiss3
12  REAL*8 p1(8)
13 *
14 *
15 * Specify KS index for least dominant motion (M(3-IM) & M(3)).
16  k = 4*(2 - im)
17 *
18 * Form physical momenta from collision configuration.
19  p1(k+1) = qk(k+1)*pk(k+1) - qk(k+2)*pk(k+2) - qk(k+3)*pk(k+3) +
20  & qk(k+4)*pk(k+4)
21  p1(k+2) = qk(k+2)*pk(k+1) + qk(k+1)*pk(k+2) - qk(k+4)*pk(k+3) -
22  & qk(k+3)*pk(k+4)
23  p1(k+3) = qk(k+3)*pk(k+1) + qk(k+4)*pk(k+2) + qk(k+1)*pk(k+3) +
24  & qk(k+2)*pk(k+4)
25 *
26 * Set distance & physical momentum (eqn (53)).
27  ri = qk(k+1)**2 + qk(k+2)**2 + qk(k+3)**2 + qk(k+4)**2
28  p1(k+1) = 0.5d0*p1(k+1)/ri
29  p1(k+2) = 0.5d0*p1(k+2)/ri
30  p1(k+3) = 0.5d0*p1(k+3)/ri
31 *
32 * Form square momentum (c.m. motion of M(IM) & M(3) added below).
33  p2 = 0.0d0
34  DO 15 j = 1,3
35  p2 = p2 + p1(k+j)**2
36  15 CONTINUE
37 *
38 * Obtain binding energy from total energy and perturbing function.
39  mb = m(im) + m(3)
40  mu2 = m(3-im)*mb/(m(3-im) + mb)
41  vp = 0.5d0*p2/mu2 - m(1)*m(2)/r3 - m(3-im)*m(3)/max(r1,r2)
42  eb = 0.5d0*energy - vp
43 *
44 * Set semi-major axis.
45  semi = -m(im)*m(3)/(2.0d0*eb)
46 *
47  RETURN
48 *
49  END