Public Member Functions | List of all members
o2scl::eos_sn_oo Class Reference

The EOS tables from O'Connor and Ott. More...

#include <eos_sn.h>

Inheritance diagram for o2scl::eos_sn_oo:

Public Member Functions

virtual void load (std::string fname, size_t mode)
 Load table from filename fname with mode mode.
- Public Member Functions inherited from o2scl::eos_sn_base
void check_composition (double &max1, double &max2)
 Check the table composition entries.
void check_free_energy (double &avg)
 Test the free energy and store results in tm. More...
virtual void beta_eq_sfixed (double nB, double entr, double &Ye, double &T)
 Compute properties of matter in beta equilibrium at fixed entropy per baryon. More...
virtual void beta_eq_Tfixed (double nB, double T, double &Ye)
 Compute the electron fraction for beta-equilibrium at fixed density and temperature temperature. More...
bool is_loaded ()
 Return true if data has been loaded.
void free ()
 Free allocated memory.
bool data_with_leptons ()
 Return true if data with lepton information has been loaded.
bool data_baryons_only ()
 Return true if data with only baryon information has been loaded.
virtual void load (std::string fname)
virtual void output (std::string fname)
void set_interp_type (size_t interp_type)
 Set the interpolation type of all the o2scl::tensor_grid3 objects to type interp_type . More...
virtual void compute_eg ()
 Compute the electron and photon contribution for the full grid. More...
virtual double check_eg ()
 Check electrons and photons. More...

Public Attributes

Additional data included in this EOS
 Speed of sound in cm^2/s^2.
 C_V in erg/g/K.
 dpderho in dyn*g/cm^2/erg
 dpdrhoe in dyn cm^3/cm^2/g
 Electron chemical potential per baryon including rest mass.
 mun - mup
 mue - mun + mup
 Helion fraction.
 Lithium-4 fraction.
 Triton fraction.
 Deuteron fraction.
std::vector< double > rho
 The original mass density grid from the table in g/cm^3.
double energy_shift
 Energy shift for table storage in erg/g.
- Public Attributes inherited from o2scl::eos_sn_base
int verbose
 Verbosity parameter (default 1)
std::vector< std::string > oth_names
 Labels for the extra data sets included in current EOS.
std::vector< std::string > oth_units
 Units for the extra data sets included in current EOS.
tensor_grid3 F
 Total free energy per baryon in MeV (without baryon rest masses but including electron rest mass) More...
tensor_grid3 Fint
 Free energy per baryon without lepton and photon contributions in MeV. More...
tensor_grid3 E
 Total internal energy per baryon in MeV (without baryon rest masses but including electron rest mass) More...
tensor_grid3 Eint
 Internal energy per baryon without lepton and photon contributions in MeV. More...
tensor_grid3 P
 Total pressure in $ \mathrm{MeV}/\mathrm{fm}^3 $.
tensor_grid3 Pint
 Pressure without lepton and photon contributions in $ \mathrm{MeV}/\mathrm{fm}^3 $.
tensor_grid3 S
 Total entropy per baryon.
tensor_grid3 Sint
 Entry per baryon without lepton and photon contributions.
tensor_grid3 mun
 Neutron chemical potential in MeV. More...
tensor_grid3 mup
 Proton chemical potential in MeV. More...
tensor_grid3 Z
 Proton number.
tensor_grid3 A
 Mass number.
tensor_grid3 Xn
 Neutron baryon fraction.
tensor_grid3 Xp
 Proton baryon fraction.
tensor_grid3 Xalpha
 Alpha particle baryon fraction.
tensor_grid3 Xnuclei
 Heavy nuclei baryon fraction.
tensor_grid3 other [30]
 Other data sets.
tensor_grid3arr [n_base+30]
 List of pointers to data.
double m_neut
 Neutron mass in $ \mathrm{MeV} $ (defaults to o2scl_mks::mass_neutron times o2scl_const::hc_mev_fm)
double m_prot
 Proton mass in $ \mathrm{MeV} $ (defaults to o2scl_mks::mass_proton times o2scl_const::hc_mev_fm)
size_t n_nB
 Size of baryon density grid.
size_t n_Ye
 Size of electron fraction grid.
size_t n_T
 Size of temperature grid.
std::vector< double > nB_grid
 Baryon density grid (in $ \mathrm{fm}^{-3} $)
std::vector< double > Ye_grid
 Electron fraction grid.
std::vector< double > T_grid
 Temperature grid (in $ \mathrm{MeV} $)
size_t n_oth
 Number of additional data sets.
boson photon
fermion electron
fermion muon
bool include_muons
 If true, include muons.
fermion_rel relf
 Relativistic fermion thermodynamics.

Static Public Attributes

Table modes
static const size_t ls_mode =0
 Use the J. Lattimer et al. method for handling the chemical potentials.
static const size_t stos_mode =1
 Use the H. Shen et al. method for handling the chemical potentials.
static const size_t hfsl_mode =2
 Set for a Hempel et al. table with light nuclei.
static const size_t sht_mode =3
 Set for a G. Shen et al. table.
- Static Public Attributes inherited from o2scl::eos_sn_base
static const size_t n_base =16
 Number of base data sets.

Additional Inherited Members

- Public Types inherited from o2scl::eos_sn_base
typedef boost::numeric::ublas::vector< double > ubvector
typedef boost::numeric::ublas::matrix< double > ubmatrix
- Protected Member Functions inherited from o2scl::eos_sn_base
void alloc ()
 Allocate memory.
- Protected Attributes inherited from o2scl::eos_sn_base
 Unit conversion object (set automatically in constructor)
bool loaded
 If true, a EOS table was successfully loaded (default false)
bool with_leptons_loaded
 True if thermodynamics with leptons has been loaded.
bool baryons_only_loaded
 True if baryon-only thermodynamics has been loaded.

Detailed Description

This class reads the HDF5 EOS tables generated by E. O'Connor and C. Ott in OConnor10. The tables are available from

and are available under a creative commons attribution-noncommercial-share alike license. This O2scl code to read those tables is licensed (along with all O2scl code) under the GPLv3 license (with permission from Evan O'Connor).

The original README file from O'Connor and Ott's EOSdriver code is available in the O2scl distribution in doc/o2scl/eos/extras/scollapse_README and is reproduced below

! #########################################################
! Copyright C. D. Ott and E. O'Connor, July 2009
! EOS constructed on the basis of the Shen et al. 1998
! relativistic-mean field nuclear EOS table. Electrons (fully
! general, based on TimmesEOS) and Photons added.
! Original Shen EOS table extent:
! Density:  10^5.1 to 10^15.4 g/cm^3
! Temperature: 0.1 to 100 MeV
! Ye: 0.01 to 0.56
! Table extent of current table
! (myshen_test_220r_180t_50y_extT_20090312.h5)
! Density: 10^3 to 10^15.36 g/cm^3
! Temperature: 0.01 to 250 MeV
! Ye: 0.015 to 0.56 MeV
! This bigger table is realized by extending the
! original Shen table in multiple ways in multiple
! directions:
! (a) density: 
! Match of pure ideal gas of Ni56 + electrons/positrons +
! photons at densities below 10^7 g/ccm -- at this density
! pressures, energies and entropies match okayish with the
! values in the Shen table. The compositions (A,Z,xh,xa,xp,xn)
! are kept constant in the low-density region and n and p
! chemical potentials are set to 0. 
! -- ideally, at low densities, a full NSE EOS with nuclear
! reaction network (at low T) should be stiched onto the
! Shen; working on that, but not yet ready.
! (b) temperature (extrapolation): 
! At high density: linear extrapolation of everything in T to lower
! temperatures and higher temperatures. At low densities (below 10^7
! g/ccm), ideal gas of Ni56 + electrons/positrons + photons.
! Variable         Units             Description
! pointsrho	   dimensionless     number of table points 
! 		   		     in log_10(rho)
! pointstemp	   dimensionless     number of table points 
! 		   		     in log_10(temp)
! pointsye         dimensionless     number of table point in Y_e
! logrho	   log10(rho)	     index variable rho
! logtemp	   log10(MeV)	     index variable temperature
! ye		   number fraction   index variable electron fraction
! Abar             A                 average heavy nucleus A
! Zbar             Z                 average heavy nucleus Z
! Xa               number fraction   alpha particle number frac
! Xh               number fraction   heavy nucleos number frac
! Xn               number fraction   neutron number frac
! Xn		   number fraction   proton number frac
! cs2              cm^2/s^2          speed of sound squared
! dedt             erg/g/K	     C_v
! dpderho	   dyn g/cm^2/erg    dp/deps|rho
! dpdrhoe	   dyn cm^3/cm^2/g   dp/drho|eps
! energy_shift     erg/g	     Energy shift for table storage
! entropy	   k_B/baryon	     specific entropy 
! gamma		   dimensionless     Gamma_1
! logenergy	   log10(erg/g)	     specific internal energy
! logpress	   log10(dyn/cm^2)   pressure
! mu_e		   MeV/baryon	     electron chemical potential
! 		   		     INCLUDING electron rest mass
! mu_p		   MeV/baryon	     proton chemical potential
! mu_n		   MeV/baryon	     neutron chemical potential
! muhat		   MeV/baryon	     mu_n - mu_p
! munu		   MeV/baryon	     mu_e - mun + mu_p
! * energy shift: 
! In some regions the negative nuclear binding energy
! is larger in magnitude than the thermal/excitation energy. In this
! case the specific internal energy (eps) becomes negative. To allow for
! storage and interpolation of eps in logarithmic fashion, the energy
! is shifted up by an energy shift specified in the variable "energy_shift".
! This energy shift is handled internally in the EOS routines.

See also the documentation at eos_sn_base and the Finite-temperature Equation of State Tables section of the User's guide.

Idea for Future:
Loading an EOS currently requires loading the HDF5 file and then copying it. This wouldn't be necessary if the O2scl tensor had the same ordering as the indices in the original HDF5 file.

Definition at line 575 of file eos_sn.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).