ARTS 2.5.10 (git: 2f1c442c)
Constant Namespace Reference

Namespace containing several constants, physical and mathematical. More...

Variables

constexpr Numeric pi = std::numbers::pi
 The following mathematical constants are generated in python Decimal package by the code:
 
constexpr Numeric inv_pi = std::numbers::inv_pi
 Inverse of pi.
 
constexpr Numeric two_pi = 2 * pi
 Two times pi.
 
constexpr Numeric inv_two_pi = 0.5 * inv_pi
 Inverse of two pi.
 
constexpr Numeric sqrt_pi = 1.0/std::numbers::inv_sqrtpi
 Square root of pi.
 
constexpr Numeric inv_sqrt_pi = std::numbers::inv_sqrtpi
 Inverse of the square root of pi.
 
constexpr Numeric euler = std::numbers::e
 Euler's number.
 
constexpr Numeric inv_euler = 1.0 / euler
 Inverse of Euler's number.
 
constexpr Numeric log10_euler = std::numbers::log10e
 Ten's logarithm of Euler's number.
 
constexpr Numeric ln_10 = std::numbers::ln10
 Natural logarithm of 10.
 
constexpr Numeric sqrt_2 = std::numbers::sqrt2
 Square root of 2.
 
constexpr Numeric inv_sqrt_2 = 1.0 / sqrt_2
 Inverse of the square root of 2.
 
constexpr Numeric ln_2 = std::numbers::ln2
 Natural logarithm of 2.
 
constexpr Numeric inv_ln_2 = 1.0 / ln_2
 Inverse of the natural logarithm of 2.
 
constexpr Numeric sqrt_ln_2
 Square root of natural logarithm of 2.
 
constexpr Numeric inv_sqrt_ln_2
 Inverse of the square root of the natural logarithm of 2.
 
constexpr Numeric Delta_nu_Cs = 9192631770
 Cesium-133 Unperturbed ground-state hyperfine transition frequency [Hz] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 2019-04-01.
 
constexpr Numeric speed_of_light = 299792458
 Speed of light [m/s] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 2019-04-01.
 
constexpr Numeric c = speed_of_light
 Speed of light convenience name [m/s].
 
constexpr Numeric planck_constant = 6.62607015e-34
 Planck constant [J s] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 2019-04-01.
 
constexpr Numeric h = planck_constant
 Planck constant convenience name [J s].
 
constexpr Numeric reduced_planck_constant = h * inv_two_pi
 Reduced planck constant [J s].
 
constexpr Numeric h_bar = reduced_planck_constant
 Reduced planck constant convenience name [J s].
 
constexpr Numeric elementary_charge = 1.602176634e-19
 Elementary charge [C] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 2019-04-01.
 
constexpr Numeric e = elementary_charge
 Elementary charge convenience name [C].
 
constexpr Numeric boltzmann_constant = 1.380649e-23
 Boltzmann constant [J/K] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 2019-04-01.
 
constexpr Numeric k = boltzmann_constant
 Boltzmann constant convenience name [J/K].
 
constexpr Numeric avogadro_constant = 6.02214076e23
 Avogadro constant [1/mol] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 2019-04-01.
 
constexpr Numeric NA = avogadro_constant
 Avogadro constant convenience name [1/mol].
 
constexpr Numeric K_cd = 683
 Luminous efficacy of monochromatic 540 THz radiation [lm / W] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 2019-04-01.
 
constexpr Numeric fine_structure_constant = 7.2973525693e-3
 Fine structure constant [-] From: https://physics.nist.gov/cgi-bin/cuu/Value?alph Date: 2019-06-18 Reported error: (11)
 
constexpr Numeric alpha = fine_structure_constant
 Fine structure constant convenience name [-].
 
constexpr Numeric rydberg_constant = 10973731.568160
 Rydberg constant [1/m] From: https://physics.nist.gov/cgi-bin/cuu/Value?ryd Date: 2016-06-18 Reported error: (21)
 
