110
&)

HP-42S Mechanical Engineering - hpcalc.org

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: HP-42S Mechanical Engineering - hpcalc.org

&)

Page 2: HP-42S Mechanical Engineering - hpcalc.org
Page 3: HP-42S Mechanical Engineering - hpcalc.org

Help Us Help You!

Please take a moment to complete this postage-paid card, tear it outand put it in the mail. Your responses and comments will help usbetter understand your needs and provide you with the best pro-cedures to solve your problems. Thank you!

HELP US HELP YOU!

Book: Mechanical Engineering Date acquired:

Name

Street

City, State, Zip

Phone ( ) Business {J or Home [

1. What calculator will you use this book with?

009 [0 HP-42S 006 [ Other

2. How many other HP solution books have you bought for this calculator?

3. Whatis your occupation?

101 0 Student 103 O Professional 109 O Other

4. Where did you purchase this book?

403 O Bookstore 404 O Discount or Catalog Store

407 O Mail Order 4100 HP Direct 411 O Other

5. How did youfirst hear about this book?

501 OO0 HP Owner 503 (] Advertising 506 (1 HP Salesperson

507 (0 Brochure 508 (] Other

6. To what degree did this book influence your calculator purchase decision?

601 0 Major Influence 602 O Minor Influence 603 0 No influence

7. How well does this book cover the material you expected?

7010 Good 702 [0 Moderate 703 0 Low

8. What level of knowledgeis required to make use of the topics in this book?

801 0 High 802 0 Medium 803 [] Low

9. How clearly was the material in this book presented?

901 0 Good 902 [0 Moderate 903 [J Low

10. How would you rate the value of this book for your money?

111 O High 1120 Medium 1130 Low

Comments: (Please comment on improvements and additional applications or

subjects you would like HP to coverin this or another solution book.)

Page 4: HP-42S Mechanical Engineering - hpcalc.org

S3LVLSG3LINN

JHL

NIa3ivin

4lAHVYSS3IOaN

39VLSOdON

8866-0£€.6HO

SITIVAHOOD

"aA1g3104103N

0004

HOHV3IS3H

L13XHVINHO1VINOIVO

ANVANODAdvMOVd-1131TM3H

33SS34AAvA8

divd38

T71IM3FOV1LSOd

/

HO‘SITVAHOO

0OF'ONLINY3d

IVWSSY1D1SHId

1IVINA'lddd

SSINISNG

Page 5: HP-42S Mechanical Engineering - hpcalc.org

Mechanical Engineering

Step-by-Step Solutionsfor Your HP-42S Calculator

(éfi HEWLETTPACKARD

Edition 1 October 1988

Reorder Number 00042-90022

Page 6: HP-42S Mechanical Engineering - hpcalc.org

Notice

This book and any keystroke programs contained herein are provided “as

is” and are subject to change without notice. Hewlett-Packard Company

makes no warranty of any kind with regard to this book or the keystroke

programs contained herein, including, but not limited to, the implied

warranties of merchantability and fitness for a particular purpose.

Hewlett-Packard Company shall not be liable for any errors or for

incidental or consequential damagesin connection with the furnishing,

performance, or use of this book or the keystroke programs contained

herein.

o Hewlett-Packard Company 1988. Allrights reserved. Reproduction,

adaptation, or translation of this book, including any programs, is

prohibited without prior written permission by Hewlett-Packard

Company; except as allowed under the copyright laws. Hewlett-Packard

Company grants you the right to use any program contained in this book

in a Hewlett-Packard calculator.

The programs that control your calculator are copyrighted and all rights

are reserved. Reproduction, adaptation, or translation of those programs

without prior written permission of Hewlett-Packard Company is also

prohibited.

Corvallis Division

1000 N.E. Circle Blvd.

Corvallis, OR 97330, U.S.A.

Printing History

Edition 1 October 1988 Mfg. No. 00042-90024

Page 7: HP-42S Mechanical Engineering - hpcalc.org

Contents

5 How To Use This Book

1 7 Forces and Vectors8 Vectors in the HP-4289 Using the "VEC" Program

13 Static Equilibrium at a Point

2 21 Equations of Motion

3 26 Analysis Programs27 Mohr Circle Analysis38 Soderberg’s Equation for Fatigue42 Composite Section Properties58 Spring Constant61 Linear or Angular Deformation

Contents 3

Page 8: HP-42S Mechanical Engineering - hpcalc.org

4 65 Thermodynamics66 Equations of State72 Black Body Thermal Radiation

5 78 Fluid Dynamics79 Conduit Flow85 Flow With a Free Surface

6 88 Unit Conversions89 Introduction97 Writing Your Own Unit Conversion Programs99 Dimensionless Units of Angle100 Conversion Factors

4 Contents

Page 9: HP-42S Mechanical Engineering - hpcalc.org

How To Use This Book

Please take a momentto familiarize yourself with the formats used in thisbook.

Organization. Each chapter in this book coversa different area ofmechanical engineering. Sections within each chapter highlight the use ofeach program. These sections are organized like this:

Description of the program, including equations and variables used.

m Special remarks and limitations.

m Generalinstructions.

m Keystroke examples.

® Program listings.

About the Examples. Unless otherwise stated, the keystrokes and

displays shown in each section assume the following conditions:

m The required programs have been keyed into your calculator.

m The stack is clear and youw’re starting with the default display format(FIX 4). Generally this does not affect the results of the example,except that your displays may not exactly match the onesin this book.

m The SIZE is set to 25 registers (the default). The number of storageregisters needed (if any) are listed under “Remarks.”

As you work the examples, also rememberthat lowercase letters aredisplayed as uppercase letters when they appear in menu labels.

How To Use This Book 5

Page 10: HP-42S Mechanical Engineering - hpcalc.org

If You Have a Printer. Many of the programs in this book will produce

printed output if printing is enabled. Press [J[PRINT) [A] = Fiit to

enable printing.

If you are not using a printer, be sure to disable printing (lJ{PRINT] (4]FOFE) to avoid losing results.

About Program Listings. It is assumed that you understand how to

key programs into yourcalculator. If you’re not sure, review part 2,“Programming,” in the owner’s manual.

If you print your programs, remember that the printer may print somecharactersdifferently than they are displayed. (For example, the +characteris printed as '..) Also note that some printers cannot print the

angle character ().

About the Subject Matter. Discussions on the various topics includedare beyond the scope ofthis book. Refer to basic texts on the subjects ofinterest. Many references are available in university libraries and intechnical and college bookstores. The examples in this book demonstrateapproaches to solving problems, but they do not cover the many waystoapproach general problems in mechanical engineering.

Our thanks to Dex Smith of TwentyEighth Street Publishingfor developing

this book.

6 How To Use This Book

Page 11: HP-42S Mechanical Engineering - hpcalc.org

Forces and Vectors

1: Forces and Vectors 7

Page 12: HP-42S Mechanical Engineering - hpcalc.org

Vectors in the HP-42S

The HP-42S can represent a vector in two ways: as a complex number or a

1 x n matrix. Of course, you can use matrices for all your work with

vectors. However, when you are working with coplanar vectors, there are

advantages to using complex numbers:

® You can see both parts (coordinates) of cach complex number. (The

contents of a matrix can only be viewed while editing the matrix.)

® You can enter and display complex numbersusing rectangular or

polar coordinates. (Vectorsstored as matrices are always in

rectangular coordinates regardless of the current coordinate mode.)

8 1: Vectors in the HP-42S

Page 13: HP-42S Mechanical Engineering - hpcalc.org

Using the “VEC”’ Program

The HP-42S provides most of the tools you will need for working withvectors. This program makes some of those tools easier to use byassigning them to the CUSTOM menu.

Remarks.

® The “VEC” program sets flag 27 to display the CUSTOM menu.

= Registers Rog, Ry;, and Ry, are used for temporary storage of the

matrix elements. Therefore, the SIZE must be set to at least 3 storageregisters (l(MODES] (V] =1ZE 3 [ENTER)).

Program Instructions.

1. Key the “VEC” program (listed on page 11) into your calculator.

2. Press WEGto execute the program.

3. Use the CUSTOM menu key assignments created by “VEC”forvector calculations.

0T calculates the dot product of the vectors in the X- andY-registers.

LROSEcalculates the cross product of the vectorsin the X- andY-registers.

UYELcalculates the unit vector of the vector in the X-register.

£T+[1 combines the coordinates in the X-, Y-, and Z-registers

into a 1 x 3 matrix in the X-register.

L3#5T returns the coordinates in a 1 X 3 matrix to the X-, Y-, and

Z-registers.

.FOL= switches to Rectangular mode. (Press :F.E{#to return toPolar mode.)

1: Using the VEC Program 9

Page 14: HP-42S Mechanical Engineering - hpcalc.org

Example. What is the unit vector of 10i —3j +17k?

WEL % 0, 000DI(RWT(WG

To enter the x-, y-, and z-coordinates into the X-, Y-, and Z-registers(respectively), enter the z-coordinate first.

17 [ENTER] 3 [*/] [ENTER] 10

x: 18_ROT)(eG

Put the coordinates into vector (matrix) form.

ST x: [ 1x3 Matrix 1]

oot[orozzfuvEc[ST+01]E35T]POLa

Calculate the unit vector.

HYED L w: 1x3 Matrix ]

Return the coordinates of the unit vector to the stack.

[135T %: B.96813o7JoRozz[uver[2T-0](1+:T]FOLA

The x-coordinate of the unit vector is 0.5013 (to four decimal places).

: -8, 1504[eoTJcross]uved[ST-0j01+2T]POLE |

They-coordinate of the unit vector is —0.1504.

x: 8. 8921I ABTS¥|RO

The z-coordinate of the unit vector is 0.8521.

10 1: Using the VEC Program

Page 15: HP-42S Mechanical Engineering - hpcalc.org

“VEC” Program Listing.

Program:

T fin] 126-Bute Fram I

- hox

"LOTY TO @1"CROSSY TO

"LMEST TO

TSTHCIT TO

"LI=+ZT" TO

o bx o

Py

BOODeT

fi

, ficx]

- %oL

S

ToLn

F IR

T [ o

. T00) SF 27

LEL “RECE"FOLARASSIGH "FOLe" TO @6RTH

-W

il

—_3

[y

o

LEL

FECT

HESIGH "RECs" T

FTH

i Fll:”_. i

- pex &

— n

LEL "ST=C31"

STO 848

F

STO @1

R4

=1 570 B2

22 FEe

e=eekT

L

oo

0)

24 EHTER

25 1

26 THDEX

=7 GETH

2 TRAMS

2 ETH

"REGS"

LEL "[J+=T"

IMLES "REGS™

TRAMNS

FLTH

F4

We[

24

Comments:

Makes CUSTOM menu keyassignments.

Stores theX-, Y-, and Z-registervaluesinto registers 00-02.

Gets a 3 x 1 submatrix from thestorage register matrix andtransposes it to a 1 x 3 matrix.

Transposes 1 x 3 matrix and puts itinto the storage register matrix.Recalls the vector elements fromregisters 00-02.

1: Using the VEC Program 1

Page 16: HP-42S Mechanical Engineering - hpcalc.org

,_..,.,_

Za

sy

1nn

-,-

eT

12 1: Using the VEC Program

Page 17: HP-42S Mechanical Engineering - hpcalc.org

Static Equilibrium at a Point

This program calculates the two reaction forces necessary to balancetwo-dimensional resultant force vectors. The direction of the reactionforces must be specified as an angle relative to the arbitrary axis.

ARo

: 0%,Y5)(%4¥4) 22

Rqcosf; + Rycosf, = YF cos¢g

Rysinf; + R, sinf, = YF sing

1: Static Equilibrium at a Point 13

Page 18: HP-42S Mechanical Engineering - hpcalc.org

Variables Used.

In Equations Description in Program

XF Sum of forces. EF

6, Angle of first reaction force. Rlg

6, Angle of second reaction force. R2a

Remarks.

® Angles arc entered and displayed using the current angular mode of

the calculator.

Since complex numbersare used for output, angles are normalized to

produce positive magnitudes.

A positive value of force (tension) points away from the origin; a

negative value (compression) points toward the origin.

The program produces an error ifR14 = R2A..

This program sets Polar mode.

Flags 21 and 55 are used to control printer output.

Program Instructions.

1. Key the “CF” program (listed on page 17) into your calculator.

2. Press | ZE 7 to execute the program.

3. Repeatthese stepsfor each force:

14

a. Key in the magnitude of the force; press [ENTER].

b. Key in the angle of the force (measured from the reference

axis).

c. Optional: press M{COMPLEX]. (If you skip this step, the

program automatically converts your inputs into a complex

number.)

d. Press .ZE# . to add the force. The current total force is

displayed after each force is added.

If you enter a force incorrectly, you can delete it by adding an equal

force in the opposite direction. If you notice the mistake

immediately after entering it, press SEEE

1: Static Equilibrium at a Point

Page 19: HP-42S Mechanical Engineering - hpcalc.org

4. Store the angles ofthe reaction forces:

a. KeyinR1X and then press "Fis .

b. Keyin R2X and thenpress « FZs .

5. Press ‘R1FEZ to calculate the reaction forces. (Press [¢] to clearthe results from the display.)

6. To work another problem, press CLZFto clear the accumulatedforces and start overat step 3.

Example 1: Balancing a Single Vector. Find the reaction forces inthe following diagram.

Ry

Set Degrees mode and run the “XF” program.

B(MODES] [ES SF=0, 0008 <0.0000

Enter the force vector.

75 135:ZF+ 3F=75.0000 <135.0000ZF+JELEF]Ris[Red [RiR2

1: Static Equilibrium at a Point 15

Page 20: HP-42S Mechanical Engineering - hpcalc.org

Enter the angles ofthe reaction forces.

30 Fld

R14=30.0000LZFe [cLZF[Ris(RS ][RiR2]

270 R2a R24£=278. 0008[EF+[CLZF]Ris[RES|RiRE)

Now,calculate the reaction forces.

ElRz

a. 8080S8.YA

Example 2: Forces in a Bridge Truss. Find the reaction forces in

structural members A and C. Assume pin connectionsat the joint.

120 Ib <€—D

Set Degrees mode and thenstart the program. (If you just worked the

previous example, you do not have to restart the program. Press € to

clear the message in the display and then press ELZFto clear the forces

accumulated above.)

BWMODES)

©

GED SF=0, 0000 <0, 0000TF [YPNG

Accumulate the forces.

100 45FF4

ZF=100.0000 £45.0008[ZFsJOLEF[Ris [R3S ][RiR2]

16 1: Static Equilibrium at a Point

Page 21: HP-42S Mechanical Engineering - hpcalc.org

120 [ENTER] 180 ZF+

Enter the angles of the reaction forces.

0 Fiz

180 45 [0 R

Calculate the reaction forces.

EiRZ

ZF=86.1942 «£124.8787IWIVIIY

R1<=0.08004LZFs[CLIF]Ris[Rae |—[rRiR2]

IR2&=135 . 0006 |LEF+[CLIF[Ris[Fs]| [RiR2]

=21.4214 «180.06800=1 g

1.421B8. 8008 £-45.0808

R1R2

Notethat for this problem, the reaction forcesare displayed in theopposite direction of the angles entered for R, and R,. This indicates thatthe forces are compressive.

“ZF” Program Listing.

Program:

= ot

1

Ue

03[s

(F L 245-Bute Pram

LEL "ZF*"

CF 21

Fzv? 55

SF 21

CLHMEHNU

FOLAR

—eo

2S0

50I

,...,.S i

= !P OMER B2

"IF+"KEY 1 HER @1"CLEF"KEY 2 MER 82"RlKEY 8 MER 83

AR)

oT

00

2L)

bpeket

L03-

Comments:

Sets or clearsflag 21 to match flag55. Clears the programmable menuand sets Polar mode.

Clears the stack and variables.

Defines the menu keys.

1: Static Equilibrium at a Point 17

Page 22: HP-42S Mechanical Engineering - hpcalc.org

et

PlPP

Fao

-7

ob

oo

W0

4

DD

oe

eliO

T

oPa0

DO

-iL

T2e

eTN

boo

18

NpEanil

15 EEY 4 WER &4

"RIRZM

KEY & HER BE

EEY = GTO a9

2 LEL 96

MEHL

=STOP

GTO 84

LEL @1REAL?COMPLEXSTO+ "ZF"VIEW "ZF"RTH

LEL 82

CLET

STO "REla™

STO "REZaM

COMPLER

STO O"EFM

WIEM “EF"

ETH

LEL &3

3 CPH?% COMPLEX

STO "R1L"VIEM "Rls"RTH

LEL &4CRH7COMPLEX

L ST “Rz2L

YWIEW "R2L

FTH

Displays the menu and stops.Pressing redisplays the menu.

Addsthe input to XF. If the input isnot already complex, it’s convertedautomatically.

Clears the stack and initializes the

variables.

Stores and displays R14.. (R1X4cannot be complex.)

Stores and displays R2X.. (R2&cannot be complex.)

1: Static Equilibrium at a Point

Page 23: HP-42S Mechanical Engineering - hpcalc.org

In LtN otL LEL e

RIL “ZF"21 RECT

G2 COMPLER

52 POLAE

o4 RCL "R2g"

535 SIH

i STox 8T 2

LASTA

cos

STOx ST 2

F+

Fa

ECL "R1aM

SToO= ST T

noo

20=]AN0

[e

0Ln

eTTT

T

¥

T

STO 5T 2

ECL "Riug®

COMPLEXIIF.:1=II

ARCL 5T =

I0o

o=000

00)TOe

02[e

el

L]

— el

- 4

T“fvl

=)gmd

]T

-]

reRCL “EF"RECTCOMPLEX

ow0O

OO0

000

00

00

00]

=)

TLNP

20[e

[ag oLT

+{

Calculates R,.

Calculates R,.

1: Static Equilibrium at a Point 19

Page 24: HP-42S Mechanical Engineering - hpcalc.org

=l

TvTR

-

wIona

SO

0D

WWl

g

RCL "R2&

COMPLE=

oT

LNe0PI

o

D6 FULRE="Q¥ ARCL =T A

@2 AYIEM Displays the results.29 RTH

Exits all menus and ends.

b oS

o=5

mr

om

Yet[

— I [ -

20 1: Static Equilibrium at a Point

Page 25: HP-42S Mechanical Engineering - hpcalc.org

Equations of Motion

2: Equations of Motion 21

Page 26: HP-42S Mechanical Engineering - hpcalc.org

Equations of Motion

This chapter contains three Solver programsfor the following equationsof motion for constant acceleration.

Variables Used.

Remarks. These Solver programs can also be used for angular motion.

s = vyt + 1/2at?

v =v, +at

v? =v2+ 2as

In Equations Description In Programs

t Time. 1

a Acceleration. a

Vo Initial velocity. Wi

v Final velocity. U

s Displacement. =

Usea,v,,v,ands to represent o, w,, w, and 6, respectively.

Program Instructions.

1. Key the appropriate program (“MO1”, “M0O2”, or “MO3”) intoyour calculator. (The programs are listed on pages 24 and 25.)

Press lSOLVER).Select “MO1”, “MO2”, or “MO3” by pressing the correspondingmenu key.

2.

3.

4.

22 2: Equations of Motion

Use the variable menu to store the known values. Key in each valueand then press the corresponding menu key.

Page 27: HP-42S Mechanical Engineering - hpcalc.org

5. Optional: Store guesses into the unknown variable to direct theSolver to a particular solution (there might be more than one).

6. Press the menu key for the unknown value. The Solver immediatelybegins to search for a solution.

Example. If a rock dropped off a bridge hits the water 1.6 seconds later,how high is the bridge? What is the velocity of the rock when it strikes thewater?

Since each of the equations only uses four of the five variables, manyproblems with two unknowns can be solved by carefully choosing theprograms you use. In this case, s and v are unknown. First solve for s usingthe equation that does not require v (“MO1”). Then use one of the othertwo equationsto find v. (Key “MO1” and “MO2”into yourcalculatorbefore you begin this example.)

B(SOLVER] 't x: B.8600ATTN

Store the known values: t = 1.6 seconds, a = —9.8 m/s? (for free fallingobjects), and vy = 0.

6. F t=1.60003]Jwe5]]|

a=-9.8000LTevs1]

0:wm vP=0. B804LTowo§[|

s=-12,5440NTNN

2: Equations of Motion 23

Page 28: HP-42S Mechanical Engineering - hpcalc.org

The bridge is about 12.5 meters above the water. Now find v. Since s isnow known, you can use “MQ2” or “MO3”.

EXIT] HMOZ x: =12.5448L7bwev||

When you first select a Solver program (as you just have), the first menukey you press executes a store to that variable, even if you don’t key in anumberfirst. Therefore, you'll have to press ©¥twice to start the

Solver.

W v=-12.5440IITI

by v=-15.6300L1nwe&[|

The rock is traveling at almost 15.7 meters per second when it hits thewater.

““MO1” Program Listing.

83 { 48-Bute Fram o B9 RCLx "a"

&1 LeL "MOL" 18 2

B2 MYRR "tY 11 =+

Bz MYAR "a" 12 Wik

a4 MYAR "oat 13 RECLx “.oa

83 MvAR "= 14 +

He RCLO" 15 RCL- "g"

&7 EMTER 16 EHD

g2 ®trZ

24 2: Equations of Motion

Page 29: HP-42S Mechanical Engineering - hpcalc.org

‘““MO2” Program Listing.

.,..

fex= fax] RCL "t

RCLx "a"RCL+ "w@"RCL- "utEHD

1TL 3Z-Bgte Pram

LEL "mOZ"

fvAR "Lr.1 l“‘l H F: 1n 'a kN

MWHERE @t

FIWHRE Mot

e o

.,_.

,.Tye

oLRN

W

fua]

o0D

1%

Nof

00T

-

N Lot

““MO3” Program Listing.

- =-=

3=

Tw0o{ 29-Bute Pram

LEL "MOz

YRR "a"

MYAR "Bt

MYAR "at

MYAR "="

S RCL et

RCL "w@"M2

- 150a1

2

RCLx g

ECLx ="

EHD

=Fo3

03

W+X

DoyI

on

--

Jaog3

[|

T[a

x]-1

e o

2: Equations of Motion 25

Page 30: HP-42S Mechanical Engineering - hpcalc.org

Analysis Programs

26 3: Analysis Programs

Page 31: HP-42S Mechanical Engineering - hpcalc.org

Mohr Circle Analysis

This program calculates the 2-D Mohr’s circle for stress using strain gagedata (equiangular or rectangular) or using known stresses.

Configuration 1 2

Code

Type of Rosette Rectangular Delta (Equiangular)

c Principle Principlestress b stress

/ /

a a

Principal Strains 1 [ex + € 12 0 Flatete

€1, €

v £ V20e, — ) + 2— ¢)7 |FVAa— @ T 2o — oH2Ae— ) ]

Center of

Mohr Circle E(e, + ¢€2) E(e, + ¢ + €)

) 2(1 —v) 3(1 —v)2

Maximum Lt EShear Stress 2(1+v) 3(1+v)

Tmax X \V2(e; — €)* + 2(ep — €)% X VAa— &)+2=+ 2ec— )

Orientation _

of Principal 1a [Zéb& 66] 1o [ V3 (e @) }Stresses ¢ 2 € — € 2 (2¢, — & — ¢€.)

3: Mohr Circle Analysis 27

Page 32: HP-42S Mechanical Engineering - hpcalc.org

Variables Used.

in Equations Description in Program

E Young’s modulus. E

v Poisson’sratio. ¥

€, Strain . el

& Strain g5 OF¢ ez

&, Strain gy OF£ ek

o Normal stress on the x-face. "

oy, Normal stress on the y-face. Y

o1 Minimum principal stress. Smin

oy Maximum principal stress. Srman

Toy Shearstress. THU:wY

Tmax Maximum shearstress. TAUMma:

¢ Counterclockwise angle from ¢, to &the maximum principal stress.

g Counterclockwise angle from the x- £axis to the maximum principal axis.*

i Arbitrary angle counter- clockwise ARELfrom the x-axis.*

S Normal stress.*

T Shearstress.*

*Refer to the equations on page 32.

28 3: Mohr Circle Analysis

Page 33: HP-42S Mechanical Engineering - hpcalc.org

Remarks.

m Shearing stress on any element is positive if it tends to rotate theelement clockwise. Tensile forces are considered positive;compressive forces are considered negative.

m Angles are entered and displayed using the current angular mode ofthe calculator.

m The program calculates the principal stresses for a two-dimensionalstress state only. However, a knowledge of the stresses in the z-direction is necessary to determine the overall maximum andminimum stresses.

m This program uses storage register Rgg to store intermediate results.Before running this program be sure the SIZEis set to at least 1

(MMODES] (Y] =1ZE 1 [ENTER)).

m The program sets flag 21, which causes the program to stop each time

a result is displayed if printing is disabled.

Program Instructions.

1. Key the “MOHR” program (listed on page 34) into your calculator.

2. Press ‘MOHE to execute the program.

3. When the program displays Tups of Input?, pressone of thefollowing:

Eas if equiangular strain gage readings are known.

FET if rectangular strain gage readings are known.

STRESif stresses are known directly.

4. The program then displays Store Yaluesi [R-S]andavariable menu containing the variables to be entered. Store eachvariable by keying in the value and then pressing the correspondingmenu key. Afterall of the values have been stored, press (R/S]. Theprogram then calculates and displays the results. If you are notusing a printer, press after each result.

3: Mohr Circle Analysis 29

Page 34: HP-42S Mechanical Engineering - hpcalc.org

5. Optional: To calculate the normal stress and the shearstress, do thefollowing:

a. When you see AREZ7, key in the arbitrary angle of rotation.

b. Press [R/S]. If you are not using a printer, press aftereach result.

Example 1: Equiangular Strain Gage. An equiangular rosettestrain gage measures the following strains:

£o=180p

[ 200[‘

€10 = —290

Find the principal stresses and their orientation. The material properties

are E = 30 x 10° psi and v = 0.3.

B(MODES] HER Tupe of Input?

HITHR TITIN

Efg Store Yalues; [R-51]

30[E)6E E=30, 383, BB0. bRaMO.

i V=0. 2000ITI

180 (B) 6 F/A) El =1=0, POD2ITI.

30 3: Mohr Circle Analysis

Page 35: HP-42S Mechanical Engineering - hpcalc.org

200(E)6(*/<) E=z

290 [*/] E) 6 /)

R/S

R/S

[email protected].

e3=-0. 6003NTRN

Smax*856?51358

SMin=—6,103.707218] X: =651 7072

TRUmax=7, 389, 4215x: =6, 1083.7072

£=31.8333%: -6, 10 3.7672

Example 2: Known Stresses. The stresscs acting on an element areshown below (all stresses are in MPa).

. 'rxy=30

»O’x=75

3: Mohr Circle Analysis 31

Page 36: HP-42S Mechanical Engineering - hpcalc.org

N=

2

Sz + SyS1=—‘2—+Tmax

S, + SS, = 32 ! ~ Tmax

1 - 21y= —tan~! |——22" [s,—sy]

_51+S22 + Trax c052[0’ - 0]

T = Tmax sin2[0’ - ]

Find the principal stresses and their orientation, and the stresses on the

face of the element oriented 45° counterclockwise from the x-axis.

B(MODES]

|

DEG Tupe of Input?

MOHRE (EnaTReCJotresl[[

STRES Store Valuesj [RsS]ETTETIWDWB

30 THUAEY TAUxY=30. 0000IRITIN

75 H ®=rS.8880

ol&v11|

32 3: Mobhr Circle Analysis

Page 37: HP-42S Mechanical Engineering - hpcalc.org

20 [*/]

R/S

R/S

45 [R/S)

Y=-20,80800 TRETINR.

Smax=83. 6885x: 83. 6885

Smin=-28.68856805%: —28.

TAUmax=56. 1885x: —28.6805

Y: -28. 6800RRB<L70. BBBG

Norm=-2. 5880% = 8ea

Shear=47, 5004X 880

3: Mohr Circle Analysis 33

Page 38: HP-42S Mechanical Engineering - hpcalc.org

“MOHR” Program Listing.

Program:

BE £ 412-Bute Pram

@1 LEL “MOHRE"

Az SF 21

H3 CLMENU

B MEQLM

85 KEY 1 XKEQ @i

@e "RECH

87 EEY Z RKER @82

gHg “STRES®B3 EEY 3 WEQ 83

18 KEY 9 GTO @9

11 LEL H

12 "Tupe of Input?"

= MEHU

14 FPROMFT

15 GTO A

LEL "M1"MYAR "E"r,1 |I'.I H E: 1 l'lll i

MYAR "el"MYAR:MYAR:[

[bb

ets ¥

es

00)

22 LBEL "MZ"23 MYAR TRy24 MYAR M25 MYAR T

LEL @8

VARMEHL "E1"

2 WEQ B2

o1T

RCL "E™

1RCL— "m

oo00[

o

34 3: Mohr Circle Analysis

Comments:

Sets flag 21 to control output anddefines the menu for selecting thetype of analysis.

Displays the menu and promptsforthe type of input. Pressing

redisplays the menu.

Declares the menu variables for the

first variable menu.

Declares the menu variables for the

second variable menu.

Selects the first variable menu for input.

Calculates r,,,, for strain gage data.

Page 39: HP-42S Mechanical Engineering - hpcalc.org

Tl

e1

4 =

S8

wnoonAO

gLR

03P

onon

1T

=Ltoen

g00

To

Fuo0o

IJa

TWT

TLN

T iiO

Jr

w0o

=]

ST0 88

RCL TEM

1

RCL+ "y

“THUmMa""E‘l"

" E-I:__l n

i ~

1Y = J

GTO B84

LEL &

WER A

GTO 84

LEL @z

WARMEML "Mzt

#ER @z

Calculates results using equiangularstrain gage readings.

Calculates results using rectangularstrain gage readings.

Selects the second variable menu for

input.

3: Mohr Circle Analysis 35

Page 40: HP-42S Mechanical Engineering - hpcalc.org

Lo0O

5=poedodol)

i[35)

-1

oQ0

oD

00

00

Q%D

0D0D

o0

912za3a4a52E97g

=b

LT

- %) =l kA

=TT

TSogg&

eke

ekek

5 X Jo

L0[e

50

q

1

STO 8g

STO "THUMmEx"

RCL T-

RCL "y

RCL "t

LEL &4

2T "Smin

f+

STO "g

RECL "TAUmax"

RCL+ 28

STO "Smas

VIEM "Smax"

RCL @i

RCL- "TAUmax"

STO "Smin®

VIEW "Smin”

WIEW "TAUma:"WIEM "g"

IHMFPUT "HREBL"

ROL- "a"—

SIH

3: Mohr Circle Analysis

Calculates results using knownstresses.

Calculates 1, and 6.

Calculates S, and Spin.

Displays 74y and 6.

Optional routine calculates normaland shearstress at an arbitraryangle.

Page 41: HP-42S Mechanical Engineering - hpcalc.org

k] [

.e,o2

WAg

2!

bkb

ekek

N N L

* "TAUma:"

RCL+ &

"Morp="

ARCL 5T =

2 AVIENW

R

RCLx "TAUMax""Shear="ARCL 5TAYIENFTH

LEL @23"Erore Malues;

FUIRE-31

22 FROMFT'3 LEL &3

EXITALL

EMD

Promptsfor input using the selectedvariable menu. Pressing clearsthe menu and continues.

3: Mohr Circle Analysis

Page 42: HP-42S Mechanical Engineering - hpcalc.org

Soderberg’s Equation for Fatigue

This program is used with the Solverto calculate any one ofthe sixvariables in Soderberg’s equation for fatigue when the otherfive areknown. Soderberg’s equation is shown graphically in the following figure.

Experimental Failure Line

AN /Failure PointN

h Working Stress Line

. for FS =1

w o

Design Line

with FS >1

FS

<« Syp

S S

%_ 2 Smax+sm1n+K[sy:][smax smm]

38 3: Soderberg’s Equation for Fatigue

Page 43: HP-42S Mechanical Engineering - hpcalc.org

Variables Used.

In Equation Description in Program

Syp Yield point stress. Sup

S, Endurance stress. Se

5 max Maximum applied stress. Smax

S min Minimum applied stress. Zmin

K Stress concentration factor. K

FS Factor of safety. Fs

Remarks.

u Soderberg’s equation is valid for ductile materials only.

m Fatigue effects arec magnified in corrosive environments.

Program instructions.

1. Key the “SODER?”program (listed on page 41) into your calculator.

2. Press l[SOLVER] =0LEFto select the Solver equation.

3. Store each of the known variables by keying in the value and thenpressing the corresponding menu key.

4, Press the menu key for the unknown variable.

Example. Given the following values, what is the maximum allowableapplied stress if the minimum applied stress is 15,000 psi?

Sy = 80,000 psi

5. = 30,000 psi

K=15

E§S =20

3: Soderberg’s Equation for Fatigue 39

Page 44: HP-42S Mechanical Engineering - hpcalc.org

B(SOLVER] =0LEF

80000=4'E

30000 E

15000 =M IH

40 3: Soderberg’s Equation for Fatigue

Sup=808, BBd. BRAVP|SE_[SMAR[SMINGB]Fo|

Se=30, B00. BOEABETNTTRTNI

Smin=15, B0B. PAEAL2P§SEJSHAi[SMINGK|FS]

K=1.5008STWFETTA

FS=2.8600[sVP|SE{IMAH[SMINGK|Fs|

Smax=25, 000. 0684[P|€JEMisHiNGb|Fs]

Page 45: HP-42S Mechanical Engineering - hpcalc.org

“SODER” Program Listing.

,_ px]

p— ot

[}

Jo

03

oDe

T L BZ-Bute Fram o 11 RCL- "Smin"

LEL “SODER" 12 RCL= "E"MYAR "Suyp® 13 RCLx "Sup"MYAR "Se" 14 RCL+ "Sa

MYHRE "Smax" 13 +

MYAE "ZSmin” 16 2

% MVAR TR 17 =+

MYAR "FS" ig2 RCL "Sup"

ECL "ZSmax" 17 ECL+ "F3"

ECL+ "Smin" 28 -

LAST: 21 EMD

—AlG

15

OT

OI

oL

5 vo0

0D

=)

-I

e

3: Soderberg’s Equation for Fatigue 41

Page 46: HP-42S Mechanical Engineering - hpcalc.org

Composite Section Properties

The mathematical properties of a cross section composed ofa finitenumber of rectangular elements can be computed by adding thecontribution of each rectangular region individually. This program usesthis principle to calculate the area of a section, the momentsof inertiaaboutthe specified set of axes, the momentsof inertia about an axistranslated to the centroid, the momentsof inertia of the principalaxes,and the angle of rotation between thetranslated axes and the principal

axis.

Ay = Dx;Ay;

A=Ag+A,,+ A+ 0 + Ay

n

Yx0id,ix_= t=1

A

Yyoides—_ =1

y A

n — —

Iy = YX0iYoiAei Ly=1y -AXxYy=1

n Ay? —L-fhase men-ayi1

n AX'Z .

Iy=2[x(%l+1—2‘] 81 IF=I!I-Ax2t1=1

J=1+1,

42 3: Composite Section Properties

Page 47: HP-42S Mechanical Engineering - hpcalc.org

Ly = L-cos’$ + Iisin2¢ + Isin 2%

Ly = L;cos’p + Esin’p + I-sin24

J¢= I?¢+I'y_¢

Variables and Storage Registers Used.

In Equations Description In Program

Ax; Width of a rectangular element. i

Ay; Height of a rectangular element. H

Ay Area of an element. Ry,

A Total area of the section. Ro1

x x-coordinate of the centroid (total). Rgs + Ry

y y-coordinate of the centroid (total). Ry + Ry

Xog x-coordinate of the centroid of an Heelement.

Yo y-coordinate of the centroid of an Yoelement.

I, Moment of inertia about the x-axis. Ry

1, Momentof inertia about the y-axis. Ro7

J Pole}r moment of inertia about the Rosorigin.

1, Product of inertia about the origin. Rgo

3: Composite Section Properties 43

Page 48: HP-42S Mechanical Engineering - hpcalc.org

In Equations Description In Program

L Moment of inertia about the x-axis Rostranslated to the centroid.

I Moment of inertia about the y-axis Ryytranslated to the centroid.

I Product of inertia about the Rootranslated axis.

¢ Angle between the translated axis Rosand the principal axis.

Iy Moment of inertia about the principalX-axis.

Iy Moment of inertia about the principaly-axis.

Jy Polar moment of inertia about the Rosprincipal axis.

Remarks.

44

Angles are entered and displayed using the current angular mode ofthe calculator.

For a given origin, the polar moment of inertia is constant regardlessof the angular rotation. Therefore, I- is equal to J4

It is possible to obtain a negative value for the product of inertia.

Before using “SECTION”be sure to set the SIZE to at least 11registers (l(MODES] (V] £1ZE 11 [ENTER)). The table above showsthat some ofthe registers are used more than once. Storage registersnot listed in the table are used for other intermediate results.

This program clears all of the storage registers.

Results are labeled and displayed in the same order as in the tableabove. The program uses variables only for the four section inputs.

This program uses flags 21 and 55 to control printer output.

3: Composite Section Properties

Page 49: HP-42S Mechanical Engineering - hpcalc.org

Program Instructions.

1.

2.

3.

4.

5.

Key the “SECTION”program (listed on page 53) into yourcalculator.

Press SEC T I to execute the program.

When you see MHumbetr of Sect ions?, key in the number ofcomposite sections and then press [R/S].

Enter the data for each section:

a. Key in the x-coordinate of the centroid and then pressWi

b. Key in the y-coordinate of the centroid and then pressR

¢. Key in the width of the section and then press M

d. Keyin the height of the section and then press H

e. Press to continue.

If you store an incorrect value, simply repeat the step to store thecorrect value. If you notice that you’ve made a mistake afterpressing , start over at step 2.

After the data for each section has been entered, the programcalculates the results. If you are not using a printer, press after

each result is displayed.

3: Composite Section Properties 45

Page 50: HP-42S Mechanical Engineering - hpcalc.org

Example 1: Rectangular Section. Calculate the section properties

of the following cross section.

yA

Table of Inputs

X Ye AX|AY

21151} 4 3

B(MODES] [EG Number of Sections?E;ECTI %: B. 0000

1 [R/S] Input Section 13 LR/S)EETATYTA

2 spwe RC=2 . P00ITTIOI

15 %0 Yc=1. 5000TTTT

46 3: Composite Section Properties

Page 51: HP-42S Mechanical Engineering - hpcalc.org

4 W W=4. 0000ITTTN

3. H H=3. 8060Le [v §W]W]

[R/S] Rrea=x: 12. 0000

R/S Xc=%: 2. 00009

x: 1.56800

R/S Ix=x: 36. 0000

R/S Iy=x: 64,0000

- J=

x: 100.0000

- Ixy=x:36, DOOO

3: Composite Section Properties 47

Page 52: HP-42S Mechanical Engineering - hpcalc.org

R/S Ixc=

x: 9. 88608

R/S Iuc=x: 16,0000

R/S Ixgc=%: ¥, 80680

R/S Lphi=x: 0. 8060

Ixc phi=x: 9, 8888

R/S Iyc phi=w16,BBOD

R/S Jephi=x: 29. 0000

48 3: Composite Section Properties

Page 53: HP-42S Mechanical Engineering - hpcalc.org

Example 2: Composite Section. Calculate the section properties ofthe following section.

Table of Inputs

X Yo |OX|Ay

1156 |15

211 6 2 112

7 1 10| 2

@MODES] «DEG Number of Sections?SEETL x: 25,0000

3 [R/S] Tnput Section 1;LR-51]TIITS

5 sy ®c=5.80P0

IETSATITN

115 Ko Yc=11.5600IETATSYIIN

3: Composite Section Properties 49

Page 54: HP-42S Mechanical Engineering - hpcalc.org

R/S

50

b

3: Composite Section Properties

W=6. 8604IT7OI

H=1.0000IETSTYTN

Input Section 23 [R~S]EDTYBA

®c=1.0600TRTNTNSI

Yc=6. BbbaLot]vo]W]B[]

IN=2.BBBB lIETTOTI

H=12.08008ITDTTI

Input Section 33[R-S]Lo[ve[W[w][]

KC=7. 604(8|v|W]H|

Page 55: HP-42S Mechanical Engineering - hpcalc.org

— V=1, 0000IB7TO

10 W W=10.08000LacvW]Bl|

2 H H=2.088680INETTWTRB

[R/S] Area=x: 50, 6008

R/S Y=% 3.8800

R/S Yc=w: 4. 6608

R/S Ix=% 15972, 6667

[R/S] Iu=w1, 346. 6667

R/S] J=% 3,319.3333

3: Composite Section Properties 51

Page 56: HP-42S Mechanical Engineering - hpcalc.org

ng=X: 629, 8090

R/S] Ixc=w: 886.8867¢

R/s Igc=

x: 593.9467

R/S Ixyc=X: 279. 8400

R/S £phi=x: 38.9814

R/S Ixc phi=x: 1,0852.0261

R/S Iuyc phi=x: 42 86?2

R/S Jrhi=%: 1,4808.8333

52 3: Composite Section Properties

Page 57: HP-42S Mechanical Engineering - hpcalc.org

“SECTION” Program Listing.

Program:

.,.

fx]™ lx] £ 295-Bute Fram

LEL "SECTION"

MYAR

MYAR

MYAR

MYAR

-~ lex]

ok

n lv'j n

B H n

) ]=

Oe)

Pde

— Lo

LEL B

"Humber of

F'oections?"FROMFT

HES

IF

T

oo

1T

ooot0o

by 21

Pk

ek

ek

ek

1

1o=

Lo

m—

oy

A3

g

01

4+=

ee)

- [L

bbb

ek

ek

ks

eN

wioga)

FU5LR-S1

CF Z1

AVIEM

CLH

SF 21

STOF

ALEMG

o

o0o]

Q03

PlIIy

Comments:

Defines the menu variables.

Prompts for the number of sections;rejects a zero input,

Clears the storage registers andstores a loop counter in Re,.

Selects the variable menu.

Builds the promptstring using theloop counter.

Displays the prompt and stops.Pressing continues the

program.

3: Composite Section Properties 53

Page 58: HP-42S Mechanical Engineering - hpcalc.org

E=ITHLL

RCL "H®RCL% "lSTD @2

H1

RCLx "yo"STO+ @4

RECL "HE

ECL=

43 STO+

44 RCL "%

45 H1Z

Ns

T-

==

oo

-o

-o

o

efa

faL

bt0

L{2

o

1oL[

M

IIHH

1 [ [+43

43SEo+

on

L]—

.o +

X

IT

2

oon

ooOoo

L3 D)

(N

o T2

55 RCL "KM

SE HeE

ar 12

iloo

=oO

i [ax] RCL= )

AN

[xx)-1[

61 5T0+B2 +53 STO+ 82

4 ROL "Hco65 ROLx “yo"

RCL=

STO+ 1T a2

=

]T

= oo[

T1T

=TT L

T o0

o0

T= 5

1

- 12 =TG=

Accumulates the inputs into theappropriate storage registers. (Referto the table starting on page 43.)

Repeats loop for each section.

54 3: Composite Section Properties

Page 59: HP-42S Mechanical Engineering - hpcalc.org

a3

[oI

mdg

=g=)))

iT

=)=y

WD

)5 [x]

ote

nT

000D

00

00O

=1wO

oL

00

00

Wg

Fo

003o

Tw0

00

WO

no

Ow00e

o LS|

=tg

0

-2L Lo

bet

et

oM

0o

23[

Calculates L.

o03

w0

—i

=

RCL a1 Displays the area.

+ Calculates and displays.

Calculates and displaysx

o10

Displays I, and calculatesI

R+ DisplaysI,,.

+-

RCL &71 I IJ 1

HER 82

V[xalRCL Y1 Displays J .

BER B3

3: Composite Section Properties 55

Page 60: HP-42S Mechanical Engineering - hpcalc.org

T

bt

peke

el

oM

o=

--s

-5

b3T

WD

112 RCL 85 DisplaysI11=

TOl

==

=

25==== o

=

56

e DisplaysI, .

F Calculates L.

Displays ;.

Displays L.

5T 642 RCL 16 Mg

AER 83

Calculates ¢.

3: Composite Section Properties

Page 61: HP-42S Mechanical Engineering - hpcalc.org

Iz z Calculates and displays L,

nn

Joo

00[

i

be..

i nonT

[P

io]

i

e n iT

o0(T

[24)

Jao3Do

)T

fodbb

ekb

ek

(1))

in

RCL: 18

+.=

RCL B85

SIHL

RCL~ @3 Calculates and displaysL+o=

"Iuc phi"

EE @2

RCL 8% Displays J;.n IF“—l 1 "

GTO 94 Returns to the initial prompt.

LEL &= Displays a result. If results are beingFr=n printed (flag 55 set), the label andF&7? 55 value are printed on a single line.ARCL ST =

AYIEM

EHE

3: Composite Section Properties 57

Page 62: HP-42S Mechanical Engineering - hpcalc.org

Spring Constant

This Solver program calculates the value of any of the five variables in thefollowing spring equation, given the other four.

F,~Fk=1 "2

X2 - Xl

Variables Used.

In Equations Description In Program

X, First spring length. “1

F, Force required to retain spring at F1length X;.

X, Second spring length. 2

F, Force required to retain spring at Fzlength X,.

k Spring constant. k Remarks. The “SPRING” Solver program can also be used to solve anygenerallinear equation of the formy — yy = m(x — xg).

Program Instructions.

1.

58

Key the “SPRING” program (listed on page 60) into yourcalculator.

Press I{SOLVER] SFRIH.

Usethe variable menu to store each of the known values by keyingin the value and then pressing the corresponding menu key.

Press the menu key for the unknown.

3: Spring Constant

Page 63: HP-42S Mechanical Engineering - hpcalc.org

Example. A compression spring is 4.0 cm long under no compressiveforces. A force of 27 Newtons compresses the spring to a length of 2.8 cm.Find the spring constant, k, if the solid (fully compressed) height of thespring is 2.5 cm. Also find the force required to fully compress the spring.

BSOLVER) SFEIH

4 1

0 FIL

28

The spring constant is 22.5.

25

x: B. 8800SWTTI

X1=4.0800SNTTT.

F1=8.0000itF1jRaFa&|

®2=2.8000#tF1weFaK|

F2=27.0bo8#1F1w2FaK|

k=22.5600TNTTA.

K2=2.5008#1F1RFaK|

F2=33. /o009#1F2H2F@K|

3: Spring Constant 59

Page 64: HP-42S Mechanical Engineering - hpcalc.org

A force of 33.75 Newtons would completely compress the spring(to 2.5 cm).

“SPRING” Program Listing.

B8 £ 49-Bute From I @7 RCL "F1"B1 LEL "SFRIMG" @% RCL- “F2"B2 MYAR K1Y @3 RCL "®2"B2 MYAR "F1" 18 RCL- "#1"a4 MYAR “H2" 11 =85 MYAR "F2" 12 RCL- k"BE MVAR Uk 13 EMD

60 3: Spring Constant

Page 65: HP-42S Mechanical Engineering - hpcalc.org

Linear or Angular Deformation

This program solves for linear deflection under tensile load, or theanalogous angular deflection under torque. Given four ofthe fivevariables, the unknown is calculated. '

8T \

P ¥

p or \

}

T 17-!

€ / —>| |— €« / —>

_P<s Az g -TZAC=RE =G

3: Linear or Angular Deformation 61

Page 66: HP-42S Mechanical Engineering - hpcalc.org

Variables Used. Since the form of the two equations is identical, eithertype of deformation problem can be solved using this program. Use thefollowing table to relate the variables used in the equations to thevariables used in the program.

In Equations Description In Program

Al Change in length. Delta

P Applied load. P

l Length. L

A Cross-sectional area. A

E Modulus of elasticity. E

6 Deflection angle (in radians). Delta

T Applied torque. F

J Polar moment of the section. A

G Modulus ofelasticity in shear. E

Remarks.

m This program is not applicable for non-elastic media or elastic mediawhere stress exceeds the elastic limit. Materials must be isotropic.The equation for angular deflection is not valid in the neighborhoodof the applied torque.

m Even though the polar moment must be expressed in radians,it is notnecessary to set Radians mode because no trigonometric functionsare used in the program.

Program Instruction.

1. Key the “DEFORM” program (listed on page 64) into yourcalculator.

2. Press [SOLVER] KEFEto select the program.

3. Store each of the known values by keying in the value and thenpressing the corresponding menu key.

62 3: Linear or Angular Deformation

Page 67: HP-42S Mechanical Engineering - hpcalc.org

4. Solve for the unknown value by pressing the corresponding menukey.

Example. Steel bars (each 10 meters long) affixed to a roof are to beused to support the end of a cantilever balcony. The load on each bar willbe 50,000 N.If the maximum allowable deflection is 0.001 meters, whatshould the area of the bars be? The modulus of elasticity is given as2.068 x 10" N/m?.

B(SOLVER] LiEF (TR x: 8. BbA[SOLVER) WELTA]P

|

L

|

w

|

|

|

.001 BELTH IDelta=8.8@18 I[NTWIA

50000 F ¢ P=50, 606. 080CELTRLP |L |% |E [|

10 [=10. 0000|-:--r-n-|

2068[E] 11 E E=2086, 860, 808, 00A.weetslP ]L ]w [€ ||

R A=0. 0024(YITNY

3: Linear or Angular Deformation 63

Page 68: HP-42S Mechanical Engineering - hpcalc.org

“DEFORM” Program Listing.

@8 £ 45-Bute Prom 3 @7 RCL "P"@1 LEL "DEFORM" @g RCLx LB2 MYAR "Delta" @3 RCL+ “A"@3 MYAR P 1@ RCL+ “E"@4 MYAR "L 11 RCL- "Delta"a5 MYAR "A" 12 END@5 MYAR "E"

64 3: Linear or Angular Deformation

Page 69: HP-42S Mechanical Engineering - hpcalc.org

Thermodynamics

4: Thermodynamics 65

Page 70: HP-42S Mechanical Engineering - hpcalc.org

Equations of State

This section contains programs for both ideal gas and Redlich-Kwongequations ofstate.

The ideal gas equation is

PV = nRT

The Redlich-Kwong equation is

P= nRT a

(V-b) TWYV2V(V+b)

where:

= 4934 b nRT}!S

b = 00867 2ole¢

Variables Used.

in Equations Description in Program

P Absolute pressure. F

v Volume. W

n Number of moles present. r

R Universal gas constant. F

T Absolute temperature. T

T, Critical temperature. T

P, Critical pressure. Pz

66 4: Equations of State

Page 71: HP-42S Mechanical Engineering - hpcalc.org

Values of the Universal Gas Constant

Value Units Unitsof R Units of R of P

|

UnitsofV

|

of T

8.314 N-m/g mole-K N/m?

|

m3/g mole K83.14

|

cm’-bar/gmole-K

|

bar |[cmi/gmole| K82.05

|

cm’-atm/gmole-K

|

atm

|

cm®/gmole

|

K0.7302

|

atm-ft*/Ib mole-°R

|

atm

|

fi}/lbmole

|

°R10.73

|

psi-ft3/Ib mole-°R psi

|

ft*/lbmole

|

°R1545

|

psf-ft’/lbmole-R

|

psf

|

ft3/lbmole

|

°R Critical Temperatures and Pressures

Substance T..K T.,°R

|

P,, atm

Ammonia 405.6 730.1 112.5Argon 151 272 48.0Carbon dioxide 304.2 547.6 72.9Carbon monoxide 133 239 34.5Chlorine 417 751 76.1Helium 5.3 9.5 2.26Hydrogen 33.3 59.9 12.8Nitrogen 126.2 227.2 33.5Oxygen 154.8 278.6 50.1Water 647.3 1165.1 218.2Dichlorodifluoromethane 384.7 6925 39.6Dichlorofluoromethane 451.7 813.1 51.0Ethane 305.5 549.9 48.2Ethanol 516.3 929.3 63Methanol 513.2 923.8 785n-Butane 425.2 765.4 375n-Hexane 507.9 914.2 29.9n-Pentane 469.5 845.1 33.3n-Octane 568.6 1023.5 |24.6Trichlorofluoromethane 471.2 848.1 43.2

4: Equations of State 67

Page 72: HP-42S Mechanical Engineering - hpcalc.org

Remarks.

m P,V,n,and T must have units compatible with R .

m At low temperatures or high pressures, the ideal gas law does notrepresent the behavior ofreal gases.

m No equation ofstate is valid for all substances over an infinite rangeof conditions. The Redlich-Kwong equation gives moderate to goodaccuracy for a variety of substances over a wide range of conditions.Results should be used with caution and tempered by experience.

Program Instructions.

1. Key the “IDEAL” program (listed on page 70) or the “RK”program (listed on page 71) into your calculator.

2. Press B(SOLVER] ILEAL (for an ideal gas) or IB(SOLVER]RE (for Redlich-Kwong).

3. Use the variable menu to store each of the known values: key in thevalue and then press the corresponding menu key. Notice that thereare seven menu variables. Therefore, you must use [4] or [¥] to

enter or solve for P, .

4. Solve for the unknown by pressing the corresponding menu key.

Example 1: An Ideal Gas. Whatis the pressure (in bars) when 0.63 gmoles of air is enclosed in a 25,000 cm? space at 1200K? Assume an idealgas. From the table on page 67, R is given as 83.14. (Key the “IDEAL”program into your calculator.)

BEOLVER) ILERL % 8, D000ITTI

25000 4 V=25, 000, 0000ITTA

B3 'H n=8.6300IITOA

68 4: Equations of State

Page 73: HP-42S Mechanical Engineering - hpcalc.org

83.14 R R=83, 1400ITOON

1200 s 5122 T=1, 260, 0600LFvN1k1]|

F P=2.5142IIO0OA

Example 2: Using Redlich-Kwong’s Equation. Thespecificvolume of a gas in a container is 800 cm3/g mole. The temperature willreach 400K. Given the following constants, what will the pressure beusing the Redlich-Kwong relation?

T, = 305.5K

P, = 482 atm

R = 82,05 cm® atm/g mole K

B(SOLVER] |R X: 2. D142|nnmnml

800 W V=800, 0000PvWBT]1c]

