advanced radiative transfer in dusty systems
Constants Namespace Reference


constexpr double amu ()
constexpr double AU ()
constexpr double c ()
constexpr double EinsteinALya ()
constexpr double h ()
constexpr double k ()
constexpr double lambdaIon ()
constexpr double lambdaLya ()
constexpr double Lsun ()
constexpr double Melectron ()
constexpr double Mproton ()
constexpr double Msun ()
constexpr double NA ()
constexpr double pc ()
constexpr double Qelectron ()
constexpr double sigmaThomson ()
constexpr double Tcmb ()
constexpr double year ()

Detailed Description

The Constants namespace offers functions that return the value of physical constants or units used in astronomy. Other parts of the code should use these functions rather than defining the values locally. All functions are defined inline as constexpr to avoid runtime overhead.

Function Documentation

◆ amu()

constexpr double Constants::amu ( )

This function returns the mass of an atomic mass unit (1/12 of the mass of an unbound neutral atom of carbon-12 in its nuclear and electronic ground state and at rest).

◆ AU()

constexpr double Constants::AU ( )

This function returns the distance of one astronomical unit.

◆ c()

constexpr double Constants::c ( )

This function returns the speed of light \(c\).

◆ EinsteinALya()

constexpr double Constants::EinsteinALya ( )

This function returns the Einstein A-coefficient of the Lyman-alpha transition.

◆ h()

constexpr double Constants::h ( )

This function returns Planck's constant \(h\).

◆ k()

constexpr double Constants::k ( )

This function returns the Boltzmann constant \(k\).

◆ lambdaIon()

constexpr double Constants::lambdaIon ( )

This function returns the ionization wavelength of atomic hydrogen.

◆ lambdaLya()

constexpr double Constants::lambdaLya ( )

This function returns the central wavelength of the hydrogen Lyman-alpha transition.

◆ Lsun()

constexpr double Constants::Lsun ( )

This function returns the solar bolometric luminosity without neutrino radiation.

◆ Melectron()

constexpr double Constants::Melectron ( )

This function returns the rest mass of the electron.

◆ Mproton()

constexpr double Constants::Mproton ( )

This function returns the rest mass of the proton.

◆ Msun()

constexpr double Constants::Msun ( )

This function returns the solar mass.

◆ NA()

constexpr double Constants::NA ( )

This function returns the Avogadro constant \(N_\text{A}\), i.e. the number of atoms or molecules in one mole of a given substance.

◆ pc()

constexpr double Constants::pc ( )

This function returns the distance of one parsec.

◆ Qelectron()

constexpr double Constants::Qelectron ( )

This function returns the electric charge of an electron in coulombs, which is equivalent to the value of 1 eV in joules.

◆ sigmaThomson()

constexpr double Constants::sigmaThomson ( )

This function returns the Thomson cross section for an electron.

◆ Tcmb()

constexpr double Constants::Tcmb ( )

This function returns the average temperature of the cosmic microwave background (CMB) in the Local Universe.

◆ year()

constexpr double Constants::year ( )

This function returns the length of a Julian year in seconds. A Julian year has exactly 365.25 days of exactly 86400 seconds each.