1 SUBROUTINE hmdot2(J,IGHOST,IMERGE,M1,KW,MC,DMS,RNEW,ITERM)
8 common/binary/ cm(4,mmax),xrel(3,mmax),vrel(3,mmax),
9 & hm(mmax),um(4,mmax),umdot(4,mmax),tmdis(mmax),
10 & namem(mmax),nameg(mmax),kstarm(mmax),iflagm(mmax)
32 IF (body(icm).EQ.0.0d0) iquit = .true.
35 IF (ighost.LE.n.OR.iquit)
THEN
37 WRITE (6,5) name(i1), ighost
38 5
FORMAT (
' DANGER! HMDOT2 NAM IG ',2i5)
54 IF (abs(dms/m1).EQ.0.0d0.AND.kw.EQ.kstar(j)) go to 50
57 semi = -0.5*body(icm)/h(ipair)
58 ecc2 = (1.0 - r(ipair)/semi)**2 + tdot2(ipair)**2/(body(icm)*semi)
60 zmb0 = cm(3,imerge) + cm(4,imerge)
62 semi0 = -0.5*zmb0/h(jpair)
67 semi1 = semi*(zmb0 + body(2*ipair-1))/(zmb + body(2*ipair-1))
68 semi2 = semi0*zmb0/zmb
69 pmin = semi1*(1.0 - ecc1)
76 ri = ri + u(k,jpair)**2
77 v20 = v20 + udot(k,jpair)**2
78 td2 = td2 + 2.0*u(k,jpair)*udot(k,jpair)
80 ecc2 = (1.0 - ri/semi0)**2 + td2**2/(semi0*zmb0)
85 nst = nstab(semi2,semi1,ecc,ecc1,zi,cm(1,imerge),
86 & cm(2,imerge),body(2*ipair))
93 pcrit =
stability(cm(3,imerge),cm(4,imerge),body(2*ipair-1),
94 & ecc,ecc1,0.0d0)*semi2
98 IF (pmin.GT.pcrit.AND.h(jpair).LT.-eclose)
THEN
106 rp = semi2*(1.0 - ecc)
107 IF (kz(27).GT.0.AND.rp.LT.4.0*radius(j).AND.ecc.GT.0.002)
THEN
109 IF (kz(27).EQ.2)
THEN
113 bodyi(k) = cm(k+2,imerge)
117 CALL
hicirc(rp,ecc,j1,j2,bodyi,tg,tc,ec,ed,w)
118 IF (tc.GT.2000) go to 18
120 WRITE (6,15) name(j), kstar(j), kstarm(imerge), ecc, dms,
122 15
FORMAT (
' HMDOT2 TERM NM K* E DM RP R* TC ',
123 & i6,2i4,f8.4,f7.3,1p,3e10.2)
129 18 dh = dm/semi0*(1.0 - 0.5*dm/zmb0)
131 h(jpair) = h(jpair) + dh
134 semi2 = -0.5*zmb/h(jpair)
135 c2 = sqrt(semi2/semi0)
136 v2 = 0.5*(zmb + h(jpair)*ri*(semi2/semi0))
142 u(k,jpair) = c2*u(k,jpair)
143 udot(k,jpair) = c1*udot(k,jpair)
144 r(jpair) = r(jpair) + u(k,jpair)**2
148 zmu0 = cm(3,imerge)*cm(4,imerge)/zmb0
150 IF (j.EQ.2*jpair) km = 4
151 cm(km,imerge) = cm(km,imerge) - dm
154 zmu = cm(3,imerge)*cm(4,imerge)/zmb
155 decorr = zmu*h(jpair) - zmu0*hi
156 emerge = emerge + decorr
157 emdot = emdot - decorr
158 egrav = egrav - decorr
161 CALL
hcorr(i2,dm,rstar)
164 IF (dms.GT.1.0d-03)
THEN
165 WRITE (6,30) name(j), kstar(j), imerge, km, m1, dms, pmin,
166 & pcrit, semi2, semi1, r(jpair), h(jpair), decorr
167 30
FORMAT (
' HMDOT2 NAM K* IM KM M1 DM PM PC A A1 R H DE ',
168 & i6,3i4,f6.2,1p,7e10.2,0p,f10.6)