Public Types | Public Member Functions | Public Attributes | List of all members
o2scl::dense_matter Class Reference

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_matteroperator= (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 $ \mathrm{fm}^{-1} $)
 
double nB
 Baryon number density (in $ \mathrm{fm}^{-3} $)
 
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::nucleusdist
 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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ dense_matter()

o2scl::dense_matter::dense_matter ( )

This constructor automatically sets the neutron, proton, and electron masses.

Member Function Documentation

◆ average_a()

double o2scl::dense_matter::average_a ( )

This function returns

\[ \left<a\right> \equiv \left(\frac{4 \pi}{3}\sum_i n_i \right)^{-1/3} \, . \]

◆ average_A()

double o2scl::dense_matter::average_A ( )

This function returns $ \left<A\right> \equiv \sum_i n_i A_i / \sum_i n_i $ .

◆ average_N()

double o2scl::dense_matter::average_N ( )

This function returns $ \left<N\right> \equiv \sum_i n_i N_i / \sum_i n_i $ .

◆ average_Z()

double o2scl::dense_matter::average_Z ( )

This function returns $ \left<Z\right> \equiv \sum_i n_i Z_i / \sum_i n_i $ .

◆ baryon_density()

double o2scl::dense_matter::baryon_density ( )

This function returns $ n_n + n_p + \sum_i n_i A_i $ .

◆ baryon_density_nuclei()

double o2scl::dense_matter::baryon_density_nuclei ( )

This function returns $ \sum_i n_i A_i $ .

◆ copy_densities_from()

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 $ {\cal O}(N_1 N_2) $ where $ N_1 $ is the number of nuclei in the distribution and $ N_2 $ is the number of nuclei in dm2.

◆ electron_fraction()

double o2scl::dense_matter::electron_fraction ( )

This function returns

\[ \frac{1}{n_B} \left(n_p + \sum_i Z_i n_i \right) \]

where $ n_B $ is the value returned by baryon_density() .

◆ impurity()

double o2scl::dense_matter::impurity ( )

This function returns the impurity parameter,

\[ \left<Q\right> \equiv \left[\sum_i n_i \left(Z_i-\left<Z\right> \right)^2 \right] \left(\sum_i n_i\right)^{-1} \]

◆ nuc_in_dist()

bool o2scl::dense_matter::nuc_in_dist ( int  Z,
int  N,
size_t &  index 
)

This function performs a simple brute-force search.

◆ prune_distribution()

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


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