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 Quantities {
00035 namespace ThermodynamicTemperatureUnits {
00036
00037
00038
00039
00040 template<> const double Kelvins::StandardRatio = 1.;
00041 template<> const std::string Kelvins::Basename = "kelvin";
00042 template<> const std::string Kelvins::Basesymbol = "K";
00043 template<> const bool Kelvins::SI = true;
00044 template<> const bool Kelvins::Exact = true;
00045
00046
00047
00048 template<> const double DegreeRankine::StandardRatio = 5./9.;
00049 template<> const std::string DegreeRankine::Namestring
00050 = "degreerankine";
00051 template<> const std::string DegreeRankine::Symbolstring = "oR";
00052 template<> const bool DegreeRankine::SI = false;
00053 template<> const bool DegreeRankine::Exact = true;
00054
00055 }
00056
00057 template<> const std::string
00058 Name<ThermodynamicTemperatureQuantities>::String = "temperature";
00059 template<> const std::string
00060 Symbol<ThermodynamicTemperatureQuantities>::String = "T";
00061
00063
00065 template<>
00066 ThermodynamicTemperature::Variable (const CelsiusTemperature &celsius)
00067 : variable_value (Unit::Reverse (celsius.value () + 273.15))
00068 {namestring = celsius.name ();}
00069
00071
00073 template<>
00074 ThermodynamicTemperature::Variable
00075 (const FahrenheitTemperature &fahrenheit)
00076 : variable_value
00077 (Unit::Reverse (5./9. * (fahrenheit.value () + 459.67)))
00078 {namestring = fahrenheit.name ();}
00079
00080 }
00081
00082 #endif