Class eos_sn_oo (o2scl)

O2scl : Class List

class eos_sn_oo : public o2scl::eos_sn_base

The EOS tables from O’Connor and Ott.

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

http://stellarcollapse.org/equationofstate

and are available under a creative commons attribution-noncommercial-share alike license. This code to read those tables is licensed (along with all 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 distribution in doc/o2scl/eos/sphinx/static/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 ref eos_sn_base and the general description in 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 tensor had the same ordering as the indices in the original HDF5 file.

Additional data included in this EOS

tensor_grid3 &cs2

Speed of sound in cm^2/s^2.

tensor_grid3 &dedt

C_V in erg/g/K.

tensor_grid3 &dpderho

dpderho in dyn*g/cm^2/erg

tensor_grid3 &dpdrhoe

dpdrhoe in dyn cm^3/cm^2/g

tensor_grid3 &gamma

Gamma.

tensor_grid3 &mu_e

Electron chemical potential per baryon including rest mass.

tensor_grid3 &muhat

mun - mup

tensor_grid3 &munu

mue - mun + mup

tensor_grid3 &XHe3

Helion fraction.

tensor_grid3 &XLi4

Lithium-4 fraction.

tensor_grid3 &Xt

Triton fraction.

tensor_grid3 &Xd

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.

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.

virtual void load(std::string fname, size_t mode)

Load table from filename fname with mode mode.

virtual void load_auto(std::string model, std::string directory)

Look for EOS table for model model in directory directory and download from cloud storage if not found.

Public Functions

inline eos_sn_oo()