constexpr Numeric R_inf = rydberg_constant
 Rydberg constant convenience name [1/m].
 
constexpr Numeric magnetic_constant = 2 * h * alpha / (c * Math::pow2(e))
 Magnetic constant [H/m].
 
constexpr Numeric mu_0 = magnetic_constant
 Magnetic constant convenience name [H/m].
 
constexpr Numeric vacuum_permittivity = Math::pow2(e) / (2 * h * c * alpha)
 Vacuum permittivity [F/m].
 
constexpr Numeric epsilon_0 = vacuum_permittivity
 Vacuum permittivity convenience name [F/m].
 
constexpr Numeric electron_mass = 2 * h * R_inf / (c * Math::pow2(alpha))
 Mass of resting electron [kg].
 
constexpr Numeric m_e = electron_mass
 Mass of resting electron convenience name [kg].
 
constexpr Numeric unified_atomic_mass_unit = 1.66053906660e-27
 Unified atomic mass unit [kg] From: https://physics.nist.gov/cgi-bin/cuu/Value?ukg Date: 2020-02-18 Reported error: (50)
 
constexpr Numeric m_u = unified_atomic_mass_unit
 Unified atomic mass unit convenience name [kg].
 
constexpr Numeric mass_ratio_electrons_per_proton = 1'836.152'673'43
 Mass ratio of electrons to protons [-] From: https://physics.nist.gov/cgi-bin/cuu/Value?mpsme Date: 2020-01-08 Reported error: (11)
 
constexpr Numeric proton_mass
 Mass of a proton [kg].
 
constexpr Numeric mass_ratio_electrons_per_neutron = 1'838.683'661'73
 Mass ratio of electrons to protons [-] From: https://physics.nist.gov/cgi-bin/cuu/Value?mnsme Date: 2020-01-08 Reported error: (89)
 
constexpr Numeric neutron_mass
 Mass of a neutron [kg].
 
constexpr Numeric bohr_magneton = e * h_bar / (2 * m_e)
 Bohr magneton [J/T].
 
constexpr Numeric ideal_gas_constant = k * NA
 Ideal gas constant [J/mol K].
 
constexpr Numeric R = ideal_gas_constant
 Ideal gas constant convenience name [J/mol K].
 
constexpr Numeric doppler_broadening_const_squared = 2'000 * R / Math::pow2(c)
 Doppler broadening constant squared [kg/T]^2.
 
constexpr Numeric one_degree_in_radians = pi / 180
 One degree in radians.
 
constexpr Numeric stefan_boltzmann_constant
 Stefan-Boltzmann constant [W/(K^4*m^2)].
 
constexpr Numeric sigma = stefan_boltzmann_constant
 Stefan-Boltzmann constant convenience name [W/(K^4*m^2)].
 
constexpr Numeric density_of_ice_at_0c = 0.9167e3
 Global constant, Density of water ice at 0C [kg/m3] source: http://en.wikipedia.org/wiki/Ice.
 
constexpr Numeric denity_of_water_at_4c = 1e3
 Global constant, Density of liquid water +4C [kg/m3] source: http://en.wikipedia.org/wiki/Water.
 
constexpr Numeric cosmic_microwave_background_temperature = 2.735
 Global constant, Planck temperature for cosmic background radiation [K].
 
constexpr Numeric earth_radius = 6.3781e6
 Global constant, the radius of the Earth [m].
 
constexpr Numeric temperature_at_0c = 273.15
 Global constant, Temperature in Celsius of 0 Kelvin.
 

Detailed Description

Namespace containing several constants, physical and mathematical.

Variable Documentation

◆ alpha

constexpr Numeric Constant::alpha = fine_structure_constant
inlineconstexpr

Fine structure constant convenience name [-].

Definition at line 195 of file arts_constants.h.

◆ avogadro_constant

constexpr Numeric Constant::avogadro_constant = 6.02214076e23
inlineconstexpr

