Main Page | Class Hierarchy | Class List | File List

Energy.cc

Go to the documentation of this file.
00001 
00005 /* Copyright (C) 2002 - 2005, 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 #include "Quantity/Variable.h"
00029 
00030 #include "PhysicalQuantities/Energy.h"
00031 
00032 namespace quantity {
00033   namespace energy {
00034 
00035 /* definition of Energy units */
00036 /* the Joule and prefixed Joules */
00037 
00038 template<> const std::string Joules::Basename = "joule";
00039 template<> const std::string Joules::Basesymbol = "J";
00040 template<> const bool Joules::SI = true;
00041 
00042 /* the erg */
00043 
00044 template<> const std::string Erg::Namestring  = "erg";
00045 template<> const std::string Erg::Symbolstring = "erg";
00046 template<> const bool Erg::SI = false;
00047 
00048 /* the Hartree */
00049 
00050 template<> const std::string Hartree::Namestring  = "hartree";
00051 template<> const std::string Hartree::Symbolstring = "E_h";
00052 template<> const bool Hartree::SI = false;
00053 
00054 /* the Rydberg */
00055 
00056 template<> const std::string Rydberg::Namestring  = "rydberg";
00057 template<> const std::string Rydberg::Symbolstring = "Ry";
00058 template<> const bool Rydberg::SI = false;
00059 
00060 /* the electron volt */
00061 
00062 template<> const std::string ElectronVolt::Namestring  = "electronvolt";
00063 template<> const std::string ElectronVolt::Symbolstring = "eV";
00064 template<> const bool ElectronVolt::SI = false;
00065 
00066 /* the thermochemical calory */
00067 
00068 template<> const std::string ThermochemicalCalory::Namestring 
00069                                               = "thermochemical calory";
00070 template<> const std::string ThermochemicalCalory::Symbolstring 
00071                                                              = "cal_th";
00072 template<> const bool ThermochemicalCalory::SI = false;
00073 
00074 /* the international calory */
00075 
00076 template<> const std::string InternationalCalory::Namestring 
00077                                                = "international calory";
00078 template<> const std::string InternationalCalory::Symbolstring 
00079                                                              = "cal_IT";
00080 template<> const bool InternationalCalory::SI = false;
00081 
00082 /* the 15 degree calory */
00083 
00084 template<> const std::string FifteenDegreeCalory::Namestring 
00085                                                     = "15degree calory";
00086 template<> const std::string FifteenDegreeCalory::Symbolstring 
00087                                                             = "cal_15T";
00088 template<> const bool FifteenDegreeCalory::SI = false;
00089 
00090 /* the litre atmosphere */
00091 
00092 template<> const std::string LitreAtmosphere::Namestring 
00093                                                   = "litre atmosphere";
00094 template<> const std::string LitreAtmosphere::Symbolstring = "l atm";
00095 template<> const bool LitreAtmosphere::SI = false;
00096 
00097 /* the british thermal unit */
00098 
00099 template<> const std::string BritishThermalUnit::Namestring 
00100                                                = "British Thermal Unit";
00101 template<> const std::string BritishThermalUnit::Symbolstring = "Btu";
00102 template<> const bool BritishThermalUnit::SI = false;
00103 
00104 template<> const double Standard<Joules>::ratio = 1.0;
00105 template<> const bool Standard<Joules>::exact = true;
00106 
00107 template<> const double Standard<Erg>::ratio = 1.e-7;
00108 template<> const bool Standard<Erg>::exact = true;
00109 
00110 template<> 
00111        const double Standard<Hartree>::ratio = 4.35975e-18;
00112 template<> const bool Standard<Hartree>::exact = false;
00113 
00114 template<> 
00115        const double Standard<Rydberg>::ratio = 2.17987e-18;
00116 template<> const bool Standard<Rydberg>::exact = false;
00117 
00118 template<> 
00119   const double Standard<ElectronVolt>::ratio = 1.60218e-19;
00120 template<> 
00121           const bool Standard<ElectronVolt>::exact = false;
00122 
00123 template<> const double Standard<ThermochemicalCalory>::ratio = 4.184;
00124 template<> const bool Standard<ThermochemicalCalory>::exact = true;
00125 
00126 template<> const double Standard<InternationalCalory>::ratio = 4.1868;
00127 template<> const bool Standard<InternationalCalory>::exact = true;
00128 
00129 template<> const double Standard<FifteenDegreeCalory>::ratio = 4.1855;
00130 template<> const bool Standard<FifteenDegreeCalory>::exact = false;
00131 
00132 template<> const double Standard<LitreAtmosphere>::ratio = 101.325;
00133 template<> const bool Standard<LitreAtmosphere>::exact = true;
00134 
00135 template<> const double Standard<BritishThermalUnit>::ratio = 1055.06;
00136 template<> const bool Standard<BritishThermalUnit>::exact = true;
00137 
00138   }
00139 
00140 template<> const std::string Name<energy::Quantity>::String = "energy";
00141 template<> const std::string Symbol<energy::Quantity>::String = "E";
00142 
00143 }
00144 
00145 #endif /* _Energy_cc */

Generated on Sun Jan 15 14:05:26 2006 for PhysicalQuantities by doxygen 1.3.6