Ansys APDL (经典)完整框架分析—Ansys经典培训

2017-03-18  by:CAE仿真在线  来源:互联网

Ansys经典培训 选仿真在线

这是一个Ansys APDL (经典)完整分析框架,还在学习如何写apdl代码的同学,可以参考:

!********************提示********************************************
!第一步:建立框架结构模型
!第二步:框架结构施加重力荷载
!第三步:框架结构施加活荷载
!第四步:框架结构施加风荷载
!第五步:框架结构荷载组合运算
!第六步:框架结构模态分析
!第七步:框架结构屈曲特征值分析
!第八步:框架结构地震时程弹性分析
!第九步:结束

!采用地震波时间文件为:TIME.TXT
!采用地震波文件分别为:AC_X.TXT/AC_Y.TXT

FINISH
/CLEAR
/FILENAME,FRAME_SHEAR_WALL
/TITLE, FRAME_SHEAR_WALL

!**************************************************************************
!************************第一步********************************************
!********************框架结构建模型***************************************

/PREP7

!采用单位为N/m/S国际单位制

!定义单元类型
ET,1,BEAM4
ET,2,SHELL63

!定义实常数
R,1,0.25,0.0052,0.0052,0.5,0.5
R,2,0.2025,0.0034,0.0034,0.45,0.45
R,3,0.06,0.0002,0.00045,0.3,0.2
R,4,0.25,0.25,0.25,0.25
R,5,0.1,0.1,0.1,0.1

!定义材料参数
MP,EX,1,3.0E10
MP,NUXY,1,0.2
MP,DENS,1,2500

!关键点
*DO,II,1,1
K,1+(II-1)*20,0,0,(II-1)*6
K,2+(II-1)*20,6,0,(II-1)*6
K,3+(II-1)*20,12,0,(II-1)*6
K,4+(II-1)*20,17,0,(II-1)*6
K,5+(II-1)*20,0,5,(II-1)*6
K,6+(II-1)*20,6,5,(II-1)*6
K,7+(II-1)*20,12,5,(II-1)*6
K,8+(II-1)*20,17,5,(II-1)*6
K,9+(II-1)*20,0,10,(II-1)*6
K,10+(II-1)*20,6,10,(II-1)*6
K,11+(II-1)*20,12,10,(II-1)*6
K,12+(II-1)*20,17,10,(II-1)*6
K,14+(II-1)*20,6,1.875,(II-1)*6
K,16+(II-1)*20,6,3.125,(II-1)*6
K,18+(II-1)*20,6,1.875,3.9
K,20+(II-1)*20,6,3.125,3.9
*ENDDO

*DO,II,1,10
K,1+II*20,0,0,(II-1)*3+6
K,2+II*20,6,0,(II-1)*3+6
K,3+II*20,12,0,(II-1)*3+6
K,4+II*20,17,0,(II-1)*3+6
K,5+II*20,0,5,(II-1)*3+6
K,6+II*20,6,5,(II-1)*3+6
K,7+II*20,12,5,(II-1)*3+6
K,8+II*20,17,5,(II-1)*3+6
K,9+II*20,0,10,(II-1)*3+6
K,10+II*20,6,10,(II-1)*3+6
K,11+II*20,12,10,(II-1)*3+6
K,12+II*20,17,10,(II-1)*3+6
K,13+II*20,0,1.875,(II-1)*3+6
K,14+II*20,6,1.875,(II-1)*3+6
K,15+II*20,0,3.125,(II-1)*3+6
K,16+II*20,6,3.125,(II-1)*3+6
K,17+II*20,0,1.875,(II-1)*3+6+1.5
K,18+II*20,6,1.875,(II-1)*3+6+2
K,19+II*20,0,3.125,(II-1)*3+6+1.5
K,20+II*20,6,3.125,(II-1)*3+6+2
*ENDDO

*DO,II,11,11
K,1+II*20,0,0,(II-1)*3+6
K,2+II*20,6,0,(II-1)*3+6
K,3+II*20,12,0,(II-1)*3+6
K,4+II*20,17,0,(II-1)*3+6
K,5+II*20,0,5,(II-1)*3+6
K,6+II*20,6,5,(II-1)*3+6
K,7+II*20,12,5,(II-1)*3+6
K,8+II*20,17,5,(II-1)*3+6
K,9+II*20,0,10,(II-1)*3+6
K,10+II*20,6,10,(II-1)*3+6
K,11+II*20,12,10,(II-1)*3+6
K,12+II*20,17,10,(II-1)*3+6
K,13+II*20,0,1.875,(II-1)*3+6
K,14+II*20,6,1.875,(II-1)*3+6
K,15+II*20,0,3.125,(II-1)*3+6
K,16+II*20,6,3.125,(II-1)*3+6
K,17+II*20,0,1.875,(II-1)*3+6+1.8
K,18+II*20,6,1.875,(II-1)*3+6+2.5
K,19+II*20,0,3.125,(II-1)*3+6+1.8
K,20+II*20,6,3.125,(II-1)*3+6+2.5
*ENDDO

*DO,II,12,12
K,1+II*20,0,0,39.5
K,2+II*20,6,0,39.5
K,3+II*20,12,0,39.5
K,4+II*20,17,0,39.5
K,5+II*20,0,5,39.5
K,6+II*20,6,5,39.5
K,7+II*20,12,5,39.5
K,8+II*20,17,5,39.5
K,9+II*20,0,10,39.5
K,10+II*20,6,10,39.5
K,11+II*20,12,10,39.5
K,12+II*20,17,10,39.5
*ENDDO

*DO,II,2,13
L,(II-1)*20+1,(II-1)*20+2
L,(II-1)*20+2,(II-1)*20+3
L,(II-1)*20+3,(II-1)*20+4
L,(II-1)*20+5,(II-1)*20+6
L,(II-1)*20+6,(II-1)*20+7
L,(II-1)*20+7,(II-1)*20+8
L,(II-1)*20+9,(II-1)*20+10
L,(II-1)*20+10,(II-1)*20+11
L,(II-1)*20+11,(II-1)*20+12
L,(II-1)*20+5,(II-1)*20+9
L,(II-1)*20+6,(II-1)*20+10
L,(II-1)*20+3,(II-1)*20+7
L,(II-1)*20+7,(II-1)*20+11
L,(II-1)*20+4,(II-1)*20+8
L,(II-1)*20+8,(II-1)*20+12
*ENDDO

*DO,II,1,12
L,(II-1)*20+1,II*20+1
L,(II-1)*20+2,II*20+2
L,(II-1)*20+3,II*20+3
L,(II-1)*20+4,II*20+4
L,(II-1)*20+5,II*20+5
L,(II-1)*20+6,II*20+6
L,(II-1)*20+7,II*20+7
L,(II-1)*20+8,II*20+8
L,(II-1)*20+9,II*20+9
L,(II-1)*20+10,II*20+10
L,(II-1)*20+11,II*20+11
L,(II-1)*20+12,II*20+12
*ENDDO


*DO,II,1,1
L,(II-1)*20+14,(II-1)*20+18
L,(II-1)*20+16,(II-1)*20+20
*ENDDO

*DO,II,2,12
L,(II-1)*20+13,(II-1)*20+17
L,(II-1)*20+15,(II-1)*20+19
L,(II-1)*20+14,(II-1)*20+18
L,(II-1)*20+16,(II-1)*20+20
*ENDDO

A, 1, 21, 25, 5

*DO,II,2,12
A, (II-1)*20+1, II*20+1, II*20+5, (II-1)*20+5, (II-1)*20+15, (II-1)*20+19, (II-1)*20+17, (II-1)*20+13
*ENDDO

*DO,II,1,12
A, (II-1)*20+2, II*20+2, II*20+6, (II-1)*20+6, (II-1)*20+16, (II-1)*20+20, (II-1)*20+18, (II-1)*20+14
*ENDDO

*DO,II,1,12
A, II*20+1, II*20+2, II*20+6, II*20+5
A, II*20+2, II*20+3, II*20+7, II*20+6
A, II*20+3, II*20+4, II*20+8, II*20+7
A, II*20+5, II*20+6, II*20+10,II*20+9
A, II*20+6, II*20+7, II*20+11,II*20+10
A, II*20+7, II*20+8, II*20+12,II*20+11
*ENDDO

!立柱网格划分
LSEL,S,,,181,192!底层立柱
LATT,1,1,1
LESIZE,ALL,,,10
LMESH,ALL

LSEL,S,,,192,324!2~12层立柱
LATT,1,2,1
LESIZE,ALL,,,5
LMESH,ALL

!梁网格划分
LSEL,S,,,1,180
LATT,1,3,1,
LESIZE,ALL,,,8
LMESH,ALL

!剪力墙网格划分
LSEL,S,,,372!外剪力墙两端、内剪力墙顶端
LSEL,A,,,413
LSEL,A,,,461
LESIZE,ALL,,,8

LSEL,s,,,418!内剪力墙底端
LSEL,A,,,420
LESIZE,ALL,,,3

LSEL,s,,,325!内剪力墙底端内侧
LSEL,A,,,326
LESIZE,ALL,,,6

LSEL,S,,,375!剪力墙空洞顶部
LSEL,A,,,379
LSEL,A,,,383
LSEL,A,,,387
LSEL,A,,,391
LSEL,A,,,395
LSEL,A,,,399
LSEL,A,,,403
LSEL,A,,,407
LSEL,A,,,411
LSEL,A,,,415
LSEL,A,,,419
LSEL,A,,,423
LSEL,A,,,427
LSEL,A,,,431
LSEL,A,,,435
LSEL,A,,,439
LSEL,A,,,443
LSEL,A,,,447
LSEL,A,,,451
LSEL,A,,,455
LSEL,A,,,459
LSEL,A,,,463
LESIZE,ALL,,,2

!剪力墙网格划分
ASEL,S,,,1,24
AATT,1,4,2
AMESH,ALL

!楼板网格划分
ASEL,S,,,25,96
AATT,1,5,2
AMESH,ALL


NSEL,S,LOC,Z,0!选取模型底端节点
D,ALL,ALL!施加位移约束
ALLSEL,ALL!重新选取所有节点

/eshape,1.0

/VIEW,1,1,1,1
/ANG,1,270,XM,0
/REPlot


FINISH


!**************************************************************************
!************************第二步********************************************
!********************框架结构施加重力荷载*********************************
!框架结构施加重力荷载
FINISH
/SOLU
ANTYPE,STATIC
NSEL,S,LOC,Z,0!选取模型底端节点
D,ALL,ALL!施加位移约束
ALLSEL,ALL!重新选取所有节点
ACEL,0,0,9.8
SOLVE
FINISH


/POST1
SET,FIRST
PLNSOL,U,Z,0,1
FINISH

!Ansys经典培训 选仿真在线

!**************************************************************************
!************************第三步********************************************
!*************框架结构施加楼面活荷载D=3KN/M^2*****************************
!框架结构施加楼面活荷载D=3KN/M^2
FINISH
/SOLU
ANTYPE,STATIC
NSEL,S,LOC,Z,0!选取模型底端节点
D,ALL,ALL!施加位移约束
ALLSEL,ALL!重新选取所有节点
ACEL,0,0,9.8
SOLVE
FINISH


/POST1
SET,FIRST
PLNSOL,U,Z,0,1
FINISH