Avogadro constant [1/mol] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 2019-04-01.

Definition at line 176 of file arts_constants.h.

◆ bohr_magneton

constexpr Numeric Constant::bohr_magneton = e * h_bar / (2 * m_e)
inlineconstexpr

Bohr magneton [J/T].

Definition at line 258 of file arts_constants.h.

Referenced by Zeeman::Model::Splitting().

◆ boltzmann_constant

constexpr Numeric Constant::boltzmann_constant = 1.380649e-23
inlineconstexpr

Boltzmann constant [J/K] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 2019-04-01.

Definition at line 167 of file arts_constants.h.

Referenced by setCji().

◆ c

◆ cosmic_microwave_background_temperature

constexpr Numeric Constant::cosmic_microwave_background_temperature = 2.735
inlineconstexpr

Global constant, Planck temperature for cosmic background radiation [K].

Author
Patrick Eriksson
Date
08.04.2000

Definition at line 297 of file arts_constants.h.

◆ Delta_nu_Cs

constexpr Numeric Constant::Delta_nu_Cs = 9192631770
inlineconstexpr

Cesium-133 Unperturbed ground-state hyperfine transition frequency [Hz] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 2019-04-01.

Definition at line 128 of file arts_constants.h.

◆ denity_of_water_at_4c

constexpr Numeric Constant::denity_of_water_at_4c = 1e3
inlineconstexpr

Global constant, Density of liquid water +4C [kg/m3] source: http://en.wikipedia.org/wiki/Water.

Author
Jana Mendrok
Date
2014-10-15

Definition at line 291 of file arts_constants.h.

◆ density_of_ice_at_0c

constexpr Numeric Constant::density_of_ice_at_0c = 0.9167e3
inlineconstexpr

Global constant, Density of water ice at 0C [kg/m3] source: http://en.wikipedia.org/wiki/Ice.

Author
Jana Mendrok
Date
2014-10-15

Definition at line 284 of file arts_constants.h.

◆ doppler_broadening_const_squared

constexpr Numeric Constant::doppler_broadening_const_squared = 2'000 * R / Math::pow2(c)
inlineconstexpr

Doppler broadening constant squared [kg/T]^2.

Definition at line 267 of file arts_constants.h.

Referenced by Absorption::Lines::DopplerConstant().

◆ e

constexpr Numeric Constant::e = elementary_charge
inlineconstexpr

Elementary charge convenience name [C].

Definition at line 161 of file arts_constants.h.

Referenced by Conversion::angstrom2meter(), Conversion::hz2ghz(), Conversion::kaycm_per_cmsquared2hz_per_msquared(), and Conversion::pa2bar().

◆ earth_radius

constexpr Numeric Constant::earth_radius = 6.3781e6
inlineconstexpr

Global constant, the radius of the Earth [m].

Author
Patrick Eriksson
Date
08.04.2000

Definition at line 303 of file arts_constants.h.

◆ electron_mass

constexpr Numeric Constant::electron_mass = 2 * h * R_inf / (c * Math::pow2(alpha))
inlineconstexpr

Mass of resting electron [kg].

Definition at line 220 of file arts_constants.h.

◆ elementary_charge

constexpr Numeric Constant::elementary_charge = 1.602176634e-19
inlineconstexpr

Elementary charge [C] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 2019-04-01.

Definition at line 158 of file arts_constants.h.

◆ epsilon_0

constexpr Numeric Constant::epsilon_0 = vacuum_permittivity
inlineconstexpr

Vacuum permittivity convenience name [F/m].

Definition at line 217 of file arts_constants.h.

◆ euler

constexpr Numeric Constant::euler = std::numbers::e
inlineconstexpr

Euler's number.

Definition at line 93 of file arts_constants.h.

◆ fine_structure_constant

constexpr Numeric Constant::fine_structure_constant = 7.2973525693e-3
inlineconstexpr

