Contents
 DimCalc Help Contents

The following Help topics are available for DimCalc.  It may be useful to read the background material on physical quantities in general, in order to fully appreciate the philosophy behind this program.

Physical Quantities in General

Introduction

Physical Quantities

Functions

Vectors and Matrices

Dimensional Analysis

Sources

Representations of Physical Quantities Used by this Program

Expressions

Definition Files

Formal Grammar

Output Defaults

Using this Dimensional Calculator and Units Converter Program

Calculator Screen

Listing Screen

Defining and Redefining Units

Numerical Output Formats

Temperature Converter

User Support

Support

Disclaimer

Press <F1> at any screen to access these help files.


 Introduction

This program is a calculator and converter for physically dimensioned quantities.  It can add, subtract, multiply, divide, and convert.  It also contains a separate temperature converter.  A large number of physical quantities are predefined, and it is easy to extend and modify the definition files to include your own definitions.

When dealing with physical quantities, it is useful to think of each quantity as having many names.  For example, the quantity "1 meter per second" also has the name "6000 cm/minute" as these are two ways of describing the same thing.  Each quantity also has a type; this quantity is of the type "velocity".

The challenges in designing a dimensional calculator are in making an interface which can:

(1)  conveniently deal with the many names of each quantity;

(2)  give output with names which include units that the user chooses.

From this perspective, dimensional conversion is just a matter of finding an appropriate alternative name for a given quantity.  When converting "1m/s" to units of "cm/minute", one is not looking for a different quantity, just a different name---one which ends with the words "cm/minute".

This program is intended as a useful experiment in the design of such an interface.  As an example to get started, if you want to convert "1 furlong/fortnight" to units of "meters/second", then do:

1)  Select the "convert" option button from the five operations;

2)  Type "1 furlong/fortnight" into the X text box;

3)  Click the DEFAULT button for Y;

4)  Read the result in Z.

If next you want to see the same quantity in units of miles per year, then do:

5)  Clear Y, and type "miles per year" in the Y text box.

As a second example, let us see how close a nanocentury is to pi seconds.  (Who first discovered this?  I dont know.)

1)  Select the "divide" option button from the five operations;

2)  Type "1 nanocentury" into the X text box;  (Hit the "clear" button first.)

3)  Type "pi seconds" into the Y text box;

4)  Read the resulting quotient of roughly "1.004" in Z, to see they differ by less than half of one percent.

The program knows hundreds of built-in units and can handle any algebraic combinations of units it knows, e.g., you can describe a volume as "1 micron (2 millimeter + 3 feet)^2"

Underbars are used in unit names for disambiguation of certain terms, e.g., pound_force vs. pound_mass, and cup_us vs. cup_uk.  You can list the terms in the built-in tables, and extend them by defining your own units and abbreviations.


Physical Quantities
 The Algebra of Physical Quantities

Physical quantities, e.g., "1 foot" or "12 Volts",  have their own algebra, different from familiar algebras.

An algebra is a set of quantities along with rules for operating on them, e.g., the integers and the rules for addition and multiplication.  Most common algebras are closed under addition.  For example, we can add any two integers in the algebra for integers, or you can add any two polynomials in the algebra for polynomials.

However, dimensioned quantities are not closed under addition.  Each dimensioned quantity is of a certain type (e.g., velocity, length, voltage...).  You can only add quantities if they are of the same type, yet they are all part of the same algebra since we can multiply them.  Thus, the interface is designed to constantly inform you of each quantity's type, and check for type agreement before doing addition or subtraction.

Dimensioned quantities are closed under multiplication, as any two types can be multiplied (e.g., a velocity times a mass gives a momentum.)  The result is generally of a new type---different from the two multiplicands---unless one of the quantities is dimensionless.  So, one of the jobs of the interface is to output the new result in units which you may want.  Division, like multiplication, is defined for any two types, (as long as the denominator is non-zero,) and generally results in a new type.

