O2scl_part Documentation

0.904


Quick Reference to User's Guide

PDF documentation


Particles

These classes in the library o2scl_part calculate the thermodynamic properties of interacting and non-interacting quantum and classical particles.

The class part is the basic structure for a particle:

The data members part::ms and part::nu allow one to specify modifications to the mass and the chemical potential due to interactions. This allows one to calculate the properties of particle due to interactions so long as the basic form of the free-particle dispersion relation is unchanged, i.e.

\[ \sqrt{k^2+m^2} - \mu \rightarrow \sqrt{k^2+m^{* 2}} - \nu \]

Typically, if the particle is non-interacting, then part::mu and part::m are copied to part::nu and part::ms, computations are performed with part::nu and part::ms, and then, if necessary, the result for part::nu is copied back to part::mu.

If part::inc_rest_mass is true (as is the default in all of the classes except nucleus), then all functions include the rest mass energy density in the energy density, the "mu" functions expect that the rest mass is included in part::mu or part::nu as input and the "density" functions output part::mu or part::nu including the rest mass.

When part::inc_rest_mass is true, antiparticles are implemented by choosing the antiparticle chemical potential to be $ - \mu $, and when inc_rest_mass is false, antiparticles are implemented by choosing the chemical potential of the antiparticles to be $ - \mu - 2 m $.

The thermodynamic identity used to compute the pressure for interacting particles is

\[ P = -\varepsilon + s T + \nu n \]

where part::nu is used. This way, the particle class doesn't need to know about the structure of the interactions to ensure that the thermodynamic identity is satisfied. Note that in the O2scl_eos library, where in the equations of state the normal thermodynamic identity is used

\[ P = -\varepsilon + s T + \mu n \]

Frequently, the interactions which create an effective chemical potential which is different than part::mu thus create extra terms in the pressure and the energy density for the given equation of state.

At zero temperature, fermions and bosons can be treated exactly in the classes fermion and boson. The quark class is a descendant of the fermion class which contains extra data members for the quark condensate and the contribution to the bag constant. The classical classical is a descendant of both fermion and boson and calculates everything in the classical limit.

At finite temperature, there are different classes corresponding to different approaches to computing the integrals over the distribution functions. The approximation scheme from Johns96 is used in eff_boson, eff_fermion, and eff_quark. An exact method employing direct integration of the distribution functions is used in rel_boson and rel_fermion, but these are necessarily quite a bit slower.

The class nonrel_fermion assumes a non-relativistic dispersion relation for fermions. It includes zero-temperature methods and an exact method for finite temperatures. The non-relativistic integrands are much simpler and nonrel_fermion uses the appropriate GSL functions to compute them.


Units:

Factors of $ \hbar, c $ and $ k_B $ have been removed everywhere, so that mass, energy, and temperature all have the same units. Number and entropy densities have units of mass cubed (or energy cubed). This particle classes can be used with any system of units which is based on powers of one unit, i.e. $ [n] = [T]^3 = [m]^3 = [P]^{3/4} = [\varepsilon]^{3/4}$, etc.


Derivative information:

Sometimes it is useful to know derivatives like $ds/dT$ in addition to the energy and pressure. There are three classes which compute these derivatives for fermions and classical particles. The class sn_classical handles the nondegenerate limit, sn_fermion handles fermions and sn_nr_fermion handles nonrelativistic fermions. These classes compute the derivatives

\[ \left(\frac{d n}{d \mu}\right)_{T}, \quad \left(\frac{d n}{d T}\right)_{\mu}, \quad \mathrm{and} \quad \left(\frac{d s}{d T}\right)_{\mu} \]

All other first derivatives of the thermodynamic functions can be written in terms of these three. To see how to compute the specific heat, for example, see the discussion in the documentation of deriv_part.


Atomic nuclei

Nuclei

Atomic nuclei, class nucleus, are implemented as descendants of classical. This class sets the value of nucleus::inc_rest_mass to false by default.

Nuclear mass formulas are given as children of nuclear_mass. The class ame_mass provides the experimental data from Audi95 or Audi03, the class mnmsk_mass provides the mass formula from Moller95, and the class hfb_mass provides the mass formula from Goriely02, Samyn04, or Goriely07. A simple semi-empirical mass formula is given in semi_empirical_mass and this can be fit to experimentally measured masses using mass_fit.

The class nuclear_dist provides an generic base class for a collection of several nuclei with an STL-like iterator. There are two implementations of this base class, simple_dist which provides a simple distribution and full_dist which enumerates all the nuclei for a given mass formula.


Example source code

exlist_subsect

Particle example

/* Example: ex_part.cpp
   -------------------------------------------------------------------
*/

