A container for the properties of dense matter at a specified baryon density, electron fraction and temperature. More...
#include <nucmass_densmat.h>
Public Types | |
typedef boost::numeric::ublas::vector< double > | ubvector |
Public Member Functions | |
dense_matter () | |
Constructor. More... | |
dense_matter (const dense_matter &dm) | |
Copy constructor. | |
dense_matter & | operator= (const dense_matter &dm) |
Copy constructor with operator=() | |
void | output (std::ostream &out, int verbose=1) |
double | average_a () |
Compute an average inter-ionic spacing. More... | |
double | average_A () |
Compute the number-averaged mass number. More... | |
double | nn_tot () |
Compute total density of neutrons. | |
double | np_tot () |
Compute total density of protons. | |
double | average_N () |
Compute the number-averaged neutron number. More... | |
double | average_Z () |
Compute the number-averaged proton number. More... | |
double | impurity () |
Compute the impurity parameter. More... | |
double | baryon_density_nuclei () |
Compute the baryon density in nuclei. More... | |
double | baryon_density () |
Compute the total baryon density. More... | |
double | electron_fraction () |
Compute the electron fraction. More... | |
bool | nuc_in_dist (int Z, int N, size_t &index) |
Return true if nucleus (Z,N) is in the distribution and store it's index in index . More... | |
void | prune_distribution (double factor) |
Remove nuclei from the distribution which have a small density. More... | |
void | copy_densities_from (dense_matter &dm2) |
Copy densities from those stored in another dense_matter object. More... | |
Public Attributes | |
double | T |
Temperature (in ![]() | |
double | nB |
Baryon number density (in ![]() | |
double | Ye |
Electron fraction. | |
o2scl::fermion | n |
Neutrons. | |
o2scl::fermion | p |
Protons. | |
o2scl::fermion | e |
Electrons. | |
o2scl::fermion | mu |
Muons. | |
o2scl::boson | photon |
Photons. | |
std::vector< o2scl::nucleus > | dist |
Distribution of nuclei. | |
double | eta_n |
Neutron chemical potential. | |
double | eta_p |
Proton chemical potential. | |
ubvector | eta_nuc |
Nuclear chemical potentials. | |
o2scl::thermo | th |
Total thermodynamic quantities. | |
o2scl::thermo | drip_th |
Thermodynamic quantities for dripped particles. | |
This class is experimental.
By default, the rest mass is not included in the neutron, or the proton. It is, however, included in the electron. Note that the values of nB and Ye need not always correspond exactly to the values returned by baryon_density() and electron_fraction(). This design enables this object to refer to the composition while some algorithm is matching to a fixed baryon density and electron fraction. Note also that the chemical potentials in eta_n, eta_p, and eta_nuc may contain corrections from heterogeneous matter which are not typically included in the values in o2scl::part::mu which only contain the homogeneous parts.
Definition at line 65 of file nucmass_densmat.h.
o2scl::dense_matter::dense_matter | ( | ) |
This constructor automatically sets the neutron, proton, and electron masses.
double o2scl::dense_matter::average_a | ( | ) |
This function returns
double o2scl::dense_matter::average_A | ( | ) |
This function returns .
double o2scl::dense_matter::average_N | ( | ) |
This function returns .
double o2scl::dense_matter::average_Z | ( | ) |
This function returns .
double o2scl::dense_matter::baryon_density | ( | ) |
This function returns .
double o2scl::dense_matter::baryon_density_nuclei | ( | ) |
This function returns .
void o2scl::dense_matter::copy_densities_from | ( | dense_matter & | dm2 | ) |
This function sets all nuclear densities to zero and then, for each nucleus in the distribution, looks for the same nucleus in dm2
. If the nucleus is found in dm2
, its density is copied over, otherwise its density is left at zero. This is a brute-force algorithm of order where
is the number of nuclei in the distribution and
is the number of nuclei in
dm2
.
double o2scl::dense_matter::electron_fraction | ( | ) |
double o2scl::dense_matter::impurity | ( | ) |
This function returns the impurity parameter,
bool o2scl::dense_matter::nuc_in_dist | ( | int | Z, |
int | N, | ||
size_t & | index | ||
) |
This function performs a simple brute-force search.
void o2scl::dense_matter::prune_distribution | ( | double | factor | ) |
This function removes all nuclei which have densities smaller than factor
times the value returned by baryon_density_nuclei() .
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).