/TITLE, Your name and date here, cylind1.a ! Axial load on cylinder ! PLANE42 is 2D, 4-node structural solid ! 2in dia on top, 2in dia on bottom, 12in high ! axial node numbering /COLOR,PBAK,off ! black background /PREP7 ! preprocessor section ET,1,PLANE42,,,1 ! axisymmetric option for = 20e3 ! force at upper end len = 12 ! length dia = 2 ! diameter pi = 4*atan(1) area = pi/4*dia**2 press = for/area ! force conv to pressure elax = 8 ! axial number of elements elra = 4 ! radial number of elements nax = elax+1 ! axial number of nodes nrad = elra+1 ! radial number of nodes MP,EX,1,29E6 ! elastic modulus, steel N,1,0 ! bottom center N,nax,0,len ! upper-left node FILL,1,nax ! axial nodes NGEN,nrad,10,1,nax,1,(dia/2/elra),0 ! axial nodes /PNUM,node,1 ! plot the nodes APLOT,all ! plot all areas /PLOPTS,INFO,OFF ! Removes entire legend column /PLOPTS,FRAME,OFF ! Removes frame TYPE,1 ! element type (ET) 1 E,1,11,12,2 ! lower elem EGEN,elax,1,-1 ! axial nodes ! use the following line if elra > 1 EGEN,elra,10,-elax ! remaining elements OUTPR,,1 FINISH ! preprocessor section /SOLUTION ! solution section antype,static outpr,basic,1 outpr,nload,1 el10 = elra*10+1 D,1,ALL,0,,el10,10 ! restrain bottom NSEL,S,NODE,,nax,(el10+elax),10 ! select top nodes SF,ALL,PRES,press ! load on upper surface NSEL,ALL ! reselect all nodes ! /output,Displ,txt,D:\Ansys\ ! displacements /output,Displ,txt,U:\win\Ansys\ ! displacements SOLVE EPLOT FINISH ! solution section /POST1 ! post processor etable,STR,LS,1,3 pldisp,1 ! plot displacements ! /output,Stress,txt,D:\Ansys\ ! forces and stresses ! /output,Stress,txt,U:\win\Ansys\ ! forces and stresses ! pretab ! PRNSOL ! FINISH ! post processor ! Remove the following and put your in results ! Exact end displacement is 2.634e-3 ! 8 axial, 1 radial sets of elements(<1% error) ! NODE UX UY ! 1 0. 0. ! 2 -0.182500E-05 -0.289907E-03 ! 3 0.747912E-06 -0.636143E-03 ! 4 -0.173988E-06 -0.961547E-03 ! 5 0.384267E-07 -0.129168E-02 ! 6 -0.883575E-08 -0.162077E-02 ! 7 0.206256E-08 -0.195011E-02 ! 8 -0.472749E-09 -0.227938E-02 ! 9 0.160272E-09 -0.260867E-02 ! 11 0. 0. ! 12 0.818365E-04 -0.300879E-03 ! 13 0.621971E-04 -0.633569E-03 ! 14 0.666996E-04 -0.962080E-03 ! 15 0.656620E-04 -0.129156E-02 ! 16 0.659025E-04 -0.162080E-02 ! 17 0.658467E-04 -0.195010E-02 ! 18 0.658598E-04 -0.227938E-02 ! 19 0.658560E-04 -0.260867E-02 ! 4 axial, 1 radial sets of elements(<1.5% error) ! NODE UX UY ! 1 0. 0. ! 5 0.258318E-07 -0.258517E-02 ! 11 0. 0. ! 15 0.652712E-04 -0.258464E-02 ! for half of P on 9 and 19 with 8 elements ! NODE UX UY ! 9 -0.110175E-04 -0.274848E-02 ! 19 0.537755E-04 -0.253877E-02