Nbody6
tides2.f
Go to the documentation of this file.
1  SUBROUTINE tides2(QPERI,M1,M2,S1,S2,KSTAR,ECC,KG,WS,QS,DE2,DE3)
2 *
3 *
4 * Tidal energy loss for interacting bodies.
5 * -----------------------------------------
6 *
7  IMPLICIT REAL*8 (a-h,o-z)
8  REAL*8 size(2),ratio(2),zeta(2),psi2(2),psi3(2),de2(2),de3(2),
9  & efac2,efac3,ws(2),qs(2),m1,m2,body(2)
10  INTEGER kstar(2),ip(2),kg(2)
11 *
12 *
13 * Copy masses & radii to local arrays.
14  body(1) = m1
15  body(2) = m2
16  SIZE(1) = s1
17  SIZE(2) = s2
18  efac = 2.0/(1.0 + ecc)
19 *
20 * Assign the appropriate polytropic reference index (n = 3, 2 or 3/2).
21  DO 5 k = 1,2
22  ii = 3
23  IF (kstar(k).EQ.0) ii = 1
24  IF (kstar(k).GE.10) ii = 2
25  ip(k) = ii
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  IF (zeta(k).GT.2.0) THEN
36  alpha = 0.5 + 0.25*(0.5*(zeta(k) - 2.0))**1.5
37  ELSE
38  alpha = 0.5
39  END IF
40  zeta(k) = zeta(k)*efac**alpha
41  IF (kg(k).EQ.0) THEN
42  psi2(k) = efac2(zeta(k),icase)
43  psi3(k) = efac3(zeta(k),icase)
44  ELSE
45  psi2(k) = qs(1)*efac2(ws(1)*zeta(k),icase)
46  psi3(k) = qs(2)*efac3(ws(2)*zeta(k),icase)
47  END IF
48  END IF
49  10 CONTINUE
50 *
51 * Obtain energy loss due to second & third order modes.
52  DO 20 k = 1,2
53  l = 3 - k
54 * IF (RATIO(K).GT.0.1) THEN
55  IF (ratio(k).GT.0.5) THEN ! awaiting bug fix (too large values)
56  r2 = ratio(k)**2
57  r6 = r2*r2*r2*body(l)**2/SIZE(k)
58  de2(k) = r6*psi2(k)
59  de3(k) = r6*r2*psi3(k)
60  ELSE
61  de2(k) = 0.0
62  de3(k) = 0.0
63  END IF
64  20 CONTINUE
65 *
66  RETURN
67 *
68  END