Class fermion_thermo_tl (o2scl)¶
-
template<class
fermion_t
= fermion, classfd_inte_t
= fermi_dirac_integ_gsl, classbe_inte_t
= bessel_K_exp_integ_gsl, classroot_t
= root_cern<>, classfunc_t
= funct, classfp_t
= double>
classo2scl
::
fermion_thermo_tl
: public o2scl::fermion_zerot_tl<double>¶ Fermion with finite-temperature thermodynamics [abstract base].
This is an abstract base for the computation of finite-temperature fermionic statistics. Different children (e.g. fermion_eff and fermion_rel_tl) use different techniques to computing the momentum integrations.
Because massless fermions at finite temperature are much simpler, there are separate member functions included in this class to handle them. The functions massless_calc_density() and massless_calc_mu() compute the thermodynamics of massless fermions at finite temperature given the density or the chemical potentials. The functions massless_pair_density() and massless_pair_mu() perform the same task, but automatically include antiparticles.
The function massless_calc_density() uses a root object to solve for the chemical potential as a function of the density. The default is an object of type root_cern. The function massless_pair_density() does not need to use the root object because of the simplification afforded by the inclusion of antiparticles.
- Idea for Future:
Create a Chebyshev approximation for inverting the the Fermi functions for massless_calc_density() functions?
Subclassed by o2scl::fermion_eff
Massless fermions
-
root_t
def_massless_root
¶ The default solver for massless_calc_density()
We default to a solver of type root_cern here since we don’t have a bracket or a derivative.
-
void
massless_pair_mu
(fermion_t &f, fp_t temper)¶ Finite temperature massless fermions and antifermions.
-
void
massless_pair_density
(fermion_t &f, fp_t temper)¶ Finite temperature massless fermions and antifermions.
In the cases \( n^3 \gg T \) and \( T \gg n^3 \) , expansions are used instead of the exact formulas to avoid loss of precision.
In particular, using the parameter
\[ \alpha = \frac{g^2 \pi^2 T^6}{243 n^2} \]and defining the expression\[ \mathrm{cbt} = \alpha^{-1/6} \left( -1 + \sqrt{1+\alpha}\right)^{1/3} \]we can write the chemical potential as\[ \mu = \frac{\pi T}{\sqrt{3}} \left(\frac{1}{\mathrm{cbt}} - \mathrm{cbt} \right) \]These expressions, however, do not work well when \( \alpha \) is very large or very small, so series expansions are used whenever \( \alpha > 10^{4} \) or \( \alpha < 3 \times 10^{-4} \). For small \( \alpha \),
\[ \left(\frac{1}{\mathrm{cbt}} - \mathrm{cbt} \right) \approx \frac{2^{1/3}}{\alpha^{1/6}} - \frac{\alpha^{1/6}}{2^{1/3}} + \frac{\alpha^{5/6}}{6{\cdot}2^{2/3}} + \frac{\alpha^{7/6}}{12{\cdot}2^{1/3}} - \frac{\alpha^{11/6}}{18{\cdot}2^{2/3}} - \frac{5 \alpha^{13/6}}{144{\cdot}2^{1/3}} + \frac{77 \alpha^{17/6}}{2592{\cdot}2^{2/3}} \]and for large \( \alpha \),\[ \left(\frac{1}{\mathrm{cbt}} - \mathrm{cbt} \right) \approx \frac{2}{3} \sqrt{\frac{1}{\alpha}} - \frac{8}{81} \left(\frac{1}{\alpha}\right)^{3/2} + \frac{32}{729} \left(\frac{1}{\alpha}\right)^{5/2} \]This approach works to within about 1 in \( 10^{12} \), and is tested in
fermion_ts.cpp
.- Idea for Future:
This could be improved by including more terms in the expansions.
-
void
set_massless_root
(root<funct, funct, fp_t> &rp)¶ Set the solver for use in massless_calc_density()
-
const char *
type
()¶ Return string denoting type (“fermion_thermo”)
Public Functions
-
fermion_thermo_tl
()¶
-
~fermion_thermo_tl
()¶
-
bool
calc_mu_ndeg
(fermion_t &f, fp_t temper, fp_t prec = 1.0e-18, bool inc_antip = false)¶ Non-degenerate expansion for fermions.
Attempts to evaluate thermodynamics of a non-degenerate fermion. If the result is accurate to within the requested precision, this function returns
true
, and otherwise this function returnsfalse
and the values in stored in thepr
,n
,en
, anded
field are meaningless.If \( \mu \) is negative and sufficiently far from zero, then the thermodynamic quantities are smaller than the smallest representable double-precision number. In this case, this function will return
true
and report all quantities as zero.Defining \( \psi \equiv (\mu-m)/T \), \( t \equiv T/m \), and \( d \equiv g~m^4/(2 \pi^2) \) the pressure in the non-degenerate limit ( \( \psi \rightarrow - \infty \)) is (Johns96)
\[ P = d \sum_{n=1}^{\infty} P_n \]where\[ P_n \equiv \left(-1\right)^{n+1} \left(\frac{t^2}{n^2}\right) e^{n \left(\psi+1/t\right)} K_2 \left( \frac{n}{t} \right) \]The density is then\[ n = d \sum_{n=1}^{\infty} \frac{n P_n}{T} \]and the entropy density is\[ s = \frac{d}{m} \sum_{n=1}^{\infty} \left\{ \frac{2 P_n}{t} -\frac{n P_n}{t^2}+ \frac{\left(-1\right)^{n+1}}{2 n} e^{n \left(\psi+1/t\right)} \left[ K_1 \left( \frac{n}{t} \right)+K_3 \left( \frac{n}{t} \right) \right] \right\} \]This function is accurate over a wide range of conditions when \( \psi < -4 \).
The ratio of the nth term to the first term in the pressure series is
\[ R_n \equiv \frac{P_{n}}{P_{1}} = \frac{(-1)^{n+1} e^{(n-1)(\psi+1/t)} K_2(n/t) }{n^2 K_2(1/t)} \]This function currently uses 20 terms in the series and immediately returnsfalse
if \( |R_{20}| \) is greater thanprec
In the nondegenerate and nonrelativistic ( \( t \rightarrow 0 \)) limit, the argument to the Bessel functions and the exponential becomes too large. In this case, it’s better to use the expansions, e.g. for \( x \equiv n/t \rightarrow \infty \),
\[ \sqrt{\frac{2 x}{\pi}} e^{x} K_2(x) \approx 1 + \frac{3}{8 x} - \frac{15}{128 x^2} + ... \]The current code currently goes up to \( x^{-12} \) in the expansion, which is enough for the default precision of \( 10^{-18} \) since \( (20/700)^{12} \sim 10^{-19} \).
-
bool
calc_mu_deg
(fermion_t &f, fp_t temper, fp_t prec = 1.0e-18)¶ Degenerate expansion for fermions.
Attempts to evaulate thermodynamics of a degenerate fermion. If the result is accurate to within the requested precision, this function returns
true
, and otherwise this function returnsfalse
and the values in stored in thepr
,n
,en
, anded
field are meaningless.The pressure, density, and energy density, should be accurate to the requested precision, but the first term in the series expansion for the entropy is zero, so the entropy is one order lower in accuracy.
- Idea for Future:
Make a function like this for dndm, dsdT, etc. for fermion_deriv .
-
void
calc_mu
(fermion_t &f, fp_t temper) = 0¶ Calculate properties as function of chemical potential.
-
int
calc_density
(fermion_t &f, fp_t temper) = 0¶ Calculate properties as function of density.
- Note
This function returns an integer value, in contrast to calc_mu(), because of the potential for non-convergence.