1 SUBROUTINE kick(I,ICASE,KW,DM)
10 SAVE ipair, kc, vdis, ri
21 IF (kstar(i1).LT.0)
THEN
23 ELSE IF (kstar(i1+1).LT.0)
THEN
26 kstar(in) = -kstar(in)
29 vd2 = 2.0*body(n+ipair)/r(ipair)
30 vdis = sqrt(vd2)*vstar
32 vp2 = 2.0*body(n+ipair)/r(ipair)
33 vesc = sqrt(vp2 + 4.0)*vstar
34 semi = -0.5*body(n+ipair)/h(ipair)
38 IF (body(n+ipair).GT.0.0d0)
THEN
39 eb = body(i1)*body(i1+1)/body(n+ipair)*h(ipair)
45 IF ((kw.LT.13.AND.kz(25).EQ.0).OR.
46 & (kw.EQ.12.AND.kz(25).NE.2)) go to 30
51 WRITE (6,1) name(i1), name(i2), kstar(i1), kstar(i2), zm1,
52 & zm2, vesc, vdis, r(ipair)/semi, eb, r(ipair)
53 1
FORMAT (
' BINARY KICK: NAM K* M1 M2 VESC VDIS R/A EB R ',
54 & 2i6,2i4,4f7.1,f6.2,f9.4,1p,e10.2)
57 IF (kstar(n+ipair).GE.10.AND.nchaos.GT.0)
THEN
80 IF (vfac.GT.0.0d0)
THEN
86 IF (kz(25).EQ.1.AND.(kw.EQ.10.OR.kw.EQ.11))
THEN
88 ELSE IF (kz(25).GT.1.AND.kw.EQ.12)
THEN
101 s = disp*sqrt(-2.0*log(1.0 - x1))
103 vk(2*k-1) = s*cos(theta)
104 vk(2*k) = s*sin(theta)
106 vkick = sqrt(vk(1)**2 + vk(2)**2 + vk(3)**2)
111 vbf = sqrt(vdis**2 + 100.0*vstar**2)
112 vkick = min(vkick,vbf)
114 vkick = min(vkick,10.0d0*vstar)
116 IF (body(i).EQ.0.0d0) vkick = 10.0*vstar
120 IF (vkick.EQ.0.0d0) go to 30
133 vi2 = vi2 + xdot(k,i)**2
135 xdot(k,i) = xdot(k,i) + vkick*vk(k)/vk(4)
136 x0dot(k,i) = xdot(k,i)
137 vf2 = vf2 + xdot(k,i)**2
141 ecdot = ecdot - 0.5*body(i)*(vf2 - vi2)
148 IF (i.EQ.2*jp) j = i - 1
151 vf2 = vf2 + (xdot(k,i) - xdot(k,j))**2
153 hnew = 0.5*vf2 - (body(i) + body(j))/ri
154 eb1 = body(i)*body(j)/(body(i) + body(j))*hnew
162 IF (nkick.LT.50.OR.name(i).LE.2*nbin0.OR.
163 & (kw.GE.13.AND.ttot*tstar.GT.100.0))
THEN
165 WRITE (6,20) i, name(i), kstar(i), kc, body0(i)*zmbar, zm,
166 & sqrt(vi2)*vstar, vkick*vstar, sqrt(vf2)*vstar
167 20
FORMAT (
' VELOCITY KICK: I NAM K* KC* M0 M VI VK VF ',
168 & 2i6,2i4,2f7.2,3f7.1)
173 IF (vkick.LT.4.0*sqrt(0.5).AND.kw.GE.13)
THEN
174 WRITE (6,25) i, name(i), kw, vkick*vstar, sqrt(vf2)*vstar
175 25
FORMAT (
' LOW KICK: I NAM K* VK VF ',2i7,i4,2f7.2)