Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2006-08-23 07:40:44


"Matthias Troyer" <troyer_at_[hidden]> wrote in message
news:14AD1E01-8077-42A7-A25E-5B5AF8AB1EFA_at_itp.phys.ethz.ch...

> I have a question here: what is the purpose of these named quantities
> - is it to output J instead of kgm^2s^2 for energy and Nm instead
> of kgm^2s^2 for torque?

Basically yes. Way back someone requested that they be differentiated, so I
differentiated them and hence (BTW) the notion of an anonymous quantity was born
as a logical result of not being able to distinguish the two in some cases.

After all torque is a vector quantity and energy is a scalar quantity, so they
are quite different.
One could output energy units as N.m , but the joule is the more well known SI
energy unit, so it helps to put things in a familiar context.

Also there are various non SI units which specifically mean torque, such as
(reading from the SI manual) dyne centimeter, kilogram-force meter, etc.

And for energy: erg per square centimeter second, watt per square inch etc..

> - is it to prevent adding energy and torque?

It could be in Quan, by more querying of the unit and disallowing the
calculation in this case. At one point Quan (in a previous incarnation) did do
this, but then maybe there are situations where adding or comparing torque and
energy is appropriate, so I opted for the freer semantics. If there is a proof
of some sort that they can never be compared or added then I will change the
current semantics, but I am not enough of an expert to say for sure.

regards
Andy little


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk