HP Forums
(35s) Moment of Inertia, n rectangular elements - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (35s) Moment of Inertia, n rectangular elements (/thread-21767.html)



(35s) Moment of Inertia, n rectangular elements - Jazmond - 05-19-2024 05:57 PM

Hello all, I'm an engineering student who has been benefiting greatly from the community and wanted to share my life-saving/time-saving program which takes n rectangular elements, their width and heights, and the centroidal distances to the composite centroid, the second area moment of inertia, and the total area.

(I001) LBL I
CLVARS
CLE
XEQ I046
INPUT N
RCL N
STO S
INPUT B
INPUT H
INPUT Y
XEQ I018
DSE S
GOTO I008
XEQ I034
RCL C
RCL T
RTN
RCL B
RCLx H
STO (I)
RCL Y
STO (J)
E+
RCL H
3
y^x
RCLx B
12
/
STO+ T
XEQ I051
RTN
xW ///DD??
STO C
XEQ I046
RCL (J)
RCL- C
x^2
RCLx (I)
STO+ T
XEQ I051
DSE N
GOTO I037
RTN
10
STO I
20
STO J
RTN
1
STO+ I
STO+ J
RTN

This stores the total moment of inertia under T, the area under A, and the centroid under C. The program ends by printing
Y: Centroid
X: Mom. of Inertia