; fname: clumps_in_a_box.p3dat
;
; Exercise clump template creation and generation
;==============================================================================
model new
model title 'Clumps in a box'
; Set the domain extent and the random seed
model domain extent -10.0 10.0
model random 12001
; Modify the default slots of the Contact Model Assignment Table
; Here we choose the linear contact model for all contact types
contact cmat default model linear property kn 1.0e6 ...
ks 5.0e5 dp_nratio 0.5 fric 0.3
; Create a clump template, specifying the interia tensor and volume
[rad = 0.5]
[vc = (4.0/3.0)*math.pi*(rad)^3]
[moic = (2.0/5.0) * vc * rad^2]
clump template create name 'single' ...
pebbles 1 ...
@rad 0 0 0 ...
volume @vc ...
inertia @moic @moic @moic 0 0 0
; Create a clump template, specifying the calculation of the
; inertial properties from the pebbles via voxelization
clump template create name 'dyad' ...
pebbles 2 ...
@rad [-rad*0.5] 0 0 ...
@rad [rad*0.5] 0 0 ...
pebcalculate 0.005
; Create a clump template from an stl file, filling it with
; the bubblepack algorithm
geometry import 'dolos.stl'
clump template create name 'dolos' ...
geometry 'dolos' ...
bubblepack ratio 0.3 distance 120 ...
surfcalculate
; Generate a containing box
wall generate box -5.0 5.0 one-wall
; Generate clumps in one box without orientation control, drawing
; equally from all clump templates
clump generate diameter size 1.5 number 50 ...
box -5.0 5.0 -5.0 5.0 -5.0 0.0 ...
group 'bottom'
; Generate clumps in another box with orientation control, drawing
; unequally from the templates
clump generate diameter size 1.5 number 25 ...
box -5.0 5.0 -5.0 5.0 0.0 5.0 ...
templates 2 ...
'dyad' 0.3 'dolos' 0.7 ...
azimuth 45.0 45.0 ...
tilt 90.0 90.0 ...
elevation 45.0 45.0 ...
group 'top1'
clump generate diameter size 1.5 number 25 ...
box -5.0 5.0 -5.0 5.0 0.0 5.0 ...
templates 2 ...
'dyad' 0.7 'dolos' 0.3 ...
azimuth -45.0 -45.0 ...
tilt 90.0 90.0 ...
elevation 45.0 45.0 ...
group 'top2'
; Assign clump density
clump attribute density 100.0
; Activate gravity
model gravity 10.0
;Save the initial state
model save 'initial-state'
; Solve for a given time and save the model
model solve time 0.8
model save 'intermediate-time'
; Solve again to equilibrium and save the model
model solve ratio-average 1e-4
model save 'final-model'
return
;==============================================================================
; eof: clumps_in_a_box.p3dat