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

Equation of state for a relativistic fermion. More...

#include <fermion_deriv_rel.h>

Inheritance diagram for o2scl::fermion_deriv_rel:
o2scl::fermion_deriv_thermo o2scl::deriv_thermo_base

Detailed Description

Note
This class only has preliminary support for inc_rest_mass=true (more testing should be done, particularly for the "pair" functions)

This implements an equation of state for a relativistic fermion using direct integration. After subtracting the rest mass from the chemical potentials, the distribution function is

\[ \left\{1+\exp[(\sqrt{k^2+m^{* 2}}-m-\nu)/T]\right\}^{-1} \]

where $ k $ is the momentum, $ \nu $ is the effective chemical potential, $ m $ is the rest mass, and $ m^{*} $ is the effective mass. For later use, we define $ E^{*} = \sqrt{k^2 + m^{*2}} $ . The degeneracy parameter is

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

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 the value of the momentum $ k $ which is the solution of

\[ (\sqrt{k^2+m^{*,2}}-m-\nu)/T=\mathrm{f{l}imit} \]

which is

\[ \sqrt{(m+{\cal L})^2-m^{*2}} \]

where $ {\cal L}\equiv\mathrm{f{l}imit}\times T+\nu $ .

For the entropy integration, we set the lower limit to

\[ 2 \sqrt{\nu^2+2 \nu m} - \mathrm{upper~limit} \]

since the only contribution to the entropy is at the Fermi surface.

In the non-degenerate regime, we make the substitution $ u=k/T $ to help ensure that the variable of integration scales properly.

Uncertainties are given in unc.

Evaluation of the derivatives

The relevant derivatives of the distribution function are

\[ \frac{\partial f}{\partial T}= f(1-f)\frac{E^{*}-m-\nu}{T^2} \]

\[ \frac{\partial f}{\partial \nu}= f(1-f)\frac{1}{T} \]

\[ \frac{\partial f}{\partial k}= -f(1-f)\frac{k}{E^{*} T} \]

\[ \frac{\partial f}{\partial m^{*}}= -f(1-f)\frac{m^{*}}{E^{*} T} \]

We also need the derivative of the entropy integrand w.r.t. the distribution function, which is

\[ {\cal S}\equiv f \ln f +(1-f) \ln (1-f) \qquad \frac{\partial {\cal S}}{\partial f} = \ln \left(\frac{f}{1-f}\right) = \left(\frac{\nu-E^{*}+m}{T}\right) \]

where the entropy density is

\[ s = - \frac{g}{2 \pi^2} \int_0^{\infty} {\cal S} k^2 d k \]

The derivatives can be integrated directly (method = direct) or they may be converted to integrals over the distribution function through an integration by parts (method = by_parts)

\[ \int_a^b f(k) \frac{d g(k)}{dk} dk = \left.f(k) g(k)\right|_{k=a}^{k=b} - \int_a^b g(k) \frac{d f(k)}{dk} dk \]

using the distribution function for $ f(k) $ and 0 and $ \infty $ as the limits, we have

\[ \frac{g}{2 \pi^2} \int_0^{\infty} \frac{d g(k)}{dk} f dk = \frac{g}{2 \pi^2} \int_0^{\infty} g(k) f (1-f) \frac{k}{E^{*} T} dk \]

as long as $ g(k) $ vanishes at $ k=0 $ . Rewriting,

\[ \frac{g}{2 \pi^2} \int_0^{\infty} h(k) f (1-f) dk = \frac{g}{2 \pi^2} \int_0^{\infty} f \frac{T}{k} \left[ h^{\prime} E^{*}-\frac{h E^{*}}{k}+\frac{h k}{E^{*}} \right] dk \]

as long as $ h(k)/k $ vanishes at $ k=0 $ .

Explicit forms

1) The derivative of the density wrt the chemical potential

\[ \left(\frac{d n}{d \mu}\right)_T = \frac{g}{2 \pi^2} \int_0^{\infty} \frac{k^2}{T} f (1-f) dk \]

Using $ h(k)=k^2/T $ we get

\[ \left(\frac{d n}{d \mu}\right)_T = \frac{g}{2 \pi^2} \int_0^{\infty} \left(\frac{k^2+E^{*2}}{E^{*}}\right) f dk \]

2) The derivative of the density wrt the temperature

\[ \left(\frac{d n}{d T}\right)_{\mu} = \frac{g}{2 \pi^2} \int_0^{\infty} \frac{k^2(E^{*}-m-\nu)}{T^2} f (1-f) dk \]

