Project
Loading...
Searching...
No Matches
constants.h
Go to the documentation of this file.
1
7
8#pragma once
9#include <SI/units.h>
10#define CONST(_name, _value, _base_unit) const auto _name = _base_unit(_value)
11
12namespace SI { namespace constant {
13
14 // 1. Defined Constants
15 // --------------------
16 CONST(caesium_frequency, 9'192'631'770, hertz); // the unperturbed ground state hyperfine transition frequency of the ceesium-133 atom
17 CONST(delta_v_Cs, 9'192'631'770, hertz); // (the symbol)
18 CONST(speed_of_light_in_vacuum,299'792'458.0, meters_per_second); // the speed of light in vacuum
19 CONST(c, 299'792'458.0, meters_per_second); // (the symbol)
20 CONST(Planck, 6.626'070'15e-34, jouleseconds); // the Planck constant
21 CONST(h, 6.626'070'15e-34, jouleseconds); // (the symbol)
22 CONST(elementary_charge, 1.602'176'634e-19, coulombs); // the elementary charge
23 CONST(e, 1.602'176'634e-19, coulombs); // (the symbol)
24 CONST(Boltzmann, 1.380'649e-23, joules_per_kelvin); // the Boltzmann constant
25 CONST(k, 1.380'649e-23, joules_per_kelvin); // (the symbol)
26 CONST(N_A, 6.02214076e23, per_mol); // the Avogadro constant
27 CONST(K_cd, 683, lumens_per_watt); // the luminous efficacy of monochromatic radiation of frequency 540 THz
28 CONST(g_n, 9.806'65, meters_per_second2); // standard acceleration of gravity (2022 CODATA)
29 CONST(atm, 101'325, pascals); // standard atmosphere (2022 CODATA)
30 CONST(ssp, 100'000, pascals); // standard-state pressure (2022 CODATA)
31
32 // 2. Universal Constants
33 // ----------------------
34 CONST(G, 6.67430e-11, meters3_per_kilogram_per_second2); // Newtonian constant of gravitation (2022 CODATA)
35 CONST(Z_0, 376.730'313'412, ohms); // characteristic impedance of vacuum (2022 CODATA)
36 CONST(epsilon_0, 8.854'187'8188e-12, farads_per_meter); // vacuum electric permittivity, symbol: ε_0, 2022 CODATA)
37 CONST(l_P, 1.616255e-35, meters); // Planck length (2022 CODATA)
38 CONST(m_P, 2.176434e-8, kilograms); // Planck mass (2022 CODATA)
39 CONST(T_P, 1.416784e32, kelvins); // Planck temperature (2022 CODATA)
40 CONST(t_P, 5.391247e-44, seconds); // Planck time (2022 CODATA)
41 CONST(h_bar, 1.054'571'817e-34, jouleseconds); // reduced Planck constant (2022 CODATA)
42 CONST(mu_0, 1.256'637'061'27e-6, newtons_per_ampere2); // vacuum magnetic permeability (2022 CODATA)
43
44 // 3. Electromagnetic Constants
45 // ----------------------------
46 CONST(G_0, 7.748'091'729e-5, siemens); // conductance quantum (2022 CODATA)
47 CONST(G_0_inv, 12906.40372, ohms); // inverse conductance quantum
48 CONST(K_J, 483'597.848'4e9, hertz_per_volt); // Josephson constant (2022 CODATA)
49 CONST(mu_B, 9.274'010'0657e-24, joules_per_tesla); // Bohr magneton (symbol: µB, 2022 CODATA)
50 CONST(mu_N, 5.050'783'7393e-27, joules_per_tesla); // nuclear magneton (symbol: μ_N, 2022 CODATA))
51 CONST(Phi_0, 2.067833848e-15, webers); // magnetic flux quantum (symbol: Φ_0)
52 CONST(R_K, 25'812.807'45, ohms); // von Klitzing constant (2022 CODATA)
53 CONST(R_Km90, 25812.807, ohms); // conventional value of von Klitzing constant
54
55 // 4. Atomic & Nuclear Constants
56 // -----------------------------
57 CONST(a_0, 5.291'772'105'44e-11, meters); // Bohr radius (2022 CODATA)
58 CONST(alpha, 7.2973525e-3, dimensionless); // fine-structure constant
59 CONST(alpha_inv, 137.035'999'177, dimensionless); // inverse fine-structure constant (2022 CODATA)
60 CONST(E_h, 4.3597447222e-18, joules); // Hartree energy
61 CONST(g_e, -2.00231930436256, dimensionless); // electron g-factor
62 CONST(h_2me, 3.6369475e-4, meters2_per_second); // quantum of circulation
63 CONST(m_e, 9.109'383'7139e-31, kilograms); // electron mass (2022 CODATA)
64 CONST(m_d, 3.343'583'7768e-27, kilograms); // deuteron mass (2022 CODATA)
65 CONST(m_h, 5.006'412'7862e-27, kilograms); // helion mass (2022 CODATA)
66 CONST(m_mu, 1.883'531'627e-28, kilograms); // muon mass (2022 CODATA)
67 CONST(m_n, 1.674'927'500'56e-27, kilograms); // neutron mass (2022 CODATA)
68 CONST(m_p, 1.672'621'925'95e-27, kilograms); // proton mass (2022 CODATA)
69 CONST(m_tau, 3.167'54e-27, kilograms); // tau mass (2022 CODATA)
70 CONST(m_t, 5.007'356'7512e-27, kilograms); // triton mass (2022 CODATA)
71 CONST(r_e, 2.817'940'3205e-15, meters); // classical electron radius (2022 CODATA)
72 CONST(R_inf, 10'973'731.568'157, per_meter); // Rydberg constant (2022 CODATA)
73 CONST(sin2Theta_W, 0.22290, dimensionless); // weak mixing angle
74 CONST(sigma_e, 6.6524587e-29, meters2); // Thomson cross section (symbol: σ_e)
75
76 // 5. Physico-chemical Constants
77 // -----------------------------
78 CONST(b, 2.897771955e-3, meter_kelvins); // Wien wavelength displacement law constant
79 CONST(c_1, 3.741771852e-16, wattmeters2); // first radiation constant
80 CONST(c_1L, 1.191042972e-16, watts_per_meter2); // first radiation constant for spectral radiance
81 CONST(F, 96'485.332'12, coulombs_per_mol); // Faraday constant (2022 CODATA)
82 CONST(m_u, 1.660'539'068'9252e-27, kilograms); // atomic mass constant (2022 CODATA)
83 CONST(M_u, 1.000'000'001'05e-3, kilograms_per_mol); // molar mass constant (2022 CODATA)
84 CONST(R, 8.314'462'618, joules_per_kelvin_per_mol); // molar gas constant (2022 CODATA)
85 CONST(R_dry_air, 287.050'0676, joules_per_kilogram_per_kelvin); // specific gas constant for dry air
86 CONST(S_0_by_R, -1.15170753706, dimensionless); // Sackur–Tetrode constant
87 CONST(V_m, 22.710'954'64e-3, meters3_per_mol); // molar volume of ideal gas (273.15K, 100kPa, 2022 CODATA)
88
89 // 6. Physical Constants
90 // ---------------------
91 CONST(gravitational_constant,6.6743015e-11, meters3_per_kilogram_per_second2);
92 CONST(Earth_gravity, 9.80665, meters_per_second2); // standard gravitational acceleration (G) for the surface of the Earth, defined in the third General Conference on Weights and Measures (1901, CR 70).
93 CONST(speed_of_sound, 343, meters_per_second); // speed of sound in dry air at 20°C (68°F)
94 CONST(speed_of_sound_in_fresh_water, 1481, meters_per_second); // at 20°C (68°F)
95 CONST(speed_of_sound_in_iron, 5120, meters_per_second);
96 CONST(speed_of_sound_in_diamonds, 12'000, meters_per_second);
97
98 // 7. Mathematical Constants
99 // -------------------------
100 CONST(tau, 6.28318530717958647692, radians); // (symbol: τ)
101 CONST(pi, 3.14159265358979323846, radians); // (symbol: π)
102 CONST(half_pi, 1.57079632679489661923, radians); // (π / 2)
103 CONST(quarter_pi, 0.78539816339744830961, radians); // (π / 4)
104 CONST(phi, 1.61803398874989484820, dimensionless); // (symbol: φ)
105 CONST(Eulers_number,2.71828182845904523536, dimensionless);
106
107 // 8. Astronomical Constants
108 // -------------------------
109 CONST(AU, 149'597'870'691, meters); // one astronomical unit (symbol: au)
110 CONST(parsec, 30'856'775'814'913'700, meters); // one Parsec (symbol: pc)
111 CONST(lightyear, 9'460'730'777'119'564, meters); // one light-year (symbol: ly)
112
113 // 9. Various Constants
114 // --------------------
115 CONST(T0, 0, kelvins); // absolute zero (-273.15°C, the lowest possible temperature)
116 CONST(Marathon_distance, 42'195, meters);
117 CONST(quarter_mile, 402.34, meters);
118
119 // 10. References
120 // --------------
121 // 1. https://en.wikipedia.org/wiki/International_System_of_Units
122 // 2. https://en.wikipedia.org/wiki/List_of_physical_constants
123 // 3. https://en.wikipedia.org/wiki/List_of_mathematical_constants
124 // 4. https://en.wikipedia.org/wiki/Astronomical_constant
125 // 5. https://codata.org - CODATA: the committee on data of the International Science Council (ISC)
126
127} } // end of namespace SI::constant
128
129#undef CONST
#define CONST(_name, _value, _base_unit)
Definition constants.h:10
Definition constants.h:12
Definition constants.h:12
double dimensionless
to hold a quantity without any unit, e.g. 42
Definition datatypes.h:18
angle radians
basic unit of radians for angle
Definition internal.h:15
Defines 103 type-safe units, e.g. SI::meters.