Numerical Integration of Chandrasekhar's Equation

In summary: Looks like it produces a density plot, but I need to vary zc to suit the WD mass.Also my mass isn't plotting anything.This was mostly python issues, and not issues with the physics itself.
  • #1
vmr101
Gold Member
25
1

Homework Statement


We need to write an integrator for the Chandrasekhars Equation (CE) for White Dwarfs (WD) using python3/NumPy/Matplotlib. We then need to compute the structure of a WD made of our varying elements. We also need to compute and plot the mass-radius relation for WD.

Homework Equations


We are given equations for C1, C2, K, eta, alpha, Radius, Mass and density.
rho = C2*x3=C2*zc3(phi2-1/(zc2))3/2

The Attempt at a Solution


I have never used python3 before so this is a bit of a challenge.
My script sets up all the constants and variables, sets up the arrays.
#then uses the initial conditions and sets an array for the ce
#then sets the integrator as rk4
#then integrates the CE
#calculates rho, alpha, p, temp, r
M = ((4*pi)/c2**2)*(((2*c1)/(pi*G))**(3/2))*((-x**2)*y[:,0])
#Plot r vs rho, r vs temp etc..

I need to figure out where to vary zc to find a certain WD mass
Any suggestions would be much appreciated.
 
Last edited:
Physics news on Phys.org
  • #2
vmr101 said:

Homework Statement


We need to write an integrator for the Chandrasekhars Equation (CE) for White Dwarfs (WD) using python3/NumPy/Matplotlib. We then need to compute the structure of a WD made of our varying elements. We also need to compute and plot the mass-radius relation for WD.

Homework Equations


We are given equations for C1, C2, K, eta, alpha, Radius, Mass and density.
rho = C2*x3=C2*zc3(phi2-1/(zc2))3/2

The Attempt at a Solution


I have never used python3 before so this is a bit of a challenge.
My script sets up all the constants and variables, sets up the arrays.
ce1 = functools.partial(le.ce,zc=zc) #this uses the initial conditions and sets an array for the ce
a = functools.partial(le.rk4,h=h) #this sets the integrator as rk4
x, y = le.integrate(ce1,x,y,a,t,zc) #this integrates the CE

rho = c2*zc**3*(y[:,0]**2 -1/zc**2)**(3/2)
alpha = ((2*c1)/(pi*G))**(1/2) * 1/(c2*zc)
pr = K*rho**gamma
temp = (pr*mewe)(rho/Rgas) ##error here
r = alpha*x
M = ((4*pi)/c2**2)*(((2*c1)/(pi*G))**(3/2))*((-x**2)*y[:,0])
Mmax = 4*pi*(2.01824)*(K/pi*G)**(3/2)
#Plot r vs rho, r vs temp etc..

Any suggestions would be much appreciated.
Your line where you have "this is where I get my error" needs a phi^2 in place of the ## (1/zc)^2 ##.
 
  • #3
Charles Link said:
Your line where you have "this is where I get my error" needs a phi^2 in place of the ## (1/zc)^2 ##.
I just noticed and updated this too! Thanks for confirming it for me.

Looks like it produces a density plot, but I need to vary zc to suit the WD mass.
Also my mass isn't plotting anything.
 

Attachments

  • rho.pdf
    14.1 KB · Views: 300
Last edited:
  • #4
This was mostly python issues, and not issues with the physics itself.
I managed to work through it.
 

Related to Numerical Integration of Chandrasekhar's Equation

What is Chandrasekhar's equation and why is it important?

Chandrasekhar's equation is a mathematical equation developed by Indian astrophysicist Subrahmanyan Chandrasekhar. It is used to calculate the maximum mass of a stable white dwarf star. This equation is important because it provides a fundamental understanding of the structure and evolution of stars.

What is numerical integration and how is it used to solve Chandrasekhar's equation?

Numerical integration is a method of approximating a definite integral using numerical techniques. In the case of Chandrasekhar's equation, it is used to solve the equation by discretizing it into smaller, more manageable parts and using numerical methods to approximate the solution.

What are the challenges in numerical integration of Chandrasekhar's equation?

One of the main challenges in numerical integration of Chandrasekhar's equation is the complexity of the equation itself. It involves multiple variables and parameters which can make the integration process computationally expensive. Additionally, the numerical methods used for integration must be carefully chosen to ensure accurate and stable results.

What are some applications of numerical integration of Chandrasekhar's equation?

The numerical integration of Chandrasekhar's equation has many practical applications in astrophysics. It is used to study the structure and evolution of white dwarf stars, which are important objects in our universe. It also has applications in other areas such as nuclear physics and cosmology.

What advancements have been made in numerical integration of Chandrasekhar's equation?

Over the years, various numerical methods have been developed and improved for solving Chandrasekhar's equation. These include adaptive integration methods, higher-order accuracy methods, and parallel computing techniques. These advancements have allowed for more accurate and efficient solutions to be obtained for this important equation.

Similar threads

Replies
1
Views
930
  • Advanced Physics Homework Help
Replies
1
Views
686
Replies
2
Views
464
  • Advanced Physics Homework Help
Replies
7
Views
1K
  • Advanced Physics Homework Help
Replies
4
Views
1K
  • Advanced Physics Homework Help
Replies
7
Views
2K
Replies
5
Views
399
  • Advanced Physics Homework Help
Replies
6
Views
1K
  • Advanced Physics Homework Help
Replies
4
Views
3K
  • Advanced Physics Homework Help
Replies
4
Views
2K
Back
Top