Go to the documentation of this file.
23 #ifndef O2SCL_CLASSICAL_H
24 #define O2SCL_CLASSICAL_H
35 #include <boost/math/constants/constants.hpp>
37 #include <o2scl/constants.h>
38 #include <o2scl/mroot.h>
39 #include <o2scl/inte.h>
40 #include <o2scl/part.h>
42 #ifndef DOXYGEN_NO_O2NS
68 pi=boost::math::constants::pi<fp_t>();
103 if ((p.
nu-p.
m)/temper<std::numeric_limits<fp_t>::min_exponent10) {
108 p.
ed=1.5*temper*p.
n+p.
n*p.
m;
110 if (p.
nu/temper<std::numeric_limits<fp_t>::min_exponent10) {
132 if (p.
n<0.0 || temper<0.0) {
133 O2SCL_ERR2(
"Density or temperature less than zero in ",
134 "classical_thermo::calc_density().",
exc_einval);
169 p.
ed=1.5*temper*p.
n+p.
n*p.
m;
185 virtual const char *
type() {
return "classical_thermo"; }
193 #ifndef DOXYGEN_NO_O2NS
virtual void calc_density(part_tl< fp_t > &p, fp_t temper)
Calculate properties as function of density.
classical_thermo_tl()
Create a classical particle with mass m and degeneracy g.
fp_t mu
Chemical potential.
fp_t ms
Effective mass (Dirac unless otherwise specified)
#define O2SCL_ERR2(d, d2, n)
bool non_interacting
True if the particle is non-interacting (default true)
fp_t g
Degeneracy (e.g. spin and color if applicable)
bool inc_rest_mass
If true, include the mass in the energy density and chemical potential (default true)
virtual const char * type()
Return string denoting type ("classical_thermo")
virtual void calc_mu(part_tl< fp_t > &p, fp_t temper)
Calculate properties as function of chemical potential.
Classical particle class.
fp_t nu
Effective chemical potential.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).