![]() |
|
|||
File indexing completed on 2025-02-21 09:57:02
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/Constants.hh" 0012 #include "corecel/Types.hh" 0013 0014 #include "Units.hh" 0015 0016 namespace celeritas 0017 { 0018 0019 /*! 0020 * Mathematical, numerical, and physical constants. 0021 * 0022 * Some of the physical 0023 * constants listed here are *exact* numerical values: see the International 0024 * System of Units, 9th ed. (2019), for definition of constants and how they 0025 * relate to the different units. 0026 * 0027 * Celeritas | CLHEP | Notes 0028 * -------------------- | --------------------- | ------------ 0029 * a0_bohr | Bohr_radius | Bohr radius 0030 * alpha_fine_structure | fine_structure_const | | 0031 * atomic_mass | amu | Not the same as 1/avogadro 0032 * eps_electric | epsilon0 | Vacuum permittivity 0033 * h_planck | h_Planck | | 0034 * k_boltzmann | k_Boltzmann | | 0035 * mu_magnetic | mu0 | Vacuum permeability 0036 * na_avogadro | Avogadro | [1/mol] 0037 * r_electron | classic_electr_radius | Classical electron radius 0038 * kcd_luminous | [none] | Lumens per Watt 0039 * lambdabar_electron | electron_Compton_length | Reduced Compton wavelength 0040 * stable_decay_constant| [none] | Decay for a stable particle 0041 * 0042 * In the CLHEP unit system, the value of the constant \c e_electron is defined 0043 * to be 1 and \c coulomb is derivative from that. To avoid floating point 0044 * arithmetic issues that would lead to the "units" and "constants" having 0045 * different values for it, a special case redefines the value for CLHEP. 0046 * 0047 * Some experimental physical constants are derived from the other physical 0048 * constants, but for consistency and clarity they are presented numerically 0049 * with the units provided in the CODATA 2018 dataset. The \c Constants.test.cc 0050 * unit tests compare the numerical value against the derivative values inside 0051 * the celeritas unit system. All experimental values include the final 0052 * (ususally two) imprecise digits; their precision is usually on the order of 0053 * \f$ 10^{-11} \f$. 0054 */ 0055 namespace constants 0056 { 0057 //---------------------------------------------------------------------------// 0058 0059 #define CELER_ICRT inline constexpr real_type 0060 0061 //!@{ 0062 //! \name Physical constants with *exact* value as defined by SI 0063 CELER_ICRT c_light = 299792458. * units::meter / units::second; 0064 CELER_ICRT h_planck = 6.62607015e-34 * units::joule * units::second; 0065 #if CELERITAS_UNITS != CELERITAS_UNITS_CLHEP 0066 CELER_ICRT e_electron = 1.602176634e-19 * units::coulomb; 0067 #endif 0068 CELER_ICRT k_boltzmann = 1.380649e-23 * units::joule / units::kelvin; 0069 CELER_ICRT na_avogadro = 6.02214076e23; 0070 CELER_ICRT kcd_luminous = 683; 0071 //!@} 0072 0073 #if CELERITAS_UNITS == CELERITAS_UNITS_CLHEP 0074 //! Special case for CLHEP: electron charged is unity by definition 0075 CELER_ICRT e_electron = 1; 0076 #endif 0077 0078 //!@{ 0079 //! \name Exact derivative constants 0080 CELER_ICRT hbar_planck = h_planck / (2 * pi); 0081 //!@} 0082 0083 //!@{ 0084 //! \name Experimental physical constants from CODATA 2018 0085 CELER_ICRT a0_bohr = 5.29177210903e-11 * units::meter; 0086 CELER_ICRT alpha_fine_structure = 7.2973525693e-3; 0087 CELER_ICRT atomic_mass = 1.66053906660e-24 * units::gram; 0088 CELER_ICRT electron_mass = 9.1093837015e-28 * units::gram; 0089 CELER_ICRT proton_mass = 1.67262192369e-24 * units::gram; 0090 CELER_ICRT eps_electric = 8.8541878128e-12 * units::farad / units::meter; 0091 CELER_ICRT mu_magnetic = 1.25663706212e-6 * units::newton 0092 / (units::ampere * units::ampere); 0093 CELER_ICRT r_electron = 2.8179403262e-15 * units::meter; 0094 CELER_ICRT rinf_rydberg = 10973731.568160 / units::meter; 0095 CELER_ICRT eh_hartree = 4.3597447222071e-18 / units::meter; 0096 CELER_ICRT lambdabar_electron = 3.8615926796e-13 * units::meter; 0097 //!@} 0098 0099 //!@{ 0100 //! \name Other constants 0101 CELER_ICRT stable_decay_constant = 0; 0102 //!@} 0103 #undef CELER_ICRT 0104 0105 //---------------------------------------------------------------------------// 0106 } // namespace constants 0107 } // 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 |
![]() ![]() |