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

The Lattimer-Swesty supernova EOS. More...

#include <eos_sn.h>

Inheritance diagram for o2scl::eos_sn_ls:
o2scl::eos_sn_base

Public Member Functions

virtual void load (std::string fname)
 Load table from filename fname.
 
virtual double check_eg ()
 Check electrons and photons. More...
 
- 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 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...
 

Public Attributes

Additional data included in this EOS
tensor_grid3fill
 Filling factor for nuclei.
 
tensor_grid3nb_in
 Baryon number density inside nuclei in $ \mathrm{fm}^{-3} $.
 
tensor_grid3dPdn
 Derivative of pressure with respect to baryon density.
 
tensor_grid3dPdT
 Derivative of pressure with respect to temperature.
 
tensor_grid3dPdY
 Derivative of pressure with respect to electron fraction.
 
tensor_grid3dsdT
 Derivative of entropy with respect to temperature.
 
tensor_grid3dsdY
 Derivative of entropy with respect to electron fraction.
 
tensor_grid3Nskin
 Number of neutrons in skin.
 
tensor_grid3nb_out
 Baryon density outside nuclei in $ \mathrm{fm}^{-3} $.
 
tensor_grid3x_out
 Proton fraction outside nuclei.
 
tensor_grid3mu
 Out of whackness parameter, $ \mu_n-\mu_p-\mu_e+1.293~\mathrm{MeV} $, in MeV.
 
- 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
 Photon.
 
fermion electron
 Electron.
 
fermion muon
 Muon.
 
bool include_muons
 If true, include muons.
 
fermion_rel relf
 Relativistic fermion thermodynamics.
 

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
 
- Static Public Attributes inherited from o2scl::eos_sn_base
static const size_t n_base =16
 Number of base data sets.
 
- Protected Member Functions inherited from o2scl::eos_sn_base
void alloc ()
 Allocate memory.
 
- Protected Attributes inherited from o2scl::eos_sn_base
convert_unitscu
 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 is experimental.

Note
O2scl Does not contain the Lattimer-Swesty EOS, only provides some code to manipulate it. This class is designed to be used with the files ls.dat, sk1.dat, ska.dat and skm.dat as provided on Jim Lattimer's website, http://www.astro.sunysb.edu/lattimer/EOS/main.html .

Note that the tables on this website are different than what is generated from the LS Fortran code. See eos_sn_oo to read O'Connor and Ott's tables generated from the LS Fortran code.

The four models are

Note
In the original table, the full internal energy per baryon (data section 4 of 26) is apparently based on a rest mass of $ Y_e m_p + (1-Y_e) m_n $, while the baryon part of the internal energy per baryon (data section 13 of 26) is based on a rest mass of $ m_n $. This means that

\[ E - E_{\mathrm{int}} = E_{\mathrm{eg}} - Y_e (m_n - m_p) \]

where $ E_{\mathrm{eg}} $ is the energy per baryon of electrons and photons. In order to keep things consistent with the other EOS tables, when the EOS table is loaded, eos_sn_base::Eint is rescaled to a rest mass of $ Y_e m_p + (1-Y_e) m_n $ .

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

See Lattimer91 and Lattimer85.

Todo:
There are still a few points for which the electron/photon EOS seems to be off, but this may be the result of small inaccuracies from finite-differencing the LS table.

Definition at line 489 of file eos_sn.h.

Member Function Documentation

◆ check_eg()

virtual double o2scl::eos_sn_ls::check_eg ( )
virtual

This checks that the electron and photon thermodynamics generated by O2scl is consistent with the data in E, Eint, F, Fint, P, Pint, S, and Sint.

Reimplemented from o2scl::eos_sn_base.


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).