![]() |
|
|||
File indexing completed on 2025-09-17 08:53:48
0001 //---------------------------------*-CUDA-*----------------------------------// 0002 // Copyright 2020-2024 UT-Battelle, LLC, and other Celeritas developers. 0003 // See the top-level COPYRIGHT file for details. 0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT) 0005 //---------------------------------------------------------------------------// 0006 //! \file celeritas/Constants.hh 0007 //! \brief Mathematical, numerical, and physical constants 0008 //---------------------------------------------------------------------------// 0009 #pragma once 0010 0011 #include "corecel/Config.hh" 0012 0013 #include "corecel/Constants.hh" 0014 #include "corecel/Types.hh" 0015 0016 #include "Units.hh" 0017 0018 namespace celeritas 0019 { 0020 //---------------------------------------------------------------------------// 0021 /*! 0022 * Mathematical, numerical, and physical constants. 0023 * 0024 * Some of the physical 0025 * constants listed here are *exact* numerical values: see \citet{si-2019, 0026 * https://www.bipm.org/en/publications/si-brochure} for definition of 0027 * constants and how they relate to the different units. 0028 * 0029 * Celeritas | CLHEP | Notes 0030 * -------------------- | --------------------- | ------------ 0031 * a0_bohr | Bohr_radius | Bohr radius 0032 * alpha_fine_structure | fine_structure_const | | 0033 * atomic_mass | amu | Not the same as 1/avogadro 0034 * eps_electric | epsilon0 | Vacuum permittivity 0035 * h_planck | h_Planck | | 0036 * k_boltzmann | k_Boltzmann | | 0037 * mu_magnetic | mu0 | Vacuum permeability 0038 * na_avogadro | Avogadro | [1/mol] 0039 * r_electron | classic_electr_radius | Classical electron radius 0040 * kcd_luminous | [none] | Lumens per Watt 0041 * lambdabar_electron | electron_Compton_length | Reduced Compton wavelength 0042 * stable_decay_constant| [none] | Decay for a stable particle 0043 * 0044 * In the CLHEP unit system, the value of the constant \c e_electron is defined 0045 * to be 1 and \c coulomb is derivative from that. To avoid floating point 0046 * arithmetic issues that would lead to the "units" and "constants" having 0047 * different values for it, a special case redefines the value for CLHEP. 0048 * 0049 * Some experimental physical constants are derived from the other physical 0050 * constants, but for consistency and clarity they are presented numerically 0051 * with the units provided in the CODATA 2018 dataset. The \c Constants.test.cc 0052 * unit tests compare the numerical value against the derivative values inside 0053 * the celeritas unit system. All experimental values include the final 0054 * (ususally two) imprecise digits; their precision is usually on the order of 0055 * \f$ 10^{-11} \f$. 0056 */ 0057 namespace constants 0058 { 0059 //---------------------------------------------------------------------------// 0060 0061 #define CELER_ICRT inline constexpr Constant 0062 0063 //!@{ 0064 //! \name Physical constants with exact value as defined by SI 0065 CELER_ICRT c_light = Constant{299792458.} * units::meter / units::second; 0066 CELER_ICRT h_planck = Constant{6.62607015e-34} * units::joule * units::second; 0067 #if CELERITAS_UNITS != CELERITAS_UNITS_CLHEP 0068 CELER_ICRT e_electron = Constant{1.602176634e-19} * units::coulomb; 0069 #endif 0070 CELER_ICRT k_boltzmann = Constant{1.380649e-23} * units::joule / units::kelvin; 0071 CELER_ICRT na_avogadro{6.02214076e23}; 0072 CELER_ICRT kcd_luminous{683}; 0073 //!@} 0074 0075 #if CELERITAS_UNITS == CELERITAS_UNITS_CLHEP 0076 //! Special case for CLHEP: electron charged is unity by definition 0077 CELER_ICRT e_electron{1}; 0078 #endif 0079 0080 //!@{ 0081 //! \name Exact derivative constants 0082 CELER_ICRT hbar_planck{h_planck / (2 * pi)}; 0083 //!@} 0084 0085 //!@{ 0086 //! \name Experimental physical constants from CODATA 2018 0087 CELER_ICRT a0_bohr = Constant{5.29177210903e-11} * units::meter; 0088 CELER_ICRT alpha_fine_structure = Constant{7.2973525693e-3}; 0089 CELER_ICRT atomic_mass = Constant{1.66053906660e-24} * units::gram; 0090 CELER_ICRT electron_mass = Constant{9.1093837015e-28} * units::gram; 0091 CELER_ICRT proton_mass = Constant{1.67262192369e-24} * units::gram; 0092 CELER_ICRT eps_electric = Constant{8.8541878128e-12} * units::farad 0093 / units::meter; 0094 CELER_ICRT mu_magnetic = Constant{1.25663706212e-6} * units::newton 0095 / (units::ampere * units::ampere); 0096 CELER_ICRT r_electron = Constant{2.8179403262e-15} * units::meter; 0097 CELER_ICRT rinf_rydberg = Constant{10973731.568160} / units::meter; 0098 CELER_ICRT eh_hartree = Constant{4.3597447222071e-18} / units::meter; 0099 CELER_ICRT lambdabar_electron = Constant{3.8615926796e-13} * units::meter; 0100 //!@} 0101 0102 //!@{ 0103 //! \name Other constants 0104 inline constexpr int stable_decay_constant{0}; 0105 //!@} 0106 0107 #undef CELER_ICRT 0108 0109 //---------------------------------------------------------------------------// 0110 } // namespace constants 0111 } // namespace celeritas
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |