1 subroutine hut(es0,spin10,spin20,ecc,spin1,spin2,nsteps,dtau)
3 implicit real*8 (a-h,o-z)
12 * include step reduction for large de/dt or primary spin rate.
14 1
IF (abs(udot(1))*dtau.GT.0.01*max(es0,0.01d0))
THEN
21 2
IF (abs(udot(2))*dtau.GT.0.01*u(2).AND.u(2).GT.0.1)
THEN
28 * treat large eccentricity carefully for rapid spin change.
29 IF (es0.GT.0.9995.and.
30 & abs(udot(2))*dtau.GT.0.01*u(2).AND.u(2).GT.0.1)
THEN
37 WRITE (96,3) nsteps, it, u, udot, dtau
38 3
FORMAT (
' HUT REDUCE # IT u ud dt ',i6,i3,f8.4,1p,7e9.1)
43 *
Save spins in
case eccentricity goes negative.
47 * note there are 4 calls to
deriv2 when u(1) may go negative.
48 IF (u(1).lt.0.002.or.u(1).gt.0.99999)
then
49 * enforce circularization by adopting e=0.00199 and copying spins.
50 IF (u(1).LT.0.0)
WRITE (6,4) i, nsteps, u(1)
51 4
FORMAT (
' HUT SAFETY EXIT! I nsteps u1 ',2i5,f8.4)
67 * runge-kutta integrator.
68 * -----------------------
70 * author: rosemary mardling(3/98).
73 implicit real*8 (a-h,o-z)
74 real*8 u0(n),ut(n),du(n),u(n)
97 ut(i)=ut(i)+b(j)*du(i)
109 implicit real*8 (a-h,m,o-z)
111 common/spins/angmom0,rg2(2),m21,r21,semi0,c1,c2,c3,c4,c5,semi
125 f2=1+7.5*e2+5.625*e4+0.3125*e6
126 f3=1+3.75*e2+1.875*e4+0.078125*e6
130 semi=angmom0-rg2(1)*spin1-m21*r21**2*rg2(2)*spin2
131 semi=(semi*(1+m21)/m21/semi0**2)**2/fac
134 if(e.le.0.0.or.e.ge.1.0.or.oa.lt.0.0)
then
139 udot(1)=-oa**8*(e/fac**6.5)*(
140 & c1*(f3-(11./18.)*fac**1.5*f4*spin1/oa**1.5)+
141 & c2*(f3-(11./18.)*fac**1.5*f4*spin2/oa**1.5))
142 udot(2)=(oa/fac)**6*c3*(oa**1.5*f2-fac**1.5*f5*spin1)
143 udot(3)=(oa/fac)**6*c4*(oa**1.5*f2-fac**1.5*f5*spin2)
145 if (e.lt.0.002.and.semi.lt.0.0d0) semi=semi1
148 *
IF (ic.EQ.1.OR.mod(ic,10000).EQ.0)
THEN
149 *
WRITE (6,1) ic, e, spin1, spin2, udot
150 * 1
FORMAT (
' HUT DERIV # e s1 s2 udot ',i10,f8.4,1p,5e9.1)