00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _Concentration_h
00027 #define _Concentration_h
00028
00029
00030 #include "Quantity/Variable.h"
00031 #include "Quantity/Constant.h"
00032 #include "Quantity/QuantityCluster.h"
00033 #include "PhysicalQuantities/AmountOfSubstance.h"
00034 #include "PhysicalQuantities/Volume.h"
00035
00036 namespace quantity {
00037 namespace concentration {
00038
00040 class Class;
00041
00043 class Unit;
00044
00045
00046
00047 typedef LOKI_TYPELIST_2(amountOfSubstance::Mole,
00048 amountOfSubstance::MilliMole) AmountOfSubstanceList;
00049
00051 typedef unit::ComposeElement<Unit, AmountOfSubstanceList,
00052 BSUtilities::Rational<1> > AmountOfSubstanceElement;
00053
00054 typedef LOKI_TYPELIST_2(volume::Litre, volume::CubicCentiMetre)
00055 VolumeList;
00056
00058 typedef unit::ComposeElement<Unit, VolumeList,
00059 BSUtilities::Rational<-1> > VolumeElement;
00060
00061 typedef unit::ComposeBase<Unit,
00062 LOKI_TYPELIST_2(AmountOfSubstanceElement, VolumeElement)>
00063 ConcentrationComposedUnit;
00064
00065 typedef unit::Composed<ConcentrationComposedUnit,
00066 LOKI_TYPELIST_2(amountOfSubstance::Mole, volume::Litre)> MolePerLitre;
00067
00068 typedef unit::Composed<ConcentrationComposedUnit,
00069 LOKI_TYPELIST_2(amountOfSubstance::Mole, volume::CubicCentiMetre)>
00070 MolePerCubicCentiMetre;
00071
00072 typedef unit::Composed<ConcentrationComposedUnit,
00073 LOKI_TYPELIST_2(amountOfSubstance::MilliMole, volume::Litre)>
00074 MilliMolePerLitre;
00075
00076 typedef unit::Composed<ConcentrationComposedUnit,
00077 LOKI_TYPELIST_2(amountOfSubstance::MilliMole,
00078 volume::CubicCentiMetre)>
00079 MilliMolePerCubicCentiMetre;
00080
00082 typedef LOKI_TYPELIST_4(MolePerLitre, MolePerCubicCentiMetre,
00083 MilliMolePerLitre, MilliMolePerCubicCentiMetre) Units;
00084
00085
00086
00087 typedef Quantity<Class> Quantity;
00088
00089 class DerivedConcentration;
00090
00091 }
00092
00094
00096 template<typename ST>
00097 struct Standard<concentration::ConcentrationComposedUnit, ST>
00098 {
00099 static const ST ratio;
00100 static const bool exact;
00101 };
00102
00104 template<typename ST> const ST Standard<concentration::ConcentrationComposedUnit, ST>::ratio = 1.0;
00105
00107 template<typename ST> const bool Standard<concentration::ConcentrationComposedUnit, ST>::exact = true;
00108
00110 template<>
00111 struct QuantityTraits<concentration::Class>
00112 {
00113 typedef
00114 dimension::Dimension<BSUtilities::Rational<-3>,
00115 BSUtilities::Rational<0>, BSUtilities::Rational<0>,
00116 BSUtilities::Rational<0>, BSUtilities::Rational<0>,
00117 BSUtilities::Rational<1>, BSUtilities::Rational<0> > Dimension;
00118 typedef concentration::Unit UnitType;
00119 typedef concentration::Units UnitList;
00120 typedef concentration::MolePerLitre DefaultUnit;
00121
00122 typedef concentration::DerivedConcentration DefaultDerivedQuantityType;
00123
00124 static const std::string NameString;
00125 static const std::string SymbolString;
00126
00127 };
00128
00129
00130 template<>
00131 struct DerivedQuantityTraits<concentration::Class, concentration::DerivedConcentration>
00132 {
00133 static const bool OverwriteName = false;
00134 static const bool OverwriteSymbol = false;
00135
00136 static const std::string NameString;
00137 static const std::string SymbolString;
00138
00139 };
00140
00141
00143 typedef Variable<concentration::Quantity> Concentration;
00144
00146 typedef Constant<concentration::Quantity> ConcentrationConstant;
00147
00149 typedef QuantityVector<Variable, concentration::Quantity> ConcentrationVector;
00150
00151 }
00152
00153 #endif