00001 00005 /* Copyright (C) 2002 - 2010, Bernd Speiser */ 00006 00007 /* This file is part of PhysicalQuantities. 00008 00009 PhysicalQuantities is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License 00011 as published by the Free Software Foundation; either version 2 00012 of the License, or (at your option) any later version. 00013 00014 PhysicalQuantities is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00022 02111-1307, USA. 00023 */ 00024 00025 #ifndef _Energy_cc 00026 #define _Energy_cc 00027 00028 // Quantity includes 00029 #include "Quantities/PhysicalQuantities/Energy.h" 00030 00031 namespace quantity { 00032 namespace energy { 00033 00034 /* definition of Energy units */ 00035 /* the Joule and prefixed Joules */ 00036 00037 template<> const std::string Joules::Basename = "joule"; 00038 template<> const std::string Joules::Basesymbol = "J"; 00039 template<> const bool Joules::SI = true; 00040 template<> const bool Joules::Exact = true; 00041 template<> const double Joules::StandardFactor = 1.0; 00042 00043 /* the erg */ 00044 00045 template<> const std::string Erg::Namestring = "erg"; 00046 template<> const std::string Erg::Symbolstring = "erg"; 00047 template<> const bool Erg::SI = false; 00048 template<> const bool Erg::Exact = true; 00049 template<> const double Erg::StandardFactor = 1.0e-7; 00050 00051 /* the Hartree */ 00052 00053 template<> const std::string Hartree::Namestring = "hartree"; 00054 template<> const std::string Hartree::Symbolstring = "E_h"; 00055 template<> const bool Hartree::SI = false; 00056 template<> const bool Hartree::Exact = false; 00057 template<> const double Hartree::StandardFactor = 4.35975e-18; 00058 00059 /* the Rydberg */ 00060 00061 template<> const std::string Rydberg::Namestring = "rydberg"; 00062 template<> const std::string Rydberg::Symbolstring = "Ry"; 00063 template<> const bool Rydberg::SI = false; 00064 template<> const bool Rydberg::Exact = false; 00065 template<> const double Rydberg::StandardFactor = 2.17987e-18; 00066 00067 /* the electron volt */ 00068 00069 template<> const std::string ElectronVolts::Basename = "electronvolt"; 00070 template<> const std::string ElectronVolts::Basesymbol = "eV"; 00071 template<> const bool ElectronVolts::SI = false; 00072 template<> const bool ElectronVolts::Exact = false; 00073 template<> const double ElectronVolts::StandardFactor = 1.60218e-19; 00074 00075 /* the thermochemical calory */ 00076 00077 template<> const std::string ThermochemicalCalory::Namestring 00078 = "thermochemical calory"; 00079 template<> const std::string ThermochemicalCalory::Symbolstring 00080 = "cal_th"; 00081 template<> const bool ThermochemicalCalory::SI = false; 00082 template<> const bool ThermochemicalCalory::Exact = true; 00083 template<> const double ThermochemicalCalory::StandardFactor = 4.184; 00084 00085 /* the international calory */ 00086 00087 template<> const std::string InternationalCalory::Namestring 00088 = "international calory"; 00089 template<> const std::string InternationalCalory::Symbolstring 00090 = "cal_IT"; 00091 template<> const bool InternationalCalory::SI = false; 00092 template<> const bool InternationalCalory::Exact = true; 00093 template<> const double InternationalCalory::StandardFactor = 4.1868; 00094 00095 /* the 15 degree calory */ 00096 00097 template<> const std::string FifteenDegreeCalory::Namestring 00098 = "15degree calory"; 00099 template<> const std::string FifteenDegreeCalory::Symbolstring 00100 = "cal_15T"; 00101 template<> const bool FifteenDegreeCalory::SI = false; 00102 template<> const bool FifteenDegreeCalory::Exact = false; 00103 template<> const double FifteenDegreeCalory::StandardFactor = 4.1855; 00104 00105 /* the litre atmosphere */ 00106 00107 template<> const std::string LitreAtmosphere::Namestring 00108 = "litre atmosphere"; 00109 template<> const std::string LitreAtmosphere::Symbolstring = "l atm"; 00110 template<> const bool LitreAtmosphere::SI = false; 00111 template<> const bool LitreAtmosphere::Exact = true; 00112 template<> const double LitreAtmosphere::StandardFactor = 101.325; 00113 00114 /* the british thermal unit */ 00115 00116 template<> const std::string BritishThermalUnit::Namestring 00117 = "British Thermal Unit"; 00118 template<> const std::string BritishThermalUnit::Symbolstring = "Btu"; 00119 template<> const bool BritishThermalUnit::SI = false; 00120 template<> const bool BritishThermalUnit::Exact = true; 00121 template<> const double BritishThermalUnit::StandardFactor = 1055.06; 00122 00123 } 00124 00125 const std::string QuantityTraits<energy::Class>::NameString (void) 00126 {return "energy";} 00127 const std::string QuantityTraits<energy::Class>::SymbolString (void) 00128 {return"E";} 00129 00130 } 00131 00132 #endif /* _Energy_cc */