/batch /filename, p95_torq /prep7 ! Load inputs VBEND=0 HBEND=0 TORQ=1 ! Define the box outer section (WIDTH,LENGTH) ! and the round inner section (RAD) diameters PI=3.14159265359 WIDTH=0.040 LENGTH=0.040 HALF_WID=WIDTH/2.0 HALF_LEN=LENGTH/2.0 THICK=0.010 RAD=0.005 COSSIN=cos( 45.0*PI/180.0 ) NOM=0.005 NOTCHRAD=0.025 SWPANG=25.0 GRIP_LEN=0.01 GRIP_WID=0.025 ACT_LEN=0.05 ! compute the forces required to produce 1000Nm = F * r VBENDF=1000.0/( HALF_LEN + ACT_LEN ) HBENDF=1000.0/( HALF_LEN + ACT_LEN ) TORQF=1000.0/HALF_WID DIV_THCK=12 !# of element div's through the thickness DIV_HOLE=5 !# of element div's on each 45 degree arc in the hole DIV_HL_R=12 !# of element div's extending radially from the hole DIV_NT_L=12 !# of element div's longitudinally in the notch DIV_NT_C=8 !# of element div's circumferentially (45 degree arc) ! in the notch DIV_NM_A=12 !# of element div's axially on the nominal section ! Define keypoints for the box k,1,HALF_WID,0 k,2,HALF_WID,HALF_LEN k,3,0,HALF_LEN k,4,-HALF_WID,HALF_LEN k,5,-HALF_WID,0 k,6,-HALF_WID,-HALF_LEN k,7,0,-HALF_LEN k,8,HALF_WID,-HALF_LEN ! Define the keypoints for the circle k,10,0,0 k,11,RAD,0 k,12,COSSIN*RAD,COSSIN*RAD k,13,0,RAD k,14,-COSSIN*RAD,COSSIN*RAD k,15,-RAD,0 k,16,-COSSIN*RAD,-COSSIN*RAD k,17,0,-RAD k,18,COSSIN*RAD,-COSSIN*RAD ! Define the lines for the outer box l,1,2 !1 l,2,3 !2 l,3,4 !3 l,4,5 !4 l,5,6 !5 l,6,7 !6 l,7,8 !7 l,8,1 !8 ! Define the arcs for the inner circle larc,11,12,10,RAD, !9 larc,12,13,10,RAD, !10 larc,13,14,10,RAD, !11 larc,14,15,10,RAD, !12 larc,15,16,10,RAD, !13 larc,16,17,10,RAD, !14 larc,17,18,10,RAD, !15 larc,18,11,10,RAD, !16 ! Define the lines between the box and the inner circle l,1,11 !17 l,2,12 !18 l,3,13 !19 l,4,14 !20 l,5,15 !21 l,6,16 !22 l,7,17 !23 l,8,18 !24 ! Define the areas al,1,18,9,17 al,2,19,10,18 al,3,20,11,19 al,4,21,12,20 al,5,22,13,21 al,6,23,14,22 al,7,24,15,23 al,8,17,16,24 ! Now segment the lines before meshing lsel,s, , ,1 lsel,a,,,4,8,1 lesize,all, , ,DIV_HOLE,1, allsel lsel,s,,,2,3,1 lesize,all,,,DIV_NT_L/2,1, allsel lsel,s, , ,9 lsel,a,,,12,16,1, lesize,all, , ,DIV_HOLE,1, allsel lsel,s,,,10,11,1 lesize,all,,,DIV_NT_L/2,1, lsel,all,all lsel,s, , ,17,24,1 lesize,all, , ,DIV_HL_R,0.15, et,1,solid95 type,1 eshape,3 allsel esize,,DIV_THCK lesize,all ! Now extrude the areas to create the shaft asel,all vext,all, , ,0,0,THICK, , , allsel !vmesh,all ! Now draw the notch section ! do the keypoints OX=WIDTH/2.0 OY=LENGTH/2.0 OZ=THICK k,101,OX,OY,OZ k,102,OX,OY+NOTCHRAD*sin(SWPANG*PI/180.0),OZ+NOTCHRAD*(1.0-cos(SWPANG*PI/180.0)) k,103,OX,OY+NOTCHRAD*sin(SWPANG*PI/180.0),OZ-THICK-NOTCHRAD*(1.0-cos(SWPANG*PI/180.0)) k,104,OX,OY,OZ-THICK k,105,OX,OY,OZ+NOTCHRAD k,106,OX,OY,OZ-THICK-NOTCHRAD ! Draw the lines for the notch l,104,101 !65 l,102,103 !66 ! Draw the arcs for the notch larc,101,102,105,NOTCHRAD, !67 larc,104,103,106,NOTCHRAD, !68 ! Now define the areas al,65,66,67,68 !41 ! And extrude asel,s,,,41 vext,all, , ,-WIDTH,0,0, , , ! Concatenate areas for meshing allsel !accat,53,56 !accat,48,49 ! Now create the actuator section area k,200,HALF_WID,-HALF_LEN,0.0 k,201,HALF_WID,-HALF_LEN-ACT_LEN,0.0 k,202,HALF_WID,-HALF_LEN-ACT_LEN,THICK k,203,HALF_WID,-HALF_LEN,THICK a,200,201,202,203 !47 ! And extrude allsel asel,s,,,47 vext,all, , ,-WIDTH,0,0, , , ! Glue the volumes vglue,all ! More area cats before meshing allsel accat,15,19 accat,31,35 ! Set divisions for meshing allsel lsel,s,,,93,96,1 lesize,all, , ,DIV_NM_A ! Define the element divisions allsel lsel,s,,,89,92,1 lesize,all, , ,DIV_NT_C,1.0/0.5, allsel allsel ! Specify the material properties uimp,1,ex, , ,200e9, uimp,1,nuxy, , ,0.3, uimp,1,emis, , ,1, uimp,2,ex, , ,200e12, uimp,2,nuxy, , ,0.3, uimp,2,emis, , ,1, mat,1 ! Finally, mesh the model vmesh,all ! modify the elements so that the actuator end is RIGID allsel nsel,r,loc,y,-HALF_LEN-ACT_LEN esln,r,0 emodif,all,MAT,2 allsel ! done with the preprocessor finish ! enter the solver /solu ! select the PCG solver eqslv,pcg ! apply the displacement constraint to the fixed end nsel,r,loc,y,OY+NOTCHRAD*sin(SWPANG*PI/180.0) d,all,all ! apply the forces accordingly *if,VBEND,EQ,1,then ! select the nodes at the actuator end allsel nsel,r,loc,y,-HALF_LEN-ACT_LEN ! count the nodes *get,NODECNT,node,,count ! apply the force evenly f,all,fz,-VBENDF/NODECNT *endif *if,HBEND,EQ,1,then ! select the nodes at the actuator end allsel nsel,r,loc,y,-HALF_LEN-ACT_LEN ! count the nodes *get,NODECNT,node,,count ! apply the force evenly f,all,fx,-HBENDF/NODECNT *endif *if,TORQ,EQ,1,then ! select the nodes at the actuator end allsel nsel,r,loc,y,-HALF_LEN-ACT_LEN nsel,r,loc,x,HALF_WID-HALF_WID/4.0,HALF_WID+HALF_WID/4.0 ! count the nodes *get,NODECNT,node,,count ! apply the force evenly f,all,fz,-TORQF/NODECNT ! select the nodes at the actuator end allsel nsel,r,loc,y,-HALF_LEN-ACT_LEN nsel,r,loc,x,-HALF_WID+HALF_WID/4.0,-HALF_WID-HALF_WID/4.0 ! count the nodes *get,NODECNT1,node,,count ! apply the force evenly f,all,fz,TORQF/NODECNT1 *endif ! solve the model allsel solve finish ! and go to the post processor /post1 save finish