9 common/chreg/ timec,tmax,rmaxc,cm(10),namec(6),nstep1,kz27,kz30
10 REAL*8 m,mb,mb1,mb2,r2(nmx,nmx),xcm(3),vcm(3),xx(3,3),vv(3,3),
28 IF (1.0/rinv(2).LT.0.5*rsum)
THEN
46 rb0 = rb0 + (x(j1) - x(j2))**2
47 vrel2 = vrel2 + (v(j1) - v(j2))**2
48 rdot = rdot + (x(j1) - x(j2))*(v(j1) - v(j2))
49 xcm(k) = (m(i1)*x(j1) + m(i2)*x(j2))/mb
50 vcm(k) = (m(i1)*v(j1) + m(i2)*v(j2))/mb
51 xcm2(k) = (m(i3)*x(j3) + m(i4)*x(j4))/mb2
52 vcm2(k) = (m(i3)*v(j3) + m(i4)*v(j4))/mb2
53 ri2 = ri2 + (xcm2(k) - xcm(k))**2
54 vrel21 = vrel21 + (vcm2(k) - vcm(k))**2
55 vrel34 = vrel34 + (v(j3) - v(j4))**2
56 rdot3 = rdot3 + (xcm2(k) - xcm(k))*(vcm2(k) - vcm(k))
68 semi = 2.0d0/rb - vrel2/mb
70 ecc = sqrt((1.0d0 - rb/semi)**2 + rdot**2/(semi*mb))
71 semi1 = 2.0/r3 - vrel21/mb1
73 ecc1 = sqrt((1.0d0 - r3/semi1)**2 + rdot3**2/(semi1*mb1))
75 semi2 = 2.0/rb2 - vrel34/mb2
79 IF (semi.LT.0.0.OR.ecc.GT.1.0)
THEN
83 pcrit0 =
stability(m(i1),m(i2),m(i3),ecc,ecc1,0.0d0)*semi
84 pmin0 = semi*(1.0 - ecc)
85 IF (pmin0.LT.pcrit0)
THEN
91 CALL
inclin(xx,vv,xcm,vcm,alpha)
94 IF (semi.GT.semi2)
THEN
95 pcrit =
stability(m(i1),m(i2),mb2,ecc,ecc1,alpha)
97 ELSE IF (semi2.GT.0.0)
THEN
98 pcrit =
stability(m(i3),m(i4),mb,0.0d0,ecc1,alpha)
104 pcrit = pcrit*(1.0 + 0.1*abs(semi/semi2))*ain
108 pmin = semi1*(1.0d0 - ecc1)
109 IF (pmin.GT.pcrit.AND.ain.GT.0.0.AND.semi1.GT.0.0.AND.
112 alpha = 180.0*alpha/3.14
113 WRITE (6,20) ecc, ecc1, semi, semi1, pmin, pcrit, alpha
114 20
FORMAT (
' QUAD HIARCH E =',f6.3,
' E1 =',f6.3,
115 &
' A =',1p,e8.1,
' A1 =',e8.1,
' PM =',e9.2,
116 &
' PC =',e9.2,
' IN =',0p,f6.1)
117 ri = sqrt(cm(1)**2 + cm(2)**2 + cm(3)**2)
119 WRITE (81,30) timec, ri, namec(i3), ecc, ecc1, semi, semi1,
120 & pcrit/pmin, alpha, emax
121 30
FORMAT (f9.5,f5.1,i6,2f6.3,1p,2e10.2,0p,f5.2,f6.1,f6.3)