Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::units primer explained / conversion factors required
From: Noah Roberts (roberts.noah_at_[hidden])
Date: 2011-07-22 13:01:39

On 7/21/2011 7:10 PM, Michael Powell wrote:

> Okay, so we can do some reductions I think, (10e3 * L^3 * T^-2). Am I
> reading this correctly? Is this the rate at which a volume transfers?
> Something along these lines. Really not up on my dimensional analysis
> like I should be; but I WILL be.

Too early on a Friday to do this. The great thing about this library is
that if you get it wrong, it'll let you know.

> However it reduced, please verify I am reducing correctly, I don't think
> the units are supposed to make sense; we're arriving at an intermediate
> conversion factor I believe. At least that's how it is explained to me.

You'll still need units attached to the type. You'll have to convince
your customer or engineers that it's necessary. It took a lot of doing
in my project but we got our engineering department to decide upon a
system and stick with it. We picked SI.

You'll run into a lot of "factors" in the equations they give you.
You'll have to work with them to find the correct "units" to use. For
example, Kv and Cv are the common flow coefficients. Engineers do not
think of them as units but in reality they are.

Until we realized this we were treating them as dimensionless quantities
and bypassing the units to make them so. This caused a lot of issues
for us though and eventually we had to go back to the drawing board.
Now, engineers often simply don't understand the rigor that is required
in programming and it may take a lot of effort, learning and research on
your own part but doing these types right is really necessary.

In this case we eventually found that flow_coefficient is a dimension (a
really funky one - Q/sqrt(dP)) and that the unstandardized unit in SI
had to be made up (we called it Kv_si). The engineers then derived
conversion factors to the Kv and Cv "units" that we then use to convert
user input and display.

In short, while engineers will often say, "This value has no unit,"
they're very often wrong. What they mean is that they *assume* it does
not. These types are often intimately related to the formula set they
are using and are not universal; use of Cv is in US units and formulas,
while Kv is a metric "coefficient". It can take much work to make them so.

Sometimes they are right. K, the resistance coefficient, is indeed a
dimensionless quantity. One starting point in convincing/instructing
your engineers might be to discuss Kv/Cv vs. K.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at