Dimensional conversion is best thought of as an "algebraic" operation on names.  When converting X to units Y, we are not operating on X itself, only its name.  Both X and Y must be of the same type, i.e., the same constraint appears as in addition.  The result is just "(X/Y) Y" which is the same as X since the Y's cancel.  But when written in this form, "X/Y" is a dimensionless quantity---a pure number---so the result is another name for X, one which ends in Y.

The fact that dimensioned quantities are not closed under addition has interesting consequences when one develops the linear algebra of vectors and matrices which contain dimensioned quantities as their components.


Functions
 Functions of Dimensioned Quantities

The principle functions to carry out on dimensioned quantities are addition, subtraction, multiplication, division, and raising to integer powers.  These are supported by this program's main calculator screen.

Transcendental functions, e.g., sin(x) and exp(x) are not defined for dimensioned quantities unless the argument x is of the dimensionless type.  This is a simple consequence of their definition in terms of the Taylor series.  For example,

exp(x) = 1 + x +  (1/2!) x^2 + (1/3!) x^3 +  ... + (1/k!) x^k + ...

For a dimensionless quantity, this definition makes sense. But for x a length, the polynomial would require adding a dimensionless quantity plus a length plus an area plus a volume, etc.  Addition is not closed for such mixed types.  For this reason, this calculator does not support transcendental functions.  (Interestingly, the situation is very different when x is a matrix---the exponential of a dimensioned matrix is sometimes defined---but this version of the program only supports scalars.)

Certain other common functions which are well-defined for dimensionless quantities are also not defined for dimensioned quantities.  In particular, the absolute value function, ABS(x), is not defined for a dimensioned x.  While one might naively think at first that

"ABS(1 meter) = ABS(-1 meter) = 1 meter",

further reflection will show a problem with that attempt.  Consider whether

"ABS(1 Coulomb) = 1 Coulomb"

or

"ABS(1 Coulomb) = -1 Coulomb".

It is purely a matter of historical accident that we take the sign of the electron to be negative in terms of the unit "Coulomb".  Thus, the definition of ABS(x) would depend on something historical, and could have no mathematical or physical significance.  Similarly, there is no physical basis for distinguishing "meters" from "negameters".  Just as we can convert from meters to kilometers, so we can convert from meters to negameters, and every statement must remain unchanged.  Accordingly, we need not waste our time defining an ABS function, and a careful check shows that no useful physical computation relies on the absolute value function.  (Of course, ABS(x) is OK for dimensionless x, since positive real numbers are distinguished from negative ones: +1 is the identity, the x which solves y=xy for all y.)

Next then---and this is the sticky part---it follows that we can not define a square root function for dimensioned quantities either.  The problem is that every dimensioned quantity Y, there are  two X for which X^2=Y.  In the special familiar case in which Y is dimensionless, we can pick one of the two as "the positive square root", but for dimensioned X we can not distinguish one, for the same reasons we could define no ABS(x) function.  Luckily, it turns out that square roots, and all fractional powers, are not really needed in physical calculations either, or at least so I claim.  Accordingly, fractional powers are not supported by this program.  The interested reader might want to check out my book, listed in the references, for further discussion.


 Vectors and Matrices

The linear algebra which results when one considers vectors and matrices which contain dimensioned quantities as their components is surprisingly interesting and rich.  As motivation, consider these 2-by-2 arrays:

where m abbreviates meters, and s seconds.  Try now to directly multiply out the matrix product X^2 using the standard formalism, and you will see that the product X^2 is undefined, as its diagonal elements would have to be the undefined sums "1m^2 + 1s^2".  Thus the familiar property that "any square matrix can be squared" does not hold in this algebra, as matrix products contain scalar sums, and sums are only sometimes defined.  If matrix elements are chosen carefully however, products are defined.  The standard method of matrix multiplication shows that:

An important difference between Y and Z is that Z^2 preserves the dimensions of Z, so that Y^2+Y is undefined, while Z^2+Z is defined.  As a consequence of this property, all integer powers of Z have the same dimensional structure as Z.  In particular, the Taylor series for the matrix exponential (or any other transcendental function) requires summing these powers, so exp(Z) is defined, but exp(X) and exp(Y) are undefined.

These different properties show that X, Y, and Z come from three different classes of dimensioned matrices.  The reader who may be curious about these and other matrix classes, and other phenomena concerning dimensioned linear algebra and dimensional analysis of matrix relationships, is invited to read my book, listed in the references.


 Dimensional Analysis

Dimensional analysis is a procedure by which one can often determine the nature of the relationship between given physical quantities which are assumed to depend on each other.  It is mentioned here because it is the main procedure other than calculation in which one must think carefully about dimensional issues.  Although it is a fascinating and useful subject, this program does not currently do dimensional analysis per se.  The reader interested enough to read this far will probably be delighted to learn about dimensional analysis if not already exposed to it.  Some good books are listed in the references.


 References

My book focuses on the linear algebra of vectors and matrices which contain physically dimensioned elements.  However, it also discusses many broader issues involving physical quantities, functions, dimensional analysis, and all the algorithms used in this program for input, output, calculation, and conversion of scalars.

Hart, G.W., Multidimensional Analysis: Algebras and Systems for Science and Engineering, Springer-Verlag, 1995.

The mathematically-inclined reader interested in the linear algebra of dimensioned vectors and matrices might want to read:

Hart, G.W., "The Theory of Dimensioned Matrices," in the Proceedings of the 5th SIAM Conference on Applied Linear Algebra, Snowbird Utah, June 1994.

For general references on Dimensional Analysis, I recommend:

Isaacson, E. de St. Q, and M. de St. Q. Isaacson, Dimensional Methods in Engineering and Physics, Wiley, 1975.

Bridgman, P.W., Dimensional Analysis, New Haven, 1922.

Krantz, D.H., et al., Foundations of Measurement, Vol. 1, Academic Press, 1971

The unit definitions and conversion-factors used in the data files came from:

Wildi, T., Units and Conversion Charts, IEEE Press, 1991.

Lide, D.R., (ed.) CRC Handbook of Chemistry and Physics, 1993.

Dorf, R.C., (ed.) The Electrical Engineering Handbook, IEEE Press, 1993.

Jerrard, H.G., and D.B. McNeill, A Dictionary of Scientific Units, Chapman and Hall, 1992.

Kaye, G.W.C., and T.H.Laby, Tables of Physical and Chemical Constants, Longman, 1986.


 Expressions

Expressions for names of physical quantities used by this program are strings of characters such as "980 centimeters/second^2" which are understood in terms of:

numeric parts,

words representing units and possibly prefixes, and

characters implying addition, multiplication, division, and exponentiation.

Numbers in an expression are entered in the usual manner, as digits, optionally including a minus sign, decimal point and power-of-ten exponent, e.g., "6.023e23".  A negative sign follows the "e" for negative exponents, but do not include a "+" either for the number itself of for the exponent.  Several numbers may appear in one expression, e.g., "2 cm 3 mm / -5 sec" is equivalent to "-12 mm^2/sec".

Words such as "meter" or "second" must be defined in one of the definition files before they are used in an expression.  Words are defined as either units, prefixes, or types.  A unit takes on the value of a dimensioned quantity, while a prefix takes on a purely numeric value (i.e., prefixes are dimensionless).  Unit words may be fundamental or derived.  For each fundamental dimension (length, time, mass, ...) there is a fundamental unit (meter, second, kg,...).  All other units are defined in terms of fundamental units or previously defined units.

