00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _GasConstant_h
00029 #define _GasConstant_h
00030
00031 #include "Quantity/UniqueConstant.h"
00032
00033 #include "PhysicalQuantities/AmountOfSubstance.h"
00034 #include "PhysicalQuantities/Energy.h"
00035 #include "PhysicalQuantities/ThermodynamicTemperature.h"
00036
00037 namespace quantity {
00038 namespace gasConstant {
00039
00040
00041 typedef BSUtilities::Rational<2> LE;
00042 typedef BSUtilities::Rational<1> M;
00043 typedef BSUtilities::Rational<-2> TI;
00044 typedef BSUtilities::Rational<0> E;
00045 typedef BSUtilities::Rational<-1> TE;
00046 typedef BSUtilities::Rational<-1> A;
00047 typedef BSUtilities::Rational<0> LU;
00048
00049 typedef dimension::Dimension<LE, M, TI, E, TE, A, LU> Dimension;
00050
00052 class Unit;
00053
00054
00055 class JoulePerKelvinMoleUnit;
00056
00057
00058
00059 typedef LOKI_TYPELIST_1(energy::Joule) EnergyList;
00060
00061 typedef unit::ComposeElement<Unit, EnergyList,
00062 BSUtilities::Rational<1> > EnergyElement;
00063
00064 typedef LOKI_TYPELIST_2(amountOfSubstance::Mole,
00065 amountOfSubstance::MilliMole) AmountOfSubstanceList;
00066
00067 typedef unit::ComposeElement<Unit, AmountOfSubstanceList,
00068 BSUtilities::Rational<-1> > AmountOfSubstanceElement;
00069
00070 typedef LOKI_TYPELIST_1(thermodynamicTemperature::Kelvin)
00071 ThermodynamicTemperatureList;
00072
00073 typedef
00074 unit::ComposeElement<Unit, ThermodynamicTemperatureList,
00075 BSUtilities::Rational<-1> > ThermodynamicTemperatureElement;
00076
00077 typedef unit::ComposeBase<Unit,
00078 LOKI_TYPELIST_3(EnergyElement, AmountOfSubstanceElement,
00079 ThermodynamicTemperatureElement)> GasConstantComposedUnit;
00080
00081 typedef unit::Composed<GasConstantComposedUnit,
00082 LOKI_TYPELIST_3(energy::Joule, amountOfSubstance::Mole,
00083 thermodynamicTemperature::Kelvin)> JoulePerKelvinMole;
00084
00086 typedef LOKI_TYPELIST_1(JoulePerKelvinMole) Units;
00087
00088
00089 typedef Quantity<Dimension, Unit, Units, JoulePerKelvinMole> Quantity;
00090
00091 }
00092
00093 typedef Loki::SingletonHolder<UniqueConstant <gasConstant::Quantity> >
00094 GasConstant;
00095
00096 #define GASCONSTANT GasConstant::Instance()
00097
00098 }
00099
00100 #endif