/TITLE, Your name, ME 421, and date here, trusswop.a ! Displacement and stress in a Warren truss ! Optimize all elements to design stress of 16e3 lb ! For original area, FOM = 3.08, wt = 127.8 ! For optimized area, FOM = 5.13, wt = 121.9 /COLOR,PBAK,off ! black background /PREP7 ! preprocessor section p1 = -33e3 ! Load at nodes 2, 3, 4 ET,1,Link1 ! type 1 is a spar R,1,(3.0*9537/16e3) ! area for elements 1-2 R,2,(3.0*22252/16e3) ! area for elements 3-4 R,3,(3.0*19074/16e3) ! area for elements 5-8, 10-11 R,4,(3.0*25429/16e3) ! area for elements 9 R,5,(3.0*6361/16e3) ! area for elements 12-15 MP,EX,1,29e6 ! Young's modulus, steel MP,DENS,1,0.284 ! steel density, lbs/cu in ACEL,,1 ! gravity ! bottom nodes, don't change the next three lines N,1,0 ! lower-left node N,5,40 ! lower-right node FILL,1,5 ! remaining bottom nodes ! top nodes N,6,5,5*sqrt(3) ! upper-left node N,7,(1*10+5),5*sqrt(3) ! upper-left center node N,8,(2*10+5),5*sqrt(3) ! upper-right center node N,9,(3*10+5),5*sqrt(3) ! upper-right node /PNUM,node,1 TYPE,1 ! element type 3 (beam) MAT,1 ! material property MP 1 (steel) REAL,1 ! original 7227.5 ! bottom elements E,1,2 ! bottom left element 1 E,4,5 ! bottom right element 2 REAL,2 ! original 16863 E,2,3 ! bottom left-center element 3 E,3,4 ! bottom right-center element 4 REAL,3 ! original 14455 ! left, top, and right elements E,1,6 ! left 5 E,9,5 ! right 6 E,6,7 ! top-left 7 E,8,9 ! top-right 8 REAL,4 ! original 19270 E,7,8 ! top-center 9 REAL,3 ! original 14455 ! inner elements E,2,6 ! left pair 10 E,4,9 REAL,5 ! original 4820 E,2,7 ! middle pair 12 E,4,8 E,3,7 ! center pair 14 E,3,8 APLOT,all ! plot all areas /PLOPTS,INFO,OFF ! Removes entire legend column /PLOPTS,FRAME,OFF ! Removes frame FINISH ! preprocessor section /SOLUTION ! solution section antype,static ! analysis type is static outpr,basic,1 outpr,nload,1 D,1,UX,0,,,,UY ! pin at left end D,5,UY,0 ! roller at right end F,2,FY,p1 ! apply 3 loads F,3,FY,p1 F,4,FY,p1 ! /output,Mass,txt,D:\Ansys\ ! mass /output,Mass,txt,U:\win\Ansys\ ! mass solve /PBC,ALL,1 eplot FINISH ! solution section /POST1 ! post processor etable,STR,ls,1,3 pldisp,1 ! plot displacements ! /output,Displ,txt,D:\Ansys\ ! displacements /output,Displ,txt,U:\win\Ansys\ ! displacements PRNSOL,U ! show displacements ! /output,Stress,txt,D:\Ansys\ ! forces and stresses /output,Stress,txt,U:\win\Ansys\ ! forces and stresses PRRSOL ! show forces PRETAB ! stresses ! FINISH ! post processor ! TYPE MASS ! 1 121.89 ! NODE UX UY ! 1 0.0000 0.0000 ! 2 0.55170E-02 -0.31849E-01 ! 3 0.11034E-01 -0.50952E-01 ! 4 0.16550E-01 -0.31849E-01 ! 5 0.22067E-01 0.0000 ! 6 0.19308E-01 -0.17518E-01 ! 7 0.13792E-01 -0.42996E-01 ! 8 0.82753E-02 -0.42996E-01 ! 9 0.27592E-02 -0.17518E-01 ! ELEM STR ! 1 15999. ! 2 15999. ! 3 15999. ! 4 15999. ! 5 -15999. ! 6 -15999. ! 7 -15997. ! 8 -15997. ! 9 -15999. ! 10 15994. ! 11 15994. ! 12 -15997. ! 13 -15997. ! 14 15982. ! 15 15982.