!**************************************************************************
!************************第四步********************************************
!***********框架结构施加风荷载(基本风压=0.25KN/M^2,体形系数为1.0**********
!框架结构施加风荷载(先Y方向,后X方向)分两次分别施加
FINISH
/SOLU
ANTYPE,STATIC
*DIM,LOAD_1,ARRAY,12
LOAD_1(1)=3.78,2.16,2.39,2.57,2.72,2.84,2.95,3.17,3.20,3.29,3.39,3.51

*DIM,LOAD_2,ARRAY,12
LOAD_2(1)=7.56,4.32,4.78,5.14,5.44,5.68,5.90,6.34,6.40,6.58,6.76,7.02

*DIM,LOAD_3,ARRAY,12
LOAD_3(1)=6.93,3.96,4.38,4.71,4.99,5.21,5.41,5.81,5.87,6.03,6.20,6.44

*DIM,LOAD_4,ARRAY,12
LOAD_4(1)=3.15,1.80,1.99,2.14,2.27,2.37,2.46,2.64,2.67,2.74,2.82,2.93


*DIM,LOAD_A,ARRAY,12
LOAD_A(1)=3.15,1.80,1.99,2.14,2.27,2.37,2.46,2.64,2.67,2.74,2.82,2.93

*DIM,LOAD_B,ARRAY,12
LOAD_B(1)=6.30,3.60,3.98,4.28,4.54,4.74,4.92,5.28,5.34,5.48,5.64,5.86

*DIM,LOAD_C,ARRAY,12
LOAD_C(1)=3.15,1.80,1.99,2.14,2.27,2.37,2.46,2.64,2.67,2.74,2.82,2.93

*DO,II,1,12
FK,1+20*II,FY,LOAD_1(II)
*ENDDO

*DO,II,1,12
FK,2+20*II,FY,LOAD_2(II)
*ENDDO

*DO,II,1,12
FK,3+20*II,FY,LOAD_3(II)
*ENDDO

*DO,II,1,12
FK,4+20*II,FY,LOAD_4(II)
*ENDDO

SOLVE


FKDELE,ALL,ALL!第二次施加风荷载,删除第一次的。风有方向性
*DO,II,1,12
FK,1+20*II,FX,LOAD_A(II)
*ENDDO

*DO,II,1,12
FK,5+20*II,FX,LOAD_B(II)
*ENDDO

*DO,II,1,12
FK,9+20*II,FX,LOAD_C(II)
*ENDDO

SOLVE
FINISH

/POST1
SET,FIRST
PLNSOL,U,Y,0,1
SET,NEXT,
PLNSOL,U,X,0,1
FINISH

!**************************************************************************
!************************第五步********************************************
!************************框架结构荷载组合计算********************************
!框架结构荷载组合计算(1.D+L+WIND_X;2.D+L+WIND_Y)


!**************************************************************************
!************************第六步********************************************
!*******************框架结构模态分析**************************************
!框架结构模态分析
FINISH
/SOLU
ANTYPE,MODAL
MODOPT,LANB,6
MODOPT,LANB,6,0,0,,OFF
SOLVE
FINISH

/POST1
SET,LIST
SET,FIRST
PLDISP,0
SET,NEXT
PLSISP,0
SET,NEXT
PLSISP,0
SET,NEXT
PLSISP,0
SET,NEXT
PLSISP,0
SET,NEXT
PLSISP,0

FINISH

!**************************************************************************
!************************第七步********************************************
!****************框架结构特征值屈曲分析***********************************
!框架结构特征值屈曲分析
FINISH
/SOLU
ANTYPE,0
EQSLV,SPAR
PSTRES,ON
SOLVE
FINISH


/SOLU
ANTYPE,1
BUCOPT,LANB,6,0,0
MXPAND,6,0,0,1,0.001,
SOLVE
FINISH


/POST1
SET,LIST
SET,FIRST
PLDISP,2
SET,NEXT
PLDISP,2
SET,NEXT
PLDISP,2
SET,NEXT
PLDISP,2
SET,NEXT
PLDISP,2
SET,NEXT
PLDISP,2

FINISH


!**************************************************************************
!************************第八步********************************************
!****************框架结构地震时程分析*************************************
!框架结构地震时程分析
FINISH
*SET,NT,150
*DIM,TIME,,NT
*DIM,AC_X,,NT
*DIM,AC_Y,,NT

*CREATE,time
*VREAD,TIME,'TIME','txt',' ',1, , , , , ,
(F6.2)
*END
/INPUT,time

*CREATE,ac_x
*VREAD,AC_X,'AC_X','txt',' ',1, , , , , ,
(E10.3)
*END
/INPUT,ac_x

*CREATE,ac_y
*VREAD,AC_Y,'AC_Y','txt',' ',1, , , , , ,
(E10.3)
*END
/INPUT,ac_y

!Ansys经典培训 选仿真在线
!分析选项设置与求解
/SOLU!进入求解器
ANTYPE,TRANS!定义分析类型
NSUBST,1, , ,1!定义荷载子步数
*DO,II,1,NT
!施加加速度荷载
ACEL,AC_X(II),AC_Y(II)
TIME,TIME(II)!设置时间点
SOLVE!求解
*ENDDO

FINISH

/POST26
NSOL,2,733,U,X,UX_1
NSOL,3,773,U,X,UX_2
NSOL,4,748,U,X,UX_3
NSOL,5,788,U,X,UX_4

NSOL,6,733,U,Y,UY_1
NSOL,7,773,U,Y,UY_2
NSOL,8,748,U,Y,UY_3
NSOL,9,788,U,Y,UY_4

PLVAR,2,3,4,5
PLVAR,6,7,8,9


FINISH


!**************************************************************************
!************************第九步********************************************
!****************整个框架结构所有分析过程结束*****************************
FINISH

转自博客:http://blog.sina.com.cn/s/blog_713bace90100w691.html


开放分享:优质有限元技术文章,助你自学成才

相关标签搜索:Ansys APDL (经典)完整框架分析—Ansys经典培训 Ansys有限元培训 Ansys workbench培训 ansys视频教程 ansys workbench教程 ansys APDL经典教程 ansys资料下载 ansys技术咨询 ansys基础知识 ansys代做 Fluent、CFX流体分析 HFSS电磁分析 Abaqus培训 

编辑
在线报名:
  • 客服在线请直接联系我们的客服,您也可以通过下面的方式进行在线报名,我们会及时给您回复电话,谢谢!
验证码

全国服务热线

1358-032-9919

广州公司:
广州市环市中路306号金鹰大厦3800
电话:13580329919
          135-8032-9919
培训QQ咨询:点击咨询 点击咨询
项目QQ咨询:点击咨询
email:kf@1cae.com