Fine structure constant [-] From: https://physics.nist.gov/cgi-bin/cuu/Value?alph Date: 2019-06-18 Reported error: (11)

Definition at line 192 of file arts_constants.h.

◆ h

◆ h_bar

constexpr Numeric Constant::h_bar = reduced_planck_constant
inlineconstexpr

Reduced planck constant convenience name [J s].

Definition at line 152 of file arts_constants.h.

Referenced by Absorption::LineMixing::SpeciesErrorCorrectedSuddenData::Omega().

◆ ideal_gas_constant

constexpr Numeric Constant::ideal_gas_constant = k * NA
inlineconstexpr

Ideal gas constant [J/mol K].

Definition at line 261 of file arts_constants.h.

◆ inv_euler

constexpr Numeric Constant::inv_euler = 1.0 / euler
inlineconstexpr

Inverse of Euler's number.

Definition at line 96 of file arts_constants.h.

◆ inv_ln_2

constexpr Numeric Constant::inv_ln_2 = 1.0 / ln_2
inlineconstexpr

Inverse of the natural logarithm of 2.

Definition at line 114 of file arts_constants.h.

◆ inv_pi

constexpr Numeric Constant::inv_pi = std::numbers::inv_pi
inlineconstexpr

Inverse of pi.

Definition at line 78 of file arts_constants.h.

Referenced by lm_hitran_2017::compabs(), and LineShape::Lorentz::operator()().

◆ inv_sqrt_2

constexpr Numeric Constant::inv_sqrt_2 = 1.0 / sqrt_2
inlineconstexpr

Inverse of the square root of 2.

Definition at line 108 of file arts_constants.h.

Referenced by dtransmat4(), and transmat4().

◆ inv_sqrt_ln_2

constexpr Numeric Constant::inv_sqrt_ln_2
inlineconstexpr
Initial value:
=
1.201122408786449794857803286095221722566764028068699423868879896733837175546

Inverse of the square root of the natural logarithm of 2.

Definition at line 121 of file arts_constants.h.

◆ inv_sqrt_pi

constexpr Numeric Constant::inv_sqrt_pi = std::numbers::inv_sqrtpi
inlineconstexpr

Inverse of the square root of pi.

Definition at line 90 of file arts_constants.h.

◆ inv_two_pi

constexpr Numeric Constant::inv_two_pi = 0.5 * inv_pi
inlineconstexpr

Inverse of two pi.

Definition at line 84 of file arts_constants.h.

Referenced by Conversion::angcm2freq(), Conversion::angfreq2freq(), and Conversion::freq2angcm().

◆ k

◆ K_cd

constexpr Numeric Constant::K_cd = 683
inlineconstexpr

Luminous efficacy of monochromatic 540 THz radiation [lm / W] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 2019-04-01.

Definition at line 185 of file arts_constants.h.

◆ ln_10

constexpr Numeric Constant::ln_10 = std::numbers::ln10
inlineconstexpr

Natural logarithm of 10.

Definition at line 102 of file arts_constants.h.

◆ ln_2

constexpr Numeric Constant::ln_2 = std::numbers::ln2
inlineconstexpr

Natural logarithm of 2.

Definition at line 111 of file arts_constants.h.

◆ log10_euler

constexpr Numeric Constant::log10_euler = std::numbers::log10e
inlineconstexpr

Ten's logarithm of Euler's number.

Definition at line 99 of file arts_constants.h.

◆ m_e

constexpr Numeric Constant::m_e = electron_mass
inlineconstexpr

Mass of resting electron convenience name [kg].

Definition at line 223 of file arts_constants.h.

◆ m_u

constexpr Numeric Constant::m_u = unified_atomic_mass_unit
inlineconstexpr

Unified atomic mass unit convenience name [kg].

Definition at line 233 of file arts_constants.h.

Referenced by Absorption::LineMixing::SpeciesErrorCorrectedSuddenData::Omega().

◆ magnetic_constant

