21.05.2014 Views

Tolman-Oppenheimer-Volkoff Hydrostatic Equations Presentation

Tolman-Oppenheimer-Volkoff Hydrostatic Equations Presentation

Tolman-Oppenheimer-Volkoff Hydrostatic Equations Presentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Radim Barta<br />

Phys 210


Purpose<br />

• Learn how the Runge-Kutta method works.<br />

• Write computer code for the Runge-Kutta method in<br />

Matlab (Octave) and Java<br />

• Integrate the <strong>Tolman</strong>-<strong>Oppenheimer</strong>-<strong>Volkoff</strong><br />

hydrostatic equations of a star.<br />

• Investigate how the equations are derived and look at<br />

how the state equation affects the integral.<br />

• Determine mass limits on different star types.


<strong>Tolman</strong>-<strong>Oppenheimer</strong>-<strong>Volkoff</strong> <strong>Equations</strong>


<strong>Tolman</strong>-<strong>Oppenheimer</strong>-<strong>Volkoff</strong> <strong>Equations</strong><br />

• Just some of the equations


<strong>Tolman</strong>-<strong>Oppenheimer</strong>-<strong>Volkoff</strong><br />

<strong>Equations</strong><br />

• After some equation manipulation we get the<br />

following equations, which we then integrate<br />

numerically.


Runge-Kutta Fourth Order Method<br />

x n+1 = x n + h<br />

• Most commonly used<br />

method for numerical<br />

integration<br />

• Part of a predictorcorrector<br />

group of<br />

algorithms.<br />

y n+1 = y n + (1/6)(k 1 + 2k 2 + 2k 3 + k 4 )<br />

where<br />

k 1 = h f(x n , y n )<br />

k 2 = h f(x n + h/2, y n + k 1 /2)<br />

k 3 = h f(x n + h/2, y n + k 2 /2)<br />

k 4 = h f(x n + h, y n + k 3 )


Computer Code<br />

• Matlab & Octave<br />

• Script writing<br />

• Matlab is a GUI<br />

• It can make plots<br />

• Has an extensive library<br />

• Octave doesn’t require<br />

access to hyper and runs<br />

faster<br />

while (p > 0)<br />

i = i+1;<br />

rho = rhonew;<br />

dm = dr*funmass(r,rho)<br />

m = m+dm<br />

k1 = dr*funpress(r, p, m, rho)<br />

k2 = dr*funpress(r+1/2*dr, p+1/2*k1, m, rho)<br />

k3 = dr*funpress(r+1/2*dr, p+1/2*k2, m, rho)<br />

k4 = dr*funpress(r+dr, p+k3, m, rho)<br />

pnew = p+1/6*k1+1/3*k2+1/3*k3+1/6*k4<br />

fprintf(fid,'1,,, %d,,, %f,,,<br />

%e,,, %e,,, %e,,,\n',i,r,pnew,rho,m);<br />

print(i,r,pnew,rho,m);<br />

rhonew = (pnew/C)^(1/lamda);<br />

r=r+dr;<br />

p=pnew;<br />

end;


Java<br />

• Why rewrite the program in Java?<br />

• I had Eclipse on my laptop<br />

• If written correctly the classes can be run on Linux OS<br />

and Windows<br />

• Since it is a compiled language it has the potentiel to run<br />

faster


Results


Results<br />

• The Runge-Kutta method worked well on the simple<br />

harmonic differential equations. Giving the sinusoidal<br />

curves for position and velocity with time.


What I still want to do:<br />

• Decipher what units the axis are in, and convert back<br />

to STI for comparison with real stars<br />

• Study more in depth how to choose proper state<br />

equations<br />

• And from this then be able to determine mass limits<br />

on different types of stars<br />

• Make my java program also create the plots

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!