Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
o2scl::fermion_nonrel Class Reference

Nonrelativistic fermion class. More...

#include <fermion_nonrel.h>

Inheritance diagram for o2scl::fermion_nonrel:
o2scl::fermion_eval_thermo o2scl::fermion_zerot

Public Member Functions

 fermion_nonrel ()
 Create a nonrelativistic fermion with mass 'm' and degeneracy 'g'.
 
virtual void calc_mu_zerot (fermion &f)
 Zero temperature fermions.
 
virtual void calc_density_zerot (fermion &f)
 Zero temperature fermions.
 
virtual void calc_mu (fermion &f, double temper)
 Calculate properties as function of chemical potential.
 
virtual int calc_density (fermion &f, double temper)
 Calculate properties as function of density. More...
 
virtual void pair_mu (fermion &f, double temper)
 Calculate properties with antiparticles as function of chemical potential.
 
virtual int pair_density (fermion &f, double temper)
 Calculate properties with antiparticles as function of density. More...
 
virtual void nu_from_n (fermion &f, double temper)
 Calculate effective chemical potential from density.
 
void set_density_root (root<> &rp)
 Set the solver for use in calculating the chemical potential from the density.
 
virtual const char * type ()
 Return string denoting type ("fermion_nonrel")
 
- Public Member Functions inherited from o2scl::fermion_eval_thermo
virtual bool calc_mu_ndeg (fermion &f, double temper, double prec=1.0e-18, bool inc_antip=false)
 Non-degenerate expansion for fermions. More...
 
virtual bool calc_mu_deg (fermion &f, double temper, double prec=1.0e-18)
 Degenerate expansion for fermions. More...
 
void set_massless_root (root<> &rp)
 Set the solver for use in massless_calc_density()
 
virtual double calibrate (fermion &f, int verbose=0, std::string fname="")
 Test the thermodynamics of calc_density() and calc_mu() More...
 
virtual void massless_calc_mu (fermion &f, double temper)
 Finite temperature massless fermions.
 
virtual void massless_calc_density (fermion &f, double temper)
 Finite temperature massless fermions.
 
virtual void massless_pair_mu (fermion &f, double temper)
 Finite temperature massless fermions and antifermions.
 
virtual void massless_pair_density (fermion &f, double temper)
 Finite temperature massless fermions and antifermions. More...
 
- Public Member Functions inherited from o2scl::fermion_zerot
void kf_from_density (fermion &f)
 Calculate the Fermi momentum from the density. More...
 
void energy_density_zerot (fermion &f)
 Energy density at T=0 from fermion::kf and part::ms. More...
 
void pressure_zerot (fermion &f)
 Pressure at T=0 from fermion::kf and part::ms. More...
 

Public Attributes

root_cern def_density_root
 The default solver for calc_density().
 
- Public Attributes inherited from o2scl::fermion_eval_thermo
root_cern def_massless_root
 The default solver for massless_calc_density() More...
 

Protected Member Functions

double solve_fun (double x, double nog, double msT)
 Function to compute chemical potential from density. More...
 
- Protected Member Functions inherited from o2scl::fermion_eval_thermo
double massless_solve_fun (double x, fermion &f, double temper)
 Solve for the chemical potential for massless fermions.
 

Protected Attributes

rootdensity_root
 Solver to compute chemical potential from density.
 
- Protected Attributes inherited from o2scl::fermion_eval_thermo
rootmassless_root
 A pointer to the solver for massless fermions.
 

Private Member Functions

 fermion_nonrel (const fermion_nonrel &)
 
fermion_nonreloperator= (const fermion_nonrel &)
 

Detailed Description

The rest mass energy density is given by n*m not n*ms. Note that the effective mass here is the Landau mass, not the Dirac mass.

Pressure is computed with

\[ P = 2 \varepsilon/3 \]

and entropy density with

\[ s = \frac{5 \varepsilon}{3 T} - \frac{n \mu}{T} \]

These relations can be verified with an integration by parts. See, e.g. Callen85 pg. 403 or Landau80 pg. 164.

The functions pair_density() and pair_mu() have not been implemented and just call the error handler.

Note
The function calc_density() calls the error handler at zero density and finite temperature, because the correct answer implies $ \mu = - \infty $ . At zero density and zero temperature the function calc_density() calls calc_density_zerot() which gives the proper chemical potential of $ mu = m $ without calling the error handler.
Todo:
Implement o2scl::fermion_nonrel::pair_density() and o2scl::fermion_nonrel::pair_mu().
Todo:
Make sure to test with non-interacting equal to true or false, and document whether or not it works with both inc_rest_mass equal to true or false
Idea for Future:
This could be improved by performing a Chebyshev approximation (for example) to invert the density integral so that we don't need to use a solver.

Definition at line 84 of file fermion_nonrel.h.

Member Function Documentation

◆ calc_density()

virtual int o2scl::fermion_nonrel::calc_density ( fermion f,
double  temper 
)
virtual

If the density is zero, this function just sets part::mu, part::nu, part::ed, part::pr, and part::en to zero and returns without calling the error handler (even though at zero density and finite temperature, the chemical potentials formally are equal to $ -\infty $).

Implements o2scl::fermion_eval_thermo.

◆ pair_density()

virtual int o2scl::fermion_nonrel::pair_density ( fermion f,
double  temper 
)
inlinevirtual
Note
This function returns an integer value, in contrast to pair_mu(), because of the potential for non-convergence.

Implements o2scl::fermion_eval_thermo.

Definition at line 121 of file fermion_nonrel.h.

◆ solve_fun()

double o2scl::fermion_nonrel::solve_fun ( double  x,
double  nog,
double  msT 
)
protected

Variable nog is the target baryon density divided by the spin degeneracy, and msT is the effective mass times the temperature.


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