; fname: make_specimen.p2dat
;
; Generate a dense granular assembly within a box
;
; =============================================================================
; Load utility |FISH| functions for later use
set echo off
call StrainUtilities.p2fis
call StressUtilities.p2fis
set echo on
; Define domain extent and default contact model and properties in the CMAT
; note that since friction is not set (and defaults to zero), shear forces
; won't develop
domain extent -5 10 -5 15
cmat default model linear method deformability emod 1.0e8 kratio 2.5
; Generate a box-wall comprised of 4 independant walls. Each wall is expanded
; in preparation for upcoming motion, and global FISH variables that hold
; pointers to the walls are created for convenience.
wall generate name 'vessel' box 0 5 0 10.0 expand 1.5
[wp_left = wall.find('vesselLeft')]
[wp_right = wall.find('vesselRight')]
[wp_bot = wall.find('vesselBottom')]
[wp_top = wall.find('vesselTop')]
; FISH functions to get vessel dimensions
define wlx
wlx = wall.pos.x(wp_right) - wall.pos.x(wp_left)
end
define wly
wly = wall.pos.y(wp_top) - wall.pos.y(wp_bot)
end
; Generate a cloud of overlapping balls with a target porosity
; and assign density and local damping attributes
set random 10001
ball distribute porosity 0.2 radius 0.05 0.2 box 0 5 0.0 10.0
ball attribute density 2500.0 damp 0.7
;define ball and wall friction property
ball property fric @ballFriction
wall property fric @wallFriction
; solve to equilibrium
cycle 1000 calm 10
solve aratio 1e-5
calm
; identify floaters using FISH function defined in make_utilities.p2fis
define identify_floaters
loop foreach local ball ball.list
ball.group.remove(ball,'floaters')
local contactmap = ball.contactmap(ball)
local size = map.size(contactmap)
if size <= 1 then
ball.group(ball) = 'floaters'
endif
endloop
end
@identify_floaters
@ini_gstrain(@wly)
return
; =============================================================================
; eof: make_specimen.p2dat
标签:ball,floaters,wall,local,混合,wp,clump,find From: https://blog.51cto.com/u_15867247/8911405