Class eos_tov_polytrope (o2scl)¶
-
class eos_tov_polytrope : public o2scl::eos_tov¶
Polytropic EOS \( P = K \varepsilon^{1+1/n} \).
This class can handle any units for \( P \), \( \varepsilon \) and \( n_B \) as long as they are consistent. However, this class can only be used in o2scl::tov_solve and o2scl::tov_love if \( P \) and \( \varepsilon \) are in units of \( \mathrm{M}_{\odot}/\mathrm{km}^3 \) and \( n_B \) is in units of \( 1/\mathrm{fm}^{3} \).
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} \, . \]The baryon susceptibility is\[ \frac{d \mu_B}{d n_B} = \left(1+1/n\right) \left( \frac{P}{\varepsilon}\right) \left( \frac{\mu_B}{n_B}\right) \, . \]Todo
In eos_tov_polytrope, document the behavior of the baryon density in the small energy density limit
Note
Polytropes in Newtonian gravity are often written in terms of the number density rather than, as this class does, in terms of the energy density. This distinction is noticable in neutron star structure.
Note
Negative values of \( n \) are allowed, but these cannot be used at low energy densities because they imply baryon densities which are non-zero when the energy density and pressure vanish. Also, this class may have difficulty when \( n \) is near zero.
Public Functions
-
eos_tov_polytrope()¶
-
inline virtual ~eos_tov_polytrope()¶
-
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.
-
eos_tov_polytrope()¶