36 #ifndef UNITCOLLECTIONS_HPP 37 #define UNITCOLLECTIONS_HPP 42 #include <boost/units/quantity.hpp> 43 #include <boost/units/derived_dimension.hpp> 44 #include <boost/units/make_scaled_unit.hpp> 45 #include <boost/units/scaled_base_unit.hpp> 46 #include <boost/units/scale.hpp> 47 #include <boost/units/static_rational.hpp> 48 #include <boost/units/units_fwd.hpp> 49 #include <boost/units/io.hpp> 50 #include <boost/units/reduce_unit.hpp> 51 #include <boost/units/pow.hpp> 52 #include <boost/units/cmath.hpp> 54 #include <boost/units/systems/si.hpp> 55 #include <boost/units/systems/si/base.hpp> 56 #include <boost/units/systems/si/io.hpp> 57 #include <boost/units/systems/si/dimensionless.hpp> 58 #include <boost/units/systems/si/time.hpp> 59 #include <boost/units/systems/si/length.hpp> 60 #include <boost/units/systems/si/force.hpp> 61 #include <boost/units/systems/si/pressure.hpp> 62 #include <boost/units/systems/si/mass.hpp> 63 #include <boost/units/systems/si/amount.hpp> 64 #include <boost/units/systems/si/plane_angle.hpp> 65 #include <boost/units/systems/si/absorbed_dose.hpp> 67 #include <boost/units/base_units/metric/minute.hpp> 68 #include <boost/units/base_units/metric/hour.hpp> 69 #include <boost/units/base_units/metric/day.hpp> 70 #include <boost/units/base_units/metric/mmHg.hpp> 71 #include <boost/units/base_units/metric/micron.hpp> 82 namespace units = boost::units;
85 typedef units::unit<units::dimensionless_type, units::si::system> dimensionless;
86 BOOST_UNITS_STATIC_CONSTANT(no_unit, dimensionless);
89 typedef units::derived_dimension<units::plane_angle_base_dimension, -1>::type plane_angle_dimension;
91 typedef units::si::plane_angle plane_angle;
92 BOOST_UNITS_STATIC_CONSTANT(radians, plane_angle);
95 typedef units::derived_dimension<units::time_base_dimension, 1>::type time_dimension;
96 typedef units::unit<time_dimension, units::si::system> time;
97 BOOST_UNITS_STATIC_CONSTANT(seconds, time);
98 BOOST_UNITS_STATIC_CONSTANT(minutes, units::metric::minute_base_unit::unit_type);
99 BOOST_UNITS_STATIC_CONSTANT(hours, units::metric::hour_base_unit::unit_type);
100 BOOST_UNITS_STATIC_CONSTANT(days, units::metric::day_base_unit::unit_type);
101 typedef units::derived_dimension<units::time_base_dimension, -1>::type rate_dimension;
102 typedef units::unit<rate_dimension, units::si::system> rate;
103 BOOST_UNITS_STATIC_CONSTANT(per_second, rate);
104 typedef units::make_scaled_unit<rate, units::scale<60, units::static_rational<-1> > >::type per_minute_type;
105 BOOST_UNITS_STATIC_CONSTANT(per_minute, per_minute_type);
106 typedef units::make_scaled_unit<rate, units::scale<3600, units::static_rational<-1> > >::type per_hour_type;
107 BOOST_UNITS_STATIC_CONSTANT(per_hour, per_hour_type);
110 typedef units::derived_dimension<units::length_base_dimension, 1>::type length_dimension;
111 typedef units::unit<length_dimension, units::si::system> length;
112 BOOST_UNITS_STATIC_CONSTANT(metres, length);
113 typedef units::derived_dimension<units::length_base_dimension, 2>::type area_dimension;
114 typedef units::unit<area_dimension, units::si::system> area;
115 BOOST_UNITS_STATIC_CONSTANT(metres_squared, area);
116 typedef units::derived_dimension<units::length_base_dimension, 3>::type volume_dimension;
117 typedef units::unit<volume_dimension, units::si::system> volume;
118 BOOST_UNITS_STATIC_CONSTANT(metres_cubed, volume);
120 BOOST_UNITS_STATIC_CONSTANT(microns, units::metric::micron_base_unit::unit_type);
121 typedef units::derived_dimension<units::length_base_dimension, -1>::type per_length_dimension;
122 typedef units::unit<per_length_dimension, units::si::system> per_length;
123 BOOST_UNITS_STATIC_CONSTANT(per_metre, per_length);
124 typedef units::derived_dimension<units::length_base_dimension, -2>::type per_area_dimension;
125 typedef units::unit<per_area_dimension, units::si::system> per_area;
126 BOOST_UNITS_STATIC_CONSTANT(per_metre_squared, per_area);
129 typedef units::derived_dimension<units::mass_base_dimension, 1>::type mass_dimension;
130 typedef units::unit<mass_dimension, units::si::system> mass;
131 BOOST_UNITS_STATIC_CONSTANT(kg, mass);
132 typedef units::derived_dimension<units::mass_base_dimension, 1, units::time_base_dimension, -1>::type mass_flow_rate_dimension;
133 typedef units::unit<mass_flow_rate_dimension, units::si::system> mass_flow_rate;
134 BOOST_UNITS_STATIC_CONSTANT(kg_per_second, mass_flow_rate);
135 typedef units::derived_dimension<units::mass_base_dimension, 1, units::length_base_dimension, -2, units::time_base_dimension, -1>::type mass_flux_dimension;
136 typedef units::unit<mass_flux_dimension, units::si::system> mass_flux;
137 BOOST_UNITS_STATIC_CONSTANT(kg_per_metre_squared_per_second, mass_flux);
140 typedef units::si::amount amount;
141 BOOST_UNITS_STATIC_CONSTANT(moles, units::si::amount);
142 typedef units::derived_dimension<units::amount_base_dimension, 1, units::time_base_dimension, -1>::type molar_flow_rate_dimension;
143 typedef units::unit<molar_flow_rate_dimension, units::si::system> molar_flow_rate;
144 BOOST_UNITS_STATIC_CONSTANT(mole_per_second, molar_flow_rate);
145 typedef units::derived_dimension<units::amount_base_dimension, 1, units::length_base_dimension, -3, units::time_base_dimension, -1>::type concentration_flow_rate_dimension;
146 typedef units::unit<concentration_flow_rate_dimension, units::si::system> concentration_flow_rate;
147 BOOST_UNITS_STATIC_CONSTANT(mole_per_metre_cubed_per_second, concentration_flow_rate);
148 typedef units::derived_dimension<units::amount_base_dimension, 1, units::length_base_dimension, -2, units::time_base_dimension, -1>::type molar_flux_dimension;
149 typedef units::unit<molar_flux_dimension, units::si::system> molar_flux;
150 BOOST_UNITS_STATIC_CONSTANT(mole_per_metre_squared_per_second, molar_flux);
151 typedef units::derived_dimension<units::amount_base_dimension, 1, units::length_base_dimension, -5, units::time_base_dimension, -1>::type concentration_flux_dimension;
152 typedef units::unit<concentration_flux_dimension, units::si::system> concentration_flux;
153 BOOST_UNITS_STATIC_CONSTANT(mole_per_metre_pow5_per_second, concentration_flux);
154 typedef units::derived_dimension<units::amount_base_dimension, 1, units::length_base_dimension, -3>::type concentration_dimension;
155 typedef units::unit<concentration_dimension, units::si::system> concentration;
156 BOOST_UNITS_STATIC_CONSTANT(mole_per_metre_cubed, concentration);
157 typedef units::derived_dimension<units::amount_base_dimension, 1, units::length_base_dimension, -4>::type concentration_gradient_dimension;
158 typedef units::unit<concentration_gradient_dimension, units::si::system> concentration_gradient;
159 BOOST_UNITS_STATIC_CONSTANT(mole_per_metre_pow_4, concentration_gradient);
160 typedef units::derived_dimension<units::amount_base_dimension, -1, units::time_base_dimension, -1, units::length_base_dimension, 3>::type rate_per_concentration_dimension;
161 typedef units::unit<rate_per_concentration_dimension, units::si::system> rate_per_concentration;
162 BOOST_UNITS_STATIC_CONSTANT(metre_cubed_per_mole_per_second, rate_per_concentration);
163 typedef units::derived_dimension<units::amount_base_dimension, 1, units::mass_base_dimension, -1>::type molar_mass_dimension;
164 typedef units::unit<molar_mass_dimension, units::si::system> molar_mass;
165 BOOST_UNITS_STATIC_CONSTANT(mole_per_kg, molar_mass);
166 typedef units::derived_dimension<units::length_base_dimension, -3>::type number_density_dimension;
167 typedef units::unit<number_density_dimension, units::si::system> number_density;
168 BOOST_UNITS_STATIC_CONSTANT(per_metre_cubed, number_density);
171 typedef units::derived_dimension<units::length_base_dimension, 1, units::time_base_dimension, -1>::type velocity_dimension;
172 typedef units::unit<velocity_dimension, units::si::system> velocity;
173 BOOST_UNITS_STATIC_CONSTANT(metres_per_second, velocity);
176 typedef units::derived_dimension<units::mass_base_dimension, 1, units::length_base_dimension, 1, units::time_base_dimension, -2>::type force_dimension;
177 typedef units::unit<force_dimension, units::si::system> force;
178 BOOST_UNITS_STATIC_CONSTANT(newtons, force);
180 typedef units::derived_dimension<units::mass_base_dimension, 1, units::length_base_dimension, -1, units::time_base_dimension, -2>::type pressure_dimension;
181 typedef units::unit<pressure_dimension, units::si::system> pressure;
182 BOOST_UNITS_STATIC_CONSTANT(pascals, pressure);
183 BOOST_UNITS_STATIC_CONSTANT(mmHg, units::metric::mmHg_base_unit::unit_type);
186 typedef units::derived_dimension<units::mass_base_dimension, 1, units::length_base_dimension, -1, units::time_base_dimension, -1>::type dynamic_viscosity_dimension;
187 typedef units::unit<dynamic_viscosity_dimension, units::si::system> dynamic_viscosity;
188 BOOST_UNITS_STATIC_CONSTANT(poiseuille, dynamic_viscosity);
189 typedef units::derived_dimension<units::length_base_dimension, 3, units::time_base_dimension, -1>::type flow_rate_dimension;
190 typedef units::unit<flow_rate_dimension, units::si::system> flow_rate;
191 BOOST_UNITS_STATIC_CONSTANT(metre_cubed_per_second, flow_rate);
192 typedef units::derived_dimension<units::mass_base_dimension, 1, units::length_base_dimension, -4, units::time_base_dimension, -1>::type flow_impedance_dimension;
193 typedef units::unit<flow_impedance_dimension, units::si::system> flow_impedance;
194 BOOST_UNITS_STATIC_CONSTANT(pascal_second_per_metre_cubed, flow_impedance);
197 typedef units::derived_dimension<units::length_base_dimension, 2, units::time_base_dimension, -1>::type diffusivity_dimension;
198 typedef units::unit<diffusivity_dimension, units::si::system> diffusivity;
199 BOOST_UNITS_STATIC_CONSTANT(metre_squared_per_second, diffusivity);
200 typedef units::derived_dimension<units::length_base_dimension, 5, units::time_base_dimension, -1, units::amount_base_dimension, -1>::type diffusivity_per_concentration_dimension;
201 typedef units::unit<diffusivity_per_concentration_dimension, units::si::system> diffusivity_per_concentration;
202 BOOST_UNITS_STATIC_CONSTANT(metre_pow5_per_second_per_mole, diffusivity_per_concentration);
203 typedef units::derived_dimension<units::amount_base_dimension, 1, units::mass_base_dimension, -1, units::length_base_dimension, -2, units::time_base_dimension, 2>::type solubility_dimension;
204 typedef units::unit<solubility_dimension, units::si::system> solubility;
205 BOOST_UNITS_STATIC_CONSTANT(mole_per_metre_cubed_per_pascal, solubility);
206 typedef units::derived_dimension<units::mass_base_dimension, -1, units::length_base_dimension, 1, units::time_base_dimension, 2>::type volumetric_solubility_dimension;
207 typedef units::unit<volumetric_solubility_dimension, units::si::system> volumetric_solubility;
208 BOOST_UNITS_STATIC_CONSTANT(per_pascal, volumetric_solubility);
210 typedef units::derived_dimension<units::length_base_dimension, 1, units::time_base_dimension, -1>::type membrane_permeability_dimension;
211 typedef units::unit<membrane_permeability_dimension, units::si::system> membrane_permeability;
212 BOOST_UNITS_STATIC_CONSTANT(metre_per_second, membrane_permeability);
215 typedef units::derived_dimension<units::length_base_dimension, 2, units::time_base_dimension, -2>::type absorbed_dose_dimension;
216 typedef units::unit<absorbed_dose_dimension, units::si::system> absorbed_dose;
217 BOOST_UNITS_STATIC_CONSTANT(gray, absorbed_dose);
219 typedef units::derived_dimension<units::length_base_dimension, -2, units::time_base_dimension, 2>::type per_absorbed_dose_dimension;
220 typedef units::unit<per_absorbed_dose_dimension, units::si::system> per_absorbed_dose;
221 BOOST_UNITS_STATIC_CONSTANT(per_gray, per_absorbed_dose);
223 typedef units::derived_dimension<units::length_base_dimension, -4, units::time_base_dimension, 4>::type per_absorbed_dose_squared_dimension;
224 typedef units::unit<per_absorbed_dose_squared_dimension, units::si::system> per_absorbed_dose_squared;
225 BOOST_UNITS_STATIC_CONSTANT(per_gray_squared, per_absorbed_dose_squared);