Unit Conversion and Dimensional Analysis Library  2.3.0
A compile-time c++14 unit conversion library
units::constants Namespace Reference

namespace for physical constants like PI and Avogadro's Number. More...

Unit Containers

using PI = unit< std::ratio< 1 >, dimensionless::scalar, std::ratio< 1 > >
 
static constexpr const unit_t< PIpi (1)
 Ratio of a circle's circumference to its diameter.
 
static constexpr const velocity::meters_per_second_t c (299792458.0)
 Speed of light in vacuum.
 
static constexpr const unit_t< compound_unit< cubed< length::meters >, inverse< mass::kilogram >, inverse< squared< time::seconds > > > > G (6.67408e-11)
 Newtonian constant of gravitation.
 
static constexpr const unit_t< compound_unit< energy::joule, time::seconds > > h (6.626070040e-34)
 Planck constant.
 
static constexpr const unit_t< compound_unit< force::newtons, inverse< squared< current::ampere > > > > mu0 (pi *4.0e-7 *force::newton_t(1)/units::math::cpow< 2 >(current::ampere_t(1)))
 vacuum permeability.
 
static constexpr const unit_t< compound_unit< capacitance::farad, inverse< length::meter > > > epsilon0 (1.0/(mu0 *math::cpow< 2 >(c)))
 vacuum permitivity.
 
static constexpr const impedance::ohm_t Z0 (mu0 *c)
 characteristic impedance of vacuum.
 
static constexpr const unit_t< compound_unit< force::newtons, area::square_meter, inverse< squared< charge::coulomb > > > > k_e (1.0/(4 *pi *epsilon0))
 Coulomb's constant.
 
static constexpr const charge::coulomb_t e (1.6021766208e-19)
 elementary charge.
 
static constexpr const mass::kilogram_t m_e (9.10938356e-31)
 electron mass.
 
static constexpr const mass::kilogram_t m_p (1.672621898e-27)
 proton mass.
 
static constexpr const unit_t< compound_unit< energy::joules, inverse< magnetic_field_strength::tesla > > > mu_B (e *h/(4 *pi *m_e))
 Bohr magneton.
 
static constexpr const unit_t< inverse< substance::mol > > N_A (6.022140857e23)
 Avagadro's Number.
 
static constexpr const unit_t< compound_unit< energy::joules, inverse< temperature::kelvin >, inverse< substance::moles > > > R (8.3144598)
 Gas constant.
 
static constexpr const unit_t< compound_unit< energy::joules, inverse< temperature::kelvin > > > k_B (R/N_A)
 Boltzmann constant.
 
static constexpr const unit_t< compound_unit< charge::coulomb, inverse< substance::mol > > > F (N_A *e)
 Faraday constant.
 
static constexpr const unit_t< compound_unit< power::watts, inverse< area::square_meters >, inverse< squared< squared< temperature::kelvin > > > > > sigma ((2 *math::cpow< 5 >(pi) *math::cpow< 4 >(R))/(15 *math::cpow< 3 >(h) *math::cpow< 2 >(c) *math::cpow< 4 >(N_A)))
 Stefan-Boltzmann constant.
 

Detailed Description

namespace for physical constants like PI and Avogadro's Number.

See also
See unit_t for more information on unit type containers.