Data File for “Clumps in a Box” Tutorial

clumps_in_a_box.p3dat

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
; 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