Class eos_had_tabulated (o2scl)

O2scl : Class List

class eos_had_tabulated : public o2scl::eos_had_eden_base

Zero-temperature EOS from a table.

This assumes a symmetry energy which depends quadratically on the isospin asymmetry in order to construct an EOS from a table of baryon density and energy per baryon for both nuclear and pure neutron matter.

Note: If using a tabulated EOS to compute derivatives (like the compressibility which effectively requires a second derivative), it is important to tabulated the EOS precisely enough to ensure that the derivatives are accurate. In the case of ensuring that the compressibility at saturation density is reproduced to within 3 significant figures, the EOS should be specified with at least 6 digits of precision on a grid at least as small as 0.002 \( \mathrm{fm}^{-3} \).

Idea for Future:

Storage in a o2scl::table object isn’t necessary, and storing in a vector object is more efficient.

Allow the pressure to be specified to make the EOS more accurate?

The EOS tables

table *tnuc
table *tneut
bool one_table

If true, then tnuc and tneut point to the same table.

Strings for the column names

std::string srho_nuc
std::string srho_neut
std::string snuc
std::string sneut
inline void free_table()

Free the table memory.

inline eos_had_tabulated()
inline virtual ~eos_had_tabulated()
inline virtual int calc_e(fermion &ne, fermion &pr, thermo &th)

Equation of state as a function of density.

template<class vec_t>
inline int set_eos(size_t n, vec_t &rho, vec_t &Enuc, vec_t &Eneut)

Set the EOS through vectors specifying the densities and energies.

template<class vec_t>
inline int set_eos(size_t n_nuc, vec_t &rho_nuc, vec_t &E_nuc, size_t n_neut, vec_t &rho_neut, vec_t &E_neut)

Set the EOS through vectors specifying the densities and energies.

inline table &get_nuc_table()

Return the internal table.

inline table &get_neut_table()

Return the internal table.

Protected Attributes

bool table_alloc

True if the table has been allocated.