The Buchdahl EOS for the TOV solver. More...
#include <eos_tov.h>
Public Member Functions | |
void | set_baryon_density (double nb, double ed) |
Set the baryon density. | |
virtual double | ed_from_pr (double pr) |
From the pressure, return the energy density. | |
virtual double | pr_from_ed (double ed) |
From the energy density, return the pressure. | |
virtual double | nb_from_ed (double ed) |
From the energy density, return the baryon density. | |
virtual double | nb_from_pr (double pr) |
From the pressure, return the baryon density. | |
virtual double | ed_from_nb (double nb) |
From the baryon density, return the energy density. | |
virtual double | pr_from_nb (double nb) |
From the baryon density, return the pressure. | |
virtual void | ed_nb_from_pr (double pr, double &ed, double &nb) |
Given the pressure, produce the energy and number densities. More... | |
![]() | |
bool | has_baryons () |
Return true if a baryon density is available. | |
void | check_nb (double &avg_abs_dev, double &max_abs_dev) |
Check that the baryon density is consistent with the ![]() | |
Public Attributes | |
double | Pstar |
The parameter with units of pressure in units of solar masses per km cubed (default value ![]() | |
![]() | |
int | verbose |
Control for output (default 1) | |
Protected Member Functions | |
int | solve_u_rp_fun (size_t bv, const std::vector< double > &bx, std::vector< double > &by) |
Solve to compute profiles. More... | |
Protected Attributes | |
double | nb1 |
The baryon density at ed1 . | |
double | ed1 |
The energy density for which the baryon density is known. | |
double | pr1 |
The pressure at ed1 . | |
![]() | |
bool | baryon_column |
Set to true if the baryon density is provided in the EOS (default false) | |
Given the EOS
the TOV equation has an analytical solution
where .
The baryon chemical potential is
where and
. The baryon density can then be obtained directly from the thermodynamic identity. In the case that one assumes
and
, the baryon density can be simplified to
c.f. Eq. 10 in Lattimer01.
The central pressure and energy density are
Physical solutions are obtained only for (ensuring that the argument to the square root is positive) and
(ensuring that the EOS is not acausal).
Based on Lattimer01 .
|
virtual |
If the baryon density is not specified, it should be set to zero or baryon_column should be set to false
Implements o2scl::eos_tov.
|
protected |
After solving the two equations
for and
, one can compute the pressure and energy density profiles
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).