1 subroutine proto_star(ZMBAR,RBAR,mass1,mass2,ECC,SEMI)
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
13 parameter(au=206259.591d0,rsun=4.6523d-3)
26 mtot = (mass1+mass2)*zmbar
31 period = semi*semi*semi/mtot
32 period = dsqrt(period)
34 period_initial = period
40 r_periastron = semi*(1.d0-ecc)
41 alpha = -1.d0*(ro/r_periastron)**beta
43 ecc = dexp(alpha + dlog(ecc))
50 if (qold.GT.1.d0) qold = 1.d0/qold
52 if (alpha.GT.1.d0)
then
55 qnew = qold + (1.d0-qold) * alpha
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)
78 write(6,
'(a,2F8.3)')
' new masses [Msun]:',
79 + mass1*zmbar,mass2*zmbar
83 mtot = (mass1+mass2)*zmbar
90 period = period_initial*((1.d0-ecc_initial)/(1.d0-ecc))**1.5d0
91 period = period * dsqrt(mtot_initial/mtot)
94 semi = mtot * period*period
95 semi = semi**(1.d0/3.d0)