constexpr Numeric Constant::magnetic_constant = 2 * h * alpha / (c * Math::pow2(e))
inlineconstexpr

Magnetic constant [H/m].

Definition at line 208 of file arts_constants.h.

◆ mass_ratio_electrons_per_neutron

constexpr Numeric Constant::mass_ratio_electrons_per_neutron = 1'838.683'661'73
inlineconstexpr

Mass ratio of electrons to protons [-] From: https://physics.nist.gov/cgi-bin/cuu/Value?mnsme Date: 2020-01-08 Reported error: (89)

Definition at line 251 of file arts_constants.h.

◆ mass_ratio_electrons_per_proton

constexpr Numeric Constant::mass_ratio_electrons_per_proton = 1'836.152'673'43
inlineconstexpr

Mass ratio of electrons to protons [-] From: https://physics.nist.gov/cgi-bin/cuu/Value?mpsme Date: 2020-01-08 Reported error: (11)

Definition at line 240 of file arts_constants.h.

Referenced by Zeeman::GetAdvancedModel().

◆ mu_0

constexpr Numeric Constant::mu_0 = magnetic_constant
inlineconstexpr

Magnetic constant convenience name [H/m].

Definition at line 211 of file arts_constants.h.

◆ NA

constexpr Numeric Constant::NA = avogadro_constant
inlineconstexpr

Avogadro constant convenience name [1/mol].

Definition at line 179 of file arts_constants.h.

◆ neutron_mass

constexpr Numeric Constant::neutron_mass
inlineconstexpr
Initial value:
=
constexpr Numeric electron_mass
Mass of resting electron [kg].
constexpr Numeric mass_ratio_electrons_per_neutron
Mass ratio of electrons to protons [-] From: https://physics.nist.gov/cgi-bin/cuu/Value?...

Mass of a neutron [kg].

Definition at line 254 of file arts_constants.h.

◆ one_degree_in_radians

constexpr Numeric Constant::one_degree_in_radians = pi / 180
inlineconstexpr

One degree in radians.

Definition at line 270 of file arts_constants.h.

Referenced by Conversion::deg2rad(), and Conversion::rad2deg().

◆ pi

constexpr Numeric Constant::pi = std::numbers::pi
inlineconstexpr

The following mathematical constants are generated in python Decimal package by the code:

import decimal as d d.getcontext().prec = 76 two = d.Decimal('2') print('sqrt_ln_2 =', two.ln().sqrt()) print('inv_sqrt_ln_2 =', 1/two.ln().sqrt())

To improve the numerical accuracy further, insert larger pi string Pi, related to circles

Definition at line 75 of file arts_constants.h.

Referenced by calc_rayleighPhaMat(), calcSingleScatteringDataProperties(), lm_hitran_2017::compabs(), integrate_phamat_theta0_phi10(), integrate_phamat_theta0_phi_alpha6(), Absorption::LineMixing::SpeciesErrorCorrectedSuddenData::Omega(), LineShape::Lorentz::operator()(), pha_mat_labCalc(), lm_hitran_2017::qsdv(), lm_hitran_2017::qsdv_si(), Legendre::schmidt(), and ze_cfac().

◆ planck_constant

constexpr Numeric Constant::planck_constant = 6.62607015e-34
inlineconstexpr

Planck constant [J s] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 2019-04-01.

Definition at line 143 of file arts_constants.h.

Referenced by setCji().

◆ proton_mass

constexpr Numeric Constant::proton_mass
inlineconstexpr
Initial value:
=
constexpr Numeric mass_ratio_electrons_per_proton
Mass ratio of electrons to protons [-] From: https://physics.nist.gov/cgi-bin/cuu/Value?...

Mass of a proton [kg].

Definition at line 243 of file arts_constants.h.

◆ R

constexpr Numeric Constant::R = ideal_gas_constant
inlineconstexpr

Ideal gas constant convenience name [J/mol K].

Definition at line 264 of file arts_constants.h.

◆ R_inf

