fish define GetMaxh
maxh=0
maxr=0
loop foreach local bp ball.list
if maxh<ball.pos.z(bp) then
maxh = ball.pos.z(bp)
maxr = ball.radius(bp)
endif
endloop
end
@GetMaxh
geometry export 'cylinder.stl' format stl
geometry import 'cylinder.stl'
接着我们就可以生成这个形状的Clump了
clump template create name 'clu_tem_hammer' ...
geometry 'cylinder' ...
surfcalculate ...
bubblepack ratio 0.7 distance 170
clump replicate id [id_hammer] name 'clu_tem_hammer' density [density_hammer] position (0,0,[maxh+maxr+height_hammer/2.+dz])
这样强夯锤就生成完了,效果如下图:
4. 强夯过程
在强夯前,我们需要将接触改为hysteretic接触模型,代码如下:
contact cmat default type ball-pebble ...
model hysteretic property hz_shear [hz_G_hammer] hz_poiss [hz_miu_hammer] ...
fric [fric_ball_hammer] dp_en [restitution_coef_ball_hammer]
contact cmat default type ball-ball ...
model hysteretic property hz_shear [hz_G_ball] hz_poiss [hz_miu_ball] ...
fric [fric_ball_ball] dp_en [restitution_coef_ball_ball]
contact cmat default type ball-facet ...
model hysteretic property hz_shear [hz_G_wall] hz_poiss [hz_miu_wall] ...
fric [fric_ball_wall] dp_en [restitution_coef_ball_wall]
contact cmat apply
fish define load
loop local i (1,10)
command
clump delete clumps
clump replicate id [id_hammer] name 'clu_tem_hammer' density [density_hammer] ...
position (0,0,[maxh+maxr+height_hammer/2.+dz])
model mechanical time-total 0.0
clump history name [string.build('z_disp_hammer%1',i)] displacement-z id [id_hammer]
model history name [string.build('t%1',i)] mechanical time-total
endcommand
point_hammer = clump.find(id_hammer)
clump.vel.z(point_hammer) = -10.84
command
model solve mechanical time [target_time]
model save [string.build('Result%1',i)]
endcommand
endloop
end
@load