IAP GITLAB

Skip to content
Snippets Groups Projects
PhysicalConstants.h 1.78 KiB
Newer Older
/**
 * \file PhysicalConstants
 *
 * \brief   Several physical constants.
 * \author  Michael S. Kenniston, Martin Moene
 * \date    7 September 2013
 * \since   0.4
 *
 * Copyright 2013 Universiteit Leiden. All rights reserved.
 *
 * Copyright (c) 2001 by Michael S. Kenniston.  For the most
 * recent version check www.xnet.com/~msk/quantity.  Permission is granted
 * to use this code without restriction so long as this copyright
 * notice appears in all source files.
 *
 * This code is provided as-is, with no warrantee of correctness.
 *
 * Distributed under the Boost Software License, Version 1.0. (See accompanying
 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 *
 *
 *
 */

#ifndef INCLUDE_PHYSICAL_CONSTANTS_H
#define INCLUDE_PHYSICAL_CONSTANTS_H

#include <phys/units/quantity.hpp>
namespace corsika::units::constants {
  using namespace phys::units;
ralfulrich's avatar
ralfulrich committed
  // acceleration of free-fall, standard
  constexpr phys::units::quantity<phys::units::acceleration_d> g_sub_n{
      phys::units::Rep(9.80665L) * phys::units::meter /
      phys::units::square(phys::units::second)};
ralfulrich's avatar
ralfulrich committed
  // Avogadro constant
  constexpr quantity<dimensions<0, 0, 0, 0, 0, -1> > N_sub_A{Rep(6.02214199e+23L) / mole};
  // electronvolt
  constexpr quantity<energy_d> eV{Rep(1.60217733e-19L) * joule};
ralfulrich's avatar
ralfulrich committed
  // elementary charge
  constexpr quantity<electric_charge_d> e{Rep(1.602176462e-19L) * coulomb};
ralfulrich's avatar
ralfulrich committed
  // Planck constant
  constexpr quantity<dimensions<2, 1, -1> > h{Rep(6.62606876e-34L) * joule * second};
ralfulrich's avatar
ralfulrich committed
  // speed of light in a vacuum
  constexpr quantity<speed_d> c{Rep(299792458L) * meter / second};
ralfulrich's avatar
ralfulrich committed
  // unified atomic mass unit
  constexpr quantity<mass_d> u{Rep(1.6605402e-27L) * kilogram};
ralfulrich's avatar
ralfulrich committed
  // etc.
ralfulrich's avatar
ralfulrich committed
} // namespace corsika::units::constants
ralfulrich's avatar
ralfulrich committed
#endif // PHYS_UNITS_PHYSICAL_CONSTANTS_HPP_INCLUDED