#include <cmath>
#include <o2scl/test_mgr.h>
#include <o2scl/constants.h>
#include <o2scl/eff_fermion.h>
#include <o2scl/rel_fermion.h>
#include <o2scl/classical.h>

using namespace std;
using namespace o2scl;
using namespace o2scl_const;

int main(void) {
  test_mgr t;
  t.set_output_level(1);

  // Create two different electrons, one using the exact method from
  // rel_fermion, and the other from the approximate scheme used in
  // eff_fermion. We work in units of inverse Fermis, so that energy
  // density is fm^{-4}. We also use a classical particle, to compare
  // to the nondegenerate approximation.
  eff_fermion e(o2scl_fm::mass_electron,2.0);
  rel_fermion e2(o2scl_fm::mass_electron,2.0);
  classical e3(o2scl_fm::mass_electron,2.0);

  // Compute the pressure at a density of 0.0001 fm^{-3} and a
  // temperature of 10 MeV. At these temperatures, the electrons are
  // non-degenerate, and Boltzmann statistics nearly applies.
  e.n=0.0001;
  e.calc_density(10.0/hc_mev_fm);
  e2.n=0.0001;
  e2.calc_density(10.0/hc_mev_fm);
  e3.n=0.0001;
  e3.calc_density(10.0/hc_mev_fm);

  cout << e.pr << " " << e2.pr << " " << e3.pr << " "
       << e.n*10.0/hc_mev_fm << endl;

  // Test
  t.test_rel(e.pr,e2.pr,1.0e-2,"EFF vs. exact");
  t.test_rel(e2.pr,e3.pr,4.0e-1,"classical vs. exact");
  t.test_rel(e.n*10.0/hc_mev_fm,e3.pr,1.0e-1,"classical vs. ideal gas law");

  // Compute the pressure at a density of 0.1 fm^{-3} and a
  // temperature of 1 MeV. At these temperatures, the electrons are
  // strongly degenerate
  e.n=0.0001;
  e.calc_density(10.0/hc_mev_fm);
  e2.n=0.0001;
  e2.calc_density(10.0/hc_mev_fm);
  cout << e.pr << " " << e2.pr << endl;

  // Test
  t.test_rel(e.pr,e2.pr,1.0e-2,"EFF vs. exact");

  // Now add the contribution to the pressure from positrons using the
  // implmentation of part::pair_density()
  e.n=0.0001;
  e.pair_density(10.0/hc_mev_fm);
  e2.n=0.0001;
  e2.pair_density(10.0/hc_mev_fm);
  cout << e.pr << " " << e2.pr << endl;

  // Test
  t.test_rel(e.pr,e2.pr,1.0e-2,"EFF vs. exact");

  t.report();
  return 0;
}
// End of example

Nuclear mass fit example

/* Example: ex_mass_fit.cpp
   -------------------------------------------------------------------
*/

#include <iostream>
#include <o2scl/test_mgr.h>
#include <o2scl/mass_fit.h>

using namespace std;
using namespace o2scl;
using namespace o2scl_const;
using namespace o2scl_fm;


int main(void) {
  test_mgr t;
  t.set_output_level(1);
  
  cout.setf(ios::scientific);

  // The RMS deviation of the fit
  double res;
  // The mass formula to be fitted
  semi_empirical_mass sem;
  // The fitting class
  mass_fit mf;

  // Perform the fit
  mf.fit(sem,res);

  // Output the results
  cout << sem.B << " " << sem.Sv << " " << sem.Ss << " " 
       << sem.Ec << " " << sem.Epair << endl;
  cout << res << endl;
  t.test_gen(res<4.0,"Successful fit.");
  
  t.report();
  return 0;
}
// End of example


Bibliography

Some of the references which contain links should direct you to the work referred to directly through dx.doi.org.

Audi95: G. Audi and A. H. Wapstra, Nucl. Phys. A 595 (1995) 409-480.

Audi03: G.Audi, A. H. Wapstra and C. Thibault, Nucl. Phys. A 729 (2003) 337.

Eggleton73: P. P. Eggleton, J. Faulkner, and B. P. Flannery, Astron. and Astrophys. 23 (1973) 325.

Goriely02: S. Goriely, M. Samyn, P.-H. Heenen, J. M. Pearson, and F. Tondeur, Phys. Rev. C 66 (2002) 024326.

Goriely07: S. Goriely, M. Samyn, and J. M. Pearson, Phys. Rev. C 75 (2007) 064312.

Johns96: Johns, P.J. Ellis, and J.M. Lattimer, Astrophys. J. 473 (1996) 1020.

Moller95: P. Moller, J.R. Nix, W.D. Myers, and W.J. Switecki, At. Data Nucl. Data Tables 59 (1995) 185.

Samyn04: M. Samyn, S. Goriely, M. Bender and J. M. Pearson, Phys. Rev. C 70 (2004) 044309.


Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page