Class eos_leptons (o2scl)

O2scl : Class List

class eos_leptons

Lepton and photon EOS.

The function pair_density_eq() computes the thermodynamic functions of the electrons and muons in in weak equilibrium, i.e. when \( \mu_e = \mu_{\mu} \). The inputs to this function are the temperature and the total charge density, i.e. the sum of the electron, positron, muon, and antimuon densities, There are two methods to solve for weak equilibrium. The first is to use the electron density as a variable, use the electron density to compute the electron chemical potential, and then use the muon chemical potential to compare the muon density and solve the equation \( n_e + n_{\mu} = n_q \). This method is used if pde_from_density is true (the default). The second is to use the electron chemical potential as a variable and then compute the electron density from that. It is unclear which method is more stable or accurate.

Subclassed by o2scl::eos_leptons_multip

Internal particle objects [protected]

fermion_deriv_rel fdrel

Relativistic fermion thermodynamics with derivatives.

Accuracy control

int accuracy

Accuracy flag.

static const int acc_default = 0

Default accuracy.

static const int acc_improved = 1

Improved accuracy.

static const int acc_ld = 2

Use long double internally.

static const int acc_fp_25 = 3

Use 25-digit floating point numbers internally.

Particle objects

fermion e

Electron.

part_deriv_press ed

Electron derivatives.

fermion mu

Muon.

fermion tau

Tau.

fermion nu_e

Electron neutrino.

fermion nu_mu

Muon neutrino.

fermion nu_tau

Tau neutrino.

part_deriv_press mud

Muon derivatives.

boson ph

Photon.

part_deriv_press phd

Photon derivatives.

thermo th

Thermodynamic quantities for the full EOS.

part_deriv_press thd

Photon derivatives.

Settings

bool pde_from_density

If true, use the electron density for pair_density_eq_fun() (default true)

bool err_nonconv

If true, call the error handler if msolve() does not converge (default true)

bool include_muons

If true, include muons (default true)

bool include_photons

If true, include photons (default false)

bool include_deriv

If true, include derivatives (default false)

int verbose

Verbosity parameter (default 0)

inline void improved_acc()

High accuracy.

inline void default_acc()

Default accuracy.

inline void ld_acc()

Use long double arithmetic to improve precision.

inline void fp_25_acc()

Use 25-digit precision to improve precision.

Other objects

mroot_hybrids mh

Solver for pair_density_eq()

fermion_rel frel

Relativistic fermion thermodynamics.

Internal functions [protected]

virtual int electron_density(double T)

Compute electron thermodynamics from the electron density.

Because this function uses fermion_rel::pair_density(), the current electron chemical potential (from e) is used as an initial guess.

The temperature should be in units of \( 1/\mathrm{fm} \) .

Note

This internal function is designed to be used when the flag fermion_rel::err_nonconv for the frel object is set to false . If this function fails, it returns a non-zero value rather than calling the error handler. This allows it to be used inside pair_density_eq_fun(). Thus this function is protected instead of public.

virtual int pair_density_eq_fun(size_t nv, const ubvector &x, ubvector &y, double T, double nq)

Function to solve for pair_density_eq()

The temperature should be in units of \( 1/\mathrm{fm} \) .

The value x is used for the electron density or chemical potential, depending on the value of pde_from_density .

The value

\[ \frac{\left(n_e + n_{\mu} - n_q\right)}{|n_q|} \]
is stored in y.

Note

This internal function presumes that include_muons is true (otherwise there’s nothing to solve) and that the fermion_rel::err_nonconv flag in the frel object is set to false .

Constructor

eos_leptons()
inline virtual ~eos_leptons()

Main methods

int pair_mu(double T)

Thermodynamics from the electron and muon chemical potentials.

The temperature should be in units of \( 1/\mathrm{fm} \) .

int pair_mu_eq(double T)

Thermodynamics from the electron chemical potential in weak equilibrium.

When include_muons is false, this function is essentially equivalent to pair_mu().

The temperature should be in units of \( 1/\mathrm{fm} \) .

int pair_density(double T)

Thermodynamics from the electron and muon densities.

The temperature should be in units of \( 1/\mathrm{fm} \) . The electron and muon densities should be stored in the part::n field of e and mu (in units of \( 1/\mathrm{fm}^3 \) before calling this function.

If include_muons is false, then muons are ignored.

The current values of the electron and muon chemical potentials are used as initial guesses to fermion_rel::pair_density() for both the electrons and (if included) muons.

The final total energy density, pressure, and entropy are stored in th.

int pair_density_eq(double nq, double T)

Thermodynamics from the charge density in weak equilibrium.

The first argument nq, is the total negative charge density including electrons (and muons if include_muons is true) and T is the temperature.

When include_muons is false, this function is essentially equivalent to pair_density() using nq for the electron density.

The charge density should be in units of \( 1/\mathrm{fm}^{-3} \) and the temperature should be in units of \( 1/\mathrm{fm} \).

The current values of the electron chemical potential potentials is used as initial guess. If pde_from_density is true, then the current value of the electron density is also used as an initial guess.

Public Types

typedef boost::numeric::ublas::vector<double> ubvector