The characters which may appear in words are "ABCDEFGHIJKLMNOPQRSTUVWXYZ", and "_", and "$".  All words are treated in a case-insensitive manner, i.e., "MeTeR" and "meter" are treated identically.  Unit words may not be concatenated together without some intervening character indicating an operation.  A space indicates multiplication.  So write "foot pounds" rather than "footpounds" unless you have defined "footpound" as a new unit.  In contrast, prefixes must be connected to the following unit word, with no separating space.

If a word used in an expression is not defined, the parser will try to remove a suffix "s" or "es" from the end of it if present, and look it up again.  Thus the word "meters" will invoke the definition for "meter" and the word "inches" will mean "inch" without separate definition lines for singular and plural.  (Irregular plurals, such as "foot" and "feet" must be entered separately in the definition files.)

Multiplication is indicated by an asterisk, a space, or adjacency to a parenthesized expression.  These are equivalent:

foot*pound

foot pound

(foot)pound

Multiplication is also implied by the concatenation of a prefix with a unit-word, e.g., "millimeter" is handled as the product of "milli" meaning "1/1000" and "meter".

Division is indicated with a slash or the word "per", and only one division is allowed per expression or parenthesized sub-expression.  The ambiguous term "1 mile / hour / second" is not allowed.  You may disambiguate it by using parentheses as "(1 mile / hour) / second" or "1 mile / (hour / second)" according to your intention.

After "/" or "per", all multiplied terms are in the denominator.  These are equivalent:

1 dollar per foot pound

1 dollar per (foot pound)

Parentheses may also appear anywhere else where they make sense.  These are equivalent:

10 (miles per hour) (hours per sec)

10 miles per second

Division by any zero will generate an error.

Exponentiation of units or parenthesized expressions to integer powers is expressed with a "^" followed immediately by a number (which can optionally have a minus sign, but omit "+" on positive exponents.)  These are equivalent:

1 meter^6

1 meter^7 meter^-1

(1 meter^2)^3

If there is a prefix attached to the unit, it is also raised to the power.  These are equivalent:

1 millimeter^3

(0.001 meter)^3

Addition is indicated with a plus sign.  These are equivalent:

1 meter + 1000 millimeters

0.002 kilometers

Addition of different types, e.g., "1 meter + 1 second", will generate an error message.

Subtraction with the binary "-" operator is not supported.  However, you can get the same effect by adding a negative quantity.  Just write "2 meters + -1 meter" rather than "2 meters - 1 meter".  The reason for designing it this way is to avoid ambiguities which would otherwise arise because a space is used here both as a separator and to indicate multiplication, and "-" is also the unary minus used to indicate negative numbers.  For example, if there is no space after the "-", the program interprets "2 meters -1 meter" as a product evaluating to the area "-2 meters^2".   To prevent this from occurring when you intended the result to be "1 meter", just remember not to subtract; add negatives instead.

Operator precedence is standard, except for division as discussed in the next paragraph.  Addition has the lowest precedence, multiplication and division are intermediate, and exponentiation is higher in precedence.  However, in accordance with standard usage, the multiplication implied between a prefix and the unit it is attached to has even higher precedence than exponentiation, as exemplified above.

Multiplication has been given slightly higher precedence than division in order that all terms to the right of "/" or "per" end up in the denominator, as exemplified above.  Note that this is different from the usual left-to-right way that multiplication and division are handled in most programming languages.  Given "a*b/c*d", most programming languages put d in the numerator, as they work from left to right making a running product, initially a, then multiplied by b, divided by c, and finally multiplied by d.  This program does the two multiplications first, then the division, resulting in d being part of the denominator.

Expressions do not include words for types.


 Definition Files

There are two definition files used by the program which are both are plain ASCII files which contain statements which define prefixes, fundamental and derived units, types, and defaults.

DIMCALC.DEF

The basic definition file comes with hundreds of standard definitions which should be sufficient for most people's needs.  There is probably no need for you to modify this file, but if you do not like the definitions given, you may change them.  A warning message will appear on start-up to warn you if the file is modified from what I distributed.  To speed up the loading process, this file is compiled into a shorter faster-to-read format called DIMCALC.DAT, which is what is actually used as the source of most definitions.  If you edit DIMCALC.DEF, the program will automatically detect this and re-compile it into an updated DIMCALC.DAT, which will be used from then on.

