Solve TOV Equation
Function to solve the TOV equation from EOS equation of state given by user.
- TOVsolver.solver_code.TOV_def(r, y, inveos, ad_index)[source]
a function that packing the whole TOV equations set
- Parameters:
r (float) – raius as integrate varible
y (psudo-varible) – containing pressure, mass, h and b as intergarte varibles
equation (to solve out the TOV)
inveos – the invert of the eos, pressure and energy density relation to integrate
interpolate. (and)
- Returns:
The array that contains all the Stars’ masses, in M_sun as a Units. Radius (array): The array that contains all the Stars’s radius, in km. Tidal Deformability (array): The array that contains correpsonding Tidal property, These are dimension-less.
- Return type:
Mass (array)
- TOVsolver.solver_code.m1_from_mc_m2(mc, m2)[source]
a function that feed back the companion star mass from GW event measurement.
- Parameters:
mc (float) – chrip mass of a GW event, unit in solar mass.
m2 (float or numpy array) – the determined mass for one of the star, this
EoS. (is computed from sampling of)
- Returns:
the companion star mass in solar mass.
- Return type:
m1 (float or numpy array)
- TOVsolver.solver_code.solveTOV(center_rho, Pmin, eos, inveos)[source]
Solve TOV equation from given Equation of state in the neutron star core density range
- Parameters:
center_rho (array) – This is the energy density here is fixed in main
[10**14.3 (that is range)
unit.g_cm_3 (10**15.6] *)
Pmin (float) – In unit.G / unit.c**4
eos (function) – pressure vs. energy density, energy density in unit.G / unit.c**2, pressure in unit.G / unit.c**4
inveos (function) – energy density vs. pressure
- Returns:
The Stars’ masses Radius (float): The Stars’s radius
- Return type:
Mass (float)
- TOVsolver.solver_code.solveTOV_tidal(center_rho, energy_density, pressure)[source]
Solve TOV equation from given Equation of state in the neutron star core density range
- Parameters:
center_rho (array) – This is the energy density here is fixed in main
np.logspace (that is)
energy_density (array) – Desity array of the neutron star EoS, in MeV/fm^{-3}
simiplicity (Notice here for)
magnitude (we omitted G/c**4)
so
MeV/fm^{-3})*G/c**4 ((value in)
are (could convert to the energy density we)
using
magnitude. (please check the Test_EOS.csv to double check the order of)
pressure (array) – Pressure array of neutron star EoS, also in nautral unit
MeV/fm^{-3} (with)
Test_EOS.csv (still please check the)
is (the conversion)
dyn/cm3)*G/c**4. ((value in)
- Returns:
The array that contains all the Stars’ masses, in M_sun as a Units. Radius (array): The array that contains all the Stars’s radius, in km. Tidal Deformability (array): The array that contains correpsonding Tidal property, These are dimension-less.
- Return type:
Mass (array)
- TOVsolver.solver_code.tidal_deformability(y2, Mns, Rns)[source]
Compute Tidal deformability from y2, neutron star mass and raius
- Parameters:
y2 (array) – midiate varrible that computing tidal
Mns (array) – neutron star mass in g/cm3
Rns (array) – neutron star radius in cm.
- Returns:
neutron star tidal deformability with unit-less.
- Return type:
tidal_def (array)