8 common/galaxy/ gmg,rg(3),vg(3),fg(3),fgd(3),tg,
9 & omega,disk,a,b,v02,rl2,gmb,ar,gam,zdum(7)
13 IF (kz(14).NE.1) go to 20
25 tidal(1) = 4.0*a*(a - b)*(pc/gm)
31 tidal(3) = -(2.0*twopi*rho + 2.0*(a - b)*(a + b)*(pc/gm))
34 WRITE (6,5) zmbar*zmass, fac*tidal(1), fac*tidal(3), pc/gm
35 5
FORMAT (/,12x,
'TOTAL MASS =',f8.1,
' TIDAL(1&3) =',1p,2e10.2,
39 tidal(4) = 2.0*(a - b)*sqrt(pc/gm)
42 tscale = sqrt(pc/gm)*pc
45 tscale = tscale/(3.15d+07*1.0d+06)
49 tidal(k) = tidal(k)*rbar**3/zmbar
51 tidal(4) = tidal(4)*sqrt(rbar**3/zmbar)
52 tscale = tscale*sqrt(rbar**3/(zmass*zmbar))
58 etot = zkin - pot + etide
61 IF (etot.GE.0.0) sx = 1.0
62 IF (kz(5).EQ.2) sx = 1.0
68 xdot(k,i) = xdot(k,i)*sqrt(sx)
73 20 zmtot = zmass*zmbar
80 vg0 = 1.0d-05*sqrt(gmg/(1000.0*rg0))*sqrt(gm/pc)
84 rt = (zmtot/(3.0*gmg))**0.3333*(1000.0*rg0)
86 IF (rtide.GT.0.0)
THEN
88 IF(kz(22).EQ.2) rbar = rt/rtide
94 omega = omega*sqrt(pc/gm)*sqrt(rbar**3/zmbar)
97 tidal(1) = 3.0*omega**2
104 IF (kz(22).EQ.2)
THEN
108 WRITE (6,35) gmg, rg0, omega, rtide, rbar
114 etot = zkin - pot + etide
116 IF (etot.GE.0.0) sx = 1.0
122 xdot(k,i) = xdot(k,i)*sqrt(sx)
127 ELSE IF (kz(14).EQ.3)
THEN
130 READ (5,*) gmg, disk, a, b, vcirc, rcirc, gmb, ar, gam
132 READ (5,*) (rg(k),k=1,3), (vg(k),k=1,3)
135 IF (disk + vcirc + gmb.EQ.0.0.AND.vg(3).EQ.0.0d0)
THEN
138 semi = rap/(1.0 + ecc)
139 vg2 = gmg/(1000.0*semi)*(1.0 - ecc)/(1.0 + ecc)
146 vg(2) = 1.0d-05*sqrt(vg2)*sqrt(gm/pc)
151 rg(k) = 1000.0*rg(k)/rbar
156 r02 = rg(1)**2 + rg(2)**2
157 omega = (rg(1)*vg(2) - rg(2)*vg(1))/r02
164 WRITE (6,35) gmg, sqrt(r02), omega, rtide, rbar
165 35
FORMAT (/,12x,
'POINT-MASS MODEL: GMG =',1p,e9.1,
166 &
' RG =',e9.1,
' OMEGA =',e9.1,
167 &
' RT =',0p,f6.2,
' RBAR =',f6.2)
169 IF (gmb.GT.0.0d0)
THEN
170 WRITE (6,36) gmb, ar, gam
171 36
FORMAT (/,12x,
'GAMMA/ETA MODEL: GMB =',1p,e9.1,
172 &
' AR =',e9.1,
' GAM =',e9.1)
176 IF (disk.GT.0.0d0)
THEN
180 WRITE (6,40) disk, a, b
181 40
FORMAT (/,12x,
'DISK MODEL: MD =',1p,e9.1,
182 &
' A =',e9.1,
' B =',e9.1)
186 IF (vcirc.GT.0.0d0)
THEN
188 rcirc = 1000.0*rcirc/rbar
189 a2 = rcirc**2 + (a + b)**2
190 v02 = vcirc**2 - (gmg/rcirc + disk*rcirc**2/a2**1.5)
192 IF (gmb.GT.0.0d0)
THEN
193 vb2 = gmb/rcirc*(1.0 + ar/rcirc)**(gam-3.0)
196 IF (v02.LT.0.0d0)
THEN
197 WRITE (6,45) v02, 0.001*rcirc*rbar
198 45
FORMAT (
' ',
' NEGATIVE HALO VELOCITY! V02 RCIRC ',
203 rl2 = rcirc**2*(vcirc**2 - v02)/v02
212 a2 = ri2 + (a + b)**2
213 vb2 = gmb/ri*(1.0 + ar/ri)**(gam-3.0)
214 vcirc2 = gmg/sqrt(ri2) + disk*ri2/a2**1.5 +
215 & v02*ri2/(rl2 + ri2) + vb2
216 WRITE (52,50) sqrt(vcirc2)*vstar, ri*rbar/1000.0
217 50
FORMAT (
' CIRCULAR VELOCITY: VC R ',f7.1,f7.2)
222 a2 = r02 + (a + b)**2
223 vb2 = gmb/sqrt(r02)*(1.0 + ar/sqrt(r02))**(gam-3.0)
224 vcirc2 = gmg/sqrt(r02) + disk*r02/a2**1.5 +
225 & v02*r02/(rl2 + r02) + vb2
226 vcirc = sqrt(vcirc2)*vstar
227 WRITE (6,62) vcirc, sqrt(r02)/1000.0, sqrt(rl2)/1000.0
228 62
FORMAT (/,12x,
'CIRCULAR VELOCITY: VC RG RL',f7.1,2f7.2)
237 IF (rtide.EQ.0.0d0) rtide = (0.5/omega**2)**0.3333
239 WRITE (6,65) (rg(k),k=1,3), (vg(k),k=1,3), sqrt(v02)
240 65
FORMAT (/,12x,
'SCALED ORBIT: RG = ',3f7.2,
241 &
' VG = ',3f7.1,
' V0 =',f6.1)
245 IF (kz(14).EQ.3.OR.kz(14).EQ.4)
THEN
247 READ (5,*) mp, ap2, mpdot, tdelay
248 WRITE (6,70) mp, ap2, mpdot, tdelay
249 70
FORMAT (/,12x,
'PLUMMER POTENTIAL: MP =',f7.3,
' AP =',f6.2,
250 &
' MPDOT =',f7.3,
' TDELAY =',f5.1)
254 IF (zkin.GT.0.0d0)
THEN
258 qv = sqrt(qvir*vir/zkin)
261 xdot(k,i) = xdot(k,i)*qv
265 IF (rtide.EQ.0.0d0) rtide = 10.0*rscale
274 IF (kz(14).LE.2)
THEN
275 rtide = (zmass/tidal(1))**0.3333
276 WRITE (6,90) (tidal(k),k=1,4), tscale, rtide
277 90
FORMAT (/,12x,
'TIDAL PARAMETERS: ',1p,4e10.2,
278 &
' TSCALE =',e9.2,
' RTIDE =',0p,f6.2,/)