Class fermion_eff (o2scl)¶
-
class
o2scl
::
fermion_eff
: public o2scl::fermion_thermo_tl<fermion_t, fd_inte_t, be_inte_t, root_t, func_t, fp_t>¶ Fermion class from fitting method.
Based on the fitting method of [Johns96] which is an update of the method from [Eggleton73].
For a more accurate (but slower) method, use o2scl::fermion_rel_tl.
If the temperature is less than or equal to tlimit (which defaults to zero), the zero-temperature expressions from the parent class fermion_zerot_tl are used.
Given the chemical potential and the temperature the functions calc_mu() and pair_mu() work by solving the equation (c.f. Eq. 15 in Johns96)
\[ \psi= 2 \sqrt{1+f/a}+\log\left(\frac{\sqrt{1+f/a}-1} {\sqrt{1+f/a}+1}\right) \]for \( f \) given \( \psi=(\mu-m)/T \). If \( f/a<10^{-10} \), then the alternative expression\[ \psi= 2 \left[1+f/(2 a)\right]+\log\left\{\frac{f/(2 a)} {\left[1+f/(2 a)\right]}\right\} \]is used. The pressure, energy density, and entropy, are determined as polynomials in \( f \) with a set of precomputed coefficients as done in Johns96 .If \( \psi \) is less than min_psi (which defaults to -4) then the non-dengenerate approximation from fermion_thermo::calc_mu_ndeg() is used. The value of min_psi can be decreased to ensure that the expansion is not used, but values of \( \psi \) less than about -200 can cause the Johns96 procedure outlined above to fail. Values of min_psi larger than -4 are not useful.
When the density and temperature is given instead (calc_density() and pair_density()), then there are two ways to proceed.
Use the density to solve for \( f \) .
Use the density to solve for the chemical potential.
Because the density is a complicated polynomial in \( f \), the former procedure does not work very well even though it might be less time consuming. In this class, the density is solved for the effective chemical potential instead. The initial guess is just taken from the present value of part::nu .
- Idea for Future:
Use bracketing to speed up one-dimensional root finding.
- Idea for Future:
Implement the same method of allowing the user to turn on or off the degenerate and nondegenerate expansions as in o2scl::fermion_rel_tl .
Coefficients for finite-temperature approximation
-
const int
cf_fermilat3
= 1¶ A set of coefficients from Jim Lattimer.
-
const int
cf_fermijel2
= 2¶ The smaller set of coefficients from Johns96.
-
const int
cf_fermijel3
= 3¶ The larger set of coefficients from Johns96.
-
const int
cf_fermijel3cons
= 4¶ The set of coefficients from Johns96 which retains better thermodynamic consistency.
-
double
tlimit
¶ If the temperature is less than
tlimit
then the zero-temperature functions are used (default 0).
-
bool
err_nonconv
¶ If true, call the error handler when convergence fails (default true)
-
root_cern
def_psi_root
¶ The default solver for \( \psi \).
-
root_cern
def_density_root
¶ The default solver for calc_density() and pair_density()
-
double
min_psi
¶ The minimum value of \( \psi \) (default -200)
-
double
parma
¶ The parameter \( a \).
-
int
sizem
¶ The array row size.
-
int
sizen
¶ The array column size.
-
root *
psi_root
¶ The solver for \( \psi \).
-
root *
density_root
¶ The other solver for calc_density()
-
double
solve_fun
(double x, double psi)¶ The function which solves for \( f \) from \( \psi \).
-
void
load_coefficients
(int ctype)¶ Load coefficients.
The argument
ctype
Should be one of the constants below.
-
void
calc_mu
(fermion &f, double temper)¶ Calculate thermodynamic properties as function of chemical potential.
If the quantity \( (\mu-m)/T \) (or \( (\nu-m^{*})/T \) in the case of interacting particles) is less than -200, then this quietly sets the density, the scalar density, the energy density, the pressure and the entropy to zero and exits.
-
int
calc_density
(fermion &f, double temper)¶ Calculate thermodynamic properties as function of density.
- Warning
This function needs a guess for the chemical potential, and will fail if that guess is not sufficiently accurate.
-
void
pair_mu
(fermion &f, double temper)¶ Calculate thermodynamic properties with antiparticles as function of chemical potential.
- Warning
This function needs a guess for the chemical potential, and will fail if that guess is not sufficiently accurate.
-
int
pair_density
(fermion &f, double temper)¶ Calculate thermodynamic properties with antiparticles as function of density.
-
int
set_psi_root
(root<> &rp)¶ Set the solver for use in calculating \( \psi \).
-
int
set_density_root
(root<> &rp)¶ Set the solver for use in calculating the chemical potential from the density.
-
const char *
type
()¶ Return string denoting type (“fermion_eff”)
Public Types
-
typedef boost::numeric::ublas::vector<double>
ubvector
¶
-
typedef boost::numeric::ublas::matrix<double>
ubmatrix
¶
Protected Functions
-
double
density_fun
(double x, fermion &f, double temper)¶ The function which solves for the chemical potential given the density.
-
double
pair_density_fun
(double x, fermion &f, double temper)¶ The function which solves for the chemical potential given the density (including antiparticles)