求螺栓和法兰的接触教程或者实例
有哪位有这方面的教程或实例!或请告知在什么地方可以找到这样的信息!
谢谢诸位!
[ 本帖最后由 xinyuxf 于 2007-1-15 16:36 编辑 ] 推荐ansys workbench! 惭愧不知法兰与螺栓接触具体是何东东,可是螺栓的预紧力分析有,或许可以参考一下,就在ANSYS的HELP里面: 这里有一个例子,是出自一本书《ANSYS高级工程有限元分析范例精选》
!螺栓和法兰连接的接触分析(带预紧)
finish
/clear
/prep7
*set,rad_i,1250/2
*set,rad_pani,705
*set,rad_o,2450/2
*set,rad_pano,1830
*set,rad_b,180/2
*set,m_bolt,160
*set,m_bh1,350+170+50
*set,m_bh2,350+170+250
*set,m_nut,280/2
*set,h_nut,170
*set,rad_drill,2140/2
*set,rad_m,750+150
*set,h_m,18
*set,rad_bi,1950/2
*set,rad_bo,2330/2
*set,rad_bh,5
*set,f_rad,45
*set,fh_rad,1855/2
*set,r_fillt,125
*set,n,15
*set,key_w,290
*set,key_h,130
*set,th,200
*set,flang_h1,350
*set,flang_h2,350
*set,h_shaft,350+490
*set,h_sh,H_shaft+500
*set,pi,acos(-1)
*set,elemsize,60
/graphics,power
*set,disp_b,0.75
*set,zmax,h_sh
*set,f_ext,22.9215e+5*12
*set,f_eef,30.827e+5*12
*set,r_out,rad_pano
*set,t_w,375
*set,u_r,r_out-t_w
/prep7
et,1,185
mp,ex,1,2.06e5
mp,nuxy,1,0.29
mp,dens,1,7.85e-9
mp,ex,2,2.06e5
mp,nuxy,2,0.29
mp,dens,2,7.85e-9
mp,ex,3,2.06e5
mp,nuxy,3,0.29
mp,dens,3,7.85e-9
mp,mu,4,0.15
k,1,rad_i,0,h_m
k,2,rad_m,0,0
k,3,rad_i+th
k,4,rad_o,
k,5,rad_o,0,flang_h1
k,6,rad_m,0,flang_h1
k,7,rad_i+th,0,flang_h1
k,8,rad_i+th,0,h_shaft
k,9,rad_i,0,h_shaft
k,10,rad_i,0,flang_h1
k,11,rad_m,0,H_M
k,12,rad_i+th,0,H_sh
k,13,rad_i,0,h_sh
k,14,rad_bi,0,rad_bh
k,15,rad_bo,0,rad_bh
k,16,rad_bi
k,17,rad_bo
k,18,rad_bi,0,flang_h1
k,19,rad_bo,0,flang_h1
k,20,rad_i+th+f_rad,0,flang_h1
k,21,fh_rad
k,22,fh_rad,0,flang_h1+h_shaft
k,23,fh_rad,0,flang_h1
l,8,20
l,20,5
l,21,22
lfillt,1,2,125
lstr,1,10
lstr,10,9
lstr,9,13
lstr,13,12
lstr,12,8
lstr,8,9
lstr,8,24
lstr,1,11
lstr,11,2
lstr,2,21
lstr,21,4
lstr,4,5
lstr,10,23
lstr,5,23
lptn,all
al,7,8,9,10
al,1,22,21,16,6,10
al,5,11,12,13,18,16
a,5,4,21,23
alls
lsla
lsel,invert
ldele,all
ksll
ksel,invert
kdele,all
APLOT
alls
csys,1
kgen,2,1,,,,n,,,0
l,1,3
vdrag,all,,,,,,2
csys,0
cyl4,,,rad_bi,,rad_bo,,rad_bh
vsbv,4,5
cyl4,rad_drill,0,rad_b,,,,flang_h1+100
csys,1
vgen,,4,,,,n,,,,1
vsbv,6,4
wpro,n,,
csys,4
vsymm,y,all,,,,0,0
wpro,-n,,
csys,0
rectng,0,rad_o+100,0,key_w/2
vsel,all
aslv
asel,invert
vext,all,,,0,0,key_h
alls
vptn,all
vdele,11,,,1
vdele,12,,,1
vdele,15,,,1
vdele,16,,,1
vdele,18,,,1
wpoff,0,key_w/2,0
wpro,,90
vsbw,all
wpcsys,-1,0
wpoff,0,0,key_h
vsbw,all
wpcsys,-1,0
csys,0
cyl4,,,rad_bi,,rad_bo,,flang_h1
vptn,all
vdele,33,,,1
wpoff,0,0,rad_bh
vsbw,all
wpoff,0,0,-rad_bh
cylind,rad_pani,rad_pano,0,-flang_h2,0,2*n
cyl4,rad_drill,0,rad_b,,,,flang_h2+100
csys,1
vgen,,16,,,,n,-flang_h2,,,1
vsbv,15,16
vsel,s,loc,z,0,h_sh+100
cm,shaft,volu
alls
vsel,s,loc,z,0,-flang_h2-100
cm,pan,volu
alls
esize,elemsize,0,
mat,1
cmsel,,shaft
vsweep,all
mat,2
alls
cmsel,,pan
vsweep,all
alls
cmsel,,shaft
aslv
lsla
ksll
wpro,2*n,,
csys,1
cmsel,u,pan
vsel,r,loc,y,n,2*n
csys,4
vsymm,y,all,,,,0,0
wpro,n,,
vsel,s,loc,z,0,h_sh+100
vsymm,y,all,,,,0,0
eslv
nsle
nummrg,kp
nummrg,node
alls
wpcsys,-1,0
cmsel,,pan
aslv
lsla
ksll
wpro,2*n
csys,4
vsymm,y,all,,,,0,0
wpro,2*n
csys,4
csys,1
vsel,r,loc,y,2*n,4*n
csys,4
vsymm,y,all,,,,0,0
alls
wpcsys,-1,0
vsel,s,loc,z,0,-flang_h2-100
aslv
lsla
ksll
eslv
nsle
nummrg,kp
nummrg,node
vsel,s,loc,z,0,h_sh+100
cm,shaft,volu
alls
vsel,s,loc,z,0,-flang_h2-100
cm,pan,volu
alls
csys,0
cylind,m_bolt/2,,m_bh1,-m_bh2,0,360
rpr4,6,,,m_nut,2*n,h_nut
vgen,,95,,,,,flang_h1,,,1
vgen,2,95,,,,,-flang_h2-flang_h1-h_nut,,0
cmsel,u,pan
cmsel,u,shaft
vptn,all
cm,b_temp,volu
vgen,,all,,,rad_drill,,,,,1
csys,1
vgen,,all,,,,n,,,,1
mat,3
esize,elemsize/2,0,
vsweep,all
vgen,4,all,,,,n*2,,,0
vclear,b_temp
vdele,b_temp
vgen,,all,,,,-n*2,,,,1
cm,bvolu,volu
alls
psmesh,1,b100,,volu,95,0,z,0,,,,b_100
psmesh,2,b200,,volu,116,0,z,0,,,,b_200
psmesh,3,b300,,volu,109,0,z,0,,,,b_300
cmsel,r,shaft
aslv
asel,r,loc,z,0
cm,as_con,area
alls
cmsel,r,pan
aslv
asel,r,loc,z,0
cm,ap_tar,area
alls
/com,contact pair creation -start
mat,4
r,3
real,3
et,3,170
et,4,174
keyopt,4,9,0
cmsel,s,ap_tar
type,3
nsla,s,1
esln,s,0
esurf,all
alls
cmsel,s,as_con
type,4
nsla,s,1
esln,s,0
esurf,all
allsel
cmsel,r,bvolu
aslv
asel,r,loc,z,flang_h1
cm,ab1_con,area
alls
cmsel,r,shaft
aslv
asel,r,loc,z,flang_h1
csys,1
asel,r,loc,x,fh_rad,rad_o
csys,0
cm,abs_tar,area
alls
/com, contact pair creation - start
mat,4
r,4
real,4
et,5,170
et,6,174
keyopt,5,9,0
cmsel,s,abs_tar
type,5
nsla,s,1
esln,s,0
esurf,all
alls
cmsel,s,ab1_con
type,6
nsla,s,1
esln,s,0
esurf,all
allsel
/com, contact pair creation - end
cmsel,r,bvolu
aslv
asel,r,loc,z,-flang_h2
cm,ab2_con,area
alls
cmsel,r,pan
aslv
asel,r,loc,z,-flang_h2
cm,abp_tar,area
alls
/com, contact pair creation - start
mat,4
r,5
real,5
et,7,170
et,8,174
keyopt,7,9,0
cmsel,s,abp_tar
type,7
nsla,s,1
esln,s,0
esurf,all
alls
cmsel,s,ab2_con
type,8
nsla,s,1
esln,s,0
esurf,all
allsel
/com, contact pair creation - end
/SOL
alls
lsclear,all
antype,0
autots,1
nsubst,25,100,1
outres,all,all
eqslv,pcg,1e-8
time,15
csys,1
asel,s,loc,y,0
da,all,symm
alls
asel,s,loc,y,90
da,all,symm
alls
sload,1,9,lock,disp,disp_b,1,2
sload,2,9,lock,disp,disp_b,1,2
sload,3,9,lock,disp,disp_b,1,2
cmsel,s,pan
nslv,r,1
nsel,r,loc,z,0
csys,1
nsel,r,loc,x,u_r,r_out
d,all,all
alls
sbctran
lswrite,1
lswrite,2
nsel,s,loc,z,zmax-1,zmax+10
*get,nload,node,,count
f,all,fz,f_ext/nload/4
alls
lswrite,3
lssolve,1,3,1
/post
set,last
plnsol,s,eqv,0,1
!!! checked apdl , all "sb" should be "S B".
*set,rad_i,1250/2
*set,rad_pani,705
*set,rad_o,2450/2
*set,rad_pano,1830
*set,rad_b,180/2
*set,m_bolt,160
*set,m_bh1,350+170+50
*set,m_bh2,350+170+250
*set,m_nut,280/2
*set,h_nut,170
*set,rad_drill,2140/2
*set,rad_m,750+150
*set,h_m,18
*set,rad_bi,1950/2
*set,rad_bo,2330/2
*set,rad_bh,5
*set,f_rad,45
*set,fh_rad,1855/2
*set,r_fillt,125
*set,n,15
*set,key_w,290
*set,key_h,130
*set,th,200
*set,flang_h1,350
*set,flang_h2,350
*set,h_shaft,350+490
*set,h_sh,H_shaft+500
*set,pi,acos(-1)
*set,elemsize,60
/graphics,power
*set,disp_b,0.75
*set,zmax,h_sh
*set,f_ext,22.9215e+5*12
*set,f_eef,30.827e+5*12
*set,r_out,rad_pano
*set,t_w,375
*set,u_r,r_out-t_w
/prep7
et,1,185
mp,ex,1,2.06e5
mp,nuxy,1,0.29
mp,dens,1,7.85e-9
mp,ex,2,2.06e5
mp,nuxy,2,0.29
mp,dens,2,7.85e-9
mp,ex,3,2.06e5
mp,nuxy,3,0.29
mp,dens,3,7.85e-9
mp,mu,4,0.15
k,1,rad_i,0,h_m
k,2,rad_m,0,0
k,3,rad_i+th
k,4,rad_o, 0,
k,5,rad_o,0,flang_h1
k,6,rad_m,0,flang_h1
k,7,rad_i+th,0,flang_h1
k,8,rad_i+th,0,h_shaft
k,9,rad_i,0,h_shaft
k,10,rad_i,0,flang_h1
k,11,rad_m,0,H_M
k,12,rad_i+th,0,H_sh
k,13,rad_i,0,h_sh
k,14,rad_bi,0,rad_bh
k,15,rad_bo,0,rad_bh
k,16,rad_bi
k,17,rad_bo
k,18,rad_bi,0,flang_h1
k,19,rad_bo,0,flang_h1
k,20,rad_i+th+f_rad,0,flang_h1
k,21,fh_rad ,
k,22,fh_rad,0,flang_h1+h_shaft
k,23,fh_rad,0,flang_h1
l,8,20
l,20,5
l,21,22
lfillt,1,2,125
lstr,1,10
lstr,10,9
lstr,9,13
lstr,13,12
lstr,12,8
lstr,8,9
lstr,8,24
lstr,1,11
lstr,11,2
lstr,2,21
lstr,21,4
lstr,4,5
lstr,10,23
lstr,5,23
lptn,all
al,7,8,9,10
al,1,22,21,16,6,10
al,5,11,12,13,18,16
a,5,4,21,23
alls
lsla
lsel,invert
ldele,all
ksll
ksel,invert
kdele,all
APLOT
alls
csys,1
kgen,2,1,,,,n,,,0
l,1,3
vdrag,all,,,,,,2
csys,0
cyl4,,,rad_bi,,rad_bo,,rad_bh
vsbv,4,5
cyl4,rad_drill,0,rad_b,,,,flang_h1+100
csys,1
vgen,,4,,,,n,,,,1
vsbv,6,4
wpro,n,,
csys,4
vsymm,y,all,,,,0,0
wpro,-n,,
csys,0
rectng,0,rad_o+100,0,key_w/2
vsel,all
aslv
asel,invert
vext,all,,,0,0,key_h
alls
vptn,all
vdele,11,,,1
vdele,12,,,1
vdele,15,,,1
vdele,16,,,1
vdele,18,,,1
wpoff,0,key_w/2,0
wpro,,90
vsbw,all
wpcsys,-1,0
wpoff,0,0,key_h
vsbw,all
wpcsys,-1,0
csys,0
cyl4,,,rad_bi,,rad_bo,,flang_h1
vptn,all
vdele,33,,,1
wpoff,0,0,rad_bh
vsbw,all
wpoff,0,0,-rad_bh
!!! set up the lower circle plate
cylind,rad_pani,rad_pano,0,-flang_h2,0,2*n
cyl4,rad_drill,0,rad_b,,,,flang_h2+100
csys,1
vgen,,16,,,,n,-flang_h2,,,1
vsbv,15,16
!!! set up components
vsel,s,loc,z,0,h_sh+100
cm,shaft,volu
alls
vsel,s,loc,z,0,-flang_h2-100
cm,pan,volu
alls
esize,elemsize,0,
mat,1
cmsel,,shaft
vsweep,all
mat,2
alls
cmsel,,pan
vsweep,all
alls
cmsel,,shaft
aslv
lsla
ksll
wpro,2*n,,
csys,1
cmsel,u,pan
vsel,r,loc,y,n,2*n
csys,4
vsymm,y,all,,,,0,0
wpro,n,,
vsel,s,loc,z,0,h_sh+100
vsymm,y,all,,,,0,0
eslv
nsle
nummrg,kp
nummrg,node
alls
wpcsys,-1,0
cmsel,,pan
aslv
lsla
ksll
wpro,2*n
csys,4
vsymm,y,all,,,,0,0
wpro,2*n
csys,4
csys,1
vsel,r,loc,y,2*n,4*n
csys,4
vsymm,y,all,,,,0,0
alls
wpcsys,-1,0
vsel,s,loc,z,0,-flang_h2-100
aslv
lsla
ksll
eslv
nsle
nummrg,kp
nummrg,node
vsel,s,loc,z,0,h_sh+100
cm,shaft,volu
alls
vsel,s,loc,z,0,-flang_h2-100
cm,pan,volu
alls
csys,0
cylind,m_bolt/2,,m_bh1,-m_bh2,0,360
rpr4,6,,,m_nut,2*n,h_nut
vgen,,95,,,,,flang_h1,,,1
vgen,2,95,,,,,-flang_h2-flang_h1-h_nut,,0
cmsel,u,pan
cmsel,u,shaft
vptn,all
cm,b_temp,volu
vgen,,all,,,rad_drill,,,,,1
csys,1
vgen,,all,,,,n,,,,1
mat,3
esize,elemsize/2,0,
vsweep,all
vgen,4,all,,,,n*2,,,0
vclear,b_temp
vdele,b_temp
vgen,,all,,,,-n*2,,,,1
cm,bvolu,volu
alls
psmesh,1,b100,,volu,95,0,z,0,,,,b_100
psmesh,2,b200,,volu,116,0,z,0,,,,b_200
psmesh,3,b300,,volu,109,0,z,0,,,,b_300
cmsel,r,shaft
aslv
asel,r,loc,z,0
cm,as_con,area
alls
cmsel,r,pan
aslv
asel,r,loc,z,0
cm,ap_tar,area
alls
/com,contact pair creation -start
mat,4
r,3
real,3
et,3,170
et,4,174
keyopt,4,9,0
cmsel,s,ap_tar
type,3
nsla,s,1
esln,s,0
esurf,all
alls
cmsel,s,as_con
type,4
nsla,s,1
esln,s,0
esurf,all
allsel
cmsel,r,bvolu
aslv
asel,r,loc,z,flang_h1
cm,ab1_con,area
alls
cmsel,r,shaft
aslv
asel,r,loc,z,flang_h1
csys,1
asel,r,loc,x,fh_rad,rad_o
csys,0
cm,abs_tar,area
alls
/com, contact pair creation - start
mat,4
r,4
real,4
et,5,170
et,6,174
keyopt,5,9,0
cmsel,s,abs_tar
type,5
nsla,s,1
esln,s,0
esurf,all
alls
cmsel,s,ab1_con
type,6
nsla,s,1
esln,s,0
esurf,all
allsel
/com, contact pair creation - end
cmsel,r,bvolu
aslv
asel,r,loc,z,-flang_h2
cm,ab2_con,area
alls
cmsel,r,pan
aslv
asel,r,loc,z,-flang_h2
cm,abp_tar,area
alls
/com, contact pair creation - start
mat,4
r,5
real,5
et,7,170
et,8,174
keyopt,7,9,0
cmsel,s,abp_tar
type,7
nsla,s,1
esln,s,0
esurf,all
alls
cmsel,s,ab2_con
type,8
nsla,s,1
esln,s,0
esurf,all
allsel
/com, contact pair creation - end
/SOL
alls
lsclear,all
antype,0
autots,1
nsubst,25,100,1
outres,all,all
eqslv,pcg,1e-8
time,15
csys,1
asel,s,loc,y,0
da,all,symm
alls
asel,s,loc,y,90
da,all,symm
alls
sload,1,9,lock,disp,disp_b,1,2
sload,2,9,lock,disp,disp_b,1,2
sload,3,9,lock,disp,disp_b,1,2
cmsel,s,pan
nslv,r,1
nsel,r,loc,z,0
csys,1
nsel,r,loc,x,u_r,r_out
d,all,all
alls
sbctran
lswrite,1
lswrite,2
nsel,s,loc,z,zmax-1,zmax+10
*get,nload,node,,count
f,all,fz,f_ext/nload/4
alls
lswrite,3
lssolve,1,3,1
/post
set,last
plnsol,s,eqv,0,1 这样的例子很多,发个比较全的。
finish
/clear
!!!!!!!!!!!!!!!!环境设置!!!!!!!!!!!!!!!!!!!!!!!!!
/filn,flange
/title,flang_bolt
!设定结构基本参数,单位N,mm,MPa.密度为tons/mm3
*SET,PN,4 !工作压力
!结构尺寸参数遵循图形
*SET,DN,900
*SET,D,1115
*SET,D1,1055
*SET,D2,1010
*SET,D3,1000
*SET,D4,997
*SET,dta,86
*SET,H,170
*SET,xh,42
*SET,a,3
*SET,a1,3
*SET,dta1,24
*SET,dta2,36
*SET,R,15
*SET,xd,33
*SET,h1,225
*SET,h2,50
*SET,L,2.5*((DN/2+0.5*dta1)*dta1)**0.5 !筒体长
*SET,N,360/96 !法兰分度数
*SET,nut_rad,50.85/2 !螺母半径
*SET,nut_h,25.6 !螺母高度
*SET,bolt_h,250 !螺栓高度
*SET,forc_bolt,35000 !螺栓预紧力
/prep7 !进入前处理器
et,1,solid45 !实体单元
et,2,TARGE170 !3D接触目标面单元170
et,3,CONTA174 !3D接触接触面单元174
keyopt,3,9,0 !包含初始化穿透
*AFUN,DEG !设定角度单位为度数
!定义法兰材料1
mp,ex,1,2.16e5 !设定弹性模量
mp,nuxy,1,0.3 !定义泊松比
mp,dens,1,7.85e-9 !定义密度
!定义螺栓材料2
mp,ex,2,2.11e5 !设定弹性模量
mp,nuxy,2,0.3 !定义泊松比
mp,dens,2,7.85e-9 !定义密度
!定义摩擦系数为材料3
mp,mu,3,0.3
!!!!!!!!!!!!!!创建上法兰!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!创建关键点
k,1,DN/2,a+H
k,2,DN/2+dta1,a+H
k,3,DN/2+dta1,a+xh+dta
k,4,DN/2+dta2,a+dta
k,5,D1/2,a+dta
k,6,D/2,a+dta
k,7,D/2,a
k,8,D1/2,a
k,9,D4/2,a
k,10,D4/2,0
k,11,DN/2,0
k,12,DN/2,a+dta
k,13,DN/2,a+dta+xh
!通过关键点连线
*do,ii,1,12
l,ii,ii+1
*enddo
l,1,13
lfillt,2,3,R !创建倒角
lfillt,3,4,R !创建倒角
l,13,14
l,12,17
l,17,9
l,5,8
!连线构面
al,1,2,16,13
al,16,14,3,15,17,12
al,17,18,9,10,11
al,4,19,8,18
al,5,6,7,19
cm,flang_up,area !创建上法兰面积组件
!!!!!!!!!!!!!上法兰创建完毕!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!创建下法兰!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!创建关键点
k,18,DN/2,a-a1
k,19,D3/2,a-a1
k,20,D3/2,a
k,21,D1/2,a
k,22,D/2,a
k,23,D/2,a-a1-dta
k,24,D1/2,a-a1-dta
k,25,D3/2,a-a1-dta
k,26,DN/2+dta2,a-a1-dta
k,27,DN/2+dta1,a-a1-dta-xh
k,28,DN/2+dta1,a-a1-H
k,29,DN/2,a-a1-H
k,30,DN/2,a-a1-dta-xh
k,31,DN/2,a-a1-dta
!通过关键点连线
*do,ii,18,30
l,ii,ii+1
*enddo
l,18,31
lfillt,27,28,R
lfillt,28,29,R
l,30,35
l,31,32
l,21,24
l,19,25
!连线构面
al,29,30,31,36
al,35,36,32,37,34,28
al,20,39,27,37,33
al,21,22,38,26,39
al,23,24,25,38
asel,u,area,,flang_up !选择除flang_up之外的所有面
cm,flang_down,area !创建下法兰面积组件
!!!!!!!!!!!!!下法兰创建完毕!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!创建椭圆封头!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
k,,0,a+H+h2 !创建封头所处位置关键点
circle,36,1 !创建单位长圆
KWPAVE,36 !将工作平面移置于新设定点
CSYS,4 !激活随工作平面的坐标系
lsscale,40,43,1,DN/2+dta1,h1+dta1,,,1!对单位圆按照椭圆比例进行缩放(外表面)
lsscale,40,43,1,DN/2,h1,,,1 !对单位圆按照椭圆比例进行缩放(内表面)
ldele,49,51,1,1 !删除多余的线段
ldele,45,47,1,1
ldele,40,43,1,1
wpstyl,defa !恢复工作平面至默认状态
l,45,41 !连接封头端、尾
l,42,46
l,1,45 !连接封头与法兰
l,2,41
!由线构成封头面
al,40,42,1,43
al,44,40,48,41
asel,u,area,,flang_down !选择构成封头的所有面
cm,coping,area !创建封头面积组件
!!!!!!!!!!!!!封头创建完毕!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!创建筒体!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
allsel
k,,DN/2,a-a1-H-L !创建筒体底端位置点
k,,DN/2+dta1,a-a1-H-L
a,28,29,37,38 !连接筒体与下法兰,构成面
asel,u,area,,flang_up
asel,u,area,,flang_down
asel,u,area,,coping !排除筒体之外的所有面
cm,pot,area !创建筒体面积组件
!!!!!!!!!!!!!筒体创建完毕!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!布尔操作,将面与面之间粘接!!!!!!!!!!!!!
asel,s,area,,flang_up
asel,a,area,,coping
aglue,all !将封头与上法兰面粘接
asel,s,area,,flang_down
asel,a,area,,pot
aglue,all !将筒体与下法兰面粘接
kdele,36 !删除建模过程中辅助点
!!!!!!!!!!!!!布尔操作完毕!!!!!!!!!!!!!!!!!!!!!!!!!!
allsel
vrotat,all,,,,,,42,46,N !将所有的面绕y轴旋转N度,创建体
!!!!!!!!!!!!!创建螺栓!!!!!!!!!!!!!
KL,76,0.5, , !设定关键点平分线76,该点为螺栓中心所在
KWPAVE,77 !将工作平面移动至该点
wprota,0,90 !将工作平面绕x轴旋转90度
cyl4,,,xd/2,,,,bolt_h !创建螺栓
!将与螺栓相交的体组成一个组件,以便选取
vsel,s,volu,,4,5,1
vsel,a,volu,,9,10,1
cm,buer,volu !创建与螺栓相交的体积组件buer
allsel
bopt,numb,off
vsbv,buer,14 !将组件buer与螺栓进行布尔操作,挖出螺栓孔洞
cyl4,,,xd/2,,,,bolt_h !创建螺栓,体积编号为4
VGEN,,4,,,,,-(bolt_h/2-dta-a),,,1 !将螺栓平移至合适位置
rpr4,6,,,nut_rad,,-nut_h !创建螺母
vgen,2,5,,,,,2*dta+a1+nut_h,,,0 !复制螺母至合适位置
!!!!!!!!!!!!!螺栓创建完毕!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!创建各部分体积组件方便选择!!!!!!!!!!!!!
vsel,s,volu,,4,5,1
vsel,a,volu,,9
vptn,all
cm,bvolu,volu !创建螺栓组件
allsel
wpstyl,defa
vsel,s,loc,y,-H-L,a1
vsel,u,volu,,bvolu
cm,flang_dvolu,volu !创建下法兰组件
allsel
vsel,s,loc,y,a1,H
vsel,u,volu,,bvolu
cm,flang_upvolu,volu !创建上法兰组件
allsel
vsel,s,loc,y,H+a,H+h1+dta1
cm,cop_volu,volu !创建封头组件
!!!!!!!!!!!!!!!划分网格!!!!!!!!!!!!!!!!!!!!!!!!!!!!
mat,1 !指定材料
esize,5 !指定单元大小
cmsel,s,cop_volu !选中封头组件
vsweep,all !对封头分网
esize,5 !指定单元大小
cmsel,s,flang_dvolu !选中下法兰组件
vsweep,all !对下法兰分网
cmsel,s,flang_upvolu !选中上法兰组件
vsweep,all !对上法兰分网
esize,4 !指定单元大小
mat,2 !指定材料
cmsel,s,bvolu !选中螺栓组件
vsweep,all !对螺栓分网
!!!!!!!!!!!!!网格划分完毕!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!对模型节点进行压缩合并!!!!!!!!!!!!!!!!!!!!!
!合并上法兰节点
allsel
vsel,s,loc,y,0,2*H
vsel,u,volu,,bvolu
nslv,s,1
nummrg,node
!合并下法兰节点
allsel
vsel,s,loc,y,-(H+L),a1
vsel,u,volu,,bvolu
nslv,s,1
nummrg,node
!!!!!!!!!!!!!节点合并完毕!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!建立螺栓预紧单元!!!!!!!!!!!!!!!!!!!!!
allsel
!在0号坐标系下,对螺栓1(14号体积)建立预紧单元,secid为1,name为bolt1
!预紧单元方向为y轴,位置为y向0位置处,同时将预紧单元存储于bolt_1单元组件中,预紧单元pretention179无需预先定义
psmesh,1,bolt1,,volu,14,0,y,0,,,,bolt_1
!!!!!!!!!!!!!螺栓预紧单元建立完毕!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!创建接触!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!创建凹面接触单元
cmsel,s,flang_upvolu !选择上法兰体积组件
aslv !选择依附于体上的面
asel,r,loc,y,0 !通过坐标选择法兰上的接触面
cm,as_up,area !建立上法兰接触面组件as_up
allsel
cmsel,s,flang_dvolu !选择下法兰体积组件
aslv !选择依附于体上的面
asel,r,loc,y,a-a1 !通过坐标选择法兰上的接触面
asel,r,loc,x,0,D3/2
cm,as_down,area !建立下法兰接触面组件as_down
r,1 !定义接触实常数1
real,1 !指定实常数1
mat,3 !指定材料3
cmsel,s,as_up !选择上法兰接触面组件as_up
type,2 !指定单元接触类型2
nsla,s,1 !选择接触面上的所有节点,包括边界点
esln,s,0 !选择依附于这些节点的单元
esurf,all !构建接触单元
allsel
cmsel,s,as_down !选择下法兰接触面组件as_down
type,3 !指定单元接触类型3
nsla,s,1 !选择接触面上的所有节点,包括边界点
esln,s,0 !选择依附于这些节点的单元
esurf,all !构建接触单元
!创建凸面接触单元
allsel
cmsel,s,flang_upvolu !选择上法兰体积组件
aslv !选择依附于体上的面
asel,r,loc,y,a !通过坐标选择法兰上的接触面
cm,as_up1,area !建立上法兰接触面组件as_up1
allsel
cmsel,s,flang_dvolu !选择下法兰体积组件
aslv !选择依附于体上的面
asel,r,loc,y,a !通过坐标选择法兰上的接触面
cm,as_down1,area !建立下法兰接触面组件as_down1
et,5,TARGE170 !定义目标单元170
et,6,CONTA174 !定义接触单元174
keyopt,6,9,0 !包含初始化穿透
r,2 !定义接触实常数2
real,2 !指定实常数2
mat,3 !指定材料3
cmsel,s,as_up1 !选择上法兰接触面组件as_up1
type,5 !指定单元接触类型5
nsla,s,1 !选择接触面上的所有节点,包括边界点
esln,s,0 !选择依附于这些节点的单元
esurf,all !构建接触单元
allsel
cmsel,s,as_down1 !选择下法兰接触面组件as_down1
type,6 !指定单元接触类型6
nsla,s,1 !选择接触面上的所有节点,包括边界点
esln,s,0 !选择依附于这些节点的单元
esurf,all !构建接触单元
!创建螺母与上法兰接触
allsel
cmsel,s,bvolu !选择螺栓体积组件
KWPAVE,77 !将工作平面移至77点
wprota,0,90 !将工作平面绕x轴旋转90度
aslv !选择依附于体上的面
asel,r,loc,z,0 !通过坐标选择螺栓上的接触面
asel,u,area,,104 !删除螺栓柱面,保留螺母面
cm,b_up,area !创建螺母与上法兰接触面组件b_up
cmsel,s,flang_upvolu !选择上法兰体积组件
aslv !选择依附于体上的面
asel,r,loc,z,0 !通过坐标选择上法兰上的目标面
asel,r,loc,x,-(D-D1)/2,(D-D1)/2
cm,f_up,area !创建上法兰与螺母目标面组件f_up
cmsel,s,bvolu !选择螺栓体积组件
aslv !选择依附于体上的面
asel,r,loc,z,2*dta+a1 !通过坐标选择螺栓与下法兰的接触面
asel,u,area,,108 !删除螺栓柱面,保留螺母面
cm,b_down,area !创建螺母与下法兰接触面组件b_down
cmsel,s,flang_dvolu !选择下法兰体积组件
aslv !选择依附于体上的面
asel,r,loc,z,2*dta+a1 !通过坐标选择螺栓与下法兰的目标面
asel,r,loc,x,-(D-D1)/2,(D-D1)/2
cm,f_down,area !创建螺母与下法兰目标面组件f_down
et,7,TARGE170 !定义目标单元170
et,8,CONTA174 !定义接触单元174
keyopt,8,9,0 !包含初始化穿透
r,3 !定义接触实常数3
real,3 !指定实常数3
mat,3 !指定材料3
cmsel,s,b_up !选择螺母与上法兰接触面组件b_up
type,7 !指定单元接触类型7
nsla,s,1 !选择接触面上的所有节点,包括边界点
esln,s,0 !选择依附于这些节点的单元
esurf,all !构建接触单元
allsel
cmsel,s,f_up !选择上法兰与螺母目标面组件f_up
type,8 !指定单元接触类型8
nsla,s,1 !选择接触面上的所有节点,包括边界点
esln,s,0 !选择依附于这些节点的单元
esurf,all !构建接触单元
!创建螺母与下法兰接触
et,9,TARGE170 !定义目标单元170
et,10,CONTA174 !定义接触单元174
keyopt,10,9,0 !包含初始化穿透
r,4 !定义接触实常数4
real,4 !指定实常数4
mat,3 !指定材料3
cmsel,s,b_down !选择螺母与下法兰接触面组件b_down
type,9 !指定单元接触类型9
nsla,s,1 !选择接触面上的所有节点,包括边界点
esln,s,0 !选择依附于这些节点的单元
esurf,all !构建接触单元
allsel
cmsel,s,f_down !选择螺母与下法兰目标面组件f_down
type,10 !指定单元接触类型10
nsla,s,1 !选择接触面上的所有节点,包括边界点
esln,s,0 !选择依附于这些节点的单元
esurf,all !构建接触单元
!!!!!!!!!!!!接触创建完毕!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FINISH
/SOL !进入求解处理器
allsel
lsclear,all !清空所有载荷
NROPT,Full !激活完全Newton-Raphson
pred,on !打开变形预测
lnsrch,on !激活线性搜索
antype,0 !静态分析
autots,1 !自动时间步长
nsubst,25,100,1 !设置载荷步
outres,all,all !输出所有结果
eqslv,pcg,1e-8 !采用pcg算法,对于大模型接触算法很有效
wpstyl,defa !将工作平面恢复至默认状态
csys,5 !激活柱坐标系(以y轴为旋转轴)
asel,s,loc,y,0 !通过坐标选择角度为0的面
asel,a,loc,y,-N !通过坐标选择角度为-N的面
da,all,symm !施加对称边界条件
csys,0 !激活笛卡尔坐标系
cmsel,s,flang_dvolu !选择下法兰体积组件
nslv,r,1 !选择依附于体积上的节点
nsel,r,loc,y,a-a1-H-L !选择筒体底端节点
d,all,uy !施加y向位移约束
allsel
sload,1,9,lock,forc,forc_bolt,1,2 !在螺栓中施加螺栓预紧
!第一载荷步中施加载荷大小为forc_bolt的预紧力,在第二个载荷步中锁住其位移,最终产生预紧效果
time,10 !设置时间步长为10
allsel
lswrite,1 !写出第一个载荷步文件
time,20 !设置时间步至20
lswrite,2 !写出第二个载荷步文件
!对容器壁施加内压
asel,s,area,,68 !选中编号为68的面
nsla,s,1 !选择依附于面上的节点
csys,5 !激活柱坐标系(以y轴为旋转轴)
nsel,a,loc,x,DN/2 !通过坐标选择内壁上的节点
sf,all,pres,PN !对内壁施加压强,大小为PN
allsel
time,30 !设置时间步至30
lswrite,3 !写出第三个载荷步文件
lssolve,1,3,1 !计算载荷步1-3
/post1 !进入通用后处理
set,last !读取最后结果
PLNSOL,S,EQV,0,1 !输出Von Mises应力结果
cmsel,s,bvolu !选择螺栓组件
eslv,s,1 !选中依附于体积的单元
nslv,s,1 !选中依附于体积的节点
PLNSOL,S,EQV,0,1 !输出Von Mises应力结果
cmsel,s,flang_dvolu !选择下法兰组件
eslv,s,1 !选中依附于体积的单元
nslv,s,1 !选中依附于体积的节点
PLNSOL,S,EQV,0,1 !输出Von Mises应力结果 我的论文中也是法兰,但是焊接的,和你的完全是两码事
楼上的两位提供的资料很好,我也是这么些资料,呵呵 虽然已过多年,但仍然是好东西
:@) 用ANSYS或Wokbench不错
页:
[1]