APDL命令-中级篇

更新时间:2024-05-08 14:57:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

一、正弦曲线

finish /clear

/FILNAME,sin,1 /prep7 k,100

CIRCLE,100,1,,,90 !Circle,pcent,rad,paxis,pzero,arc,nseg 产生圆弧线。

!该圆弧线为圆的一部分,依参数状况而定,与目前所在的坐标

系统无关,点的号码和圆弧的线段号码会自动产生。

!Pcent为圆弧中心坐标点的号码; !RAD :圆的半径,若此值不输,则半径的定义为PCENT

到PZERO的距离

!paxis 定义圆心轴正方向上任意点的号码;

!Pzero定义圆弧线起点轴上的任意点的号码,此点不一

定在圆上;

!ARC :弧长(以角度表示),若输入为正值,则由开始轴

产生一段弧长,若没输和,产生一个整圆。

!NSEG :圆弧欲划分的段数,此处段数为线条的数目,非

有限元网格化时的数目。默认为4。

csys,1

KFILL,1,2,4,3,1 !KFILL,NP1,NP2,NFILL,NSTRT,NINC,SPACE 点的填充命令

!是自动将两点NP1,NP2间,在现有的坐标系下填充许多点,两点间填

充点的个数(NFILL)及分布状态视其参数(NSTRT,NINC,SPACE)而定,

!系统设定为均分填充。如语句 FILL,1,5,则平均填充3个点在1 和5 之间。 csys,0

k,7,1+3.1415926/2 /pnum,kp,on /pnum,line,on KFILL,1,7,4,8,1

KGEN,2,7,11,1,,1 !Kgen,itime,Np1,Np2,Ninc,Dx,Dy,Dz,kinc,noelem,imove

!注意:MAT,REAL,TYPE 将一起拷贝,不是当前的MAT,REAL,TYPE

!Itime:拷贝份数

!Np1,Np2,Ninc:所选关键点 !Dx,Dy,Dz:偏移坐标

!Kinc:每份之间关键点号增量

!noelem: “0” 如果附有节点及单元,则一起拷贝。 ! “1”不拷贝节点和单元 !imove: “0” 生成拷贝

! “1”移动原关键点至新位置,并保持号码,

此时(itime,kinc,noelem)被忽略

LSTR,8,13 LSTR,9,14 LSTR,10,15

LSTR,11,16

LANG,2,3,90 !Lang,nl1,p3,ang,phit,locat 产生一新的线段,此新的线段与已存

在的线段nl1的夹角为ang,phit为新产生点的号码

LANG,3,4,90 LANG,4,5,90 LANG,5,6,90

BSPLIN,1,17,18,19,20,12 !Bsplin,p1,p2,p3,p4,p5,p6,xv1,yv1,zv1,xv6,yv6,zv6

通过6点拟合一条曲线,并定义两端点的斜率。

!SPLINE,1,17,18,19,20,12 !spline,p1,p2,p3,p4,p5,p6,xv1,yv1,zv1,xv6,yv6,zv6

通过6点拟合曲线,在每点之间形成一新线段,并可以定义两端点的斜率。

lsel,all lseL,u,,,14 LDELE,all,,,1 allsel,all

NUMCMP,line KWPAVE,12

csys,4 !csys,kcn 声明坐标系统,系统默认为卡式坐标(csys,0)。 !kcn = 0 笛卡尔坐标系 (x,y,z) ! 1 柱坐标系 (r,θ,z) ! 2 球坐标系 (r,θ,ф) ! 4 工作平面坐标系 (wx,wy,wz) ! 5 柱坐标系(以Y轴为轴心)(r,y,θ)

! n 已定义的局部坐标系 lsymm,x,1

NUMMRG, KP,,,,LOW !Nummrg,label,toler, Gtoler,action,switch 合并相同位置的item !label: 要合并的项目

! node: 节点, Elem,单元,kp: 关键点 Line:线,area:面,volu:体

! mat: 材料,type: 单元类型,Real: 实常数 ! cp:耦合项,CE:约束项,CE: 约束方程,

All:所有项

!toler: 公差

!Gtoler:实体公差

!Action: sele 仅选择不合并 ! 空 合并

!switch: 较低号还是较高号被保留(low, high) !注意:可以先选择一部分项目,再执行合并。如果多次发生合并命令,

一定要先合并节点,再合并关键点。

!合并节点后,实体荷载不能转化到单元,此时可合并关键点解决问题。 LCOMB, ALL,,0 !Lcomb,nl1,nl2,keep

