E-Code

Shaft diameter for bending and torsion, step by step — a TI-89 Titanium program

By E-Code · updated

SHAFTD is a TI-89 BASIC program for the TI-89 Titanium. A solid round shaft with a bending moment M and a torque T, a yield strength Sy and a safety factor n. Step by step: the bending and torsion stresses in terms of d, then the von Mises and the Tresca design equations, each solved for the diameter by the algebra system, and the diameter to use.

What it asks for and what it shows

It asks for 4 values at its prompts. In the example below it shows von Mises d mm, Tresca d mm, d mm, 2 VON MISES (CAS solve), 3 TRESCA (CAS solve), 4 ANSWER.

Example run

One of its oracle test cases. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Input 1800
Input 21200
Input 3350
Input 42.5
The screen shows
von Mises d mm=45.69606089
Tresca d mm=47.16660085
d mm=45.69606089
Text2 VON MISES (CAS solve)
Text3 TRESCA (CAS solve)
Text4 ANSWER

How it's checked

4 test cases, each checked against an independent method. Replayed key by key on a virtual TI-89 Titanium, they make 32 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-89 Titanium engineering programs · All TI-89 Titanium programs