#include <bps_eos.h>
This calculates the equation of state of electrons and nuclei using the approach of Baym71 (based on the discussion in Shapiro83) between about and
. Below these densities, more complex Coulomb corrections need to be considered, and above these densities, neutron drip is important.
The default mass formula is semi-empirical
where
if the nucleus is odd-odd (plus sign) or even-even (minus sign) and is zero for odd-even and even-odd nuclei. The nuclei are assumed not to contribute to the pressure. The electronic contribution to the pressure is assumed to be equal to the Fermi gas contribution plus a "lattice" contribution
This is Eq. 2.7.2 in Shapiro83. The rest mass energy of the nucleons is included in the energy density.
The original results from Baym71 are stored as a table in bps.eos. The testing code for this class compares the calculations to the table and matches to within .2 percent for the energy density and 9 percent for the pressure (for a fixed baryon number density).
Definition at line 84 of file bps_eos.h.
Public Member Functions | |
virtual | ~bps_eos () |
virtual int | calc_density (double barn, thermo &th, int &Z, int &A) |
Calculate the equation of state as a function of the baryon number density barn . | |
virtual int | calc_pressure (thermo &th, double &barn, int &Z, int &A) |
Calculate the equation of state as a function of the pressure. | |
virtual double | lattice_energy (int Z) |
The electron lattice energy. | |
virtual fermion * | get_electron () |
Get a pointer to the electron. | |
virtual double | mass_formula (int Z, int A) |
The mass formula. | |
virtual const char * | type () |
Return string denoting type ("bps_eos"). | |
int | set_mass_formula (nuclear_mass &nm) |
Set the nuclear mass formula to be used. | |
int | calc_density_fixedA (double barn, thermo &th, int &Z, int A) |
Compute the ground state assuming a fixed atomic number. | |
Data Fields | |
semi_empirical_mass | def_mass |
Default mass formula. | |
Protected Member Functions | |
virtual int | eq274 (size_t nv, const ovector_view &nx, ovector_view &ny, void *&pa) |
Solve Equation 2.7.4 for a given pressure. | |
double | gibbs (int Z, int A) |
The Gibbs free energy. | |
double | energy (double barn, int Z, int A) |
The energy density. | |
Protected Attributes | |
gsl_mroot_hybrids < void *, mm_funct < void * > > | gs |
A solver to solve Eq. 2.7.4. | |
fermion | e |
The electron thermodynamics. | |
nuclear_mass * | nmp |
The nuclear mass formula. |
virtual int calc_density | ( | double | barn, | |
thermo & | th, | |||
int & | Z, | |||
int & | A | |||
) | [virtual] |
Calculate the equation of state as a function of the baryon number density barn
.
This calculates the equation of state as a function of the baryon number density in , returning the representative nucleus with proton number
Z
and atomic number A
. The pressure and energy density are returned in th
in .
virtual int calc_pressure | ( | thermo & | th, | |
double & | barn, | |||
int & | Z, | |||
int & | A | |||
) | [virtual] |
Calculate the equation of state as a function of the pressure.
This calculates the equation of state as a function of the pressure, returning the representative nucleus with proton number Z
and atomic number A
and the baryon number density barn
in . The energy density is also returned in
in
th
.
virtual double mass_formula | ( | int | Z, | |
int | A | |||
) | [virtual] |
The mass formula.
The nuclear mass without the contribution of the rest mass of the electrons. The electron rest mass energy is included in the electron thermodynamics elsewhere.
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page