Implct Integraton Henyey Method In realstc stellar evoluton codes nstead of a drect ntegraton usng for example the Runge-Kutta method one employs an teratve mplct technque. Ths s because the structure equatons have to be solved n parallel wth the energy transport equatons. If tmesteps are chosen to be small enough convergence s very rapd. It s convenent to reformulate the orgnal structure equatons as d ln r dm = 4πρr 3 ; d ln P dm = Gm 4πP r 4. In order to reduce the dynamc range of the varables we defnee x = ln r y = ln P and q = ln ρ and nput an equaton of state ρp ) or equvalently qy). We rewrte these dfferental equatons as fnte-dfference equatons to be zeroed at each poston : φ = y y + G 8π ) m 2 m2 e 2 y +y ) 2x +x ) ψ = x x 4π m m ) e 3 2 x +x ) 2 q +q ). These equatons are vald for 2 N where s the zone number and N s the number of radal) zones nto whch we dvde the star. Thus m y x are the values of the respectve varables at the outer edge of the th zone. Note that the values of m are set n advance for the star and wll not change durng the teraton. Also note how the fnte dfferencng s done so as to reduce errors: mdm = 2 dm2 2 m 2 m2 ) P = e ln P e 2 y +y ). At the nner and outer boundares these equatons must be rewrtten snce at = 0 x and at = N y. The nner boundary can be approxmated usng the ncompressble flud result P r) P c G 2 ) 4π /3 3 ρ4 cm r) 2 ; r ) 3m r) /3 4πρ c
2 whch are vald near the orgn. Thus usng the subscrpt 0 for the orgn φ = y y 0 + G ) 4π /3 M 2/3 2 3 e 4q 0/3 y 0 ; ψ = x [ ] ) 3M ln q 3 4π 0. The surface can be approxmated n several ways. For example the polytropc ndex mght be nearly constant there wth a value γ R and the mass n the outermost zone s neglgble compared to the total mass M. In fact we wll assume γ R = 4/3.) Then t s easy to show that two ndependent equatons for the behavor of P and r near the surface are GM M m r)) P = 4πr 4 P ) ρ = GM γr r ). R These lead to φ N = y N + 2 x N + x N ) ln Gm N m N m N ) ; 4π ψ N = e y N q N Gm N dq ) e x N e x ) N. dy q 0 Note that dq = γ R. Thus n total there are N values of x and y to q 0 dy solve for and we have N equatons each for φ and ψ to do t wth. Snce we want to solve φ x x y y ) = 0 and ψ x x y y ) = 0 we expand them n Taylor seres: φ + a x + b y + c x + d y = 0 ; ψ + a x + b y + c x + d y = 0 where the notaton x and y refers to the changes n the values of x and y that wll zero the φ and ψ equatons. That s we need to solve the above equatons for these s n order to determne how much the x s and y s should be changed for each teraton. The quanttes a b c and d are the dervatves a = a = φ b x = φ y ψ b x = ψ y c = φ x c = ψ x d = φ y d = ψ y.
3 These are functons of the x s and y s. These equatons are lnear n the s so we can assume x = γ α y ; x = γ α y. By substtuton and elmnaton nto the equatons for φ and ψ we fnd b γ = a α ) φ a γ ) b a α ) ψ a γ ) c b a α ) c ; b a α ) α = d b a α ) d b a α ) c b a α ) c b a α ). We also can fnd ψ a γ + c x + d y ) y = b a α. Now we are n a poston to determne new guesses from the orgnal ones. Note that r 0 = 0 mples x 0 = 0 snce the radus at the orgn s always zero. Thus we must have γ 0 = α 0 = 0. We can loop through the above equatons for γ and α to now fnd α and γ from ther values for. From the fact that the pressure vanshes on the outer boundary y N = 0 whch also mples x N = γ N. We can fnd y N n terms of x N y N and the coeffcents a N b N c N d N and then employ x N = γ N α N y N. In ths way one can loop back to fnd the remanng y s and x s. Note that ths s a form of Gaussan elmnaton. When the changes x and y become small enough we have convergence. It s mportant to note that ths s a Newton-Raphson technque and therefore ts success depends upon sutable ntal guesses. I have found that an ntal guess based upon the analytc soluton for an ncompressble gas works adequately. For the ncompressble gas we have m r) = 4πρ cr 3 ; P r) = P c 2π 3 3 Gρ2 r 2. These can be expressed also as ) 3m /3 r m) = ; P m) = P c G 2π 3mρ 2) 2/3 c. 4πρ c 3 4π The values of P c and ρ c n ths approxmaton are found from P c /ρc 4/3 = 2πG/3).75M/π) 2/3 whch follows from P m = M) = 0 combned wth the equaton of state P c ρ c ).
4 Henyey for Relatvstc Stars To nclude the effects of General Relatvty one must dstngush between the gravtatonal mass mr) and the baryon mass br) where br) s the number of baryons wthn a radus r tmes the baryon mass m B ). Because n GR the gravtatonal mass s dependent upon the local gravtatonal feld but the baryon number s an nvarant quantty we must use br) as the ndependent varable nstead of mr). The relevant equatons become d ln r 2Gm/rc 2 = db 4πnm B r 3 d ln P = G m + 4πr 3 P/c 2) ρ + P/c 2) db 4πr 4 nm B P 2Gm/rc 2 dm db = ρ 2Gm/rc nm 2. B ) Here the total mass densty s ρ = nm B + e/c 2 ) where n s the baryon densty and e s the nternal energy per baryon. Employng y = lnp/c 2 ) x = ln r and q = ln ρ wth n addton z = lnnm B ) we fnd φ =y y + G b b [ 4πc 2 + e ] 2 q +q y y ) Λ ) m + m + 4πe 3 2 x +x )+ 2 y +y ) e 2 z +z ) 2x +x ) 2 ψ =x x 4π b b ) e 3 2 x +x ) 2 z +z ) Λ χ =m m b b ) e2 q +q z z ) Λ 2) where Λ = G c 2 m + m ) e 2 x +x ). At the nner and outer boundares the frst two equatons must be replaced by equatons smlar to before but the thrd equaton s well-behaved at these boundares and does not have to be replaced. Thus at the nner
5 boundary φ =y y 0 + G πm 2 c 2 6 ψ =x [ ) ] 3m ln q 3 4π 0 χ =m b e 2 q +q 0 z z 0 ) 2G ) /3 e 4 3 q 0 y 0 + e y 0 q 0 ) + 3e y 0 q 0 ) c 2 πm 2 3 ) /3 e q 0/3 and at the outer boundary [ ] G m φ N =y N + 2 x N + x N ) ln N + m N ) b N b N ) 8π 2Gm N e x N /c 2 ψ N =e y N z N + dz ) [ 2GmN e x N /c 2 ] ln 2 dy y 0 2Gm N e x N /c 2 χ N =m N m N b N b N ) 2Gm N e x N /c 2. 3) 4) To mplement the boundary condtons t s convenent to use the lnear relaton y = γ α x β m 5) and the correspondng expresson for. At the nner boundary we must have x 0 = m 0 = 0 so y 0 = γ 0. Smlarly at the outer boundary the condton y N = 0 mples that γ N = α N = β N = 0. Therefore we seek relatons for γ α and β n terms of γ α and β. In addton we need expressons for y x and m n terms of y x and m. Therefore the recursons wll proceed oppostely to the scheme we employed for the Newtonan calculatons. We expand the functons φ ψ χ n Taylor seres n the varables y y x x m m whch wll defne the coeffcents a a a and so forth for b c d e and f: φ + a y + b x + c m + d y + e x + f m = 0 ψ + a y + b x + c m + d y + e x + f m = 0 χ + a y + b x + c m + d y + e x + f m = 0. 6)
6 We assume the lnear relaton Eq. 5) exsts among the s. One fnds the relatons γ = B Ψ BΦ + B X + γ [ b A + b A b A] B D BD + B D α = B E BE + B E B D BD + B D β = B F BF + B F B D BD + B D x = γ A Φ) y D x E m F C B C B m = ψ B φ B + γ a b a b ) y G x G m G c B c B + β a b a b ) 7) where Φ =ψ C χ C Ψ = φ C χ C X = ψ C φ C A =a C a C A = a C Ca A = a C a C B =b α a B = b α a B = b α a C =c β a C = c β a C = c β a D =d C d C D = d C d C D = d C d C E =e C e C E = e C e C E = e C e C F =f C f F = f C f F = f C f C. G =d B d B G = e B e B G = f B f B. These are supplemented by Eq. 5). 8)