Functions | |
constexpr double | amu () |
constexpr double | AU () |
constexpr double | c () |
constexpr double | EinsteinALya () |
constexpr double | EinsteinASpinFlip () |
constexpr double | h () |
constexpr double | k () |
constexpr double | lambdaIon () |
constexpr double | lambdaLya () |
constexpr double | lambdaSpinFlip () |
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 () |
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.
|
constexpr |
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).
|
constexpr |
This function returns the distance of one astronomical unit.
|
constexpr |
This function returns the speed of light
|
constexpr |
This function returns the Einstein A-coefficient of the Lyman-alpha transition.
|
constexpr |
This function returns the Einstein A-coefficient of the hydrogen spinflip transition.
|
constexpr |
This function returns Planck's constant
|
constexpr |
This function returns the Boltzmann constant
|
constexpr |
This function returns the ionization wavelength of atomic hydrogen.
|
constexpr |
This function returns the central wavelength of the hydrogen Lyman-alpha transition.
|
constexpr |
This function returns the central wavelength of the hydrogen spinflip transition.
|
constexpr |
This function returns the solar bolometric luminosity without neutrino radiation.
|
constexpr |
This function returns the rest mass of the electron.
|
constexpr |
This function returns the rest mass of the proton.
|
constexpr |
This function returns the solar mass.
|
constexpr |
This function returns the Avogadro constant
|
constexpr |
This function returns the distance of one parsec.
|
constexpr |
This function returns the electric charge of an electron in coulombs, which is equivalent to the value of 1 eV in joules.
|
constexpr |
This function returns the Thomson cross section for an electron.
|
constexpr |
This function returns the average temperature of the cosmic microwave background (CMB) in the Local Universe.
|
constexpr |
This function returns the length of a Julian year in seconds. A Julian year has exactly 365.25 days of exactly 86400 seconds each.