Using $ h(k)=k^2(E^{*}-\nu)/T^2 $ we get

\[ \left(\frac{d n}{d T}\right)_{\mu} = \frac{g}{2 \pi^2} \int_0^{\infty} \frac{f}{T} \left[2 k^2+E^{*2}-E^{*}\left(\nu+m\right)- k^2 \left(\frac{\nu+m}{E^{*}}\right)\right] dk \]

3) The derivative of the entropy wrt the chemical potential

\[ \left(\frac{d s}{d \mu}\right)_T = \frac{g}{2 \pi^2} \int_0^{\infty} k^2 f (1-f) \frac{(E^{*}-m-\nu)}{T^2} dk \]

This verifies the Maxwell relation

\[ \left(\frac{d s}{d \mu}\right)_T = \left(\frac{d n}{d T}\right)_{\mu} \]

4) The derivative of the entropy wrt the temperature

\[ \left(\frac{d s}{d T}\right)_{\mu} = \frac{g}{2 \pi^2} \int_0^{\infty} k^2 f (1-f) \frac{(E^{*}-m-\nu)^2}{T^3} dk \]

Using $ h(k)=k^2 (E^{*}-\nu)^2/T^3 $

\[ \left(\frac{d s}{d T}\right)_{\mu} = \frac{g}{2 \pi^2} \int_0^{\infty} \frac{f(E^{*}-m-\nu)}{E^{*}T^2} \left[E^{* 3}+3 E^{*} k^2- (E^{* 2}+k^2)(\nu+m)\right] d k \]

5) The derivative of the density wrt the effective mass

\[ \left(\frac{d n}{d m^{*}}\right)_{T,\mu} = -\frac{g}{2 \pi^2} \int_0^{\infty} \frac{k^2 m^{*}}{E^{*} T} f (1-f) dk \]

Using $ h(k)=-(k^2 m^{*})/(E^{*} T) $ we get

\[ \left(\frac{d n}{d m^{*}}\right)_{T,\mu} = -\frac{g}{2 \pi^2} \int_0^{\infty} m^{*} f dk \]

Note
The dsdT integration may fail if the system is very degenerate. When method is byparts, the integral involves a large cancellation between the regions from $ k \in (0, \mathrm{ulimit/2}) $ and $ k \in (\mathrm{ulimit/2}, \mathrm{ulimit}) $. Switching to method=direct and setting the lower limit to $ \mathrm{llimit} $, may help, but recent testing on this gave negative values for dsdT. For very degenerate systems, an expansion may be better than trying to perform the integration. The value of the integrand at k=0 also looks like it might be causing difficulties.
Idea for Future:
The option err_nonconv=false is not really implemented yet.
Idea for Future:
The pair_density() function is a bit slow because it computes the non-derivative thermodynamic quantities twice, and this could be improved.

Definition at line 250 of file fermion_deriv_rel.h.

Public Member Functions

 fermion_deriv_rel ()
 Create a fermion with mass m and degeneracy g.
 
virtual int calc_mu (fermion_deriv &f, double temper)
 Calculate properties as function of chemical potential.
 
virtual int calc_density (fermion_deriv &f, double temper)
 Calculate properties as function of density.
 
virtual int pair_mu (fermion_deriv &f, double temper)
 Calculate properties with antiparticles as function of chemical potential.
 
virtual int pair_density (fermion_deriv &f, double temper)
 Calculate properties with antiparticles as function of density.
 
virtual int nu_from_n (fermion_deriv &f, double temper)
 Calculate effective chemical potential from density.
 
void set_inte (inte<> &unit, inte<> &udit)
 Set inte objects. More...
 
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_deriv_rel")
 
- Public Member Functions inherited from o2scl::fermion_deriv_thermo
virtual bool calc_mu_deg (fermion_deriv &f, double temper, double prec)
 Calculate properties as a function of chemical potential using a degenerate expansion. More...
 
virtual bool calc_mu_ndeg (fermion_deriv &f, double temper, double prec, bool inc_antip=false)
 Calculate properties as a function of chemical potential using a nondegenerate expansion. More...
 
- Public Member Functions inherited from o2scl::deriv_thermo_base
template<class part_deriv_t >
double heat_cap_ppart_const_vol (part_deriv_t &p, double temper)
 The heat capacity per particle at constant volume (unitless) More...
 
