Class eos_tov_buchdahl (o2scl)

O2scl : Class List

class eos_tov_buchdahl : public o2scl::eos_tov

The Buchdahl EOS for the TOV solver.

The Buchdahl EOS is

\[ \varepsilon = 12 \sqrt{P_{*} P}- 5 P \]
which can be inverted to give
\[ P = - \frac{\varepsilon}{5} + \frac{72 P^{*}}{25} \left[1+\sqrt{1-\frac{5 \varepsilon}{36 P^{*}}} \right] \]

This class presumes that pressure and energy density have units of \( \mathrm{M}_{\odot}/\mathrm{km}^3 \) and that baryon number density has units of \( 1/\mathrm{fm}^{3} \).

Physical solutions are obtained only for \( P< 25 P_{*}/144 \) (ensuring that the argument to the square root is positive) and \( \beta=G M/R<1/6 \) (ensuring that the EOS is not acausal).

The (baryon) chemical potential is

\[ \mu = \mu_1 \left(\sqrt{P_1}-3\sqrt{P^{*}}\right)^{1/2} \left(\sqrt{P}-3\sqrt{P^{*}}\right)^{-1/2} \]
where \( \mu_1 \) is the chemical potential at \( P=P_1 \). The baryon density, as a function of \( P \) can be obtained from \( n_B=(\varepsilon+P)/\mu \). In O2scl, the parameters \( \mu_1 \) and \( P_1 \) are expressed in terms of the baryon density ( \( n_{B,1} \)) and energy density ( \( \varepsilon_1 \)) instead, and can be set in set_baryon_density().

Without loss of generality, one can choose \( P_1 = 0 \), leaving \( \mu_1 \), the value of the chemical potential when \( P=0 \), as the remaining parameter. In analogy to the case of nucleonic matter, one can choose \( \mu_1 = m \) where \( m \) is the nucleon mass. Then, the (baryon) number density can be simplified to

\[ n m = 12 \sqrt{P p_{*}} \left( 1-\frac{1}{3} \sqrt{P/p_{*}} \right)^{3/2} \]

see also Eq. 10 in [Lattimer01].

The mass-radius curve is the solution of the equation

\[ M = \left[ \frac{\pi}{288 p_{*} \left(1-2 \beta\right)}\right]^{1/2} \beta\left(1-\beta\right) \]
where \( \beta = GM/R \) and \( A \) (which has units of inverse km) is defined by
\[ A^2 = \frac{288 \pi G P^{*}}{1-2 \beta} \]
For a fixed gravitational mass, this equation is solved (given Pstar) to obtain the radius by the function rad_from_gm() .

The central pressure and energy density are

\[ P_c = 36 p_{*} \beta^2 \]
\[ {\varepsilon}_c = 72 p_{*} \beta (1-5 \beta/2) \]

To obtain energy density and pressure profiles can be obtained by solving

\[ r=r^{\prime} \left(\frac{1-\beta+u}{1-2 \beta}\right) \]
for the new coordinate \( r^{\prime} \) where \( u \) is defined by
\[ u = \beta \frac{\sin(A r^{\prime})}{A r^{\prime}} \]
Using these, the profiles are
\[ P(r) = A^2 (1- 2 \beta) u^2 \left[ 8 \pi \left(1 - \beta+u\right)^2\right]^{-1} \]
and
\[ \varepsilon(r) = 2 A^2 (1- 2 \beta) u \left( 1 - \beta + 3 u/2\right) \left[ 8 \pi \left(1 - \beta+u\right)^2\right]^{-1} \]

This class is based on [Lattimer01].

Note

The default tov_solve beginning and ending pressures work well for physical EOSs, but not for the Buchdahl EOS, so if you use this EOS in a tov_solve object and try to compute the M-R curve you will need to change o2scl::tov_solve::prbegin and o2scl::tov_solve::prend.

Public Functions

eos_tov_buchdahl()
inline virtual ~eos_tov_buchdahl()
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.

If the baryon density is not specified, it should be set to zero or baryon_column should be set to false

virtual double rad_from_gm(double gm)

Given the gravitational mass, compute the radius.

This function solves Eq. 10.67 in Schutz’ GR book (see also Eq. 7 in Lattimer01)

\[ M = \left[ \frac{\pi}{288 p_{*} \left(1-2 \beta\right)}\right]^{1/2} \beta\left(1-\beta\right) \]

This function can be used to determine the full mass-radius given Pstar.

virtual double ed_from_r_gm(double r, double beta)

Compute the energy density at radius r given the compactness (unitless)

virtual double pr_from_r_gm(double r, double beta)

Compute the pressure at radius r given the compactness (unitless)

virtual double exp2phi_from_r_gm(double r, double beta)

Compute \( \exp(2 \Phi) \) at radius r given the compactness (unitless)

virtual double exp2lam_from_r_gm(double r, double beta)

Compute \( \exp(2 \Lambda) \) at radius r given the compactness (unitless)

Public Members

double Pstar

The parameter with units of pressure (default is \( 3.2 \times 10^{-5}~\mathrm{M}_\odot/\mathrm{km}^3\))

double G_km_Msun

The gravitational constant in kilometers per solar mass.

Note

Make this static const

Protected Functions

virtual double solve_rad(double rad, double gm)

Solve for the radius at fixed gravitational mass.

virtual double solve_rp(double rp, double r, double beta)

Solve for \( r^{\prime} \) as a function of \( r \) at fixed gravitational mass.

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.

root_brent_gsl rbg

Solver.