!将两条相邻的线合并为一条线,keep=0时原线段删除,keep=1时保留。 KWPAVE,1 LGEN,,all,,,-1,,,,,1

习题(自选)、过一点作圆的切线

1、以圆心与点的连线为直径作圆与初始圆产生交点(即切点)

fini

/cle

/filname,tangent1,1 /title,tangent1 /prep7 r1=10 xb=30 yb=20 k,1

k,2,xb,yb circle,1,r1 cyl5,0,0,xb,yb

ADELE,1,,,0 !Adele,na1,na2,ninc,kswp

!kswp=0时只删除掉面积本身,=1时低单元一并删除。 !KFILL,1,2,1,100 !CIRCLE,100,,,1 /pnum,line,on /pnum,kp,on LOVLAP,4,7 lstr,2,11

NUMCMP,line LDELE,5,7,1,1 ldele,10,11,1,1 save

2、直接用解析法算出切点

fini /cle

/filname,tangent2,1 /title,tangent2 /prep7 r1=10 xb=30 yb=20

r2=sqrt(xb*xb+yb*yb) theta=acos(r1/r2) theta1=asin(yb/r2)

xb1=r1*cos(theta-theta1) yb1=-r1*sin(theta-theta1) k,1

k,2,xb,yb k,3,xb1,yb1 CIRCLE,1,r1 lstr,2,3 save

二、相交圆柱体

fini /cle

/filname,cylinder,1 /prep7

/pnum,volu,on

CYLIND,15,30,0,80 wpoffs,0,50,50 WPROTA,0,-60 csys,4

CYLIND,6,12,0,-50 vovlap,all

VDELE,3,5,2,1

BLOCK,-2,2,-9,-12,0,-8

WPSTYL,,,,,,1 !设置工作平面坐标系为极坐标系(即圆柱坐标系) csys,4

VGEN,3,1,,,,120 vsbv,6,1 vsbv,5,2 vsbv,1,3

wprota,0,0,90

vsbw,all !用工作平面切割体 VDELE,6,9,3 vdele,1 vadd,all fini

习题2.1(a)、轴

习题2.1(b)、底座

/prep7

CYLIND,15,34,0,8 CYL4,27,0,2.5,,,,8 WPSTYL,,,,,,1 csys,4

VGEN,6,2,,,,60 wpstyl wpoffs,,,8 csys,4

CYLIND,15,22,0,50

BLOCK,-4,4,10,16.65,-8,50 WPoffs,0,0,40 wprota,0,0,90 CYLIND,3,,0,22 vsbv,8,10 vsel,s,,,2,7,1

CM,vv1,volu !cm, cname, entity 定义组件,将几何元素分组形成组件 !cname: 自己定义的组件名

!entity: 组元的类型(volu, area, line, kp, elem, node) vsel,all vsbv,1,vv1 VADD,8,11 vsbv,1,9

WPROTA,0,90 vsbw,all vdele,1,,,1

三、螺栓

fini /cle

/filname,bolt,1 /title,bolt /prep7 csys,1 K,1,8,0,-2, K,2,8,90,-1.5, K,3,8,180,-1, K,4,8,270,-0.5, K,5,8,0,0, L,1,2 L,2,3 L,3,4 L,4,5

LGEN,7,all,,,,,2

NUMMRG,KP,,,,LOW lcomb,all

K,80,8+1.5/4,90,12+2/4

K,81,8+2*1.5/4,180,12+2*2/4 K,82,8+3*1.5/4,270,12+3*2/4 K,83,8+4*1.5/4,0,12+4*2/4 L,35,80 L,80,81 L,81,82 L,82,83 CSYS,0

K,90,8,0,-0.25 K,91,6.918,0,-2 K,92,6.918,0,0 /PNUM,KP,1 /PNUM,LINE,1 L,1,90 L,91,92

LANG,7,90,60 LANG,7,1,120 al,6,9,10,11

VDRAG,1,,,,,,1,2,3,4,5 ! Preprocessor>Modeling>Operate>Extrude>Areas>Along Lines !VDRAG,NA1,NA2,NA3,NA4,NA5,NA6,NLP1,NLP2,NLP3,NLP4,NLP5,NLP6 !由一组面积(NA1~NA6),延某组线段(NL1~NL6)为路径,拉伸而成体。 CYLIND,7.9, ,0,40,0,360 vsel,s,,,1,5,1

