Boson class from fitting method. More...
#include <boson_eff.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 o2scl::boson_rel.
Given the chemical potential and the temperature the functions calc_mu() and pair_mu() work by solving the equation (c.f. Eq. 26 in Johns96)
for given
. The pressure, energy density, and entropy, are determined as polynomials in
with a set of precomputed coefficients as done in Johns96 .
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 (the polynomial produces spurious solutions) 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 86 of file boson_eff.h.
Public Types | |
typedef boost::numeric::ublas::vector< double > | ubvector |
typedef boost::numeric::ublas::matrix< double > | ubmatrix |
Public Member Functions | |
boson_eff () | |
Create a boson with mass m and degeneracy g . | |
int | load_coefficients (int ctype) |
Load coefficients for finite-temperature approximation. More... | |
virtual void | calc_mu (boson &b, double temper) |
Calculate thermodynamic properties as function of chemical potential. | |
virtual void | calc_density (boson &b, double temper) |
Calculate thermodynamic properties as function of density. | |
virtual void | pair_mu (boson &b, double temper) |
Calculate thermodynamic properties with antiparticles as function of chemical potential. | |
virtual void | pair_density (boson &b, double temper) |
Calculate thermodynamic properties with antiparticles as function of density. | |
void | set_psi_root (root<> &rp) |
Set the solver for use in calculating ![]() | |
void | set_density_mroot (mroot<> &rp) |
Set the solver for use in calculating the chemical potential from the density. | |
virtual const char * | type () |
Return string denoting type ("boson_eff") | |
Public Attributes | |
mroot_hybrids | def_density_mroot |
The default solver for calc_density() and pair_density() | |
root_cern | def_psi_root |
The default solver for ![]() | |
Static Public Attributes | |
static const int | cf_bosejel21 =2 |
A set of coefficients from Johns96. | |
static const int | cf_bosejel22 =3 |
A set of coefficients from Johns96. | |
static const int | cf_bosejel34 =4 |
A set of coefficients from Johns96 (default) | |
static const int | cf_bosejel34cons =5 |
The set of coefficients from Johns96 which retains better thermodynamic consistency. | |
Protected Member Functions | |
double | solve_fun (double x, double psi) |
The function which solves for ![]() ![]() | |
int | density_fun (size_t nv, const ubvector &x, ubvector &y, boson &b, double T) |
Fix density for calc_density() | |
int | pair_density_fun (size_t nv, const ubvector &x, ubvector &y, boson &b, double T) |
Fix density for pair_density() | |
Protected Attributes | |
ubmatrix | Pmnb |
The coefficients. | |
int | sizem |
The number of coefficient rows. | |
int | sizen |
The number of coefficient columns. | |
double | parma |
The parameter, ![]() | |
double | fix_density |
Temporary storage. | |
mroot * | density_mroot |
The solver for calc_density() | |
root * | psi_root |
The solver to compute ![]() ![]() | |
int o2scl::boson_eff::load_coefficients | ( | int | ctype | ) |
Presently acceptable values of fn
are: bosejel21
, bosejel22
, bosejel34
, and bosejel34cons
from Johns96.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).