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

Standard polytropic EOS $ P = K \varepsilon^{1+1/n} $. More...

#include <eos_tov.h>

Inheritance diagram for o2scl::eos_tov_polytrope:

Public Member Functions

void set_coeff_index (double coeff, double index)
 Set the coefficient and polytropic index.
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.
- 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) $.

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.
double K
 Coefficient (default 1.0)
double n
 Index (default 3.0)
- Protected Attributes inherited from o2scl::eos_tov
bool baryon_column
 Set to true if the baryon density is provided in the EOS (default false)

Additional Inherited Members

- Public Attributes inherited from o2scl::eos_tov
int verbose
 Control for output (default 1)

Detailed Description

The quantity $ K $ must be in units of $ \left(M_{\odot}/km^3\right)^{-1/n} $ .

For a polytrope $ P = K \varepsilon^{1+1/n} $ beginning at a pressure of $ P_1 $, an energy density of $ \varepsilon_1 $ and a baryon density of $ n_{B,1} $, the baryon density along the polytrope is

\[ n_B = n_{B,1} \left(\frac{\varepsilon}{\varepsilon_1}\right)^{1+n} \left(\frac{\varepsilon_1+P_1}{\varepsilon+P}\right)^{n} \, . \]

Similarly, the chemical potential is

\[ \mu_B = \mu_{B,1} \left(1 + \frac{P_1}{\varepsilon_1}\right)^{1+n} \left(1 + \frac{P}{\varepsilon}\right)^{-(1+n)} \, . \]

The expression for the baryon density can be inverted to determine $ \varepsilon(n_B) $

\[ \varepsilon(n_B) = \left[ \left(\frac{n_{B,1}} {n_B \varepsilon_1} \right)^{1/n} \left(1+\frac{P_1}{\varepsilon_1}\right)-K\right]^{-n} \, . \]

Sometimes the baryon susceptibility is also useful

\[ \frac{d \mu_B}{d n_B} = \left(1+1/n\right) \left( \frac{P}{\varepsilon}\right) \left( \frac{\mu_B}{n_B}\right) \, . \]

Idea for Future:
The simple formulation fo the expressions here more than likely break down when their arguments are sufficiently extreme.

Definition at line 287 of file eos_tov.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).