CM,v1,volu alls

VSBv,6,v1 k,93,6.5,0,0 k,94,9.5,0,3 k,95

k,96,0,0,30 lstr,93,94

AROTAT,6,,,,,,95,96,360 ! Preprocessor>Modeling>Operate>Extrude>Lines>About Axis !AROTAT,NL1,NL2,NL3,NL4,NL5,NL6,PAX1,PAX2,ARC,NSEG !旋转一组已知线段(NL1~NL6)

!为绕着某轴(PAX1,PAX2为轴上的任意两点,并定义轴的方向),

!旋转角度为ARC,NSEG为在旋转角度方向可分的数目。 asel,s,,,1,4,1 vsba,7,all asel,all vdele,1,,,1

rprism,40,50,6,,13.1 !Rprism,z1,z2,nsides,lside,majrad,minrad

!建立一个正多边形体积,z1,z2为z方向长度的范围,

!边数为nsides;边长lside;或外接圆半径majard;或内切圆minrad。

cone,34.8,5.5,30,55,0,360 !Cone,rtop,rbot,z1,z2,theta1,theta2

!建立一个圆锥体积。Rtop为圆锥上平面的半径;

!rbot为圆锥下平面的半径;theat1,theta2为圆锥的起始、终结角度。

vinv,1,3

vplot fini

四、杯子

fini /cle

/filname,cup,1 /title,cup /prep7 k,1 k,2,39.5 k,3,50,0,120 k,4,0,0,120 l,1,2 l,2,3

LFILLT,2,1,20 !lfillt,NL1, NL2, RAD, PCENT 对两相交的线进行倒圆角。

!在两条相交的线段(NL1,NL2)间产生一条半径等于RAD的圆角线段,

同是自动产生三个点,其中两个点在NL1,NL2上,是新曲线与NL1,NL2相切的点,第三个点是新曲线的圆心点(PCENT,若PENT=0则不产生该点)

k,11,0,0,3 k,12,39.5,0,3 k,13,36.5,0,0 k,14,47,0,120 l,11,12 l,13,14

LPTN,4,5 !LPTN,NL1,NL2,?,NL8,NL9(线间相互分割) LDELE,7,8,1,1 LFILLT,6,9,17 l,3,14 l,1,11 al,all

vROTAT,all,,,,,,1,4,360 k,51,0,0,103 k,52,78,0,103 k,53,78,0,46 l,51,52 l,52,53

k,54,39.5,0,120 k,55,39.5,0,-100 l,54,55

lang,56,53,120 ldele,56,57,1,1 LFILLT,54,55,13 LFILLT,55,58,28 WPOFFS,0,0,103 wprota,0,0,90

csys,4 k,81,2,-5 k,82,2,5 k,83,-2,5 k,84,-2,-5 l,81,82 l,82,83 l,83,84 l,81,84

LFILLT,59,60,1 LFILLT,60,61,1 LFILLT,61,62,1 LFILLT,59,62,1

al,59,60,61,62,63,64,65,66 VDRAG,33,,,,,,54,56,55,57,58 asel,s,,,4 asel,a,,,28 cm,a1,area VSBA,5,a1 alls

VSBA,9,a1

VDELE,10,12,2,1 vadd,all fini

六、平面桁架

fini /cle

/filname,truss2,1 /prep7 l=0.1 a=1e-4

ET,1,beam3 R,1,a

MP,ex,1,2e11 mp,prxy,1,0.3 n,1,0,0,0 n,2,l,0,0 n,3,2*l,0,0 n,4,l,l,0 E,1,2 e,2,3 e,1,4 e,2,4 e,3,4 fini /solu

D,1,ux,0,,,,uy d,3,uy,0 F,4,fy,-2000 solve fini /post1

ETABLE,FA,smisc,1 ETABLE,SA,ls,1 pretab,fa,sa PLNSOL,u,y,2 Fini

习题6.1(1)、平面桁架

fini

/cle

/filname,truss3,1 /prep7 a=0.3 b=0.5 x=1e-4 ET,1,beam3 R,1,x

MP,ex,1,2e11 mp,prxy,1,0.3 n,1,-a n,2 n,3,a n,4,0,-b e,1,4 e,2,4 e,3,4 fini /solu

D,1,ux,0,,,,uy D,2,ux,0,,,,uy D,3,ux,0,,,,uy F,4,fy,-2000 solve fini /post1

