相关命令流如下:
!可用下面的ANSYS命令流替代GUI选择方式来进行本实例的随机振动谱分析工作,以感叹号(!)开头的条目是注释。
/BATCH
/TITLE,PSD Analysis of the Beam-Shell Structure
!*
/PREP7
ET,1,SHELL63 ! 定义单元类型
ET,2,BEAM4
!*
R,1,0.002 ! 定义单元实常数
R,2,1.6E-5,2.1333E-11,2.133E-11,4E-3,4E-3
!*
MP,EX,1,2E11, !定义材料特性
MP,DENS,1,7.8E3,
MP,NUXY,1,0.3,
!*
K,1,,,, !建立梁结构有限元模型
K,2,,,0.6
K,3,,,1.2
K,4,,,1.8
!*
LSTR,1,2
LSTR,2,3
LSTR,3,4
!*
TYPE,2
MAT,1
REAL,2
ESYS,0
LESIZE,ALL,,,6,1,
LMESH,ALL
LGEN,2,ALL,,,,0.5,,,0
LGEN,2,ALL,,,0.5,,,,0
LSEL,R,LOC,X,0.5
LGEN,2,ALL,,,0.5,,,,0
LSEL,ALL
!*
/VIEW,1,-0.5,-0.9,1 !调整视图
/VUP,1,Y
/REPLOT
!*
A,2,6,14,10 !建立板壳结构有限元模型
TYPE,1
MAT,1
REAL,1
ESYS,0
ALLSEL,BELOW,AREA
LESIZE,ALL,,,5,1
AMESH,1
!*
AGEN,2,1,,,0.5
AGEN,2,ALL,,,,,0.6
ASEL,R,LOC,Z,1.2
AGEN,2,ALL,,,,,0.6
ALLSEL,ALL
!*
NUMMEG,ALL,,, !合并重复元素
NUMCMP,ALL
NSEL,R,LOC,Z,0 !添加边界条件
D,ALL,,,,,,ALL
ALLSEL,ALL
!*
/SOLU
ANTYPE,2 !模态分析
MODOPT,LANB,10,0,100, ,OFF
EQSLV,SPAR
MXPAND,10, , ,1
LUMPM,0
PSTRES,0
SOLVE
FINISH
!*
/SOLU
ANTYPE,8 !谱分析
SPOPT,PSD,10,1 !PSD分析,计算单元应力
PSDUNIT,1,DISP,386.4, !位移谱
!*
PSDFRQ,1, ,0.5,1.0,2.4,3.8,17 !定义频率-谱值表中的频率
PSDFRQ,1, ,18,20,32, ,
!*
PSDVAL,1,0.01e-3,0.02e-3,0.016e-3,0.02e-3,0.005e-3
PSDVAL,1,0.01e-3,0.015e-3,0.01e-3, ,
!*
NSEL,R,LOC,Z,0
D,ALL,UY,1.0 !施加节点位移谱
ALLSEL,ALL
!*
PFACT,1,BASE, !计算参与系数
PSDRES,DISP,ABS !定义输出控制
PSDRES,VELO,ABS
PSDRES,ACEL,ABS
!*
SOLVE
FINISH
!*
/SOLU
ANTYPE,8
PSDCOM,0.005,10 !定义PSD模态合并有效阀值和合并的模态数
SOLVE
FINISH
!*
/POST1
SET,FIRST !读入第一个载荷子步
SET,LIST
PRNSOL,DOF, !显示节点位移
PRESOL,ELEM !按单元格式显示单元结果
PRRSOL,F !显示约束反力
SET, , ,1, , , ,12, !读入第十二个载荷子步,也就是载荷步3的第一个子步
PLNSOL,S,EQV,0,1 !云图显示等效应力
NSORT,S,EQV,0,1, ,0 !按节点等效应力降序排列结果
PRNSOL,S,PRIN
FINISH
!*
/POST26
FILE
FILE,'CH13','rst','.'
/UI,COLL,1
NUMVAR,200
STORE,PSD,1 !存储频率矢量到变量1
NSOL,2,245,U,Y,UY-245
RPSD,3,2,,1,1,
RPSD,4,2,, 2,1,
RPSD,5,2,,3,1,
!*
PLTIME,0,4
/AXLAB,X,Frequency
/AXLAB,Y,Displacement-Y
PLVAR,3 !绘制节点245在Y方向上的位移响应曲线
/AXLAB,X,Frequency
/AXLAB,Y,Velocity-Y
PLVAR,4 !绘制节点245在Y方向上的速度响应曲线
/AXLAB,X,Frequency
/AXLAB,Y,Acceleration-Y
PLVAR,5 !绘制节点245在Y方向上的加速度响应曲线
RESET !初始化POST26后处理器的设置
NSOL,2,245,U,Y,UY-245 !定义变量2(节点245的Y向位移)
NSOL,3,240,U,Y,UY-240 !定义变量3(节点240的Z向位移)
!*
CVAR,4,2,3,1,1, !计算两节点间位移协方差
*GET,U245,VARI,4,EXTREM,CVAR !提取协方差值
FINISH |