(Russian
expanded text – http://twt.mpei.ac.ru/ochkov/Unit_MC_MP/Unit_MC_MP.htm)
Valery Ochkov ochkov@twt.mpei.ac.ru http://twt.mpei.ac.ru/ochkov
Others
articles of V.Ochkov – http://twt.mpei.ac.ru/ochkov/work2.htm
(in Russian)
http://twt.mpei.ac.ru/ochkov/work2_eng.htm
(in English)
Today solving engineering and technical problems on computer the users
tend to work with universal mathematical packages (Mathcad,
Maple, MatLab, Mathematica and others) rather than use programming
languages. The mathematical packages enable computation projects to draw up
much faster. The same speeding-up occurred when machine code was changed to the
programming languages.
Mathcad lets us work with physical quantities and it stands out against
the listed packages. The seventh Maple version appeared in summer 2001 with the
only new feature allowing us to work with dimensions. The article compares
working with dimensions in these two packages.
Speaking
language of mathematics Mathcad[1]
and Maple[2]
built-in tools allowing us to work with dimensional quantities are sets
overlapping but not coincident. To compare the “dimensional” pluses and minuses[3]
in these physical and mathematical packages[4]
is not quite well-posed problem. First of all, dimensional quantities appeared
in Maple later than in Mathcad. Of course, Maple designers had to consider
ten-year experience with using dimensions in Mathcad. But
shall try to solve such improperly posed problem to compare these packages in
relation to work with dimensional quantities (and some more[5]).
1. When we
start Mathcad one of the unit sets is available (SI in European version (see Fig. 1) or S.U. in American &
Canadian[6]).
Starting Maple we have to run some command extra (load with corresponding
library (Units), see Fig. 2) that allow
to work with dimensions. Otherwise dimensional units can be converted only
within the limits of the physical quantity (see Fig. 2, example
2). There was a situation in Mathcad connected with Maple[7]
too when we had to load the library to work with symbolic mathematics, not with
dimensional units (Mathcad 5.0). Later the technology was rejected but not
completely. Different designers (authors) offer electronic books in various
branches of science and we can open, study, place required fragments
(operators, text regions and others) in worksheet. In Maple libraries are
opened (loaded) and one of them is called Unit. We can discuss Mathcad feature
to allow using units right away. To tell the truth, the most part of problems
are solved without using physical quantities in Mathcad while built-in units kg,
m, sec can be in the way. In this case it is better to cut off built-in
variables (click “None” in dialog box shown in Fig. 1).
The other way is launching Mathcad load the template in which system of units
is turned of or the alternative definitions are adjusted (Fig. 1).
After
loading the library of work with dimensional quantities Maple displays built-in
functions and operators that are applied to it. Mathcad does not give such
information even in reference manual. Just in “Tips of the day[8]”
was a passing mention that we can not work with dimensional quantities for
example in Mathcad programs. This restriction was removed in last versions but
the tip not to use dimensional units remains.
The main
disadvantage of Maple and Mathcad is that a number of functions and operators
entered before the tools for working with dimensional units work improperly with
dimensional arguments and operands. Essentially, a user often forgets about
these restrictions and obtains unintelligible result. Mathcad and Maple
designers should have applied dimensional units to all functions and operators[9]
or lock (for example indicating error message) using dimensional arguments
(operands) in these functions (operators[10]).
The tools for working with dimensional units can be considered as undocumented
(poorly documented) tools which we have to apply very guardedly checking the
result in every debugging and testing. The condition (restriction) concern not
only “exotic” functions and operators (solving differential equations and
system of differential equations, ordinary and «unordinary» – with partial
derivatives) but also rather routine tools Mathcad and Maple: tabular
dependence approximation (representative example of the mistake in Mathcad see
in Fig. 1a) or creating plots
(representative example of the mistake in Maple see in Fig. 2a).
One
comment from Waterloo Maple, Inc.:
The problem of Units in ODE-solutions – see Fig. 4d.
2. The
Mathcad characteristic which boosts popularity is handy user interface.
Particularly, Mathcad document looks almost like that created in text editor
(for example Word) or scientific editor (LaTeX) and
has not some conventional programmer symbols which irrelevant to problem. It
entirely concern dimensional units: In Mathcad Physical quantities are displayed
in their common abbreviations 25 N, 40 cm2, 6250 Pa etc. (Fig. 3). In Maple it is
burden with additional symbols (25*unit(N), 40 [cm^2], 6250 [Pa] – Fig. 4) that
make difficult to see purport and solution of a problem. In Mathcad the change of a unit passes imperceptibly for
the user, more correctly, "reader" of the Mathcad-document (Fig. 3a). In Maple this operation needs «the
special invitation» functions convert – see Fig. 4a.
All this "charge" physics of a task, its physical essence.
One
comment from Waterloo Maple, Inc.:
Units package in Maple has two variations:
with(Units[Standard]) requires more syntax (example: 10*Unit(cm^2)) but separates unit names from
variable names.
with(Units[Natural])
requires less syntax (example: 10*cm^2) but does not separate unit names
from variable names – see. Fig. 4b.
Thus, Maple offers both tradeoffs. Users can use Units[Natural] if they don't like the extra
symbols.
3. In Maple
a numerical constant and an individual physical quantity can be connected only
with visible multiplication mark (for example, 25*Unit(N)) or with
that invisible (for example, 6250 [Pa]). At that,
the numerical constant is first co-factor and dimensional unit or dimension –
the second (for example, 6250 [Pressure]). Mathcad
has not this restriction: the gap between the number and dimensional unit can
be multiplication mark or more complicated functional dependence, prefix or
postfix operators, etc[11].
This allow us to work easily not only with absolute
measuring scale but with relational also. For instance, Figure 5 shows how to define temperature and
it difference in Celsius in Mathcad. In the first case (t1 := 90 ºC) the gap between the numerical constant (90) and two symbols (ºC) means call of function (ºC) in the form of postfix operator x f and in the latter case – multiplication. Temperature[12],
one of seven SI units, has a feature that it often measured not on the absolute
scale (Rankine or Kelvin) but on relational (Celsius
or Fahrenheit[13]).
This can cause confusion in calculations: let’s imagine a drawing of constructed
building in which some of dimensions are measured in meters from the foundation
and others – in foots from sea level. In Mathcad prefix and postfix operators
save metrological situation as well as invisible symbol on screen (Fig. 6). The user functions and constants
for working with relational temperature scales can be hidden at which equations
become usual. A user can only change the source data (green constants) to get
new result (Fig. 6a). Although Maple has
six built-in temperature scales, two absolute and four relational, the later
are slightly tangled: Figure 7 shows
temperature has a certain double definition – temperature (scale) and temperature
difference (degree). That is because only the multiplication mark can be placed
between the numerical constant and the temperature unit; here for example how
we can type the normal man temperature in Maple t:=36.6*unit(degC). We set the variable t not the
temperature value (scale) but temperature difference between 0o Celsius
and 36.6o Celsius which nevertheless can be displayed in the form of
temperature also. (Author emphasizes the temperature because he had a
difficulty with it taking part in Internet project WaterSteamPro in which
functions returns heat and physical properties of water and steam in Mathcad http://twt.mpei.ac.ru/orlov/watersteampro).
The logarithmic scales in Maple are in a mess too: we can convert between
built-in bels, decibels, nepers[14]
but it is not clear how to use it in practice. In Mathcad the infix operator
allows to make calculations without difficulties – the first operator of that
is numerator of the logarithm (determined physical value) and the second is
denominator (the base, reference of
logarithmic scale, see Fig. 8).
Comments to “temperature scales” of Maple Unit
Developer
"Although Maple has six built-in temperature scales, two absolute
and four relational, ..."
This is incorrect. Maple has 6 units of temperature. I
refer to the document "The International System of Units (SI)" from
the Beuro International des Poids
et Mesures", 7th edition, 1998. On page
100 in the English version, it shows that 1 degree Celsius equals 1 Kelvin. You
are incorrect to state that Celsius is a relational temperature scale. It is
completely correct to state that
1 calorie per Kelvin = 4.184 joules per degree
Celsius.
Therefore, it is necessary and correct that Maple gives
> convert( 1, units, kelvin, Celsius
);
1
just as:
>
convert( 1.0, units, calories/kelvin, joules/Celsius
);
4.184000000
is correct. A separate
feature is given to convert relational temperatures:
> convert( 32.0, temperature, Fahrenheit, kelvin
);
273.1500000
It would be a complete
disaster if Maple were to treat "joules per degree Celsius" the same
as "joules per 275.15 kelvin".
Comments from one Mathcad user:
I believe that Maple's comment
regarding "2 absolute and 4 relational" temperature scales is
incorrect. While their example of using the Celsius temperature is correct, in
of itself, Celsius temperatures can rarely be used directly in physical
equations, since most physical equations require absolute Kelvin temperature.
Additionally, Celsius is indeed a "relational" temperature scale,
since it's defined as 1/100th of the temperature difference between the triple
point of water and its boiling point at STP.
I'm not convinced there's a clear-cut solution, since an automatic conversion
to absolute temperature internally would muck up the example they gave.
Somehow, it would need to be clever enough to know when you are requiring an
absolute calculation and when you're merely interested in a relative
calculation. Because of the offset nature of the two scales, there is no
readily usable solution, unlike the situation between feet and meters.
Comments to “logarithmic scales” of Maple Unit
Developer
"The logarithmic scales in Maple are in a mess too: we can convert between built-in bels, decibels, nepers[14] but it is not clear how to use it in practice."
This is probably an ambiguity in translating the word "base"
from English to Russian, which has several meanings in English. It appears that
you are translating "base" to mean the "base of the
logarithm". In this particular case, we meant "base" to be
something else. Bels or nepers
always represent a relative power or voltage ratio, respectively. Thus, in the
case of bels, "base" is defined as some
power relative to a given base power. Sorry for the confusion.
For example:
>
with(Units[Natural]):
> ln(3.91*mW / (4.73*uW(base)));
3.358683726 [Np]
> convert(%, units, dB);
29.17315617 [dB]
Thus a power source of 3.91 milliwatts relative to a
base power of 4.73 microwatts is approximately 29 decibels.
The conversion:
> convert( 1, units, bel, nepers );
1/2 ln(10)
is given on page 105 of
"The International System of Units (SI)". This book states that
"the bel is used to express values of such
logarithmic quantities as
field level, power level, sound pressure level, and attenuation." Nepers reflect, for example, voltage ratios, and power is
proportional to the square of the voltage and is therefore reflected in the
above expression by the factor of 1/2.
4. The user
variables and that attached with built-in units are put “in one basket” in Mathcad
and similar to each other if a user does not divide it by using styles of
variables and constants. This Mathcad feature can be considered as a sort of
charge for “external naturalness” discussed in item 2. Figure 9 shows the typical “metrological”
mistake connected with redefining voluntary or not variables m (unitary meter), and L (liter), and that, resulted
in a mistake in the answer, 1m2L in place
of 1000 L. In Maple such “outrage” is impossible (Fig. 10) — the user variables m and L[15] and units of the same name are not mixed. But as
mentioned above, we have to pay for it with complication of a document: compare
m:=
100 cm or m:=100*unit(cm).
5. Mathcad
has four unit systems (SI, MKS, CGS and
6. In
Mathcad the sphere of physical quantities are confined to built-in unit systems
(Fig. 1). Maple has a great number of
quantities and it dimensional units which are not included in any unit system.
Finally such physical or, rather, economic quantity as cost[16]
was built in Maple (Fig. 12). In Mathcad
economic calculations can be made only with one of seven basic units
“expansion”, candela[17],
which is not used in this worksheet (Fig. 13).
In Maple the dimensional units of information are built in (bit, byte, etc.) as
well as many others that required in practical calculations without using
“stiff” unit systems. If the problem of different variables of the same name is
solved in Mathcad, in Maple the problem of dimensional units of the same name
(concerning the basic units) but different to it physical essence is solved.
Here is “power engineering” example. There are built-in hertz (Hz) and becquerel
(Bq) in Mathcad and in Maple. Hertz is a unit of
measurement of frequency and becquerel—
that of radioactivity[18]
(a number of decompositions within a unit of time). Both of it give a second
raised to the power minus one[19],
being brought into the basic unit. In Maple it is different quantities
represented different physical phenomena in contrast to Mathcad[20].
In essence (physical essence) there are not seven[21]
but infinite aggregate of physical quantities overwhelming majority of which
(infinity minus seven) are considered non-dimensional (non-dimensional by
convention). For instance, plane angle is measured in radians (rad) or in degrees of arc (deg)
and can be added to a unit for example. We can play this “trick” in Mathcad (Fig. 14) but not in Maple (Fig. 15): a unit and radian are the
different quantities (hertz and becquerel
as well). To evolve this idea (the angle is a dimensional quantity which can
not be added with non-dimensional) we should consider trigonometrical
functions can have only dimensional argument. The Maple designers did not rack
their brains over the metrological problem and solved it simply (Fig. 16): the angles in trigonometrical
functions lose it dimensions “insensibly”. There is not special “angle” logic
in Mathcad (Fig. 17) where plane angle is
non- dimensional quantity and three-dimensional angle (steradian)
— is dimensional. (Not only the computer users stumble over the plane angles
but the calculator user as well “shoving” wrong angle unit through trigonometrical functions, e.g. degree instead of radian).
"The Maple designers did not rack their brains over the metrological problem and solved it simply (Fig. 16): the angles in trigonometrical functions lose it dimensions "insensibly".
This is true. It would better to have arcsin return units of radians. To
fix this temporarily before the next version of Maple, you can add them
manually like this:
> with(Units[Natural]):
> a := sin(53.2*deg);
a := 0.8007313711
> arcsin(a);
0.9285151623
> arcsin(a)*rad;
0.9285151623 [rad]
> sin(%);
0.8007313711
Computers
played a spiteful joke on physical and engineering calculations: dimensional
units were squeezed out from it. Today we observe a certain local computer
“Renascence” — dimensional units return into calculations. Mathcad was a
pioneer in the process, now Maple have joined in the
work. Both packages do not finish it. Many functions and operators demand
(expect) when the designers will teach it to work with physical quantities. For the present users of the packages are in the same expectation.
This
article is some “extract” of the book “Physical and economic quantities in
Mathcad and Maple” (http://twt.mpei.ac.ru/ochkov/Units/Forword_book.htm) preparing for publication by “Finance and
Statistics”. This is how the book has been appeared. The author often looked
into student problems solved in Mathcad. Physical or technical and economic
problems were frequently solved without dimensional units that resulted in
mistakes almost every time. Besides, rejecting, to put it mildly, does not make
clear the problem. The causes to reject dimensional units are: students do not
know how to work with it or face the difficulties forced to withdraw it from
almost finished calculation. The author collected the “difficulties”,
supplemented it with solutions and description of “dimensional calculations”
technology in Mathcad/Maple.
Dimension |
Unit
|
|
Mathcad (115 units)
|
Maple (569 units)
|
|
Àêòèâíîñòü (activity) |
Bq |
– |
Âðåìÿ (time) |
day, hr, min, s, sec & yr |
Wink, shake, svedberg, blink, second (s), minute (m), hour (h), day
(d), pentad, week (wk), fortnight, month (mo), lune,
lunour, year (yr), biennium, triennium, quadrennium, quinquennium,
decade, century, millenium & eon |
Âÿçêîñòü äèíàìè÷åñêàÿ (dynamic viscosity) |
poise |
Poise, reyn & rhe |
Âÿçêîñòü êèíåìàòè÷åñêàÿ (cinematic viscosity) |
stokes |
Stokes (St) |
Äàâëåíèå (pressure) |
atm, in_Hg, Pa, psi
& torr |
bar, atmosphere
(atm, atmos, at), barye, pieze, vac, pound_per_square_inch (psi), meter_mercury (mHg), foot_mercury (ftHg), inch_mercury (inHg), meter_water (mH2O), foot_water (ftH2O) & inch_water
(inH2O) |
Äåíüãè (currency) |
– |
USD |
Äëèíà (length) |
cm, ft, in, km, m, mi, mm & yd |
meter (m), bohr (a0),
mil, line, barleycorn, digit, inch (in), nail, palm, hand, finger, span, foot
(ft), cubit, step, yard (yd), ell, pace, fathom, rod, pole, perch, furlong,
mile, league, link, chain, cable, league, point, pica, astronomical_unit
(AU, UA), parsec, light_year (ly),
hubble, spat, fermi,
micron, bicron, x_unit, microinch, calibre, marathon
& quadrant |
Äîçà (dose) |
Gy & Sv |
– |
Åìêîñòü (capacitance) |
F, farad, mF, nF, pF & statfarad |
farad (F), abfarad (abF), statfarad (statF) & jar |
Çàðÿä (charge) |
Ñ, coul & statcoul |
Coulomb (Ñ), abcoulomb (abC), statcoulomb (statC), electron (e) & franklin (f) |
Èíäóêòèâíîñòü (inductance) |
H, henry, mH, mH & stathenry |
henry (H), abhenry (abH) & stathenry (statH) |
Èíäóêöèÿ ìàãíèòíîãî ïîëÿ
(magnetic flux density) |
gauss, stattesla, T & tesla |
– |
Êâàíò äåéñòâèÿ (action) |
– |
planck & h_bar |
Êîëè÷åñòâî âåùåñòâà (Substance) |
mole (mol) |
mole (mol) |
Êîëè÷åñòâî èíôîðìàöèè, èíôîðìàöèÿ (Amount of information) |
– |
bit, crumb, nibble, byte, nickel, word, double_word, gawble & block, |
Ëèíåéíàÿ ìàññîâàÿ ïëîòíîñòü (linear mass density) |
– |
Denier, drex & |
Ëèíåéíàÿ ÷àñòîòà (linear frequency) |
– |
abbe |
Ìàãíèòíûé ïîòîê (magnetic flux) |
statweber, Wb & weber |
weber (Wb), abweber
(abWb), statweber (statWb), maxwell (Mx) & unit_pole |
Ìàññà (mass) |
gm, kg, lb, mg, oz, slug, ton & tonne |
gram (g), tonne (t), electron_mass (em) atomic_mass_unit (amu, u), grain (gr), drachm (dr), ounce (oz), pound
(lb, lbs), clove, stone, quarter, cental, quintal,
hundredweight (cwt), wey, kip, ton, pennyweight (dwt), scruple, ton (AT @), carat (c, ct), millier, mite, mancus, mast,
slug, hyl, crith & jupiter |
Ìîëÿðíûé ýëåêòðè÷åñêèé çàðÿä (molar electric charge) |
– |
faraday |
Ìîìåíò äèïîëüíûé ýëåêòðè÷åñêèé (electric dipole moment) |
– |
debye (D) |
Ìîùíîñòü (power) |
hp[22], kW, W & watt |
watt (W), poncelet, donkeypower,
horsepower (hp), ton, abwatt (abW)
& statwatt (statW) |
Íàïðÿæåííîñòü ìàãíèòíîãî ïîëÿ (magnetic field strange) |
Oe & oersted |
oersted (Oe) |
Îáëó÷åíèå (exposure) |
– |
roentgen (R) |
Îáðàòíàÿ äëèíà (Inverse length) |
– |
diopter
& kayser |
Îáúåì (volume) |
fl_oz, gal, galUK, L, liter & mL |
liter (L, l), stere, gallon (gal), drop, minim, drachm,
ounce, tablespoon (tbsp, Tsp, tblsp), dessertspoon
(dsp), teaspoon (tsp), pinch, dash, gill, cup,
pint, fifth, quart, pottle, peck, bucket, bushel,
strike, bag, sack, coombe, seam, butt, last, ton,
register, barrel, bulk & barge |
Îñâåùåííîñòü (illuminosity) |
lx |
– |
Ïëîòíîñòü ìàãíèòíîãî ïîòîêà (magnetic flux density) |
– |
tesla (T), abtesla
(abT), stattesla (statT) gamma & gauss (G) |
Ïëîùàäü (area) |
acre & hectare |
are (a), hectare (ha), centare
(ca), barn (b), shed, mil, rood, acre, lot, section & township |
Ïîâåðõíîñòíàÿ ïëîòíîñòü ýíåðãèè (surface energy density) |
– |
|
Ïîãëîùåííàÿ äîçà (absorbed dose) |
– |
gray (Gr) & rad (rd) |
Ïîòåíöèàë (potential) |
kV, KV, mV, statvolt, V & volt |
Volt (V), abvolt (abV)
& statvolt (statV) |
Ïîòîê ìîëÿðíûé (Molar Flow) |
– |
katal (kat) |
Ïðèðîñò ëîãàðèôìè÷åñêèé (Logarithmic Gain) |
– |
B, neper (Np) & bel (B) |
Ïðîâîäèìîñòü (conductance) |
mho, S,
siemens & statsiemens |
siemens (S), absiemens
(abS) & statsiemens (statS) |
Ïðîíèöàåìîñòü (permeability) |
– |
perm |
Ðàäèîàêòèâíîñòü (radioactivity) |
– |
becquerel (Bq), curie (Ci) & rutherford (Rd) |
Ðàñõîä (volume flow) |
– |
gallon_per_minute (gpm) & cubic_foot_per_minute (cfm) |
Ðàñõîä òîïëèâà (fuel consumption) |
– |
mile_per_gallon (mpg) |
Ñâåòîâîé ïîòîê |
Im |
|
Ñèëà (force) |
dyne, kgf, lbf, N
& Newton |
newton (N), gramforce (gf), pond, sthene, dyne (dyn), ounceforce (ozf), poundforce (lbf), tonforce (tonf), kipf & poundal |
Ñèëà ñâåòà (luminosity), ñâåò (light) |
cd |
candela (cd), carcel, Hefner_unit (HK), lumen (lm), nit, lambert
(Lb), footlambert (ftLb),
skot, stilb, apostilb (asb), lux (lx), footcandle, nox & phot |
Ñêîðîñòü (speed, velocity) |
kph & mph |
Kyne, mach (M) & mile_per_hour
(mph) |
Ñêîðîñòü ïåðåäà÷è èíôîðìàöèè (Speed of transfer of information) |
– |
bit_per_second (bps) |
Ñîïðîòèâëåíèå (resistance) |
KW, MW, ohm, statohm
& W |
ohm (W), abohm (abW) & statohm (statW) |
Ñîïðîòèâëåíèå óäåëüíîå (electric receptivity) |
– |
preece |
Òåìïåðàòóðà (temperature) |
K & R |
kelvin (K), Celsius (degC), Rankine (degR), Fahrenheit (degF), Reaumur (degRe) & centigrade (degc) |
Òåïëîèçîëÿöèÿ (heat insulation) |
– |
Clo, Rvalue & tog |
Êîýôôèöèåíò òåïëîïåðåäà÷è (heat transfer) |
– |
Ufactor |
Òîê (current) |
A, amp, KA, mA, mA & statamp |
ampere (A), abampere (abA), statampere (statA) & biot gilbert (f) |
Óãëîâàÿ ñêîðîñòü (Angular Speed) |
– |
revolution_per_minute (rpm) |
Óãîë (angular) |
deg & rad |
Revolution
(rev), angle (°), gon, grade, mil, circle,
semicircle, quadrant, sign, point & hour |
Óãîë òåëåñíûé (Solid Angle) |
str |
steradian (sr), sphere &
hemisphere |
Óñêîðåíèå (acceleration) |
g (acceleration of free fall) |
acceleration_of_free_fall (gn)
& Galileo (Gal) |
×àñòîòà (frequency) |
GHz, Hz, Hza, kHz, KHz & MHz |
hertz (Hz) &
fresnel (f) |
Ýêâèâàëåíòíàÿ äîçà èçëó÷åíèÿ (dose equivalent) |
– |
sievert (Sv) & rem |
Ýíåðãèÿ (energy) |
BTU[23], cal, erg, J, joule
& kcal |
Joule (J), hartree (E0), erg, watt_hour (Wh), ton, calorie (cal), Calorie ( |
Comments to the Appendix of Maple Unit Developer
Please note that in your list of units, you count F, farad, mF, nF, pF and statfarad
as 6 different units for MathCad, but for Maple, you
count them as 2 (farad and statfarad) even though
Maple users can use mF, nF, pF,
as well as cF and dF.
In Maple, you may use any of the following: YF, ZF, EF, PF, TF, GF, etc.,
as well as microfarad, attofarad, etc. If you
remove duplications from the MathCad list (e.g., s
and sec are the same, cm, mm, km are powers of 10 of m) then you have that MathCad in fact has only 74 different units, not 115 (I may
be off by 1 or 2 either way.)
You have some entries under Maple missing:
Luminous Intensity candela (cd), carcel, Hefner unit
Luminous
Flux
lumen (lm)
Luminous Luminance nit, stilb, lambert, footlambert,
apostilb, skot
Illuminance
lux (lx), phot, nox, footcandle
You grouped all of these under light, and it includes nothing under illuminosity.
Also note that in some cases, MathCad does not allow
those standard unit symbols used by the reference I give, as well as "Standard for Use of the International System of
Units (SI): The Modern Metric System", IEEE/ASTM SI 10-1997. For
example, MathCad uses 'gm' and 'str'
and instead uses 'g' for acceleration of
free fall.
In some cases, you capitalize Maple's unit names when they should not be.
IEEE states that all unit names should be lower case, and unit symbols should
only be
upper case if the unit name is a person's name. One exception is the
"liter" which accepts the symbol L.
I would like to suggest the following
as a way to handle units and constants in a way that seems to me to be more
consistent and useful than the present method. (There is a long discussion
thread on the pros and cons of this in this forum, too long to wade through.)
The built-in styles should be
extended to include 'Units'. The 'Variables' and 'Constants' styles would
remain, but take on some more specialized meaning, as follows:
The 'Variables ' style would be used
for variables, and no Mathcad built-in constants or units would have this
style.
'Constants' would be used for
built-in constants and user defined constants. Once a constant is defined in
the work sheet it is global and cannot be redefined. Built-in constants would
also be global, but could be redefined at only one place in the worksheet.
Built-in constants would be defined ONLY in this style (currently they exist in
all styles).
'Units' would have much the same
restrictions as 'Constants'. Again, built-in units would be defined ONLY in
this style.
There should be some visual
distinction among these styles (italics is often used for variables in printed
work, but italics does not look as good on a monitor for plain text
(suggestions?).
Maintaining this degree of rigor
would allow more conformance to normal use with out
significant extra burden on the user. There are some inconsistencies at the
moment. For example 'g' is used for the standard gravitational acceleration
constant, but this means that 'gm' has to be used for gram, rather than the
standard 'g'. Also, if you define m:=2.5, say, then later evaluate an equation
with length units then 'm' for meters appears in the evaluated result with no
distinction between the two m's. (In evaluations, units appear with the
'Constants' style, but even if the m in the assignment has the 'Constants'
style applied this inconsistency still persists.
Mathcad should have a greatly
increased set of built-in units. In particular it should cover all the
multipliers for SI units (there are 20). It is quite common to use such things
as TW, fF, nH,
etc. Whether this done by explicitly including all the units with
multipliers or by combining base units with multipliers is up to the
programmers. I do not use non-SI units much, so I do not know what would
be most appropriate there. The kg would have to be carefully handled since this
is a 'base' unit with a multiplier. Perhaps the list of multipliers should be
the powers of ten and these would be appropriately converted to the correct
combination of prefix and unit. Eg, 10-6 kg would
become mg and not ukg.
Since styles would have to be applied
each time units are used, this needs to be made as simple as possible for the
user. Some suggestions for this are:
(A) Automatic typing
(1) If a character (for simplicity I
use 'character' but it could be a series of characters) is typed on a blank
piece of the worksheet or on the left side of the assignment operator the
default style would be 'Variables'
(2) If a character is typed on the
right side of an assignment it is assumed to be a variable if that variable is
defined already in the work sheet. If it is not defined as a variable in the
worksheet, and it matches a built-in or user-defined unit then it is assumed to
be a unit. If it does not match a defined unit, but it matches a built-in or
user-defined constant then it is assumed to be a constant. If it matches no unit
or constant it is assumed to be a variable.
(3) If a character is typed on the
right side of an evaluation after the numerical result then it is assumed to be
a unit, a constant, or a variable, in that order depending on which of those
are already defined.
(B) User defined typing
Since the above will not always give
the desired type, the user has to be able to change the applied style as
required. This could be done by:
(1) In an empty place holder, press
Ctrl-U. This would bring up the current dialog box. (Since I would like to have
all multipliers available, it may be necessary to have the multilpliers
and base units in two different colums
to avoid excessively long lists).
(2) On an existing variable press
Ctrl-U. In this case the dialog box would only be shown if the unit does not
correspond to a built-in or user-defined unit. Otherwise it would simply apply
the 'Units' style.
(3) Right-click on the variable and
select "make unit" from a context sensitive pop-up menu.
(4) Click on the measuring jug which
would have the same effect as (1) or (2).
Units should be rigorously carried
through functions. In general I believe that this is true for most Mathcad
functions. Many functions mathematically require dimensionless quantities, but
some can accept dimensions (eg, fitting functions). I
believe that I have had problems using units in solve blocks, but I have not
tried using them recently.
It should be possible to have matrix
elements with different units. This is commonly encountered in physics.
I do not see a need to differentiate
between mathematical constants and physical ones, except that it would allow
some standard nomenclature to be used where there is a clash between the two, eg, `e` for elementary charge and for the base of the
natural logarithm.
The way of using constants would be
essentially the same as for units. The Ctrl-C key could have the same functionality
for constants as the Ctrl-U key would have for units.
What about dimensionless units? Eg radian/degree/arcsec...? I
think that these would work fine in the above scheme.
Could degC
-> degF -> kelvin be
implemented?
James
[1] Developed by MathSoft
Engineering & Education. Inc, (www.mathsoft.com)
[2] Developed by
[3] The idea “plus-minus” is not adequate
“well-badly”. All is comparative: pluses become minuses under certain
conditions and vice versa.
[4] Introducing the tools for work with
dimensional quantities into the mathematical packages turn it into physical and
mathematical not only in contents (physical problems are solved on computer for
a long time) but in form also. Derive (http://education.ti.com/product/software/derive/features/features.html) can work with physical quantities
as well but the author does not know it well.
[5] We will nolens volens touch on general aspects of working with Mathcad and
Maple. The author compared these packages already: see chapter “From Mathcad to
Maple” of the book “Mathcad for students and engineers”. (http://twt.mpei.ac.ru/ochkov/mc8Pro.book/index.htm)
[6] In Maple it is called FPS – Foot, Pound,
Second.
[7] Symbol mathematics is built in Mathcad from
Maple.
[8] Tips which appeared when we
start Mathcad. As a rule users disable the option.
[9] To tell the truth, it is very time-taking
task. Nobody will make over the functions created ten years ago – it should be
created and tested anew.
[10] Mathcad does so with the new functions. Here
is an example. Financial functions introduced into Mathcad 2000 display an
error message if the argument was dimensional.
[11] The gap in physical quantity can also be
composition: 10 h. 20 min. By the way, in this case the division sigh can be
placed (
[12] This is the “favorite” physical unit of the
author. He is the Moscow Power Engineering Institute graduate and works there.
Hence, such interest in temperature, the “basic” physical quantity in
thermodynamics and heat transfer.
[13] Two other scales, Reaumur
and centigrade scale, were added to these two
relational scales.
[14] Let us remind that bel
is a common logarithm of the ratio of two physical quantities with the same
dimensions, neper is a natural logarithm of this
ratio, decibel is a one tenth of a bel.
[15] We can introduce, for example, the variable L1
instead of the user variable L. But it is important there to the variables the
name traditional for one or another branch of science. The solution is to use
variable style mechanism.
[16] The process of energy production (steam
pressure in the boiler, rotor velocity in steam turbine) is of little interest
but everyone deal with such political-technical-economical quantity as
electricity charge.
[17] To tell the truth the candela is dragged into
SI by the years.
[18] Becquerel (1852-1908)
with husband and wife Curie got Nobel Prize for radioactivity discovery.
[19] There is a “metrological” joke. The frequency
of the current from heat power station is measured in hertz, that from nuclear
station – in becquerel.
[20] To compute using dimensional units prevent us
from many mistakes of incorrect work with dimensions – we can not sum up meters
and kilograms.
[21] Seven because… it is a fine
number. The article has seven items.
[22] In Mathcad and Maple except for
standard horse force (hp) there are also other "horse" units of
capacities having circulation in Great Britain and in Northern America - bhp ("boiler" horse force), ehp
("electrical" horse force), mph ("metric" horse force), hpUK (British horse force), whp
("water" horse force) etc. The developers Mathcad and Maple need to
agree upon the certain standard: we have in Mathcad hp, and in Maple HP. Why?
[23] In Mathcad except for unit BTU
there are also other thermal units having circulation in Great Britain and
Northern America - BTU15 (unit, adhered to water at 15 degrees Celsius), CBTU
(Canadian thermal unit), IBTU (thermal unit of the international organization
of the standards - ISO), mBTU ("basic"
thermal unit) and tBTU ("thermodynamic"
thermal unit). Except for a standard calorie cal, in Mathcad other thermal
units - cal15 (unit adhered to water at 15 degrees Celsius), cal20 (unit
adhered to water at 20 degrees Celsius), dcal
("dietary" calorie), mcal
("basic" calorie) and tcal
("thermodynamic" calorie) are built-in also. The people in these calories
finally have got confused and have decided(solved) to
begin with «of a pure(clean) sheet » - with joule.