#include <tov_eos.h>
Internally, energy and pressure are stored in units of solar masses per cubic kilometer and baryon density is stored in units of fm^{-3}. The user-specified EOS table is left as is, and unit conversion is performed as needed in get_eden() and other functions so that results are returned in the units specified by set_units().
The function set_units() needs to be called before either of the functions get_eden() or get_eden_ld() are called. The function set_units() may be called after calling either the read_table() functions or the set_low_density_eos() function.
Definition at line 118 of file tov_eos.h.
Public Member Functions | |
virtual int | get_eden (double pres, double &ed, double &nb) |
Given the pressure, produce the energy and number densities. | |
virtual int | get_eden_user (double pres, double &ed, double &nb) |
Given the pressure, produce the energy and number densities from the user-specified EOS. | |
virtual int | get_eden_ld (double pres, double &ed, double &nb) |
Given the pressure, produce the energy and number densities from the low-density EOS. | |
virtual int | get_aux (double P, size_t &nv, ovector_base &auxp) |
Given the pressure, produce all the remaining quantities. | |
virtual int | get_names (size_t &np, std::vector< std::string > &pnames) |
Fill a list with strings for the names of the remaining quanities. | |
int | read_table (table &eosat, std::string s_cole="ed", std::string s_colp="pr", std::string s_colnb="nb") |
Specify the EOS through a table. | |
int | read_table_file (std::string eosfn, std::string s_cole="ed", std::string s_colp="pr", std::string s_colnb="nb") |
Specify the EOS through a table in a file. | |
int | set_low_density_eos (bool s_ldeos, std::string s_nvpath, int s_nvcole=0, int s_nvcolp=1, int s_nvcolnb=2) |
Set the low-density EOS. | |
int | set_units (double s_efactor, double s_pfactor, double s_nfactor) |
Set the units of the user-specified EOS. | |
int | set_units (std::string leunits="", std::string lpunits="", std::string lnunits="") |
Set the units of the user-specified EOS. | |
int | get_transition (double &plow, double &ptrans, double &phi) |
Return limiting and transition pressures. | |
int | set_transition (double ptrans, double pw) |
Set the transition pressure and "width". | |
Protected Member Functions | |
int | check_eos () |
Check that the EOS is valid. | |
void | interp (const ovector_base &x, const ovector_base &y, double xx, double &yy, int n1, int n2) |
Linear EOS interpolation. | |
Protected Attributes | |
base_ioc | bio |
A base I/O object for reading EOSs. | |
table_units_io_type | table_units_io |
For reading the table. | |
Low-density EOS | |
bool | ldeos |
true if we are using the low-density eos (false) | |
bool | ldeos_read |
Low-density EOS switch. | |
std::string | ldpath |
the path to the low-density EOS | |
int | ldcole |
column in low-density eos for energy density | |
int | ldcolp |
column in low-density eos for pressure | |
int | ldcolnb |
column in low-density eos for baryon density | |
table_units * | ld_eos |
file containing low-density EOS | |
double | presld |
highest pressure in low-density EOS | |
double | eld |
highest energy density in low-density EOS | |
double | nbld |
highest baryon density in low-density EOS | |
double | prest |
Transition pressure. | |
double | pwidth |
Transition width. | |
User EOS | |
table * | eost |
file containing eos | |
int | nfile |
number of lines in eos file | |
int | cole |
column for energy density in eos file | |
int | colp |
column for pressure in eos file | |
int | colnb |
column for baryon density in eos file | |
bool | eos_read |
True if an EOS has been specified. | |
Units | |
std::string | eunits |
Units for energy density. | |
std::string | punits |
Units for pressure. | |
std::string | nunits |
Units for baryon density. | |
double | efactor |
unit conversion factor for energy density (default 1.0) | |
double | pfactor |
unit conversion factor for pressure (default 1.0) | |
double | nfactor |
unit conversion factor for baryon density (default 1.0) |
int get_transition | ( | double & | plow, | |
double & | ptrans, | |||
double & | phi | |||
) |
Return limiting and transition pressures.
Returns, in order:
int set_transition | ( | double | ptrans, | |
double | pw | |||
) |
Set the transition pressure and "width".
Sets the transition pressure and the width (specified as a number greater than unity in pw
) of the transition between the two EOSs. The transition is done smoothly using linear interpolation between and
.
bool ldeos_read [protected] |
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page