Grouping by units over add - progress, and a couple questions
Subject: Grouping by units over add - progress, and a couple questions
From: Albert Reiner
Date: 20 May 2005 18:20:34 +0200
[C Y , Fri, 20 May 2005 06:57:55 -0700 (PDT)]:
> > rho*log(rho)
> Well, I guess the question becomes different forms of the same issue -
> what units does rho*log(rho) have?
It doesn't have any units. But it is useful nevertheless.
If A is the free energy of an ideal gas, and beta = 1/kB T, kB is
Boltzmann's constant, and rho=N/V is particle density, then
beta A / V = rho (log(rho) + 3 log(Lambda) - 1)
where the de Broglie thermal wavelength Lambda depends on temperature
and particle mass. The whole expression has the units you would
expect, viz., 1/volume. But the term log(rho) does not have any units
(although you may state that log(N/V) = log(N) - log(V)), but log(rho)
+ 3 log(Lambda) = log(rho*Lambda^3), which is dimensionless.
But when you are interested in fluid structure, Lambda is irrelevant:
a change in particle mass only changes the time scale but not the
correlations, so you don't want to carry Lambda around at all. In the
end you are only interested in energy differences anyway - the log(V)
or log(Lambda) etc. then simply drop out.
Taken by itself, the log of a dimensional quantity does not mean
anything physically. But in the given context there is no ambiguity
at all involved, simply because log(a*b) = log(a) + log(b), and the
units should always drop out in the end.
Another question to consider is whether it is meaningful to accept
non-integer powers of units. In SI units this is generally a big
no-no. In cgs units, OTOH, you also have (at least) half-integer
exponents. Does sqrt(meter) make any sense? Not for someone used to
SI units (except in elementary quantum mechanics: as |psi|^2 gives a
probability density, the dimensions of the wave function psi are
Length^(-D/2), where D=3 for our universe.)
> What do I do with 'integrate(a*kg/s+b*kg/s,t)? Simplify what's
> inside integrate, or (my inclination) respect the ' symbol and do
> nothing to it?
Or simplify to 'integrate(a+b,t)*kg/s.
> Perhaps I stated this badly - what I want to know is if sin(x) where
> x has some dimension can have physical meaning.
I don't think that sin(1/m) has any meaning by itself, but there may
be an implied context where this is the case. And I would certainly
expect the identity sin(a+1/m)*cos(b-1/m)-cos(a+1/m)*sin(b-1/m) =
sin(a+b) (hope I got that right) to hold even though it is a statement
on the sum of products of trigonometric functions of ``meaningless''
subexpressions.
The other question is: How do you know whether something is
dimensionless? 5m or 1 or %pi or exp(5m / 3m) are quite obvious, but
nothing can be said as soon as there are unknown quantities. One
might be tempted to do some kind of unit analysis, saying, e.g., that
sin(a*5m) implies that a is an inverse length, so that a*sin(a*5m) is
not dimensionless, but I don't think that is a good way to do things.
Or you might require people to explicitly declare the dimension of a
beforehand. (I am thinking of things like Clifford algebra, where
people add lengths and areas and volumes etc.).
(Note that declaring the dimension would probably bring about further
problems: I guess the information would be attached to the symbol, not
to its value, but in my understanding only the binding but not the
symbol is changed by, e.g., block.)
> The other obvious alternative would be to do sin(a*m)=sin(a)*m, but
> this would also require justification and personally I doubt it's
> correct.
I think you are right: except for a close to 0 this would be very
wrong.
> > OTOH, it may well be that people who want to do their calculations in
> > this way simply should not use the units package.
>
> I would like to have the units package work in such a fashion that any
> legal use of units, and any helpful error reporting that can be managed
> without massive effort, works as expected. When getting to special
> cases like this that gets rather involved, unless someone smarter than
> me can straighten me out and point out the obvious solution? (pretty
> please? :-)
What I meant with this is the following: Not everything in physics
uses units, or at least not all the time. And I would not be
surprised if the overlap of those who use units and those who don't
were small enough to be irrelevant. E.g., I would not be surprised if
experimentalists didn't usually write rho*log(rho) or simply used
numbers throughout (and I have some anecdotal evidence for this
expectation). OTOH, theoreticians love to set some fundamental
constants of the problem equal to unity, dimensionless.
What is or is not a legal use of units depends on the established
context.
Regards,
Albert.