All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Data Structures | Public Types | Public Member Functions | Data Fields | Protected Attributes
o2scl::eos_sn_base Class Reference

A base class for the supernova EOSs [abstract]. More...

Detailed Description

This class is experimental.

See also the general description in the Equations of State for Core-Collapse Supernovae section of the User's guide.

Idea for Future:

Currently, tensor_grid objects are based on ublas vectors and thus require a copy for HDF5 output. Can tensor_grid objects be based on std::vector instead?

Add option to rescale energies and chemical potentials to different masses.

Create a o2scl::table object, possibly using tensor_grid::vector_slice.

Show how matrix_slice and vector_slice can be used with this object.

Add option to load and store a separate lepton/photon EOS

Add pions?

Create a standard output format? Output to stellarcollapse.org HDF5 format?

Definition at line 84 of file eos_sn.h.

#include <eos_sn.h>

Inheritance diagram for o2scl::eos_sn_base:
o2scl::eos_sn_hfsl o2scl::eos_sn_ls o2scl::eos_sn_oo o2scl::eos_sn_sht o2scl::eos_sn_stos

Data Structures

class  slice
 A slice of data from eos_sn_base for one index fixed. More...
 

Public Types

typedef
boost::numeric::ublas::vector
< double > 
ubvector
 
typedef
boost::numeric::ublas::matrix
< double > 
ubmatrix
 

Public Member Functions

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.
 
Interpolation
void set_interp_type (size_t interp_type)
 Set the interpolation type of all the o2scl::tensor_grid3 objects to type interp_type . More...
 

Data Fields

int verbose
 Verbosity parameter (default 1)
 
Data
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 [20]
 Other data sets.
 
tensor_grid3arr [n_base+20]
 List of pointers to data.
 
Nucleon masses
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)
 

Protected Member Functions

Memory allocation
void alloc ()
 Allocate memory.
 

Protected Attributes

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.
 

Grid and data sizes

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.
 
size_t n_oth
 Number of additional data sets.
 
static const size_t n_base =16
 Number of base data sets.
 

Electron and photon contribution

boson photon
 Photon.
 
fermion electron
 Electron.
 
fermion muon
 Muon.
 
bool include_muons
 If true, include muons.
 
fermion_rel relf
 Relativistic fermion thermodynamics.
 
int compute_eg ()
 Compute the electron and photon contribution for the full grid. More...
 

Member Function Documentation

virtual void o2scl::eos_sn_base::beta_eq_sfixed ( double  nB,
double  entr,
double &  Ye,
double &  T 
)
virtual

This function just does a simple hard-coded linear interpolation.

virtual void o2scl::eos_sn_base::beta_eq_Tfixed ( double  nB,
double  T,
double &  Ye 
)
virtual

This function just uses linear interpolation to interpolate in baryon density and temperature and the uses a quadratic to determine the minimum of the free energy.

If data_with_leptons() is false, then compute_eg() is used to compute the leptons.

void o2scl::eos_sn_base::check_free_energy ( double &  avg)

This checks that the data in Fint is consistent with that in Eint and Sint (if baryons_only_loaded is true) and that F is consistent with that in E and S (if with_leptons_loaded is true).

int o2scl::eos_sn_base::compute_eg ( )

If baryons_only_loaded is true, this function computes the data for E, P, S, and F by adding electrons and photons to the baryon contributions stored in Eint, Pint, Sint, and Fint. Otherwise, this function computes Eint, Pint, Sint, and Fint by subtracting electron and photon contributions from E, P, S, and F.

The electron contribution to the internal energy and free energy computed by this function includes the electron rest mass.

void o2scl::eos_sn_base::set_interp_type ( size_t  interp_type)
Note
This is used by the constructor to set all tensors to linear interpolation.

Field Documentation

tensor_grid3 o2scl::eos_sn_base::E

By default, this energy is relative to

\[ m_n (1-Y_e) + m_p Y_e \]

where $ m_n $ is stored in m_neut and $ m_p $ is stored in m_prot .

Definition at line 143 of file eos_sn.h.

tensor_grid3 o2scl::eos_sn_base::Eint

By default, this energy is relative to

\[ m_n (1-Y_e) + m_p Y_e \]

where $ m_n $ is stored in m_neut and $ m_p $ is stored in m_prot .

Definition at line 154 of file eos_sn.h.

tensor_grid3 o2scl::eos_sn_base::F

By default, this energy is relative to

\[ m_n (1-Y_e) + m_p Y_e \]

where $ m_n $ is stored in m_neut and $ m_p $ is stored in m_prot .

Definition at line 121 of file eos_sn.h.

tensor_grid3 o2scl::eos_sn_base::Fint

By default, this energy is relative to

\[ m_n (1-Y_e) + m_p Y_e \]

where $ m_n $ is stored in m_neut and $ m_p $ is stored in m_prot .

Definition at line 132 of file eos_sn.h.

tensor_grid3 o2scl::eos_sn_base::mun

By default this is relative to the neutron mass in m_neut .

Definition at line 170 of file eos_sn.h.

tensor_grid3 o2scl::eos_sn_base::mup

By default this is relative to the proton mass in m_prot .

Definition at line 176 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).
Hosted at Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads..