axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Unit package question - Reply to 1st half


From: William Sit
Subject: Re: [Axiom-developer] Unit package question - Reply to 1st half
Date: Wed, 24 Aug 2005 13:50:54 -0400

C Y wrote:

> > Again, this would complicate the implementation of the domains for
> > UnitSystem category. Would you allow, for example, in SI(S),
> > setUnitLength(ft)? (I would vote a definite No).
> 
> I would vote yes, because I can't predict what I'll want to do with my
> unit environment.
> I can't imagine all the
> ways and situations units can be applied, so I don't want to restrict
> the user runtime environments that can be set up and customized.

Fair enough. But there is no reason why one cannot first convert ft to m, use SI
as is, then convert back from m to ft.  If a user really want to use ft instead
of m but retain all other SI units ALWAYS, then create a MYUnitSystem domain,
and use )set unit MYUnitSystem. The implementation would be so much easier and
you still retain the flexibility. Flexibility and generality may complicate
usage as well as simplify usage. We have to balance the them.

> > > > The user unit system can mix units if that is preferred.
> > >
> > > So you're envisioning a separate level of logic which handles user
> > > settings, and the underlying one organized as outlined below?
> >
> > Yes, but that scenario is not encouraged (indeed discouraged), even
> > though it can be done.
> 
> But it should be doable, readily, IMHO.  That's what computers are for
> - to handle the grunt work associated with such decisions.

As long as you are willing to do the programming :-)

> > All I am saying is that even if an equation is dimensionally
> > correct, it could still be wrong (in terms of physics) because
> > of this non-unique mapping. We certainly cannot just use
> > dimensional analysis (reducing to basic dimensions) to
> > discover that Work = Moment is wrong.
> 
> No.  However, the ultimate burden in such cases will rest with the
> scientist in question, and it may be that the dimensional correctness
> of the equation is useful information to him/her.  Hence my suggestion
> for two modes on dealing with such things.

Dimensional correctness does not require RDA or even DA (DA is used to guess an
empirical law).

[snipped]

> There is also the case where you want to know what
> quantity/dimension an expression is.
> 
Reverse dimensional analysis, is useful for providing the user with possibly
different interpretation of the dimension of an expression. Checking dimensional
correctness is a different, though related, issue.

> > I really don't think a scientific worker would use slugs with
> > MKS. 

> That was just an example.  nanometers instead of meters, or light years
> instead of meters, would be more realistic examples.
> 
> > Don't mix unit systems! Convert first before you start the
> > computations, and convert back if you really have to.
> 
> But that's just it - part of the reason for implementing a Unit system
> in a CAS in the first place is to get it to do all the converting and
> other annoyingly boring and error prone tasks for you - both for input
> and output.

Sure, but that does not mean one has to do it for all possible conversions, only
the most useful ones should be provided, with functionality that allows, though
not as convenient, the very special user to change units.

> > So pi has unit degree/radian (even though that is dimensionless)
> > when it is viewed as a unit conversion factor between radians and
> > degrees.
> 
> I'm confused - when does it hurt to trivially reduce or ignore this?

Ignoring it in this example would mean the equation is not dimensionally
balanced, and worse, some may think that degree = radian!
 
> > Dimensionless is not always without dimension
> 
> That makes no sense to me at all - when is it useful to consider a
> dimensionless quantity to have dimension?  Isn't that a logical
> contradiction?  F AND ~F -> F

OK, let me try to explain again.  A quantity is dimensionless means its
dimension can be reduced to 1. But sometimes, it is more meaningful (physically
or mathematically) to view these as a quotient (this is like, but not totally,
we sometimes rewrite 1 as 2/2 to add fractions). Even SI recognizes this in
stating that the unit of a phase angle is m. m^(-1) = 1 because this IS the
definition (arc length spanned by the angle, divided by the radius). Just
because the dimensions cancel out (making it dimensionless) does not mean the
dimension is not there.

> > One may do a certain amount of guessing or pattern matching,
> > but that is limited by one's current knowledge (limited, at best).
> > The example I gave earlier, m^2.s^(-2), would you even have thought
> > of it as absorbed dose? (I certainly didn't before writing this
> > email). Given the vastness of scientific research, you need a
> > subject matter expert to increase the chance of meaningful
> > matching. The user is often the subject matter expert. Let him
> > or her deal with it.
> 
> OK, but I still think a) we can prepare useful "domains" such as
> defaults for physics, and b) if such work is done by subject matter
> experts we should be able to incorporate it since it would constitute a
> useful tool for work in the subject in question.
> 
Definitely. We can have a nanosytem domain, and other domains of UnitSystem(S)
as experts need them. That is the beauty of Axiom's categorical approach:
unifying domains with a common set of API.

William




reply via email to

[Prev in Thread] Current Thread [Next in Thread]