amotornenko / TOVsolver

Python package for solving TOV equation and calculating tidal properties
35 stars 10 forks source link

Gettting more mass if the central density is fixed either for maximum mass star or canonical star profiles #4

Closed hcdas closed 2 years ago

hcdas commented 2 years ago
  1. I have compiled your codes using these lines

_m_arr = [] Rarr = []

_for densc in np.logspace(-0,3.7,350): _R, M, prof = tov_s.solve(dens_c, rmax=50e5, dr=100) m_arr.append(M) R_arr.append(R) print(R, M, densc) # extra I have written to check which central density gives the maximum mass of the neutron star.

I found that the radius and central density corresponded to the maximum mass 2.1498973233892715 M_sun are

12.004 km 1076.692506643068 MeV/fm^3

  1. Now, I have fixed only this central density to check whether i am getting the same or not. But it gives me wrong values.

_R, M, prof = tovs.solve(1076.692506643068, rmax=50e5, dr=100) # 2.1498973233892715 M_sun, 12.004 km

12.004 km 4.274931084233547 M_sun

If you compare the masses there is huge differences _4.274931084233547-2.1498973233892715 = 2.125033761 Msun. But the radius is same.

  1. For arbitrary star say mass 1.3820322317287081 M_sun, the radius and central density are 13.144 km and 386.20641587213856 Mev/fm^3

_R, M, prof = tovs.solve(386.20641587213856, rmax=50e5, dr=100) # 1.3820322317287081, 13.144

print(max(prof[0]/1e5), max(prof[3]/1e33)) gives

13.144 km 2.748081260697474 M_sun

Please help me in this regard.

amotornenko commented 2 years ago

Hi @hcdas please note that Msun = 1.988435e+33 g, while you're assuming Msun = 1e33 g. This is the reason of the discrepancies.

hcdas commented 2 years ago

Many many thanks.