Function fermion_calc_mu_ndeg (o2scl)¶
-
template<class fermion_t, class fp_t = double>
bool o2scl::fermion_calc_mu_ndeg(fermion_t &f, fp_t temper, fp_t prec = 1.0e-17, bool inc_antip = false, int verbose = 0)¶ 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.The following uses the notation of [Johns96].
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
\[ 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} + ... \]