![]() |
Particles and Nuclei Sub-Library: Version 0.910
|
Fermion class from fitting method. More...
#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 (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 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. 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 102 of file eff_fermion.h.
Data Structures | |
class | density_fun |
Define the function which solves for the chemical potential given the density [protected subclass of eff_fermion]. More... | |
class | pair_density_fun |
Define the function which solves for the chemical potential given the density of particles and antiparticles [protected subclass of eff_fermion]. More... | |
Public Member Functions | |
eff_fermion () | |
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. | |
virtual void | calc_density (fermion &f, double temper) |
Calculate thermodynamic properties as function of density. | |
virtual void | pair_mu (fermion &f, double temper) |
Calculate thermodynamic properties with antiparticles as function of chemical potential. | |
virtual void | pair_density (fermion &f, double temper) |
Calculate thermodynamic properties with antiparticles as function of density. | |
int | set_psi_root (root< funct > &rp) |
Set the solver for use in calculating ![]() | |
int | set_density_root (root< funct > &rp) |
Set the solver for use in calculating the chemical potential from the density. | |
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< funct > | def_psi_root |
The default solver for ![]() | |
cern_mroot_root< funct > | def_density_root |
The default solver for calc_density() and pair_density() | |
double | min_psi |
The minimum value of ![]() | |
Protected Member Functions | |
double | solve_fun (double x, double &psi) |
The function which solves for ![]() ![]() | |
Protected Attributes | |
umatrix | Pmnf |
The matrix of coefficients. | |
double | parma |
The parameter ![]() | |
int | sizem |
The array row size. | |
int | sizen |
The array column size. | |
root< funct > * | psi_root |
The solver for ![]() | |
root< funct > * | density_root |
The other solver for calc_density() | |
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. |
void eff_fermion::load_coefficients | ( | int | ctype | ) |
The argument ctype
Should be one of the constants below.
virtual void eff_fermion::calc_mu | ( | fermion & | f, |
double | temper | ||
) | [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 fermion_eval_thermo.
virtual void eff_fermion::calc_density | ( | fermion & | f, |
double | temper | ||
) | [virtual] |
Implements fermion_eval_thermo.
virtual void eff_fermion::pair_mu | ( | fermion & | f, |
double | temper | ||
) | [virtual] |
Implements fermion_eval_thermo.
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).