Nbody6
 All Files Functions Variables
fdisk.f
Go to the documentation of this file.
1  SUBROUTINE fdisk(XI,XIDOT,FM,FD)
2 *
3 *
4 * Miyamoto disk force.
5 * --------------------
6 *
7  IMPLICIT REAL*8 (a-h,o-z)
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)
10  REAL*8 xi(3),xidot(3),fm(3),fd(3)
11 *
12 *
13 * Obtain force & derivative for global variables XI & XIDOT.
14  r2 = xi(1)**2 + xi(2)**2
15  bz = sqrt(b**2 + xi(3)**2)
16  az = sqrt(r2 + (a + bz)**2)
17  az3 = disk/az**3
18 * Note missing square root sign in (b^2 + z^2) of Book eq. (8.52).
19  azdot = xi(1)*xidot(1) + xi(2)*xidot(2) +
20  & (a + bz)*xi(3)*xidot(3)/bz
21  fm(1) = -az3*xi(1)
22  fm(2) = -az3*xi(2)
23  fm(3) = -az3*xi(3)*(a + bz)/bz
24 * RDOT = (XI(1)*XIDOT(1) + XI(2)*XIDOT(2))/SQRT(R2)
25  fd(1) = -az3*(xidot(1) - 3.0*azdot*xi(1)/az**2)
26  fd(2) = -az3*(xidot(2) - 3.0*azdot*xi(2)/az**2)
27 * Note wrong sign in first term of eq. (8.52) (see printer errata).
28  y1 = 3.0*(a + bz)*xi(3)*azdot/(az**2*bz)
29 * Note printer mistake of dZ/dt in denominator (see errata).
30  y2 = (a*b**2 + bz**3)*xidot(3)/bz**3
31  fd(3) = az3*(y1 - y2)
32 * Refer to Miyamoto & Nagai (PASJ 27, 533) and Book eq. (8.52).
33 *
34  RETURN
35 *
36  END