Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
o2scl::boson_eff Class Reference

Boson class from fitting method. More...

#include <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 $ \psi $.
 
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 $ \psi $.
 

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 $ 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.
 
mrootdensity_mroot
 The solver for calc_density()
 
rootpsi_root
 The solver to compute $ h $ from $ \psi $.
 

Detailed Description

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:

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::nu .

Todo:
Improve documentation

Definition at line 86 of file boson_eff.h.

Member Function Documentation

◆ load_coefficients()

int o2scl::boson_eff::load_coefficients ( int  ctype)

Presently acceptable values of fn are: bosejel21, bosejel22, bosejel34, and bosejel34cons from Johns96.


The documentation for this class was generated from the following file:

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).