Fermion class from fitting method. More...
#include <fermion_eff.h>
Public Types | |
typedef boost::numeric::ublas::vector< double > | ubvector |
typedef boost::numeric::ublas::matrix< double > | ubmatrix |
Public Member Functions | |
fermion_eff () | |
Create a fermion with mass mass and degeneracy dof . | |
virtual void | calc_mu (fermion &f, double temper) |
Calculate thermodynamic properties as function of chemical potential. More... | |
virtual int | calc_density (fermion &f, double temper) |
Calculate thermodynamic properties as function of density. More... | |
virtual void | pair_mu (fermion &f, double temper) |
Calculate thermodynamic properties with antiparticles as function of chemical potential. More... | |
virtual 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 ![]() | |
int | 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_eff") | |
![]() | |
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... | |
![]() | |
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... | |
virtual void | calc_mu_zerot (fermion &f) |
Zero temperature fermions from part::mu or part::nu and part::ms. | |
virtual void | calc_density_zerot (fermion &f) |
Zero temperature fermions from part::n and part::ms. | |
Public Attributes | |
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 ![]() | |
root_cern | def_density_root |
The default solver for calc_density() and pair_density() | |
double | min_psi |
The minimum value of ![]() | |
![]() | |
root_cern | def_massless_root |
The default solver for massless_calc_density() More... | |
Protected Member 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) | |
double | solve_fun (double x, double &psi) |
The function which solves for ![]() ![]() | |
![]() | |
double | massless_solve_fun (double x, fermion &f, double temper) |
Solve for the chemical potential for massless fermions. | |
Protected Attributes | |
ubmatrix | Pmnf |
The matrix of coefficients. | |
double | parma |
The parameter ![]() | |
int | sizem |
The array row size. | |
int | sizen |
The array column size. | |
root * | psi_root |
The solver for ![]() | |
root * | density_root |
The other solver for calc_density() | |
![]() | |
root * | massless_root |
A pointer to the solver for massless fermions. | |
Coefficients for finite-temperature approximation | |
static const int | cf_fermilat3 =1 |
A set of coefficients from Jim Lattimer. | |
static const int | cf_fermijel2 =2 |
The smaller set of coefficients from Johns96. | |
static const int | cf_fermijel3 =3 |
The larger set of coefficients from Johns96. | |
static const int | cf_fermijel3cons =4 |
The set of coefficients from Johns96 which retains better thermodynamic consistency. | |
void | load_coefficients (int ctype) |
Load coefficients. More... | |
Based on the fitting method of Johns96 which is an update of the method from Eggleton73 . This method is approximate, but very fast. For a more accurate (but slower) method, use fermion_rel.
If the temperature is less than or equal to tlimit (which defaults to zero), the zero-temperature expressions from the parent class fermion_zerot 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)
for given
. If
, then the alternative expression
is used. The pressure, energy density, and entropy, are determined as polynomials in with a set of precomputed coefficients as done in Johns96 .
If is less than min_psi (which defaults to -4) then the non-dengenerate approximation from fermion_eval_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
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.
Because the density is a complicated polynomial in , 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 .
Definition at line 105 of file fermion_eff.h.
|
virtual |
Implements o2scl::fermion_eval_thermo.
|
virtual |
If the quantity (or
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.
Implements o2scl::fermion_eval_thermo.
void o2scl::fermion_eff::load_coefficients | ( | int | ctype | ) |
The argument ctype
Should be one of the constants below.
|
virtual |
Implements o2scl::fermion_eval_thermo.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).