Calculation of Neutron star pressure/mass using 4th order Runge-Kutta

In summary: There are probably other ways as well.In summary, you need to calculate rho-s, the density at the center of the neutron star, and then use 13-102 and 13-104 to calculate P and R0 and M0.
  • #1
mary1986
2
0
Hi all, this is my first post here and i apologize if some rules aren't followed.

I have to complete the Project 13.1 (studies of neutron stars: p 346-350)
http://www.cec.uchile.cl/cinetica/pcordero/MC_libros/Hjorth-Jensen2008.pdf

When browsing using pdf pages 346 to 350, assignments 1 through 9.

I am using c for solving this problem but am having problems with implementing the mass-energy density is given by a simple parametrization from Bethe and Johnson:
ρ(n) = 236 × n2.54 + nmn

here is the code: http://snipt.org/AAK4
My code is suprisingly similar, but i can't seem to figure out how the Bethe and Johnson parametrization comes in this code.

Any help is greatley appreciated
Mary
 
Last edited by a moderator:
Astronomy news on Phys.org
  • #2
What you need to do is as follows:

At each step, you know P. Given P, you can invert equation 13.104 to find n. Then you insert this value of n into equation 13.102 to find rho. This value of rho is then used in the Runge-Kutta to take the next step.

You could set up a function to calculate n given P, and another function to calculate rho given n, or you could just set up one function to calculate rho given P.

Does this help?
 
  • #3
You have helped a lot, but more questions came up.
That would mean i must start from the surface of the star where P=0,

If I was to start from center, how could I calculate pressure for the first step (at the center of neutron star)?
 
  • #4
You do want to start from the center. You assume a value for rho-s, the density at the center. Then you can calculate P at the center from 13-102 and 13-104, as well as the constants R0 and M0. Then you integrate out until P=0. This will give you values for the mass and radius of the star. You will get a family of curves with different mass and radius parameterized by the parameter rho-s.

At least, this is how I would attack it.
 
  • #5
, as a scientist, I would suggest that you review and carefully understand the Bethe and Johnson parametrization before attempting to implement it in your code. It is important to have a thorough understanding of the equations and parameters you are using in order to accurately interpret and analyze your results. Additionally, it may be helpful to consult with your colleagues or a mentor for guidance and clarification. Good luck with your project!
 

Related to Calculation of Neutron star pressure/mass using 4th order Runge-Kutta

1. What is the purpose of using 4th order Runge-Kutta method for calculating neutron star pressure/mass?

The 4th order Runge-Kutta method is a numerical technique used to solve differential equations, which are commonly used in physics and mathematics to describe the behavior of physical systems. In the case of calculating neutron star pressure/mass, this method allows us to accurately model the complex interactions between gravity, matter, and other forces that are involved in determining the pressure and mass of a neutron star.

2. How is the 4th order Runge-Kutta method applied to calculate neutron star pressure/mass?

The 4th order Runge-Kutta method involves breaking down the differential equations into smaller steps and using a set of calculations to iteratively refine the solution. In the context of calculating neutron star pressure/mass, this method involves solving the equations of hydrostatic equilibrium and general relativity using a set of four calculations at each step, resulting in a more accurate and precise solution compared to other numerical methods.

3. What factors are taken into account in the calculation of neutron star pressure/mass using 4th order Runge-Kutta?

The 4th order Runge-Kutta method takes into account various factors in the calculation of neutron star pressure/mass, including the mass and radius of the neutron star, the equation of state (which describes the relationship between pressure, density, and temperature), and the effects of general relativity on the star's structure.

4. How accurate are the results obtained from the calculation of neutron star pressure/mass using 4th order Runge-Kutta?

The 4th order Runge-Kutta method is known for its high accuracy and precision in solving differential equations. When applied to the calculation of neutron star pressure/mass, this method can provide results that are within a few percent of the true values. However, the accuracy of the results may also depend on the accuracy of the input data and the assumptions made in the calculation.

5. Are there any limitations to using the 4th order Runge-Kutta method for calculating neutron star pressure/mass?

Like any numerical method, the 4th order Runge-Kutta method has its limitations. In the context of calculating neutron star pressure/mass, this method may be limited by the assumptions made in the equations, the computational resources available, and the complexity of the system being modeled. It is important for scientists to carefully consider these limitations and assess their impact on the accuracy of the results obtained from this method.

Similar threads

  • Programming and Computer Science
Replies
15
Views
2K
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
  • Programming and Computer Science
Replies
7
Views
2K
  • Programming and Computer Science
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
4K
Replies
14
Views
4K
Replies
2
Views
2K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
10
Views
12K
  • Programming and Computer Science
Replies
19
Views
17K
Back
Top