Nbody6
giant3.f
Go to the documentation of this file.
1  SUBROUTINE giant3(I,BODYI,W,Q,XN,QL)
2 *
3 *
4 * Structure constants of giant star.
5 * ----------------------------------
6 *
7 * Theory of Rosemary Mardling, Ap. J. XX, YYY, 1995.
8 * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
9 *
10  include 'common6.h'
11  REAL*8 w(2),q(2),sw(2),mc
12 * DATA WW /2.119,3.113,8.175,3.742,4.953,9.413/
13 * DATA QQ /0.4909,0.4219,0.2372,0.4677,0.3560,0.1519/
14  DATA a0,a1,a2,a3 /0.944525,-0.392030,6.01655d-02,-3.34790d-03/
15  DATA b0,b1,b2 /-0.3789,1.481,-0.1018/
16  DATA c0,c1,c2,c3 /1.452104,3.923872,-11.88722,13.46106/
17  DATA e0,e1,e2,e3 /1.934977,2.214222,-4.855796,4.025394/
18 *
19 *
20 * Set typical core mass of 0.3/0.5 Msun.
21  mc = 0.3 + 0.1*float(kstar(i) - 3)
22  IF(kstar(i).EQ.9) mc = 0.5*bodyi*zmbar
23 *
24 * Form ratio of core mass and mass.
25  sig = mc/(bodyi*zmbar)
26 *
27 * Include safety check on mass ratio just in case.
28  IF (sig.GT.0.9) sig = 0.9
29 *
30 * Define mass, radius, envelope mass and luminosity in S.U.
31  zm = bodyi*zmbar
32  rsi = radius(i)*su
33  zme = zm - mc
34 * Obtain L^{1/3} from giant relation L = 1.98D+05*M_c^6.
35  zl3 = 58.3*mc**2
36 * Evaluate damping constant from Zahn's theory (R.M. 13/5/97).
37 * FAC = (GM)^{1/2}*M_{env}^{1/3)/(R^{5/6}*L^{1/3}) = 8.48D+03 for S.U.
38  ql = 8.48d+03*sqrt(zm)*(zme/zl3)**0.33/rsi**0.833
39 *
40 * Set effective frequencies, overlap integrals and structure constants.
41  DO 10 k = 1,2
42 * K1 = 3*K - 2
43  IF (k.EQ.1) THEN
44  sw(k) = ((c3*sig + c2)*sig + c1)*sig + c0
45  ELSE
46  sw(k) = ((e3*sig + e2)*sig + e1)*sig + e0
47  END IF
48  w(k) = sw(k)**2
49  q(k) = ((a3*sw(k) + a2)*sw(k) + a1)*sw(k) + a0
50  10 CONTINUE
51 *
52 * Evaluate new polytropic index.
53  xn = (b2*sw(1) + b1)*sw(1) + b0
54 * WRITE (24,20) IC, IPAIR, KSTAR(J), MC/(BODYI*SMU), RSI, XN, QL
55 * 20 FORMAT (' GIANT: IC KS K* MC/M R* n Q ',3I4,3F6.2,F7.1)
56 * CALL FLUSH(24)
57 *
58 * Include warning if n > 5.
59 * IF (XN.GE.5.0) THEN
60 * WRITE (6,30) IC, IPAIR, KSTAR(J), CM(L,IC)/BODY(I),
61 * & RADIUS(I)/RIN, XN, QL
62 * 30 FORMAT (' GIANT: WARNING! IC KS K* MC/M R/R0 n QL ',
63 * & 3I4,F6.2,F6.1,F6.2,F7.1)
64 * END IF
65
66  RETURN
67 *
68  END