1 H n=1.B8000ITIOAT

8205 E R=82. 08560Le [v IN[R TT]TC]

4: Equations of State 69

Page 74: HP-42S Mechanical Engineering - hpcalc.org

400 T T=408. 0008P¢NR7[TC]

3055 T Tc=305. 5000[P 1¢[NTR [T[TC]

(V)482 Fi Pc=48. 2000|lnnulllll-|llmllnlll4

a = P=36.2669L¢ |v [N [R ]7|TC]

“IDEAL” Program Listing.

86 £ 48-Bute Fram 2 @7 RCL "n"@1 LEL "IDEAL" B2 RCLx "RB2 MYAR P @9 RCLx "T"B3 MYAR "y 18 RCL "P"a4 HYAR "R 11 ROLx "y85 MYAR "R" 1z -e MYAR T 13 EMD

70 4: Equations of State

Page 75: HP-42S Mechanical Engineering - hpcalc.org

“RK” Program Listing.

] 113-Bute From @ 23 WER a1LEL “RK" 24 RCL "WMYAR “E 25 +MYRR 26 LASTHMYAR R 27 %

RCL “T*

ooMM

ST

oNe

D0Oe

53

85 MYAR “R" 28BE MYAR "T" 23 SORT67 MYAR "Tc 3@ x88 MYAR "Pc 31 +@3 RCL T 32 -16 HEQ @ 3% RCL- "P"11 RCL "y 34 RTH12 HER @1 35 LEL @8z - 26 RCLx "n"

14 = 27 RCL» "R

15 HER 81 38 RTH16 4.934 39 LEL @117 46 B, B36718 RCL "Tc® 41 RCLx "Tc1% 1.5 42 HEQ G@2@ 43 RCL+ "Pc"

$a Ja EHL

4: Equations of State 71

Page 76: HP-42S Mechanical Engineering - hpcalc.org

Black Body Thermal Radiation

All bodies emit thermalradiation according to their temperature. Thehigher the temperature, the more thermal radiation emitted. A black bodyis one that emits the maximum possible amount of energy at everywavelength for a specified temperature. The figure below represents theblack body thermal emission as a function of wavelength.

This program can be used to calculate the following:

m The wavelength of maximum emissive power for a given temperature.

m The temperature corresponding to a particular wavelength of

maximum emissive power.

m The total emissive power for all wavelengths at a particular

temperature.

m The emissive powerat a particular wavelength and temperature.

A max

Black body

monochromatic

emissive power

1 2 3 4 5 6 7 8

Wavelength, #m

72 4: Black Body Thermal Radiation

Page 77: HP-42S Mechanical Engineering - hpcalc.org

AmaxT =C3

Eb(O ) = O"I‘4

2nc 1

Epx=——p7X (T - 1)

Variables Used.

In Equations Description in Program

Amax Wavelength of maximum emissivity Min microns.

T Absolute temperature in °R or K. T

Epo -y Total emissive power in Btu/hr-ft? or Ewatts/m?.

E,, Emissive powerat A in Btu/hr-ft2-um For watts/m?-um.

Remarks.

m This program usesflag 00 to determine which set of units to use forthe following constants:

(Flag 00 Clear)S1 Units English Units

(Flag 00 Set)

cy |5.9544x 1078 W-m?

¢, 1.4388 % 10% um-K

cs 2.8978 x 10° um-K

o |5.6697 x 1078 W/m?-K? 1.8887982 x 107 Btu-um*/hr-ft

2.58984 x 10* um-°R

5.216 x 10° um-°R

1.713 x 107 Btu/hr-ft>-°R* ® This program uses flags 21 and 55 to control printer output.

4: Black Body Thermal Radiation 73

Page 78: HP-42S Mechanical Engineering - hpcalc.org

Program Instructions.

1. Key the “BBODY” program (listed on page 76) into yourcalculator.

2. Clear flag 00 to select SI units (l[FLAGS] CF 00) or set flag00 to select English units (l[FLAGS] = SF 00).

3. Press EEODRYto execute the program.

4. Use the variable menu to store each of the known values (key in thevalue and then press the corresponding menu key). Then calculatethe desired unknown by pressing its menu key. Be sure to use valueswith consistent units.

To Calculate You Must Provide

w T

T w

E T

P WandT

Example. If sunlight has a maximum wavelength of 0.550 xm, what isthe sun’s temperature in K? Assumethe sun is a black body. Whatis thetotal emissive power and the emissive power at A,,,? What is the emissivepower at A = 0.400 pm (ultraviolet limit) and 0.700 ym (infrared limit)?(Clearflag 00 for SI units.)

x: B. 0008L7epr||

55 H W=0, 5560[TONOIS

74 4: Black Body Thermal Radiation

Page 79: HP-42S Mechanical Engineering - hpcalc.org

T T=5,268.7273TNOOI

The sun’s temperature is 5,269K.

E=43, 698,091, 4860(W7€P||

Thetotal emissive power is approximately 43,690,000 W/m?.

B P=5.2229e-8L7EP||

The power at 0.550 pm is 5.2229 x 108 W/m?-um.

4 W W=0.46800TITT

Y F=3.9649E-8TII

The power at 0.400 pm is 3.9649 x 10~8 W/m?-um.

T W=8. 7000ATAOR

B F=4,5934E-5TOTTNN

The power at 0.700 um is 4.5934 x 10~8 W/m?-um.

“BBODY”’ Program Listing. This program uses a variable menu forinput. When you select a variable that you wantto calculate, the programuses the character number (ASCII value) ofthe variable nameto causethe program to branch to the appropriate subroutine (lines 13 through15). For example, when you press to calculate T, the programbranches to LBL 84 because the character number of “T”is 84.

4: Black Body Thermal Radiation 75

Page 80: HP-42S Mechanical Engineering - hpcalc.org

Program:

.,.2 - L

$ao

00e

3 2 LEL “EEODY"MYAR WYMYAR “TMYAR "E"MYAR PCF 21F57 55SF 21

TTo

To5

0oo

=)T

Lf

XN,

i,bb

1T

L0

LEL ©&

WARMEHU "EBEODY™

LA

i1z STOF

12 ATOR

14 ==H7

15 wE@ IHD S

1e GTO B0

ol-]

LELHER @1ROL+ "T"STO "WII.II I El-'«! I l-'-l "

RTH

-- o0

5ooo]

TS 12,8

Wee

M -[l

fol

a0e

v00LEL &4

SER 81

RL+ "L& STD "T"

||I.IIEH IITII

FTH

Frl

Lk

tN

¢

[P

:

==

2% LEL &9G RCL T

i ZEZ-Bute Fraom O

Comments:

Declares the menu variables and setsor clears flag 21 to match flag 55.

Displays the variable menu andstops. Pressing redisplays themenu. If a menu key is pressed tocalculate an unknown, the character

code of the variable nameis used tobranch to the appropriate routine.

Calculates W.

Calculates T.

Calculates E. Flag 00 is tested todetermine which value to use for the

constant, o.

76 4: Black Body Thermal Radiation

Page 81: HP-42S Mechanical Engineering - hpcalc.org

-o o

n

ST“E®H

o "-’IIEH IIEII

oo

bB

choan

dn

0e

03

[0eT300

no

TL

Cnoon

eT

Oe

LNe

033o

Sol00—T

TT

ooF

oL0

=]

=g=g=

Fid

FTH

5295, 4RCL+ WYROL: THEti1

RCL "k5

i

STO P

I..,I I EL.J n F: 1

FETH

[} |

-=

w> ol

eyO

e

Calculates P. Flag 00 is tested toenter the appropriate values for theconstants ¢, and c,.

Tests flag 00 and enters theappropriate value for the constant c .

4: Black Body Thermal Radiation

Page 82: HP-42S Mechanical Engineering - hpcalc.org

Fluid Dynamics

78 5: Fluid Dynamics

Page 83: HP-42S Mechanical Engineering - hpcalc.org

Conduit Flow

This program solves foreither the average velocity or the pressure dropfor viscous, incompressible flow in conduits.

K5)For laminar flow (Re < 2300)

f =16/Re

Forturbulentflow (Re >2300)

;- 0.0772 :69 . Y

8 pe * [ 3.713]

I# Results calculated when 2300 < Re < 4000 aremeaningless. To determine if results are valid, examine the

Note calculated Reynolds numberafter the calculation (step 5inthe program instructions).

5: Conduit Flow 79

Page 84: HP-42S Mechanical Engineering - hpcalc.org

Variables Used.

In Equations Description in Program

Vv Average velocity. W

AP Pressure drop. F

L Conduit length. L

D Conduit diameter. If the conduit [:-is not circular, use anequivalent diameter defined by:

D,, = 4x Cross Section.al Area

Wetted Perimeter

€ Surface irregularity. E

Re Reynolds number; Re = DV/v. F

v Fluid kinematic viscosity. B

Fluid density. 5

f Fanning friction factor.* F

Kr Sum of fitting coefficients. K

*The Fanning friction factor is one-forth the Dareyfriction factor. Thatis, f = fp + 4.

80 5: Conduit Flow

Page 85: HP-42S Mechanical Engineering - hpcalc.org

Fitting Coefficients

Fitting K

Globe valve, wide open 75t0 10

Angle valve, wide open 3.8

Gate valve, wide open 0.15100.19

Gate valve, 3/4 open 0.85

Gate valve, 1/, open 44

Gate valve, 1/4 open 20

90° elbow 04to 0.9

Standard 45° elbow 0.35t00.42

Tee, through side outlet 1.5

Tee, straight through 0.4

180° bend 1.6

Entrance to circular pipe 0.25 10 0.50

Sudden expansion

Accelerationfrom V' = 0t0V = V.yunce (1 -Aup/Adn )2*

1.0 *A 4p is the upstream area andA, is the downstream area.

5: Conduit Flow 81

Page 86: HP-42S Mechanical Engineering - hpcalc.org

Surface Irregularities

Material e (Feet) e (Meters)

Drawn or smooth tubing 5.0x107¢ 1.5x 107

Commercial steel or wrought iron 1.5x 1074 46x107°Asphalted cast iron 40x10°* 1.2x107*

Galvanized iron 50x107* 1.5x1074

Cast iron 83x107* 25x1074

Wood stave 6.0x107%to [1.8x107* to3.0x1073 9.1x1074

Concrete 1.0x1073to |[3.0x107*to1.0x1072 3.0x1073

Riveted steel 3.0x103to |9.1x107*to3.0x 1072 9.1x1073

Program Instructions.

1. Key the “FLOW?”program (listed on page 84) into your calculator.

2. Press [SOLVER] FLiill to select the program.

3. Use the variable menuto store the known values. Key in each valueand then press the corresponding menu key. Since there are morethan six variables, use the [¥] and [&] keys to display the alternaterows of the variable menu.

4. Solve for the unknown value by pressing the corresponding menukey.

5. View the Reynolds number by pressing [J[PGM.FCN] YIEN

R [ENTER]. If the Reynolds number is greater than 2300 andless than 4000, the results calculated are meaningless.

6. Optional: To view the Fanning friction factor, press ll[PGM.FCN“1EH (ENTER] F [ENTER).

82 5: Conduit Flow

Page 87: HP-42S Mechanical Engineering - hpcalc.org

Example. A 60-meter pipe has three 180° bends (Ky = 3 x 1.6). Thefluid is water (v = 9.3 x 107" m?/s, p = 1000 kg/m>). The pipe diameteris0.030 m and the surface roughness is 3 x 10~* m. If the average velocity is3.20 m/s, what is the pressure drop in Pascals? Whatis the Reynoldsnumber? What is the Fanning friction factor?

M(SOLVER

3E 4[4

.03 b

3.2 5

93 [E 7 [*A]

60 L

3[ENTER]16([x] E

B3

FLTH

E

g

E=8.08003E&v&tK

D=0.08380€ov&LK]

V=3. 2000ITU

B=9. 3PPDE-7ITT

L=66.8000Le 1o [v |& |L [K |

K=4.8000LE 1o |v |E |t |K |

S=1, BBB. BBBOsp1[1|

5: Conduit Flow 83

Page 88: HP-42S Mechanical Engineering - hpcalc.org

F P=418,351.25598[¢1p1111

Check the Reynolds number and the Fanning friction factor.

BPGMFCN] Y I1EH [ENTER] R [ENTER] [R=183,225.8865Ls1¢I11[|

BPGMFCN] 'IE{l (ENTER] F (ENTER] [F=8.B896(s1e[|§1|

“FLOW” Program Listing.

#E L 128-Bute Fram 2 LoG

B1 LEL "FLOW" 9 OEEK]MYAR ME"

YRR MDYYRRMYAR BMYAR MLMYAR KMYAR "5MYAR "RRCL “E"FCL+ "0

o0[

1]

T-

. 2%y)G

LEL &g

STO “FM

RCL= LT

RECL+ "D

ECL "E"

4

eL0

eeTR

150N

-o0

O)

O

eoW

o=)

12 z.7

LM+

ofo

D0

D0

D00

D0D

00

D0

D0

0k

ek

[aa

Il

1.1118 figt 33 RCL "W

— S]

[

[ on

[yT

-", F: I::L 11 I."I I

17 RCLxo ROL+

It [:l 1

t E: "

1% 570 "R

2z GTO @122 Fe

24 1%25 A.9

2627+

84 5: Conduit Flow

44 w2

4& RCL O"PM

47 RECL+ "35¢

48 -

ETH

LEL &1

16

RCL= “R"GTO 80

EHD

onof

Roen

Oe5D

n T

Page 89: HP-42S Mechanical Engineering - hpcalc.org

Flow With a Free Surface

This Solver program allows you to solve for any of the five variables in theManning flow formula, provided the other four are known.

om0y2.2082r*3 x g2

Variables Used.

In Equation Description in Program

S Slope of the bottom (dimensionless). S

n Roughness coefficient. ri

r Hydraulic radius (in feet). r

Q Discharge flow rate (in ft3/sec). 5]

a Cross-sectional area (in ft?). a Program Instructions.

1. Key the “MANN” program (listed on page 87) into your calculator.

2. Press M(SOLVER] MAHHH to select the Manning flow formula

Solver program.

3. Use the variable menu to store the known values. Key in each valueand then press the corresponding menu key.

4. Solve for the unknown value by pressing the corresponding menukey.

Example. Find Q for S = 0.001,n = 0.013,R = 5/12ft,and4 = 5.0

fe2,

B(SOLVER] FfiAHH

5: Flow With a Free Surface 85

Page 90: HP-42S Mechanical Engineering - hpcalc.org

.001 S=0.08811>|M[R[o|&]|

013 H n=0.0130L¢|N[R|&]w]|

5 126R =0, 4167IIIIO

5 H a=5. 8000IOTTR

e 0=10.0826ITION

86 5: Flow With a Free Surface

Page 91: HP-42S Mechanical Engineering - hpcalc.org

“MANN”’ Program Listing.

. - b L S¥-Bute Praom iz RCL """

LEL "MAMHH" 12 4

MYRRE "5V 14 EMNTER

MMAR ' is 2

MYARRE "t 16 +

MYAR "R 17 Y4x

S MWAR "at 12 =+

RCL "n" 1% RCL "a"

RCL= "M 28 A

TTT

Mo%

LP

00oe

TDD) T

I 5 -t

Il

e P50WD™)

I+T T = [Xx]

Fel

kY

m - = P

5: Flow With a Free Surface 87

Page 92: HP-42S Mechanical Engineering - hpcalc.org

Unit Conversions

88 6: Unit Conversions

Page 93: HP-42S Mechanical Engineering - hpcalc.org

Introduction

This chapter contains three programs for converting values from onesystem of units to another: “LENGTH,” “FORCE,” and “TEMP.”Instructions for writing your own unit conversion programs and theconversion factors for 120 units of measure are also included.

Variable Used. UNIT contains the current value expressed in the base

units.

Remarks.

m The following “Program Instructions” can be used with any of the

programs in this chapter.

m The program tests flag 22 to determine when a number has been

keyed in.

m Flags 21 and 55 are used to control printer output.

Program Instructions.

1. Key the appropriate program into your calculator. There are threesample programslisted in this chapter: “LENGTH” (page 91),“FORCE” (page 93), and “TEMP”(page 95).

2. Press followed by the menu key corresponding to theprogram (such as FORCE).

3. Key in the value you want to convert and then press the menu key

corresponding to the old units.

4. Press the menu key corresponding to the new units. The new valueis displayed. Repeatthis step for as manydifferent units as you wish.

5. To perform another conversion, go to step 3. Press [EXIT] to quit.

Example 1: Length Conversions. How many inches are in onekilometer? (Key the “LENGTH” program into yourcalculator.)

LEHG % 0. 0000RIATOIT

6: Unit Conversions 89

Page 94: HP-42S Mechanical Engineering - hpcalc.org

1 KN 1.86008 kmLot[M[Hed]N]FT|I

N 39,378.0787 inotHOJEMINFTK

Whatis the same distance in feet?

FT 3,280.8399 4%IRNGEN

Now convert six miles to meters.

6 HI 6. 8600 miITITGT

N 9, 656.0640 mNNTGG

EXIT

Example 2: Force Conversions. Convert a 135 pound force toNewtons. (Key the “FORCE” program into your calculator.)

FORCE |x: 9,656.0640 |LGFkPN[LeFJpPoL|

135 LEE 135.6008 1bf[GF [kIP |NJLeFJPOL]|

S H 600. 5899 NIATTAT

EXIT

90 6: Unit Conversions

Page 95: HP-42S Mechanical Engineering - hpcalc.org

“LENGTH” Program Listing. This program performs unitconversions using centimeters, meters, kilometers, inches, feet, and miles.

The base unit is the meter.

Program: Comments:

A L 122-Bute Fram

61 LBL “LEMGTH" Sets orclearsflag 21 to match flagB2 CF 21 55.

B3 FS7? 55

B4 SF 21

A5 CLMEHL Defines the unit menu. The value in@5 5TO “UMIT® the X-register is temporarily saved ina7 the variable UNIT.B3 K g1

63 KEQ

18 KEY 2 REQ 82

11 HEGR &3

12 KEY 2 HER 83

12 =ERQ 84

14 KEY 4 HE@ 64

13 HEQ 85

16 EEY 5 HEQ 835

17 HEQ @S

12 KEY & RER 88

13 KEEY 2 GTO @39

28 ECL “UMIT™

21 5F 22

2z LEL A Displays the menu and stops.MEHLSTOF

25 FCPC 22 If flag 22 is not set (no data entry),26 GTO ao converts the value into new units.

29

o8

6: Unit Conversions 91

Page 96: HP-42S Mechanical Engineering - hpcalc.org

oDDTe

LB

0Dy

D00

Ol

n

o oou

OO

oonodn

oL

oCRoCnon

e0F

00[

nTT

LN

o03POo0

00)

II

on

I

92

RCLx= "UHIT"

HZTO ST L

CLA

ARCL}_ I 1

ARCL ¢

AYIEL

GTO A

T ¥o

TL

LEL &1

"

[, 81

ETH

LEL &2Tt

1

ETH

LEL &z

"k

1R8E

ETH

LEL a4

LEL &9

EHD

6: Unit Conversions

Displays the new value and the unitstring.

Subroutines for each menu key.Each routine enters a string into theAlpha register and a conversionfactor into the X-register.

Ends the program (when ispressed).

Page 97: HP-42S Mechanical Engineering - hpcalc.org

“FORCE” Program Listing. This program performs unit conversionsusing gram-force, kilopound-force, Newtons, pound-force, and poundals.The base unit is the Newton.

Program: Comments:

BE L 193-Bute Fram

a1 LEL "FORCE® Sets orclearsflag 21 to match flagHZ CF 21 55.

Bz FSY 55

B4 BF 21

A5 CLMEMU Defines the unit menu. The value in@5 STO “UMIT® the X-register is temporarily saved ina7y HER 1 the variable UNIT.o2 KEY 1 =EQ 81

B3 WES Az

18 KEY 2 =ER B2

11 WED &

12 KEY 2 HE® @3

o omER 84

14 KEY 4 =EQ B4

15 wER 8%

1 KEY 5 HER A5

¥ OEEY 9 GTO 8%

13 RCL “"UHIT

19 5F 22

@ LEL A Displays the menu and stops.21 MEMU

2 STOP

= FC?C 22 If flag 22 is not set (no data entry),4 GTO 88 converts the value into new units.

STO "UHIT®

R »

2 LASTH

23 LEL 88 Displays the new value and the unitSR 1w string,

6: Unit Conversions 93

Page 98: HP-42S Mechanical Engineering - hpcalc.org

1 RCLx "HHIT®

23 CLA

24 ARCL ST &

25 k"o28 ARCL ST L

27 RAVIEN

22 GTO H

% LBL &1 Subroutines for each menu key.48 "af" Each routine entersa string into the41 F.2EEESE-Z Alpha register and a conversion42 ETH factor into the X-register.43 LBL B2

44 "kip"

45 4442, 22151528

48 BTH

47 LEL 82

43 "HY

49 1

S8 RTH

31 LEL P4

52 "lbe"

53 4,.44822151525

54 ETH

55 LEL 85

SE “pdl”57 B. 13825495438

=2 FETH

S9 LEL @2 Ends the program (when is&8 EMD pressed).

“TEMP” Program Listing. Conversions between the fourtemperature scales (Kelvin, °Celcius, °Fahrenheit, and °Rankine) involveadditive constants as well as multiplicative factors. Without these additiveconstants (on lines 47, 52, 57, and 62), only relative conversions would be

possible. Therefore, the “TEMP” program takes on a slightly differentform than the programslisted earlier.

94 6: Unit Conversions

Page 99: HP-42S Mechanical Engineering - hpcalc.org

.é To key in lines 46 and 47 of the following program, press1 [¢] 0. Use the same technique (pressing

Note and [¢] after the first number and before the second) to keyin lines 51 and 52, 56 and 57, and 61 and 62.

Program: Comments:

196-Bute Prom 3

LEL “TEMF" Sets or clearsflag 21 to match flagCF 21 55.

Fa® 55

SF 21

g 15

12

£o0[oT

[}

=l

o CLMEHLU Defines the unit menu. The value in

S OETO CUHITH the X-register is temporarily saved inWER the variable UNIT.

EEY

AEL

EEY

AED

2 EEY 2

HEL

EEY sEG B4

EEY GTO QA3

S RCL "UHIT!

7 SF 22

.._i T

=

[}e

HED @1

ote

[\™ L

WLTg

MER @z

e= 2]

=[

LA

-

oo0

BA

—_fa HER B3

-.

&Ns

e0

0 L

ot

S LEL A Displays the menu and stops.MEHLSTOFM

y=Vo

Tg)

21 STO e If flag 22 is not set (no data entry),z: converts the value into new units.

6: Unit Conversions 95

Page 100: HP-42S Mechanical Engineering - hpcalc.org

> Fx +

STO+ “UHIT®R

COEL)OT

w0

a1=

1.3RCL "UNIT®

II+II

S00

o

Vo=A [}

r-

RAREYA

TI

=A £=

bexd

._i

AECL ST L

Y IEL

GTO A

faoooO

g}

DMg

o=o0

N

LEL &1nao F: t

TNb

T

P

eoPooe

Taoo

000

=g

~A

mTy [x

]I

D]

Ja

03Mo~oD

Ol

oLnon

DM

-aM-

=}

cooou.

4

LEL &4

n r L]

il Ln n LN N .1 1 1 A n [

oo

on

Sown

0o

=]

TL

o

96 6: Unit Conversions

Displays the new value and the unitstring,

Subroutines for each menu key.Each routine entersa string into theAlpharegister, a conversion factorinto the Y-register, and an additiveconstant into the X-register.

Ends the program (when ispressed).

Page 101: HP-42S Mechanical Engineering - hpcalc.org

Writing Your Own Unit Conversion Programs

If the sample programsin this chapter do not contain the units that youwork with regularly, you may want to write your own unit conversionprograms.

1. Using thetable at the end ofthis chapter (or from other referencematerial), select up to six units of measure.

2. Using the conversion program thatfollows,fill in the blank lines asfollows:

a. Line 01 should be a globallabel that indicates the type ofunits included (such as LEL "MASS" or LEL "TIME").

b. The two lines immediately following each label, LEL @1(line 41) through LEL &¢ (line 61), should include the unitname and the conversion factor.

Each conversion factor you use should be expressed inrelation to the same base unit. (For example,in the“LENGTH” program above, the base unitis the meter.)

€. Optional: If you assign your unit conversion programsto thecustom menu, you can make them appear to be submenus ofCUSTOM by inserting SF 27 after LEL @9,

6: Writing Your Own Unit Conversion Programs 97

Page 102: HP-42S Mechanical Engineering - hpcalc.org

The Blank Conversion Program.

II onnn~-Buate Pram b A=TO =T L

a

@1 LEL "program name here" S CLA

@z CF 21 & ARCL ST W

Bz F37 55 il i

84 SF 21 @ ARCL ST L

85 CLMEHU 3 AVIEW

BE STO "UMIT B GTO A

Ay HER B1 LEL &1

— [x] EEY

HEQ

EEY

=ER

12 KEY

o wER

14 KEY

o aElR

18 KEY

17 HEL

2 OREEY & X

12 KEY S

28 RCL "UMIT®

HER B1 "unit name here"

conversion factor here

RTHLEL B2"unit name here"

conversion factor here

FTHLEL &%"unit name here"

conversion factor here

RETHLEL &4“"unit name here"

I

I%

oowDs)

AER Bz

oMo

.s5

et

n

HER @3

T3)

o

¥

~E& B4

Lo

0OJa

Ti_

n

m Jo)

oL

e0NeoeeebooBo

00

Q00

00

D00

00

oo — = (o]

nLo

Q0

POo

CaonD

00)

in

35 conversion factor here

SE HTH57 LEL 85S5 "unit name here"

conversion factor hereFTH

LEL B&"unit name here"

conversion factor here

ETH

LEL 8%

EME

0 oL

D=]

DAY

TuT

A =

o(T

L00e

S R

86 LAS

LEL && &5

1%RCL= "LHIT"

o1

e0

0OL9

£[o=

Tw0

98 6: Writing Your Own Unit Conversion Programs

Page 103: HP-42S Mechanical Engineering - hpcalc.org

Dimensionless Units of Angle

Plane and solid angles are called dimensionless because they involve nophysical dimensions. The following table relates these dimensionless unitsto their actual values.

Dimensionless

Unit Abbreviation Value

Arcmin arcmin 1 it ciunit circle21600

Arcsec arcs 1 it ci——— unit circle1296000

Degree ° 1 unit circle360

Grade grad L unit circle400

Radian r 1 unit circle2

Steradian sr i unit sphere

6: Dimensionless Units of Angle

Page 104: HP-42S Mechanical Engineering - hpcalc.org

Conversion Factors

The conversion factorsin the following table are based on theInternational System of Units (SI).

If you use a unit that is not in the table, be sure that the conversion factorcorrectly relates the unit to the base unit for your program.

Unit Full Name Description Value

a Are Area 100 m?

A Ampere Electric current 1A

acre Acre Area 404687260987 m*

arcmin Minute of arc Plane angle 4.62962962963E -5

arcs Second of arc Plane angle 7.71604938272E-7

atm Atmosphere Pressure 101325 N/m?

au Astronomical unit Length 149597900000 m

A° Angstrom Length 0.0000000001 m

b Barn Area 1.E-28m?

bar Bar Pressure 100000 N/m2

bbl Barrel, oil Volume 0.158987294928 m’

Bq Becquerel Activity 11/s

Btu International Table Energy 1055.05585262 Kg-mz/s2Btu

bu Bushel Volume 0.03523907 m’

c Speed of light Velocity 299792458 m/s

C Coulomb Electric charge 1A-s

cal International Table Energy 4.1868 Kg-m2/s2calorie

cd Candela Luminous intensity 1cd

chain Chain Length 20.1168402337 m

100 6: Conversion Factors

Page 105: HP-42S Mechanical Engineering - hpcalc.org

Unit Full Name Description Value

Ci Curie Activity 3.7E101/s

ct Carat Mass 0.0002 Kg

cu US cup Volume 2.365882365E -4 m°

d Day Time 86400 s

dyn Dyne Force 0.00001 Kg-m/:?.2

erg Erg Energy 0.0000001 Kg-mz/s2

eV Electron volt Energy 1.60219E - 19 Kg-m?/s?

F Farad Capacitance 1 A2-s4/Kg-rn2

tath Fathom Length 1.82880365761 m

fom Board foot Volume 0.002359737216 m’

fe Footcandle Luminance 0.856564774909

Fdy Faraday Electric charge 96487 A-s

fermi Fermi Length 1.E-15m

flam Footlambert Luminance 3.42625909964 cd/m?

ft International foot Length 0.3048 m

ftUS Survey foot Length 0.304800609601 m

g Gram Mass 0.001 Kg

ga Standard freefall Acceleration 9.80665 m/s2

gal US gallon Volume 0.003785411784 m®

galC Canadian gallon Volume 0.00454609 m®

galUK UK gallon Volume 0.004546092 m>

of Gram-force Force 0.00980665 Kg-m/s2

grad Grade Plane angle 0.0025

grain Grain Mass 0.00006479831 Kg

Gy Gray Absorbed dose 1 mz/s2

h Hour Time 3600 s

H Henry Inductance 1 Kg-mz/Az-s2

6: Conversion Factors 101

Page 106: HP-42S Mechanical Engineering - hpcalc.org

Unit Full Name Description Value

hp Horsepower Power 745.699871582 Kg-m2/s3

Hz Hertz Frequency t1/s

in Inch Length 0.0254 m

inHg Inches of mercury Pressure 3386.38815789 N/m2

inH20 Inches of water Pressure 248.84 N/m?

J Joule Energy 1 Kg-mz/s2

kip Kilopound-force Force 4448.22161526 Kg-m/s?

knot Knot Speed 0.514444444444 m/s

kph Kilometer per hour Speed 0.277777777778 m/s

| Liter Volume 0.001 m*

lam Lambert Luminance 3183.09886184 cd/m2

Ib Avoirdupois pound Mass 0.45359237 Kg

Ibf Pound-force Force 4.44822161526 Kg-m/s?

Ibt Troy Ib Mass 0.3732417 Kg

Im Lurmen Luminance flux 7.95774715459E-2 cd

Ix Lux lluminance 7.95774715459E -2 cd/m?

lyr Light year Length 9.46052840488E15 m

m Meter Length im

mho Mho Electric 1 A2-s3/Kg-m2conductance

mi International mile Length 1609.344 m

mil Mil Length 0.0000254 m

min Minute Time 60s

miUS US statute mile Length 1609.34721869 m

mmHg Millimeter of Pressure 133.322368421 N/m2mercury

mol Mole Amount of 1 mol

substance

mph Miles per hour Speed 0.44704 m/s

102 6: Conversion Factors

Page 107: HP-42S Mechanical Engineering - hpcalc.org

Unit Full Name Description Value

N Newton Force 1 Kg-m/2

nmi Nautical mile Length 1852 m

ohm Ohm Electric resistance 1 Kg-rnz/Az-s3

oz Ounce Mass 0.028349523125 Kg

ozfl US fluid oz Volume 2.95735295625E-5 m>

ozt Troy oz Mass 0.031103475 Kg

0zUK UK fluid oz Volume 0.000028413075 m*

P Poise Dynamic viscosity 0.1 N/m

Pa Pascal Pressure 1 N/m2

pc Parsec Length 3.08567818585E16 m

pdi Poundal Force 0.138254954376 Kg-m/‘.-‘»2

ph Phot Luminance 795.774715459 cd/m?

pk Peck Volume 0.0088097675 m>

psi Pounds per square Pressure 6894.75729317 N/m2

inch

pt Pint Volume 0.000473176473 m>

qt Quart Volume 0.000946352946 m®

r Radian Plane angle 0.159154943092

R Roentgen Radiation exposure 0.000258 A-s/Kg

rad Rad Absorbed dose 0.01 m?/s?

rd Rod Length 5.02921005842 m

rem Rem Dose equivalent 0.01 mz/s2

s Second Time 1s

S Siemens Electric 1A23/Kg-m2conductance

sb Stilb Luminance 10000 cd/m?

slug Slug Mass 14.5939029372 Kg

sr Steradian Solid angle 7.95774715459E -2

6: Conversion Factors 103

Page 108: HP-42S Mechanical Engineering - hpcalc.org

Unit Full Name Description Value

st Stere Volume 1m?

St Stokes Kinematic viscosity 0.0001 m2/s

Sv Sievert Dose equivalent 1 mz/s.2

t Metric ton Mass 1000 Kg

T Tesla Magnetic flux 1 Kg/A-s2

tbsp Tablespoon Volume 1.47867647813E-5 m>

therm EEC therm Energy 105506000 Kg-r'r'rz/s2

ton Short ton Mass 907.18474 Kg

tonUK Long ton Mass 1016.0469088 Kg

torr Torr Pressure 133.322368421 N/m?

tsp Teaspoon Volume 4.92892159375E-6 m°

u Unified atomic mass Mass 1.66057E-27 Kg

Vv Volt Electric potential 1 Kg-mz/A-s3

w Watt Power 1 Kg-m2/s3

Wb Weber Magnetic flux 1 Kg-mZ/A-ta2

yd International yard Length 09144 m

yr Year Time 31556925.9747 s

° Degree Angle 2.77777777778E-3

°C Degree Celsius Temperature 1 K*

°F Degree Fahrenheit Temperature 0.555555555556 K*

K Degree Kelvin Temperature 1 K*

°R Degree Rankine Temperature 0.555555555556 K*

@ Micron Length 0.000001 m

*Refer to the “TEMP" program listing starting on page 94.

104 6: Conversion Factors

Page 109: HP-42S Mechanical Engineering - hpcalc.org
Page 110: HP-42S Mechanical Engineering - hpcalc.org

Step-by-Step Solutions for Your

HP-42S Calculator

Mechanical Engineering contains a variety of programs and examples toprovide solutions for mechanical engineers and engineering students.

m Forces and Vectors

Vectors in the HP-42S o Static Equilibrium at a Point

® Equations of Motion

w Analysis Programs

Mohr Circle Analysis » Soderberg’s Equation for Fatigue ¢ CompositeSection Properties o Spring Constant e Linear or AngularDeformation

® Thermodynamics

Equations of State Black Body Thermal Radiation

u Fluid Dynamics

Conduit Flow e Flow With a Free Surface

= Unit Conversions

Writing Your Own Unit Conversion Programs e Dimensionless Unitsof Angle e Conversion Factors

HEWLETT

(D PACKARD \

Reorder Number

00042-90022 :

00042-90024 English

0""88698"00038"" o0Printed in Canada 10/88