- 积分
- 0
- 注册时间
- 2010-9-15
- 仿真币
-
- 最后登录
- 1970-1-1
|
发表于 2010-11-14 15:14:05
|
显示全部楼层
来自 上海
我这样生成模型,删除墙后,颗粒总是逃逸,请较高手,有什么方法解决啊?
new
set random
set disk on
set log on
set logfile sha20090918.on
;---------------------------------------------
def initial_wall; 初始化墙尺寸
height1=0.1
pileD =0.01
width=pileD*30
height2=0.3
hremove=0.04
poros=0.12
fric_sand=0
fric_soil=0
pileD =0.01
pilel =0.1
kn_w=1e8
end
initial_wall
;------------------make wall--------------------
def make_wall
extend=0.1
height3=height2+extend+0.1
_x0=-extend
_y0=0
_x1=width+extend
_y1=0
command
wall id=1 kn=kn_w nodes (_x0,_y0) (_x1,_y1)
end_command
;----------------------------------------------------
_x0=width
_y0=-extend
_x1=width
_y1=height2+extend
command
wall id=2 kn=kn_w nodes (_x0,_y0) (_x1,_y1)
end_command
;------------------------------------------------
_x0=width
_y0=height2+extend
_x1=width
_y1=height2+extend+0.1
command
wall id=3 kn=kn_w nodes (_x0,_y0) (_x1,_y1)
end_command
;-------------------------------------------------
_x0=width+extend
_y0=height2+extend+0.1
_x1=-extend
_y1=height2+extend+0.1
command
wall id=4 kn=kn_w nodes (_x0,_y0) (_x1,_y1)
end_command
;-------------------------------------------------
_x0=0
_y0=height2+extend+0.1
_x1=0
_y1=height2+extend
command
wall id=5 kn=kn_w nodes (_x0,_y0) (_x1,_y1)
end_command
;-------------------------------------------------
_x0=0
_y0=height2+extend
_x1=0
_y1=-extend
command
wall id=6 kn=kn_w nodes (_x0,_y0) (_x1,_y1)
end_command
end
;---------------------------
make_wall ;-----------生成墙------------------
;-----------分隔墙完成--------------------------------
;------------------------------------------------
;-------------------砂土颗粒-----------------------
;------------------------------------------------
def set_prop_sand
dens_sand=2630
fric_sand=0.0
kn_sand=5e7
ks_sand=6.25e6
dens_soil=2730
fric_soil=0.0
kn_soil=2e6
ks_soil=1e6
end
;-----------------------------------------------
def assemble_sand
set_prop_sand
;-------------the frist qu----------
rlo=0.0018
rhi=0.0025
tot_vol = (height2+extend+0.1)*width
rbar= 0.5*(rlo+rhi)
_x0=0
_y0=0
_x1=width
_y1=height2+extend+0.1
num=int((1.0-poros)*tot_vol/(pi*rbar^2))
shaqu1=num+100 ;预留100颗粒
shaqu10=100+1
mult = 1.6
rlo_0=rlo/mult
rhi_0=rhi/mult
command
gen id=shaqu10,shaqu1 rad=rlo_0,rhi_0 x=_x0,_x1 y=_y0,_y1 &
tries 10000000000 ;filter ff_sand
macro rball_sand1 'id=shaqu10,shaqu1'
prop dens=dens_sand kn=kn_sand range rball_sand1
end_command
ii=out(string(num)+' particles were created')
command
plot create view1
plot set background white
plot add ax brown
plot wall red
plot add ball yellow
plot show
;----------------------------
cyc 10
cyc 500
;-----------------------
end_command
sum = 0 ;get actual porosity
bp = ball_head
loop while bp # null
sum = sum +pi*b_rad(bp)^2
bp = b_next(bp)
end_loop
pmeas = 1.0-sum/(1.0*tot_vol)
mult = sqrt((1.0-poros)/(1.0-pmeas))
command
ini rad mul mult range rball_sand1
prop ks=ks_sand fric=fric_sand range rball_sand1
;-----------------------------------
cycle 10 range rball_sand1
cycle 500 range rball_sand1
;-----------------------------------
end_command
;------------finish----------------
end
;------------------------------------------------------
;------------- main program---------------------------------
;-----------------------------------------------------------
initial_wall
assemble_sand
set grav 0 -9.8
cyc 100
;----------------------------------
macro zero 'ini xvel 0 yvel 0 spin 0 xd 0 yd 0' solve ave 0.001 max 0.001
zero
group upperspace range x 0.0 width y height2 height3
dele ball range group upperspace
range name modelbox x 0 width y 0 height2
dele ball range modelbox not
dele wall 3
dele wall 4
dele wall 5
cycle 1000
save model_box.sav |
|