rel_fermion Class Reference

#include <rel_fermion.h>

Inheritance diagram for rel_fermion:

fermion part

Detailed Description

Equation of state for a relativistic fermion.

This implements an equation of state for a relativistic fermion using direct integration. Define the degeneracy parameter

\[ \psi=(\nu-m^{*})/T \]

where $ \nu $ is the effective chemical potential and $ m^{*} $ is the effective mass. For $ \psi $ greater than deg_limit (degenerate regime), a finite interval integrator is used and for $ \psi $ less than deg_limit (non-degenerate regime), an integrator over the interval from $ [0,\infty) $ is used. The upper limit on the degenerate integration is given by

\[ \sqrt{(20 T+{\nu})^2-m^{*,2}} \]

The default integrators are gsl_inte_qag (for degenerate particles) and gsl_inte_qagiu (for non-degenerate particles)

One way to improve the accuracy of the computation is just to decrease the tolerances on the default integration objects. This can be done, using, for example

      rel_fermion rf(1.0,2.0);
      rf.def_dit.tolx/=1.0e2;
      rf.def_dit.tolf/=1.0e2;
      rf.def_nit.tolx/=1.0e2;
      rf.def_nit.tolf/=1.0e2;
which decreases the both the relative and absolute tolerances for both the degenerate and non-degenerate integrators. If one is using either the calc_density() or pair_density() functions, one may also have to improve the accuracy of the solver which determines the chemical potential from the density. For the default solver, this could be done with
      rf.def_density_root.tolx/=1.0e2;
      rf.def_density_root.tolf/=1.0e2;
Of course if these tolerances are too small, the calculation may fail, in which case the reported uncertainties are not necessarily correct.

Note:
This does not work with inc_rest_mass=false
Idea for future:
Allow the user to change the upper limit on the degenerate integration and the hard-coded value of 200 in the integrands.
Idea for future:
It appears this doesn't compute the uncertainty in the chemical potential or density with calc_density(). This could be fixed.

Definition at line 98 of file rel_fermion.h.


Public Member Functions

 rel_fermion (double m=0.0, double g=0.0)
 Create a fermion with mass m and degeneracy g.
virtual int calc_mu (const double temper)
 Calculate properties as function of chemical potential.
virtual int calc_density (const double temper)
 Calculate properties as function of density.
virtual int pair_mu (const double temper)
 Calculate properties with antiparticles as function of chemical potential.
virtual int pair_density (const double temper)
 Calculate properties with antiparticles as function of density.
virtual int nu_from_n (const double temper)
 Calculate effective chemical potential from density.
int set_inte (inte< void *, funct< void * > > &non_it, inte< void *, funct< void * > > &deg_it)
 Set integrators.
int set_density_root (root< void *, funct< void * > > &rp)
 Set the solver for use in calculating the chemical potential from the density.
virtual const char * type ()
 Return string denoting type ("rel_fermion").

Data Fields

double deg_limit
 The critical degeneracy at which to switch integration techniques.
fermion unc
 Storage for the uncertainty.
bool guess_from_nu
 If true, use the present value of the chemical potential as a guess for the new chemical potential.
cern_mroot_root< void *, funct
< void * > > 
def_density_root
 The default solver for calc_density().
gsl_inte_qag< void *, funct
< void * > > 
def_dit
 The default integrator for degenerate fermions.
gsl_inte_qagiu< void *, funct
< void * > > 
def_nit
 The default integrator for non-degenerate fermions.

Protected Member Functions

double density_fun (double u, void *&pa)
 The integrand for the density for non-degenerate fermions.
double energy_fun (double u, void *&pa)
 The integrand for the energy density for non-degenerate fermions.
double entropy_fun (double u, void *&pa)
 The integrand for the entropy density for non-degenerate fermions.
double deg_density_fun (double u, void *&pa)
 The integrand for the density for degenerate fermions.
double deg_energy_fun (double u, void *&pa)
 The integrand for the energy density for degenerate fermions.
double deg_entropy_fun (double u, void *&pa)
 The integrand for the entropy density for degenerate fermions.
int solve_fun (double x, double &yy, void *&pa)
 Solve for the chemical potential given the density.
int pair_fun (double x, double &yy, void *&pa)
 Solve for the chemical potential given the density wiht antiparticles.

Protected Attributes

inte< void *, funct< void * > > * nit
 The non-degenerate integrator.
inte< void *, funct< void * > > * dit
 The degenerate integrator.
root< void *, funct< void * > > * density_root
 The solver for calc_density().

The documentation for this class was generated from the following file:

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