00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef thermodynamicTemperature_cc
00026 #define thermodynamicTemperature_cc
00027
00028 #include "Quantity/Variable.h"
00029
00030 #include "PhysicalQuantities/ThermodynamicTemperature.h"
00031 #include "PhysicalQuantities/CelsiusTemperature.h"
00032 #include "PhysicalQuantities/FahrenheitTemperature.h"
00033
00034 namespace quantity {
00035 namespace thermodynamicTemperature {
00036
00037
00038
00039
00040 template<> const std::string Kelvins::Basename = "kelvin";
00041 template<> const std::string Kelvins::Basesymbol = "K";
00042 template<> const bool Kelvins::SI = true;
00043
00044
00045
00046 template<> const std::string DegreeRankine::Namestring
00047 = "degreerankine";
00048 template<> const std::string DegreeRankine::Symbolstring = "oR";
00049 template<> const bool DegreeRankine::SI = false;
00050
00051 template<> const double Standard<Kelvins>::ratio = 1.0;
00052 template<> const bool Standard<Kelvins>::exact = true;
00053
00054 template<> const double Standard<DegreeRankine> ::ratio = 5./9.;
00055 template<> const bool Standard<DegreeRankine> ::exact = true;
00056
00057 }
00058
00059 template<> const std::string
00060 Name<thermodynamicTemperature::Quantity>::String = "temperature";
00061 template<> const std::string
00062 Symbol<thermodynamicTemperature::Quantity>::String = "T";
00063
00065
00067 template<>
00068 template<>
00069 ThermodynamicTemperature::Variable (const CelsiusTemperature &celsius)
00070 : _value (Reverse<Unit>::VAL (celsius.value () + 273.15))
00071 {namestring = celsius.name ();}
00072
00074
00076 template<>
00077 template<>
00078 ThermodynamicTemperature::Variable
00079 (const FahrenheitTemperature &fahrenheit)
00080 : _value
00081 (Reverse<Unit>::VAL (5./9. * (fahrenheit.value () + 459.67)))
00082 {namestring = fahrenheit.name ();}
00083
00084 }
00085
00086 #endif