Nbody6
 All Files Functions Variables
corerd.f
Go to the documentation of this file.
1 ***
2  REAL*8 FUNCTION corerd(KW,MC,M0,MFLASH)
3 *
4 * A function to determine the radius of the core of a giant-like star.
5 * NOTE: this is out of date so rc should be obtained using HRDIAG!
6 * It is still OK to use but bear in mind that the core radius calculated
7 * for non-degenerate giant cores is only a rough estimate.
8 *
9 * Author : C. A. Tout
10 * Date : 26th February 1997
11 * Updated 6/1/98 by J. Hurley
12 *
13  INTEGER kw
14  REAL*8 mc,mch,m0,mflash
15  parameter(mch = 1.44d0)
16 *
17 * First do the black holes and neutron stars.
18 *
19  IF(kw.EQ.14)THEN
20  corerd = 4.24d-06*mc
21  ELSEIF(kw.EQ.13)THEN
22  corerd = 1.4d-05
23 *
24 * Main sequence stars.
25 *
26  ELSEIF(kw.LE.1.OR.kw.EQ.7)THEN
27  corerd = 0.d0
28 *
29 * Core-helium-burning stars, FAGB stars and non-degenerate giant cores.
30 *
31  ELSEIF(kw.EQ.4.OR.kw.EQ.5.OR.(kw.LE.3.AND.m0.GT.mflash))THEN
32  corerd = 0.2239d0*mc**0.62d0
33 *
34 * The degenerate giants and white dwarfs.
35 *
36  ELSE
37  corerd = 0.0115d0*sqrt(max(1.48204d-06,(mch/mc)**(2.d0/3.d0)
38  & - (mc/mch)**(2.d0/3.d0)))
39 *
40 * Degenerate giants have hot subdwarf cores.
41 *
42  IF(kw.LE.9) corerd = 5.d0*corerd
43  ENDIF
44 *
45  RETURN
46  END
47 ***