FLAC3D 实例命令流1

更新时间:2023-11-18 05:49:01 阅读量: 教育文库 文档下载

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

第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 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

7.0,1.5,z_d nseg 7 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

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

Top