Class dense_matter (o2scl)¶
-
class dense_matter¶
A container for the properties of dense matter at a specified baryon density, electron fraction and temperature.
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.
Public Types
-
typedef boost::numeric::ublas::vector<double> ubvector¶
Public Functions
-
dense_matter()¶
Constructor.
This constructor automatically sets the neutron, proton, and electron masses.
-
inline dense_matter(const dense_matter &dm)¶
Copy constructor.
-
inline 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.
This function returns
\[ \left<a\right> \equiv \left(\frac{4 \pi}{3}\sum_i n_i \right)^{-1/3} \, . \]
-
double average_A()¶
Compute the number-averaged mass number.
This function returns \( \left<A\right> \equiv \sum_i n_i A_i / \sum_i n_i \) .
-
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.
This function returns \( \left<N\right> \equiv \sum_i n_i N_i / \sum_i n_i \) .
-
double average_Z()¶
Compute the number-averaged proton number.
This function returns \( \left<Z\right> \equiv \sum_i n_i Z_i / \sum_i n_i \) .
-
double impurity()¶
Compute the impurity parameter.
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} \]
-
double baryon_density_nuclei()¶
Compute the baryon density in nuclei.
This function returns \( \sum_i n_i A_i \) .
-
double baryon_density()¶
Compute the total baryon density.
This function returns \( n_n + n_p + \sum_i n_i A_i \) .
-
double electron_fraction()¶
Compute the 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() .
-
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
.This function performs a simple brute-force search.
-
void prune_distribution(double factor)¶
Remove nuclei from the distribution which have a small density.
This function removes all nuclei which have densities smaller than
factor
times the value returned by baryon_density_nuclei() .
-
void copy_densities_from(dense_matter &dm2)¶
Copy densities from those stored in another dense_matter object.
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 indm2
, 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 indm2
.
Public Members
-
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.
-
double eta_n¶
Neutron chemical potential.
-
double eta_p¶
Proton chemical potential.
-
o2scl::thermo th¶
Total thermodynamic quantities.
-
o2scl::thermo drip_th¶
Thermodynamic quantities for dripped particles.
-
typedef boost::numeric::ublas::vector<double> ubvector¶