Nbody6
tides.f
Go to the documentation of this file.
1  SUBROUTINE tides(QPERI,M1,M2,S1,S2,KSTAR,DE)
2 *
3 *
4 * Tidal energy loss for interacting stars.
5 * ----------------------------------------
6 *
7  REAL*8 size(2),ratio(2),zeta(2),psi2(2),psi3(2),de(2),
8  & qperi,m1,m2,efac2,efac3,s1,s2,body(2)
9  INTEGER kstar(2),ip(2)
10 *
11 *
12 * Copy masses & radii to local arrays.
13  body(1) = m1
14  body(2) = m2
15  SIZE(1) = s1
16  SIZE(2) = s2
17 *
18 * Assign the appropriate polytropic reference index (NP = 3/2 or 3).
19  DO 5 k = 1,2
20  kst = kstar(k)
21  IF (kst.EQ.3.OR.kst.EQ.5.OR.kst.EQ.6) THEN
22  ip(k) = 1
23  ELSE
24  ip(k) = 3
25  END IF
26  5 CONTINUE
27 *
28 * Form dimensionless ratios & tidal efficiency factors for each star.
29  DO 10 k = 1,2
30  l = 3 - k
31  ratio(k) = SIZE(k)/qperi
32  IF (ratio(k).GT.0.1) THEN
33  icase = ip(k)
34  zeta(k) = sqrt((body(k)/(body(k) + body(l)))/ratio(k)**3)
35  psi2(k) = efac2(zeta(k),icase)
36  psi3(k) = efac3(zeta(k),icase)
37  END IF
38  10 CONTINUE
39 *
40 * Obtain energy loss due to second & third order modes.
41  DO 20 k = 1,2
42  l = 3 - k
43  IF (ratio(k).GT.0.1) THEN
44  r2 = ratio(k)**2
45  r6 = r2*r2*r2
46  de(k) = r6*(psi2(k) + r2*psi3(k))*body(l)**2/SIZE(k)
47  ELSE
48  de(k) = 0.0
49  END IF
50  20 CONTINUE
51 *
52  RETURN
53 *
54  END