Equation of state for nuclei in statistical equilibrium. More...
This class computes the composition of matter in nuclear statistical equilibrium. The chemical potential of a nucleus X with proton number and neutron number
is given by
where and
are the neutron and proton chemical potentials and
is the binding energy of the nucleus.
The baryon number density and electron fraction are then given by
where is the number density which is determined from the chemical potential above.
This implicitly assumes that the nuclei are non-interacting.
#include <eos_nse.h>
Data Structures | |
struct | solve_parms |
Parameter structure. More... | |
Public Types | |
typedef boost::numeric::ublas::vector < double > | ubvector |
typedef boost::numeric::ublas::matrix < double > | ubmatrix |
Public Member Functions | |
void | calc_mu (double mun, double mup, double T, double &nb, double &Ye, thermo &th, std::vector< nucleus > &nd) |
Calculate the equation of state as a function of the chemical potentials. More... | |
int | calc_density (double nb, double Ye, double T, double &mun, double &mup, thermo &th, std::vector< nucleus > &nd) |
Calculate the equation of state as a function of the densities. More... | |
void | set_mroot (mroot< mm_funct11, ubvector, jac_funct11 > &rp) |
Set the solver for use in computing the chemical potentials. | |
Data Fields | |
bool | err_nonconv |
If true, call the error handler if calc_density() does not converge (default true) | |
mroot_hybrids< mm_funct11, ubvector, ubmatrix, jac_funct11 > | def_root |
Default solver. | |
Protected Member Functions | |
int | solve_fun (size_t nv, const ubvector &x, ubvector &y, solve_parms &pa) |
Function to solve for baryon and charge conservation. | |
Protected Attributes | |
mroot< mm_funct11, ubvector, jac_funct11 > * | root |
Solver. | |
classical | cla |
Compute particle properties assuming classical thermodynamics. | |
int o2scl::eos_nse::calc_density | ( | double | nb, |
double | Ye, | ||
double | T, | ||
double & | mun, | ||
double & | mup, | ||
thermo & | th, | ||
std::vector< nucleus > & | nd | ||
) |
Given the baryon number density nb
, and the electron fraction Ye
and the temperature T
, this computes the composition (the individual densities are stored in the distribution nd
) and the chemical potentials are given in mun
and mup
.
This function uses the solver to self-consistently compute the chemical potentials.
void o2scl::eos_nse::calc_mu | ( | double | mun, |
double | mup, | ||
double | T, | ||
double & | nb, | ||
double & | Ye, | ||
thermo & | th, | ||
std::vector< nucleus > & | nd | ||
) |
Given mun
, mup
and T
, this computes the composition (the individual densities are stored in the distribution nd
) the baryon number density nb
, and the electron fraction Ye
.
This function does not use the solver.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).
Hosted at
.