- #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: