Class eos_tov_linear (o2scl)¶
-
class eos_tov_linear : public o2scl::eos_tov¶
Linear EOS \( P = c_s^2 (\varepsilon-\varepsilon_0) \).
This implements a linear EOS with a fixed speed of sound and a fixed energy density at zero pressure. This will also compute the baryon density, if one calls set_baryon_density() to set the baryon density at one fiducial energy density.
Given a fiducial baryon density \( n_{B,1} \) at some energy density \( \varepsilon_1 \) and pressure \( P_1 = c_s^2(\varepsilon_1-\varepsilon_0) \), the baryon density is
\[ n_B = n_{B,1} \left[ \frac{\varepsilon(1+c_s^2) - c_s^2 \varepsilon_0 } {\varepsilon_1 (1 + c_s^2) - c_s^2 \varepsilon_0}\right]^{1/(1+c_s^2)} = n_{B,1} \left[ \frac{ \varepsilon + P } {\varepsilon_1 + P_1} \right]^{1/(1+c_s^2)} \]One can write the energy density as a function of the baryon density
\[ \varepsilon = \varepsilon_0 \left(\frac{c_s^2}{1+c_s^2}\right) + \left(\frac{\varepsilon_1+P_1}{1+c_s^2}\right) \left(\frac{n_B}{n_{B,1}}\right)^{1+c_s^2} \]which has the form of a constant term plus a power-law in the density with exponent \( 1+c_s^2 \). The pressure is\[ P = c_s^2 \left[\varepsilon_1 - \left(\frac{c_s^2 \varepsilon_0} {1+c_s^2}\right)\right] \left(\frac{n_B}{n_{B,1}}\right)^{1+c_s^2} - \varepsilon_0 \left(\frac{c_s^2}{1+c_s^2}\right) \]Note
AWS, 6/29/22: As can be seen from this expression, if \( \varepsilon_0 =0 \), then I don’t think one can take \( \varepsilon_1=P_1=0 \) because the baryon density does not have a finite value at that point, independent of the value of \( n_{B,1} \).
Note
Experimental
Public Functions
-
eos_tov_linear()¶
-
inline virtual ~eos_tov_linear()¶
-
void set_cs2_eps0(double cs2_, double eps0_)¶
Set the sound speed and energy density at zero pressure.
-
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_linear()¶