ETABLE,FA,smisc,1 ETABLE,SA,ls,1 pretab,fa,sa fini

习题6.1(2)、平面桁架

fini

/cle

/filname,truss4,1 /prep7 a=0.3 b=0.5 x=1e-4 ET,1,beam3 R,1,x

MP,ex,1,2e11 mp,prxy,1,0.3 MP,ex,2,1.03e11 mp,prxy,2,0.3 n,1,-a n,2 n,3,a n,4,0,-b TYPE,1 real,1 mat,1 e,1,4 e,3,4 mat,2 e,2,4 fini /solu

D,1,ux,0,,,,uy D,2,ux,0,,,,uy D,3,ux,0,,,,uy F,4,fy,-2000 solve fini /post1

ETABLE,FA,smisc,1 ETABLE,SA,ls,1 pretab,fa,sa fini

七、悬臂梁

fini /cle

/filname,cantilever beam,1 /prep7

ET,1,BEAM3

R,1,14.435e-4,245e-8,0.1 MP,EX,1,2e11 MP,nuXY,1,0.3 N,1,0,0,0 N,2,1,0,0 E,1,2 FINI /SOL D,1,all,0

F,2,fy,-10000 solve fini

/post1 PLDISP,2 FINISH

八、厚壁圆筒

/cle

/filname,thick cylinder,1 /prep7

et,1,plane183,,,2 MP,ex,1,2e11 mp,prxy,1,0.3

PCIRC,0.05,0.1,0,90 MSHKEY,1 MSHAPE,0,2d LESIZE,4,,,6 lesize,3,,,8 AMESH,1 fini /sol

DL,4,1,uy,0 DL,2,1,ux,0 SFL,3,pres,10e6 solve fini /post1

PATH,p1,2 !PATH,NAME,nPts,nSets,nDiv(定义路径属性) !PATH,STATUS(查看所定义的路径)

PPATH,1,30 !PPATH,POINT,NODE,X,Y,Z,CS(定义路径上的点) PPATH,2,1

PDEF,sr,s,x !PDEF,Lab,Item,Comp,Avglab(将数据影射到路径上) !PDEF,STAT(查看路径所包含的数据项) !PDEF,CLEAR(清除所有用户定义的数据项) PDEF,st,s,y

plpath,sr,st !PLPATH,Lab1,Lab2,Lab3,Lab4,Lab5,Lab6

(绘制路径上一数据项关于另一数据项的变化曲线图)

习题8.1、薄板(按对称性分析)

fini /cle

/filname,sheet,1 /prep7

et,1,plane183 KEYOPT,1,3,3 R,1,0.002 MP,ex,1,2e11 mp,prxy,1,0.3

RECTNG,0,0.05,-0.015,0.015 PCIRC,0.0075/2,,-90,90 asba,1,2

SMRTSIZE,3 mshape,0 mshkey,0,2d amesh,3 fini /sol

DL,8,3,ux,0 DL,9,3,ux,0

SFL,2,pres,3000 solve fini /post1

PLNSOL,s,x PATH,p1,2

PPATH,1,,0,-0.015 PPATH,2,,0,0.015 PDEF,s1,s,x PLPATH,s1

习题8.1、薄板

fini /cle

/filname,sheet,1 /prep7

et,1,plane183 KEYOPT,1,3,3 R,1,0.002 MP,ex,1,2e11 mp,prxy,1,0.3

RECTNG,-0.05,0.05,-0.015,0.015 PCIRC,0.0075/2,,0,360 asba,1,2

SMRTSIZE,3 mshape,0 mshkey,0,2d amesh,3 fini /sol

SFL,2,pres,-3000 SFL,4,pres,-3000 solve fini /post1

PLNSOL,s,x PATH,p1,2

PPATH,1,,0,-0.015 PPATH,2,,0,0.015 PDEF,s1,s,x PLPATH,s1

九、扳手

fini /cle

/filname,spanner,1 /prep7

et,1,plane42 et,2,solid45 mp,ex,1,2e11 MP,prxy,1,0.3

RPR4,6,0,0,0.01 k,7

k,8,,,0.05 k,9,,0.1,0.05 lstr,7,8 lstr,8,9

LFILLT,7,8,0.015 lstr,1,4 ASBL,1,10 mshkey,1,2d mshape,0 lsel,s,,,1,3,1 LESIZE,all,,,3 alls

lsel,s,,,7,9,1 lesize,all,0.01 alls

AMESH,2,3 asel,s,loc,z,0

