electromagnetic_constants.hpp 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Boost.Units - A C++ library for zero-overhead dimensional analysis and
  2. // unit/quantity manipulation and conversion
  3. //
  4. // Copyright (C) 2003-2008 Matthias Christian Schabel
  5. // Copyright (C) 2008 Steven Watanabe
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See
  8. // accompanying file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt)
  10. #ifndef BOOST_UNITS_CODATA_ELECTROMAGNETIC_CONSTANTS_HPP
  11. #define BOOST_UNITS_CODATA_ELECTROMAGNETIC_CONSTANTS_HPP
  12. ///
  13. /// \file
  14. /// \brief CODATA recommended values of fundamental electromagnetic constants.
  15. /// \details CODATA recommended values of the fundamental physical constants: NIST SP 961
  16. /// CODATA 2006 values as of 2007/03/30
  17. ///
  18. #include <boost/units/static_constant.hpp>
  19. #include <boost/units/systems/detail/constants.hpp>
  20. #include <boost/units/systems/si/conductance.hpp>
  21. #include <boost/units/systems/si/current.hpp>
  22. #include <boost/units/systems/si/electric_charge.hpp>
  23. #include <boost/units/systems/si/electric_potential.hpp>
  24. #include <boost/units/systems/si/energy.hpp>
  25. #include <boost/units/systems/si/frequency.hpp>
  26. #include <boost/units/systems/si/magnetic_flux.hpp>
  27. #include <boost/units/systems/si/magnetic_flux_density.hpp>
  28. #include <boost/units/systems/si/resistance.hpp>
  29. #include <boost/units/systems/si/codata/typedefs.hpp>
  30. namespace boost {
  31. namespace units {
  32. namespace si {
  33. namespace constants {
  34. namespace codata {
  35. // ELECTROMAGNETIC
  36. /// elementary charge
  37. BOOST_UNITS_PHYSICAL_CONSTANT(e,quantity<electric_charge>,1.602176487e-19*coulombs,4.0e-27*coulombs);
  38. /// elementary charge to Planck constant ratio
  39. BOOST_UNITS_PHYSICAL_CONSTANT(e_over_h,quantity<current_over_energy>,2.417989454e14*amperes/joule,6.0e6*amperes/joule);
  40. /// magnetic flux quantum
  41. BOOST_UNITS_PHYSICAL_CONSTANT(Phi_0,quantity<magnetic_flux>,2.067833667e-15*webers,5.2e-23*webers);
  42. /// conductance quantum
  43. BOOST_UNITS_PHYSICAL_CONSTANT(G_0,quantity<conductance>,7.7480917004e-5*siemens,5.3e-14*siemens);
  44. /// Josephson constant
  45. BOOST_UNITS_PHYSICAL_CONSTANT(K_J,quantity<frequency_over_electric_potential>,483597.891e9*hertz/volt,1.2e7*hertz/volt);
  46. /// von Klitzing constant
  47. BOOST_UNITS_PHYSICAL_CONSTANT(R_K,quantity<resistance>,25812.807557*ohms,1.77e-5*ohms);
  48. /// Bohr magneton
  49. BOOST_UNITS_PHYSICAL_CONSTANT(mu_B,quantity<energy_over_magnetic_flux_density>,927.400915e-26*joules/tesla,2.3e-31*joules/tesla);
  50. /// nuclear magneton
  51. BOOST_UNITS_PHYSICAL_CONSTANT(mu_N,quantity<energy_over_magnetic_flux_density>,5.05078324e-27*joules/tesla,1.3e-34*joules/tesla);
  52. } // namespace codata
  53. } // namespace constants
  54. } // namespace si
  55. } // namespace units
  56. } // namespace boost
  57. #endif // BOOST_UNITS_CODATA_ELECTROMAGNETIC_CONSTANTS_HPP