# Foreword the book by V.Ochkov “Units in Mathcad and Maple”

One good example of Error by using units in calculation: Gimli Glider

I tell you a funny story as an epigraph:

Dialogue during an exam:

Teacher: What does a horsepower mean?

Student: It is the power that a horse of one-meter growth and one kilogram weight has.

Teacher: But where have you seen such horse?!

Student: But you cannot look at it so simple. It keeps in Paris in Weights and Measures Department.

Now days nobody is wonder at the fact that not only candidates, engineers and students but also pupils solve their problems on computer. But choice of program for these purposes astonishes. The question: Why do a lot of people more often use Mathcad for calculation their problems. Reply may be next: Mathcad has unique possibility. Mathcad can operate as with simple values as with physical values. Mathcad can be named physic-mathematical program.

Work in Mathcad is the third step (and now days it is top one) of using computer engineering for solving physic-mathematical, technical and educational problems. Two previous steps are work with computer codes (for example with assembler language) and with programming languages (BASIC, Pascal, C, FORTRAN etc). These two technologies of scientific and technical calculations (computer codes and programming languages) played spiteful joke with these calculations. Dimensionalities of physical values and its units (meters, kilograms, seconds and other ones) were excluded. Handmade solution of a physical problem (school or student ones) as rule demanded and demands using of dimension values. Automation of such calculations (that is composition of programs for computer) excludes «physics» of a problem. These programs keep only the numerical values of variables, but corresponding them units programmer has to «keep in mind». So when we interpret a calculation into computer language it is necessary to follow the strict rule – all physical values must be one system of units measure. Apart they can not contain factors such as 10 3, 106 etc. This strict rule caused next inconveniences:

1.                          International system SI will never be unique one though it is widely used. For instance, USA uses British system of units (in Mathcad this system is called U.S.) But it is the country setting the fashion in many spaces of science and engineering. Basing of a program on some one system of units prevents natural process of global exchange ideas, getting new form in epoch of Internet.

2.                          We can image the process of creation of a program without its debugging. The main tool of debugging is output intermediate results. So analyzed these results we’ll be able to localize and remove a mistake if it was made when we selected formulas and/or when we wrote the program. Therefore it is important to output the physical value in necessary units of necessary system of measure with necessary factors (106, 103.etc – see the table??? in the third part of the book). Taking into account all advantages of the system SI but it was took root as a «set of presents». The part of units (kilograms, meters, seconds) used and use without any problems, the other partиспользовались и используются без каких-либо затруднений, другие же («loading») did not settle down as dominating (main) units. For instance, in heat-and-power engineering, pressure of a steam in a boiler is measured and expressed in atmosphere, but pressure in a capacitor is measured in millimeters of mercury. «Main» unit of pressure (pascal is Newton by square meter) turned out very inconvenient. It is difficult to remember any scientific and technical space where pascal is applied without scale factors (bars, kilo-pascal, mega-pascal etc. The point is that, that as rule «settled down» unit connects with «life»(with specific physical phenomenon). Atmosphere as it follows from name is pressure of air on sea level (approximate pressure – see picture 1.20 and picture 1.30). But, millimeters of mercury remember us about experiment by TorricellianTorricellian vacuum» (torr) is millimeter of mercury in Mathcad). In heat-and-power engineering exclusion «off-system units» (atmospheres and millimeters of mercury), the change to pascal is not convenient. But we can get serious breakdown in a work. It connects, for example, with an operator who controls a power-generating unit. He will not correctly interpret display of manometers. As since manometers are calibrated in «correct» units.

3.                          In programs we have to put in some formulas that are derived basing both on theoretical analysis of a problem and getting after static treatment of experimental data. As rule coefficients of such formulas (for instance, see picture. 1.28) are rigidly connected with fixed system of measure. These coefficients demand conversion for using in the programs. It can bring in additional error hence it will be cause of mistakes.

Some words about the design of the book.

When this book will be published at the same time its Internet-version will appear (see http://twt.mpei.ac.ru/ochkov/unit/index.htm). Because of Internet version the design of the book is special. For instance, hyper-links are displayed: see picture. 1.3, see below, see footnote 3 etc. Working with the book if a reader meets hyper-link he will have to go to necessary page himself. In Internet-version the reader can go to new place and come back easier (with help of help-link) – he has to click his mouse by hyper-link. In Internet-version author will make alterations and addition. Author hope that readers will send them to address ochkov@twt.mpei.ac.ru.

Exclusion of units of physical values from the calculations has told on the work in Mathcad. Many inexperienced users begin to form the document in Mathcad-this way They write dimension of some physical value as a commentary but not as a factor of numerical constant. So they exclude the dimension of this physical value from the subsequent calculations. For instance, if we remember the language BASIC, above mentioned example will have next form in it: P = 20: Rem Pressure in MPa. Here units are written in commentary (in note – Rem). Using this algorithm a programmer can forget that pressure is in MPa, but not in bars. Finally he will get a mistake.

Mechanism of the work in Mathcad with units of physical values allows:

·         to put in basic data in necessary system of measure, in necessary units with necessary factors (kilo, milli etc);

·         to put in a control of dimensions in formulas, that we use in our calculation (for instance, we can not sum kilograms and meters);

·         to put out calculated values in necessary system and units, to use convenient scale of the axes of plots etc.

One of the ways to solve this problem is a failure of dimensional values. We can go to non-dimensional numbers that keep quantitative assessment of physical phenomenon: Re, Nu, etc (see the table ??? in the third part of the book). When we say that the pressure in a boil equals 50 atmospheres then we operate with non-dimensional value. We mean that the pressure 50 times as much of atmospheric one. And more radical way is from numerical characters we go to qualitative assessments. We can say that pressure equals some number of atmospheres, but we can also say that pressure is normal (high, low etc) and form a computer-based system of control of a power-generating unit. Linguistic (expert) judgments and the theory of careless ranges will guide this computer-based system.

Mathcad completely support mathematics of work with dimension variables. We’ll speak about it below and look through some simple examples.

 This uniqueness is not absolute one. With dimensional values С Another popular mathematics program Derive can work with units.

 When the author tell about it he has remembered one seminar of transmission. They had to do some calculations using difficult «dimensional» formulas (see, for instance, picture. 2.18). At that time only one tool of automation of such calculation was a slide-rule. The process of calculation consists of three stages: the slide-rule gave out mantissa of a reply, but degree and dimensional of this reply they had to do yourselves. Students had to do it without some digital computer or analog-computing device. Because of it seminars of transmission turned into lessons … of technology of calculation and metrology. So there was almost no time to discuss «physics» of the problem. Soon electronic calculators and computers appeared. These computers gave out a reply that containing degree of a number. But the units as usual were «overboard» of the process of automation of calculations.

 This abbreviation we’ll use for designation of British system of units.

 For instance, from Mathcad we can go to Internet-forum that is called Collaboratory. Here you can find both questions and replies and Mathcad-documents with solution of some problems touching on different spaces of science and engineering. The address of the forum is http://collab.mathsoft.com/~mathcad2000.

 Author is lecture of Moscow Power Engineering Institute.

 For instance, this fact was fixed in marking of water steam turbine: Т-100-130 (extraction, electric power is 100 megawatt, pressure of live water steam is 130 atmospheres), К-300-240 (condensation, 300 megawatt, 240 atmospheres). Apart many heat electropower stations so far have got old manometers graduated in atmospheres.

 In 70-th years some attempts during weather forecast to tell atmospheric pressure in «correct» hecto-pascal took place. It was not common unit of pressure. Its innovation caused numerous protests. Of course!, and how! Hypertensive-men could miss to take their medicine if they had not understood weather forecast. Then pressure became to name both in hecto-pascal and in millimeters of mercury, but then hecto-pascal was forgotten.

 Certainly control of power-generating unit is automated, but a man always has the right to interfere in it work.

 Account of a dimension often allows deriving formula. For example, vibration frequency of a pendulum depends on only the length of the pendulum (certainly we speak about simple pendulum) and free fall acceleration. From these conditions it is easy to derive the formula.

 Character of the flow of water in a duct (turbulence, laminarity) can be estimated by three different parameters: speed, diameter, and ductility. But we can do it also by one non-dimensionals parameter – by number Re.

 Notion «normal» pressure is some range of values. Concrete value of pressure belongs to this range with certain power of plausibility. It is described corresponding function of accessory (see the article of the author «Mathcad and the theory of careless ranges» – see http://twt.mpei.ac.ru/ochkov/F_sets.htm).