VDRAG,all,,,,,,7,9,8 alls

ACLEAR,2,3,1 eplot,all fini /sol DA,2,all DA,3,all

ksel,s,,,24,29,1 FK,all,fx,100 ksel,all solve

!在工作平面上生成一个规则多边形面或棱柱体. !THETA:从工作平面X轴到多边形面或棱柱体顶点生成第一个关

键点的角度,单位为度.

!ACLEAR,NA1,NA2,NINC(清除面单元网格) !RPR4, NSIDES, XCENTER, YCENTER, RADIUS, THETA, DEPTH fini /post1 pldisp,2

PLNSOL,s,eqv !显示模型外表面各点的结果

!eqv即von mises stress,为第四强度理论的当量应力 wpoffs,,,0.02

/type,1,sect !利用切片图可以显示模型内部各点的结果 !/TYPE,WN,Type(定义显示类型) /cplane,1 !/CPLANE,KEY(定义切平面) /replot Fini

习题9.3、轧机机架

fini /cle

/filname,machine bracket,1 /prep7

et,1,plane42 et,2,solid45 mp,ex,1,2e11 MP,prxy,1,0.3 k,1 k,2,1

k,3,1.6,1.8 k,4,2.25,1.8 k,5,2.25,2.2 k,6,1.8,2.2 k,7,1.6,2.4 k,8,1.6,7.3 k,9,0,7.3 k,10,0,1.01 k,11,0.4,1.01 k,12,0.4,1.99 k,13,0.65,1.99 k,14,0.65,6.29 k,15,0,6.29 k,16,0.15,6.29 k,17,0.15,1.01

LSTR, 1, LSTR, 2, LSTR, 3, LSTR, 4, LSTR, 5, LSTR, 6, LSTR, 7, LSTR, 8, LSTR, 9, LSTR, 15, LSTR, 16, LSTR, 14, LSTR, 13, LSTR, 12, LSTR, 11, LSTR, 17, LSTR, 10, 2 3 4 5 6 7 8 9 15 16 14 13 12 11 10 1

17 LFILLT,1,2,0.29 LFILLT,7,8,0.6 LFILLT,11,12,0.1 LFILLT,12,13,0.1 LFILLT,14,15,0.1 al,all

arSYM,X,all, , , ,0,0 !Arsym,ncomp,na1,na2,ninc,kinc,noelem,imove !复制一组面积,对称于轴ncomp;kinc为每次复制时面积号码的增加量。 aadd,all

k,100,0,0,0.65 lstr,1,100 mshkey,0,2d mshape,0 smrtsize,1 amesh,all

VDRAG,all,,,,,,9 fini /sol da,3,uz da,42,uz asel,s,,,22,23 asel,a,,,32,33 SFA,all,,pres,1e7 alls solve /post1

plnsol,s,eqv,2

十、圆轴扭转分析

fini /cle

/filname,torsion analysis,1 /prep7

et,1,plane183 et,2,solid186 mp,ex,1,2.08e11 MP,prxy,1,0.3

rectng,0,0.025,0,0.12 lesize,1,,,5 LESIZE,2,,,8 mshape,0 mshkey,1,2d amesh,1

EXTOPT,esize,5 extopt,aclear,1 VROTAT,1,,,,,,1,4 WPROTA,,-90

CSWPLA,11,1,1,1 nsel,s,loc,x,0.025

nrotat,all fini /sol

d,all,ux,0

nsel,r,loc,z,0.12 f,all,fy,1500 alls da,2,all da,6,all da,10,all da,14,all solve fini /post1

rsys,11 nsel,s,loc,z,0.045 nsel,r,loc,y,0 prnsol,u,y

nsel,s,loc,z,0,0.045

!设置挤出段数为5

!EXTOPT,Lab,Val1,Val2,Val3(扫掠体生成控制选项)!设置挤出操作时清除面单元 !CSWPLA,KCN,KCS,PAR1,PAR2

(根据当前定义的工作平面定义局部坐标系)

!NROTAT,NODE1,NODE2,NINC

(使节点坐标系方向与当前坐标系方向一致)

,KCN(定义结果坐标系) !RSYS ESLN,r,1,1 !ESLN, Type, EKEY, NodeType(选择已选节点上的单元) plesol,s,yz !显示剪应力τyz alls save fini

十一、均匀直杆的固有频率分析

fini

本文来源:https://www.bwwdw.com/article/gbwg.html

Top