Class boson_eff (o2scl)

O2scl : Class List

class boson_eff : public o2scl::boson_thermo_tl<be_inte_t, fp_t>

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 Johns et al. (1996))

\[ \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 Johns et al. (1996) .

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 degeneracy g.

virtual ~boson_eff()
int load_coefficients(int ctype)

Load coefficients for finite-temperature approximation.

Presently acceptable values of fn are: bosejel21, bosejel22, bosejel34, and bosejel34cons from Johns et al. (1996).

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.

inline void set_psi_root(root<> &rp)

Set the solver for use in calculating \( \psi \).

inline void set_density_mroot(mroot<> &rp)

Set the solver for use in calculating the chemical potential from the density.

inline virtual 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

static const int cf_bosejel21 = 2

A set of coefficients from Johns et al. (1996)

static const int cf_bosejel22 = 3

A set of coefficients from Johns et al. (1996)

static const int cf_bosejel34 = 4

A set of coefficients from Johns et al. (1996) (default)

static const int cf_bosejel34cons = 5

The set of coefficients from Johns et al. (1996) 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

ubmatrix Pmnb

The coefficients.

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 \).