Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
o2scl::eos_tov_buchdahl Class Reference

The Buchdahl EOS for the TOV solver. More...

#include <eos_tov.h>

Inheritance diagram for o2scl::eos_tov_buchdahl:
o2scl::eos_tov

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...
 
- Public Member Functions inherited from o2scl::eos_tov
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 $ P(\varepsilon) $.
 

Public Attributes

double Pstar
 The parameter with units of pressure in units of solar masses per km cubed (default value $ 3.2 \times 10^{-5} $ )
 
- Public Attributes inherited from o2scl::eos_tov
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.
 
- Protected Attributes inherited from o2scl::eos_tov
bool baryon_column
 Set to true if the baryon density is provided in the EOS (default false)
 

Detailed Description

Given the EOS

\[ \varepsilon = 12 \sqrt{p_{*} P}- 5 P \]

the TOV equation has an analytical solution

\[ R=(1-\beta) \sqrt{\frac{\pi}{288 p_{*} G (1-2 \beta)}} \]

where $ \beta = GM/R $.

The baryon chemical potential is

\[ \mu = \mu_1 \left[ \frac{\left(9 p_{*}-P_1\right) \left(3+t_1\right) \left(3-t_2\right)}{\left(9 p_{*}-P\right)\left(3-t_1\right) \left(3+t_2\right)}\right]^{1/4} \]

where $ t_1 = \sqrt{P}/\sqrt{p_{*}} $ and $ t_2 = \sqrt{P_1/p_{*}} $ . The baryon density can then be obtained directly from the thermodynamic identity. In the case that one assumes $ \mu_1 = m_n $ and $ P_1 = 0 $, the baryon density can be simplified to

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

c.f. Eq. 10 in Lattimer01.

The central pressure and energy density are

\[ P_c = 36 p_{*} \beta^2 \]

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

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

Based on Lattimer01 .

Todo:
Fix base EOS functions
Idea for Future:
Figure out what to do with the buchfun() function

Definition at line 157 of file eos_tov.h.

Member Function Documentation

◆ ed_nb_from_pr()

virtual void o2scl::eos_tov_buchdahl::ed_nb_from_pr ( double  pr,
double &  ed,
double &  nb 
)
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.

◆ solve_u_rp_fun()

int o2scl::eos_tov_buchdahl::solve_u_rp_fun ( size_t  bv,
const std::vector< double > &  bx,
std::vector< double > &  by 
)
protected

After solving the two equations

\begin{eqnarray*} r^{\prime} &=& r \left(1-\beta+u\right)^{-1} \left(1 - 2 \beta\right) \nonumber \\ A^2 &=& 288 \pi p_{*} G \left( 1 - 2 \beta \right)^{-1} \end{eqnarray*}

for $ u = \beta/(A r^{\prime}) \sin A r^{\prime} $ and $ r^{\prime} $, one can compute the pressure and energy density profiles

\begin{eqnarray*} 8 \pi P &=& A^2 u^2 \left(1 - 2 \beta \right) \left(1 - \beta + u \right)^{-2} \nonumber \\ 8 \pi \varepsilon &=& 2 A^2 u \left(1 - 2 \beta\right) \left(1 - \beta - 3 u/2\right) \left(1 - \beta + u \right)^{-2} \nonumber \\ \end{eqnarray*}


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).