Running the program, Running the program ,22-36 – HP 50g Graphing Calculator User Manual

Page 751

Advertising
background image

Page 22-36

separate variables in the calculator. These sub-programs are then linked by a
main program, that we will call MOHRCIRCL. We will first create a sub-
directory called MOHRC within the HOME directory, and move into that
directory to type the programs.

The next step is to create the main program and sub-programs within the sub-
directory.

The main program MOHRCIRCL uses the following sub-programs:

Θ INDAT: Requests input of σx, σy, τxy from user, produces a list σL =

{

σx, σy, τxy} as output.

Θ CC&r: Uses σL as input, produces σc = ½(σx+σy), r = radius of

Mohr’s circle,

φ

n = angle for principal stresses, as output.

Θ DAXES: Uses σc and r as input, determines axes ranges and draws

axes for the Mohr’s circle construct

Θ PCIRC: Uses σc, r, and

φ

n as input, draw’s Mohr’s circle by producing

a PARAMETRIC plot

Θ DDIAM: Uses σL as input, draws the segment AB (see Mohr’s circle

figure above), joining the input data points in the Mohr’s circle

Θ σLBL: Uses σL as input, places labels to identify points A and B with

labels “

σx” and “σy”.

Θ σAXS: Places the labels “σ” and “τ” in the x- and y-axes, respectively.
Θ PTTL: Places the title “Mohr’s circle” in the figure.

Running the program

If you typed the programs in the order shown above, you will have in your sub-
directory MOHRC the following variables: PTTL,

σAXS, PLPNT, σLBL, PPTS,

DDIAM. Pressing L you find also: PCIRC, DAXES, ATN2, CC&r, INDAT,
MOHRC. Before re-ordering the variables, run the program once by pressing
the soft-key labeled

@MOHRC. Use the following:

@MOHRC

Launches the main program MOHRCIRCL

25˜

Enter

σx = 25

75˜

Enter

σy = 75

50`

Enter

τxy = 50, and finish data entry.

Advertising