/batch /filename, tshaft ! start the preprocessor /prep7 ! This is the FEA model for Tim Langlais's filleted shaft. The ! modeled part of the shaft includes only the sharp notch. ! Define some loading parameters---the two types of loading ! to be defined on the ANSYS command-line ! ! ansys53 -AXIAL 1 -TORQ 0 ! ! AXIAL=0 ! TORQ=1 ! Analysis is done in SI; define an inches to mm conversion IN2M=0.0254 SMALLE=0.00001 ! Now define geometry variables GRIP_R=0.75*IN2M ! Radius of the shaft at the grip NOM_R=0.5*IN2M ! Radius of the shaft in the nominal section GRIP_L=1.0*IN2M ! Axial L from grip end to notch root TRANS_L=0.25*IN2M ! L of transition section between notch root ! and nominal section NOM_L=2.0*IN2M ! Nominal section length NOTCH_R=0.15*IN2M ! Notch radius TOTAL_L=GRIP_L+TRANS_L+NOM_L ! Total axial length DUMMY=(NOTCH_R-(GRIP_R-NOM_R)) DUMMY2=-NOTCH_R/2.0 NOTCH_MD=sqrt(NOTCH_R*NOTCH_R-DUMMY2*DUMMY2) ! notch midpoint NOTCH_L=sqrt(NOTCH_R*NOTCH_R-DUMMY*DUMMY) ! Axial length of the ! notch; not ! necessarily the ! same as the radius ! Meshing size parameters DIV_NM_R=6 ! # of div along the nominal radius of the shaft DIV_NM_L=6 ! # of div along the axial length of the nom sec DIV_TR_L=6 ! # of div along the transition DIV_NTA=10 ! # of div along the lower notch radius DIV_NTB=2 ! # of div along the upper notch radius DIV_GP_L=6 ! # of div along the axial grip section ! Define the load values--Faxial = 1000N, Ftorq = 1000 FAXIAL=1000.0 FTORQ=1000.0 ! Now define the keypoints that comprise the half section of the ! shaft k,1,0,0 ! grip edge k,2,0,GRIP_R ! grip edge k,3,GRIP_L-NOTCH_R,NOM_R+NOTCH_R ! top of notch k,4,GRIP_L,NOM_R+NOTCH_R ! center of notch rad k,5,GRIP_L-NOTCH_MD,NOM_R+NOTCH_R/2.0 k,6,GRIP_L,NOM_R ! notch root k,7,TOTAL_L-NOM_L,NOM_R ! notch-nominal transition k,8,TOTAL_L,NOM_R ! nominal edge k,9,TOTAL_L,0 ! nominal edge k,10,TOTAL_L-NOM_L,0 ! transition pt at shaft center k,11,GRIP_L,0 ! notch root pt at shaft center k,12,GRIP_L/2.0,0 k,13,0,3.0*GRIP_R/4.0 ! Now define the lines that comprise the half section of the shaft ! Define the lines for the outer box l,13,1 !1 l,2,13 !2 l,2,3 !3 larc,3,5,4,NOTCH_R !4 larc,5,6,4,NOTCH_R !5 l,6,7 !6 l,7,8 !7 l,8,9 !8 l,10,9 !9 l,11,10 !10 l,12,11 !11 l,1,12 !12 l,5,12 !13 l,13,5 !14 l,6,11 !15 l,7,10 !16 ! Define the areas allsel al,1,14,13,12 !1 al,2,3,4,14 !2 al,11,13,5,15 !3 al,10,15,6,16 !4 al,9,16,7,8 !5 ! Now segment the lines before meshing lsel,s,,,1 lsel,a,,,13 lsel,a,,,15 lsel,a,,,16 lsel,a,,,8 lesize,all,,,DIV_NM_R,5, lsel,all,all lsel,s,,,7 lsel,a,,,9 lesize,all,,,DIV_NM_L,3, lsel,all,all lsel,s,,,6 lsel,a,,,10 lesize,all,,,DIV_TR_L,5, lsel,all,all lsel,s,,,5 lsel,a,,,11 lesize,all,,,DIV_NTA,1.0/3.0, lsel,all,all lsel,s,,,4 lsel,a,,,2 lesize,all,,,DIV_NTB,1, lsel,all,all lsel,s,,,3 lsel,a,,,14 lsel,a,,,12 lesize,all,,,DIV_GP_L,1.0/5.0, ! Now define a sweep of all the areas about the x-axis (k 1 and 9) to create ! the volume vrotat,all,,,,,,1,9,360,, ! Specify the material properties uimp,1,ex, , ,206e9, uimp,1,nuxy, , ,0.3, uimp,1,emis, , ,1, mat,1 ! select the solid 20 noded element and mesh everything et,1,solid95 TYPE, 1 $ REAL, 1 $ MAT, 1 vmesh,all ! enter the solver, apply contraints and loads /solu ! select the PCG solver eqslv,pcg ! apply the fixed contraint allsel nsel,r,loc,x,-0.01,SMALLE d,all,all ! If axial loading... *if,AXIAL,EQ,1,then ! apply the axial force allsel nsel,r,loc,x,TOTAL_L-SMALLE,TOTAL_L+SMALL_E *get,NODECNT,node,,count f,all,fx,FAXIAL/NODECNT *endif ! If torque loading *if,TORQ,EQ,1,then ! apply the torsion force allsel nsel,r,loc,x,TOTAL_L-SMALLE,TOTAL_L+SMALL_E nsel,r,loc,y,NOM_R-SMALLE,NOM_R+SMALLE f,all,fz,-FTORQ/4 allsel nsel,r,loc,x,TOTAL_L-SMALLE,TOTAL_L+SMALL_E nsel,r,loc,y,-NOM_R+SMALLE,-NOM_R-SMALLE f,all,fz,FTORQ/4 allsel nsel,r,loc,x,TOTAL_L-SMALLE,TOTAL_L+SMALL_E nsel,r,loc,z,NOM_R-SMALLE,NOM_R+SMALLE f,all,fy,FTORQ/4 allsel nsel,r,loc,x,TOTAL_L-SMALLE,TOTAL_L+SMALL_E nsel,r,loc,z,-NOM_R+SMALLE,-NOM_R-SMALLE f,all,fy,-FTORQ/4 *endif ! select everything and solve allsel solve finish ! enter post-processor and save everything /post save finish