/TITLE, Your name, ME 421, and date here, truss1.a ! 3 nodes, 2 materials and area /PREP7 ! preprocessor section pi = (4*atan(1)) dtor = pi/180 ! convert degrees to radians force = 10e3 ! applied force fang = ((180+30)*dtor) ! angle of force px = (force*cos(fang)) py = (force*sin(fang)) ET,Link1,1 ! Type 1 is a spar R,1,2.0 ! area for steel R,2,1.5 ! area for aluminum MP,EX,1,29e6 ! Young-s modulus, material 1 MP,EX,2,11e6 ! Young-s modulus, aluminum N,1,0,0 ! Node 1 at (0,0) N,2,(4*12),0 ! Node 2 at (48,0) N,3,0,(4*12) ! Node 3 at (0,48) /pnum,node,1 TYPE,1 ! Spar REAL,1 ! steel area MAT,1 ! steel E E,1,2 ! elem 1, node 1-2 REAL,2 ! aluminum area MAT,2 ! aluminum E E,2,3 ! elem 2, node 2-3 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 ! constrain node 1 in x direction D,1,UY,0 ! constrain node 1 in y direction D,3,UX,0,,,,UY ! constrain node 1 in x, y direction F,2,FX,px ! x force at node 2 F,2,FY,py ! y force at node 2 solve /PBC,ALL,1 eplot ! element plot 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 ! NODE UX UY ! 1 0. 0. ! 2 -0.113050E-01 -0.524458E-01 ! 3 0. 0. ! NODE FX FY ! 1 13660.3 0. ! 3 -5000.00 5000.00 ! ELEM STR ! 1 -6830.1 ! 2 4714.0