You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Outputs the maxium central density of a stable EoS
8
-
Args:
9
-
energy_density (numpy 1Darray): Density of EoS
10
-
pressure (numpy 1Darray): Pressure of EoS
11
-
central_densitys (numpy 1Darray): The range of central density
12
-
num2 (int): The number of segments in the density interval of second search. At least 5 points
13
-
Returns:
14
-
density (float): The maxium central density, in unit.g_cm_3
15
-
"""
16
-
############## Below is the main part of two searches for peaks
17
-
######## First search
18
-
Ms= [-1,-2] # Meaningless initialization, only to ensure that the following 'if (i>0) and (Ms [-1]<=Ms [-2])' statements can run properly
19
-
store_d_range= [central_densitys[-2], central_densitys[-1]] # When the following loop does not output a result, initialization here will have its meaning
20
-
# Find the extremum point within the predetermined range of central density and return the central density near the extremum point
21
-
fori, rhoinenumerate(central_densitys):
22
-
M, R=OutputMR('', energy_density, pressure, [rho])[0]
tol_for_rho (float): Relative tolerance of the density
59
18
threshold_R (float): Threshold of Radius. Once the minmum Radius of the star is lager than the value of threshold, it means the results are very unphysical
60
19
Returns:
61
-
density (float): The maxium central density, in unit.g_cm_3
20
+
density (float): The maxium central density, in g_cm_3
62
21
mass_large (float): The maximum mass, in mass of sun
63
22
radius_small (float): The corresponding radius of the maximum mass, in km
# Since the refinement calculation is carried out on the basis of the previous stage, if d2_min is continuously performed, The operation of d2_max=query_nearest-values (* paras_for_strink_0) is actually cumbersome
156
-
Ms.insert(3, result["M"]) # Insert a point into Ms with 4 points
115
+
Ms.insert(3, result[0]) # Insert a point into Ms with 4 points
# Note that the useful accumulation amounts here are 0 and 4 points, and the point to be calculated is on the left side of the middle, so we take Cumul_rho2s
# Note that the useful accumulation amounts here are 0 and 4 points, and the point to be calculated is on the left side of the middle, so we take Cumul_rho2s
"""Solve TOV equation from given Equation of state in the neutron star
159
-
core density range
153
+
"""Solve TOV equation from given Equation of state in the neutron star core density range
160
154
161
155
Args:
162
-
center_rho(array): This is the energy density here is fixed in main
163
-
that is np.logspace(14.3, 15.6, 50)
164
-
energy_density (array): Desity array of the neutron star EoS, in MeV/fm^{-3}
165
-
Notice here for simiplicity, we omitted G/c**4 magnitude, so
166
-
(value in MeV/fm^{-3})*G/c**4, could convert to the energy density we are
167
-
using, please check the Test_EOS.csv to double check the order of magnitude.
168
-
169
-
pressure (array): Pressure array of neutron star EoS, also in nautral unit
170
-
with MeV/fm^{-3}, still please check the Test_EOS.csv, the conversion is
171
-
(value in dyn/cm3)*G/c**4.
156
+
center_rho(array): This is the energy density here is fixed in main that is np.logspace(14.3, 15.6, 50)
157
+
energy_density (array): Desity array of the neutron star EoS, in MeV/fm^{-3}. Notice here for simiplicity, we omitted G/c**4 magnitude, so (value in MeV/fm^{-3})*G/c**4, could convert to the energy density we are using, please check the Test_EOS.csv to double check the order of magnitude.
158
+
pressure (array): Pressure array of neutron star EoS, also in nautral unit with MeV/fm^{-3}, still please check the Test_EOS.csv, the conversion is (value in dyn/cm3)*G/c**4.
172
159
173
160
Returns:
174
-
Mass (array): The array that contains all the Stars' masses, in M_sun as a
175
-
Units.
161
+
Mass (array): The array that contains all the Stars' masses, in M_sun as a Units.
176
162
Radius (array): The array that contains all the Stars's radius, in km.
177
-
Tidal Deformability (array): The array that contains correpsonding Tidal property,
178
-
These are dimension-less.
163
+
Tidal Deformability (array): The array that contains correpsonding Tidal property, These are dimension-less.
179
164
"""
180
165
# eos = UnivariateSpline(np.log10(eps), np.log10(pres), k=1, s=0)
0 commit comments