The Hewlett-Packard HP-48G is an excellent full-featured scientific calculator, a good companion for an engineer or scientist. The central facilities of any good scientific calculator are RPN entry, mathematical operations including trigonometric and exponential functions, a stack, and some means of storing and recalling numbers. Beyond this, programming is the most important capability, which allows flexible extension of the calculator's powers. The HP-48G also includes a good programming capability.
RPN entry and the stack are powerful tools, but many users of calculators cannot seem to master them, much less programming, to their great disadvantage. Many users can, however, and become enthusiastic supporters of these facilities. The hand-held or pocket calculator is a flexible tool always at one's instant command, the modern, and much more powerful, analogue of the slide rule. Like the sketch, it is an indispensable engineering resource.
The HP-48G has a large, pixel-oriented LCD display, and six menu keys that can select from a wide variety of menu items. This gives the equivalent of a large keyboard, so that many items can be selected by a single keypress. The stack can hold not only numbers, but objects of many different types, such as complex numbers, literal algebraic expressions, matrices, arrays, lists and so forth. The large number of possibilites, and the multiple uses of many keys, make operating the calculator rather complex and confusing. The insufficiency of documentation is another serious impediment. The user must, in many cases, proceed by experiment, taking into account what slim documentation there is. This article presents the results of my own experimentation and interpretation, and may be of use to the reader.
An Advanced User's Guide is published, which apparently contains extra programming information, which is sorely needed. See Programming for a discussion of the programming features of the HP-48G. Other peripherals are listed in the information that comes with the calculator as well as the Advanced User's Guide, but, remarkably, there is not the slightest hint of where these items can be purchased, no address of sales offices, and no websites. The URL quoted in the User's Guide leads nowhere. However, HP Calculators is currently alive. It seems that HP is still in the calculator business, which is unexpected good news!
Physical constants are located in the menu brought up with ← EQ LIB. ← is the magenta shift key. Pressing the cyan → puts you in the Equation Library instead. Four choices are presented: EQLIB, COLIB, MES and UTILS. EQLIB is, of course the equation library, MES is the multiple equation solver, and UTILS are utility programs of, as we shall see, limited utility. Each choice has the little tab at the top that indicates a directory or new menu.
Press COLIB to see a menu with CONLI, CONS and (yet again) EQLIB. Why these could not have been on the preceding menu, I cannot fathom. CONS brings up the CONS() function used to put constants in expressions and programs. An alphabetic identifier goes in the parentheses, by the way. CONLI finally brings up the list of constants. The alpha identifier of the constant is shown at the left, the name on the right. The use of alpha identifiers is very cumbersome; simple integers would have been much more convenient. Integers could be entered immediately; either the cursor must be tediously moved, or the alpha keyboard called up to enter the identifier. This was obviously programmed by someone who does not use constants very often. The menu offers the choice of SI or English units, toggles the display of numerical values or verbal description with VALUE, pushes the number on the stack with →STK, and quits the list with QUIT.
The instructions in the User's Guide for "to view the value of a particular constant in full" on page 25-13 do not work. If you want to do this, use →STK and QUIT, then look at the number on the stack. The values of the constants are in ROM, and cannot be altered.
Let's now look at the UTILS. Press ← EQ LIB, and then choose UTILS. MINE is a useless game. TDELT and TINC seem to be equivalent to - and +; all they do is add or subtract the numbers in levels 1 and 2 of the stack. GMOL, LBMO, RPM and DB only add these units, and do nothing intelligent. The units feature is not likely to be used by many scientists and engineers--I would certainly not let the HP-48 figure units for me. The programmers apparently found this worthless feature fascinating, and so it uses up space in ROM.
SIDEN is supposed to find the "density" of silicon in g/cc at temperature T. If I key in 300 (K), the result is 13,553,946,920.0. Well, maybe it's °C. 20 (°C) gives 2.7362 x 10-130. Neither of these seems a reasonable value for the density of silicon, which is 2.33 g/cc at 300K. If you put in 0, you get Undefined Result (so it isn't °C). There may be a way to use this function, but I will not be relying it to find the density of silicon. The intrinsic carrier concentration, or number density, is 1.4 x 1010 per cc. Aha! SIDEN finds the intrinsic carrier concentration in silicon as a function of T in K.
The function F0λ "returns the fraction of total black-body emissive power." The function takes a wavelength in metres on level 2, and a temperature in K on level 1. The User's Guide gives no hint as to units, which would have been so easy to include. The "fraction" is the fraction of power at wavelengths less than the wavelength entered, another bit of information not vouchsafed the user. For T = 1000K, at which the total power is 5.67 x104 W/m2, a wavelength of 2.9 x 10-5 (29 μm) yields 0.9948. 2.9 x 10-6, 2.9 μm, gives 0.2506 (this is the wavelength of maximum radiation per wavelength interval), and 2.9 x 10-7 (290 nm) shows 5.67 x 10-18. Experimentally, then, we have this function figured out, and it appears to work properly. Wien's displacement constant (known as c3 here) is 2.8978 x 10-3 m-K.
The remaining utility functions call for more extended explanations. ZFACT finds the compressibility factor Z, defined by pV = nZRT, with the aid of the ideal gas law. For ideal gases, Z = 1. Most permanent gases met with in engineering can be treated to a good approximation by the ideal gas law. However, this is not true for the commonly-met hydrocarbon gases associated with piplines and chemical processes. The compressibility correction must be used for satisfactory results.
The critical point of a substance is the temperature above which there is no first-order phase change from vapor to liquid. To liquefy such a substance, the temperature must be reduced to below the critical temperature Tc characteristic of the substance, and the pressure must be greater than the pressure at the critical point, pc. At the critical point, pcVc = nZcRTc. If the temperature and pressure are expressed relative to the critical values, then all substances behave approximately the same. The compressibility factor at the critical point, Zc = 0.27, approximately. It must be emphasized that this principle of corresponding states is only approximate, and individual substances may vary from the average behavior. A chart of Z is given in the first reference. This chart is entered with the relative temperature Tr = T/Tc and relative pressure pr = p/pc. Units are obviously no problem, if they are consistently used.
For methane, Tc = 191.1K and pc = 4.64 MPa (1 atm is 0.101325 MPa). Methane at a temperature of 300K and a pressure of 200 psi (1.38 MPa) has Tr = 1.570 and pr = 0.297. Pushing Tr and pr on the stack, and pressing ZFACT, one gets Z = 0.9746. If the pressure is increased to 2000 psi, then 0.8140. These values do not disagree greatly with those in the generalized compressibility chart, and may even be optimized for hydrocarbons. For oxygen, Tc = 154.8 and pc = 5.08 MPa. At 300K and 1 atm, Tr= 1.94 and pr = 0.02. ZFACT gives 0.9992. At room temperature and 100 atm, Z = 0.9375.
The range of ZFACT is not as great as that of the compressibility chart. It will not accept larger values of Tr (such as 5.0), nor Tr = 1.0 (or less). Within its range, this function appears to be a useful one.
The flow of fluids in conduits is a subject of great practical importance, and has been intensively studied. The energy loss due to friction at the walls of the conduit is usually expressed as a "loss of head." In Bernoulli's equation, the energy of a fluid per unit volume can be expressed as h + p/ρg + V2/2g, with the dimensions of length. Energy can be turned into altitude, pressure or velocity but the sum is constant, except for frictional losses. For flow in a pipe, we use a single degree of freedom, as in an electric circuit, so that h, p and V are suitable averages over the cross-section. V is generally defined so that VA = Q, the volume rate of flow, where A is the cross-sectional area. The quantities h and p are generally taken at the centre of the cross-section.
Most measurements have been made on steady, incompressible flow in circular conduits with full flow. The results hold for gases as well as for liquids, so long as V is much less than the speed of sound, which means that the gas may be treated as incompressible. If A is the cross-sectional area of the conduit, and P is the "wetted perimeter," or length of wall in contact with the fluid, then the hydraulic radius is defined as R = A/P. For a full, circular pipe of diameter D, R = (πD2/4)/(πD) = D/4. By dimensional and other arguments, the loss of head Δh in a length L of conduit can be expressed as Δh = Cf(L/R)(V2/2g). The program FANNI calculates the value of the friction constant Cf as a function of the relative roughness ε/D or ε/4R of the conduit, and the Reynolds number NUB>R of the flow.
The Reynolds number is a dimensionless parameter describing the ratio of inertial to viscous forces in the flow. For a circular pipe, NR = DV/ν, and more generally, 4RV/ν. The kinematic viscosity ν = μ/ρ has dimensions cm2/s or ft2/s. The dynamic viscosity of water at room temperature is about 0.01 poise = 0.01 g/cm-s, so its kinematic viscosity is 0.01 cm2/s or 0.01 stokes. In English units, the kinematic viscosity of water is about 1.0 x 10-5 ft2/s, and its density 1.940 slug/ft3.
When the Reynolds number is less than about 2000 the flow is viscous and laminar, with a parabolic velocity distribution. Any roughness of the pipe is submerged in the viscous flow, and does not affect the head loss. In this case, Cf = 16/NR. This kind of flow is seldom met with in practice. For NR > 4000 the flow is certainly turbulent, with a different velocity profile and increased losses. In this case the friction factor depends on the relative roughness of the pipe, the absolute roughness ε divided by the diameter D. For large Reynolds numbers, the friction factor is a function of ε/D only. The friction factor for an ideally smooth pipe, however, is a function of the Reynolds number that decreases rapidly as the Reynolds number increases. A typical steel pipe might have an absolute roughness of 0.002", so that a 1" I.D. pipe would have a relative roughness of 0.002 and a friction factor of 0.0094 at large Reynolds numbers.
The head loss equation is more usually written Δh = f(L/D)(V2/2g), so that f = 4Cf. f is usually called the Fanning Friction Factor, and is given in the familar chart by L. F. Moody (see references). The HP-48G function FANNI calculates Cf, not f, but agrees well with the Moody chart. The relative roughness is pushed into level 2, and the Reynolds number into level 1. FANNI then gives Cf. All the quantities involved are dimensionless, so there should be little problem with units. For other conduits than full, circular pipes, simply introduce the hydraulic radius R = D/4 instead. Good estimates can be obtained for nearly every practical conduit shape.
For viscous flow, f = 4Cf = 64/NR. This is so easy to calculate that the DARCY function is quite superfluous. All it does is divide the number in level 1 into 64! Note that here the HP-48G gets f, not C.
It's an easy matter to provide a computer with a clock display, and the HP-48G does that. You might complain that you wanted a calculator, not a watch, but the facility requires very few resources, is considerable fun, and can even be useful. The date can be displayed as month/day/year or day/month/year, and the time as am and pm, or 24-hour format. Use → TIME to "Set time, date." Note there are also "alarm" functions, but ignore these for the present. You can set time and date and the format in the usual way with CHOOS when looking at the form. The clock display itself is enabled or disabled with the → MODES function, by checking or unchecking the CLOCK field. I happen to use DMY and 24-hr formats because they look best and are most logical to me.
The date and time are entered as decimal numbers. Set the display format to FIX 6 to show them fully. 8.15 pm, or 20.15 hrs, is represented by 20.1500. The last two digits are the number of seconds, and there is no way to enter an am/pm time except in the 24-hr format. 28 May 2003 is represented by 28.052003. For MDY, the month and day numbers are switched.
The time menu is brought up with ← TIME. Though TIME is in cyan, the magenta shift key is used generally to get the corresponding menu, as with EQ LIB. DATE and TIME put date and time on the stack. →DAT and →TIM load the clock with what was on the stack. ALRM brings up the alarm menu, which we are neglecting for the present. In a minute, we shall return to TICKS, but press NXT to see some time functions. DATE+ adds an integer number of days on level 1 to a date on level 2, taking care of months and everything. It also subtracts days, if you make the number of days negative. If you put two dates on the stack, DDAYS finds the difference in days between them (giving the absolute value).
The next four functions work on sexagesimal numbers. An hour or angle expressed as 36.2215 could be in decimal hours or degrees, or is 36° 22' 15" (the seconds can have decimals, if needed). If you press HMS→, you mean that it is ° ' " and you want decimals. The result is 36.370833, which is decimal degrees (or hours). Pressing →HMS puts it back into degrees, minutes and seconds. Add 17° 45' 55" by keying in 17.4555 and pressing HMS+. The result is 54.081000, or 54° 8' 10", which you can check is correct. HMS-, of course, subtracts two sexagesimal numbers. It seems quite a bit easier to comprehend the magnitude of sexagesimal numbers than decimal numbers with a lot of figures. These four functions make it much easier to work with them.
Pressing NXT again, two more functions appear. TSTR pushes a time and date string on the stack, from a date in level 2 and a time in level 1. One useful feature of this is that it finds the day of the week. If you don't have a time, just put a 0 on the stack. CLKA adjusts the system clock by the number of ticks in level 1. I have no idea why you might want to do this.
Press NXT again to get the first page of the menu, and the TICKS button. This button turns the HP-48 into a stopwatch! The system clock increments 8192 times a second, and the TICKS button puts the current system clock on the stack as a binary number. To set up for this, use MTH BASE NXT STWS to set the wordsize at 32 or more bits. Push 32, say, on the stack and press STWS. The thing is that you do not want the clock to overrun the size of the number that can be displayed. Set the base to HEX in the same menu. When you press TICKS, the system clock value will appear in the display as a hexadecimal number. Should you press TICKS again, the clock will have incremented, and a new, larger, number will be shown. Check that the upper one or two hex digits at least are the same, showing that it has not overrun. Do SWAP and - to see how many ticks occurred, change to a decimal real number with B→R, and then divide by 8192 to find the number of seconds. One tick is 0.000122 seconds, so the precision is satisfactory. I timed the HP-48G against the second hand of my watch for 60 s. The result was 59.96, which is not bad.
R. E. Sontag and G. van Wylen, Introduction to Thermodyamics, Classical and Statistical, 2nd ed. (New York: John Wiley & Sons, 1982). pp. 45-48; p. 728, Table A.6 (critical constants); p. 790, Fig. A.8 (generalized compressibility chart).
R. L. Daugherty and J. B. Franzini, Fluid Mechanics with Engineering Applications, 6th ed. (New York: McGraw-Hill, 1965). Chapter 8, pp. 191-254; p. 214, Fig. 8.10 (friction factor for pipes--the Moody chart).
Composed by J. B. Calvert
Created 8 May 2003