Forces on a Warren Truss
05-17-2015, 06:24 PM
Post: #1
 Eddie W. Shore Senior Member Posts: 1,133 Joined: Dec 2013
Forces on a Warren Truss

The following program, WTRUSS, calculates the upward forces of the truss’s pin and roller. The program allows for any number of beams (minimum of 1), however, all the beams have the same mass. The lengths between the pin, the beams, and the roller can vary.

Input:
h = height of the truss
l1, l2, l3, etc… = the lengths between each component
n = number of beams
m = mass of each beam
F = right-bound force from the truss

Output:
θ1, θ2, θ3, etc…. = angle from diagonal to peak, measured in degrees
E = upward force of the roller
B = upward force of the pin

WTRUSS works in two units sets: U.S. (feet, pounds, feet-pounds) and SI (meters, kilograms, Newtons).

Code:
EXPORT WTRUSS() BEGIN // EWS 2015-05-04 // Warren Truss LOCAL h,n,f,m,g,ch; LOCAL l,t,c,s,k,a; LOCAL m,E,B; // Degree Mode HAngle:=1; CHOOSE(ch,"Unit System", "FT-LB","KG-M"); IF ch==1 THEN g:=32.17405; END; IF ch==2 THEN g:=9.80665; END; INPUT({n,h,m,f},"Enter data", {"n=","h=","m=","f="}, {"Number of beams","Height", "Mass of beams","Force-Right"}); l:={}; FOR k FROM 1 TO n+1 DO INPUT(s,"Length "+k,"k:"); l:=CONCAT(l,{s}); END; // Calculate Angles a:=ATAN(h/(.5*l)); // Cumulative Lengths c:=cumSum(l); // Size s:=SIZE(c); t:=f*h+ΣLIST(m*g*SUB(c,1,s-1)); E:=t/c[s]; B:=n*g*m-E; MSGBOX("Force at roller: "+E); MSGBOX("Force at pin: "+B); MSGBOX("Press return for a list of angles."); RETURN a; END;

Source:
Goswami, Indranil Ph. D. P.E. “All In One Civil Engineering PE Breadth and Depth” 2nd Edition McGraw Hill: New York. 2012. eBook.

Attached File(s) Thumbnail(s)

05-17-2015, 07:06 PM
Post: #2
 akmon Member Posts: 191 Joined: Jun 2014
RE: Forces on a Warren Truss
It´s a very simple program, but this is the very first structural program for HP Prime. Congratulations, and thank you for the code. Perhaps, in a couple of years we´ll see complex programs like FEM or Vigag.
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)