#include <eff_fermion.h>
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 rel_fermion.
Given the chemical potential and the temperature the functions calc_mu() and pair_mu() work by solving the equation
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 too small (less than about -200), the above procedure fails. To handle this, this class uses the classical result if
< min_psi, where min_psi defaults to -200.
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. The density is solved for the effective chemical potential instead. The initial guess is just taken from the present value of part::nu.
The constructor uses the coefficients from the file fermilat3
by default.
It is important that if the inte and root objects are not thread safe, different instances should not use the same instance of a inte or root object simultaneously.
Definition at line 94 of file eff_fermion.h.
Load coefficients for finite-temperature approximation | |
ctype Should be one of the constants below: cf_fermilat3, cf_fermijel2, cf_fermijel3, or cf_fermijel3cons.
| |
static const int | cf_fermilat3 = 1 |
static const int | cf_fermijel2 = 2 |
static const int | cf_fermijel3 = 3 |
static const int | cf_fermijel3cons = 4 |
static int | load_coefficients (int ix) |
Public Member Functions | |
eff_fermion (double mass=0.0, double dof=0.0) | |
Create a fermion with mass mass and degeneracy dof . | |
virtual int | calc_mu (const double temper) |
Calculate thermodynamic properties as function of chemical potential. | |
virtual int | calc_density (const double temper) |
Calculate thermodynamic properties as function of density. | |
virtual int | pair_mu (const double temper) |
Calculate thermodynamic properties with antiparticles as function of chemical potential. | |
virtual int | pair_density (const double temper) |
Calculate thermodynamic properties with antiparticles as function of density. | |
int | set_psi_root (root< void *, funct< void * > > &rp) |
Set the solver for use in calculating ![]() | |
int | set_density_root (root< void *, funct< void * > > &rp) |
Set the solver for use in calculating the chemical potential from the density with meth2=true. | |
virtual const char * | type () |
Return string denoting type ("eff_fermion"). | |
Data Fields | |
double | tlimit |
If the temperature is less than tlimit then the zero-temperature functions are used (default 0). | |
cern_mroot_root< void *, funct < void * > > | def_psi_root |
The default solver for ![]() | |
cern_mroot_root< void *, funct < void * > > | def_density_root |
The default solver for calc_density() and pair_density(). | |
double | min_psi |
The minimum value of ![]() | |
Protected Member Functions | |
int | solve_fun (double x, double &y, void *&pa) |
The function which solves for ![]() ![]() | |
int | density_fun (double x, double &y, void *&pa) |
Fix density for calc_density(). | |
int | pair_density_fun (double x, double &y, void *&pa) |
Fix density for pair_density(). | |
Protected Attributes | |
root< void *, funct< void * > > * | psi_root |
The solver for ![]() | |
root< void *, funct< void * > > * | density_root |
The other solver for calc_density(). | |
Static Protected Attributes | |
static double ** | Pmnf |
The matrix of coefficients. | |
static double | parma |
The parameter ![]() | |
static int | sizem |
The array row size. | |
static int | sizen |
The array column size. |
virtual int calc_mu | ( | const double | temper | ) | [virtual] |
Calculate thermodynamic properties as function of chemical potential.
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.
Reimplemented from fermion.
Reimplemented in eff_quark.
virtual int calc_density | ( | const double | temper | ) | [virtual] |
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page