FLAC3D-实例命令流1
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
第1部分命令流按照顺序进行
2-1定义一个FISH函数
new
def abc
abc = 25 * 3 + 5
End
print abc
2-2使用一个变量
new
def abc
hh = 25
abc = hh * 3 + 5
End
Print hh
Print abc
2-3对变量和函数的理解
new
def abc
hh = 25
abc = hh * 3 + 5
End
set abc=0 hh=0
print hh
print abc
print hh
new
def abc
abc = hh * 3 + 5
end
set hh=25
print abc
set abc=0 hh=0
print hh
print abc
print hh
2-4获取变量的历史记录
new
gen zone brick size 1 2 1
model mohr
prop shear=1e8 bulk=2e8 cohes=1e5 tens=1e10
fix x y z range y -0.1 0.1
apply yvel -1e-5 range y 1.9 2.1
plot set rotation 0 0 45
plot block group
def get_ad
ad1 = gp_near(0,2,0)
ad2 = gp_near(1,2,0)
ad3 = gp_near(0,2,1)
ad4 = gp_near(1,2,1)
end
get_ad
def load
load=gp_yfunbal(ad1)+gp_yfunbal(ad2)+gp_yfunbal(ad3)+gp_yfunbal(ad4) end
hist load
hist gp ydis 0,2,0
step 1000
plot his 1 vs -2
2-5用FISH函数计算体积模量和剪砌模量
new
def derive
s_mod = y_mod / (2.0 * (1.0 + p_ratio))
b_mod = y_mod / (3.0 * (1.0 - 2.0 * p_ratio))
end
set y_mod = 5e8 p_ratio = 0.25
derive
print b_mod
print s_mod
2-6 在FLAC输入中使用符号变量
New
def derive
s_mod = y_mod / (2.0 * (1.0 + p_ratio))
b_mod = y_mod / (3.0 * (1.0 - 2.0 * p_ratio))
end
set y_mod = 5e8 p_ratio = 0.25
derive
gen zone brick size 2,2,2
model elastic
prop bulk=b_mod shear=s_mod
print zone prop bulk
print zone prop shear
2-7 控制循环
New
def xxx
sum = 0
prod = 1
loop n (1,10)
sum = sum + n
prod = prod * n
end_loop
end
xxx
print sum, prod
new
gen zone brick p0 (0,0,0) p1 (-10,0,0) p2 (0,10,0) p3 (0,0,-10) model elas
plot set rotation 0 0 45
plot block group
def install
pnt = zone_head
loop while pnt #null
z_depth = -z_zcen(pnt)
y_mod = y_zero + cc * sqrt(z_depth)
z_prop(pnt, ’shear’) = y_mod / (2.0*(1.0+p_ratio))
z_prop(pnt, ’bulk’) = y_mod / (3.0*(1.0-2.0*p_ratio))
pnt = zone_next(pnt)
end_loop
end
set p_ratio=0.25 y_zero=1e7 cc=1e8
install
2-8 拆分命令行
new ;example of a sum of many things
def long_sum
temp = v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 long_sum = temp + v11 + v12 + v13 + v14 + v15
end
2-9 变量类型
new
def haveone
aa = 2
bb = 3.4
cc = ’Have a nice day’
dd = aa * bb
ee = cc + ’, old chap’
end
haveone
print fish
2-10 IF条件语句
new
def abc
if xx > 0 then
abc = 1000
else
abc = -1000
end_if
end
set xx = 10
print abc
set xx = 0
print abc
2-11 索单元自动生成
new
gen zone brick size 10 3 5
plot set rotation 0 0 45
plot block group
def place_cables
loop n (1,5)
z_d = float(n) - 0.5
command
sel cable beg 0.0,1.5,z_d end 7.0,1.5,z_d nseg 7 end_command
end_loop
end
place_cables
plot grid sel geom red
new
gen zone brick size 10 3 5
plot set rotation 15 0 60
plot block group
mod mohr
prop bulk 1e8 shear .3e8 fric 35
prop coh 1e3 tens 1e3
ini dens 1000
set grav 0,0,-10
fix x y z range z -.1 .1
fix y range y -.1 .1
fix y range y 2.9 3.1
fix x range x -.1 .1
fix x range x 9.9 10.1
set large
hist unbal
solve
save cab_str.sav
ini xdis 0 ydis 0 zdis 0
hist gp xdisp 0,1,5
def place_cables
loop n (1,5)
z_d = 5.5 - float(n)
z_t = z_d + 0.5
z_b = z_d - 0.5
command
free x range x -.1,.1 z z_b z_t
solve
sel cable beg 0.0,0.5,z_d end 7.0,0.5,z_d nseg 7
sel cable beg 0.0,1.5,z_d end 7.0,1.5,z_d nseg 7
sel cable beg 0.0,2.5,z_d end 7.0,2.5,z_d nseg 7
sel cable prop emod 2e10 ytension 1e8 xcarea 1.0 &
gr_k 2e10 gr_coh 1e10 gr_per 1.0
end_command
end_loop
end
place_cables
save cab_end.sav
plot sketch sel cable force red
2-12圆形隧道开挖模拟计算
;建立模型
gen zon radcyl p0 0 0 0 p1 6 0 0 p2 0 1 0 p3 0 0 6 &
size 4 2 8 4 dim 3 3 3 3 rat 1 1 1 1.2 group outsiderock
gen zone cshell p0 0 0 0 p1 3 0 0 p2 0 1 0 p3 0 0 3 &
size 1 2 8 4 dim 2.7 2.7 2.7 2.7 rat 1 1 1 1 group concretliner fill group insiderock gen zon reflect dip 90 dd 90 orig 0 0 0
gen zon reflect dip 0 dd 0 ori 0 0 0
gen zon brick p0 0 0 6 p1 6 0 6 p2 0 1 6 p3 0 0 13 size 4 2 6 group outsiderock1 gen zon brick p0 0 0 -12 p1 6 0 -12 p2 0 1 -12 p3 0 0 -6 size 4 2 5 group outsiderock2 gen zon brick p0 6 0 0 p1 21 0 0 p2 6 1 0 p3 6 0 6 size 10 2 4 group outsiderock3 gen zon reflect dip 0 dd 0 orig 0 0 0 range group outsiderock3
gen zon brick p0 6 0 6 p1 21 0 6 p2 6 1 6 p3 6 0 13 size 10 2 6 group outsiderock4
gen zon brick p0 6 0 -12 p1 21 0 -12 p2 6 1 -12 p3 6 0 -6 size 10 2 5 group outsiderock5 gen zon reflect dip 90 dd 90 orig 0 0 0 range x -0.1 6.1 z 6.1 13.1
gen zon reflect dip 90 dd 90 orig 0 0 0 range x -0.1 6.1 z -6.1 -12.1
gen zon reflect dip 90 dd 90 orig 0 0 0 range x 6.1 21.1 z -12.1 13.1
;绘制模型图
plot block group
plot add axes red
;plot set rotation 0 0 45 用于显示三维模型
;设置重力
set gravity 0 0 -10
;给定边界条件
fix z range z -12.01,-11.99
fix x range x -21.01,-20.99
fix x range x 20.99,21.01
fix y range y -0.01 0.01
fix y range y 0.99,1.01
;求解自重应力场
model mohr
ini density 1800 ;围岩的密度
prop bulk=1.47e8 shear=5.6e7 fric=20 coh=5.0e4 tension=1.0e4 ;体积、剪切、摩擦角、凝聚力、抗拉强度
set mech ratio=1e-4
solve
save Gravsol.sav
plot cont zdisp outl on
plot cont szz
;毛洞开挖计算
initial xdisp=0 ydisp=0 zdisp=0
model null range group insiderock any group concretliner any
plot block group
plot add axes red
set mech ratio=5e-4
solve
save Kaiwsol.sav
plot cont zdisp
plot cont sdisp
plot cont szz
plot cont xzz
;模筑衬砌计算
model elas range group concretliner any
plot block group
plot add axes red
ini density 2500 range group concretliner any ;衬砌混凝土的密度
prop bulk=16.67e9,shear=12.5e9 range group concretliner any ;衬砌混凝土的体积弹模、剪切弹模
set mech ratio=1e-4
solve
save zhihusol.sav
plot cont zdisp
plot cont sdisp
plot cont szz
plot cont xzz
;完成计算分析
(注:可编辑下载,若有不当之处,请指正,谢谢!)。