Nbody6
 All Files Functions Variables
proto_star.f
Go to the documentation of this file.
1  subroutine proto_star(ZMBAR,RBAR,mass1,mass2,ECC,SEMI)
2 *
3 * Pre-mainsequence binary evolution (Kroupa MN 277, 1491, 1995).
4 * --------------------------------------------------------------
5 *
6  implicit none
7  real*8 mass1,mass2,ecc,semi,period
8  real*8 ecc_initial,period_initial
9  real*8 qnew,qold,mtot,ro,mtot_initial
10  real*8 r_periastron,alpha,beta
11  real*8 zmbar,rbar,au,rsun
12 * astr. unit, solar radius, all in AU (1pc=206259.591AU)
13  parameter(au=206259.591d0,rsun=4.6523d-3)
14 *
15 * At this stage we have the masses, eccentricity and period of each binary
16 * at "birth", i.e. prior to circularisation and "feeding". Now evolve these
17 * to very, very roughly take into account complete circularisation,
18 * partial circularisation and "feeding". Do this if option BK(1)=1:
19 * (i.e. mass-exchange at proto-stellar time):
20 *
21 * Define the best model: (alpha==lambda, beta==chi).
22  alpha = 28.d0
23  beta = 0.75d0
24 *
25 * in Msun:
26  mtot = (mass1+mass2)*zmbar
27  mtot_initial = mtot
28 * in AU:
29  semi = semi*rbar*au
30 * in years:
31  period = semi*semi*semi/mtot
32  period = dsqrt(period)
33  ecc_initial = ecc
34  period_initial = period
35 *
36 * 1) Circularisation and evolution of orbit as a function of periastron.
37 * Note that the algorithm used here leads to circularised orbits for
38 * logP<=1 approximately!! (if beta=1.5,alpha=35 approximately)
39  ro = alpha *rsun
40  r_periastron = semi*(1.d0-ecc)
41  alpha = -1.d0*(ro/r_periastron)**beta
42  if (ecc.GT.0.d0) then
43  ecc = dexp(alpha + dlog(ecc))
44  else
45  ecc = ecc_initial
46  end if
47 *
48 * 2) Change mass-ratio towards unity as a function of initial periastron.
49  qold = mass1/mass2
50  if (qold.GT.1.d0) qold = 1.d0/qold
51  alpha = -1.d0*alpha
52  if (alpha.GT.1.d0) then
53  qnew = 1.d0
54  else
55  qnew = qold + (1.d0-qold) * alpha
56  end if
57 *
58 * Set new masses in model units (remembering q=m1/m2<1) if mass is conserved.
59 * mtot = mtot/ZMBAR
60 * mass1 = mtot/(qnew+1.D0)
61 * mass2 = mtot_initial/ZMBAR - mass1
62 *
63 * Keep the mass of primary fixed and adjust mass of secondary. Note that this
64 * algorithm leads to a gain in mass of the binary, hence of whole cluster.
65 *
66 C Added 20.06.96 write statements: added 3.09.2002: write to feeding.dat.
67 * write(55,'(2(4F10.3))')
68 * & mass1*ZMBAR,mass2*ZMBAR,ecc_initial,
69 * & LOG10(period_initial*365.25),
70 * & DMAX1(mass1,mass2)*ZMBAR,qnew*mass1*ZMBAR,ecc,
71 * & LOG10(period*365.25)
72 * write(6,*)
73  write(6,*)' FEEDING in binpop_pk.f'
74  write(6,'(a,2F8.3)')' old masses [Msun]:',
75  + mass1*zmbar,mass2*zmbar
76  mass1 = dmax1(mass1,mass2)
77  mass2 = qnew*mass1
78  write(6,'(a,2F8.3)')' new masses [Msun]:',
79  + mass1*zmbar,mass2*zmbar
80 C End added bit.
81 *
82 * In Msun:
83  mtot = (mass1+mass2)*zmbar
84 *
85 C This below is wrong as in ecc formula above constant Rperi was assumed!
86 c* Duquennoy et al. 1992 in "Binaries as tracers of stellar evolution":
87 c period = period_initial * DEXP((57.D0/14.D0) *
88 c & (ecc*ecc - ecc_initial*ecc_initial))
89 C This below is correct:
90  period = period_initial*((1.d0-ecc_initial)/(1.d0-ecc))**1.5d0
91  period = period * dsqrt(mtot_initial/mtot)
92 *
93 * Form new semi-major axis and convert back to model units.
94  semi = mtot * period*period
95  semi = semi**(1.d0/3.d0)
96  semi = semi/(rbar*au)
97 *
98  return
99  end