teqp 0.22.0
Loading...
Searching...
No Matches
constants.hpp
Go to the documentation of this file.
1#pragma once
2
3namespace teqp {
4
5namespace constants{
6
7const double R_CODATA2002 = 8.314472;
8const double R_CODATA2006 = 8.314472;
9const double R_CODATA2010 = 8.3144621;
10const double R_CODATA2017 = 8.31446261815324;
11
12const double N_A = 6.02214076e23;
13const double k_B = 1.380649e-23;
14const double epsilon_0 = 8.8541878128e-12;
15const double PI = 3.141592653589793238462643383279502884197;
16const double k_e = 1.0/(4.0*PI*epsilon_0);
17}
18 using constants::N_A; // Bring N_ into the teqp namespace
19
21 template<typename NumType>
22 auto get_R_gas() {
23 const NumType k_B = 1.380649e-23;
24 const NumType N_A_ = 6.02214076e23;
25 return static_cast<NumType>(N_A_ * k_B);
26 };
27
28}; // namespace teqp
const double PI
Definition constants.hpp:15
const double R_CODATA2006
molar gas constant from CODATA 2006: https://doi.org/10.1103/RevModPhys.80.633
Definition constants.hpp:8
const double epsilon_0
Vacuum permittivity (https://en.wikipedia.org/wiki/Vacuum_permittivity), in F/m, or C^2⋅N^−1⋅m^−2.
Definition constants.hpp:14
const double R_CODATA2017
molar gas constant from CODATA 2017: https://doi.org/10.1103/RevModPhys.84.1527
Definition constants.hpp:10
const double N_A
Avogadro's number.
Definition constants.hpp:12
const double R_CODATA2010
molar gas constant from CODATA 2010: https://doi.org/10.1103/RevModPhys.84.1527
Definition constants.hpp:9
const double k_e
Coulomb constant, with units of N m^2 / C^2.
Definition constants.hpp:16
const double R_CODATA2002
molar gas constant from CODATA 2002: https://doi.org/10.1103/RevModPhys.77.1
Definition constants.hpp:7
const double k_B
Boltzmann constant.
Definition constants.hpp:13
auto get_R_gas()
< Gas constant, according to CODATA 2019, in the given number type
Definition constants.hpp:22