Boost::units users,
I am trying to perform a flow rate through an orifice calculation (Volume
per Time or L^3T^-1) using the following dimensional analysis:
Q = Cf * A * sqrt( 2 * abs(P1-P2) )
On paper the dimensional analysis works out correctly. I know we should be
receiving a L^3T^-1 consequent to the calculation.
If I just take this on one line, it seems to compile:
__C_flow * __a_orifice * boost::units::sqrt(__two * __p_diff / __d);
Where __a_orifice is the area of the orifice, __p_diff is the pressure
differential (absolute value), and __d is the mass density. __C_flow
(coefficient of flow through orifice) and __two (2.0) are both
dimensionless.
In terms of units quantities, these are all defined as quantitysi::area,
quantitysi::pressure, quantitysi::mass_density, and
quantitysi::dimensionless, to start with.
I think my flow-rate dimension and/or unit must be incorrect, but I am
failing to see why in order to know what to do to correct the error.
typedef
boost::units::derived_dimension