您的位置:网站首页 > Ansys教程

轮毂的ANSYS APDL命令流建模及模态分析实例

时间:2011-02-01 07:48:57 来源:未知

 本文介绍了轮毂的ANSYS APDL命令流建模及模态分析实例相关内容。

  ANSYS命令流及注释

  五个辐条的轮毂

  !

  !初始化ANSYS环境

  !

  FINISH

  /CLEAR !清空内存

  /FILNAM,WHEEL5 !文件名

  /TITILE,WHEEL5 PARAMETER MODELING !工作名

  !

  !定义几何尺寸参数

  !

  R1=180

  R2=157

  R3=75

  R4=75

  R5=30

  R6=28

  R7=20

  R8=90

  R9=60

  S_HOLE=5

  TH1=48

  TH2=23

  TH3=11

  TH4=180

  TH5=40

  TH6=45

  TH7=105

  TH8=25

  TH9=15

  TH10=25

  TH11=13

  /VIEW,1,1,1,1 !改变视图

  /ANG,1

  /PNUM,LINE,1

  /PNUM,AREA,1

  /PNUM,VOLU,1

  /NUMBER,1

  !

  !关键点

  !

  /PREP7

  k,1,r5,r7,0

  k,2,r4-ky(1),ky(1),0

  k,3,r4,0,0

  k,4,r1,0,0

  k,5,kx(4),th5-th9,0

  k,6,r1-th8,ky(5),0

  k,7,kx(6),th4/2,0

  k,8,kx(7)+th11,ky(7)+th10,0

  k,9,kx(8),th4-th3,0

  k,10,kx(4),ky(9),0

  k,11,kx(4),th4,0

  k,12,r2,ky(11),0

  k,13,kx(12),ky(8),0

  k,14,kx(7)-th3,ky(7),0

  k,15,kx(14),th5,0

  k,16,r3+r6,ky(15),0

  k,17,kx(3),r7+th1,0

  k,18,kx(1),ky(17),0

  k,19,kx(16),ky(17),0

  k,20,kx(2),0,0

  k,21,0,0,0

  k,22,0,th1+r7,0

  *ask,s_hole,'the number of hole',5 !宏

  !

  !创建轮毂面

  !

  lstr,1,2 !连接1,2关键点,形成直线

  larc,2,3,20,r7 !以20点为圆心r7为半径,2,3点为端点作弧线

  lstr,3,4

  lstr,4,5

  lstr,5,6

  lstr,6,7

  lstr,7,8

  lstr,8,9

  lstr,9,10

  lstr,10,11

  lstr,11,12

  lstr,12,13

  lstr,13,14

  lstr,14,15

  lstr,15,16

  larc,16,17,19,r6

  lstr,17,18

  lstr,18,1

  al,all

  cm,an-all,area !形成组件

  !

  !创建实体模型

  !

  allsel,all

  vrotat,an-all,,,,,,21,22,360,S_hole, !旋转拉伸形成体

  cm,v-an-all,volu

  !

  !减去孔洞

  !

  vsel,none

  wpro,,-90, !绕Y轴转动工作平面

  cswpla,11,1,1,1

  csys,11

  wpoff,r8*sin(180/s_hole),r8*cos(180/s_hole)

  RPR4,3,-th5,th5/2,r9,, !创建三角形

  adele,96

  LFILLT,182,181,10, , !在直线182,181间形成半径10的圆角

  LFILLT,182,183,10, ,

  LFILLT,183,181,10, ,

  LARC,98,100,21,144,

  ldele,182

  asel,none

  al,181,184,187,185,183,186 !连接各线形成面

  cm,sanjiao_hole,area

  vext,sanjiao_hole,,,0,0,th5,,,, !以th5为厚度形成体

  cm,v_hole,volu

  vgen,s_hole,all,,,,360/s_hole,,,0 !旋转拉伸形成s_hole个体

  cm,v-hole,volu

  vsel,all

  vsbv,v-an-all,v-hole !布尔运算减去体,形成孔洞

  cm,v-an-all,volu

  ALLSEL,ALL

  !

  !定义单元属性

  !

  et,1,solid45

  mp,ex,1,71000 !铝合金材料特性

  mp,nuxy,1,0.33

  mp,dens,1,2720

  !

  !划分单元创建网格模型

  !

  SMRT,5 !自由网格划分

  MSHAPE,1,3D

  MSHKEY,0

  FLST,5,5,6,ORDE,2

  FITEM,5,11

  FITEM,5,-15

  CM,_Y,VOLU

  VSEL, , , ,P51X

  CM,_Y1,VOLU

  CHKMSH,'VOLU'

  CMSEL,S,_Y

  VMESH,_Y1

  finish

  !

  !保存

  !

  save

  APLOT

  /SOLU

  FLST,2,5,5,ORDE,5 !约束固定

  FITEM,2,19

  FITEM,2,38

  FITEM,2,57

  FITEM,2,76

  FITEM,2,95

  /GO

  DA,P51X,ALL,

  *DEL,_FNCNAME !函数加载

  *DEL,_FNCMTID

  *DEL,_FNC_C1

  *DEL,_FNCCSYS

  *SET,_FNCNAME,'jiazai'

  *DIM,_FNC_C1,,1

  *SET,_FNC_C1(1),5

  *SET,_FNCCSYS,11

  ! /INPUT,111.func,,,1

  *DIM,%_FNCNAME%,TABLE,6,7,1,,,,%_FNCCSYS%

  !

  ! Begin of equation: 1000*{X}/cos(180/s_hole)

  *SET,%_FNCNAME%(0,0,1), 0.0, -999

  *SET,%_FNCNAME%(2,0,1), 0.0

  *SET,%_FNCNAME%(3,0,1), %_FNC_C1(1)%

  *SET,%_FNCNAME%(4,0,1), 0.0

  *SET,%_FNCNAME%(5,0,1), 0.0

  *SET,%_FNCNAME%(6,0,1), 0.0

  *SET,%_FNCNAME%(0,1,1), 1.0, -1, 0, 1000, 0, 0, 2

  *SET,%_FNCNAME%(0,2,1), 0.0, -2, 0, 1, -1, 3, 2

  *SET,%_FNCNAME%(0,3,1), 0, -1, 0, 180, 0, 0, 17

  *SET,%_FNCNAME%(0,4,1), 0.0, -3, 0, 1, -1, 4, 17

  *SET,%_FNCNAME%(0,5,1), 0.0, -1, 10, 1, -3, 0, 0

  *SET,%_FNCNAME%(0,6,1), 0.0, -3, 0, 1, -2, 4, -1

  *SET,%_FNCNAME%(0,7,1), 0.0, 99, 0, 1, -3, 0, 0

  ! End of equation: 1000*{X}/cos(180/s_hole)

  FLST,2,3,1,ORDE,3 !确定加载点位置

  FITEM,2,37

  FITEM,2,54

  FITEM,2,354

  /GO

  F,P51X,FX, %JIAZAI%

  /STATUS,SOLU !求解

  SOLVE

  /VIEW,1,1,1,1

  /ANG,1

  /REP,FAST

  /SOLU

  ANTYPE,2 !模态求解

  MSAVE,0

  MODOPT,LANB,10

  EQSLV,SPAR

  MXPAND,10, , ,1

  LUMPM,0

  PSTRES,0

  MODOPT,LANB,10,0,0, ,OFF

  /STATUS,SOLU

  SOLVE

  FINISH

  Save

图1

 

模型图

模型图

网格划分

网格划分

位移图

位移图

应变图

应变图

应力图

应力图

应力模态(其中之一) 

应力模态(其中之一)