E-Code

Principal stresses in 3D, step by step — a TI-89 Titanium program

By E-Code · updated

PRINSTR is a TI-89 BASIC program for the TI-89 Titanium. A full 3D stress state (three normal and three shear stresses). Step by step: the stress tensor, the invariants I1, I2, I3, the characteristic cubic built and solved by the CAS, the three principal stresses in order, the check against I1, the maximum shear stress and the von Mises stress.

What it asks for and what it shows

It asks for 6 values at its prompts. In the example below it shows I1=σx+σy+σz, -τxy²-τyz²-τzx², I3=det(σ), σ1 MPa, σ2 MPa, σ3 MPa, τmax MPa, σvm MPa, 1 STRESS TENSOR (MPa), 3 CHARACTERISTIC EQ, 4 ROOTS (CAS zeros), 6 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 150
Input 2-20
Input 310
Input 430
Input 5-10
Input 620
The screen shows
I1=σx+σy+σz=40
-τxy²-τyz²-τzx²=-2100
I3=det(σ)=-28000
σ1 MPa=65.52685208
σ2 MPa=11.5308281
σ3 MPa=-37.05768018
τmax MPa=51.29226613
σvm MPa=88.88194417
Text1 STRESS TENSOR (MPa)
Text3 CHARACTERISTIC EQ
Text4 ROOTS (CAS zeros)
Text6 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 56 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