All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Protected Member Functions | Protected Attributes
o2scl::nstar_cold Class Reference

Naive static cold neutron star. More...

Detailed Description

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 electron and muon are given masses o2scl_mks::mass_electron and o2scl_mks::mass_muon, after a conversion to units of $ 1/\mathrm{fm} $.

There is an example for the usage of this class given in the Cold neutron star example.


EOS Output

The function calc_eos() generates an object of type table_units, which contains the following columns

If include_muons is true, the table has additional columns

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_flat records the lowest baryon density where the pressure decreases with increasing density.

After computing the equation of state, calc_eos() also adds the following columns

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,

\[ s \equiv \left( k_{F,n}+k_{F,p}+k_{F,e} \right)/2 \]

Heron's formula gives the triangle area as

\[ a=\sqrt{s(s-k_{F,n})(s-k_{F,p})(s-k_{F,e})} \, . \]

The column in the eos table labeled urca is $ a^2 $ . 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 $ c $ ) is calculated by

\[ c_s^2 = \frac{ d P }{d \varepsilon} \]

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

\[ \Gamma = \frac{ d \ln P} { d \ln \varepsilon} \]

Note that $ \Gamma $ must be greater than $ 4/3 $ 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.


TOV Output

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.


Idea for Future:
Warn if the EOS becomes pure neutron matter.

Definition at line 163 of file nstar_cold.h.

#include <nstar_cold.h>

Public Member Functions

Basic operation
void set_eos (eos_had_base &he)
 Set the equation of state. More...
 
void 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...
 
void calc_nstar ()
 Calculate the M vs. R curve.
 
void fixed (double target_mass)
 Calculate the profile for a fixed gravitational mass.
 

Data Fields

Default objects
fermion def_n
 The default neutron.
 
fermion def_p
 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 $ \beta $-equilibrium.
 

Protected Attributes

bool eos_set
 True if equation of state has been set.
 
fermion e
 The electron.
 
fermion mu
 The muon.
 
eos_had_basehep
 A pointer to the equation of state.
 
fermionnp
 A pointer to the neutron.
 
fermionpp
 A pointer to the proton.
 
tov_solvetp
 A pointer to the TOV object.
 
rootrp
 A pointer to the solver.
 
o2_shared_ptr< table_units
<> >::type 
eost
 Storage for the EOS table.
 
double barn
 The baryon density.
 
The thermodynamic information
thermo hb
 
thermo h
 
thermo l
 

Output

bool solver_success
 If true, the last call of calc_eos() succeeded.
 
bool well_formed
 If true, the energy density of the EOS is monotonically increasing and the pressure is always positive.
 
double pressure_flat
 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 $ 10^{-4} $)
 
int verbose
 Verbosity parameter (default 0)
 
o2_shared_ptr< table_units
<> >::type 
get_eos_results ()
 Get the eos table (after having called calc_eos())
 
o2_shared_ptr< table_units
<> >::type 
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 calculation fails (default true)
 
int set_n_and_p (fermion &n, fermion &p)
 Set the neutron and proton. More...
 
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...
 

Member Function Documentation

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.

void o2scl::nstar_cold::set_eos ( eos_had_base he)
inline

This should be set before calling calc_eos().

Definition at line 175 of file nstar_cold.h.

int o2scl::nstar_cold::set_n_and_p ( fermion n,
fermion p 
)
inline

The default objects are of type fermion, with mass o2scl_mks::mass_neutron and o2scl_mks::mass_proton. These defaults will give incorrect results for non-relativistic equations of state.

Definition at line 306 of file nstar_cold.h.

int o2scl::nstar_cold::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 325 of file nstar_cold.h.

Field Documentation

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 241 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 255 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 248 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 226 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 234 of file nstar_cold.h.

double o2scl::nstar_cold::pressure_flat

If this is zero after calling calc_eos(), then the pressure does not decrease in the specified range of baryon density

Definition at line 219 of file nstar_cold.h.


The documentation for this class was generated from the following file:

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).
Hosted at Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads..