#include <cold_nstar.h>
The electron and muon are given masses o2scl_fm_const::mass_electron and o2scl_fm_const::mass_muon, respectively.
The energy density and pressure are both calculated in units and the baryon density in
The condition for Urca 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 squared speed of sound (in units of ) is calculated by
and this is placed in the column labeled cs2
.
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.)
Note that if the speed of sound is non-monotonic, then calc_eos() will only record the lowest density for which the EOS becomes acausal.
There is an example for the usage of this class given in examples/ex_cold_nstar.cpp
.
Definition at line 100 of file cold_nstar.h.
Output | |
double | min_bad |
The smallest baryon density where the pressure decreases. | |
double | allow_urca |
The smallest density where Urca becomes allowed. | |
double | deny_urca |
The smallest density where Urca becomes disallowed. | |
double | acausal |
The density at which the EOS becomes acausal. | |
double | acausal_pr |
The pressure at which the EOS becomes acausal. | |
double | acausal_ed |
The energy density at which the EOS becomes acausal. | |
double | solver_tol |
Solver tolerance (default ![]() | |
table & | get_eos_results () |
Get the eos table (after having called calc_eos()). | |
table & | get_tov_results () |
Get the results from the TOV (after having called calc_nstar()). | |
The thermodynamic information | |
thermo | hb |
thermo | h |
thermo | l |
Basic operation | |
int | set_eos (hadronic_eos &he) |
Set the equation of state. | |
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 allowed. | |
int | calc_nstar () |
Calculate the M vs. R curve. | |
Public Member Functions | |
int | set_n_and_p (fermion &n, fermion &p) |
Set the neutron and proton. | |
int | set_tov (tov_solve &ts) |
Specify the object for solving the TOV equations. | |
int | set_root (root< int, funct< int > > &rf) |
Set the equation solver for the EOS. | |
Data Fields | |
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). | |
eff_fermion | def_n |
The default neutron. | |
eff_fermion | def_p |
The default proton. | |
tov_solve | def_tov |
The default TOV equation solver. | |
cern_mroot_root< int, funct < int > > | def_root |
The default equation solver for the EOS. | |
tov_interp_eos | def_tov_eos |
Default EOS object for the TOV solver. | |
Protected Member Functions | |
int | solve_fun (double x, double &y, int &vp) |
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. | |
hadronic_eos * | hep |
A pointer to the equation of state. | |
fermion * | np |
A pointer to the neutron. | |
fermion * | pp |
A pointer to the proton. | |
tov_solve * | tp |
A pointer to the TOV object. | |
root< int, funct< int > > * | rp |
A pointer to the solver. | |
table | eost |
Storage for the EOS table. | |
double | barn |
The baryon density. |
double 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.
int set_eos | ( | hadronic_eos & | he | ) | [inline] |
This should be set before calling calc_eos().
Definition at line 112 of file cold_nstar.h.
The default objects are of type fermion, with mass o2scl_fm_const::mass_neutron and o2scl_fm_const::mass_proton. These defaults will give incorrect results for non-relativistic equations of state.
Definition at line 234 of file cold_nstar.h.
int set_tov | ( | tov_solve & | ts | ) | [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 253 of file cold_nstar.h.
double acausal |
If this is zero, then the EOS is causal at all baryon densities in the specified range
Definition at line 187 of file cold_nstar.h.
double acausal_ed |
If this is zero, then the EOS is causal at all baryon densities in the specified range
Definition at line 203 of file cold_nstar.h.
double acausal_pr |
If this is zero, then the EOS is causal at all baryon densities in the specified range
Definition at line 195 of file cold_nstar.h.
double allow_urca |
If this is zero after calling calc_eos(), then direct Urca is never allowed.
Definition at line 170 of file cold_nstar.h.
double 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 179 of file cold_nstar.h.
double min_bad |
If this is zero after calling calc_eos(), then the pressure does not decrease in the specified range of baryon density
Definition at line 162 of file cold_nstar.h.
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page