命令流如下:
FINISH
/clear
/title,huluchuan
/PREP7 !进入前处理
ET,1,SOLID92
MP,EX,1,72000000 !弹性模量
MP,DENS,1,2.85e-6 !密度
MP,NUXY,1,0.333 !泊松比
!*****************函数赋值,参数调节*******************!
!建立8层“葫芦”外形坐标值(数组太长会导致出错,因此把外形坐标拆成3个数组分装)
*dim,A,array,18
!给数组每个元素赋值
A(1)=52.0,35.8,50,35.8,50,43.13,50.2,34.5,47.6,34.5,47.6,41.6,48.27,33.1,45.6,33.1,45.6,39.90
*dim,B,array,18
!给数组每个元素赋值
B(1)=46.3,31.8,43.7,31.8,43.7,38.4,44.5,30.5,41.8,30.5,41.8,36.8,42.5,29.1,40.0,29.1,40.0,35.1
*dim,C,array,12
!给数组每个元素赋值
C(1)=40.6,27.8,38.2,27.8,38.2,33.6,38.7,26.4,36.1,26.4,36.1,32
!由于蒙皮的厚度折算到模型中只有0.8mm,而模型蒙皮厚度通常为2mm因此需要补偿,x,y坐标均减小2mm
*do,i,1,18
A(i)=A(i)-2
B(i)=B(i)-2
*enddo
*do,i,1,12
C(i)=C(i)-2
*enddo
!建立每层所在高度数组
*dim,H,array,9
H(1)=73,179,298,411,523,641,753,867,985
!柱子的长宽高数组
*dim,Z,array,3
Z(1)=18,19,985
!柱子中心在楼板的坐标
*dim,WZ,array,2
WZ(1)=0,0
!在“葫芦”上挖洞的中心的坐标
*dim,DZX,array,8
DZX(1)=30,30,30,30,30,30,26,26
!“葫芦”上挖洞的尺寸
*dim,dong,array,8
dong(1)=18.6,11.4,11.6,16.4,10.0,14.0,9.4,10.6
!*****************************************
!建立“葫芦串”每个块体的厚度数组
*dim,KH,array,8
KH(1)=40,45,55,50,45,40,30,30
!*******************************************
!******************************************************!
!截面四边圆弧的半径
*set,R,533.3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!定义1到8层面!!!!!!!!!!!!!!!!!!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(3+(i-1)*6),A(4+(i-1)*6),H(i)
k,24+(i-1)*24,-A(1+(i-1)*6),A(2+(i-1)*6),H(i)
l,1+(i-1)*24,2+(i-1)*24
l,2+(i-1)*24,3+(i-1)*24
l,3+(i-1)*24,4+(i-1)*24
l,4+(i-1)*24,5+(i-1)*24
l,5+(i-1)*24,6+(i-1)*24
larc,6+(i-1)*24,7+(i-1)*24,18+(i-1)*24,R
l,7+(i-1)*24,8+(i-1)*24
l,8+(i-1)*24,9+(i-1)*24
l,9+(i-1)*24,10+(i-1)*24
l,10+(i-1)*24,11+(i-1)*24
l,11+(i-1)*24,12+(i-1)*24
larc,12+(i-1)*24,13+(i-1)*24,24+(i-1)*24,R
l,13+(i-1)*24,14+(i-1)*24
l,14+(i-1)*24,15+(i-1)*24
l,15+(i-1)*24,16+(i-1)*24
l,16+(i-1)*24,17+(i-1)*24
l,17+(i-1)*24,18+(i-1)*24
larc,18+(i-1)*24,19+(i-1)*24,5+(i-1)*24,R
l,19+(i-1)*24,20+(i-1)*24
l,20+(i-1)*24,21+(i-1)*24
l,21+(i-1)*24,22+(i-1)*24
l,22+(i-1)*24,23+(i-1)*24
l,23+(i-1)*24,24+(i-1)*24
larc,24+(i-1)*24,1+(i-1)*24,11+(i-1)*24,R
*enddo
*do,i,1,3
k,1+(i+2)*24,-B(1+(i-1)*6),-B(2+(i-1)*6),H(i+3)
k,2+(i+2)*24,-B(3+(i-1)*6),-B(4+(i-1)*6),H(i+3)
k,3+(i+2)*24,-B(5+(i-1)*6),-B(6+(i-1)*6),H(i+3)
k,4+(i+2)*24,-B(6+(i-1)*6),-B(5+(i-1)*6),H(i+3)
k,5+(i+2)*24,-B(4+(i-1)*6),-B(3+(i-1)*6),H(i+3)
k,6+(i+2)*24,-B(2+(i-1)*6),-B(1+(i-1)*6),H(i+3)
k,7+(i+2)*24,B(2+(i-1)*6),-B(1+(i-1)*6),H(i+3)
k,8+(i+2)*24,B(4+(i-1)*6),-B(3+(i-1)*6),H(i+3)
k,9+(i+2)*24,B(6+(i-1)*6),-B(5+(i-1)*6),H(i+3)
k,10+(i+2)*24,B(5+(i-1)*6),-B(6+(i-1)*6),H(i+3)
k,11+(i+2)*24,B(3+(i-1)*6),-B(4+(i-1)*6),H(i+3)
k,12+(i+2)*24,B(1+(i-1)*6),-B(2+(i-1)*6),H(i+3)
k,13+(i+2)*24,B(1+(i-1)*6),B(2+(i-1)*6),H(i+3)
k,14+(i+2)*24,B(3+(i-1)*6),B(4+(i-1)*6),H(i+3)
k,15+(i+2)*24,B(5+(i-1)*6),B(6+(i-1)*6),H(i+3)
k,16+(i+2)*24,B(6+(i-1)*6),B(5+(i-1)*6),H(i+3)
k,17+(i+2)*24,B(4+(i-1)*6),B(3+(i-1)*6),H(i+3)
k,18+(i+2)*24,B(2+(i-1)*6),B(1+(i-1)*6),H(i+3)
k,19+(i+2)*24,-B(2+(i-1)*6),B(1+(i-1)*6),H(i+3)
k,20+(i+2)*24,-B(4+(i-1)*6),B(3+(i-1)*6),H(i+3)
k,21+(i+2)*24,-B(6+(i-1)*6),B(5+(i-1)*6),H(i+3)
k,22+(i+2)*24,-B(5+(i-1)*6),B(6+(i-1)*6),H(i+3)
k,23+(i+2)*24,-B(3+(i-1)*6),B(4+(i-1)*6),H(i+3)
k,24+(i+2)*24,-B(1+(i-1)*6),B(2+(i-1)*6),H(i+3)
l,1+(i+2)*24,2+(i+2)*24
l,2+(i+2)*24,3+(i+2)*24
l,3+(i+2)*24,4+(i+2)*24
l,4+(i+2)*24,5+(i+2)*24
l,5+(i+2)*24,6+(i+2)*24
larc,6+(i+2)*24,7+(i+2)*24,18+(i+2)*24,R
l,7+(i+2)*24,8+(i+2)*24
l,8+(i+2)*24,9+(i+2)*24
l,9+(i+2)*24,10+(i+2)*24
l,10+(i+2)*24,11+(i+2)*24
l,11+(i+2)*24,12+(i+2)*24
larc,12+(i+2)*24,13+(i+2)*24,24+(i+2)*24,R
l,13+(i+2)*24,14+(i+2)*24
l,14+(i+2)*24,15+(i+2)*24
l,15+(i+2)*24,16+(i+2)*24
l,16+(i+2)*24,17+(i+2)*24
l,17+(i+2)*24,18+(i+2)*24
larc,18+(i+2)*24,19+(i+2)*24,5+(i+2)*24,R
l,19+(i+2)*24,20+(i+2)*24
l,20+(i+2)*24,21+(i+2)*24
l,21+(i+2)*24,22+(i+2)*24
l,22+(i+2)*24,23+(i+2)*24
l,23+(i+2)*24,24+(i+2)*24
larc,24+(i+2)*24,1+(i+2)*24,11+(i+2)*24,R
*enddo
*do,i,1,2
k,1+(i+5)*24,-C(1+(i-1)*6),-C(2+(i-1)*6),H(i+6)
k,2+(i+5)*24,-C(3+(i-1)*6),-C(4+(i-1)*6),H(i+6)
k,3+(i+5)*24,-C(5+(i-1)*6),-C(6+(i-1)*6),H(i+6)
k,4+(i+5)*24,-C(6+(i-1)*6),-C(5+(i-1)*6),H(i+6)
k,5+(i+5)*24,-C(4+(i-1)*6),-C(3+(i-1)*6),H(i+6)
k,6+(i+5)*24,-C(2+(i-1)*6),-C(1+(i-1)*6),H(i+6)
k,7+(i+5)*24,C(2+(i-1)*6),-C(1+(i-1)*6),H(i+6)
k,8+(i+5)*24,C(4+(i-1)*6),-C(3+(i-1)*6),H(i+6)
k,9+(i+5)*24,C(6+(i-1)*6),-C(5+(i-1)*6),H(i+6)
k,10+(i+5)*24,C(5+(i-1)*6),-C(6+(i-1)*6),H(i+6)
k,11+(i+5)*24,C(3+(i-1)*6),-C(4+(i-1)*6),H(i+6)
k,12+(i+5)*24,C(1+(i-1)*6),-C(2+(i-1)*6),H(i+6)
k,13+(i+5)*24,C(1+(i-1)*6),C(2+(i-1)*6),H(i+6)
k,14+(i+5)*24,C(3+(i-1)*6),C(4+(i-1)*6),H(i+6)
k,15+(i+5)*24,C(5+(i-1)*6),C(6+(i-1)*6),H(i+6)
k,16+(i+5)*24,C(6+(i-1)*6),C(5+(i-1)*6),H(i+6)
k,17+(i+5)*24,C(4+(i-1)*6),C(3+(i-1)*6),H(i+6)
k,18+(i+5)*24,C(2+(i-1)*6),C(1+(i-1)*6),H(i+6)
k,19+(i+5)*24,-C(2+(i-1)*6),C(1+(i-1)*6),H(i+6)
k,20+(i+5)*24,-C(4+(i-1)*6),C(3+(i-1)*6),H(i+6)
k,21+(i+5)*24,-C(6+(i-1)*6),C(5+(i-1)*6),H(i+6)
k,22+(i+5)*24,-C(5+(i-1)*6),C(6+(i-1)*6),H(i+6)
k,23+(i+5)*24,-C(3+(i-1)*6),C(4+(i-1)*6),H(i+6)
k,24+(i+5)*24,-C(1+(i-1)*6),C(2+(i-1)*6),H(i+6)
l,1+(i+5)*24,2+(i+5)*24
l,2+(i+5)*24,3+(i+5)*24
l,3+(i+5)*24,4+(i+5)*24
l,4+(i+5)*24,5+(i+5)*24
l,5+(i+5)*24,6+(i+5)*24
larc,6+(i+5)*24,7+(i+5)*24,18+(i+5)*24,R
l,7+(i+5)*24,8+(i+5)*24
l,8+(i+5)*24,9+(i+5)*24
l,9+(i+5)*24,10+(i+5)*24
l,10+(i+5)*24,11+(i+5)*24
l,11+(i+5)*24,12+(i+5)*24
larc,12+(i+5)*24,13+(i+5)*24,24+(i+5)*24,R
l,13+(i+5)*24,14+(i+5)*24
l,14+(i+5)*24,15+(i+5)*24
l,15+(i+5)*24,16+(i+5)*24
l,16+(i+5)*24,17+(i+5)*24
l,17+(i+5)*24,18+(i+5)*24
larc,18+(i+5)*24,19+(i+5)*24,5+(i+5)*24,R
l,19+(i+5)*24,20+(i+5)*24
l,20+(i+5)*24,21+(i+5)*24
l,21+(i+5)*24,22+(i+5)*24
l,22+(i+5)*24,23+(i+5)*24
l,23+(i+5)*24,24+(i+5)*24
larc,24+(i+5)*24,1+(i+5)*24,11+(i+5)*24,R
*enddo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!直接用线生成面会出现问题,故用简单命令生成面!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/PREP7
FLST,2,24,4
FITEM,2,18
FITEM,2,17
FITEM,2,16
FITEM,2,15
FITEM,2,14
FITEM,2,13
FITEM,2,12
FITEM,2,11
FITEM,2,10
FITEM,2,9
FITEM,2,8
FITEM,2,7
FITEM,2,6
FITEM,2,5
FITEM,2,4
FITEM,2,3
FITEM,2,2
FITEM,2,1
FITEM,2,24
FITEM,2,23
FITEM,2,22
FITEM,2,21
FITEM,2,20
FITEM,2,19
AL,P51X
FLST,2,24,4
FITEM,2,36
FITEM,2,35
FITEM,2,34
FITEM,2,33
FITEM,2,32
FITEM,2,31
FITEM,2,30
FITEM,2,29
FITEM,2,28
FITEM,2,27
FITEM,2,26
FITEM,2,25
FITEM,2,48
FITEM,2,47
FITEM,2,46
FITEM,2,45
FITEM,2,44
FITEM,2,43
FITEM,2,42
FITEM,2,41
FITEM,2,40
FITEM,2,39
FITEM,2,38
FITEM,2,37
AL,P51X
FLST,2,24,4
FITEM,2,60
FITEM,2,59
FITEM,2,58
FITEM,2,57
FITEM,2,56
FITEM,2,55
FITEM,2,54
FITEM,2,53
FITEM,2,52
FITEM,2,51
FITEM,2,50
FITEM,2,49
FITEM,2,72
FITEM,2,71
FITEM,2,70
FITEM,2,69
FITEM,2,68
FITEM,2,67
FITEM,2,66
FITEM,2,65
FITEM,2,64
FITEM,2,63
FITEM,2,62
FITEM,2,61
AL,P51X
FLST,2,24,4
FITEM,2,92
FITEM,2,91
FITEM,2,90
FITEM,2,89
FITEM,2,88
FITEM,2,87
FITEM,2,86
FITEM,2,85
FITEM,2,84
FITEM,2,83
FITEM,2,82
FITEM,2,81
FITEM,2,80
FITEM,2,79
FITEM,2,78
FITEM,2,77
FITEM,2,76
FITEM,2,75
FITEM,2,74
FITEM,2,73
FITEM,2,96
FITEM,2,95
FITEM,2,94
FITEM,2,93
AL,P51X
FLST,2,24,4
FITEM,2,120
FITEM,2,119
FITEM,2,118
FITEM,2,117
FITEM,2,116
FITEM,2,115
FITEM,2,114
FITEM,2,113
FITEM,2,112
FITEM,2,111
FITEM,2,110
FITEM,2,109
FITEM,2,108
FITEM,2,107
FITEM,2,106
FITEM,2,105
FITEM,2,104
FITEM,2,103
FITEM,2,102
FITEM,2,101
FITEM,2,100
FITEM,2,99
FITEM,2,98
FITEM,2,97
AL,P51X
FLST,2,24,4
FITEM,2,144
FITEM,2,143
FITEM,2,142
FITEM,2,141
FITEM,2,140
FITEM,2,139
FITEM,2,138
FITEM,2,137
FITEM,2,136
FITEM,2,135
FITEM,2,134
FITEM,2,133
FITEM,2,132
FITEM,2,131
FITEM,2,130
FITEM,2,129
FITEM,2,128
FITEM,2,127
FITEM,2,126
FITEM,2,125
FITEM,2,124
FITEM,2,123
FITEM,2,122
FITEM,2,121
AL,P51X
FLST,2,24,4
FITEM,2,168
FITEM,2,167
FITEM,2,166
FITEM,2,165
FITEM,2,164
FITEM,2,163
FITEM,2,162
FITEM,2,161
FITEM,2,160
FITEM,2,159
FITEM,2,158
FITEM,2,157
FITEM,2,156
FITEM,2,155
FITEM,2,154
FITEM,2,153
FITEM,2,152
FITEM,2,151
FITEM,2,150
FITEM,2,149
FITEM,2,148
FITEM,2,147
FITEM,2,146
FITEM,2,145
AL,P51X
FLST,2,24,4
FITEM,2,192
FITEM,2,191
FITEM,2,190
FITEM,2,189
FITEM,2,188
FITEM,2,187
FITEM,2,186
FITEM,2,185
FITEM,2,184
FITEM,2,183
FITEM,2,182
FITEM,2,181
FITEM,2,180
FITEM,2,179
FITEM,2,178
FITEM,2,177
FITEM,2,176
FITEM,2,175
FITEM,2,174
FITEM,2,173
FITEM,2,172
FITEM,2,171
FITEM,2,170
FITEM,2,169
AL,P51X
APLOT
!挖洞
*do,i,1,8
WPOFFS,DZX(i),0,H(i)
RECTNG,-dong(i)/2,dong(i)/2,-dong(i)/2,dong(i)/2
WPAVE,0,0,0
*enddo
!挖洞
*do,i,1,8
WPOFFS,0,DZX(i),H(i)
RECTNG,-dong(i)/2,dong(i)/2,-dong(i)/2,dong(i)/2
WPAVE,0,0,0
*enddo
!布尔操作挖掉孔
*do,i,1,8
ASBA,i,i+8,,keep,keep
*enddo
*do,i,1,8
ASBA,i+24,i+16,,keep,keep
*enddo
*do,i,1,8
ASBA,i+24,i+16,,keep,keep
*enddo
adele,1,32
numcmp,area
!挖洞
*do,i,1,8
WPOFFS,-DZX(i),0,H(i)
RECTNG,-dong(i)/2,dong(i)/2,-dong(i)/2,dong(i)/2
WPAVE,0,0,0
*enddo
*do,i,1,8
WPOFFS,0,-DZX(i),H(i)
RECTNG,-dong(i)/2,dong(i)/2,-dong(i)/2,dong(i)/2
WPAVE,0,0,0
*enddo
!布尔操作挖掉孔
*do,i,1,8
ASBA,i,i+8,,keep,keep
*enddo
*do,i,1,8
ASBA,i+24,i+16,,keep,keep
*enddo
adele,1,32
numcmp,area
!将8个面i沿法线方向平移KH(i),生成体
*do,i,1,8
VOFFST,i,KH(i)
*enddo
!生成1根柱子,把所有实体组合起来成一个实体
BLC5,WZ(1),WZ(2),Z(1),Z(2),Z(3)
VADD,all
!划分网格
type,1
mat,1
esys,0
ESIZE,15 !控制单元边长进行网格划分
!MSHAPE,0 !定义单元划分形状
MSHKEY,0 !自由网格划分
MOPT,TRANS,2
VMESH,all !以某个单元进行划分
FINISH
!显示设置
/ANGLE,1,-30,ZS,1
/ANGLE,1,-60,XS,1
!显示线
!kplot
!lplot
!aplot
vplot
!显示单元编号
!/PNUM,kp,1
!/PNUM,line,1
!/PNUM,AREA,1
/PNUM,VOLUME,1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!进行模态分析并且获得振型和频率!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*SET,aa,6!求解前a阶模态
/solu
anty,modal
asel,s,loc,z,-0.1,0.1
da,all,all
allsel,all
MODOPT,SUBSP,aa
mxpand,aa,,yes
LUMPM,1 !相对质量矩阵进行归一化处理
solv
/POST1
!定义频率数组
*DIM,FQ,ARRAY,aa,1 !定义数组
*DO,I11,1,aa
*GET,FQ(I11,1),MODE,I11,FREQ
*END DO
*STATUS,FQ,1,,1,,1,,
*CFOPEN,FRQ,dat
*VWRITE,FQ(1)
(F15.8)
*CFCLOS
|