Class boson_eff (o2scl)¶
-
class
o2scl
::
boson_eff
: public o2scl::boson_thermo¶ Boson class from fitting method.
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)
\[ \psi = \frac{h}{(h+\sqrt{a})} - \ln \left( \frac{h+\sqrt{a}}{\sqrt{a}}\right) \]for \( h \) given \( \psi=(\mu-m)/T \). The pressure, energy density, and entropy, are determined as polynomials in \( h \) 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:
use the density to solve for \( f \) , or
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 (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::mu or, if part::non_interacting is false, from part::nu .
Public Types
-
typedef boost::numeric::ublas::vector<double>
ubvector
¶
-
typedef boost::numeric::ublas::matrix<double>
ubmatrix
¶
Public Functions
-
boson_eff
()¶ Create a boson with mass
m
and degeneracyg
.
-
~boson_eff
()¶
-
int
load_coefficients
(int ctype)¶ Load coefficients for finite-temperature approximation.
Presently acceptable values of
fn
are:bosejel21
,bosejel22
,bosejel34
, andbosejel34cons
from Johns96.
-
void
calc_mu
(boson &b, double temper)¶ Calculate thermodynamic properties as function of chemical potential.
-
void
calc_density
(boson &b, double temper)¶ Calculate thermodynamic properties as function of density.
-
void
pair_mu
(boson &b, double temper)¶ Calculate thermodynamic properties with antiparticles as function of chemical potential.
-
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 \( \psi \).
-
void
set_density_mroot
(mroot<> &rp)¶ Set the solver for use in calculating the chemical potential from the density.
-
const char *
type
()¶ Return string denoting type (“boson_eff”)
Public Members
-
mroot_hybrids
def_density_mroot
¶ The default solver for calc_density() and pair_density()
-
root_cern
def_psi_root
¶ The default solver for \( \psi \).
Public Static Attributes
-
const int
cf_bosejel21
= 2¶ A set of coefficients from Johns96.
-
const int
cf_bosejel22
= 3¶ A set of coefficients from Johns96.
-
const int
cf_bosejel34
= 4¶ A set of coefficients from Johns96 (default)
-
const int
cf_bosejel34cons
= 5¶ The set of coefficients from Johns96 which retains better thermodynamic consistency.
Protected Functions
-
double
solve_fun
(double x, double psi)¶ The function which solves for \( h \) from \( \psi \).
-
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
-
int
sizem
¶ The number of coefficient rows.
-
int
sizen
¶ The number of coefficient columns.
-
double
parma
¶ The parameter, \( a \).
-
double
fix_density
¶ Temporary storage.
-
mroot *
density_mroot
¶ The solver for calc_density()
-
root *
psi_root
¶ The solver to compute \( h \) from \( \psi \).