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

Equation of state for nuclei in statistical equilibrium. More...

Detailed Description

This class computes the composition of matter in nuclear statistical equilibrium. The chemical potential of a nucleus X with proton number $ Z_X $ and neutron number $ N_X $ is given by

\[ \mu_X = N \mu_n + Z \mu_p - E_{\mathrm{bind},X} \]

where $ \mu_n $ and $ \mu_p $ are the neutron and proton chemical potentials and $ E_{\mathrm{bind},X} $ is the binding energy of the nucleus.

The baryon number density and electron fraction are then given by

\[ n_B = n_{X} (N_X + Z_X) \qquad Y_e n_B = n_X Z_X \]

where $ n_X $ is the number density which is determined from the chemical potential above.

This implicitly assumes that the nuclei are non-interacting.

Idea for Future:
Right now calc_density() needs a very good guess. This could be fixed, probably by solving for the log(mu/T) instead of mu.

Definition at line 65 of file eos_nse.h.

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

Member Function Documentation

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.


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