Data Files for “Using the CMAT” Tutorial

cmat1.p2dat

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; fname: cmat1.p2dat
;
;  Illustrate simple usage of the CMAT 
;  (All default slots filled with the same data)  
;==============================================================================
model new
model random 10001

model domain extent -1.5e-2 1.5e-2 condition destroy
wall generate box -1.0e-2 1.0e-2 one-wall
ball generate number 200 radius 0.4e-3 0.6e-3 box -1.0e-2 1.0e-2 
ball attribute density 2500.0

; set ALL the default slots of the CMAT
contact cmat default model linear property kn 1e6 dp_nratio 0.2

model gravity 9.81
model solve
model save 'cmat1'

return
;==============================================================================
; eof: cmat1.p2dat

cmat2.p2dat

 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
; fname: cmat2.p2dat
;
;  Illustrate simple usage of the CMAT 
;  (Default slots filled with the different data)  
;==============================================================================
model new
model random 10001

model domain extent -1.5e-2 1.5e-2 condition destroy
wall generate box -1.0e-2 1.0e-2 one-wall
ball generate number 200 radius 0.4e-3 0.6e-3 box -1.0e-2 1.0e-2 
ball attribute density 2500.0

; set different contact models for the ball-ball and ball-facet contact types 
contact cmat default type ball-ball ...
                   model hertz      ...
                   property hz_shear 30e9 hz_poiss 0.3  ...
                            fric 0.25                   ...
                            dp_nratio 0.2
               
contact cmat default type ball-facet ...
                   model linear      ...
                   property kn 1e6 dp_nratio 0.2

model gravity 9.81
model solve
model save "cmat2"

return
;==============================================================================
; eof: cmat2.p2dat

cmat3.p2dat

 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
; fname: cmat3.p2dat
;
;  Illustrate advanced usage of the CMAT 
;  (Default and Optional slots filled with different data)  
;==============================================================================
model new
model random 10001

model domain extent -1.5e-2 1.5e-2 condition destroy
wall generate box -1.0e-2 1.0e-2 one-wall
ball generate number 100 radius 0.4e-3 0.6e-3 box -1.0e-2 1.0e-2 group 'glass' 
ball generate number 100 radius 0.4e-3 0.6e-3 box -1.0e-2 1.0e-2 group 'steel'

ball attribute density 2500.0 range group 'glass' 
ball attribute density 7500.0 range group 'steel'

contact cmat add 1 model hertz                          ...
                 property hz_shear 30e9 hz_poiss 0.3    ...
                          fric 0.25                     ...
                          dp_nratio 0.2                 ...
           range group 'glass' matches 2

contact cmat add 2 model hertz                          ...
                 property hz_shear 70e9 hz_poiss 0.3    ...
                          fric 0.05                     ...
                          dp_nratio 0.2                 ...
           range group 'steel' matches 2

contact cmat default type ball-ball                     ...
                   model hertz                          ...
                   property hz_shear 50e9 hz_poiss 0.3  ...
                           fric 0.05                    ...
                           dp_nratio 0.2

contact cmat default type ball-facet                    ...
                   model linear                         ...
                   property kn 1e6 dp_nratio 0.2

model gravity 9.81
model solve
model save 'cmat3'

return
;==============================================================================
; eof: cmat3.p2dat

cmat4.p2dat

 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
; fname: cmat4.p2dat
;
;  Illustrate usage of the CMAT with property inheritance
;==============================================================================
model new
model random 10001

model domain extent -1.5e-2 1.5e-2 condition destroy
wall generate box -1.0e-2 1.0e-2 one-wall
ball generate number 100 radius 0.4e-3 0.6e-3 box -1.0e-2 1.0e-2 group 'glass' 
ball generate number 100 radius 0.4e-3 0.6e-3 box -1.0e-2 1.0e-2 group 'steel'

ball attribute density 2500.0 range group 'glass'
ball attribute density 7500.0 range group 'steel'

contact cmat default type ball-ball         ...
                   model hertz              ...
                   property dp_nratio 0.2

contact cmat default type ball-facet               ...
                   model linear                    ...
                   property kn 1e6 dp_nratio 0.2

ball property 'hz_shear' 30e9 'hz_poiss' 0.3 'fric' 0.25 ...
     range group 'glass'

ball property 'hz_shear' 70e9 'hz_poiss' 0.3 'fric' 0.05 ...
     range group 'steel'

model gravity 9.81
model solve
model save 'cmat4'

return
;==============================================================================
; eof: cmat4.p2dat

cmat5.p2dat

 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
; fname: cmat5.p2dat
;
;  Illustrate advanced usage of the CMAT 
;  Modify existing contacts through the CMAT APPLY or CONTACT commands 
;==============================================================================
model restore 'cmat3'

