目录
滚刀破岩
批量运行dat文件
console 文件批量运行不需要修改的dat文件
call 4yinglishifang
call 5jiagundao
call 6jiazai
开挖面模拟
进行应力释放
滚刀破岩情况下,岩石处于横向应力之间,受到两侧的压力作用。
restore jiajiaojie
wall attribute vel 0 ;将墙体初速度定为0
def computer_chicun
wlx=wall.pos.x(wpright)-wall.pos.x(wpleft)
end
;定义墙体尺寸
def computer_stress
computer_chicun
wxss=0.5*(wall.force.contact.x(wpleft)-wall.force.contact.x(wpright))/wly
end
def get_g
zongKNX=100e6*2.0
loop foreach ct wall.contactmap(wpleft)
zongKNX+=contact.prop(ct,"kn")
endloop
loop foreach ct wall.contactmap(wpright)
zongKNX+=contact.prop(ct,"kn")
endloop
gx=1.0*servo_factor*wly/(zongKNX*global.timestep)
end
def sevro_walls
computer_stress
if global.step>time_record then
get_g
time_record=global.step+sevro_freq
endif
xvel=gx*math.abs(math.abs(wxss)-txx)
if math.abs(wxss)<txx then
wall.vel.x(wpleft)=xvel
wall.vel.x(wpright)=-xvel
else
wall.vel.x(wpleft)=-xvel
wall.vel.x(wpright)=xvel
endif
end
;去除竖向伺服,在滚刀破岩情况下只有横向作用
wall delete walls range id 3
;删除墙体
cycle 1
solve
;施加初始扰动,然后再平衡
save init_state
生成刀片
加滚刀(对岩石施加两种作用力:滚动切削+竖向侵蚀)
滚刀底部宽度w1,顶部宽度w2,两侧角度θ
每一步都要去平衡,必须始终保持模型处于平衡状态
冒泡算法:
def get_max_height ball_max_height=-1e100 loop foreach bp ball.list if ball_max_height <ball.pos.y(bp)+ball.radius(bp) then ball_max_height=ball.pos.y(bp)+ball.radius(bp) endif endloop end @get_max_height
创建边:
wall create vertices x1 y1 x2 y2
restore init_state
def gundao_par
width_down=0.03
width_up=width_down*2.0 ;两者建立联系,让参数尽可能少
jiaodu=20
height_down=(width_up-width_down)/math.tan(jiaodu*math.pi/180.0)
height_up=height_down*2.0
end
@gundao_par
;定义滚刀参数,底部和顶部宽度,角度
;角度需要转化为弧度制
;height_up=height_down*2.0为自主建立的关系
def get_max_height
ball_max_height=-1e100
loop foreach bp ball.list
if ball_max_height <ball.pos.y(bp)+ball.radius(bp) then
ball_max_height=ball.pos.y(bp)+ball.radius(bp)
endif
endloop
end
@get_max_height
;冒泡算法
;得到试样顶部的位置:顶部颗粒的位置加上半径
wall create vertices [-width_up*0.5] [ball_max_height+height_down+height_up] [-width_up*0.5] [ball_max_height+height_down] ...
[-width_up*0.5] [ball_max_height+height_down] [-width_down*0.5] [ball_max_height] ...
[-width_down*0.5] [ball_max_height] [width_down*0.5] [ball_max_height] ...
[width_down*0.5] [ball_max_height] [width_up*0.5] [ball_max_height+height_down] ...
[width_up*0.5] [ball_max_height+height_down] [width_up*0.5] [ball_max_height+height_down+height_up] ...
[width_up*0.5] [ball_max_height+height_down+height_up] [-width_up*0.5] [ball_max_height+height_down+height_up]
;每条边的终点,是下一条边的起点
;和之前的滚筒模型类似
;在此处用方括号[]来调用之前的fish函数
cycle 1
solve
save jiadaopian
;每一步都要去平衡,必须始终保持模型处于平衡状态
加载侵入
需要添加裂纹(fracture文件)
call fracture.p2fis @track_init ;调用裂纹文件
restore jiadaopian
[daopian_vel=0.1]
[shendu=0.2]
set mech age 0
ball attribute displacement multiply 0
wall attribute vel [-daopian_vel] range id 5
call fracture.p2fis
@track_init
;调用裂纹
[wp_daopian=wall.find(5)]
def jiance
whilestepping
faxiangli=wall.force.contact.y(wp_daopian)
weiyi=wall.disp.y(wp_daopian)
time=mech.age
end
;法向力、位移、时间
history delete
history id 1 @faxiangli
history id 2 @weiyi
history id 3 @time
;先删除之前的历史记录
solve time [shendu/daopian_vel]
软硬互层岩石的侵入
cmat 全称:cmat model apply table,只对新接触起作用
对于已有接触需要使用 cmat apply 来更新接触
cmat list 命令可以列出cmat储存的相关属性
cmat add 1 model linear method deform emod 100e6 kratio 1.5 range contact type ball-facet
用来和ball-ball的接触区分。如果不加这一段,则fracture运行时会报错(fracture只能处理ball-ball部分)
restore yuya
[jianju=rdmax*10]
[kuandu=rdmax*3]
[jiaodu=30]
ball group ying
ball group ruan range plane origin 0 0 dip [jiaodu] distance [kuandu*0.5]
;先全部定义为硬岩,然后再划分出软岩,[kuandu*0.5]
def add_ruan_up
pos_x=0
pos_y=0
loop while pos_x<wlx*0.5
pos_x+=(jianju+kuandu)*math.cos(jiaodu*math.pi/180.0)
pos_y+=(jianju+kuandu)*math.sin(jiaodu*math.pi/180.0)
command
ball group ruan range plane origin [pos_x] [pos_y] dip [jiaodu] distance [kuandu*0.5]
endcommand
endloop
end
@add_ruan_up
;建立上方的多个软弱岩层
def add_ruan_down
pos_x=0
pos_y=0
loop while pos_x>-wlx*0.5
pos_x-=(jianju+kuandu)*math.cos(jiaodu*math.pi/180.0)
pos_y-=(jianju+kuandu)*math.sin(jiaodu*math.pi/180.0)
command
ball group ruan range plane origin [pos_x] [pos_y] dip [jiaodu] distance [kuandu*0.5]
endcommand
endloop
end
@add_ruan_down
;建立下方的多个软弱岩层
cmat add 1 model linear method deform emod 100e6 kratio 1.5 range contact type ball-facet
;墙体和球
cmat add 2 model linearpbond method deform emod 1e8 kratio 1.5 ...
pb_deform emod 1e8 kratio 1.5 ...
property pb_coh 1e6 pb_ten 1e6 pb_fa 40 fric 0.5 ...
range group ruan
;软岩的物理属性
cmat add 3 model linearpbond method deform emod 1e8 kratio 1.5 ...
pb_deform emod 1e8 kratio 1.5 ...
property pb_coh 2e6 pb_ten 2e6 pb_fa 40 fric 0.5 ...
range group ying
;硬岩的物理属性
cmat apply
cycle 1
solve
save temp1
;首先平衡,消除cmat apply带来的不平衡力
contact method bond gap [rdmin*0.2]
;创建胶结,默认为[rdmin*0.2]
cycle 1
solve
save jiajiaojie