constexpr Numeric Constant::R_inf = rydberg_constant
inlineconstexpr

Rydberg constant convenience name [1/m].

Definition at line 205 of file arts_constants.h.

◆ reduced_planck_constant

constexpr Numeric Constant::reduced_planck_constant = h * inv_two_pi
inlineconstexpr

Reduced planck constant [J s].

Definition at line 149 of file arts_constants.h.

◆ rydberg_constant

constexpr Numeric Constant::rydberg_constant = 10973731.568160
inlineconstexpr

Rydberg constant [1/m] From: https://physics.nist.gov/cgi-bin/cuu/Value?ryd Date: 2016-06-18 Reported error: (21)

Definition at line 202 of file arts_constants.h.

◆ sigma

constexpr Numeric Constant::sigma = stefan_boltzmann_constant
inlineconstexpr

Stefan-Boltzmann constant convenience name [W/(K^4*m^2)].

Definition at line 277 of file arts_constants.h.

◆ speed_of_light

constexpr Numeric Constant::speed_of_light = 299792458
inlineconstexpr

Speed of light [m/s] From: https://en.wikipedia.org/wiki/2019_redefinition_of_SI_base_units Date: 2019-04-01.

Definition at line 134 of file arts_constants.h.

Referenced by calcSingleScatteringDataProperties().

◆ sqrt_2

constexpr Numeric Constant::sqrt_2 = std::numbers::sqrt2
inlineconstexpr

Square root of 2.

Definition at line 105 of file arts_constants.h.

◆ sqrt_ln_2

constexpr Numeric Constant::sqrt_ln_2
inlineconstexpr
Initial value:
=
0.8325546111576977563531646448952010476305888522644407291668291172340794351973

Square root of natural logarithm of 2.

Definition at line 117 of file arts_constants.h.

Referenced by lm_hitran_2017::compabs(), Absorption::LineMixing::ecs_absorption_impl(), lm_hitran_2017::qsdv(), and lm_hitran_2017::qsdv_si().

◆ sqrt_pi

constexpr Numeric Constant::sqrt_pi = 1.0/std::numbers::inv_sqrtpi
inlineconstexpr

◆ stefan_boltzmann_constant

constexpr Numeric Constant::stefan_boltzmann_constant
inlineconstexpr
Initial value:
=
Math::pow2(pi) * Math::pow4(k) / (Math::pow3(h_bar) * Math::pow2(c)) / 60.
constexpr auto pow3(auto x) noexcept
power of three
constexpr auto pow4(auto x) noexcept
power of four
constexpr auto pow2(auto x) noexcept
power of two
#define c

Stefan-Boltzmann constant [W/(K^4*m^2)].

Definition at line 273 of file arts_constants.h.

◆ temperature_at_0c

constexpr Numeric Constant::temperature_at_0c = 273.15
inlineconstexpr

Global constant, Temperature in Celsius of 0 Kelvin.

Author
Axel von Engeln
Date
2000-12-19

Definition at line 309 of file arts_constants.h.

◆ two_pi

constexpr Numeric Constant::two_pi = 2 * pi
inlineconstexpr

Two times pi.

Definition at line 81 of file arts_constants.h.

Referenced by Conversion::freq2angfreq(), jacobianCalcSinefit(), pha_mat_labCalc(), test17(), and test22().

◆ unified_atomic_mass_unit

constexpr Numeric Constant::unified_atomic_mass_unit = 1.66053906660e-27
inlineconstexpr

Unified atomic mass unit [kg] From: https://physics.nist.gov/cgi-bin/cuu/Value?ukg Date: 2020-02-18 Reported error: (50)

Definition at line 230 of file arts_constants.h.

◆ vacuum_permittivity

constexpr Numeric Constant::vacuum_permittivity = Math::pow2(e) / (2 * h * c * alpha)
inlineconstexpr

Vacuum permittivity [F/m].

Definition at line 214 of file arts_constants.h.