Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.maple > #316 > unrolled thread

Units conversion

Started byThomas Dean <tomdean@speakeasy.org>
First post2012-01-17 22:12 -0800
Last post2012-01-18 06:03 -0800
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.maple


Contents

  Units conversion Thomas Dean <tomdean@speakeasy.org> - 2012-01-17 22:12 -0800
    Re: Units conversion acer <maple@rogers.com> - 2012-01-18 06:03 -0800

#316 — Units conversion

FromThomas Dean <tomdean@speakeasy.org>
Date2012-01-17 22:12 -0800
SubjectUnits conversion
Message-ID<ypWdnQ512Msi_4vSnZ2dnUVZ_gednZ2d@megapath.net>
I am attempting to convert tesla*meter/second to volts/meter.

I can almost get there.

restart; with(ScientificConstants);
E := 30*10^(-15)*Unit('T')*GetValue(Constant(c))*Unit('m')/Unit('s');
teslaDefn := Unit('V')*Unit('s')/(Unit('m')*Unit('m'));
velocityDefn := Unit('m')/Unit('s');
teslaDefn*velocityDefn;
voltDefn:= 
(Unit('kg')*Unit('m')*Unit('m'))/((Unit('s')*Unit('s'))*Unit('s')*Unit('A')); 
voltDefn/Unit('m');

How to I get E's units to be volts/meter?

Tom Dean

[toc] | [next] | [standalone]


#317

Fromacer <maple@rogers.com>
Date2012-01-18 06:03 -0800
Message-ID<21384143.2732.1326895386946.JavaMail.geo-discussion-forums@vbxy22>
In reply to#316
You can define and use a modified version of the SI system in which volts/meter is the default for expressing items with the same dimensions as of kg*m/s^3*A.

(This is typeset in ascii, but of course the units get printed more nicely with the double [[]] brackets in the GUI.)

restart;

with(ScientificConstants):

E := 30*10^(-15)*Unit('T')*GetValue(Constant(c))*Unit('m')/Unit('s'); 

          449688687 Units:-Unit('T') Units:-Unit('m')
          -------------------------------------------
                50000000000000 Units:-Unit('s')     
 
combine(E,units);

              449688687               /('kg') ('m')\
            -------------- Units:-Unit|------------|
            50000000000000            |     3      |
                                      \('s')  ('A')/

convert(combine(E,units),units,volts/meter);

                  449688687               /'V'\
                -------------- Units:-Unit|---|
                50000000000000            \'m'/

simplify(%); # back to where we started, as it is not special to SI

              449688687               /('kg') ('m')\
            -------------- Units:-Unit|------------|
            50000000000000            |     3      |
                                      \('s')  ('A')/

# define a new version of SI
Units:-AddSystem(newSI,Units:-GetSystem(SI),volts/meter);
Units:-UseSystem(newSI);

combine(E,units); # now done in one step (and `simplify` does not undo it)

                  449688687               /'V'\
                -------------- Units:-Unit|---|
                50000000000000            \'m'/


That should also play reasonably nicely with more automatic simplification of units with arithmetic that one gets after loading Unit:-Standard.

best,
acer

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.maple


csiph-web