- 积分
- 0
- 注册时间
- 2015-10-20
- 仿真币
-
- 最后登录
- 1970-1-1
|
发表于 2016-10-5 10:44:56
|
显示全部楼层
来自 四川成都
new
;=====================================
;建立网格模型
gen zone brick p0 0 0 0 p1 2 0 0 p2 0 0.5 0 p3 0 0 3 size 3 1 3
gen zone brick p0 2 0 0 p1 20 0 0 p2 2 0.5 0 p3 2 0 3 size 17 1 3 ratio 1.03 1 1
gen zone brick p0 2 0 3 p1 20 0 3 p2 2 0.5 3 p3 12 0 13 p4 20 0.5 3 p5 12 0.5 13 p6 20 0 13 &
p7 20 0.5 13 size 17 1 17 ratio 1.03 1 1
;**********************************************
;边界条件
fix x y z range z -0.1 0.1
fix x range x 19.9 20.1
fix x range x -0.1 0.1
fix y
;初始应力场的生成
model elastic
pro bulk 1e10 she 3e9 dens 2000
set grav 0 0 -10
solve
ini xdisp 0 ydisp 0 zdisp 0
ini xvel 0 yvel 0 zvel 0
;单元自重应力写入文件'graStress.dat'
def graStressInfo
array buf(6)
pnt=zone_head
loop while pnt # null
;应力顺序sxx,syy,szz,sxy,sxz,syz
buf(1)=string(z_sxx(pnt))
buf(2)=string(z_syy(pnt))
buf(3)=string(z_szz(pnt))
buf(4)=string(z_sxy(pnt))
buf(5)=string(z_sxz(pnt))
buf(6)=string(z_syz(pnt))
status = write(buf,6)
pnt=z_next(pnt)
end_loop
end
def wrGraStress
status = close
status = open('graStress.dat',1,1)
if status = 0 then
graStressInfo
status = close
end_if
end
wrGraStress
;从文件'graStress.dat'读取自重应力信息
def defArray
array buu(6)
end
defArray
def graStressInfom
pnt=zone_head
loop while pnt # null
;应力顺序sxx,syy,szz,sxy,sxz,syz
status = read(buu,6)
z_sxx(pnt)=float(buu(1))
z_syy(pnt)=float(buu(2))
z_szz(pnt)=float(buu(3))
z_sxy(pnt)=float(buu(4))
z_sxz(pnt)=float(buu(5))
z_syz(pnt)=float(buu(6))
pnt=z_next(pnt)
end_loop
end
def reGraStress
status = close
status = open('graStress.dat',0,1)
if status = 0 then
graStressInfom
status = close
end_if
end
;自定义强度折减法
def SSR
;=====================================
;定义有关参数及循环终止条件
ait1=0.02
k11=0.0
k12=2.0
ks=(k11+k12)/2
loop while (k12-k11)>ait1
coh1=12380/ks
fri1=(atan((tan(20*pi/180))/ks))*180/pi
dila1=20.0
ten1=1e6
dens1=2000
K1=1e8
G1=3e7
;=====================================
;折减的实现过程
command
model null
reGraStress
model mohr
pro bulk K1 she G1 dens dens1 coh coh1 friction fri1 dil dila1 tens ten1
set mech ratio 9.8e-6
solve step 10000
endcommand
;二分法的实现过程
if mech_ratio<1.0e-5
k11=ks
k12=k12
else
k12=ks
k11=k11
endif
ks=(k11+k12)/2
endloop
;=====================================
;计算结果的保存
fosfile0='_fos'+'.sav'
command
save fosfile0
endcommand
end
;**********************************************
;程序执行及结果显示
SSR
pr ks
初始安全系数上下限值是自己给定的,当然可以是其他值。 |
|