DIMCALC.USR

The user-defined definitions file is optional, and is the preferred place to add your own definitions.  A sample file is included to get you started and provide a template of the necessary format.  You may edit this file using any text editor.  Most easily, from within this DIMCALC program, choose EDIT DEFINITIONS from the OPTIONS menu, to invoke NOTEPAD on this file.  This allows you to add definitions, replace already defined quantities, and specify default output units which you prefer.

These two files are read in the given order, and later definitions can over-ride earlier ones.  Statements in these files must follow a prescribed formal syntax:

Comments

Comments are initiated with a single quote character or semicolon character.  Anything appearing on a line after the first "'" or ";" is ignored.

Prefix Definitions

A line of the form "word # number" defines the word to be a prefix with the numeric value of the given number.  For example lines like "milli # 0.001" appear in DIMCALC.DEF to define all the SI prefixes.

Fundamental Unit Definitions

A line consisting of a word and an exclamation mark defines the word to be a fundamental unit.  For example there is a line "meter!" near the beginning of DIMCALC.DEF.

Derived Unit Definitions

A line of the form "word=expression" defines the word as a new unit with the value given by the expression on the right.  For example, there is a line "mm=millimeter" in DIMCALC.DEF..

Default Output Definitions

For each type of expression found in either definition file, the program stores a default output unit used in naming.  The first expression encountered of a given type is initially the default.  This can be over-ridden later with a line of the form "=expression", similar to a derived-unit definition, but with no word on the left.  This causes the expression to be stored as the new default for its type.

Type Statements

Words defining types appear on a line with the syntax "word:" (e.g., "voltage:".)  The program expects the fundamental units, derived units, and defaults which may follow on that line and the following lines to be of the same type, until another type statement appears.  Thus, one should group definitions by type in the data files.  This provides valuable error checking in case one of the expressions is mistyped.  An expression not of the expected type will generate an error message.  If you wish to bypass this feature, use the type statement "any:" which allows any type of expression to follow.


Formal Grammar
 Formal Grammar used by the Parser

Formally, the expected syntax for statements and expressions is defined with a phrase-structured grammar, i.e., a "BNF form" which drives the parser.  The definition file is parsed line-by-line as Statements.  The quantities X and Y on the calculator screen are parsed as Expressions.  Square brackets [...] are used here to indicate optional material, and "{a,b}" means that either "a" or "b" must appear.

Definition File Statements:

Statement = 	(Each line must be of one of the following 6 forms:)

[Comment]	(Blank line)

Word # Number  [Comment]	(Prefix)

Word !  [Comment]	(Fundamental unit)

Word = Expression  [Comment]	(Derived Unit)

= Expression  [Comment]	(Default Output Unit)

Word :  [Statement]	(Type for following statements)

Expressions:

Expression = Quotient [ + Expression ]	(Sum)

Quotient = Product [ { / , per } Product ]	(Quotient)

Product = Term [ [ * ] Product ]	(Numerator or Denominator)

Term =	(One of the following 3 forms:)

Number	(Number)

[Prefix]Unit[Exponent]	(Term)

(Expression)[Exponent]	(Recursion in parentheses)

Basics:

Comment = { ; , ' } Anything

Word = Char [ Word ]

Char  = any one of:  ABCDEFGHIJKLMNOPQRSTUVWXYZ_$

Unit = Word[[e]s]	(A Word that has appeared left of "!" or "=")

Prefix = Word	(A Word that has appeared left of "#")

Digits = Digit [ Digits ]

Digit = any one of:  0123456789

Number = [-][Digits][.][Digits][e[-]Digits]

Exponent = ^[-]Digits

Ambiguity Note: The concatenation of a prefix and a word may be ambiguous, e.g., if one defines "N=Newton" and "micron=micrometer", the term "micron" could be understood as either a one-word unit or as a micronewton.  The parser tries whole unit words first, and if that fails then tries prefix-unit concatenations.


Calculator Screen
 Main Calculator Screen

The main operations of calculation are carried out from the Calculator screen, which provides a choice of operations, a place to type in inputs X and Y, a place to read the output Z, and three memory cells A, B, and C.

Operations:

The choice of function---unit conversion, addition, subtraction, multiplication, or division---is made by choosing one of the five option buttons.

Inputs:

Type in X and Y in the text boxes.  The text is scanned as it changes, and if the text describes a complete expression, its type is displayed above it.  The CLEAR buttons may be used to clear the text.

If the selected operation is unit conversion, and X is a valid expression, you may use the DEFAULT button to set Y to the default output units for X's type.

You may drag into X or Y from A, B, C, or Z, if the source contains a valid quantity.  Drag the large letter of the quantity to be copied onto the large letter of the box where you want the quantity copied.

You can also paste into X and Y from the listing screen.

Output:

Whenever X and Y are valid expressions, the result of the calculation is shown in Z, along with its type.  Except when converting, the default units for Z's type are used.

Explain Button:

If  X or Y are not valid expressions, or if the operation can not be carried out, the EXPLAIN button can be clicked to produce a simple explanation of the error.

Memory Cells:

A, B, and C can be used to hold intermediate results, or store quantities for later retrieval or viewing.  Only one of the three is displayed at a time---whichever has its option button selected.  Drag the large letter, X, Y, or Z, (of the quantity you wish to store) over to the large letter, A, B, or C, (of the place you wish to store it.)  View the value by clicking it.  Retrieve the value by dragging A, B, or C to the place you wish it to go.

Extended Calculations:

You may use the memory cells, or drag Z to X or Y if you want to use the output of one calculation as the input to the next.

Simple example: In computing "(1 m + 1 foot) / 1 sec"  you can set the operation to addition, set X=1m, set Y=1 foot, and get the  result for the numerator in Z.  Then drag Z to X, set the operation to division, set Y=1 sec, and read the final result in Z.

You may also use the clipboard to store any subpart of X or Y:  Select text in X or Y (by dragging the cursor over it) and cut it to the clip board with <Shift DEL>.  You may paste the current contents of the clipboard to X or Y by positioning the cursor at the desired location, and using <Shift INS>.


 Listing Screen

The LIST DEFINED TERMS selection in the OPTIONS menu invokes the listing screen.  It shows a list of all defined types in the left-hand box.  Select a type by clicking it, and a list of all defined units of that type appears in the second box.  In addition, the default output expression for the selected type is written below.  At the bottom of the form is a drop-down list of all defined prefixes.

If you select one of the units in the second box, you may do one of the following operations:

Find-Definition Button:

The FIND button (or double-clicking the unit name) searches the definition files for the line (or lines) which define the selected unit.

Paste-to-X and Paste-to-Y Buttons:

The PASTE buttons copy the word into the current cursor position in X or Y  (replacing the highlighted text in X or Y if any text is selected.)  This is useful when you forget how to spell something or when dealing with long unit names.

Set-as-Default Button:

The selected unit can be set as the default output unit for its type.  This over-rides the currently selected output unit during this execution of the program only.  If you want to over-ride the default output permanently, edit the DIMCALC.USR definition file.  You can not change the default for the dimensionless type.

Set-Other-Default Button:

You may also type in an expression to serve as the default output for the currently selected type.  This invokes a dialog box which allows you to type in an expression like "meters/hour" which becomes the default velocity.  This over-rides the currently selected output unit during this execution of the program only.  If you want to over-ride the default output permanently, then edit the DIMCALC.USR definition file.

Prefixes:

Prefixes and their values are listed in the drop-down list box at the bottom of the form.  Selecting a prefix does not have any effect.  The list is for information only.


 Editing the Unit Definitions

Editing the definitions is useful if you want to define prefixes, units, or types not included in the basic DIMCALC.DEF file.  You may also want to set the default output units for one or more types.

The definitions in the DIMCALC.USR user-definition file can be edited with any text editor.  While DIMCALC is running, from the OPTIONS menu, the EDIT DEFINITIONS selection can be used to invoke NOTEPAD on DIMCALC.DEF.  This allows you to modify the definitions.  When you SAVE and EXIT in NOTEPAD, you can return to DIMCALC and use the new definitions.

Before editing, read about the required format for the statements in these files.


Numeric Output Format
 Control of Numeric Output

The default numeric output format is "fixed", with 6 significant digits shown. From the NUMERIC OUTPUT FORMAT selection in the OPTIONS menu, you can control the number of digits output, and whether scientific or fixed format is used .  The choices only affect the results shown in Z on the main calculator screen, not the temperature converter.

Internally, all numeric calculations are carried out with double-precision variables (8-byte IEEE floating-point format).  Up to 15 digits can be displayed, but these are not necessarily meaningful, so it is not necessarily appropriate to display them all.  The most exact unit conversion factors available are used in the definition file DIMCALC.DEF.  In many cases these are exact (e.g., "1 inch=2.54 cm" exactly, by definition,) but in other cases, the required values depend on physical measurements, (e.g., the atomic mass unit "amu" depends on measurements of atomic particles, and is known only to about 6 digits of accuracy.)   You can see the definitions in use with the FIND button on the listing screen.  See the references for a list of the sources used for all definitions.

The temperature converter displays its output with the same number of digits to the right of the decimal point as is given in the input.  To see additional precision of its output, annex zeros right of the decimal point in its input.


Temperature Converter
 Temperature Conversion

Temperature is different from other common units in that it is sometimes measured using a scale with an arbitrary zero.  The zeroes of the Celsius and Fahrenheit scales are not fundamental in the way that the zeros of the Kelvin and Rankine scales are.  Accordingly, Celsius and Fahrenheit temperatures per se never appear in physical quantities, only differences in such temperature.  For example, heat capacity can be described as "per deg C" or "per deg F" but it is differences in temperature in each case.

For the main calculator screen of this program, the DIMCALC.DEF file defines "Celsius=Kelvin" and "Fahrenheit=Rankine",  (and "Rankine=(5/9) Kelvin") so these units are available as differences in temperature.  Differences in temperature can be converted from any scale to the others, as can derived units such as heat capacity.   Thus, the main calculator screen does not convert "0C=32F"; it converts "0C=0F" equal differences.

If one wants to convert measured temperature (not differences) then use the TEMPERATURE CONVERTER selection under the OPTIONS menu.  This is a separate temperature converter which only converts measured temperatures between the four scales: Celsius, Fahrenheit, Kelvin, and Rankine.  It is completely independent of the rest of this program.  Actually, it is only included to prevent people from saying "What good is that program if it can't even convert Centigrade to Fahrenheit !"     To use it, just type a measured temperature in one of the four text boxes, and the others will change to show the equivalent temperature in the other three scales.  It will report "0C=32F".


Default Output Units
 Default Outputs

When a quantity Z is calculated, the program must choose a unit with which to describe it.  There are an infinite number of choices.  The way the program decides is that it maintains a table of default output units and searches it (for an entry of the same type as Z) each time it is to give an output.  It then converts the quantity Z to the units it finds in the entry, before writing the string Z.

For each type of unit which the program encounters in either definition file, there is a default output unit.  The default is initially set to the first example of that type which it encounters.  Thereafter, whenever the program reads a statement of the form "=expression" with no unit being defined on the left-hand-side of the equal sign, it makes the expression on the right-hand-side be the (new) default for its type.  These defined defaults can be temporarily over-ridden by the user from the Listing Screen or permanently by editing the DIMCALC.USR definition file.

For calculated quantities of a completely new type (not found in the definition files, and so for which there is no default,) the program uses a simple heuristic to choose a default unit.

If you wish to re-express the result Z in different units, do an extended calculation to convert it.  Simply drag Z to X , set the operation to Convert, and set Y to the desired units.


Program Support
 Support

I created this dimensional calculator and converter originally for my own purposes.  I have modified it by adding these help topics, partly to serve as a tool for other users and partly as a device for making others more familiar with some of the dimensional issues I am interested in.   I plan to support it at a moderate level as time permits me, and I am especially interested in corrections, and ideas on how to make the interface more useful.  However, I request not to have mail of this sort sent to my e-mail-box, as I have other more pressing demands of its resources.  Therefore, I ask that if you have comments or suggestions to please send me a post-card at the address below, and I will be most grateful.  You may also treat this program as "cardware" and simply send me a nice postcard telling me that you find it useful (or whatever).

You may also find useful information in my book, listed in the references.

George W. Hart

Dept. Electrical Engineering

Columbia University

New York, NY 10027-6699

September, 1994


 Disclaimer

I have tried to make this program as accurate and useful as possible.  Like any other piece of software, it may suffer from unplanned faults.  Furthermore, although I have checked carefully, it is always possible that the definition files may contain typos or blatant errors introduced inadvertently by myself or others.  You may check them if you like, and the program will give you a warning if the DIMCALC.DEF file has been changed by others.  As this program is provided without charge, I can not be held responsible for any errors.  If you do find any definition errors or significant bugs, please contact me, and I will attempt to remove them from future versions.


 Warning Message

A warning message will appear on start-up to advise you if the definition file DIMCALC.DEF has been changed since I distributed this program.  The reason for this is to let you know that the definitions you are using may have been corrupted by someone during the distribution process.  They also might be perfectly fine, and even improved from what I distributed.  You might want to inquire from your software source about the changes made, or seek out an unmodified version of DIMCALC.DEF.

If you are changing DIMCALC.DEF yourself, and know what you are doing and why, then ignore the warning message.

If you are going to distribute this program with a modified version of DIMCALC.DEF, you might want to also include the original version, and information about what was changed, so the end-user may evaluate the changes.  If you are adding definitions which you feel will be widely useful, contact me and I can include them in future versions.


Quantities NOT Closed Under Addition:  Certain pairs (in fact almost any pair chosen at random) of physical quantities can not be added.  For example, "1 meter + 1 second" is undefined.    The expression you can not add apples and oranges means that addition is only defined within each type.


Units:  Units, (e.g., 1 meter, or 1 millimeter,) are physical quantities which society has chosen and named, to use as reference points in naming.  From a physical standpoint, units are arbitrary, and so alternative units (of the same type) may always be used to describe a given quantity.


Types:  A type is a way of referring to a set of physical quantities of the same physical dimensions.  The quantities "1 meter", "2 feet", and "-3 inches" are all of type length.  Addition, subtraction, and comparison are only meaningful within a type, not between types.


Prefixes:  The standard SI prefixes (from yotta=10^24, down to yocto=10^-24) can be used with any unit.  They are defined in DIMCALC.DEF and can be listed from the Listing Screen.


Dimensionless Quantities  are the physical quantities which correspond to the real numbers.  They are a special type only in that additional operations are defined for them, e.g., exp(x) is defined only for dimensionless x.


Names:  Standard notation systems allow many different names for referring to each physical quantity.  Even dimensionless quantities have many names.  (E.g., "12", "1.2e1", "a dozen", and "roman numeral XII" are all names for the same thing.)


Zero:  There is a zero of each type,  (e.g., "0 meters" is a length, and "0 seconds" is a time.)  Thus the algebra of dimensioned quantities has a single identity element for multiplication (dimensionless 1), but many identity elements for addition.


Order your copy now !