; modify the 1st optional slot of the CMAT (contacts between glass balls)
contact cmat modify 1 model linearpbond                        ...
                    method deformability    emod 1e6 krat 0.5  ...
                           pb_deformability emod 1e6 krat 0.5  ...
                    property fric 0.25 dp_nratio 0.2           ...
                           pb_ten 1e8 pb_coh 1e8 pb_fa 30.0  
                      
; apply the CMAT - every contact existing in the model will be processed 
; and a new contact model will be installed. Note that all information in the 
; existing contact model will be lost when it is replaced by a new contact model.
contact cmat apply
contact method bond
model save 'cmat5a'
model cycle 10
model solve
model save 'cmat5b'

model restore 'cmat3'

; modify the 1st optional slot of the CMAT (contacts between glass balls)
contact cmat modify 1 model linearpbond                        ...
                    method deformability    emod 1e6 krat 0.5  ...
                           pb_deformability emod 1e6 krat 0.5  ...
                    property fric 0.25 dp_nratio 0.2           ...
                             pb_ten 1e8 pb_coh 1e8 pb_fa 30.0  
                      
; apply the CMAT to select contacts only. Note however that since the 
; CMAT has been modified, further contacts created between glass balls will
; have the linear parallel-bond contact model installed.
contact cmat apply range group 'glass' matches 2
contact method bond
model save 'cmat5c'
model cycle 10
model solve
model save 'cmat5d'

model restore 'cmat3'
                                 
; modify existing contacts between glass balls using contact commands.
contact model linearpbond range group 'glass' matches 2 contact gap 0.0
contact method deformability emod 1e6 krat 0.5     ...
               pb_deformability emod 1e6 krat 0.5  ...
               bond                                ...
        range contact model 'linearpbond'
                 
contact property fric 0.25 dp_nratio 0.2           ...
                 pb_ten 1e8 pb_coh 1e8 pb_fa 30.0  ...
        range group 'glass' matches 2
model cycle 10
model solve
model save 'cmat5e'

return
;==============================================================================
; eof: cmat5.p2dat

cmat6.p2dat

 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
; fname: cmat6.p2dat
;
;  Illustrate advanced usage of the CMAT with the PROXIMITY keyword  
;==============================================================================
model new
model random 10001

model domain extent -1.5e-2 1.5e-2 condition destroy
contact cmat default model linear property kn 1e6

wall generate box -1.0e-2 1.0e-2 one-wall
ball distribute porosity 0.12         ...
                radius 0.4e-3 0.6e-3 ...
                box -1.0e-2 1.0e-2 
                
ball attribute density 2000.0 damp 0.7
model mechanical timestep update 1 increment 1.05
model cycle 1000 calm 10
model solve
model save 'cmat6'

; install linearpbond model for ball-ball contacts
contact model 'linearpbond' range contact type 'ball-ball' 

; set properties for linearpbond contacts
contact property kn 1e6 ks 1e6 fric 0.5 ...
                 pb_kn 1e6 pb_ks 1e6    ...
                 pb_ten 1e8 pb_coh 1e8  ...
                 range contact model 'linearpbond'

; at this stage, the contacts are not bonded - bond them
contact method bond ; gap 0.0
model save 'cmat6a'

; we can also bond inactive contacts with a positive gap
contact method bond gap 5e-5
model save 'cmat6b'

; Here we want to bond contacts with a gap <= 2.5e-4
; But the contacts that have been created do
; not have such large gaps (even inactive contacts)
contact method bond gap 2.5e-4
model save 'cmat6c'

; To make sure inactive contacts exist at the desired bond installation gap,
; the PROXIMITY keyword must be used in the CMAT.
model restore 'cmat6'
contact cmat default type ball-ball   ...
                   model linearpbond  ...
                   property kn 1e6    ...
                   proximity 2.5e-4
             
; The CLEAN command forces contact detection
; Upon execution, new contacts are created, and we are sure that pairs with a 
; separation distance <= 2.5e-4 now have an inactive contact
model clean
; The CMAT APPLY command must also be executed to modify existing contact
contact cmat apply range contact type 'ball-ball'

; the contacts with a gap <= 2.5e-4 can now be modified
contact model linearpbond range contact type 'ball-ball' gap 2.5e-4
contact property kn 1e6 ks 1e6 fric 0.5 ...
                 pb_kn 1e6 pb_ks 1e6    ...
                 pb_ten 1e8 pb_coh 1e8  ...
                 range contact model 'linearpbond'
                 
contact method bond gap 2.5e-4
model save 'cmat6d'

program return
;==============================================================================
; eof: cmat6.p2dat