Naive static cold neutron star. More...
#include <nstar_cold.h>
Public Member Functions | |
Basic operation | |
void | set_eos (eos_had_base &he) |
Set the equation of state. More... | |
int | calc_eos (double np_0=0.0) |
Calculate the given equation of state. | |
double | calc_urca (double np_0=0.0) |
Compute the density at which the direct Urca process is allowe. More... | |
int | calc_nstar () |
Calculate the M vs. R curve. | |
int | fixed (double target_mass) |
Calculate the profile for a fixed gravitational mass. | |
Public Attributes | |
Default objects | |
fermion | np |
The default neutron. | |
fermion | pp |
The default proton. | |
fermion_zerot | fzt |
Zero-temperature fermion thermodynamics. | |
tov_solve | def_tov |
The default TOV equation solver. | |
root_cern | def_root |
The default equation solver for the EOS. | |
eos_tov_interp | def_eos_tov |
Default EOS object for the TOV solver. | |
Protected Member Functions | |
double | solve_fun (double x) |
Solve to ensure zero charge in ![]() | |
Protected Attributes | |
bool | eos_set |
True if equation of state has been set. | |
fermion | e |
The electron. | |
fermion | mu |
The muon. | |
eos_had_base * | hep |
A pointer to the equation of state. | |
tov_solve * | tp |
A pointer to the TOV object. | |
root * | rp |
A pointer to the solver. | |
std::shared_ptr< table_units<> > | eost |
Storage for the EOS table. | |
double | barn |
The baryon density. | |
The thermodynamic information | |
thermo | hb |
thermo | h |
thermo | l |
Output | |
bool | well_formed |
If true, the energy density of the EOS is monotonically increasing and the pressure is always positive. | |
double | pressure_dec |
The smallest baryon density where the pressure starts to decrease. More... | |
double | allow_urca |
The smallest density where Urca becomes allowed. More... | |
double | deny_urca |
The smallest density where Urca becomes disallowed. More... | |
double | acausal |
The density at which the EOS becomes acausal. More... | |
double | acausal_pr |
The pressure at which the EOS becomes acausal. More... | |
double | acausal_ed |
The energy density at which the EOS becomes acausal. More... | |
double | solver_tol |
Solver tolerance (default ![]() | |
int | verbose |
Verbosity parameter (default 0) | |
void | set_eos_table (std::shared_ptr< table_units<> > t) |
Return the results data table. More... | |
std::shared_ptr< table_units<> > | get_eos_results () |
Get the eos table (after having called calc_eos()) | |
std::shared_ptr< table_units<> > | get_tov_results () |
Get the results from the TOV (after having called calc_nstar()) | |
Configuration | |
double | nb_start |
The starting baryon density (default 0.05) | |
double | nb_end |
The final baryon density (default 2.0) | |
double | dnb |
The baryon density stepsize (default 0.01) | |
bool | include_muons |
If true, include muons (default false) | |
bool | err_nonconv |
If true, throw an exception if the solver fails or if the EOS is not well-formed (default true) | |
int | set_root (root<> &rf) |
Set the equation solver for the EOS. | |
int | set_tov (tov_solve &ts) |
Specify the object for solving the TOV equations. More... | |
This uses eos_had_base::calc_e() to compute the equation of state of zero-temperature beta-equilibrated neutron star matter and tov_solve::mvsr() to compute the mass versus radius curve.
The neutron, proton, electron and muon are given masses according to their values in o2scl_mks after a conversion to units of .
There is an example for the usage of this class given in the Cold neutron star example.
If err_nonconv is true and the solver fails, the error handler is called.
The function calc_eos() generates an object of type table_units, which contains the following columns
ed
in units of pr
in units of nb
in units of mun
in units of mup
in units of mue
in units of nn
in units of np
in units of ne
in units of kfn
in units of kfp
in units of kfe
in units of dednb_Ye
in units of dPdnb_Ye
in units of fcs2
, the squared speed of sound at fixed electron fraction, the ratio of the previous two quantitiesIf include_muons is true, the table has additional columns
mumu
in units of nmu
in units of kfmu
in units of If the energy density is always positive and increasing, and the pressure is always positive and increasing, then the EOS is well-formed and well_formed is true
. The variable pressure_dec records the lowest baryon density where the pressure decreases with increasing density. If err_nonconv is true and the EOS is not well formed, the error handler is called, and the remaining columns below are not computed.
After computing the equation of state, calc_eos() also adds the following columns
cs2
(unitless), the squared speed of sound divided by logp
, the natural logarithm of the pressure stored in pr
loge
, the natural logarithm of the energy density stored in ed
s
in units of urca
in units of ad_index
, the adiabatic index, false
, then the columns cs2
, logp
, and loge
are set to zero. The columns cs2
and ad_indes
are computing from derivatives using the current table interpolation type.The condition for the direct Urca process is the area of the triangle formed by the neutron, proton, and electron Fermi momenta. Using the definition of the semi-perimeter,
Heron's formula gives the triangle area as
The column in the eos table labeled urca
is . If this quantity is positive, then direct Urca is allowed. The variable allow_urca is the smallest density for which the direct Urca process turns on, and deny_urca is the smallest density for which the direct Urca process turns off.
The squared speed of sound (in units of ) is calculated by
and this is placed in the column labeled cs2
. If the EOS is not well-formed, then this column is set to zero. If cs2
is larger than 1, the EOS is said to be "acausal". The variables acausal, acausal_ed, and acausal_pr record the baryon density, energy density, and pressure where the EOS becomes acausal. The adabatic index is calculated by
Note that must be greater than
at the center of the neutron star for stability. (This is a necessary, but not sufficient condition.) If the EOS is not well-formed then this column is set to zero.
The TOV table contains all the columns typically generated for mass versus radius tables in tov_solve, as well as columns containing the central values of al the densities and chemical potentials, and all the other columns computed for the EOS above.
Warn if the EOS becomes pure neutron matter.
Some of the auxillary quantities can be computed directly without using the table methods and the EOS calculation would be a bit faster.
Definition at line 188 of file nstar_cold.h.
double o2scl::nstar_cold::calc_urca | ( | double | np_0 = 0.0 | ) |
This is faster than using calc_eos() since it does nothing other than computes the critical density. It does not store the equation of state.
|
inline |
This should be set before calling calc_eos().
Definition at line 200 of file nstar_cold.h.
|
inline |
This function immediately adds four constants to the table, schwarz, Msun, pi
and mproton
.
Definition at line 291 of file nstar_cold.h.
|
inline |
The default uses the low-density equation of state with tov::verbose=0. In calc_nstar(), the units are set by calling tov_solve::set_units().
Definition at line 346 of file nstar_cold.h.
double o2scl::nstar_cold::acausal |
If this is zero, then the EOS is causal at all baryon densities in the specified range
Definition at line 263 of file nstar_cold.h.
double o2scl::nstar_cold::acausal_ed |
If this is zero, then the EOS is causal at all baryon densities in the specified range
Definition at line 277 of file nstar_cold.h.
double o2scl::nstar_cold::acausal_pr |
If this is zero, then the EOS is causal at all baryon densities in the specified range
Definition at line 270 of file nstar_cold.h.
double o2scl::nstar_cold::allow_urca |
If this is zero after calling calc_eos(), then direct Urca is never allowed.
Definition at line 248 of file nstar_cold.h.
double o2scl::nstar_cold::deny_urca |
If this is zero after calling calc_eos(), then direct Urca is not disallowed at a higher density than it becomes allowed.
Definition at line 256 of file nstar_cold.h.
double o2scl::nstar_cold::pressure_dec |
If this is zero after calling calc_eos(), then the pressure does not decrease in the specified range of baryon density
Definition at line 241 of file nstar_cold.h.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).