/TITLE, Your name and date here, trussk.a ! Displacement and stress for a K truss ! Optimize all elements to same stress ! For original area, FOM = 4.00, wt = 167.307 /COLOR,PBAK,off ! black background /PREP7 ! preprocessor section ET,1,Link1 ! type 1 is a spar R,1,3.0 ! area for material 1 MP,EX,1,30e6 ! 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,10,15.4 ! upper-left node N,7,20,15.4 ! upper-left center node N,8,30,15.4 ! upper-right center node N,9,10,(15.4/2) ! left-center node N,10,30,(15.4/2) ! right-center node /pnum,node,1 TYPE,1 ! element type 3 (beam) MAT,1 ! material property MP 1 (steel) REAL,1 ! original area ! bottom elements E,1,2 ! bottom left element 1 E,4,5 ! bottom right element 2 E,2,3 ! bottom left-center element 3 E,3,4 ! bottom right-center element 4 ! left, top, and right elements E,1,6 ! left 5 E,8,5 ! right 6 E,6,7 ! top-left 7 E,7,8 ! top-right 8 ! inner elements E,2,9 ! lower-left pair 9 E,4,10 ! E,9,6 ! lower-right pair 11 E,10,8 ! E,9,3 ! lower diagoal 13 E,3,10 E,9,7 ! upper diagoal 15 E,7,10 E,3,7 ! center vertical 17 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,-25e3 ! apply 3 loads F,3,FY,-25e3 F,4,FY,-25e3 ! /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 167.307 ! NODE UX UY ! 1 0. 0. ! 2 0.271070E-02 -0.215307E-01 ! 3 0.542140E-02 -0.228198E-01 ! 4 0.813210E-02 -0.215307E-01 ! 5 0.108428E-01 0. ! 6 0.813210E-02 -0.161778E-01 ! 7 0.542140E-02 -0.206810E-01 ! 8 0.271070E-02 -0.161778E-01 ! 9 0.624487E-02 -0.193908E-01 ! 10 0.459793E-02 -0.193908E-01 ! ELEM STR ! 1 8132.1 ! 2 8132.1 ! 3 8132.1 ! 4 8132.1 ! 5 -14932. ! 6 -14932. ! 7 -8132.1 ! 8 -8132.1 ! 9 8337.3 ! 10 8337.3 ! 11 12518. ! 12 12518. ! 13 3421.8 ! 14 3421.8 ! 15 -3421.8 ! 16 -3421.8 ! 17 4166.7