1. 引言
有同学问'3DEC显示剪切和拉伸裂隙,并统计个数', 显示方法很简单,在Build Plot中选择Joint Subcontact, 然后选择State即可显示剪切和拉伸裂隙,统计个数需要使用FISH进行编程,原理很简单,对列表block.subcontact.list使用block.subcontact.state进行判别计数即可。
2. 状态指示器
(1) 连续屈服节理模型
(2) 摩尔-库伦模型
3. 命令和FISH
(1) block contact list state
(2) block.subcontact.state.string
(3) block.subcontact.list
(4) block.subcontact.fid
(5) block.subcontact.state
(6) math.and
(7) math.or
4. 代码
下面的代码统计了各种主要状态下的数量:
model restore 'sample.sav'
fish define state_statistics
local elastic_count = 0
local slip_n_count = 0 ;1
local tension_n_count = 0 ;2
local slip_p_count = 0 ;4
local tension_p_count = 0 ;8
local slip_n_p_count = 0 ;5
loop foreach local cx block.subcontact.list
b_state = block.subcontact.state(cx)
if b_state = 0 ; none
elastic_count + = 1
else if b_state = 1 ;Failure in shear now
slip_n_count = slip_n_count + 1
else if b_state = 2 ;Failure in tension now
tension_n_count = tension_n_count + 1
else if b_state = 4 ;Failure in shear in the past
slip_p_count = slip_p_count + 1
else if b_state = 8 ;Failure in tension now
tension_p_count = tension_p_count + 1
else if b_state = 5 ;slip_n, slip_p
slip_n_p_count = slip_n_p_count + 1
endif
endloop
io.out('none = '+ string(elastic_count))
io.out('slip-n = '+ string(slip_n_count))
io.out('tension-n = '+ string(tension_n_count))
io.out('slip-p = '+ string(slip_p_count))
io.out('tension-p = '+ string(tension_p_count))
io.out('slip-n, slip-p = '+ string(slip_n_p_count))
end
[ ]