资源描述:
《ansys螺旋线画法地几个例子.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、实用文档1.EXAMPLE_1CSYS,1*AFUN,DEG/prep7ET,1,45*do,i,0,36,1x=10y=10*iz=i/2k,i+1,x,y,z*enddo*do,j,1,36,1L,j,j+1*enddo*do,i,0,35,1实用文档LWPL,-1,i+1,0CYL4,0,0,1*enddo*do,i,1,36,1VDRAG,i,,,,,,i,,,,,*enddovglue,allTYPE,1vmesh,all过程图:实用文档实用文档1.EXAMPLE_2/PREP7wpoff,-10CYL4,,,1E
2、T,1,MESH200ET,2,SOLID45KEYOPT,1,1,6KEYOPT,1,2,0LESIZE,ALL,,,10,,,,,1MSHAPE,0,2DMSHKEY,1AMESH,ALLCSYS,0WPAVE,0,0,0CSYS,0!*实用文档CSYS,1KBETW,3,1,0,RATI,0.5,!Createsakeypointbetweentwoexistingkeypoints*do,i,1,72k,5+i,10,180-i*10,ilstr,5+i,4+i*enddo*do,i,1,72VDRAG,1+(i-1
3、)*5,,,,,,4+ieplot*enddo实用文档实用文档1.EXAMPLE_3finish/clear/prep7*AFUN,RADpi=2*ASIN(1)!获得pi常数*afun,degR1=6.3!轴外半径rs=1.65!丝半径R2=R1+rs!螺旋外半径h0=64!螺距H=h0!螺旋总高度K,1,R2,0,0theta=90-Atan(64/(2*pi*R2))!获得旋转角wprota,0,-theta,0实用文档KWPAVE,1!Movestheworkingplaneorigintotheaverageloc
4、ationofkeypoints.rad1=rs!圆半径rad2=rad1*0.6!四边形半径*get,knum,kp,,num,maxCYL4,,,rad1CSYS,1!选择柱坐标系circle_p=10*get,knum,kp,,num,maxK,knum+1,R2,0,0nn=NINT(h*circle_p/h0)*DO,i,1,nn-1,1xx=R2yy=i*360/circle_pzz=i*h0/circle_pK,knum+i+1,xx,yy,zz*ENDDOK,knum+nn+1,xx,h/h0*360,hLS
5、EL,U,,,ALL*DO,i,1,nn,1L,knum+i,knum+i+1*ENDDOLCOMB,ALL,,0*GET,lnum,LINE,0,NUM,MAX!获得最大线条号ET,2,SOLID45TYPE,2实用文档LESIZE,lnum,,,40,,,,,1VDRAG,ALL,,,,,,lnum实用文档1.EXAMPLE_4钢丝软轴的模型/prep7*AFUN,DEGCSYS,1*do,i,1,500k,i,2,10*(i-1),0.01*(i-1)*enddo*do,i,1,499l,i,i+1*enddoFLST
6、,2,499,4,ORDE,2FITEM,2,1FITEM,2,-499LCOMB,P51X,,0CSYS,0KWPAVE,1wprot,0,90PCIRC,0.18,0,0,360,VDRAG,1,,,,,,1FINISH实用文档实用文档1.EXAMPLE_5近来算了一个螺旋形的钢桥,以下是一段用APDL建立螺旋线的代码,主要使用"BSPLIN"命令来绘制空间曲线,然后再进行网格划分。适当修改一下可以用做各种螺旋形模型的建立。/PREP7PI=3.1415926R=18.100!螺旋线半径H=24.836!螺旋线单圈高N=
7、6!曲线关键点数量ANG1=45.18!曲线起始角度ANG2=135.71!曲线终止角度HH=H*(ANG2-ANG1)/360!曲线段高度DH=HH/(N-1)!每个关键点的高度增量DA=(ANG2-ANG1)/(N-1)!每个关键点的角度增量*DO,I,0,N-1XX=R*COS((ANG1+I*DA)*PI/180)YY=R*SIN((ANG1+I*DA)*PI/180)ZZ=I*DHK,I+1,XX,YY,ZZ*ENDDOBSPLIN,1,2,3,4,5,6*GET,LENG,LINE,1,LENG!得到螺旋线的长度
8、实用文档1.EXAMPLE_6Ansys生成螺旋线模型/prep7/title,helixheater/units,user,1e-3,,,,273Rh=2.5!螺“线”半径H=20!总长dis=0.8!螺距rs=0.5!丝径*afun,degtheta=90-atan(dis/Rh)k,