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

Linear EOS $ P = c_s^2 (\varepsilon-\varepsilon_0) $. More...

#include <eos_tov.h>

Inheritance diagram for o2scl::eos_tov_linear:
o2scl::eos_tov

Public Member Functions

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.
 
- 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 for which the baryon density is known.
 
double cs2
 Coefficient (default 1.0)
 
double eps0
 The energy density at zero pressure (default 0.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

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 $, 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)} \]

Note
Experimental

Definition at line 374 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).