template<class part_deriv_t >
double heat_cap_ppart_const_press (part_deriv_t &p, double temper)
 The heat capacity per particle at constant pressure (unitless) More...
 
template<class part_deriv_t >
double compress_adiabatic (part_deriv_t &p, double temper)
 The adiabatic compressibility. More...
 
template<class part_deriv_t >
double compress_const_tptr (part_deriv_t &p, double temper)
 The isothermal compressibility. More...
 
template<class part_deriv_t >
double coeff_thermal_exp (part_deriv_t &p, double temper)
 The coefficient of thermal expansion. More...
 
template<class part_deriv_t >
double squared_sound_speed (part_deriv_t &p, double temper)
 The squared sound speed (unitless) More...
 

Public Attributes

double exp_limit
 Limit of arguments of exponentials for Fermi functions (default 200.0)
 
double deg_limit
 The critical degeneracy at which to switch integration techniques (default 2.0)
 
double upper_limit_fac
 The limit for the Fermi functions (default 20.0) More...
 
fermion_deriv unc
 Storage for the most recently calculated uncertainties.
 
fermion_rel fr
 Object for computing non-derivative quantities.
 
int last_method
 An integer indicating the last numerical method used. More...
 
bool err_nonconv
 If true, call the error handler when convergence fails (default true)
 
inte_qagiu_gsl def_nit
 The default integrator for the non-degenerate regime.
 
inte_qag_gsl def_dit
 The default integrator for the degenerate regime.
 
root_cern def_density_root
 The default solver for npen_density() and pair_density()
 

Protected Member Functions

The integrands, as a function of \f$ u=k/T \f$, for

non-degenerate integrals

double density_T_fun (double k, fermion_deriv &f, double T)
 
double density_mu_fun (double k, fermion_deriv &f, double T)
 
double entropy_T_fun (double k, fermion_deriv &f, double T)
 
double density_ms_fun (double k, fermion_deriv &f, double T)
 
The integrands, as a function of momentum, for the

degenerate integrals

double deg_density_T_fun (double k, fermion_deriv &f, double T)
 
double deg_density_mu_fun (double k, fermion_deriv &f, double T)
 
double deg_entropy_T_fun (double k, fermion_deriv &f, double T)
 
double deg_density_ms_fun (double k, fermion_deriv &f, double T)
 

Protected Attributes

int intl_method
 The internal integration method.
 
intenit
 The integrator for non-degenerate fermions.
 
intedit
 The integrator for degenerate fermions.
 
rootdensity_root
 The solver for calc_density() and pair_density()
 
- Protected Attributes inherited from o2scl::fermion_deriv_thermo
fermion_rel fr
 A fermion_thermo object. More...
 

Method of computing derivatives

int method
 Method (default is automatic)
 
static const int automatic =0
 Automatically choose method.
 
static const int direct =1
 In the form containing $ f(1-f) $ .
 
static const int by_parts =2
 Integrate by parts.
 

Member Function Documentation

◆ set_inte()

void o2scl::fermion_deriv_rel::set_inte ( inte<> &  unit,
inte<> &  udit 
)

The first integrator is used for non-degenerate integration and should integrate from 0 to $ \infty $ (like o2scl::inte_qagiu_gsl). The second integrator is for the degenerate case, and should integrate between two finite values.

Member Data Documentation

◆ last_method

int o2scl::fermion_deriv_rel::last_method

The function calc_mu() sets this integer to a two-digit number. It is equal to 10 times the value reported by o2scl::fermion_rel::calc_mu_tlate() plus a value from the list below corresponding to the method used for the derivatives

  • 1: nondegenerate expansion
  • 2: degenerate expansion
  • 3: nondegenerate integrand, using by_parts for method
  • 4: nondegenerate integrand, using user-specified value for method
  • 5: degenerate integrand, using direct
  • 6: degenerate integrand, using by_parts
  • 7: degenerate integrand, using user-specified value for method

The function nu_from_n() sets this value equal to 100 times the value reported by o2scl::fermion_rel::nu_from_n_tlate() .

The function calc_density() sets this value equal to the value from o2scl::fermion_deriv_rel::nu_from_n() plus the value from o2scl::fermion_deriv_rel::calc_mu() .

Definition at line 321 of file fermion_deriv_rel.h.

◆ upper_limit_fac

double o2scl::fermion_deriv_rel::upper_limit_fac

fermion_deriv_rel will ignore corrections smaller than about $ \exp(-\mathrm{f{l}imit}) $ .

Definition at line 274 of file fermion_deriv_rel.h.


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