2 SUBROUTINE bsetid(kw,mass,mc,menv,r,rc,renv,lum,ospin,k2,q,
3 & sep,ecc,oorb,delet1,dspin,eqspin,djt)
7 real*8 mass,mc,menv,r,rc,renv,lum,ospin,k2,q
8 real*8 sep,ecc,oorb,delet1,dspin,eqspin,djt
11 real*8 ecc2,omecc2,sqome2,sqome3,raa2,raa6,twopi
12 real*8 f1,f2,f3,f4,f5,tc,fc,tcqr,ttid
21 twopi = 2.d0*acos(-1.d0)
23 f5 = 1.d0+ecc2*(3.d0+ecc2*0.375d0)
24 f4 = 1.d0+ecc2*(1.5d0+ecc2*0.125d0)
25 f3 = 1.d0+ecc2*(3.75d0+ecc2*(1.875d0+ecc2*7.8125d-02))
26 f2 = 1.d0+ecc2*(7.5d0+ecc2*(5.625d0+ecc2*0.3125d0))
27 f1 = 1.d0+ecc2*(15.5d0+ecc2*(31.875d0+ecc2*(11.5625d0
30 if((kw.eq.1.and.mass.ge.1.25).or.kw.eq.4.or.kw.eq.7)
then
31 tc = 1.592d-09*(mass**2.84)
32 fc = 1.9782d+04*sqrt((mass*r*r)/sep**5)
33 & *tc*(1.d0+q)**(5.d0/6.d0)
37 renvk = min(renv,r-rc)
38 renvk = max(renvk,1.0d-10)
39 tc = (menv*renvk*(r-0.5d0*renvk)/
40 & (3.d0*lum))**(1.d0/3.d0)
42 ttid = twopi/(1.0d-10 + abs(oorb - ospin))
43 fc = min(1.d0,(ttid/(2.d0*tc))**2)
44 tcqr = 2.d0*fc*q*raa6*menv/(21.d0*tc*mass)
45 rg2 = (k2*(mass-mc))/mass
47 fc = 7.33d-09*(lum/mass)**(5.d0/7.d0)
48 tcqr = fc*q*q*raa2*raa2/(1.d0+q)
52 delet1 = 27.d0*tcqr*(1.d0+q)*raa2*(ecc/sqome2**13)*
53 & (f3 - (11.d0/18.d0)*sqome3*f4*ospin/oorb)
54 dspin = (3.d0*q*tcqr/(rg2*omecc2**6))*
55 & (f2*oorb - sqome3*f5*ospin)
56 eqspin = oorb*f2/(sqome3*f5)
57 djt = (k2*(mass-mc)*r*r + k3*rc*rc*mc)*dspin