Class eos_cs2_poly (o2scl)

O2scl : Class List

class eos_cs2_poly : public o2scl::eos_tov

An EOS based on a polynomial speed of sound.

Based on [Constantinou17].

This class constructs an EOS based on a speed of sound of the form

\[ c_s^2 = a_1 + \frac{a_2 n_B^{a_3}}{1+a_4 n_B^{a_3}} \]
where \( n_B \) is the baryon number density .

The EOS requires a hypergeometric function which only converges under specific conditions on the parameters.

Public Functions

inline eos_cs2_poly()
inline void set_nb_guess(double nb)
inline void fix_params(double nb0, double cs20, double nb1, double cs21, double a3, double a4)

Fix \( a_1 \) and \( a_2 \) based on fitting to the sound speed at two different densities.

inline void fix_integ_consts(double nb1, double mu1, double nb2, double ed2)

Fix the integration constants by specifying the chemical potential at some baryon density and the energy density at another baryon density.

inline double cs2_from_nb(double nb)

Return the squared sound speed given the baryon density in \( \mathrm{fm}^{-3} \).

inline double mu_from_nb(double nb)

Return the chemical potential in \( \mathrm{fm}^{-1} \), including the rest mass, given the baryon density in \( \mathrm{fm}^{-3} \).

inline virtual double ed_from_nb(double nb)

Return the energy density in \( \mathrm{fm}^{-4} \), including the rest mass energy density, given the baryon density in \( \mathrm{fm}^{-3} \).

inline virtual double pr_from_nb(double nb)

Return the pressure in \( \mathrm{fm}^{-4} \) given the baryon density in \( \mathrm{fm}^{-3} \).

inline double ed_from_nb_function(double ed0, double nb)

Convert ed_from_nb() into a function for the solver.

inline double pr_from_nb_function(double pr0, double nb)

Convert pr_from_nb() into a function for the solver.

inline double pr_from_ed_guess(double ed, double nb_guess_loc)

Compute the pressure from the energy density using the specified guess for the baryon density.

inline double nb_from_ed_guess(double ed, double nb_guess_loc)

Compute the baryon density from the energy density using the specified guess for the baryon density.

inline double ed_from_pr_guess(double pr, double nb_guess_loc)

Compute the energy density from the pressure using the specified guess for the baryon density.

inline double nb_from_pr_guess(double pr, double nb_guess_loc)

Compute the baryon density from the pressure using the specified guess for the baryon density.

inline virtual double pr_from_ed(double ed)

Compute the energy density from the pressure.

inline virtual double nb_from_ed(double ed)

Compute the baryon density from the energy density.

inline virtual double ed_from_pr(double pr)

Compute the energy density from the pressure.

inline virtual double nb_from_pr(double pr)

Compute the baryon density from the pressure.

inline virtual void ed_nb_from_pr(double pr, double &ed, double &nb)

Compute the energy and baryon densities from the pressure.

Protected Attributes

root_brent_gsl rbg

Solver.

double a1i

First speed of sound parameter.

double a2i

Second speed of sound parameter.

double a3i

Third speed of sound parameter.

double a4i

Fourth speed of sound parameter.

double C1

Chemical potential integration constant.

double C2

Energy density integration constant.

bool nb_guess_set

If true, then a guess for the baryon density has been given.

double nb_guess

An initial guess when solving for the baryon density.